mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[FIX] qweb: t-set directive
This commit reintroduces some tests for the t-set directive and make
them pass. For that, it was necessary to adapt the qweb compiler in
order to get the following behaviors:
A t-set can affect parent contexts (up to the first parent tagged as
boundary) when the key changed is found in one of the parent contexts.
Some context are marked as boundaries in such a way that
- rendering contexts (e.g. components) cannot be modified via a t-set.
- a t-set in a t-call body or in a called template can never change a
context above the t-call context.
Code prettification has been done.
Snapshots have been modified.
This commit is contained in:
committed by
Aaron Bohy
parent
10df0b5f4a
commit
0f2192604c
@@ -274,7 +274,7 @@ export class QWebCompiler {
|
|||||||
// define blocks and utility functions
|
// define blocks and utility functions
|
||||||
this.addLine(`let { text, createBlock, list, multi, html, toggler, component } = bdom;`);
|
this.addLine(`let { text, createBlock, list, multi, html, toggler, component } = bdom;`);
|
||||||
this.addLine(
|
this.addLine(
|
||||||
`let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;`
|
`let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;`
|
||||||
);
|
);
|
||||||
if (this.shouldDefineAssign) {
|
if (this.shouldDefineAssign) {
|
||||||
this.addLine(`let assign = Object.assign;`);
|
this.addLine(`let assign = Object.assign;`);
|
||||||
@@ -308,6 +308,7 @@ export class QWebCompiler {
|
|||||||
}
|
}
|
||||||
if (this.shouldProtectScope) {
|
if (this.shouldProtectScope) {
|
||||||
this.addLine(` ctx = Object.create(ctx);`);
|
this.addLine(` ctx = Object.create(ctx);`);
|
||||||
|
this.addLine(` ctx[isBoundary] = 1`);
|
||||||
}
|
}
|
||||||
if (this.target.hasCache) {
|
if (this.target.hasCache) {
|
||||||
this.addLine(` let cache = ctx.cache || {};`);
|
this.addLine(` let cache = ctx.cache || {};`);
|
||||||
@@ -815,9 +816,9 @@ export class QWebCompiler {
|
|||||||
|
|
||||||
compileTCall(ast: ASTTCall, ctx: Context) {
|
compileTCall(ast: ASTTCall, ctx: Context) {
|
||||||
let { block, forceNewBlock } = ctx;
|
let { block, forceNewBlock } = ctx;
|
||||||
// this.hasTCall = true;
|
|
||||||
if (ast.body) {
|
if (ast.body) {
|
||||||
this.addLine(`ctx = Object.create(ctx);`);
|
this.addLine(`ctx = Object.create(ctx);`);
|
||||||
|
this.addLine(`ctx[isBoundary] = 1;`);
|
||||||
const nextId = BlockDescription.nextBlockId;
|
const nextId = BlockDescription.nextBlockId;
|
||||||
const subCtx: Context = createContext(ctx, { preventRoot: true });
|
const subCtx: Context = createContext(ctx, { preventRoot: true });
|
||||||
this.compileAST({ type: ASTType.Multi, content: ast.body }, subCtx);
|
this.compileAST({ type: ASTType.Multi, content: ast.body }, subCtx);
|
||||||
@@ -883,7 +884,7 @@ export class QWebCompiler {
|
|||||||
} else {
|
} else {
|
||||||
value = expr;
|
value = expr;
|
||||||
}
|
}
|
||||||
this.addLine(`ctx[\`${ast.name}\`] = ${value};`);
|
this.addLine(`setContextValue(ctx, "${ast.name}", ${value});`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,9 +25,10 @@
|
|||||||
// Misc types, constants and helpers
|
// Misc types, constants and helpers
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
const RESERVED_WORDS = "true,false,NaN,null,undefined,debugger,console,window,in,instanceof,new,function,return,this,eval,void,Math,RegExp,Array,Object,Date".split(
|
const RESERVED_WORDS =
|
||||||
","
|
"true,false,NaN,null,undefined,debugger,console,window,in,instanceof,new,function,return,this,eval,void,Math,RegExp,Array,Object,Date".split(
|
||||||
);
|
","
|
||||||
|
);
|
||||||
|
|
||||||
const WORD_REPLACEMENT: { [key: string]: string } = Object.assign(Object.create(null), {
|
const WORD_REPLACEMENT: { [key: string]: string } = Object.assign(Object.create(null), {
|
||||||
and: "&&",
|
and: "&&",
|
||||||
|
|||||||
@@ -65,16 +65,34 @@ function prepareList(collection: any): [any[], any[], number, any[]] {
|
|||||||
const n = values.length;
|
const n = values.length;
|
||||||
return [keys, values, n, new Array(n)];
|
return [keys, values, n, new Array(n)];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const isBoundary = Symbol("isBoundary");
|
||||||
|
|
||||||
|
function setContextValue(ctx: { [key: string]: any }, key: string, value: any): void {
|
||||||
|
const ctx0 = ctx;
|
||||||
|
while (!ctx.hasOwnProperty(key) && !ctx.hasOwnProperty(isBoundary)) {
|
||||||
|
const newCtx = ctx.__proto__;
|
||||||
|
if (!newCtx) {
|
||||||
|
ctx = ctx0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
ctx = newCtx;
|
||||||
|
}
|
||||||
|
ctx[key] = value;
|
||||||
|
}
|
||||||
|
|
||||||
export const UTILS = {
|
export const UTILS = {
|
||||||
// elem,
|
// elem,
|
||||||
// setText,
|
// setText,
|
||||||
withDefault,
|
withDefault,
|
||||||
zero: Symbol("zero"),
|
zero: Symbol("zero"),
|
||||||
|
isBoundary,
|
||||||
callSlot,
|
callSlot,
|
||||||
capture,
|
capture,
|
||||||
// toClassObj,
|
// toClassObj,
|
||||||
withKey,
|
withKey,
|
||||||
prepareList,
|
prepareList,
|
||||||
|
setContextValue,
|
||||||
shallowEqual,
|
shallowEqual,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`app destroy remove the widget from the DOM 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`basics Multi root component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>1</span>\`);
|
let block2 = createBlock(\`<span>1</span>\`);
|
||||||
let block4 = createBlock(\`<span>2</span>\`);
|
let block4 = createBlock(\`<span>2</span>\`);
|
||||||
@@ -22,7 +22,7 @@ exports[`basics a class component inside a class component, no external dom 1`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
||||||
|
|
||||||
@@ -36,7 +36,7 @@ exports[`basics a class component inside a class component, no external dom 2`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -48,7 +48,7 @@ exports[`basics a component cannot be mounted in a detached node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ exports[`basics a component inside a component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ exports[`basics a component inside a component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -91,7 +91,7 @@ exports[`basics can be clicked on and updated 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><button block-handler-1=\\"click\\">Inc</button></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><button block-handler-1=\\"click\\">Inc</button></div>\`);
|
||||||
|
|
||||||
@@ -108,7 +108,7 @@ exports[`basics can handle empty props 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ exports[`basics can handle empty props 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -138,7 +138,7 @@ exports[`basics can mount a component with just some text 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`just text\`);
|
return text(\`just text\`);
|
||||||
@@ -150,7 +150,7 @@ exports[`basics can mount a component with no text 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`\`);
|
return text(\`\`);
|
||||||
@@ -162,7 +162,7 @@ exports[`basics can mount a simple component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
||||||
|
|
||||||
@@ -176,7 +176,7 @@ exports[`basics can mount a simple component with multiple roots 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<span/>\`);
|
let block2 = createBlock(\`<span/>\`);
|
||||||
let block3 = createBlock(\`<div/>\`);
|
let block3 = createBlock(\`<div/>\`);
|
||||||
@@ -193,7 +193,7 @@ exports[`basics can mount a simple component with props 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -208,7 +208,7 @@ exports[`basics cannot mount on a documentFragment 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>content</div>\`);
|
let block1 = createBlock(\`<div>content</div>\`);
|
||||||
|
|
||||||
@@ -222,7 +222,7 @@ exports[`basics child can be updated 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].value);
|
return text(ctx['props'].value);
|
||||||
@@ -234,7 +234,7 @@ exports[`basics child can be updated 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {value: ctx['state'].counter}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {value: ctx['state'].counter}, key + \`__1\`, node, ctx);
|
||||||
@@ -246,7 +246,7 @@ exports[`basics class component with dynamic text 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>My value: <block-text-0/></span>\`);
|
let block1 = createBlock(\`<span>My value: <block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ exports[`basics class parent, class child component with props 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ exports[`basics class parent, class child component with props 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {value: 42}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {value: 42}, key + \`__1\`, node, ctx);
|
||||||
@@ -288,7 +288,7 @@ exports[`basics component with dynamic content can be updated 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -303,7 +303,7 @@ exports[`basics do not remove previously rendered dom if not necessary 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -317,7 +317,7 @@ exports[`basics do not remove previously rendered dom if not necessary, variatio
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><h1>h1</h1><span><block-text-0/></span></div>\`);
|
let block1 = createBlock(\`<div><h1>h1</h1><span><block-text-0/></span></div>\`);
|
||||||
|
|
||||||
@@ -370,7 +370,7 @@ exports[`basics has no el after creation 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple</span>\`);
|
let block1 = createBlock(\`<span>simple</span>\`);
|
||||||
|
|
||||||
@@ -384,7 +384,7 @@ exports[`basics higher order components parent and child 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>a</div>\`);
|
let block1 = createBlock(\`<div>a</div>\`);
|
||||||
|
|
||||||
@@ -398,7 +398,7 @@ exports[`basics higher order components parent and child 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>b</span>\`);
|
let block1 = createBlock(\`<span>b</span>\`);
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ exports[`basics higher order components parent and child 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -430,7 +430,7 @@ exports[`basics higher order components parent and child 4`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {child: ctx['state'].child}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {child: ctx['state'].child}, key + \`__1\`, node, ctx);
|
||||||
@@ -442,7 +442,7 @@ exports[`basics list of two sub components inside other nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>asdf</span>\`);
|
let block1 = createBlock(\`<span>asdf</span>\`);
|
||||||
|
|
||||||
@@ -456,7 +456,7 @@ exports[`basics list of two sub components inside other nodes 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block3 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
@@ -481,7 +481,7 @@ exports[`basics parent, child and grandchild 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>hey</div>\`);
|
let block1 = createBlock(\`<div>hey</div>\`);
|
||||||
|
|
||||||
@@ -495,7 +495,7 @@ exports[`basics parent, child and grandchild 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -507,7 +507,7 @@ exports[`basics parent, child and grandchild 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -519,7 +519,7 @@ exports[`basics props is set on root component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
||||||
|
|
||||||
@@ -533,7 +533,7 @@ exports[`basics reconciliation alg is not confused in some specific situation 1`
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child</span>\`);
|
let block1 = createBlock(\`<span>child</span>\`);
|
||||||
|
|
||||||
@@ -547,7 +547,7 @@ exports[`basics reconciliation alg is not confused in some specific situation 2`
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -563,7 +563,7 @@ exports[`basics rerendering a widget with a sub widget 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><button block-handler-1=\\"click\\">Inc</button></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><button block-handler-1=\\"click\\">Inc</button></div>\`);
|
||||||
|
|
||||||
@@ -580,7 +580,7 @@ exports[`basics rerendering a widget with a sub widget 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Counter\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Counter\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -592,7 +592,7 @@ exports[`basics same t-keys in two different places 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -607,7 +607,7 @@ exports[`basics same t-keys in two different places 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><div><block-child-0/></div><div><block-child-1/></div></div>\`);
|
let block1 = createBlock(\`<div><div><block-child-0/></div><div><block-child-1/></div></div>\`);
|
||||||
|
|
||||||
@@ -623,7 +623,7 @@ exports[`basics simple component with a dynamic text 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -638,7 +638,7 @@ exports[`basics simple component, useState 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -653,7 +653,7 @@ exports[`basics some simple sanity checks (el/status) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
||||||
|
|
||||||
@@ -667,7 +667,7 @@ exports[`basics sub components between t-ifs 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child</span>\`);
|
let block1 = createBlock(\`<span>child</span>\`);
|
||||||
|
|
||||||
@@ -681,7 +681,7 @@ exports[`basics sub components between t-ifs 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><span><block-child-2/></span><block-child-3/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><span><block-child-2/></span><block-child-3/></div>\`);
|
||||||
let block2 = createBlock(\`<h1>hey</h1>\`);
|
let block2 = createBlock(\`<h1>hey</h1>\`);
|
||||||
@@ -708,7 +708,7 @@ exports[`basics t-elif works with t-component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>hey</span>\`);
|
let block1 = createBlock(\`<span>hey</span>\`);
|
||||||
|
|
||||||
@@ -722,7 +722,7 @@ exports[`basics t-elif works with t-component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block2 = createBlock(\`<div>somediv</div>\`);
|
let block2 = createBlock(\`<div>somediv</div>\`);
|
||||||
@@ -743,7 +743,7 @@ exports[`basics t-else with empty string works with t-component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>hey</span>\`);
|
let block1 = createBlock(\`<span>hey</span>\`);
|
||||||
|
|
||||||
@@ -757,7 +757,7 @@ exports[`basics t-else with empty string works with t-component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block2 = createBlock(\`<div>somediv</div>\`);
|
let block2 = createBlock(\`<div>somediv</div>\`);
|
||||||
@@ -778,7 +778,7 @@ exports[`basics t-else works with t-component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>hey</span>\`);
|
let block1 = createBlock(\`<span>hey</span>\`);
|
||||||
|
|
||||||
@@ -792,7 +792,7 @@ exports[`basics t-else works with t-component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block2 = createBlock(\`<div>somediv</div>\`);
|
let block2 = createBlock(\`<div>somediv</div>\`);
|
||||||
@@ -813,7 +813,7 @@ exports[`basics t-if works with t-component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>hey</span>\`);
|
let block1 = createBlock(\`<span>hey</span>\`);
|
||||||
|
|
||||||
@@ -827,7 +827,7 @@ exports[`basics t-if works with t-component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -845,7 +845,7 @@ exports[`basics t-key on a component with t-if, and a sibling component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child</span>\`);
|
let block1 = createBlock(\`<span>child</span>\`);
|
||||||
|
|
||||||
@@ -859,7 +859,7 @@ exports[`basics t-key on a component with t-if, and a sibling component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -878,7 +878,7 @@ exports[`basics text after a conditional component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p>simple vnode</p>\`);
|
let block1 = createBlock(\`<p>simple vnode</p>\`);
|
||||||
|
|
||||||
@@ -892,7 +892,7 @@ exports[`basics text after a conditional component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><span><block-text-0/></span></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><span><block-text-0/></span></div>\`);
|
||||||
|
|
||||||
@@ -911,7 +911,7 @@ exports[`basics three level of components with collapsing root nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>2</div>\`);
|
let block1 = createBlock(\`<div>2</div>\`);
|
||||||
|
|
||||||
@@ -925,7 +925,7 @@ exports[`basics three level of components with collapsing root nodes 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -937,7 +937,7 @@ exports[`basics three level of components with collapsing root nodes 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -949,7 +949,7 @@ exports[`basics throws if mounting on target=null 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
||||||
|
|
||||||
@@ -963,7 +963,7 @@ exports[`basics two child components 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
||||||
|
|
||||||
@@ -977,7 +977,7 @@ exports[`basics two child components 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
let b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -991,7 +991,7 @@ exports[`basics updating a component with t-foreach as root 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -1010,7 +1010,7 @@ exports[`basics widget after a t-foreach 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -1024,7 +1024,7 @@ exports[`basics widget after a t-foreach 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -1049,7 +1049,7 @@ exports[`basics zero or one child components 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
||||||
|
|
||||||
@@ -1063,7 +1063,7 @@ exports[`basics zero or one child components 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`async rendering destroying a widget before start is over 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`calling render in destroy 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, inTCall, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ exports[`change state and call manually render: no unnecessary rendering 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -72,7 +72,7 @@ exports[`changing state before first render does not trigger a render (with pare
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -87,7 +87,7 @@ exports[`changing state before first render does not trigger a render (with pare
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -105,7 +105,7 @@ exports[`changing state before first render does not trigger a render 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -120,7 +120,7 @@ exports[`concurrent renderings scenario 1 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
@@ -136,7 +136,7 @@ exports[`concurrent renderings scenario 1 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -151,7 +151,7 @@ exports[`concurrent renderings scenario 1 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -166,7 +166,7 @@ exports[`concurrent renderings scenario 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
@@ -182,7 +182,7 @@ exports[`concurrent renderings scenario 2 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -197,7 +197,7 @@ exports[`concurrent renderings scenario 2 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -213,7 +213,7 @@ exports[`concurrent renderings scenario 2bis 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ exports[`concurrent renderings scenario 2bis 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ exports[`concurrent renderings scenario 2bis 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ exports[`concurrent renderings scenario 3 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<i><block-text-0/><block-text-1/></i>\`);
|
let block1 = createBlock(\`<i><block-text-0/><block-text-1/></i>\`);
|
||||||
|
|
||||||
@@ -275,7 +275,7 @@ exports[`concurrent renderings scenario 3 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -290,7 +290,7 @@ exports[`concurrent renderings scenario 3 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -305,7 +305,7 @@ exports[`concurrent renderings scenario 3 4`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -320,7 +320,7 @@ exports[`concurrent renderings scenario 4 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<i><block-text-0/><block-text-1/></i>\`);
|
let block1 = createBlock(\`<i><block-text-0/><block-text-1/></i>\`);
|
||||||
|
|
||||||
@@ -336,7 +336,7 @@ exports[`concurrent renderings scenario 4 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -351,7 +351,7 @@ exports[`concurrent renderings scenario 4 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -366,7 +366,7 @@ exports[`concurrent renderings scenario 4 4`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -381,7 +381,7 @@ exports[`concurrent renderings scenario 5 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
@@ -396,7 +396,7 @@ exports[`concurrent renderings scenario 5 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -411,7 +411,7 @@ exports[`concurrent renderings scenario 6 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@ exports[`concurrent renderings scenario 6 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -441,7 +441,7 @@ exports[`concurrent renderings scenario 7 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/><block-text-1/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/><block-text-1/></p>\`);
|
||||||
|
|
||||||
@@ -457,7 +457,7 @@ exports[`concurrent renderings scenario 7 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -472,7 +472,7 @@ exports[`concurrent renderings scenario 8 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/><block-text-1/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/><block-text-1/></p>\`);
|
||||||
|
|
||||||
@@ -488,7 +488,7 @@ exports[`concurrent renderings scenario 8 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -503,7 +503,7 @@ exports[`concurrent renderings scenario 9 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
@@ -519,7 +519,7 @@ exports[`concurrent renderings scenario 9 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -534,7 +534,7 @@ exports[`concurrent renderings scenario 9 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<b><block-text-0/></b>\`);
|
let block1 = createBlock(\`<b><block-text-0/></b>\`);
|
||||||
|
|
||||||
@@ -549,7 +549,7 @@ exports[`concurrent renderings scenario 9 4`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -566,7 +566,7 @@ exports[`concurrent renderings scenario 10 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -581,7 +581,7 @@ exports[`concurrent renderings scenario 10 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -599,7 +599,7 @@ exports[`concurrent renderings scenario 10 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -614,7 +614,7 @@ exports[`concurrent renderings scenario 11 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/>|<block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/>|<block-text-1/></span>\`);
|
||||||
|
|
||||||
@@ -630,7 +630,7 @@ exports[`concurrent renderings scenario 11 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -645,7 +645,7 @@ exports[`concurrent renderings scenario 12 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -660,7 +660,7 @@ exports[`concurrent renderings scenario 12 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -675,7 +675,7 @@ exports[`concurrent renderings scenario 13 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -690,7 +690,7 @@ exports[`concurrent renderings scenario 13 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -709,7 +709,7 @@ exports[`concurrent renderings scenario 14 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><span><block-text-0/></span><span><block-text-1/></span><span><block-text-2/></span></p>\`);
|
let block1 = createBlock(\`<p><span><block-text-0/></span><span><block-text-1/></span><span><block-text-2/></span></p>\`);
|
||||||
|
|
||||||
@@ -726,7 +726,7 @@ exports[`concurrent renderings scenario 14 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -741,7 +741,7 @@ exports[`concurrent renderings scenario 14 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -756,7 +756,7 @@ exports[`concurrent renderings scenario 15 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><span><block-text-0/></span><span><block-text-1/></span><span><block-text-2/></span></p>\`);
|
let block1 = createBlock(\`<p><span><block-text-0/></span><span><block-text-1/></span><span><block-text-2/></span></p>\`);
|
||||||
|
|
||||||
@@ -773,7 +773,7 @@ exports[`concurrent renderings scenario 15 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -788,7 +788,7 @@ exports[`concurrent renderings scenario 15 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -803,7 +803,7 @@ exports[`concurrent renderings scenario 16 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<ul>DDD</ul>\`);
|
let block1 = createBlock(\`<ul>DDD</ul>\`);
|
||||||
|
|
||||||
@@ -817,7 +817,7 @@ exports[`concurrent renderings scenario 16 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><span><block-text-0/></span><span><block-text-1/></span><span><block-text-2/></span><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><span><block-text-0/></span><span><block-text-1/></span><span><block-text-2/></span><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -838,7 +838,7 @@ exports[`concurrent renderings scenario 16 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -853,7 +853,7 @@ exports[`concurrent renderings scenario 16 4`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -868,7 +868,7 @@ exports[`creating two async components, scenario 1 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -883,7 +883,7 @@ exports[`creating two async components, scenario 1 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>b</span>\`);
|
let block1 = createBlock(\`<span>b</span>\`);
|
||||||
|
|
||||||
@@ -897,7 +897,7 @@ exports[`creating two async components, scenario 1 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -916,7 +916,7 @@ exports[`creating two async components, scenario 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>a<block-text-0/></span>\`);
|
let block1 = createBlock(\`<span>a<block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -931,7 +931,7 @@ exports[`creating two async components, scenario 2 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>b<block-text-0/></span>\`);
|
let block1 = createBlock(\`<span>b<block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -946,7 +946,7 @@ exports[`creating two async components, scenario 2 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -965,7 +965,7 @@ exports[`creating two async components, scenario 3 (patching in the same frame)
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>a<block-text-0/></span>\`);
|
let block1 = createBlock(\`<span>a<block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -980,7 +980,7 @@ exports[`creating two async components, scenario 3 (patching in the same frame)
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>b<block-text-0/></span>\`);
|
let block1 = createBlock(\`<span>b<block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -995,7 +995,7 @@ exports[`creating two async components, scenario 3 (patching in the same frame)
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -1014,7 +1014,7 @@ exports[`destroying/recreating a subwidget with different props (if start is not
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child:<block-text-0/></span>\`);
|
let block1 = createBlock(\`<span>child:<block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -1029,7 +1029,7 @@ exports[`destroying/recreating a subwidget with different props (if start is not
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -1047,7 +1047,7 @@ exports[`properly behave when destroyed/unmounted while rendering 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -1061,7 +1061,7 @@ exports[`properly behave when destroyed/unmounted while rendering 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -1076,7 +1076,7 @@ exports[`properly behave when destroyed/unmounted while rendering 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -1094,7 +1094,7 @@ exports[`render method wait until rendering is done 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -1109,7 +1109,7 @@ exports[`rendering component again in next microtick 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>Child</div>\`);
|
let block1 = createBlock(\`<div>Child</div>\`);
|
||||||
|
|
||||||
@@ -1123,7 +1123,7 @@ exports[`rendering component again in next microtick 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><button block-handler-0=\\"click\\">Click</button><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><button block-handler-0=\\"click\\">Click</button><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -1142,7 +1142,7 @@ exports[`two renderings initiated between willPatch and patched 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<abc><block-text-0/></abc>\`);
|
let block1 = createBlock(\`<abc><block-text-0/></abc>\`);
|
||||||
|
|
||||||
@@ -1157,7 +1157,7 @@ exports[`two renderings initiated between willPatch and patched 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -1175,7 +1175,7 @@ exports[`update a sub-component twice in the same frame 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -1190,7 +1190,7 @@ exports[`update a sub-component twice in the same frame 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -1205,7 +1205,7 @@ exports[`update a sub-component twice in the same frame, 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -1220,7 +1220,7 @@ exports[`update a sub-component twice in the same frame, 2 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`basics no component catching error lead to full app destruction 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ exports[`basics no component catching error lead to full app destruction 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`event handling can set handler on sub component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`event handling can set handler on sub component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
@@ -34,7 +34,7 @@ exports[`event handling handler receive the event as argument 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ exports[`event handling handler receive the event as argument 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
@@ -64,7 +64,7 @@ exports[`event handling support for callable expression in event handler 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><input type=\\"text\\" block-handler-1=\\"input\\"/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><input type=\\"text\\" block-handler-1=\\"input\\"/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`basics basic use 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child<block-text-0/></span>\`);
|
let block1 = createBlock(\`<span>child<block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ exports[`basics basic use 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {p: 1}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {p: 1}, key + \`__1\`, node, ctx);
|
||||||
@@ -31,7 +31,7 @@ exports[`basics can select a sub widget 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>CHILD 1</span>\`);
|
let block1 = createBlock(\`<span>CHILD 1</span>\`);
|
||||||
|
|
||||||
@@ -45,7 +45,7 @@ exports[`basics can select a sub widget 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>CHILD 2</div>\`);
|
let block1 = createBlock(\`<div>CHILD 2</div>\`);
|
||||||
|
|
||||||
@@ -59,7 +59,7 @@ exports[`basics can select a sub widget 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -78,7 +78,7 @@ exports[`basics can select a sub widget, part 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>CHILD 1</span>\`);
|
let block1 = createBlock(\`<span>CHILD 1</span>\`);
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ exports[`basics can select a sub widget, part 2 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>CHILD 2</div>\`);
|
let block1 = createBlock(\`<div>CHILD 2</div>\`);
|
||||||
|
|
||||||
@@ -106,7 +106,7 @@ exports[`basics can select a sub widget, part 2 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -125,7 +125,7 @@ exports[`basics sub widget is interactive 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><button block-handler-0=\\"click\\">click</button>child<block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><button block-handler-0=\\"click\\">click</button>child<block-text-1/></span>\`);
|
||||||
|
|
||||||
@@ -141,7 +141,7 @@ exports[`basics sub widget is interactive 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {p: 1}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {p: 1}, key + \`__1\`, node, ctx);
|
||||||
@@ -153,7 +153,7 @@ exports[`basics top level sub widget with a parent 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>Hello</span>\`);
|
let block1 = createBlock(\`<span>Hello</span>\`);
|
||||||
|
|
||||||
@@ -167,7 +167,7 @@ exports[`basics top level sub widget with a parent 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`ComponentC\`, {}, key + \`__1\`, node, ctx);
|
return component(\`ComponentC\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -179,7 +179,7 @@ exports[`basics top level sub widget with a parent 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`lifecycle hooks basic checks for a component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>test</span>\`);
|
let block1 = createBlock(\`<span>test</span>\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`lifecycle hooks components are unmounted and destroyed if no longer in
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ exports[`lifecycle hooks components are unmounted and destroyed if no longer in
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
@@ -48,7 +48,7 @@ exports[`lifecycle hooks components are unmounted and destroyed if no longer in
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -63,7 +63,7 @@ exports[`lifecycle hooks components are unmounted and destroyed if no longer in
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<div><block-child-0/></div>\`);
|
let block2 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ exports[`lifecycle hooks hooks are called in proper order in widget creation/des
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ exports[`lifecycle hooks hooks are called in proper order in widget creation/des
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -111,7 +111,7 @@ exports[`lifecycle hooks lifecycle semantics 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ exports[`lifecycle hooks lifecycle semantics 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ exports[`lifecycle hooks lifecycle semantics, part 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ exports[`lifecycle hooks lifecycle semantics, part 2 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -166,7 +166,7 @@ exports[`lifecycle hooks lifecycle semantics, part 2 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
@@ -182,7 +182,7 @@ exports[`lifecycle hooks lifecycle semantics, part 3 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -196,7 +196,7 @@ exports[`lifecycle hooks lifecycle semantics, part 3 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -208,7 +208,7 @@ exports[`lifecycle hooks lifecycle semantics, part 3 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
@@ -224,7 +224,7 @@ exports[`lifecycle hooks lifecycle semantics, part 4 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -238,7 +238,7 @@ exports[`lifecycle hooks lifecycle semantics, part 4 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -250,7 +250,7 @@ exports[`lifecycle hooks lifecycle semantics, part 4 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
@@ -266,7 +266,7 @@ exports[`lifecycle hooks lifecycle semantics, part 5 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -280,7 +280,7 @@ exports[`lifecycle hooks lifecycle semantics, part 5 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
@@ -296,7 +296,7 @@ exports[`lifecycle hooks lifecycle semantics, part 6 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -310,7 +310,7 @@ exports[`lifecycle hooks lifecycle semantics, part 6 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {value: ctx['state'].value}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {value: ctx['state'].value}, key + \`__1\`, node, ctx);
|
||||||
@@ -322,7 +322,7 @@ exports[`lifecycle hooks mounted hook is called if mounted in DOM 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -336,7 +336,7 @@ exports[`lifecycle hooks mounted hook is called on subcomponents, in proper orde
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -350,7 +350,7 @@ exports[`lifecycle hooks mounted hook is called on subcomponents, in proper orde
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -365,7 +365,7 @@ exports[`lifecycle hooks mounted hook is called on subsubcomponents, in proper o
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -379,7 +379,7 @@ exports[`lifecycle hooks mounted hook is called on subsubcomponents, in proper o
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -394,7 +394,7 @@ exports[`lifecycle hooks mounted hook is called on subsubcomponents, in proper o
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -412,7 +412,7 @@ exports[`lifecycle hooks onRender 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\"><block-text-1/></button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\"><block-text-1/></button>\`);
|
||||||
|
|
||||||
@@ -428,7 +428,7 @@ exports[`lifecycle hooks onRender 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -440,7 +440,7 @@ exports[`lifecycle hooks patched hook is called after updateProps 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -454,7 +454,7 @@ exports[`lifecycle hooks patched hook is called after updateProps 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -469,7 +469,7 @@ exports[`lifecycle hooks patched hook is called after updating State 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -483,7 +483,7 @@ exports[`lifecycle hooks sub widget (inside sub node): hooks are correctly calle
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -497,7 +497,7 @@ exports[`lifecycle hooks sub widget (inside sub node): hooks are correctly calle
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
@@ -513,7 +513,7 @@ exports[`lifecycle hooks willPatch, patched hook are called on subsubcomponents,
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -528,7 +528,7 @@ exports[`lifecycle hooks willPatch, patched hook are called on subsubcomponents,
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -543,7 +543,7 @@ exports[`lifecycle hooks willPatch, patched hook are called on subsubcomponents,
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -558,7 +558,7 @@ exports[`lifecycle hooks willStart hook is called on sub component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -572,7 +572,7 @@ exports[`lifecycle hooks willStart hook is called on sub component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -584,7 +584,7 @@ exports[`lifecycle hooks willStart is called 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
||||||
|
|
||||||
@@ -598,7 +598,7 @@ exports[`lifecycle hooks willStart is called with component as this 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
||||||
|
|
||||||
@@ -612,7 +612,7 @@ exports[`lifecycle hooks willStart, mounted on subwidget rendered after main is
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -626,7 +626,7 @@ exports[`lifecycle hooks willStart, mounted on subwidget rendered after main is
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block3 = createBlock(\`<div/>\`);
|
let block3 = createBlock(\`<div/>\`);
|
||||||
@@ -647,7 +647,7 @@ exports[`lifecycle hooks willUpdateProps hook is called 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -662,7 +662,7 @@ exports[`lifecycle hooks willUpdateProps hook is called 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {n: ctx['state'].n}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {n: ctx['state'].n}, key + \`__1\`, node, ctx);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`basics accept ES6-like syntax for props (with getters) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ exports[`basics accept ES6-like syntax for props (with getters) 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ exports[`basics explicit object prop 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ exports[`basics explicit object prop 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ exports[`basics t-set with a body expression can be passed in props, and then t-
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -80,13 +80,14 @@ exports[`basics t-set with a body expression can be passed in props, and then t-
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<p>43</p>\`);
|
let block2 = createBlock(\`<p>43</p>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2 = block2();
|
let b2 = block2();
|
||||||
ctx[\`abc\`] = b2;
|
ctx[\`abc\`] = b2;
|
||||||
let b3 = component(\`Child\`, {val: ctx['abc']}, key + \`__1\`, node, ctx);
|
let b3 = component(\`Child\`, {val: ctx['abc']}, key + \`__1\`, node, ctx);
|
||||||
@@ -99,7 +100,7 @@ exports[`basics t-set with a body expression can be used as textual prop 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -114,13 +115,14 @@ exports[`basics t-set with a body expression can be used as textual prop 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`abc\`] = \`42\`;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"abc\\", \`42\`);
|
||||||
let b2 = component(\`Child\`, {val: ctx['abc']}, key + \`__1\`, node, ctx);
|
let b2 = component(\`Child\`, {val: ctx['abc']}, key + \`__1\`, node, ctx);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -131,7 +133,7 @@ exports[`basics t-set works 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -146,13 +148,14 @@ exports[`basics t-set works 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`val\`] = 42;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"val\\", 42);
|
||||||
let b2 = component(\`Child\`, {val: ctx['val']}, key + \`__1\`, node, ctx);
|
let b2 = component(\`Child\`, {val: ctx['val']}, key + \`__1\`, node, ctx);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`refs refs are properly bound in slots 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ exports[`refs refs are properly bound in slots 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span class=\\"counter\\"><block-text-0/></span><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><span class=\\"counter\\"><block-text-0/></span><block-child-0/></div>\`);
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,7 +4,7 @@ exports[`style and class handling can set class on multi root component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<div>a</div>\`);
|
let block2 = createBlock(\`<div>a</div>\`);
|
||||||
let block3 = createBlock(\`<span block-attribute-0=\\"class\\">b</span>\`);
|
let block3 = createBlock(\`<span block-attribute-0=\\"class\\">b</span>\`);
|
||||||
@@ -22,7 +22,7 @@ exports[`style and class handling can set class on multi root component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'fromparent'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'fromparent'}, key + \`__1\`, node, ctx);
|
||||||
@@ -34,7 +34,7 @@ exports[`style and class handling can set class on sub component, as prop 1`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ exports[`style and class handling can set class on sub component, as prop 2`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'some-class'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'some-class'}, key + \`__1\`, node, ctx);
|
||||||
@@ -61,7 +61,7 @@ exports[`style and class handling can set class on sub sub component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">childchild</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">childchild</div>\`);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ exports[`style and class handling can set class on sub sub component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`ChildChild\`, {class: (ctx['props'].class||'')+' fromchild'}, key + \`__1\`, node, ctx);
|
return component(\`ChildChild\`, {class: (ctx['props'].class||'')+' fromchild'}, key + \`__1\`, node, ctx);
|
||||||
@@ -88,7 +88,7 @@ exports[`style and class handling can set class on sub sub component 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'fromparent'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'fromparent'}, key + \`__1\`, node, ctx);
|
||||||
@@ -100,7 +100,7 @@ exports[`style and class handling can set more than one class on sub component 1
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
||||||
|
|
||||||
@@ -115,7 +115,7 @@ exports[`style and class handling can set more than one class on sub component 2
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'a b'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'a b'}, key + \`__1\`, node, ctx);
|
||||||
@@ -127,7 +127,7 @@ exports[`style and class handling can set style and class inside component 1`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div style=\\"font-weight:bold;\\" class=\\"some-class\\">world</div>\`);
|
let block1 = createBlock(\`<div style=\\"font-weight:bold;\\" class=\\"some-class\\">world</div>\`);
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ exports[`style and class handling class on sub component, which is switched to a
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">a</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">a</div>\`);
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ exports[`style and class handling class on sub component, which is switched to a
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span block-attribute-0=\\"class\\">b</span>\`);
|
let block1 = createBlock(\`<span block-attribute-0=\\"class\\">b</span>\`);
|
||||||
|
|
||||||
@@ -186,7 +186,7 @@ exports[`style and class handling class on sub component, which is switched to a
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -204,7 +204,7 @@ exports[`style and class handling class on sub component, which is switched to a
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'someclass',child: ctx['state'].child}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'someclass',child: ctx['state'].child}, key + \`__1\`, node, ctx);
|
||||||
@@ -216,7 +216,7 @@ exports[`style and class handling class with extra whitespaces (variation) 1`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -231,7 +231,7 @@ exports[`style and class handling class with extra whitespaces (variation) 2`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
@@ -246,7 +246,7 @@ exports[`style and class handling class with extra whitespaces 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -261,7 +261,7 @@ exports[`style and class handling class with extra whitespaces 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'a b c d'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'a b c d'}, key + \`__1\`, node, ctx);
|
||||||
@@ -273,7 +273,7 @@ exports[`style and class handling component class and parent class combine toget
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"child\\" block-attribute-0=\\"class\\">child</div>\`);
|
let block1 = createBlock(\`<div class=\\"child\\" block-attribute-0=\\"class\\">child</div>\`);
|
||||||
|
|
||||||
@@ -288,7 +288,7 @@ exports[`style and class handling component class and parent class combine toget
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'from parent'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'from parent'}, key + \`__1\`, node, ctx);
|
||||||
@@ -327,7 +327,7 @@ exports[`style and class handling empty class attribute is not added on widget r
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<span block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -342,7 +342,7 @@ exports[`style and class handling empty class attribute is not added on widget r
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -357,7 +357,7 @@ exports[`style and class handling error in subcomponent with class 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"><block-text-1/></div>\`);
|
||||||
|
|
||||||
@@ -373,7 +373,7 @@ exports[`style and class handling error in subcomponent with class 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'a'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'a'}, key + \`__1\`, node, ctx);
|
||||||
@@ -385,7 +385,7 @@ exports[`style and class handling no class is set is child ignores it 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child</div>\`);
|
let block1 = createBlock(\`<div>child</div>\`);
|
||||||
|
|
||||||
@@ -399,7 +399,7 @@ exports[`style and class handling no class is set is child ignores it 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {class: 'hey'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {class: 'hey'}, key + \`__1\`, node, ctx);
|
||||||
@@ -411,7 +411,7 @@ exports[`style and class handling no class is set is parent does not give it as
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
||||||
|
|
||||||
@@ -426,7 +426,7 @@ exports[`style and class handling no class is set is parent does not give it as
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -438,7 +438,7 @@ exports[`style and class handling style is properly added on widget root el 1`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"style\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"style\\"/>\`);
|
||||||
|
|
||||||
@@ -453,7 +453,7 @@ exports[`style and class handling style is properly added on widget root el 2`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {style: 'font-weight: bold;'}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {style: 'font-weight: bold;'}, key + \`__1\`, node, ctx);
|
||||||
@@ -465,7 +465,7 @@ exports[`style and class handling t-att-class is properly added/removed on widge
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span class=\\"c\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<span class=\\"c\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -480,7 +480,7 @@ exports[`style and class handling t-att-class is properly added/removed on widge
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ exports[`t-call dynamic t-call 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b1 = text(\` owl \`);
|
let b1 = text(\` owl \`);
|
||||||
ctx[zero] = b1;
|
ctx[zero] = b1;
|
||||||
const template2 = (ctx['current'].template);
|
const template2 = (ctx['current'].template);
|
||||||
@@ -20,7 +21,7 @@ exports[`t-call dynamic t-call 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>foo</div>\`);
|
let block1 = createBlock(\`<div>foo</div>\`);
|
||||||
|
|
||||||
@@ -34,7 +35,7 @@ exports[`t-call dynamic t-call 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`bar\`);
|
return text(\`bar\`);
|
||||||
@@ -46,7 +47,7 @@ exports[`t-call handlers are properly bound through a t-call 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
@@ -61,7 +62,7 @@ exports[`t-call handlers are properly bound through a t-call 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`__template__9\`);
|
const callTemplate_2 = getTemplate(\`__template__9\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
@@ -78,7 +79,7 @@ exports[`t-call handlers with arguments are properly bound through a t-call 1`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
@@ -94,7 +95,7 @@ exports[`t-call handlers with arguments are properly bound through a t-call 2`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`__template__9\`);
|
const callTemplate_2 = getTemplate(\`__template__9\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -110,7 +111,7 @@ exports[`t-call parent is set within t-call 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -122,7 +123,7 @@ exports[`t-call parent is set within t-call 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>lucas</span>\`);
|
let block1 = createBlock(\`<span>lucas</span>\`);
|
||||||
|
|
||||||
@@ -136,7 +137,7 @@ exports[`t-call parent is set within t-call 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`__template__9\`);
|
const callTemplate_2 = getTemplate(\`__template__9\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -152,7 +153,7 @@ exports[`t-call parent is set within t-call with no parentNode 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||||
@@ -164,7 +165,7 @@ exports[`t-call parent is set within t-call with no parentNode 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>lucas</span>\`);
|
let block1 = createBlock(\`<span>lucas</span>\`);
|
||||||
|
|
||||||
@@ -178,7 +179,7 @@ exports[`t-call parent is set within t-call with no parentNode 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`__template__9\`);
|
const callTemplate_2 = getTemplate(\`__template__9\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
@@ -191,7 +192,7 @@ exports[`t-call sub components in two t-calls 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -206,7 +207,7 @@ exports[`t-call sub components in two t-calls 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
const callTemplate_4 = getTemplate(\`sub\`);
|
const callTemplate_4 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
@@ -229,7 +230,7 @@ exports[`t-call sub components in two t-calls 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {val: ctx['state'].val}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {val: ctx['state'].val}, key + \`__1\`, node, ctx);
|
||||||
@@ -241,7 +242,7 @@ exports[`t-call t-call in t-foreach and children component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return component(\`Child\`, {val: ctx['val']}, key + \`__1\`, node, ctx);
|
return component(\`Child\`, {val: ctx['val']}, key + \`__1\`, node, ctx);
|
||||||
@@ -253,7 +254,7 @@ exports[`t-call t-call in t-foreach and children component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -268,7 +269,7 @@ exports[`t-call t-call in t-foreach and children component 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`__template__9\`);
|
const callTemplate_2 = getTemplate(\`__template__9\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-call-block simple t-call-block with static text 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-component can switch between dynamic components without the need for
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child a</span>\`);
|
let block1 = createBlock(\`<span>child a</span>\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`t-component can switch between dynamic components without the need for
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child b</span>\`);
|
let block1 = createBlock(\`<span>child b</span>\`);
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ exports[`t-component can switch between dynamic components without the need for
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ exports[`t-component can use dynamic components (the class) if given (with diffe
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child a</span>\`);
|
let block1 = createBlock(\`<span>child a</span>\`);
|
||||||
|
|
||||||
@@ -62,7 +62,7 @@ exports[`t-component can use dynamic components (the class) if given (with diffe
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child b</div>\`);
|
let block1 = createBlock(\`<div>child b</div>\`);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ exports[`t-component can use dynamic components (the class) if given (with diffe
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let Comp2 = ctx['myComponent'];
|
let Comp2 = ctx['myComponent'];
|
||||||
@@ -89,7 +89,7 @@ exports[`t-component can use dynamic components (the class) if given 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child a</span>\`);
|
let block1 = createBlock(\`<span>child a</span>\`);
|
||||||
|
|
||||||
@@ -103,7 +103,7 @@ exports[`t-component can use dynamic components (the class) if given 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child b</span>\`);
|
let block1 = createBlock(\`<span>child b</span>\`);
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ exports[`t-component can use dynamic components (the class) if given 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let Comp2 = ctx['myComponent'];
|
let Comp2 = ctx['myComponent'];
|
||||||
@@ -130,7 +130,7 @@ exports[`t-component modifying a sub widget 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><button block-handler-1=\\"click\\">Inc</button></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><button block-handler-1=\\"click\\">Inc</button></div>\`);
|
||||||
|
|
||||||
@@ -147,7 +147,7 @@ exports[`t-component modifying a sub widget 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -163,7 +163,7 @@ exports[`t-component switching dynamic component 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child a</div>\`);
|
let block1 = createBlock(\`<div>child a</div>\`);
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ exports[`t-component switching dynamic component 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child b\`);
|
return text(\`child b\`);
|
||||||
@@ -189,7 +189,7 @@ exports[`t-component switching dynamic component 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let Comp2 = ctx['Child'];
|
let Comp2 = ctx['Child'];
|
||||||
@@ -202,7 +202,7 @@ exports[`t-component t-component not on a <t> node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>1</span>\`);
|
let block1 = createBlock(\`<span>1</span>\`);
|
||||||
|
|
||||||
@@ -216,7 +216,7 @@ exports[`t-component t-component works in simple case 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child</div>\`);
|
let block1 = createBlock(\`<div>child</div>\`);
|
||||||
|
|
||||||
@@ -230,7 +230,7 @@ exports[`t-component t-component works in simple case 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let Comp2 = ctx['Child'];
|
let Comp2 = ctx['Child'];
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`list of components components in a node in a t-foreach 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ exports[`list of components components in a node in a t-foreach 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><ul><block-child-0/></ul></div>\`);
|
let block1 = createBlock(\`<div><ul><block-child-0/></ul></div>\`);
|
||||||
let block3 = createBlock(\`<li><block-child-0/></li>\`);
|
let block3 = createBlock(\`<li><block-child-0/></li>\`);
|
||||||
@@ -43,7 +43,7 @@ exports[`list of components list of sub components inside other nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>asdf</span>\`);
|
let block1 = createBlock(\`<span>asdf</span>\`);
|
||||||
|
|
||||||
@@ -57,7 +57,7 @@ exports[`list of components list of sub components inside other nodes 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-child-0/></div>\`);
|
let block3 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -81,7 +81,7 @@ exports[`list of components reconciliation alg works for t-foreach in t-foreach
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ exports[`list of components reconciliation alg works for t-foreach in t-foreach
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -128,7 +128,7 @@ exports[`list of components reconciliation alg works for t-foreach in t-foreach,
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -143,7 +143,7 @@ exports[`list of components reconciliation alg works for t-foreach in t-foreach,
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<p><block-child-0/></p>\`);
|
let block3 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
@@ -177,7 +177,7 @@ exports[`list of components simple list 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ exports[`list of components simple list 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -211,7 +211,7 @@ exports[`list of components sub components rendered in a loop 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
@@ -226,7 +226,7 @@ exports[`list of components sub components rendered in a loop 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -248,7 +248,7 @@ exports[`list of components sub components with some state rendered in a loop 1`
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
@@ -263,7 +263,7 @@ exports[`list of components sub components with some state rendered in a loop 2`
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -285,7 +285,7 @@ exports[`list of components t-foreach with t-component, and update 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
@@ -301,7 +301,7 @@ exports[`list of components t-foreach with t-component, and update 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,14 +4,15 @@ exports[`t-on t-on expression captured in t-foreach 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><button block-handler-0=\\"click\\">expr</button></div>\`);
|
let block3 = createBlock(\`<div><button block-handler-0=\\"click\\">expr</button></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`iter\`] = 0;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['arr']);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['arr']);
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -20,7 +21,7 @@ exports[`t-on t-on expression captured in t-foreach 1`] = `
|
|||||||
const v1 = ctx['otherState'];
|
const v1 = ctx['otherState'];
|
||||||
const v2 = ctx['iter'];
|
const v2 = ctx['iter'];
|
||||||
let d1 = (e) => {const res = (() => { return v1.vals.push(v2+'_'+v2) })(); if (typeof res === 'function') { res(e) }};
|
let d1 = (e) => {const res = (() => { return v1.vals.push(v2+'_'+v2) })(); if (typeof res === 'function') { res(e) }};
|
||||||
ctx[\`iter\`] = ctx['iter']+1;
|
setContextValue(ctx, \\"iter\\", ctx['iter']+1);
|
||||||
c_block2[i1] = withKey(block3([d1]), key1);
|
c_block2[i1] = withKey(block3([d1]), key1);
|
||||||
}
|
}
|
||||||
let b2 = list(c_block2);
|
let b2 = list(c_block2);
|
||||||
@@ -33,7 +34,7 @@ exports[`t-on t-on expression in t-foreach 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">Expr</button></div>\`);
|
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">Expr</button></div>\`);
|
||||||
@@ -62,21 +63,22 @@ exports[`t-on t-on expression in t-foreach with t-set 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">Expr</button></div>\`);
|
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">Expr</button></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`bossa\`] = 'nova';
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"bossa\\", 'nova');
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].values);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].values);
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
ctx[\`val\`] = v_block2[i1];
|
ctx[\`val\`] = v_block2[i1];
|
||||||
ctx[\`val_index\`] = i1;
|
ctx[\`val_index\`] = i1;
|
||||||
let key1 = ctx['val'];
|
let key1 = ctx['val'];
|
||||||
ctx[\`bossa\`] = ctx['bossa']+'_'+ctx['val_index'];
|
setContextValue(ctx, \\"bossa\\", ctx['bossa']+'_'+ctx['val_index']);
|
||||||
let d1 = ctx['val_index'];
|
let d1 = ctx['val_index'];
|
||||||
let d2 = ctx['val']+'';
|
let d2 = ctx['val']+'';
|
||||||
const v1 = ctx['otherState'];
|
const v1 = ctx['otherState'];
|
||||||
@@ -95,7 +97,7 @@ exports[`t-on t-on method call in t-foreach 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">meth call</button></div>\`);
|
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">meth call</button></div>\`);
|
||||||
@@ -123,7 +125,7 @@ exports[`t-on t-on on destroyed components 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-handler-0=\\"click\\"/>\`);
|
let block1 = createBlock(\`<div block-handler-0=\\"click\\"/>\`);
|
||||||
|
|
||||||
@@ -138,7 +140,7 @@ exports[`t-on t-on on destroyed components 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,174 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`t-set slot setted value (with t-set) not accessible with t-esc 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
setContextValue(ctx, \\"iter\\", 'called');
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set slot setted value (with t-set) not accessible with t-esc 2`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
let assign = Object.assign;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
|
const slot3 = ctx => (node, key) => {
|
||||||
|
setContextValue(ctx, \\"iter\\", 'inCall');
|
||||||
|
}
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 'source');
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
const ctx2 = capture(ctx);
|
||||||
|
let b2 = assign(component(\`Childcomp\`, {}, key + \`__1\`, node, ctx), {slots: {'default': slot3(ctx2)}});
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set can't alter component even if key in component 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><p><block-text-0/></p><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
setContextValue(ctx, \\"iter\\", 5);
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set can't alter component if key not in component 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><p><block-text-0/></p><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
setContextValue(ctx, \\"iter\\", 5);
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set in t-if 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><block-child-0/><block-child-0/><p><block-text-0/></p></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"flag\\", ctx['state'].flag);
|
||||||
|
if (ctx['flag']==='if') {
|
||||||
|
setContextValue(ctx, \\"iter\\", 2);
|
||||||
|
} else if (ctx['flag']==='elif') {
|
||||||
|
setContextValue(ctx, \\"iter\\", 3);
|
||||||
|
} else {
|
||||||
|
setContextValue(ctx, \\"iter\\", 4);
|
||||||
|
}
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
return block1([d1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set not altered by child comp 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
setContextValue(ctx, \\"iter\\", 'called');
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set not altered by child comp 2`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 'source');
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
let b2 = component(\`Childcomp\`, {}, key + \`__1\`, node, ctx);
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set outside modified in t-if 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><block-child-0/><block-child-0/><p><block-text-0/></p></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
|
setContextValue(ctx, \\"flag\\", ctx['state'].flag);
|
||||||
|
if (ctx['flag']==='if') {
|
||||||
|
setContextValue(ctx, \\"iter\\", 2);
|
||||||
|
} else if (ctx['flag']==='elif') {
|
||||||
|
setContextValue(ctx, \\"iter\\", 3);
|
||||||
|
} else {
|
||||||
|
setContextValue(ctx, \\"iter\\", 4);
|
||||||
|
}
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
return block1([d1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
@@ -43,7 +43,8 @@ describe("basics", () => {
|
|||||||
expect(fixture.innerHTML).toBe("");
|
expect(fixture.innerHTML).toBe("");
|
||||||
expect(status(parent)).toBe("destroyed");
|
expect(status(parent)).toBe("destroyed");
|
||||||
expect(error).toBeDefined();
|
expect(error).toBeDefined();
|
||||||
const regexp = /Cannot read properties of undefined \(reading 'this'\)|Cannot read property 'this' of undefined/g;
|
const regexp =
|
||||||
|
/Cannot read properties of undefined \(reading 'this'\)|Cannot read property 'this' of undefined/g;
|
||||||
expect(error.message).toMatch(regexp);
|
expect(error.message).toMatch(regexp);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -112,7 +113,8 @@ describe.skip("errors and promises", () => {
|
|||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
expect(error).toBeDefined();
|
expect(error).toBeDefined();
|
||||||
const regexp = /Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
|
const regexp =
|
||||||
|
/Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
|
||||||
expect(error.message).toMatch(regexp);
|
expect(error.message).toMatch(regexp);
|
||||||
|
|
||||||
expect(console.error).toBeCalledTimes(0);
|
expect(console.error).toBeCalledTimes(0);
|
||||||
@@ -225,7 +227,8 @@ describe.skip("errors and promises", () => {
|
|||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
expect(error).toBeDefined();
|
expect(error).toBeDefined();
|
||||||
const regexp = /Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
|
const regexp =
|
||||||
|
/Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
|
||||||
expect(error.message).toMatch(regexp);
|
expect(error.message).toMatch(regexp);
|
||||||
|
|
||||||
expect(console.error).toBeCalledTimes(0);
|
expect(console.error).toBeCalledTimes(0);
|
||||||
@@ -251,7 +254,8 @@ describe.skip("errors and promises", () => {
|
|||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
expect(error).toBeDefined();
|
expect(error).toBeDefined();
|
||||||
const regexp = /Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
|
const regexp =
|
||||||
|
/Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
|
||||||
expect(error.message).toMatch(regexp);
|
expect(error.message).toMatch(regexp);
|
||||||
|
|
||||||
expect(console.error).toBeCalledTimes(0);
|
expect(console.error).toBeCalledTimes(0);
|
||||||
@@ -274,7 +278,8 @@ describe.skip("errors and promises", () => {
|
|||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
expect(error).toBeDefined();
|
expect(error).toBeDefined();
|
||||||
const regexp = /Cannot read properties of undefined \(reading 'y'\)|Cannot read property 'y' of undefined/g;
|
const regexp =
|
||||||
|
/Cannot read properties of undefined \(reading 'y'\)|Cannot read property 'y' of undefined/g;
|
||||||
expect(error.message).toMatch(regexp);
|
expect(error.message).toMatch(regexp);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -341,7 +341,8 @@ describe("style and class handling", () => {
|
|||||||
error = e;
|
error = e;
|
||||||
}
|
}
|
||||||
expect(error).toBeDefined();
|
expect(error).toBeDefined();
|
||||||
const regexp = /Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
|
const regexp =
|
||||||
|
/Cannot read properties of undefined \(reading 'crash'\)|Cannot read property 'crash' of undefined/g;
|
||||||
expect(error.message).toMatch(regexp);
|
expect(error.message).toMatch(regexp);
|
||||||
expect(fixture.innerHTML).toBe("");
|
expect(fixture.innerHTML).toBe("");
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -0,0 +1,155 @@
|
|||||||
|
import { Component, mount, xml } from "../../src";
|
||||||
|
import { makeTestFixture, snapshotEverything } from "../helpers";
|
||||||
|
|
||||||
|
snapshotEverything();
|
||||||
|
|
||||||
|
let fixture: HTMLElement;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = makeTestFixture();
|
||||||
|
});
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// t-set
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
describe("t-set", () => {
|
||||||
|
test("t-set outside modified in t-if", async () => {
|
||||||
|
class Comp extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="0"/>
|
||||||
|
<t t-set="flag" t-value="state.flag" />
|
||||||
|
<t t-if="flag === 'if'">
|
||||||
|
<t t-set="iter" t-value="2"/>
|
||||||
|
</t>
|
||||||
|
<t t-elif="flag === 'elif'">
|
||||||
|
<t t-set="iter" t-value="3"/>
|
||||||
|
</t>
|
||||||
|
<t t-else="">
|
||||||
|
<t t-set="iter" t-value="4"/>
|
||||||
|
</t>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
</div>`;
|
||||||
|
state = { flag: "if" };
|
||||||
|
}
|
||||||
|
const comp = await mount(Comp, fixture);
|
||||||
|
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>2</p></div>");
|
||||||
|
comp.state.flag = "elif";
|
||||||
|
await comp.render();
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>3</p></div>");
|
||||||
|
comp.state.flag = "false";
|
||||||
|
await comp.render();
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>4</p></div>");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-set in t-if", async () => {
|
||||||
|
// Weird that code block within 'if' leaks outside of it
|
||||||
|
// Python does the same
|
||||||
|
class Comp extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<t t-set="flag" t-value="state.flag" />
|
||||||
|
<t t-if="flag === 'if'">
|
||||||
|
<t t-set="iter" t-value="2"/>
|
||||||
|
</t>
|
||||||
|
<t t-elif="flag === 'elif'">
|
||||||
|
<t t-set="iter" t-value="3"/>
|
||||||
|
</t>
|
||||||
|
<t t-else="">
|
||||||
|
<t t-set="iter" t-value="4"/>
|
||||||
|
</t>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
</div>`;
|
||||||
|
state = { flag: "if" };
|
||||||
|
}
|
||||||
|
const comp = await mount(Comp, fixture);
|
||||||
|
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>2</p></div>");
|
||||||
|
comp.state.flag = "elif";
|
||||||
|
await comp.render();
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>3</p></div>");
|
||||||
|
comp.state.flag = "false";
|
||||||
|
await comp.render();
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>4</p></div>");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-set can't alter component even if key in component", async () => {
|
||||||
|
class Comp extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
<t t-set="iter" t-value="5"/>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
</div>`;
|
||||||
|
iter = 1;
|
||||||
|
}
|
||||||
|
const comp = await mount(Comp, fixture);
|
||||||
|
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>1</p><p>5</p></div>");
|
||||||
|
expect(comp.iter).toBe(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-set can't alter component if key not in component", async () => {
|
||||||
|
class Comp extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
<t t-set="iter" t-value="5"/>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
const comp = await mount(Comp, fixture);
|
||||||
|
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p></p><p>5</p></div>");
|
||||||
|
expect((comp as any).iter).toBeUndefined();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("slot setted value (with t-set) not accessible with t-esc", async () => {
|
||||||
|
class Childcomp extends Component {
|
||||||
|
static template = xml`<div><t t-esc="iter"/><t t-set="iter" t-value="'called'"/><t t-esc="iter"/></div>`;
|
||||||
|
}
|
||||||
|
class Comp extends Component {
|
||||||
|
static components = { Childcomp };
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="'source'"/>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
<Childcomp>
|
||||||
|
<t t-set="iter" t-value="'inCall'"/>
|
||||||
|
</Childcomp>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
await mount(Comp, fixture);
|
||||||
|
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>source</p><div>called</div><p>source</p></div>");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-set not altered by child comp", async () => {
|
||||||
|
let child;
|
||||||
|
class Childcomp extends Component {
|
||||||
|
static template = xml`<div><t t-esc="iter"/><t t-set="iter" t-value="'called'"/><t t-esc="iter"/></div>`;
|
||||||
|
iter = "child";
|
||||||
|
setup() {
|
||||||
|
super.setup();
|
||||||
|
child = this;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class Comp extends Component {
|
||||||
|
static components = { Childcomp };
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="'source'"/>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
<Childcomp/>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
await mount(Comp, fixture);
|
||||||
|
|
||||||
|
expect(fixture.innerHTML).toBe("<div><p>source</p><div>childcalled</div><p>source</p></div>");
|
||||||
|
expect((child as any).iter).toBe("child");
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -4,7 +4,7 @@ exports[`Memo if no prop change, prevent renderings from above 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].value);
|
return text(ctx['props'].value);
|
||||||
@@ -16,7 +16,7 @@ exports[`Memo if no prop change, prevent renderings from above 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
const slot2 = ctx => (node, key) => {
|
const slot2 = ctx => (node, key) => {
|
||||||
@@ -40,7 +40,7 @@ exports[`Memo if no props, prevent renderings from above 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].value);
|
return text(ctx['props'].value);
|
||||||
@@ -52,7 +52,7 @@ exports[`Memo if no props, prevent renderings from above 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
const slot3 = ctx => (node, key) => {
|
const slot3 = ctx => (node, key) => {
|
||||||
@@ -71,7 +71,7 @@ exports[`Memo if no props, prevent renderings from above (work with simple html)
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
const slot2 = ctx => (node, key) => {
|
const slot2 = ctx => (node, key) => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`Portal Portal composed with t-slot 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child2</div>\`);
|
let block1 = createBlock(\`<div>child2</div>\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`Portal Portal composed with t-slot 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
const slot2 = ctx => (node, key) => {
|
const slot2 = ctx => (node, key) => {
|
||||||
@@ -35,7 +35,7 @@ exports[`Portal Portal composed with t-slot 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -56,7 +56,7 @@ exports[`Portal basic use of portal 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>1</span><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><span>1</span><block-child-0/></div>\`);
|
||||||
@@ -77,7 +77,7 @@ exports[`Portal conditional use of Portal (with sub Component) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
@@ -92,7 +92,7 @@ exports[`Portal conditional use of Portal (with sub Component) 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>1</span>\`);
|
let block2 = createBlock(\`<span>1</span>\`);
|
||||||
@@ -116,7 +116,7 @@ exports[`Portal conditional use of Portal 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>1</span>\`);
|
let block2 = createBlock(\`<span>1</span>\`);
|
||||||
@@ -141,7 +141,7 @@ exports[`Portal lifecycle hooks of portal sub component are properly called 1`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -156,7 +156,7 @@ exports[`Portal lifecycle hooks of portal sub component are properly called 2`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -179,7 +179,7 @@ exports[`Portal portal could have dynamically no content 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -205,7 +205,7 @@ exports[`Portal portal with child and props 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -220,7 +220,7 @@ exports[`Portal portal with child and props 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -240,7 +240,7 @@ exports[`Portal portal with dynamic body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -269,7 +269,7 @@ exports[`Portal portal with many children 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -293,7 +293,7 @@ exports[`Portal portal with no content 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -317,7 +317,7 @@ exports[`Portal portal with only text as content 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -358,7 +358,7 @@ exports[`Portal portal's parent's env is not polluted 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button>child</button>\`);
|
let block1 = createBlock(\`<button>child</button>\`);
|
||||||
|
|
||||||
@@ -372,7 +372,7 @@ exports[`Portal portal's parent's env is not polluted 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -392,7 +392,7 @@ exports[`Portal with target in template (after portal) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>1</span><block-child-0/><div id=\\"local-target\\"/></div>\`);
|
let block1 = createBlock(\`<div><span>1</span><block-child-0/><div id=\\"local-target\\"/></div>\`);
|
||||||
@@ -413,7 +413,7 @@ exports[`Portal with target in template (before portal) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><div id=\\"local-target\\"/><span>1</span><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><div id=\\"local-target\\"/><span>1</span><block-child-0/></div>\`);
|
||||||
@@ -434,7 +434,7 @@ exports[`Portal: UI/UX focus is kept across re-renders 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<input id=\\"target-me\\" block-attribute-0=\\"placeholder\\"/>\`);
|
let block1 = createBlock(\`<input id=\\"target-me\\" block-attribute-0=\\"placeholder\\"/>\`);
|
||||||
|
|
||||||
@@ -449,7 +449,7 @@ exports[`Portal: UI/UX focus is kept across re-renders 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`attributes changing a class with t-att-class (preexisting class 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"hoy\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"hoy\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ exports[`attributes changing a class with t-att-class 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -34,7 +34,7 @@ exports[`attributes changing an attribute with t-att- 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"value\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"value\\"/>\`);
|
||||||
|
|
||||||
@@ -49,7 +49,7 @@ exports[`attributes class and t-att-class should combine together 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\" class=\\"hello\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\" class=\\"hello\\"/>\`);
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ exports[`attributes class and t-attf-class with ternary operation 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"hello\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"hello\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -79,7 +79,7 @@ exports[`attributes dynamic attribute evaluating to 0 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
||||||
|
|
||||||
@@ -94,7 +94,7 @@ exports[`attributes dynamic attribute falsy variable 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ exports[`attributes dynamic attribute with a dash 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"data-action-id\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"data-action-id\\"/>\`);
|
||||||
|
|
||||||
@@ -124,7 +124,7 @@ exports[`attributes dynamic attributes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
||||||
|
|
||||||
@@ -139,7 +139,7 @@ exports[`attributes dynamic class attribute 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -154,7 +154,7 @@ exports[`attributes dynamic class attribute evaluating to 0 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ exports[`attributes dynamic empty class attribute 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -184,7 +184,7 @@ exports[`attributes dynamic formatted attributes with a dash 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"aria-label\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"aria-label\\"/>\`);
|
||||||
|
|
||||||
@@ -199,7 +199,7 @@ exports[`attributes fixed variable 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
||||||
|
|
||||||
@@ -214,7 +214,7 @@ exports[`attributes format expression 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
||||||
|
|
||||||
@@ -229,7 +229,7 @@ exports[`attributes format literal 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ exports[`attributes format multiple 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ exports[`attributes format value 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\"/>\`);
|
||||||
|
|
||||||
@@ -274,13 +274,14 @@ exports[`attributes from object variables set previously 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span block-attribute-0=\\"class\\"/></div>\`);
|
let block1 = createBlock(\`<div><span block-attribute-0=\\"class\\"/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`o\`] = {a:'b'};
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"o\\", {a:'b'});
|
||||||
let d1 = ctx['o'].a;
|
let d1 = ctx['o'].a;
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
@@ -291,13 +292,14 @@ exports[`attributes from variables set previously (no external node) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<span block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`abc\`] = 'def';
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"abc\\", 'def');
|
||||||
let d1 = ctx['abc'];
|
let d1 = ctx['abc'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
@@ -308,13 +310,14 @@ exports[`attributes from variables set previously 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span block-attribute-0=\\"class\\"/></div>\`);
|
let block1 = createBlock(\`<div><span block-attribute-0=\\"class\\"/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`abc\`] = 'def';
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"abc\\", 'def');
|
||||||
let d1 = ctx['abc'];
|
let d1 = ctx['abc'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
@@ -325,7 +328,7 @@ exports[`attributes object 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attributes=\\"0\\"/>\`);
|
let block1 = createBlock(\`<div block-attributes=\\"0\\"/>\`);
|
||||||
|
|
||||||
@@ -340,7 +343,7 @@ exports[`attributes static attributes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div foo=\\"a\\" bar=\\"b\\" baz=\\"c\\"/>\`);
|
let block1 = createBlock(\`<div foo=\\"a\\" bar=\\"b\\" baz=\\"c\\"/>\`);
|
||||||
|
|
||||||
@@ -354,7 +357,7 @@ exports[`attributes static attributes on void elements 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<img src=\\"/test.skip.jpg\\" alt=\\"Test\\"/>\`);
|
let block1 = createBlock(\`<img src=\\"/test.skip.jpg\\" alt=\\"Test\\"/>\`);
|
||||||
|
|
||||||
@@ -368,7 +371,7 @@ exports[`attributes static attributes with dashes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div aria-label=\\"Close\\"/>\`);
|
let block1 = createBlock(\`<div aria-label=\\"Close\\"/>\`);
|
||||||
|
|
||||||
@@ -382,7 +385,7 @@ exports[`attributes t-att-class and class should combine together 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"hello\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"hello\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -397,7 +400,7 @@ exports[`attributes t-att-class with multiple classes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -412,7 +415,7 @@ exports[`attributes t-att-class with multiple classes 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -427,7 +430,7 @@ exports[`attributes t-att-class with multiple classes, some of which are duplica
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -442,7 +445,7 @@ exports[`attributes t-att-class with object 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"static\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"static\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -457,7 +460,7 @@ exports[`attributes t-attf-class 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -472,7 +475,7 @@ exports[`attributes t-attf-class should combine with class 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"hello\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"hello\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -487,7 +490,7 @@ exports[`attributes t-attf-class with multiple classes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -502,7 +505,7 @@ exports[`attributes t-attf-class with multiple classes separated by multiple spa
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -517,7 +520,7 @@ exports[`attributes tuple literal 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attributes=\\"0\\"/>\`);
|
let block1 = createBlock(\`<div block-attributes=\\"0\\"/>\`);
|
||||||
|
|
||||||
@@ -532,7 +535,7 @@ exports[`attributes tuple variable 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attributes=\\"0\\"/>\`);
|
let block1 = createBlock(\`<div block-attributes=\\"0\\"/>\`);
|
||||||
|
|
||||||
@@ -547,7 +550,7 @@ exports[`attributes two classes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"a b\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"a b\\"/>\`);
|
||||||
|
|
||||||
@@ -561,7 +564,7 @@ exports[`attributes two dynamic attributes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\" block-attribute-1=\\"bar\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"foo\\" block-attribute-1=\\"bar\\"/>\`);
|
||||||
|
|
||||||
@@ -577,7 +580,7 @@ exports[`attributes updating classes (with obj notation) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"hoy\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"hoy\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
@@ -592,7 +595,7 @@ exports[`attributes various escapes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div foo=\\"<foo\\" block-attribute-0=\\"bar\\" block-attribute-1=\\"baz\\" block-attributes=\\"2\\"/>\`);
|
let block1 = createBlock(\`<div foo=\\"<foo\\" block-attribute-0=\\"bar\\" block-attribute-1=\\"baz\\" block-attributes=\\"2\\"/>\`);
|
||||||
|
|
||||||
@@ -609,7 +612,7 @@ exports[`attributes various escapes 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div> < </div>\`);
|
let block1 = createBlock(\`<div> < </div>\`);
|
||||||
|
|
||||||
@@ -623,7 +626,7 @@ exports[`special cases for some specific html attributes/properties input of typ
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<input type=\\"checkbox\\" block-attribute-0=\\"indeterminate\\"/>\`);
|
let block1 = createBlock(\`<input type=\\"checkbox\\" block-attribute-0=\\"indeterminate\\"/>\`);
|
||||||
|
|
||||||
@@ -638,7 +641,7 @@ exports[`special cases for some specific html attributes/properties input type=
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<input type=\\"checkbox\\" block-attribute-0=\\"checked\\"/>\`);
|
let block1 = createBlock(\`<input type=\\"checkbox\\" block-attribute-0=\\"checked\\"/>\`);
|
||||||
|
|
||||||
@@ -653,7 +656,7 @@ exports[`special cases for some specific html attributes/properties input with t
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<input block-attribute-0=\\"value\\"/>\`);
|
let block1 = createBlock(\`<input block-attribute-0=\\"value\\"/>\`);
|
||||||
|
|
||||||
@@ -668,7 +671,7 @@ exports[`special cases for some specific html attributes/properties various bool
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input type=\\"checkbox\\" checked=\\"checked\\"/><input checked=\\"checked\\"/><div checked=\\"checked\\"/><div selected=\\"selected\\"/><option selected=\\"selected\\" other=\\"1\\"/><input readonly=\\"readonly\\"/><button disabled=\\"disabled\\"/></div>\`);
|
let block1 = createBlock(\`<div><input type=\\"checkbox\\" checked=\\"checked\\"/><input checked=\\"checked\\"/><div checked=\\"checked\\"/><div selected=\\"selected\\"/><option selected=\\"selected\\" other=\\"1\\"/><input readonly=\\"readonly\\"/><button disabled=\\"disabled\\"/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`comments only a comment 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<!-- comment-->\`);
|
let block1 = createBlock(\`<!-- comment-->\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`comments properly handle comments 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>hello <!-- comment-->owl</div>\`);
|
let block1 = createBlock(\`<div>hello <!-- comment-->owl</div>\`);
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ exports[`comments properly handle comments between t-if/t-else 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block2 = createBlock(\`<span>true</span>\`);
|
let block2 = createBlock(\`<span>true</span>\`);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-on can bind event handler 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ exports[`t-on can bind handlers with arguments 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -35,7 +35,7 @@ exports[`t-on can bind handlers with empty object 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -51,7 +51,7 @@ exports[`t-on can bind handlers with empty object (with non empty inner string)
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -67,7 +67,7 @@ exports[`t-on can bind handlers with empty object (with non empty inner string)
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<ul><block-child-0/></ul>\`);
|
let block1 = createBlock(\`<ul><block-child-0/></ul>\`);
|
||||||
let block3 = createBlock(\`<li><a block-handler-0=\\"click\\">link</a></li>\`);
|
let block3 = createBlock(\`<li><a block-handler-0=\\"click\\">link</a></li>\`);
|
||||||
@@ -93,7 +93,7 @@ exports[`t-on can bind handlers with object arguments 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -109,7 +109,7 @@ exports[`t-on can bind two event handlers 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\" block-handler-1=\\"dblclick\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\" block-handler-1=\\"dblclick\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -125,7 +125,7 @@ exports[`t-on handler is bound to proper owner 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -140,7 +140,7 @@ exports[`t-on handler is bound to proper owner, part 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block2 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -162,7 +162,7 @@ exports[`t-on handler is bound to proper owner, part 3 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -177,7 +177,7 @@ exports[`t-on handler is bound to proper owner, part 3 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
@@ -190,7 +190,7 @@ exports[`t-on handler is bound to proper owner, part 4 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -205,7 +205,7 @@ exports[`t-on handler is bound to proper owner, part 4 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
@@ -229,7 +229,7 @@ exports[`t-on receive event in first argument 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -244,7 +244,7 @@ exports[`t-on t-on with inline statement (function call) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -260,7 +260,7 @@ exports[`t-on t-on with inline statement 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
@@ -276,7 +276,7 @@ exports[`t-on t-on with inline statement, part 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Toggle</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Toggle</button>\`);
|
||||||
|
|
||||||
@@ -292,7 +292,7 @@ exports[`t-on t-on with inline statement, part 3 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Toggle</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Toggle</button>\`);
|
||||||
|
|
||||||
@@ -309,7 +309,7 @@ exports[`t-on t-on with t-call 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ exports[`t-on t-on with t-call 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -340,7 +340,7 @@ exports[`t-on t-on, with arguments and t-call 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
@@ -356,7 +356,7 @@ exports[`t-on t-on, with arguments and t-call 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`misc complex template 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"><div block-attribute-1=\\"class\\"><div class=\\"batch_header\\"><a block-attribute-2=\\"href\\" block-attribute-3=\\"class\\" title=\\"View Batch\\"><block-text-4/><block-child-0/><i class=\\"arrow fa fa-window-maximize\\"/></a></div><block-child-1/><div class=\\"batch_slots\\"><block-child-2/><block-child-3/></div><div class=\\"batch_commits\\"><block-child-4/></div></div></div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"><div block-attribute-1=\\"class\\"><div class=\\"batch_header\\"><a block-attribute-2=\\"href\\" block-attribute-3=\\"class\\" title=\\"View Batch\\"><block-text-4/><block-child-0/><i class=\\"arrow fa fa-window-maximize\\"/></a></div><block-child-1/><div class=\\"batch_slots\\"><block-child-2/><block-child-3/></div><div class=\\"batch_commits\\"><block-child-4/></div></div></div>\`);
|
||||||
let block2 = createBlock(\`<i class=\\"fa fa-exclamation-triangle\\"/>\`);
|
let block2 = createBlock(\`<i class=\\"fa fa-exclamation-triangle\\"/>\`);
|
||||||
@@ -82,7 +82,7 @@ exports[`misc global 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<año block-attribute-0=\\"falló\\"><block-child-0/></año>\`);
|
let block1 = createBlock(\`<año block-attribute-0=\\"falló\\"><block-child-0/></año>\`);
|
||||||
|
|
||||||
@@ -98,7 +98,7 @@ exports[`misc global 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ exports[`misc global 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -129,7 +129,7 @@ exports[`misc global 4`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`_callee-uses-foo\`);
|
const callTemplate_2 = getTemplate(\`_callee-uses-foo\`);
|
||||||
const callTemplate_4 = getTemplate(\`_callee-uses-foo\`);
|
const callTemplate_4 = getTemplate(\`_callee-uses-foo\`);
|
||||||
const callTemplate_6 = getTemplate(\`_callee-uses-foo\`);
|
const callTemplate_6 = getTemplate(\`_callee-uses-foo\`);
|
||||||
@@ -141,6 +141,7 @@ exports[`misc global 4`] = `
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList([4,5,6]);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList([4,5,6]);
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -153,12 +154,14 @@ exports[`misc global 4`] = `
|
|||||||
let d1 = ctx['value'];
|
let d1 = ctx['value'];
|
||||||
let b4 = block4([d1]);
|
let b4 = block4([d1]);
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`foo\`] = 'aaa';
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"foo\\", 'aaa');
|
||||||
let b6 = callTemplate_2(ctx, node, key + \`__1__\${key1}\`);
|
let b6 = callTemplate_2(ctx, node, key + \`__1__\${key1}\`);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
let b7 = callTemplate_4(ctx, node, key + \`__3__\${key1}\`);
|
let b7 = callTemplate_4(ctx, node, key + \`__3__\${key1}\`);
|
||||||
ctx[\`foo\`] = 'bbb';
|
setContextValue(ctx, \\"foo\\", 'bbb');
|
||||||
let b8 = callTemplate_6(ctx, node, key + \`__5__\${key1}\`);
|
let b8 = callTemplate_6(ctx, node, key + \`__5__\${key1}\`);
|
||||||
let b5 = multi([b6, b7, b8]);
|
let b5 = multi([b6, b7, b8]);
|
||||||
ctx[zero] = b5;
|
ctx[zero] = b5;
|
||||||
@@ -178,7 +181,7 @@ exports[`misc other complex template 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_3 = getTemplate(\`LOAD_INFOS_TEMPLATE\`);
|
const callTemplate_3 = getTemplate(\`LOAD_INFOS_TEMPLATE\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><header><nav class=\\"navbar navbar-expand-md navbar-light bg-light\\"><a block-attribute-0=\\"href\\"><b style=\\"color:#777;\\"><block-text-1/></b></a><button type=\\"button\\" class=\\"navbar-toggler\\" data-toggle=\\"collapse\\" data-target=\\"#top_menu_collapse\\"><span class=\\"navbar-toggler-icon\\"/></button><div class=\\"collapse navbar-collapse\\" id=\\"top_menu_collapse\\" aria-expanded=\\"false\\"><ul class=\\"nav navbar-nav ml-auto text-right\\" id=\\"top_menu\\"><block-child-0/><li class=\\"nav-item divider\\"/><block-child-1/></ul><div><div class=\\"input-group input-group-sm\\"><div class=\\"input-group-prepend input-group-sm\\"><button class=\\"btn btn-default fa fa-cog\\" title=\\"Settings\\" block-handler-2=\\"click\\"/><button class=\\"btn btn-default\\" block-handler-3=\\"click\\"> More </button><block-child-2/></div><input class=\\"form-control\\" type=\\"text\\" placeholder=\\"Search\\" aria-label=\\"Search\\" name=\\"search\\" block-attribute-4=\\"value\\" block-handler-5=\\"keyup\\" block-handler-6=\\"change\\" block-ref=\\"7\\"/><div class=\\"input-group-append\\"><button class=\\"btn btn-default fa fa-eraser\\" block-handler-8=\\"click\\"/></div></div></div></div></nav></header><div class=\\"container-fluid\\" block-ref=\\"9\\"><div class=\\"row\\"><!--div class=\\"form-group col-md-6\\">
|
let block1 = createBlock(\`<div><header><nav class=\\"navbar navbar-expand-md navbar-light bg-light\\"><a block-attribute-0=\\"href\\"><b style=\\"color:#777;\\"><block-text-1/></b></a><button type=\\"button\\" class=\\"navbar-toggler\\" data-toggle=\\"collapse\\" data-target=\\"#top_menu_collapse\\"><span class=\\"navbar-toggler-icon\\"/></button><div class=\\"collapse navbar-collapse\\" id=\\"top_menu_collapse\\" aria-expanded=\\"false\\"><ul class=\\"nav navbar-nav ml-auto text-right\\" id=\\"top_menu\\"><block-child-0/><li class=\\"nav-item divider\\"/><block-child-1/></ul><div><div class=\\"input-group input-group-sm\\"><div class=\\"input-group-prepend input-group-sm\\"><button class=\\"btn btn-default fa fa-cog\\" title=\\"Settings\\" block-handler-2=\\"click\\"/><button class=\\"btn btn-default\\" block-handler-3=\\"click\\"> More </button><block-child-2/></div><input class=\\"form-control\\" type=\\"text\\" placeholder=\\"Search\\" aria-label=\\"Search\\" name=\\"search\\" block-attribute-4=\\"value\\" block-handler-5=\\"keyup\\" block-handler-6=\\"change\\" block-ref=\\"7\\"/><div class=\\"input-group-append\\"><button class=\\"btn btn-default fa fa-eraser\\" block-handler-8=\\"click\\"/></div></div></div></div></nav></header><div class=\\"container-fluid\\" block-ref=\\"9\\"><div class=\\"row\\"><!--div class=\\"form-group col-md-6\\">
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`simple templates, mostly static can render a table row 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<tr><td>cell</td></tr>\`);
|
let block1 = createBlock(\`<tr><td>cell</td></tr>\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`simple templates, mostly static div with a class attribute 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"abc\\">foo</div>\`);
|
let block1 = createBlock(\`<div class=\\"abc\\">foo</div>\`);
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ exports[`simple templates, mostly static div with a class attribute with a quote
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"a'bc\\">word</div>\`);
|
let block1 = createBlock(\`<div class=\\"a'bc\\">word</div>\`);
|
||||||
|
|
||||||
@@ -46,7 +46,7 @@ exports[`simple templates, mostly static div with a span child node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>word</span></div>\`);
|
let block1 = createBlock(\`<div><span>word</span></div>\`);
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ exports[`simple templates, mostly static div with an arbitrary attribute with a
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div abc=\\"a'bc\\">word</div>\`);
|
let block1 = createBlock(\`<div abc=\\"a'bc\\">word</div>\`);
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ exports[`simple templates, mostly static div with an empty class attribute 1`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>word</div>\`);
|
let block1 = createBlock(\`<div>word</div>\`);
|
||||||
|
|
||||||
@@ -88,7 +88,7 @@ exports[`simple templates, mostly static div with content 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>foo</div>\`);
|
let block1 = createBlock(\`<div>foo</div>\`);
|
||||||
|
|
||||||
@@ -102,7 +102,7 @@ exports[`simple templates, mostly static dom node with t-esc 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -117,7 +117,7 @@ exports[`simple templates, mostly static dom node with t-esc 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -132,7 +132,7 @@ exports[`simple templates, mostly static dynamic text value 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['text']);
|
return text(ctx['text']);
|
||||||
@@ -144,7 +144,7 @@ exports[`simple templates, mostly static empty div 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
@@ -158,7 +158,7 @@ exports[`simple templates, mostly static empty string 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`\`);
|
return text(\`\`);
|
||||||
@@ -170,7 +170,7 @@ exports[`simple templates, mostly static empty string in a template set 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`\`);
|
return text(\`\`);
|
||||||
@@ -182,7 +182,7 @@ exports[`simple templates, mostly static multiple root nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<div>foo</div>\`);
|
let block2 = createBlock(\`<div>foo</div>\`);
|
||||||
let block3 = createBlock(\`<span>hey</span>\`);
|
let block3 = createBlock(\`<span>hey</span>\`);
|
||||||
@@ -199,7 +199,7 @@ exports[`simple templates, mostly static simple string 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`hello vdom\`);
|
return text(\`hello vdom\`);
|
||||||
@@ -211,7 +211,7 @@ exports[`simple templates, mostly static simple string in t tag 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`hello vdom\`);
|
return text(\`hello vdom\`);
|
||||||
@@ -223,7 +223,7 @@ exports[`simple templates, mostly static static text and dynamic text (no t tag)
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2 = text(\`hello \`);
|
let b2 = text(\`hello \`);
|
||||||
@@ -237,7 +237,7 @@ exports[`simple templates, mostly static static text and dynamic text 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2 = text(\`hello \`);
|
let b2 = text(\`hello \`);
|
||||||
@@ -251,7 +251,7 @@ exports[`simple templates, mostly static t-esc in dom node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -266,7 +266,7 @@ exports[`simple templates, mostly static t-esc in dom node, variations 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>hello <block-text-0/></div>\`);
|
let block1 = createBlock(\`<div>hello <block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -281,7 +281,7 @@ exports[`simple templates, mostly static t-esc in dom node, variations 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>hello <block-text-0/> world</div>\`);
|
let block1 = createBlock(\`<div>hello <block-text-0/> world</div>\`);
|
||||||
|
|
||||||
@@ -296,7 +296,7 @@ exports[`simple templates, mostly static two t-escs next to each other 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2 = text(ctx['text1']);
|
let b2 = text(ctx['text1']);
|
||||||
@@ -310,7 +310,7 @@ exports[`simple templates, mostly static two t-escs next to each other 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2 = text(ctx['text1']);
|
let b2 = text(ctx['text1']);
|
||||||
@@ -324,7 +324,7 @@ exports[`simple templates, mostly static two t-escs next to each other, in a div
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-call (template calling) basic caller 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>ok</span>\`);
|
let block1 = createBlock(\`<span>ok</span>\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`t-call (template calling) basic caller 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`_basic-callee\`);
|
const callTemplate_2 = getTemplate(\`_basic-callee\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -34,7 +34,7 @@ exports[`t-call (template calling) basic caller, no parent node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>ok</span>\`);
|
let block1 = createBlock(\`<span>ok</span>\`);
|
||||||
|
|
||||||
@@ -48,7 +48,7 @@ exports[`t-call (template calling) basic caller, no parent node 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`_basic-callee\`);
|
const callTemplate_2 = getTemplate(\`_basic-callee\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
@@ -61,7 +61,7 @@ exports[`t-call (template calling) call with several sub nodes on same line 1`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -76,7 +76,7 @@ exports[`t-call (template calling) call with several sub nodes on same line 2`]
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -85,6 +85,7 @@ exports[`t-call (template calling) call with several sub nodes on same line 2`]
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b3 = block3();
|
let b3 = block3();
|
||||||
let b4 = text(\` \`);
|
let b4 = text(\` \`);
|
||||||
let b5 = block5();
|
let b5 = block5();
|
||||||
@@ -100,7 +101,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0' 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>cascade 2</span><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><span>cascade 2</span><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -115,7 +116,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0' 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`finalTemplate\`);
|
const callTemplate_2 = getTemplate(\`finalTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -123,6 +124,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0' 2`] = `
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b3 = block3();
|
let b3 = block3();
|
||||||
let b4 = html(ctx[zero]);
|
let b4 = html(ctx[zero]);
|
||||||
let b2 = multi([b3, b4]);
|
let b2 = multi([b3, b4]);
|
||||||
@@ -137,7 +139,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0' 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`subSubTemplate\`);
|
const callTemplate_2 = getTemplate(\`subSubTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -145,6 +147,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0' 3`] = `
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b3 = block3();
|
let b3 = block3();
|
||||||
let b4 = html(ctx[zero]);
|
let b4 = html(ctx[zero]);
|
||||||
let b2 = multi([b3, b4]);
|
let b2 = multi([b3, b4]);
|
||||||
@@ -159,7 +162,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0' 4`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`subTemplate\`);
|
const callTemplate_2 = getTemplate(\`subTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -168,6 +171,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0' 4`] = `
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b3 = block3();
|
let b3 = block3();
|
||||||
let b4 = text(\` \`);
|
let b4 = text(\` \`);
|
||||||
let b5 = block5();
|
let b5 = block5();
|
||||||
@@ -183,7 +187,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0', without external
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>cascade 2</span>\`);
|
let block2 = createBlock(\`<span>cascade 2</span>\`);
|
||||||
|
|
||||||
@@ -199,13 +203,14 @@ exports[`t-call (template calling) cascading t-call t-raw='0', without external
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`finalTemplate\`);
|
const callTemplate_2 = getTemplate(\`finalTemplate\`);
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>cascade 1</span>\`);
|
let block2 = createBlock(\`<span>cascade 1</span>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b2 = block2();
|
let b2 = block2();
|
||||||
let b3 = html(ctx[zero]);
|
let b3 = html(ctx[zero]);
|
||||||
let b1 = multi([b2, b3]);
|
let b1 = multi([b2, b3]);
|
||||||
@@ -219,13 +224,14 @@ exports[`t-call (template calling) cascading t-call t-raw='0', without external
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`subSubTemplate\`);
|
const callTemplate_2 = getTemplate(\`subSubTemplate\`);
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>cascade 0</span>\`);
|
let block2 = createBlock(\`<span>cascade 0</span>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b2 = block2();
|
let b2 = block2();
|
||||||
let b3 = html(ctx[zero]);
|
let b3 = html(ctx[zero]);
|
||||||
let b1 = multi([b2, b3]);
|
let b1 = multi([b2, b3]);
|
||||||
@@ -239,7 +245,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0', without external
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`subTemplate\`);
|
const callTemplate_2 = getTemplate(\`subTemplate\`);
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>hey</span>\`);
|
let block2 = createBlock(\`<span>hey</span>\`);
|
||||||
@@ -247,6 +253,7 @@ exports[`t-call (template calling) cascading t-call t-raw='0', without external
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b2 = block2();
|
let b2 = block2();
|
||||||
let b3 = text(\` \`);
|
let b3 = text(\` \`);
|
||||||
let b4 = block4();
|
let b4 = block4();
|
||||||
@@ -261,7 +268,7 @@ exports[`t-call (template calling) dynamic t-call 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<foo><block-text-0/></foo>\`);
|
let block1 = createBlock(\`<foo><block-text-0/></foo>\`);
|
||||||
|
|
||||||
@@ -276,7 +283,7 @@ exports[`t-call (template calling) dynamic t-call 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<bar><block-text-0/></bar>\`);
|
let block1 = createBlock(\`<bar><block-text-0/></bar>\`);
|
||||||
|
|
||||||
@@ -291,7 +298,7 @@ exports[`t-call (template calling) dynamic t-call 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -307,7 +314,7 @@ exports[`t-call (template calling) inherit context 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['foo']);
|
return text(ctx['foo']);
|
||||||
@@ -319,14 +326,15 @@ exports[`t-call (template calling) inherit context 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`foo\`] = 1;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"foo\\", 1);
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -337,7 +345,7 @@ exports[`t-call (template calling) recursive template, part 1 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`recursive\`);
|
const callTemplate_2 = getTemplate(\`recursive\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>hey</span><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><span>hey</span><block-child-0/></div>\`);
|
||||||
@@ -356,15 +364,17 @@ exports[`t-call (template calling) recursive template, part 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`node\`] = ctx['root'];
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"node\\", ctx['root']);
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -375,13 +385,14 @@ exports[`t-call (template calling) recursive template, part 2 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let d1 = ctx['node'].val;
|
let d1 = ctx['node'].val;
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['node'].children||[]);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['node'].children||[]);
|
||||||
@@ -393,7 +404,8 @@ exports[`t-call (template calling) recursive template, part 2 2`] = `
|
|||||||
ctx[\`subtree_value\`] = k_block2[i1];
|
ctx[\`subtree_value\`] = k_block2[i1];
|
||||||
let key1 = ctx['subtree_index'];
|
let key1 = ctx['subtree_index'];
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`node\`] = ctx['subtree'];
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"node\\", ctx['subtree']);
|
||||||
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
}
|
}
|
||||||
@@ -407,15 +419,17 @@ exports[`t-call (template calling) recursive template, part 3 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`node\`] = ctx['root'];
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"node\\", ctx['root']);
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -426,13 +440,14 @@ exports[`t-call (template calling) recursive template, part 3 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let d1 = ctx['node'].val;
|
let d1 = ctx['node'].val;
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['node'].children||[]);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['node'].children||[]);
|
||||||
@@ -444,7 +459,8 @@ exports[`t-call (template calling) recursive template, part 3 2`] = `
|
|||||||
ctx[\`subtree_value\`] = k_block2[i1];
|
ctx[\`subtree_value\`] = k_block2[i1];
|
||||||
let key1 = ctx['subtree_index'];
|
let key1 = ctx['subtree_index'];
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`node\`] = ctx['subtree'];
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"node\\", ctx['subtree']);
|
||||||
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
}
|
}
|
||||||
@@ -458,16 +474,18 @@ exports[`t-call (template calling) recursive template, part 4: with t-set recurs
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`recursive_idx\`] = 1;
|
ctx[isBoundary] = 1;
|
||||||
ctx[\`node\`] = ctx['root'];
|
setContextValue(ctx, \\"recursive_idx\\", 1);
|
||||||
|
setContextValue(ctx, \\"node\\", ctx['root']);
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -478,14 +496,15 @@ exports[`t-call (template calling) recursive template, part 4: with t-set recurs
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
const callTemplate_2 = getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/> <block-text-1/></p><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/> <block-text-1/></p><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`recursive_idx\`] = ctx['recursive_idx']+1;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"recursive_idx\\", ctx['recursive_idx']+1);
|
||||||
let d1 = ctx['node'].val;
|
let d1 = ctx['node'].val;
|
||||||
let d2 = ctx['recursive_idx'];
|
let d2 = ctx['recursive_idx'];
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -498,7 +517,8 @@ exports[`t-call (template calling) recursive template, part 4: with t-set recurs
|
|||||||
ctx[\`subtree_value\`] = k_block2[i1];
|
ctx[\`subtree_value\`] = k_block2[i1];
|
||||||
let key1 = ctx['subtree_index'];
|
let key1 = ctx['subtree_index'];
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`node\`] = ctx['subtree'];
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"node\\", ctx['subtree']);
|
||||||
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
}
|
}
|
||||||
@@ -512,7 +532,7 @@ exports[`t-call (template calling) scoped parameters 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`ok\`);
|
return text(\`ok\`);
|
||||||
@@ -524,15 +544,17 @@ exports[`t-call (template calling) scoped parameters 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`foo\`] = 42;
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"foo\\", 42);
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
let d1 = ctx['foo'];
|
let d1 = ctx['foo'];
|
||||||
@@ -545,7 +567,7 @@ exports[`t-call (template calling) scoped parameters, part 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['foo']);
|
return text(ctx['foo']);
|
||||||
@@ -557,16 +579,18 @@ exports[`t-call (template calling) scoped parameters, part 2 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`foo\`] = 11;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"foo\\", 11);
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`foo\`] = 42;
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"foo\\", 42);
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
let d1 = ctx['foo'];
|
let d1 = ctx['foo'];
|
||||||
@@ -579,7 +603,7 @@ exports[`t-call (template calling) t-call allowed on a non t node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -595,7 +619,7 @@ exports[`t-call (template calling) t-call allowed on a non t node 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>ok</span>\`);
|
let block1 = createBlock(\`<span>ok</span>\`);
|
||||||
|
|
||||||
@@ -609,7 +633,7 @@ exports[`t-call (template calling) t-call with body content as root of a templat
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<foo><block-child-0/></foo>\`);
|
let block1 = createBlock(\`<foo><block-child-0/></foo>\`);
|
||||||
|
|
||||||
@@ -624,13 +648,14 @@ exports[`t-call (template calling) t-call with body content as root of a templat
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`antony\`);
|
const callTemplate_2 = getTemplate(\`antony\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<p>antony</p>\`);
|
let block1 = createBlock(\`<p>antony</p>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b1 = block1();
|
let b1 = block1();
|
||||||
ctx[zero] = b1;
|
ctx[zero] = b1;
|
||||||
return callTemplate_2(ctx, node, key + \`__1\`);
|
return callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
@@ -642,7 +667,7 @@ exports[`t-call (template calling) t-call with t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -661,7 +686,7 @@ exports[`t-call (template calling) t-call with t-if 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>ok</span>\`);
|
let block1 = createBlock(\`<span>ok</span>\`);
|
||||||
|
|
||||||
@@ -675,15 +700,17 @@ exports[`t-call (template calling) t-call with t-set inside and body text conten
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`val\`] = \`yip yip\`;
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"val\\", \`yip yip\`);
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -694,7 +721,7 @@ exports[`t-call (template calling) t-call with t-set inside and body text conten
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
@@ -709,13 +736,14 @@ exports[`t-call (template calling) t-call with t-set inside and outside 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['list']);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['list']);
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -725,9 +753,10 @@ exports[`t-call (template calling) t-call with t-set inside and outside 1`] = `
|
|||||||
ctx[\`v_index\`] = i1;
|
ctx[\`v_index\`] = i1;
|
||||||
ctx[\`v_value\`] = k_block2[i1];
|
ctx[\`v_value\`] = k_block2[i1];
|
||||||
let key1 = ctx['v_index'];
|
let key1 = ctx['v_index'];
|
||||||
ctx[\`val\`] = ctx['v'].val;
|
setContextValue(ctx, \\"val\\", ctx['v'].val);
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`val3\`] = ctx['val']*3;
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"val3\\", ctx['val']*3);
|
||||||
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
}
|
}
|
||||||
@@ -741,7 +770,7 @@ exports[`t-call (template calling) t-call with t-set inside and outside 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -756,13 +785,14 @@ exports[`t-call (template calling) t-call with t-set inside and outside. 2 1`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['list']);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['list']);
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -772,9 +802,10 @@ exports[`t-call (template calling) t-call with t-set inside and outside. 2 1`] =
|
|||||||
ctx[\`v_index\`] = i1;
|
ctx[\`v_index\`] = i1;
|
||||||
ctx[\`v_value\`] = k_block2[i1];
|
ctx[\`v_value\`] = k_block2[i1];
|
||||||
let key1 = ctx['v_index'];
|
let key1 = ctx['v_index'];
|
||||||
ctx[\`val\`] = ctx['v'].val;
|
setContextValue(ctx, \\"val\\", ctx['v'].val);
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`val3\`] = ctx['val']*3;
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"val3\\", ctx['val']*3);
|
||||||
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
c_block2[i1] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}\`), key1);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
}
|
}
|
||||||
@@ -788,7 +819,7 @@ exports[`t-call (template calling) t-call with t-set inside and outside. 2 2`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -805,14 +836,15 @@ exports[`t-call (template calling) t-call with t-set inside and outside. 2 3`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`main\`);
|
const callTemplate_2 = getTemplate(\`main\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`w\`] = 'fromwrapper';
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"w\\", 'fromwrapper');
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -823,7 +855,7 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>callee1</div>\`);
|
let block1 = createBlock(\`<div>callee1</div>\`);
|
||||||
|
|
||||||
@@ -837,7 +869,7 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>callee2 <block-text-0/></div>\`);
|
let block1 = createBlock(\`<div>callee2 <block-text-0/></div>\`);
|
||||||
|
|
||||||
@@ -852,7 +884,7 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`callee1\`);
|
const callTemplate_2 = getTemplate(\`callee1\`);
|
||||||
const callTemplate_4 = getTemplate(\`callee2\`);
|
const callTemplate_4 = getTemplate(\`callee2\`);
|
||||||
|
|
||||||
@@ -860,13 +892,15 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
ctx[\`v1\`] = 'elif';
|
setContextValue(ctx, \\"v1\\", 'elif');
|
||||||
if (ctx['v1']==='if') {
|
if (ctx['v1']==='if') {
|
||||||
b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
} else if (ctx['v1']==='elif') {
|
} else if (ctx['v1']==='elif') {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`v\`] = 'success';
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"v\\", 'success');
|
||||||
b3 = callTemplate_4(ctx, node, key + \`__3\`);
|
b3 = callTemplate_4(ctx, node, key + \`__3\`);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
}
|
}
|
||||||
@@ -879,14 +913,15 @@ exports[`t-call (template calling) t-esc inside t-call, with t-set outside 1`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`v\`] = \`Hi\`;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"v\\", \`Hi\`);
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -897,7 +932,7 @@ exports[`t-call (template calling) t-esc inside t-call, with t-set outside 2`] =
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -912,7 +947,7 @@ exports[`t-call (template calling) with unused body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>ok</div>\`);
|
let block1 = createBlock(\`<div>ok</div>\`);
|
||||||
|
|
||||||
@@ -926,11 +961,12 @@ exports[`t-call (template calling) with unused body 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b1 = text(\`WHEEE\`);
|
let b1 = text(\`WHEEE\`);
|
||||||
ctx[zero] = b1;
|
ctx[zero] = b1;
|
||||||
return callTemplate_2(ctx, node, key + \`__1\`);
|
return callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
@@ -942,7 +978,7 @@ exports[`t-call (template calling) with unused setbody 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>ok</div>\`);
|
let block1 = createBlock(\`<div>ok</div>\`);
|
||||||
|
|
||||||
@@ -956,13 +992,15 @@ exports[`t-call (template calling) with unused setbody 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`qux\`] = 3;
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"qux\\", 3);
|
||||||
return callTemplate_2(ctx, node, key + \`__1\`);
|
return callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -972,7 +1010,7 @@ exports[`t-call (template calling) with used body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<h1><block-text-0/></h1>\`);
|
let block1 = createBlock(\`<h1><block-text-0/></h1>\`);
|
||||||
|
|
||||||
@@ -987,11 +1025,12 @@ exports[`t-call (template calling) with used body 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b1 = text(\`ok\`);
|
let b1 = text(\`ok\`);
|
||||||
ctx[zero] = b1;
|
ctx[zero] = b1;
|
||||||
return callTemplate_2(ctx, node, key + \`__1\`);
|
return callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
@@ -1003,7 +1042,7 @@ exports[`t-call (template calling) with used setbody 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['foo']);
|
return text(ctx['foo']);
|
||||||
@@ -1015,15 +1054,17 @@ exports[`t-call (template calling) with used setbody 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`foo\`] = 'ok';
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"foo\\", 'ok');
|
||||||
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`debugging t-debug 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span>hey</span>\`);
|
let block2 = createBlock(\`<span>hey</span>\`);
|
||||||
@@ -25,13 +25,14 @@ exports[`debugging t-log 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`foo\`] = 42;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"foo\\", 42);
|
||||||
console.log(ctx['foo']+3);
|
console.log(ctx['foo']+3);
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-esc div with falsy values 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><p><block-text-1/></p><p><block-text-2/></p><p><block-text-3/></p><p><block-text-4/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><p><block-text-1/></p><p><block-text-2/></p><p><block-text-3/></p><p><block-text-4/></p></div>\`);
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ exports[`t-esc escaping 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ exports[`t-esc escaping on a node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ exports[`t-esc escaping on a node with a body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -68,7 +68,7 @@ exports[`t-esc escaping on a node with a body, as a default 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -83,7 +83,7 @@ exports[`t-esc falsy values in text nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2 = text(ctx['v1']);
|
let b2 = text(ctx['v1']);
|
||||||
@@ -104,7 +104,7 @@ exports[`t-esc literal 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -119,13 +119,14 @@ exports[`t-esc t-esc is escaped 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
let block2 = createBlock(\`<p>escaped</p>\`);
|
let block2 = createBlock(\`<p>escaped</p>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2 = block2();
|
let b2 = block2();
|
||||||
ctx[\`var\`] = b2;
|
ctx[\`var\`] = b2;
|
||||||
let d1 = ctx['var'];
|
let d1 = ctx['var'];
|
||||||
@@ -138,7 +139,7 @@ exports[`t-esc t-esc work with spread operator 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -153,7 +154,7 @@ exports[`t-esc t-esc=0 is escaped 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -168,7 +169,7 @@ exports[`t-esc t-esc=0 is escaped 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -176,6 +177,7 @@ exports[`t-esc t-esc=0 is escaped 2`] = `
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b2 = block2();
|
let b2 = block2();
|
||||||
ctx[zero] = b2;
|
ctx[zero] = b2;
|
||||||
let b3 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b3 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
@@ -188,7 +190,7 @@ exports[`t-esc variable 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-foreach does not pollute the rendering context 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -26,7 +26,7 @@ exports[`t-foreach iterate on items (on a element node) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<span><block-text-0/></span>\`);
|
let block3 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
@@ -50,7 +50,7 @@ exports[`t-foreach iterate on items 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -81,7 +81,7 @@ exports[`t-foreach iterate, dict param 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ exports[`t-foreach iterate, position 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ exports[`t-foreach simple iteration (in a node) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -170,7 +170,7 @@ exports[`t-foreach simple iteration 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -189,7 +189,7 @@ exports[`t-foreach simple iteration with two nodes inside 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block3 = createBlock(\`<span>a<block-text-0/></span>\`);
|
let block3 = createBlock(\`<span>a<block-text-0/></span>\`);
|
||||||
let block4 = createBlock(\`<span>b<block-text-0/></span>\`);
|
let block4 = createBlock(\`<span>b<block-text-0/></span>\`);
|
||||||
@@ -215,7 +215,7 @@ exports[`t-foreach t-call with body in t-foreach in t-foreach 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2 = text(\` [\`);
|
let b2 = text(\` [\`);
|
||||||
@@ -234,7 +234,7 @@ exports[`t-foreach t-call with body in t-foreach in t-foreach 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
||||||
@@ -242,6 +242,7 @@ exports[`t-foreach t-call with body in t-foreach in t-foreach 2`] = `
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['numbers']);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['numbers']);
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -261,7 +262,8 @@ exports[`t-foreach t-call with body in t-foreach in t-foreach 2`] = `
|
|||||||
ctx[\`b_value\`] = k_block4[i2];
|
ctx[\`b_value\`] = k_block4[i2];
|
||||||
let key2 = ctx['b'];
|
let key2 = ctx['b'];
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`c\`] = 'x'+'_'+ctx['a']+'_'+ctx['b'];
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"c\\", 'x'+'_'+ctx['a']+'_'+ctx['b']);
|
||||||
c_block4[i2] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}__\${key2}\`), key2);
|
c_block4[i2] = withKey(callTemplate_2(ctx, node, key + \`__1__\${key1}__\${key2}\`), key2);
|
||||||
ctx = ctx.__proto__;
|
ctx = ctx.__proto__;
|
||||||
}
|
}
|
||||||
@@ -285,11 +287,12 @@ exports[`t-foreach t-call without body in t-foreach in t-foreach 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`c\`] = 'x'+'_'+ctx['a']+'_'+ctx['b'];
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"c\\", 'x'+'_'+ctx['a']+'_'+ctx['b']);
|
||||||
let b2 = text(\` [\`);
|
let b2 = text(\` [\`);
|
||||||
let b3 = text(ctx['a']);
|
let b3 = text(ctx['a']);
|
||||||
let b4 = text(\`] [\`);
|
let b4 = text(\`] [\`);
|
||||||
@@ -306,7 +309,7 @@ exports[`t-foreach t-call without body in t-foreach in t-foreach 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
||||||
@@ -353,7 +356,7 @@ exports[`t-foreach t-foreach in t-foreach 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -387,7 +390,7 @@ exports[`t-foreach t-foreach with t-if inside (no external node) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block3 = createBlock(\`<span><block-text-0/></span>\`);
|
let block3 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
@@ -413,7 +416,7 @@ exports[`t-foreach t-foreach with t-if inside 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block4 = createBlock(\`<span><block-text-0/></span>\`);
|
let block4 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
@@ -441,7 +444,7 @@ exports[`t-foreach throws error if invalid loop expression 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<span/>\`);
|
let block3 = createBlock(\`<span/>\`);
|
||||||
@@ -465,7 +468,7 @@ exports[`t-foreach warn if no key in some case 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<span><block-text-0/></span>\`);
|
let block3 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
@@ -489,7 +492,7 @@ exports[`t-foreach with t-memo 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
let assign = Object.assign;
|
let assign = Object.assign;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-if a t-if next to a div 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block2 = createBlock(\`<div>foo</div>\`);
|
let block2 = createBlock(\`<div>foo</div>\`);
|
||||||
|
|
||||||
@@ -23,7 +23,7 @@ exports[`t-if a t-if with two inner nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block3 = createBlock(\`<span>yip</span>\`);
|
let block3 = createBlock(\`<span>yip</span>\`);
|
||||||
let block4 = createBlock(\`<div>yip</div>\`);
|
let block4 = createBlock(\`<div>yip</div>\`);
|
||||||
@@ -44,7 +44,7 @@ exports[`t-if boolean value condition elif (no outside node) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3,b4,b5;
|
let b2,b3,b4,b5;
|
||||||
@@ -66,7 +66,7 @@ exports[`t-if boolean value condition elif 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-2/><block-child-3/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-2/><block-child-3/></div>\`);
|
||||||
|
|
||||||
@@ -90,7 +90,7 @@ exports[`t-if boolean value condition else 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>begin</span><block-child-0/><block-child-1/><span>end</span></div>\`);
|
let block1 = createBlock(\`<div><span>begin</span><block-child-0/><block-child-1/><span>end</span></div>\`);
|
||||||
|
|
||||||
@@ -110,7 +110,7 @@ exports[`t-if boolean value condition false else 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>begin</span><block-child-0/><block-child-1/><span>end</span></div>\`);
|
let block1 = createBlock(\`<div><span>begin</span><block-child-0/><block-child-1/><span>end</span></div>\`);
|
||||||
|
|
||||||
@@ -130,7 +130,7 @@ exports[`t-if boolean value condition missing 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -148,7 +148,7 @@ exports[`t-if can use some boolean operators in expressions 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-2/><block-child-3/><block-child-4/><block-child-5/><block-child-6/><block-child-7/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/><block-child-2/><block-child-3/><block-child-4/><block-child-5/><block-child-6/><block-child-7/></div>\`);
|
||||||
|
|
||||||
@@ -187,7 +187,7 @@ exports[`t-if div containing a t-if with two inner nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<span>yip</span>\`);
|
let block3 = createBlock(\`<span>yip</span>\`);
|
||||||
@@ -209,7 +209,7 @@ exports[`t-if dynamic content after t-if with two children nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
let block3 = createBlock(\`<p>1</p>\`);
|
let block3 = createBlock(\`<p>1</p>\`);
|
||||||
@@ -232,7 +232,7 @@ exports[`t-if just a t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
@@ -248,7 +248,7 @@ exports[`t-if simple t-if/t-else 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -266,7 +266,7 @@ exports[`t-if simple t-if/t-else in a div 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -286,7 +286,7 @@ exports[`t-if t-esc with t-elif 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -306,7 +306,7 @@ exports[`t-if t-esc with t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -324,7 +324,7 @@ exports[`t-if t-if and t-else with two nodes 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block4 = createBlock(\`<span>a</span>\`);
|
let block4 = createBlock(\`<span>a</span>\`);
|
||||||
let block5 = createBlock(\`<span>b</span>\`);
|
let block5 = createBlock(\`<span>b</span>\`);
|
||||||
@@ -347,7 +347,7 @@ exports[`t-if t-if in a div 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -365,7 +365,7 @@ exports[`t-if t-if in a t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span>1<block-child-0/></span>\`);
|
let block2 = createBlock(\`<span>1<block-child-0/></span>\`);
|
||||||
@@ -388,7 +388,7 @@ exports[`t-if t-if/t-else with more content 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -408,14 +408,15 @@ exports[`t-if t-set, then t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2;
|
let b2;
|
||||||
ctx[\`title\`] = 'test';
|
setContextValue(ctx, \\"title\\", 'test');
|
||||||
if (ctx['title']) {
|
if (ctx['title']) {
|
||||||
b2 = text(ctx['title']);
|
b2 = text(ctx['title']);
|
||||||
}
|
}
|
||||||
@@ -428,16 +429,17 @@ exports[`t-if t-set, then t-if, part 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span>COUCOU</span>\`);
|
let block2 = createBlock(\`<span>COUCOU</span>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2;
|
let b2;
|
||||||
ctx[\`y\`] = true;
|
setContextValue(ctx, \\"y\\", true);
|
||||||
ctx[\`x\`] = ctx['y'];
|
setContextValue(ctx, \\"x\\", ctx['y']);
|
||||||
if (ctx['x']) {
|
if (ctx['x']) {
|
||||||
b2 = block2();
|
b2 = block2();
|
||||||
}
|
}
|
||||||
@@ -450,7 +452,7 @@ exports[`t-if t-set, then t-if, part 3 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block2 = createBlock(\`<span>AAA</span>\`);
|
let block2 = createBlock(\`<span>AAA</span>\`);
|
||||||
@@ -458,9 +460,10 @@ exports[`t-if t-set, then t-if, part 3 1`] = `
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
ctx[\`y\`] = false;
|
setContextValue(ctx, \\"y\\", false);
|
||||||
ctx[\`x\`] = ctx['y'];
|
setContextValue(ctx, \\"x\\", ctx['y']);
|
||||||
if (ctx['x']) {
|
if (ctx['x']) {
|
||||||
b2 = block2();
|
b2 = block2();
|
||||||
} else if (!ctx['x']) {
|
} else if (!ctx['x']) {
|
||||||
@@ -475,7 +478,7 @@ exports[`t-if two consecutive t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -494,7 +497,7 @@ exports[`t-if two consecutive t-if in a div 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -515,7 +518,7 @@ exports[`t-if two t-ifs next to each other 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-raw literal 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -19,7 +19,7 @@ exports[`t-raw literal, no outside html element 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return html('ok');
|
return html('ok');
|
||||||
@@ -31,7 +31,7 @@ exports[`t-raw multiple calls to t-raw 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><div>Greeter</div><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><div>Greeter</div><block-child-1/></div>\`);
|
||||||
|
|
||||||
@@ -47,7 +47,7 @@ exports[`t-raw multiple calls to t-raw 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -55,6 +55,7 @@ exports[`t-raw multiple calls to t-raw 2`] = `
|
|||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
let b2 = block2();
|
let b2 = block2();
|
||||||
ctx[zero] = b2;
|
ctx[zero] = b2;
|
||||||
let b3 = callTemplate_2(ctx, node, key + \`__1\`);
|
let b3 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
@@ -67,7 +68,7 @@ exports[`t-raw not escaping 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
@@ -82,7 +83,7 @@ exports[`t-raw t-raw and another sibling node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><span>hello</span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><span>hello</span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -97,7 +98,7 @@ exports[`t-raw t-raw on a node with a body, as a default 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -113,7 +114,7 @@ exports[`t-raw t-raw on a node with a dom node in body, as a default 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
let block3 = createBlock(\`<div>nope</div>\`);
|
let block3 = createBlock(\`<div>nope</div>\`);
|
||||||
@@ -130,7 +131,7 @@ exports[`t-raw t-raw with a <t/> in body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return html(ctx['var']);
|
return html(ctx['var']);
|
||||||
@@ -142,7 +143,7 @@ exports[`t-raw t-raw with comment 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
@@ -157,7 +158,7 @@ exports[`t-raw t-raw with just a t-set t-value in body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return html(ctx['var']);
|
return html(ctx['var']);
|
||||||
@@ -169,7 +170,7 @@ exports[`t-raw variable 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`t-ref can get a dynamic ref on a node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span block-ref=\\"0\\"/></div>\`);
|
let block1 = createBlock(\`<div><span block-ref=\\"0\\"/></div>\`);
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ exports[`t-ref can get a ref on a node 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span block-ref=\\"0\\"/></div>\`);
|
let block1 = createBlock(\`<div><span block-ref=\\"0\\"/></div>\`);
|
||||||
|
|
||||||
@@ -37,7 +37,7 @@ exports[`t-ref ref in a t-call 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
const callTemplate_2 = getTemplate(\`sub\`);
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -53,7 +53,7 @@ exports[`t-ref ref in a t-call 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>1<span block-ref=\\"0\\"/>2</div>\`);
|
let block1 = createBlock(\`<div>1<span block-ref=\\"0\\"/>2</div>\`);
|
||||||
|
|
||||||
@@ -69,7 +69,7 @@ exports[`t-ref ref in a t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span block-ref=\\"0\\"/>\`);
|
let block2 = createBlock(\`<span block-ref=\\"0\\"/>\`);
|
||||||
@@ -90,7 +90,7 @@ exports[`t-ref refs in a loop 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div block-ref=\\"0\\"><block-text-1/></div>\`);
|
let block3 = createBlock(\`<div block-ref=\\"0\\"><block-text-1/></div>\`);
|
||||||
@@ -117,7 +117,7 @@ exports[`t-ref two refs, one in a t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><p block-ref=\\"0\\"/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><p block-ref=\\"0\\"/></div>\`);
|
||||||
let block2 = createBlock(\`<span block-ref=\\"0\\"/>\`);
|
let block2 = createBlock(\`<span block-ref=\\"0\\"/>\`);
|
||||||
|
|||||||
@@ -4,13 +4,14 @@ exports[`t-set evaluate value expression 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`value\`] = 1+2;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"value\\", 1+2);
|
||||||
let d1 = ctx['value'];
|
let d1 = ctx['value'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
@@ -21,13 +22,14 @@ exports[`t-set evaluate value expression, part 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`value\`] = ctx['somevariable']+2;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"value\\", ctx['somevariable']+2);
|
||||||
let d1 = ctx['value'];
|
let d1 = ctx['value'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
@@ -38,11 +40,12 @@ exports[`t-set set from attribute literal (no outside div) 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`value\`] = 'ok';
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"value\\", 'ok');
|
||||||
return text(ctx['value']);
|
return text(ctx['value']);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -52,13 +55,14 @@ exports[`t-set set from attribute literal 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`value\`] = 'ok';
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"value\\", 'ok');
|
||||||
let d1 = ctx['value'];
|
let d1 = ctx['value'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
@@ -69,13 +73,14 @@ exports[`t-set set from attribute lookup 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`stuff\`] = ctx['value'];
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"stuff\\", ctx['value']);
|
||||||
let d1 = ctx['stuff'];
|
let d1 = ctx['stuff'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
@@ -86,11 +91,12 @@ exports[`t-set set from body literal 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`value\`] = \`ok\`;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"value\\", \`ok\`);
|
||||||
return text(ctx['value']);
|
return text(ctx['value']);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -100,12 +106,13 @@ exports[`t-set set from body lookup 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2 = text(ctx['value']);
|
let b2 = text(ctx['value']);
|
||||||
ctx[\`stuff\`] = b2;
|
ctx[\`stuff\`] = b2;
|
||||||
let d1 = ctx['stuff'];
|
let d1 = ctx['stuff'];
|
||||||
@@ -118,13 +125,14 @@ exports[`t-set set from empty body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`stuff\`] = null;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"stuff\\", null);
|
||||||
let d1 = ctx['stuff'];
|
let d1 = ctx['stuff'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
@@ -135,14 +143,15 @@ exports[`t-set t-set and t-if 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2;
|
let b2;
|
||||||
ctx[\`v\`] = ctx['value'];
|
setContextValue(ctx, \\"v\\", ctx['value']);
|
||||||
if (ctx['v']==='ok') {
|
if (ctx['v']==='ok') {
|
||||||
b2 = text(\`grimbergen\`);
|
b2 = text(\`grimbergen\`);
|
||||||
}
|
}
|
||||||
@@ -155,35 +164,139 @@ exports[`t-set t-set body is evaluated immediately 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`v1\`] = 'before';
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"v1\\", 'before');
|
||||||
let d1 = ctx['v1'];
|
let d1 = ctx['v1'];
|
||||||
let b2 = block2([d1]);
|
let b2 = block2([d1]);
|
||||||
ctx[\`v2\`] = b2;
|
ctx[\`v2\`] = b2;
|
||||||
ctx[\`v1\`] = 'after';
|
setContextValue(ctx, \\"v1\\", 'after');
|
||||||
let b3 = html(ctx['v2']);
|
let b3 = html(ctx['v2']);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set can't alter from within callee 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
setContextValue(ctx, \\"iter\\", 'called');
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set can't alter from within callee 2`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 'source');
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set can't alter in t-call body 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
setContextValue(ctx, \\"iter\\", 'called');
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set can't alter in t-call body 2`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
const callTemplate_2 = getTemplate(\`sub\`);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 'source');
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"iter\\", 'inCall');
|
||||||
|
let b2 = callTemplate_2(ctx, node, key + \`__1\`);
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d1, d2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set does not modify render context existing key values 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"value\\", 35);
|
||||||
|
let d1 = ctx['value'];
|
||||||
|
return block1([d1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`t-set t-set evaluates an expression only once 1`] = `
|
exports[`t-set t-set evaluates an expression only once 1`] = `
|
||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`v\`] = ctx['value']+' artois';
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"v\\", ctx['value']+' artois');
|
||||||
let d1 = ctx['v'];
|
let d1 = ctx['v'];
|
||||||
let d2 = ctx['v'];
|
let d2 = ctx['v'];
|
||||||
return block1([d1, d2]);
|
return block1([d1, d2]);
|
||||||
@@ -191,18 +304,109 @@ exports[`t-set t-set evaluates an expression only once 1`] = `
|
|||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set outside modified in t-foreach 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><p>EndLoop: <block-text-0/></p></div>\`);
|
||||||
|
let block3 = createBlock(\`<p>InLoop: <block-text-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(['a','b']);
|
||||||
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
|
ctx[\`val\`] = v_block2[i1];
|
||||||
|
let key1 = ctx['val'];
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
c_block2[i1] = withKey(block3([d1]), key1);
|
||||||
|
setContextValue(ctx, \\"iter\\", ctx['iter']+1);
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
let b2 = list(c_block2);
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set outside modified in t-foreach increment-after operator 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><p>EndLoop: <block-text-0/></p></div>\`);
|
||||||
|
let block3 = createBlock(\`<p>InLoop: <block-text-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(['a','b']);
|
||||||
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
|
ctx[\`val\`] = v_block2[i1];
|
||||||
|
let key1 = ctx['val'];
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
c_block2[i1] = withKey(block3([d1]), key1);
|
||||||
|
setContextValue(ctx, \\"iter\\", ctx['iter']++);
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
let b2 = list(c_block2);
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set outside modified in t-foreach increment-before operator 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><p>EndLoop: <block-text-0/></p></div>\`);
|
||||||
|
let block3 = createBlock(\`<p>InLoop: <block-text-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(['a','b']);
|
||||||
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
|
ctx[\`val\`] = v_block2[i1];
|
||||||
|
let key1 = ctx['val'];
|
||||||
|
let d1 = ctx['iter'];
|
||||||
|
c_block2[i1] = withKey(block3([d1]), key1);
|
||||||
|
setContextValue(ctx, \\"iter\\", ++ctx['iter']);
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
let b2 = list(c_block2);
|
||||||
|
let d2 = ctx['iter'];
|
||||||
|
return block1([d2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`t-set t-set should reuse variable if possible 1`] = `
|
exports[`t-set t-set should reuse variable if possible 1`] = `
|
||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><span>v<block-text-0/></span></div>\`);
|
let block3 = createBlock(\`<div><span>v<block-text-0/></span></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`v\`] = 1;
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"v\\", 1);
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['list']);
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['list']);
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -210,7 +414,7 @@ exports[`t-set t-set should reuse variable if possible 1`] = `
|
|||||||
ctx[\`elem_index\`] = i1;
|
ctx[\`elem_index\`] = i1;
|
||||||
let key1 = ctx['elem_index'];
|
let key1 = ctx['elem_index'];
|
||||||
let d1 = ctx['v'];
|
let d1 = ctx['v'];
|
||||||
ctx[\`v\`] = ctx['elem'];
|
setContextValue(ctx, \\"v\\", ctx['elem']);
|
||||||
c_block2[i1] = withKey(block3([d1]), key1);
|
c_block2[i1] = withKey(block3([d1]), key1);
|
||||||
}
|
}
|
||||||
let b2 = list(c_block2);
|
let b2 = list(c_block2);
|
||||||
@@ -223,12 +427,13 @@ exports[`t-set t-set with content and sub t-esc 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b3 = text(ctx['beep']);
|
let b3 = text(ctx['beep']);
|
||||||
let b4 = text(\` boop\`);
|
let b4 = text(\` boop\`);
|
||||||
let b2 = multi([b3, b4]);
|
let b2 = multi([b3, b4]);
|
||||||
@@ -243,20 +448,21 @@ exports[`t-set t-set with t-value (falsy) and body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`v3\`] = false;
|
ctx[isBoundary] = 1
|
||||||
ctx[\`v1\`] = 'before';
|
setContextValue(ctx, \\"v3\\", false);
|
||||||
|
setContextValue(ctx, \\"v1\\", 'before');
|
||||||
let d1 = ctx['v1'];
|
let d1 = ctx['v1'];
|
||||||
let b2 = block2([d1]);
|
let b2 = block2([d1]);
|
||||||
ctx[\`v2\`] = withDefault(ctx['v3'], b2);
|
ctx[\`v2\`] = withDefault(ctx['v3'], b2);
|
||||||
ctx[\`v1\`] = 'after';
|
setContextValue(ctx, \\"v1\\", 'after');
|
||||||
ctx[\`v3\`] = true;
|
setContextValue(ctx, \\"v3\\", true);
|
||||||
let b3 = html(ctx['v2']);
|
let b3 = html(ctx['v2']);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -267,20 +473,21 @@ exports[`t-set t-set with t-value (truthy) and body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`v3\`] = 'Truthy';
|
ctx[isBoundary] = 1
|
||||||
ctx[\`v1\`] = 'before';
|
setContextValue(ctx, \\"v3\\", 'Truthy');
|
||||||
|
setContextValue(ctx, \\"v1\\", 'before');
|
||||||
let d1 = ctx['v1'];
|
let d1 = ctx['v1'];
|
||||||
let b2 = block2([d1]);
|
let b2 = block2([d1]);
|
||||||
ctx[\`v2\`] = withDefault(ctx['v3'], b2);
|
ctx[\`v2\`] = withDefault(ctx['v3'], b2);
|
||||||
ctx[\`v1\`] = 'after';
|
setContextValue(ctx, \\"v1\\", 'after');
|
||||||
ctx[\`v3\`] = false;
|
setContextValue(ctx, \\"v3\\", false);
|
||||||
let b3 = html(ctx['v2']);
|
let b3 = html(ctx['v2']);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -291,16 +498,17 @@ exports[`t-set t-set, t-if, and mix of expression/body lookup, 1 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
if (ctx['flag']) {
|
if (ctx['flag']) {
|
||||||
ctx[\`ourvar\`] = \`1\`;
|
setContextValue(ctx, \\"ourvar\\", \`1\`);
|
||||||
} else {
|
} else {
|
||||||
ctx[\`ourvar\`] = 0;
|
setContextValue(ctx, \\"ourvar\\", 0);
|
||||||
}
|
}
|
||||||
let d1 = ctx['ourvar'];
|
let d1 = ctx['ourvar'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
@@ -312,16 +520,17 @@ exports[`t-set t-set, t-if, and mix of expression/body lookup, 2 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
if (ctx['flag']) {
|
if (ctx['flag']) {
|
||||||
ctx[\`ourvar\`] = 1;
|
setContextValue(ctx, \\"ourvar\\", 1);
|
||||||
} else {
|
} else {
|
||||||
ctx[\`ourvar\`] = \`0\`;
|
setContextValue(ctx, \\"ourvar\\", \`0\`);
|
||||||
}
|
}
|
||||||
let d1 = ctx['ourvar'];
|
let d1 = ctx['ourvar'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
@@ -333,15 +542,16 @@ exports[`t-set t-set, t-if, and mix of expression/body lookup, 3 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['flag']) {
|
if (ctx['flag']) {
|
||||||
ctx[\`ourvar\`] = 1;
|
setContextValue(ctx, \\"ourvar\\", 1);
|
||||||
} else {
|
} else {
|
||||||
ctx[\`ourvar\`] = \`0\`;
|
setContextValue(ctx, \\"ourvar\\", \`0\`);
|
||||||
}
|
}
|
||||||
b2 = text(ctx['ourvar']);
|
b2 = text(ctx['ourvar']);
|
||||||
return multi([b2]);
|
return multi([b2]);
|
||||||
@@ -353,13 +563,14 @@ exports[`t-set value priority (with non text body 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span>2</span>\`);
|
let block2 = createBlock(\`<span>2</span>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
let b2 = block2();
|
let b2 = block2();
|
||||||
ctx[\`value\`] = withDefault(1, b2);
|
ctx[\`value\`] = withDefault(1, b2);
|
||||||
let d1 = ctx['value'];
|
let d1 = ctx['value'];
|
||||||
@@ -372,13 +583,14 @@ exports[`t-set value priority 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[\`value\`] = withDefault(1, \`2\`);
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"value\\", withDefault(1, \`2\`));
|
||||||
let d1 = ctx['value'];
|
let d1 = ctx['value'];
|
||||||
return block1([d1]);
|
return block1([d1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,10 +1,24 @@
|
|||||||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`translation support can set translatable attributes 1`] = `
|
||||||
|
"function anonymous(bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div tomato=\\"word\\" potato=\\"mot\\" title=\\"word\\">text</div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
return block1();
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`translation support can translate node content 1`] = `
|
exports[`translation support can translate node content 1`] = `
|
||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>mot</div>\`);
|
let block1 = createBlock(\`<div>mot</div>\`);
|
||||||
|
|
||||||
@@ -18,7 +32,7 @@ exports[`translation support does not translate node content if disabled 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>mot</span><span>word</span></div>\`);
|
let block1 = createBlock(\`<div><span>mot</span><span>word</span></div>\`);
|
||||||
|
|
||||||
@@ -32,7 +46,7 @@ exports[`translation support some attributes are translated 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p label=\\"mot\\">mot</p><p title=\\"mot\\">mot</p><p placeholder=\\"mot\\">mot</p><p alt=\\"mot\\">mot</p><p something=\\"word\\">mot</p></div>\`);
|
let block1 = createBlock(\`<div><p label=\\"mot\\">mot</p><p title=\\"mot\\">mot</p><p placeholder=\\"mot\\">mot</p><p alt=\\"mot\\">mot</p><p something=\\"word\\">mot</p></div>\`);
|
||||||
|
|
||||||
@@ -46,7 +60,7 @@ exports[`translation support translation is done on the trimmed text, with extra
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div> mot </div>\`);
|
let block1 = createBlock(\`<div> mot </div>\`);
|
||||||
|
|
||||||
@@ -55,17 +69,3 @@ exports[`translation support translation is done on the trimmed text, with extra
|
|||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
exports[`translation support can set translatable attributes 1`] = `
|
|
||||||
"function anonymous(bdom, helpers
|
|
||||||
) {
|
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div tomato=\\"word\\" potato=\\"mot\\" title=\\"word\\">text</div>\`);
|
|
||||||
|
|
||||||
return function template(ctx, node, key = \\"\\") {
|
|
||||||
return block1();
|
|
||||||
}
|
|
||||||
}"
|
|
||||||
`;
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ exports[`white space handling consecutives whitespaces are condensed into a sing
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div> abc </div>\`);
|
let block1 = createBlock(\`<div> abc </div>\`);
|
||||||
|
|
||||||
@@ -18,7 +18,7 @@ exports[`white space handling nothing is done in pre tags 1`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<pre> </pre>\`);
|
let block1 = createBlock(\`<pre> </pre>\`);
|
||||||
|
|
||||||
@@ -32,7 +32,7 @@ exports[`white space handling nothing is done in pre tags 2`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<pre>
|
let block1 = createBlock(\`<pre>
|
||||||
some text
|
some text
|
||||||
@@ -48,7 +48,7 @@ exports[`white space handling nothing is done in pre tags 3`] = `
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<pre>
|
let block1 = createBlock(\`<pre>
|
||||||
|
|
||||||
@@ -64,7 +64,7 @@ exports[`white space handling white space only text nodes are condensed into a s
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div> </div>\`);
|
let block1 = createBlock(\`<div> </div>\`);
|
||||||
|
|
||||||
@@ -78,7 +78,7 @@ exports[`white space handling whitespace only text nodes with newlines are remov
|
|||||||
"function anonymous(bdom, helpers
|
"function anonymous(bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
let { text, createBlock, list, multi, html, toggler, component } = bdom;
|
||||||
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, shallowEqual } = helpers;
|
let { withDefault, getTemplate, prepareList, withKey, zero, call, callSlot, capture, isBoundary, shallowEqual, setContextValue } = helpers;
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>abc</span></div>\`);
|
let block1 = createBlock(\`<div><span>abc</span></div>\`);
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { renderToString, snapshotEverything } from "../helpers";
|
import { renderToString, snapshotEverything, TestContext } from "../helpers";
|
||||||
|
|
||||||
snapshotEverything();
|
snapshotEverything();
|
||||||
|
|
||||||
@@ -12,6 +12,13 @@ describe("t-set", () => {
|
|||||||
expect(renderToString(template)).toBe("<div>ok</div>");
|
expect(renderToString(template)).toBe("<div>ok</div>");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("t-set does not modify render context existing key values", () => {
|
||||||
|
const template = `<div><t t-set="value" t-value="35"/><t t-esc="value"/></div>`;
|
||||||
|
const ctx = { value: 17 };
|
||||||
|
expect(renderToString(template, ctx)).toBe("<div>35</div>");
|
||||||
|
expect(ctx.value).toBe(17);
|
||||||
|
});
|
||||||
|
|
||||||
test("set from attribute literal (no outside div)", () => {
|
test("set from attribute literal (no outside div)", () => {
|
||||||
const template = `<t><t t-set="value" t-value="'ok'"/><t t-esc="value"/></t>`;
|
const template = `<t><t t-set="value" t-value="'ok'"/><t t-esc="value"/></t>`;
|
||||||
expect(renderToString(template)).toBe("ok");
|
expect(renderToString(template)).toBe("ok");
|
||||||
@@ -179,4 +186,92 @@ describe("t-set", () => {
|
|||||||
|
|
||||||
expect(renderToString(template)).toBe("<div>Truthy</div>");
|
expect(renderToString(template)).toBe("<div>Truthy</div>");
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("t-set outside modified in t-foreach", async () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="0"/>
|
||||||
|
<t t-foreach="['a','b']" t-as="val" t-key="val">
|
||||||
|
<p>InLoop: <t t-esc="iter"/></p>
|
||||||
|
<t t-set="iter" t-value="iter + 1"/>
|
||||||
|
</t>
|
||||||
|
<p>EndLoop: <t t-esc="iter"/></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
expect(renderToString(template)).toBe(
|
||||||
|
"<div><p>InLoop: 0</p><p>InLoop: 1</p><p>EndLoop: 2</p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-set outside modified in t-foreach increment-after operator", async () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="0"/>
|
||||||
|
<t t-foreach="['a','b']" t-as="val" t-key="val">
|
||||||
|
<p>InLoop: <t t-esc="iter"/></p>
|
||||||
|
<t t-set="iter" t-value="iter++"/>
|
||||||
|
</t>
|
||||||
|
<p>EndLoop: <t t-esc="iter"/></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
expect(renderToString(template)).toBe(
|
||||||
|
"<div><p>InLoop: 0</p><p>InLoop: 0</p><p>EndLoop: 0</p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-set outside modified in t-foreach increment-before operator", async () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="0"/>
|
||||||
|
<t t-foreach="['a','b']" t-as="val" t-key="val">
|
||||||
|
<p>InLoop: <t t-esc="iter"/></p>
|
||||||
|
<t t-set="iter" t-value="++iter"/>
|
||||||
|
</t>
|
||||||
|
<p>EndLoop: <t t-esc="iter"/></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
expect(renderToString(template)).toBe(
|
||||||
|
"<div><p>InLoop: 0</p><p>InLoop: 1</p><p>EndLoop: 0</p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-set can't alter from within callee", async () => {
|
||||||
|
const context = new TestContext();
|
||||||
|
const sub = `<div><t t-esc="iter"/><t t-set="iter" t-value="'called'"/><t t-esc="iter"/></div>`;
|
||||||
|
const main = `
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="'source'"/>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
<t t-call="sub"/>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
context.addTemplate("sub", sub);
|
||||||
|
context.addTemplate("main", main);
|
||||||
|
|
||||||
|
expect(context.renderToString("main")).toBe(
|
||||||
|
"<div><p>source</p><div>sourcecalled</div><p>source</p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-set can't alter in t-call body", async () => {
|
||||||
|
const context = new TestContext();
|
||||||
|
const sub = `<div><t t-esc="iter"/><t t-set="iter" t-value="'called'"/><t t-esc="iter"/></div>`;
|
||||||
|
const main = `
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="'source'"/>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
<t t-call="sub">
|
||||||
|
<t t-set="iter" t-value="'inCall'"/>
|
||||||
|
</t>
|
||||||
|
<p><t t-esc="iter"/></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
context.addTemplate("sub", sub);
|
||||||
|
context.addTemplate("main", main);
|
||||||
|
|
||||||
|
expect(context.renderToString("main")).toBe(
|
||||||
|
"<div><p>source</p><div>inCallcalled</div><p>source</p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user