mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[IMP] compiler: scope generated ids to their prefix
This means that unrelated ids (eg the id of a template, variable or key) not longer share the same incrementing counter, meaning that you no longer see a variable named "v2" unless another variable "v1" was generated previously, this is also true for block data.
This commit is contained in:
committed by
Aaron Bohy
parent
c7af885f43
commit
9f2e2bcc66
@@ -78,8 +78,8 @@ exports[`basics can be clicked on and updated 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].counter;
|
||||
const v1 = ctx['state'];
|
||||
let hdlr2 = [()=>v1.counter++, ctx];
|
||||
return block1([txt1, hdlr2]);
|
||||
let hdlr1 = [()=>v1.counter++, ctx];
|
||||
return block1([txt1, hdlr1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -117,10 +117,10 @@ exports[`basics can inject values in tagged templates 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { getTemplate } = helpers;
|
||||
const callTemplate_2 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return callTemplate_2.call(this, ctx, node, key + \`__1\`);
|
||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -455,8 +455,8 @@ exports[`basics reconciliation alg is not confused in some specific situation 1`
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
const tKey_2 = 4;
|
||||
let b3 = toggler(tKey_2, component(\`Child\`, {}, tKey_2 + key + \`__3\`, node, ctx));
|
||||
const tKey_1 = 4;
|
||||
let b3 = toggler(tKey_1, component(\`Child\`, {}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -496,8 +496,8 @@ exports[`basics rerendering a widget with a sub widget 2`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].counter;
|
||||
const v1 = ctx['state'];
|
||||
let hdlr2 = [()=>v1.counter++, ctx];
|
||||
return block1([txt1, hdlr2]);
|
||||
let hdlr1 = [()=>v1.counter++, ctx];
|
||||
return block1([txt1, hdlr1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -511,9 +511,9 @@ exports[`basics same t-keys in two different places 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = 1;
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, {blip: '1'}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
const tKey_3 = 1;
|
||||
let b3 = toggler(tKey_3, component(\`Child\`, {blip: '2'}, tKey_3 + key + \`__4\`, node, ctx));
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, {blip: '1'}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
const tKey_2 = 1;
|
||||
let b3 = toggler(tKey_2, component(\`Child\`, {blip: '2'}, tKey_2 + key + \`__2\`, node, ctx));
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -753,9 +753,9 @@ exports[`basics t-key on a component with t-if, and a sibling component 1`] = `
|
||||
let b2,b3;
|
||||
if (false) {
|
||||
const tKey_1 = 'str';
|
||||
b2 = toggler(tKey_1, component(\`Child\`, {}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
b2 = toggler(tKey_1, component(\`Child\`, {}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
}
|
||||
b3 = component(\`Child\`, {}, key + \`__3\`, node, ctx);
|
||||
b3 = component(\`Child\`, {}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -875,7 +875,7 @@ exports[`basics update props of component without concrete own node 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['childProps'].key;
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, ctx['childProps'], tKey_1 + key + \`__2\`, node, ctx));
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, ctx['childProps'], tKey_1 + key + \`__1\`, node, ctx));
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -888,7 +888,7 @@ exports[`basics update props of component without concrete own node 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['props'].subKey;
|
||||
return toggler(tKey_1, component(\`Custom\`, {key: ctx['props'].key,subKey: ctx['props'].subKey}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
return toggler(tKey_1, component(\`Custom\`, {key: ctx['props'].key,subKey: ctx['props'].subKey}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -20,7 +20,7 @@ exports[`calling render in destroy 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['key'];
|
||||
return toggler(tKey_1, component(\`B\`, {fromA: ctx['state']}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
return toggler(tKey_1, component(\`B\`, {fromA: ctx['state']}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1154,7 +1154,7 @@ exports[`two renderings initiated between willPatch and patched 1`] = `
|
||||
let b2;
|
||||
if (ctx['state'].flag) {
|
||||
const tKey_1 = 'panel_'+ctx['state'].panel;
|
||||
b2 = toggler(tKey_1, component(\`Panel\`, {val: ctx['state'].panel}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
b2 = toggler(tKey_1, component(\`Panel\`, {val: ctx['state'].panel}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
}
|
||||
return block1([], [b2]);
|
||||
}
|
||||
|
||||
@@ -80,11 +80,11 @@ exports[`can catch errors can catch an error in a component render function 1`]
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {flag: ctx['state'].flag}, key + \`__2\`, node, ctx);
|
||||
return component(\`ErrorComponent\`, {flag: ctx['state'].flag}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -132,11 +132,11 @@ exports[`can catch errors can catch an error in the constructor call of a compon
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
||||
return component(\`ErrorComponent\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -170,13 +170,13 @@ exports[`can catch errors can catch an error in the constructor call of a compon
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`ClassicCompoent\`, {}, key + \`__2\`, node, ctx);
|
||||
let b4 = component(\`ErrorComponent\`, {}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`ClassicCompoent\`, {}, key + \`__1\`, node, ctx);
|
||||
let b4 = component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
||||
return multi([b3, b4]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b5 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__4\`, node, ctx);
|
||||
let b5 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -249,11 +249,11 @@ exports[`can catch errors can catch an error in the initial call of a component
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
||||
return component(\`ErrorComponent\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -301,13 +301,13 @@ exports[`can catch errors can catch an error in the initial call of a component
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
||||
return component(\`ErrorComponent\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3;
|
||||
if (ctx['state'].flag) {
|
||||
b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
}
|
||||
return block1([], [b3]);
|
||||
}
|
||||
@@ -445,11 +445,11 @@ exports[`can catch errors can catch an error in the mounted call 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
||||
return component(\`ErrorComponent\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -496,12 +496,12 @@ exports[`can catch errors can catch an error in the willPatch call 1`] = `
|
||||
let block1 = createBlock(\`<div><span><block-text-0/></span><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {message: ctx['state'].message}, key + \`__2\`, node, ctx);
|
||||
return component(\`ErrorComponent\`, {message: ctx['state'].message}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].message;
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([txt1], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -549,11 +549,11 @@ exports[`can catch errors can catch an error in the willStart call 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
||||
return component(\`ErrorComponent\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -600,13 +600,13 @@ exports[`can catch errors can catch an error origination from a child's willStar
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`ClassicCompoent\`, {}, key + \`__2\`, node, ctx);
|
||||
let b4 = component(\`ErrorComponent\`, {}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`ClassicCompoent\`, {}, key + \`__1\`, node, ctx);
|
||||
let b4 = component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
||||
return multi([b3, b4]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b5 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__4\`, node, ctx);
|
||||
let b5 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -711,9 +711,9 @@ exports[`can catch errors catching error, rethrow, render parent -- a main comp
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { prepareList, capture, withKey } = helpers;
|
||||
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
let Comp5 = ctx['cp'].Comp;
|
||||
return toggler(Comp5, component(Comp5, {}, key + \`__4\`, node, ctx));
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let Comp1 = ctx['cp'].Comp;
|
||||
return toggler(Comp1, component(Comp1, {}, key + \`__1\`, node, ctx));
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
@@ -723,8 +723,8 @@ exports[`can catch errors catching error, rethrow, render parent -- a main comp
|
||||
ctx[\`cp\`] = v_block1[i1];
|
||||
let key1 = ctx['cp'].id;
|
||||
const v1 = ctx['cp'];
|
||||
const ctx2 = capture(ctx);
|
||||
c_block1[i1] = withKey(component(\`ErrorHandler\`, {onError: ()=>this.cleanUp(v1.id),slots: {'default': {__render: slot3, __ctx: ctx2}}}, key + \`__6__\${key1}\`, node, ctx), key1);
|
||||
const ctx1 = capture(ctx);
|
||||
c_block1[i1] = withKey(component(\`ErrorHandler\`, {onError: ()=>this.cleanUp(v1.id),slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__2__\${key1}\`, node, ctx), key1);
|
||||
}
|
||||
return list(c_block1);
|
||||
}
|
||||
@@ -787,13 +787,13 @@ exports[`can catch errors error in mounted on a component with a sibling (proper
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {}, key + \`__3\`, node, ctx);
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`ErrorComponent\`, {}, key + \`__2\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`OK\`, {}, key + \`__1\`, node, ctx);
|
||||
let b4 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot2, __ctx: ctx}}}, key + \`__4\`, node, ctx);
|
||||
let b4 = component(\`ErrorBoundary\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
return block1([], [b2, b4]);
|
||||
}
|
||||
}"
|
||||
|
||||
@@ -10,8 +10,8 @@ exports[`event handling handler receive the event as argument 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['inc'], ctx];
|
||||
let b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
let txt2 = ctx['state'].value;
|
||||
return block1([hdlr1, txt2], [b2]);
|
||||
let txt1 = ctx['state'].value;
|
||||
return block1([hdlr1, txt1], [b2]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -64,8 +64,8 @@ exports[`event handling support for callable expression in event handler 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].value;
|
||||
let hdlr2 = [ctx['obj'].onInput, ctx];
|
||||
return block1([txt1, hdlr2]);
|
||||
let hdlr1 = [ctx['obj'].onInput, ctx];
|
||||
return block1([txt1, hdlr1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -133,8 +133,8 @@ exports[`basics sub widget is interactive 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['inc'], ctx];
|
||||
let txt2 = ctx['state'].val;
|
||||
return block1([hdlr1, txt2]);
|
||||
let txt1 = ctx['state'].val;
|
||||
return block1([hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -282,8 +282,8 @@ exports[`hooks useRef hook: basic use 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const refs = ctx.__owl__.refs;
|
||||
let d1 = (el) => refs[\`button\`] = el;
|
||||
let txt2 = ctx['value'];
|
||||
return block1([d1, txt2]);
|
||||
let txt1 = ctx['value'];
|
||||
return block1([d1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -491,8 +491,8 @@ exports[`lifecycle hooks onWillRender 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['increment'], ctx];
|
||||
let txt2 = ctx['state'].value;
|
||||
return block1([hdlr1, txt2]);
|
||||
let txt1 = ctx['state'].value;
|
||||
return block1([hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -42,7 +42,7 @@ exports[`basics arrow functions as prop correctly capture their scope 1`] = `
|
||||
let key1 = ctx['item'].val;
|
||||
const v1 = ctx['onClick'];
|
||||
const v2 = ctx['item'];
|
||||
c_block1[i1] = withKey(component(\`Child\`, {onClick: ev=>v1(v2.val,ev)}, key + \`__3__\${key1}\`, node, ctx), key1);
|
||||
c_block1[i1] = withKey(component(\`Child\`, {onClick: ev=>v1(v2.val,ev)}, key + \`__1__\${key1}\`, node, ctx), key1);
|
||||
}
|
||||
return list(c_block1);
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ exports[`default props can set default required boolean values 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -46,7 +46,7 @@ exports[`default props can set default values 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -76,7 +76,7 @@ exports[`default props default values are also set whenever component is updated
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['state'].p}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -104,7 +104,7 @@ exports[`props validation can specify that additional props are allowed (array)
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {message: 'm',otherProp: 'o'}
|
||||
helpers.validateProps(\`Child\`, props1, ctx)
|
||||
return component(\`Child\`, props1, key + \`__2\`, node, ctx);
|
||||
return component(\`Child\`, props1, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -130,7 +130,7 @@ exports[`props validation can specify that additional props are allowed (object)
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {message: 'm',otherProp: 'o'}
|
||||
helpers.validateProps(\`Child\`, props1, ctx)
|
||||
return component(\`Child\`, props1, key + \`__2\`, node, ctx);
|
||||
return component(\`Child\`, props1, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -158,7 +158,7 @@ exports[`props validation can validate a prop with multiple types 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -187,7 +187,7 @@ exports[`props validation can validate a prop with multiple types 3`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -216,7 +216,7 @@ exports[`props validation can validate a prop with multiple types 5`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -232,7 +232,7 @@ exports[`props validation can validate an array with given primitive type 1`] =
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -261,7 +261,7 @@ exports[`props validation can validate an array with given primitive type 3`] =
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -290,7 +290,7 @@ exports[`props validation can validate an array with given primitive type 5`] =
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -306,7 +306,7 @@ exports[`props validation can validate an array with given primitive type 6`] =
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -322,7 +322,7 @@ exports[`props validation can validate an array with multiple sub element types
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -351,7 +351,7 @@ exports[`props validation can validate an array with multiple sub element types
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -380,7 +380,7 @@ exports[`props validation can validate an array with multiple sub element types
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -409,7 +409,7 @@ exports[`props validation can validate an array with multiple sub element types
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -425,7 +425,7 @@ exports[`props validation can validate an object with simple shape 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -454,7 +454,7 @@ exports[`props validation can validate an object with simple shape 3`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -470,7 +470,7 @@ exports[`props validation can validate an object with simple shape 4`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -486,7 +486,7 @@ exports[`props validation can validate an object with simple shape 5`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -502,7 +502,7 @@ exports[`props validation can validate an optional props 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -531,7 +531,7 @@ exports[`props validation can validate an optional props 3`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -560,7 +560,7 @@ exports[`props validation can validate an optional props 5`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -576,7 +576,7 @@ exports[`props validation can validate recursively complicated prop def 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -605,7 +605,7 @@ exports[`props validation can validate recursively complicated prop def 3`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -634,7 +634,7 @@ exports[`props validation can validate recursively complicated prop def 5`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -650,7 +650,7 @@ exports[`props validation default values are applied before validating props at
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['state'].p}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -680,7 +680,7 @@ exports[`props validation missing required boolean prop causes an error 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -696,7 +696,7 @@ exports[`props validation mix of optional and mandatory 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {}
|
||||
helpers.validateProps(\`Child\`, props1, ctx)
|
||||
let b2 = component(\`Child\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`Child\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -712,7 +712,7 @@ exports[`props validation props are validated in dev mode (code snapshot) 1`] =
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {message: 1}
|
||||
helpers.validateProps(\`Child\`, props1, ctx)
|
||||
let b2 = component(\`Child\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`Child\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -742,7 +742,7 @@ exports[`props validation props are validated whenever component is updated 1`]
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['state'].p}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -772,7 +772,7 @@ exports[`props validation props: list of strings 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -788,7 +788,7 @@ exports[`props validation validate simple types 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -804,7 +804,7 @@ exports[`props validation validate simple types 2`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -833,7 +833,7 @@ exports[`props validation validate simple types 4`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -849,7 +849,7 @@ exports[`props validation validate simple types 5`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -865,7 +865,7 @@ exports[`props validation validate simple types 6`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -894,7 +894,7 @@ exports[`props validation validate simple types 8`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -910,7 +910,7 @@ exports[`props validation validate simple types 9`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -926,7 +926,7 @@ exports[`props validation validate simple types 10`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -955,7 +955,7 @@ exports[`props validation validate simple types 12`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -971,7 +971,7 @@ exports[`props validation validate simple types 13`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -987,7 +987,7 @@ exports[`props validation validate simple types 14`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1016,7 +1016,7 @@ exports[`props validation validate simple types 16`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1032,7 +1032,7 @@ exports[`props validation validate simple types 17`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1048,7 +1048,7 @@ exports[`props validation validate simple types 18`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1077,7 +1077,7 @@ exports[`props validation validate simple types 20`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1093,7 +1093,7 @@ exports[`props validation validate simple types 21`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1109,7 +1109,7 @@ exports[`props validation validate simple types 22`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1138,7 +1138,7 @@ exports[`props validation validate simple types 24`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1154,7 +1154,7 @@ exports[`props validation validate simple types, alternate form 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1170,7 +1170,7 @@ exports[`props validation validate simple types, alternate form 2`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1199,7 +1199,7 @@ exports[`props validation validate simple types, alternate form 4`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1215,7 +1215,7 @@ exports[`props validation validate simple types, alternate form 5`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1231,7 +1231,7 @@ exports[`props validation validate simple types, alternate form 6`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1260,7 +1260,7 @@ exports[`props validation validate simple types, alternate form 8`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1276,7 +1276,7 @@ exports[`props validation validate simple types, alternate form 9`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1292,7 +1292,7 @@ exports[`props validation validate simple types, alternate form 10`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1321,7 +1321,7 @@ exports[`props validation validate simple types, alternate form 12`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1337,7 +1337,7 @@ exports[`props validation validate simple types, alternate form 13`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1353,7 +1353,7 @@ exports[`props validation validate simple types, alternate form 14`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1382,7 +1382,7 @@ exports[`props validation validate simple types, alternate form 16`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1398,7 +1398,7 @@ exports[`props validation validate simple types, alternate form 17`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1414,7 +1414,7 @@ exports[`props validation validate simple types, alternate form 18`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1443,7 +1443,7 @@ exports[`props validation validate simple types, alternate form 20`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1459,7 +1459,7 @@ exports[`props validation validate simple types, alternate form 21`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1475,7 +1475,7 @@ exports[`props validation validate simple types, alternate form 22`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1504,7 +1504,7 @@ exports[`props validation validate simple types, alternate form 24`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {p: ctx['p']}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1520,7 +1520,7 @@ exports[`props validation validation is only done in dev mode 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const props1 = {}
|
||||
helpers.validateProps(\`SubComp\`, props1, ctx)
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__2\`, node, ctx);
|
||||
let b2 = component(\`SubComp\`, props1, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
|
||||
@@ -24,17 +24,17 @@ exports[`refs refs are properly bound in slots 1`] = `
|
||||
let block1 = createBlock(\`<div><span class=\\"counter\\"><block-text-0/></span><block-child-0/></div>\`);
|
||||
let block2 = createBlock(\`<button block-handler-0=\\"click\\" block-ref=\\"1\\">do something</button>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
const refs = ctx.__owl__.refs;
|
||||
let hdlr2 = [ctx['doSomething'], ctx];
|
||||
let d3 = (el) => refs[\`myButton\`] = el;
|
||||
return block2([hdlr2, d3]);
|
||||
let hdlr1 = [ctx['doSomething'], ctx];
|
||||
let d1 = (el) => refs[\`myButton\`] = el;
|
||||
return block2([hdlr1, d1]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].val;
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'footer': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'footer': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([txt1], [b3]);
|
||||
}
|
||||
}"
|
||||
|
||||
@@ -43,17 +43,17 @@ exports[`slots can define and call slots 1`] = `
|
||||
let block2 = createBlock(\`<span>header</span>\`);
|
||||
let block3 = createBlock(\`<span>footer</span>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return block2();
|
||||
}
|
||||
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return block3();
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b4 = component(\`Dialog\`, {slots: {'header': {__render: slot2, __ctx: ctx1}, 'footer': {__render: slot3, __ctx: ctx1}}}, key + \`__4\`, node, ctx);
|
||||
let b4 = component(\`Dialog\`, {slots: {'header': {__render: slot1, __ctx: ctx1}, 'footer': {__render: slot2, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b4]);
|
||||
}
|
||||
}"
|
||||
@@ -85,17 +85,17 @@ exports[`slots can define and call slots with params 1`] = `
|
||||
let block2 = createBlock(\`<span>header</span>\`);
|
||||
let block3 = createBlock(\`<span>footer</span>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return block2();
|
||||
}
|
||||
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return block3();
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b4 = component(\`Dialog\`, {slots: {'header': {__render: slot2, __ctx: ctx1, param: ctx['var']}, 'footer': {__render: slot3, __ctx: ctx1, param: '5'}}}, key + \`__4\`, node, ctx);
|
||||
let b4 = component(\`Dialog\`, {slots: {'header': {__render: slot1, __ctx: ctx1, param: ctx['var']}, 'footer': {__render: slot2, __ctx: ctx1, param: '5'}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b4]);
|
||||
}
|
||||
}"
|
||||
@@ -130,12 +130,12 @@ exports[`slots can render node with t-ref and Component in same slot 1`] = `
|
||||
const refs = ctx.__owl__.refs;
|
||||
let d1 = (el) => refs[\`div\`] = el;
|
||||
let b2 = block2([d1]);
|
||||
let b3 = component(\`Child\`, {}, key + \`__2\`, node, ctx);
|
||||
let b3 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -182,7 +182,7 @@ exports[`slots can use component in default-content of t-slot 2`] = `
|
||||
let { callSlot } = helpers;
|
||||
|
||||
function defaultContent1(ctx, node, key = \\"\\") {
|
||||
return component(\`GrandChild\`, {}, key + \`__2\`, node, ctx);
|
||||
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
@@ -218,10 +218,10 @@ exports[`slots can use t-call in default-content of t-slot 2`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { callSlot, getTemplate } = helpers;
|
||||
const callTemplate_3 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
function defaultContent1(ctx, node, key = \\"\\") {
|
||||
return callTemplate_3.call(this, ctx, node, key + \`__2\`);
|
||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
@@ -253,7 +253,7 @@ exports[`slots content is the default slot (variation) 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -283,7 +283,7 @@ exports[`slots content is the default slot 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -312,13 +312,13 @@ exports[`slots default content is not rendered if named slot is provided 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return text(\`hey\`);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'header': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'header': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -355,7 +355,7 @@ exports[`slots default content is not rendered if slot is provided 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -388,13 +388,13 @@ exports[`slots default slot next to named slot, with default content 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return text(\` Overridden footer \`);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'footer': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'footer': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -434,7 +434,7 @@ exports[`slots default slot work with text nodes (variation) 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -463,7 +463,7 @@ exports[`slots default slot work with text nodes 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -495,19 +495,19 @@ exports[`slots dynamic t-slot call 1`] = `
|
||||
let block4 = createBlock(\`<span>content</span>\`);
|
||||
let block5 = createBlock(\`<h1>slot2</h1>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = block3();
|
||||
let b4 = block4();
|
||||
return multi([b3, b4]);
|
||||
}
|
||||
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return block5();
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b6 = component(\`Toggler\`, {slots: {'slot1': {__render: slot2, __ctx: ctx1}, 'slot2': {__render: slot3, __ctx: ctx1}}}, key + \`__4\`, node, ctx);
|
||||
let b6 = component(\`Toggler\`, {slots: {'slot1': {__render: slot1, __ctx: ctx1}, 'slot2': {__render: slot2, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b6]);
|
||||
}
|
||||
}"
|
||||
@@ -541,19 +541,19 @@ exports[`slots dynamic t-slot call with default 1`] = `
|
||||
let block4 = createBlock(\`<span>content</span>\`);
|
||||
let block5 = createBlock(\`<h1>slot2</h1>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = block3();
|
||||
let b4 = block4();
|
||||
return multi([b3, b4]);
|
||||
}
|
||||
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return block5();
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b6 = component(\`Toggler\`, {slots: {'slot1': {__render: slot2, __ctx: ctx1}, 'slot2': {__render: slot3, __ctx: ctx1}}}, key + \`__4\`, node, ctx);
|
||||
let b6 = component(\`Toggler\`, {slots: {'slot1': {__render: slot1, __ctx: ctx1}, 'slot2': {__render: slot2, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b6]);
|
||||
}
|
||||
}"
|
||||
@@ -589,7 +589,7 @@ exports[`slots fun: two calls to the same slot 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -654,7 +654,7 @@ exports[`slots multiple roots are allowed in a default slot 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b5 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
let b5 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -685,7 +685,7 @@ exports[`slots multiple roots are allowed in a named slot 1`] = `
|
||||
let block3 = createBlock(\`<span>sts</span>\`);
|
||||
let block4 = createBlock(\`<span>rocks</span>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = block3();
|
||||
let b4 = block4();
|
||||
return multi([b3, b4]);
|
||||
@@ -693,7 +693,7 @@ exports[`slots multiple roots are allowed in a named slot 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Dialog\`, {slots: {'content': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b5 = component(\`Dialog\`, {slots: {'content': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -720,17 +720,17 @@ exports[`slots multiple slots containing components 1`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { capture } = helpers;
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return component(\`C\`, {val: 1}, key + \`__3\`, node, ctx);
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`C\`, {val: 1}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
function slot4(ctx, node, key = \\"\\") {
|
||||
return component(\`C\`, {val: 2}, key + \`__5\`, node, ctx);
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return component(\`C\`, {val: 2}, key + \`__2\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
return component(\`B\`, {slots: {'s1': {__render: slot2, __ctx: ctx1}, 's2': {__render: slot4, __ctx: ctx1}}}, key + \`__6\`, node, ctx);
|
||||
return component(\`B\`, {slots: {'s1': {__render: slot1, __ctx: ctx1}, 's2': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -775,24 +775,24 @@ exports[`slots named slot inside slot 1`] = `
|
||||
let block2 = createBlock(\`<p>A<block-text-0/></p>\`);
|
||||
let block3 = createBlock(\`<p>B<block-text-0/></p>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['value'];
|
||||
return block2([txt1]);
|
||||
}
|
||||
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
const ctx4 = capture(ctx);
|
||||
return component(\`Child\`, {slots: {'brol': {__render: slot5, __ctx: ctx4}}}, key + \`__6\`, node, ctx);
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
const ctx2 = capture(ctx);
|
||||
return component(\`Child\`, {slots: {'brol': {__render: slot3, __ctx: ctx2}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
function slot5(ctx, node, key = \\"\\") {
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
let txt2 = ctx['value'];
|
||||
return block3([txt2]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Child\`, {slots: {'brol': {__render: slot2, __ctx: ctx1}, 'default': {__render: slot3, __ctx: ctx1}}}, key + \`__7\`, node, ctx);
|
||||
let b5 = component(\`Child\`, {slots: {'brol': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -824,24 +824,24 @@ exports[`slots named slot inside slot, part 3 1`] = `
|
||||
let block2 = createBlock(\`<p>A<block-text-0/></p>\`);
|
||||
let block3 = createBlock(\`<p>B<block-text-0/></p>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['value'];
|
||||
return block2([txt1]);
|
||||
}
|
||||
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
const ctx4 = capture(ctx);
|
||||
return component(\`Child\`, {slots: {'brol': {__render: slot5, __ctx: ctx4}}}, key + \`__6\`, node, ctx);
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
const ctx2 = capture(ctx);
|
||||
return component(\`Child\`, {slots: {'brol': {__render: slot3, __ctx: ctx2}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
function slot5(ctx, node, key = \\"\\") {
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
let txt2 = ctx['value'];
|
||||
return block3([txt2]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Child\`, {slots: {'brol': {__render: slot2, __ctx: ctx1}, 'default': {__render: slot3, __ctx: ctx1}}}, key + \`__7\`, node, ctx);
|
||||
let b5 = component(\`Child\`, {slots: {'brol': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -906,24 +906,24 @@ exports[`slots named slots inside slot, again 1`] = `
|
||||
let block2 = createBlock(\`<p>A<block-text-0/></p>\`);
|
||||
let block3 = createBlock(\`<p>B<block-text-0/></p>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['value'];
|
||||
return block2([txt1]);
|
||||
}
|
||||
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
const ctx4 = capture(ctx);
|
||||
return component(\`Child\`, {slots: {'brol2': {__render: slot5, __ctx: ctx4}}}, key + \`__6\`, node, ctx);
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
const ctx2 = capture(ctx);
|
||||
return component(\`Child\`, {slots: {'brol2': {__render: slot3, __ctx: ctx2}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
function slot5(ctx, node, key = \\"\\") {
|
||||
function slot3(ctx, node, key = \\"\\") {
|
||||
let txt2 = ctx['value'];
|
||||
return block3([txt2]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Child\`, {slots: {'brol1': {__render: slot2, __ctx: ctx1}, 'default': {__render: slot3, __ctx: ctx1}}}, key + \`__7\`, node, ctx);
|
||||
let b5 = component(\`Child\`, {slots: {'brol1': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -962,15 +962,15 @@ exports[`slots nested slots in same template 1`] = `
|
||||
let block1 = createBlock(\`<span id=\\"parent\\"><block-child-0/></span>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`Child2\`, {slots: {'default': {__render: slot2, __ctx: ctx}}}, key + \`__4\`, node, ctx);
|
||||
return component(\`Child2\`, {slots: {'default': {__render: slot2, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
}
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return component(\`Child3\`, {}, key + \`__3\`, node, ctx);
|
||||
return component(\`Child3\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b4 = component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__5\`, node, ctx);
|
||||
let b4 = component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
return block1([], [b4]);
|
||||
}
|
||||
}"
|
||||
@@ -1025,11 +1025,11 @@ exports[`slots nested slots: evaluation context and parented relationship 1`] =
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`Slot\`, {val: ctx['state'].val}, key + \`__2\`, node, ctx);
|
||||
return component(\`Slot\`, {val: ctx['state'].val}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1045,7 +1045,7 @@ exports[`slots nested slots: evaluation context and parented relationship 2`] =
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`GrandChild\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`GrandChild\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1115,7 +1115,7 @@ exports[`slots simple default slot 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1141,7 +1141,7 @@ exports[`slots simple default slot with params 1`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { capture } = helpers;
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b2,b3;
|
||||
if (ctx['slotScope'].bool) {
|
||||
b2 = text(\`some text\`);
|
||||
@@ -1153,7 +1153,7 @@ exports[`slots simple default slot with params 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot2, __ctx: ctx1, __scope: \\"slotScope\\"}}}, key + \`__3\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx1, __scope: \\"slotScope\\"}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1189,7 +1189,7 @@ exports[`slots simple default slot with params 3`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1219,7 +1219,7 @@ exports[`slots simple default slot, variation 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1241,17 +1241,17 @@ exports[`slots slot and (inline) t-call 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { capture, getTemplate } = helpers;
|
||||
const callTemplate_4 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return callTemplate_4.call(this, ctx, node, key + \`__3\`);
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__5\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1290,17 +1290,17 @@ exports[`slots slot and t-call 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { capture, getTemplate } = helpers;
|
||||
const callTemplate_4 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return callTemplate_4.call(this, ctx, node, key + \`__3\`);
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__5\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1346,7 +1346,7 @@ exports[`slots slot and t-esc 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1375,14 +1375,14 @@ exports[`slots slot are properly rendered if inner props are changed 1`] = `
|
||||
let block1 = createBlock(\`<div><button block-handler-0=\\"click\\">Inc[<block-text-1/>]</button><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`SomeComponent\`, {val: ctx['state'].val}, key + \`__2\`, node, ctx);
|
||||
return component(\`SomeComponent\`, {val: ctx['state'].val}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['inc'], ctx];
|
||||
let txt2 = ctx['state'].val;
|
||||
let b3 = component(\`GenericComponent\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
return block1([hdlr1, txt2], [b3]);
|
||||
let txt1 = ctx['state'].val;
|
||||
let b3 = component(\`GenericComponent\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([hdlr1, txt1], [b3]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1424,7 +1424,7 @@ exports[`slots slot content is bound to caller (variation) 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">some text</button>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1
|
||||
setContextValue(ctx, \\"var\\", 1);
|
||||
@@ -1434,7 +1434,7 @@ exports[`slots slot content is bound to caller (variation) 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1467,7 +1467,7 @@ exports[`slots slot content is bound to caller 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1495,11 +1495,11 @@ exports[`slots slot preserves properly parented relationship 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`GrandChild\`, {}, key + \`__2\`, node, ctx);
|
||||
return component(\`GrandChild\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1533,17 +1533,17 @@ exports[`slots slot preserves properly parented relationship, even through t-cal
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { capture, getTemplate } = helpers;
|
||||
const callTemplate_4 = getTemplate(\`sub\`);
|
||||
const callTemplate_1 = getTemplate(\`sub\`);
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
return callTemplate_4.call(this, ctx, node, key + \`__3\`);
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Child\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__5\`, node, ctx);
|
||||
let b3 = component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1593,7 +1593,7 @@ exports[`slots slots and wrapper components 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Link\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Link\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -1637,8 +1637,8 @@ exports[`slots slots are properly bound to correct component 2`] = `
|
||||
ctx[isBoundary] = 1
|
||||
setContextValue(ctx, \\"var\\", 1);
|
||||
let hdlr1 = [()=>this.increment(), ctx];
|
||||
let txt2 = ctx['state'].value;
|
||||
return block1([hdlr1, txt2]);
|
||||
let txt1 = ctx['state'].value;
|
||||
return block1([hdlr1, txt1]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
@@ -1656,15 +1656,15 @@ exports[`slots slots are rendered with proper context 1`] = `
|
||||
let block1 = createBlock(\`<div><span class=\\"counter\\"><block-text-0/></span><block-child-0/></div>\`);
|
||||
let block2 = createBlock(\`<button block-handler-0=\\"click\\">do something</button>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
let hdlr2 = [ctx['doSomething'], ctx];
|
||||
return block2([hdlr2]);
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['doSomething'], ctx];
|
||||
return block2([hdlr1]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].val;
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'footer': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'footer': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([txt1], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1694,7 +1694,7 @@ exports[`slots slots are rendered with proper context, part 2 1`] = `
|
||||
let block1 = createBlock(\`<div><u><block-child-0/></u></div>\`);
|
||||
let block3 = createBlock(\`<li><block-child-0/></li>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b5 = text(\`User \`);
|
||||
let b6 = text(ctx['user'].name);
|
||||
return multi([b5, b6]);
|
||||
@@ -1707,7 +1707,7 @@ exports[`slots slots are rendered with proper context, part 2 1`] = `
|
||||
ctx[\`user\`] = v_block2[i1];
|
||||
let key1 = ctx['user'].id;
|
||||
const ctx1 = capture(ctx);
|
||||
let b7 = component(\`Link\`, {to: '/user/'+ctx['user'].id,slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3__\${key1}\`, node, ctx);
|
||||
let b7 = component(\`Link\`, {to: '/user/'+ctx['user'].id,slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1__\${key1}\`, node, ctx);
|
||||
c_block2[i1] = withKey(block3([], [b7]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
@@ -1741,7 +1741,7 @@ exports[`slots slots are rendered with proper context, part 3 1`] = `
|
||||
let block1 = createBlock(\`<div><u><block-child-0/></u></div>\`);
|
||||
let block3 = createBlock(\`<li><block-child-0/></li>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return text(ctx['userdescr']);
|
||||
}
|
||||
|
||||
@@ -1755,7 +1755,7 @@ exports[`slots slots are rendered with proper context, part 3 1`] = `
|
||||
let key1 = ctx['user'].id;
|
||||
setContextValue(ctx, \\"userdescr\\", 'User '+ctx['user'].name);
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Link\`, {to: '/user/'+ctx['user'].id,slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3__\${key1}\`, node, ctx);
|
||||
let b5 = component(\`Link\`, {to: '/user/'+ctx['user'].id,slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1__\${key1}\`, node, ctx);
|
||||
c_block2[i1] = withKey(block3([], [b5]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
@@ -1788,7 +1788,7 @@ exports[`slots slots are rendered with proper context, part 4 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return text(ctx['userdescr']);
|
||||
}
|
||||
|
||||
@@ -1797,7 +1797,7 @@ exports[`slots slots are rendered with proper context, part 4 1`] = `
|
||||
ctx[isBoundary] = 1
|
||||
setContextValue(ctx, \\"userdescr\\", 'User '+ctx['state'].user.name);
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Link\`, {to: '/user/'+ctx['state'].user.id,slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Link\`, {to: '/user/'+ctx['state'].user.id,slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1828,7 +1828,7 @@ exports[`slots slots in slots, with vars 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
let block2 = createBlock(\`<p>hey<block-text-0/></p>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['test'];
|
||||
return block2([txt1]);
|
||||
}
|
||||
@@ -1838,7 +1838,7 @@ exports[`slots slots in slots, with vars 1`] = `
|
||||
ctx[isBoundary] = 1
|
||||
setContextValue(ctx, \\"test\\", ctx['state'].name);
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`A\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`A\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1857,7 +1857,7 @@ exports[`slots slots in slots, with vars 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`B\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
let b3 = component(\`B\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1886,7 +1886,7 @@ exports[`slots slots in t-foreach and re-rendering 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return text(ctx['n_index']);
|
||||
}
|
||||
|
||||
@@ -1898,7 +1898,7 @@ exports[`slots slots in t-foreach and re-rendering 1`] = `
|
||||
ctx[\`n_index\`] = i1;
|
||||
let key1 = ctx['n_index'];
|
||||
const ctx1 = capture(ctx);
|
||||
c_block2[i1] = withKey(component(\`Child\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3__\${key1}\`, node, ctx), key1);
|
||||
c_block2[i1] = withKey(component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1__\${key1}\`, node, ctx), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -1933,7 +1933,7 @@ exports[`slots slots in t-foreach in t-foreach 1`] = `
|
||||
let block5 = createBlock(\`<ul><block-child-0/></ul>\`);
|
||||
let block7 = createBlock(\`<li><block-text-0/></li>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let txt2 = ctx['node1'].value;
|
||||
return block7([txt2]);
|
||||
}
|
||||
@@ -1952,7 +1952,7 @@ exports[`slots slots in t-foreach in t-foreach 1`] = `
|
||||
ctx[\`node2\`] = v_block6[i2];
|
||||
let key2 = ctx['node2'].key;
|
||||
const ctx1 = capture(ctx);
|
||||
c_block6[i2] = withKey(component(\`Child\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3__\${key1}__\${key2}\`, node, ctx), key2);
|
||||
c_block6[i2] = withKey(component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1__\${key1}__\${key2}\`, node, ctx), key2);
|
||||
}
|
||||
ctx = ctx.__proto__;
|
||||
let b6 = list(c_block6);
|
||||
@@ -1988,7 +1988,7 @@ exports[`slots slots in t-foreach with t-set and re-rendering 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return text(ctx['dummy']);
|
||||
}
|
||||
|
||||
@@ -2003,7 +2003,7 @@ exports[`slots slots in t-foreach with t-set and re-rendering 1`] = `
|
||||
let key1 = ctx['n_index'];
|
||||
setContextValue(ctx, \\"dummy\\", ctx['n_index']);
|
||||
const ctx1 = capture(ctx);
|
||||
c_block2[i1] = withKey(component(\`Child\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3__\${key1}\`, node, ctx), key1);
|
||||
c_block2[i1] = withKey(component(\`Child\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1__\${key1}\`, node, ctx), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -2035,14 +2035,14 @@ exports[`slots t-debug on a t-set-slot (defining a slot) 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
debugger;
|
||||
return text(\`abc\`);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'content': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'content': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2071,7 +2071,7 @@ exports[`slots t-set t-value in a slot 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1
|
||||
setContextValue(ctx, \\"rainbow\\", 'dash');
|
||||
@@ -2080,7 +2080,7 @@ exports[`slots t-set t-value in a slot 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2106,9 +2106,9 @@ exports[`slots t-slot in recursive templates 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { capture, prepareList, isBoundary, withDefault, setContextValue, getTemplate, withKey } = helpers;
|
||||
const callTemplate_4 = getTemplate(\`_test_recursive_template\`);
|
||||
const callTemplate_1 = getTemplate(\`_test_recursive_template\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1
|
||||
let b2 = text(ctx['name']);
|
||||
@@ -2129,7 +2129,7 @@ exports[`slots t-slot in recursive templates 1`] = `
|
||||
ctx[isBoundary] = 1;
|
||||
setContextValue(ctx, \\"name\\", ctx['item'].name);
|
||||
setContextValue(ctx, \\"items\\", ctx['item'].children);
|
||||
b6 = callTemplate_4.call(this, ctx, node, key + \`__3__\${key1}\`);
|
||||
b6 = callTemplate_1.call(this, ctx, node, key + \`__1__\${key1}\`);
|
||||
ctx = ctx.__proto__;
|
||||
}
|
||||
c_block3[i1] = withKey(multi([b5, b6]), key1);
|
||||
@@ -2141,7 +2141,7 @@ exports[`slots t-slot in recursive templates 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
return component(\`Wrapper\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__5\`, node, ctx);
|
||||
return component(\`Wrapper\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__2\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -2169,11 +2169,11 @@ exports[`slots t-slot nested within another slot 1`] = `
|
||||
let block1 = createBlock(\`<span id=\\"c1\\"><block-child-0/></span>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`Child3\`, {}, key + \`__2\`, node, ctx);
|
||||
return component(\`Child3\`, {}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2188,7 +2188,7 @@ exports[`slots t-slot nested within another slot 2`] = `
|
||||
let block1 = createBlock(\`<span id=\\"c2\\"><block-child-0/></span>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`Portal\`, {slots: {'default': {__render: slot2, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
return component(\`Portal\`, {slots: {'default': {__render: slot2, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
@@ -2196,7 +2196,7 @@ exports[`slots t-slot nested within another slot 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b4 = component(\`Modal\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__4\`, node, ctx);
|
||||
let b4 = component(\`Modal\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b4]);
|
||||
}
|
||||
}"
|
||||
@@ -2257,7 +2257,7 @@ exports[`slots t-slot scope context 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Dialog\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -2277,7 +2277,7 @@ exports[`slots t-slot scope context 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return component(\`Wrapper\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return component(\`Wrapper\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -2302,14 +2302,14 @@ exports[`slots t-slot within dynamic t-call 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
const template4 = (ctx['tcallTemplate']);
|
||||
return call(this, template4, ctx, node, key + \`__3\`);
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
const template1 = (ctx['tcallTemplate']);
|
||||
return call(this, template1, ctx, node, key + \`__1\`);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Slotted\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__5\`, node, ctx);
|
||||
let b3 = component(\`Slotted\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2365,11 +2365,11 @@ exports[`slots template can just return a slot 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
return component(\`Child\`, {value: ctx['state'].value}, key + \`__2\`, node, ctx);
|
||||
return component(\`Child\`, {value: ctx['state'].value}, key + \`__1\`, node, ctx);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`SlotComponent\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__3\`, node, ctx);
|
||||
let b3 = component(\`SlotComponent\`, {slots: {'default': {__render: slot1, __ctx: ctx}}}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
|
||||
@@ -350,8 +350,8 @@ exports[`style and class handling error in subcomponent with class 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let attr1 = ctx['props'].class;
|
||||
let txt2 = this.will.crash;
|
||||
return block1([attr1, txt2]);
|
||||
let txt1 = this.will.crash;
|
||||
return block1([attr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -11,8 +11,8 @@ exports[`t-call dynamic t-call 1`] = `
|
||||
ctx[isBoundary] = 1;
|
||||
let b1 = text(\` owl \`);
|
||||
ctx[zero] = b1;
|
||||
const template2 = (ctx['current'].template);
|
||||
return call(this, template2, ctx, node, key + \`__1\`);
|
||||
const template1 = (ctx['current'].template);
|
||||
return call(this, template1, ctx, node, key + \`__1\`);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -50,8 +50,8 @@ exports[`t-call handlers are properly bound through a dynamic t-call 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const template2 = ('__template__999');
|
||||
let b2 = call(this, template2, ctx, node, key + \`__1\`);
|
||||
const template1 = ('__template__999');
|
||||
let b2 = call(this, template1, ctx, node, key + \`__1\`);
|
||||
let txt1 = ctx['counter'];
|
||||
return block1([txt1], [b2]);
|
||||
}
|
||||
@@ -77,12 +77,12 @@ exports[`t-call handlers are properly bound through a t-call 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { getTemplate } = helpers;
|
||||
const callTemplate_2 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callTemplate_2.call(this, ctx, node, key + \`__1\`);
|
||||
let b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
let txt1 = ctx['counter'];
|
||||
return block1([txt1], [b2]);
|
||||
}
|
||||
@@ -108,12 +108,12 @@ exports[`t-call handlers with arguments are properly bound through a t-call 1`]
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { getTemplate } = helpers;
|
||||
const callTemplate_2 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callTemplate_2.call(this, ctx, node, key + \`__1\`);
|
||||
let b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -139,12 +139,12 @@ exports[`t-call parent is set within t-call 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { getTemplate } = helpers;
|
||||
const callTemplate_2 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callTemplate_2.call(this, ctx, node, key + \`__1\`);
|
||||
let b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -179,10 +179,10 @@ exports[`t-call parent is set within t-call with no parentNode 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { getTemplate } = helpers;
|
||||
const callTemplate_2 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
return callTemplate_2.call(this, ctx, node, key + \`__1\`);
|
||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -216,17 +216,17 @@ exports[`t-call sub components in two t-calls 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { getTemplate } = helpers;
|
||||
const callTemplate_1 = getTemplate(\`sub\`);
|
||||
const callTemplate_2 = getTemplate(\`sub\`);
|
||||
const callTemplate_4 = getTemplate(\`sub\`);
|
||||
|
||||
let block3 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2,b3;
|
||||
if (ctx['state'].val===1) {
|
||||
b2 = callTemplate_2.call(this, ctx, node, key + \`__1\`);
|
||||
b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
} else {
|
||||
let b4 = callTemplate_4.call(this, ctx, node, key + \`__3\`);
|
||||
let b4 = callTemplate_2.call(this, ctx, node, key + \`__2\`);
|
||||
b3 = block3([], [b4]);
|
||||
}
|
||||
return multi([b2, b3]);
|
||||
@@ -264,7 +264,7 @@ exports[`t-call t-call in t-foreach and children component 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { prepareList, getTemplate, withKey } = helpers;
|
||||
const callTemplate_2 = getTemplate(\`__template__999\`);
|
||||
const callTemplate_1 = getTemplate(\`__template__999\`);
|
||||
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
@@ -278,7 +278,7 @@ exports[`t-call t-call in t-foreach and children component 1`] = `
|
||||
ctx[\`val_index\`] = i1;
|
||||
ctx[\`val_value\`] = k_block2[i1];
|
||||
let key1 = ctx['val'];
|
||||
c_block2[i1] = withKey(callTemplate_2.call(this, ctx, node, key + \`__1__\${key1}\`), key1);
|
||||
c_block2[i1] = withKey(callTemplate_1.call(this, ctx, node, key + \`__1__\${key1}\`), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
|
||||
@@ -8,8 +8,8 @@ exports[`t-component can switch between dynamic components without the need for
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let Comp2 = ctx['constructor'].components[ctx['state'].child];
|
||||
let b2 = toggler(Comp2, component(Comp2, {}, key + \`__1\`, node, ctx));
|
||||
let Comp1 = ctx['constructor'].components[ctx['state'].child];
|
||||
let b2 = toggler(Comp1, component(Comp1, {}, key + \`__1\`, node, ctx));
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -48,8 +48,8 @@ exports[`t-component can use dynamic components (the class) if given (with diffe
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['state'].child;
|
||||
let Comp3 = ctx['myComponent'];
|
||||
return toggler(tKey_1, toggler(Comp3, component(Comp3, {}, tKey_1 + key + \`__2\`, node, ctx)));
|
||||
let Comp1 = ctx['myComponent'];
|
||||
return toggler(tKey_1, toggler(Comp1, component(Comp1, {}, tKey_1 + key + \`__1\`, node, ctx)));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -87,8 +87,8 @@ exports[`t-component can use dynamic components (the class) if given 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['state'].child;
|
||||
let Comp3 = ctx['myComponent'];
|
||||
return toggler(tKey_1, toggler(Comp3, component(Comp3, {}, tKey_1 + key + \`__2\`, node, ctx)));
|
||||
let Comp1 = ctx['myComponent'];
|
||||
return toggler(tKey_1, toggler(Comp1, component(Comp1, {}, tKey_1 + key + \`__1\`, node, ctx)));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -127,8 +127,8 @@ exports[`t-component modifying a sub widget 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let Comp2 = ctx['Counter'];
|
||||
let b2 = toggler(Comp2, component(Comp2, {}, key + \`__1\`, node, ctx));
|
||||
let Comp1 = ctx['Counter'];
|
||||
let b2 = toggler(Comp1, component(Comp1, {}, key + \`__1\`, node, ctx));
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -144,8 +144,8 @@ exports[`t-component modifying a sub widget 2`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].counter;
|
||||
const v1 = ctx['state'];
|
||||
let hdlr2 = [()=>v1.counter++, ctx];
|
||||
return block1([txt1, hdlr2]);
|
||||
let hdlr1 = [()=>v1.counter++, ctx];
|
||||
return block1([txt1, hdlr1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -156,8 +156,8 @@ exports[`t-component switching dynamic component 1`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let Comp2 = ctx['Child'];
|
||||
return toggler(Comp2, component(Comp2, {}, key + \`__1\`, node, ctx));
|
||||
let Comp1 = ctx['Child'];
|
||||
return toggler(Comp1, component(Comp1, {}, key + \`__1\`, node, ctx));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -192,8 +192,8 @@ exports[`t-component t-component works in simple case 1`] = `
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let Comp2 = ctx['Child'];
|
||||
return toggler(Comp2, component(Comp2, {}, key + \`__1\`, node, ctx));
|
||||
let Comp1 = ctx['Child'];
|
||||
return toggler(Comp1, component(Comp1, {}, key + \`__1\`, node, ctx));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
|
||||
@@ -55,7 +55,7 @@ exports[`list of components crash on duplicate key in dev mode 1`] = `
|
||||
keys1.add(key1);
|
||||
const props1 = {}
|
||||
helpers.validateProps(\`Child\`, props1, ctx)
|
||||
c_block1[i1] = withKey(component(\`Child\`, props1, key + \`__2__\${key1}\`, node, ctx), key1);
|
||||
c_block1[i1] = withKey(component(\`Child\`, props1, key + \`__1__\${key1}\`, node, ctx), key1);
|
||||
}
|
||||
return list(c_block1);
|
||||
}
|
||||
|
||||
@@ -15,7 +15,7 @@ exports[`t-key t-foreach with t-key switch component position 1`] = `
|
||||
ctx[\`c\`] = v_block2[i1];
|
||||
let key1 = ctx['c'];
|
||||
const tKey_1 = ctx['key1'];
|
||||
c_block2[i1] = withKey(component(\`Child\`, {key: ctx['c']+ctx['key1']}, tKey_1 + key + \`__2__\${key1}\`, node, ctx), tKey_1 + key1);
|
||||
c_block2[i1] = withKey(component(\`Child\`, {key: ctx['c']+ctx['key1']}, tKey_1 + key + \`__1__\${key1}\`, node, ctx), tKey_1 + key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -44,7 +44,7 @@ exports[`t-key t-key on Component 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['key'];
|
||||
return toggler(tKey_1, component(\`Child\`, {key: ctx['key']}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
return toggler(tKey_1, component(\`Child\`, {key: ctx['key']}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -72,7 +72,7 @@ exports[`t-key t-key on Component as a function 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['key'];
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, {key: ctx['key']}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, {key: ctx['key']}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -101,9 +101,9 @@ exports[`t-key t-key on multiple Components 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['key1'];
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, {key: ctx['key1']}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
const tKey_3 = ctx['key2'];
|
||||
let b3 = toggler(tKey_3, component(\`Child\`, {key: ctx['key2']}, tKey_3 + key + \`__4\`, node, ctx));
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, {key: ctx['key1']}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
const tKey_2 = ctx['key2'];
|
||||
let b3 = toggler(tKey_2, component(\`Child\`, {key: ctx['key2']}, tKey_2 + key + \`__2\`, node, ctx));
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -128,8 +128,8 @@ exports[`t-key t-key on multiple Components with t-call 1 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { isBoundary, withDefault, setContextValue, getTemplate } = helpers;
|
||||
const callTemplate_1 = getTemplate(\`calledTemplate\`);
|
||||
const callTemplate_2 = getTemplate(\`calledTemplate\`);
|
||||
const callTemplate_4 = getTemplate(\`calledTemplate\`);
|
||||
|
||||
let block1 = createBlock(\`<span><block-child-0/><block-child-1/></span>\`);
|
||||
|
||||
@@ -139,12 +139,12 @@ exports[`t-key t-key on multiple Components with t-call 1 1`] = `
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1;
|
||||
setContextValue(ctx, \\"key\\", ctx['key1']);
|
||||
let b2 = callTemplate_2.call(this, ctx, node, key + \`__1\`);
|
||||
let b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
ctx = ctx.__proto__;
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1;
|
||||
setContextValue(ctx, \\"key\\", ctx['key2']);
|
||||
let b3 = callTemplate_4.call(this, ctx, node, key + \`__3\`);
|
||||
let b3 = callTemplate_2.call(this, ctx, node, key + \`__2\`);
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -157,7 +157,7 @@ exports[`t-key t-key on multiple Components with t-call 1 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['key'];
|
||||
return toggler(tKey_1, component(\`Child\`, {key: ctx['key']}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
return toggler(tKey_1, component(\`Child\`, {key: ctx['key']}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -181,12 +181,12 @@ exports[`t-key t-key on multiple Components with t-call 2 1`] = `
|
||||
) {
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
let { getTemplate } = helpers;
|
||||
const callTemplate_2 = getTemplate(\`calledTemplate\`);
|
||||
const callTemplate_1 = getTemplate(\`calledTemplate\`);
|
||||
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callTemplate_2.call(this, ctx, node, key + \`__1\`);
|
||||
let b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -199,9 +199,9 @@ exports[`t-key t-key on multiple Components with t-call 2 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const tKey_1 = ctx['key1'];
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, {key: ctx['key1']}, tKey_1 + key + \`__2\`, node, ctx));
|
||||
const tKey_3 = ctx['key2'];
|
||||
let b3 = toggler(tKey_3, component(\`Child\`, {key: ctx['key2']}, tKey_3 + key + \`__4\`, node, ctx));
|
||||
let b2 = toggler(tKey_1, component(\`Child\`, {key: ctx['key1']}, tKey_1 + key + \`__1\`, node, ctx));
|
||||
const tKey_2 = ctx['key2'];
|
||||
let b3 = toggler(tKey_2, component(\`Child\`, {key: ctx['key2']}, tKey_2 + key + \`__2\`, node, ctx));
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
|
||||
@@ -11,9 +11,9 @@ exports[`t-model directive .lazy modifier 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt3 = ctx['state'].text;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt1 = ctx['state'].text;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -29,9 +29,9 @@ exports[`t-model directive .number modifier 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['number'];
|
||||
let hdlr2 = [(ev) => { bExpr1['number'] = toNumber(ev.target.value); }];
|
||||
let txt3 = ctx['state'].number;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['number'] = toNumber(ev.target.value); }];
|
||||
let txt1 = ctx['state'].number;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -47,9 +47,9 @@ exports[`t-model directive .trim modifier 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value.trim(); }];
|
||||
let txt3 = ctx['state'].text;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text'] = ev.target.value.trim(); }];
|
||||
let txt1 = ctx['state'].text;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -65,9 +65,9 @@ exports[`t-model directive basic use, on an input 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt3 = ctx['state'].text;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt1 = ctx['state'].text;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -83,9 +83,9 @@ exports[`t-model directive basic use, on an input with bracket expression 1`] =
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt3 = ctx['state'].text;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt1 = ctx['state'].text;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -101,9 +101,9 @@ exports[`t-model directive basic use, on another key in component 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['some'];
|
||||
let attr1 = ctx['some']['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt3 = ctx['some'].text;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt1 = ctx['some'].text;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -119,9 +119,9 @@ exports[`t-model directive can also define t-on directive on same event, part 1
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['onInput'], ctx];
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr2 = ctx['state']['text'];
|
||||
let hdlr3 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
return block1([hdlr1, attr2, hdlr3]);
|
||||
let attr1 = ctx['state']['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
return block1([hdlr1, attr1, hdlr2]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -137,17 +137,17 @@ exports[`t-model directive can also define t-on directive on same event, part 2
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['onClick'], ctx];
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr2 = ctx['state']['choice'] === 'One';
|
||||
let hdlr3 = [(ev) => { bExpr1['choice'] = ev.target.value; }];
|
||||
let hdlr4 = [ctx['onClick'], ctx];
|
||||
let attr1 = ctx['state']['choice'] === 'One';
|
||||
let hdlr2 = [(ev) => { bExpr1['choice'] = ev.target.value; }];
|
||||
let hdlr3 = [ctx['onClick'], ctx];
|
||||
const bExpr2 = ctx['state'];
|
||||
let attr5 = ctx['state']['choice'] === 'Two';
|
||||
let hdlr6 = [(ev) => { bExpr2['choice'] = ev.target.value; }];
|
||||
let hdlr7 = [ctx['onClick'], ctx];
|
||||
let attr2 = ctx['state']['choice'] === 'Two';
|
||||
let hdlr4 = [(ev) => { bExpr2['choice'] = ev.target.value; }];
|
||||
let hdlr5 = [ctx['onClick'], ctx];
|
||||
const bExpr3 = ctx['state'];
|
||||
let attr8 = ctx['state']['choice'] === 'Three';
|
||||
let hdlr9 = [(ev) => { bExpr3['choice'] = ev.target.value; }];
|
||||
return block1([hdlr1, attr2, hdlr3, hdlr4, attr5, hdlr6, hdlr7, attr8, hdlr9]);
|
||||
let attr3 = ctx['state']['choice'] === 'Three';
|
||||
let hdlr6 = [(ev) => { bExpr3['choice'] = ev.target.value; }];
|
||||
return block1([hdlr1, attr1, hdlr2, hdlr3, attr2, hdlr4, hdlr5, attr3, hdlr6]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -166,8 +166,8 @@ exports[`t-model directive following a scope protecting directive (e.g. t-set) 1
|
||||
setContextValue(ctx, \\"admiral\\", 'Bruno');
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
return block1([attr1, hdlr2]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
return block1([attr1, hdlr1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -189,8 +189,8 @@ exports[`t-model directive in a t-foreach 1`] = `
|
||||
let key1 = ctx['thing'].id;
|
||||
const bExpr1 = ctx['thing'];
|
||||
let attr1 = ctx['thing']['f'];
|
||||
let hdlr2 = [(ev) => { bExpr1['f'] = ev.target.checked; }];
|
||||
c_block2[i1] = withKey(block3([attr1, hdlr2]), key1);
|
||||
let hdlr1 = [(ev) => { bExpr1['f'] = ev.target.checked; }];
|
||||
c_block2[i1] = withKey(block3([attr1, hdlr1]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -216,8 +216,8 @@ exports[`t-model directive in a t-foreach, part 2 1`] = `
|
||||
let key1 = ctx['thing_index'];
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state'][ctx['thing_index']];
|
||||
let hdlr2 = [(ev) => { bExpr1[ctx['thing_index']] = ev.target.value; }];
|
||||
c_block2[i1] = withKey(block3([attr1, hdlr2]), key1);
|
||||
let hdlr1 = [(ev) => { bExpr1[ctx['thing_index']] = ev.target.value; }];
|
||||
c_block2[i1] = withKey(block3([attr1, hdlr1]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -236,9 +236,9 @@ exports[`t-model directive on a select 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['color'];
|
||||
let hdlr2 = [(ev) => { bExpr1['color'] = ev.target.value; }];
|
||||
let txt3 = ctx['state'].color;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['color'] = ev.target.value; }];
|
||||
let txt1 = ctx['state'].color;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -254,8 +254,8 @@ exports[`t-model directive on a select, initial state 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['color'];
|
||||
let hdlr2 = [(ev) => { bExpr1['color'] = ev.target.value; }];
|
||||
return block1([attr1, hdlr2]);
|
||||
let hdlr1 = [(ev) => { bExpr1['color'] = ev.target.value; }];
|
||||
return block1([attr1, hdlr1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -271,9 +271,9 @@ exports[`t-model directive on a sub state key 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'].something;
|
||||
let attr1 = ctx['state'].something['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt3 = ctx['state'].something.text;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt1 = ctx['state'].something.text;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -289,12 +289,12 @@ exports[`t-model directive on an input type=radio 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['choice'] === 'One';
|
||||
let hdlr2 = [(ev) => { bExpr1['choice'] = ev.target.value; }];
|
||||
let hdlr1 = [(ev) => { bExpr1['choice'] = ev.target.value; }];
|
||||
const bExpr2 = ctx['state'];
|
||||
let attr3 = ctx['state']['choice'] === 'Two';
|
||||
let hdlr4 = [(ev) => { bExpr2['choice'] = ev.target.value; }];
|
||||
let txt5 = ctx['state'].choice;
|
||||
return block1([attr1, hdlr2, attr3, hdlr4, txt5]);
|
||||
let attr2 = ctx['state']['choice'] === 'Two';
|
||||
let hdlr2 = [(ev) => { bExpr2['choice'] = ev.target.value; }];
|
||||
let txt1 = ctx['state'].choice;
|
||||
return block1([attr1, hdlr1, attr2, hdlr2, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -310,11 +310,11 @@ exports[`t-model directive on an input type=radio, with initial value 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['choice'] === 'One';
|
||||
let hdlr2 = [(ev) => { bExpr1['choice'] = ev.target.value; }];
|
||||
let hdlr1 = [(ev) => { bExpr1['choice'] = ev.target.value; }];
|
||||
const bExpr2 = ctx['state'];
|
||||
let attr3 = ctx['state']['choice'] === 'Two';
|
||||
let hdlr4 = [(ev) => { bExpr2['choice'] = ev.target.value; }];
|
||||
return block1([attr1, hdlr2, attr3, hdlr4]);
|
||||
let attr2 = ctx['state']['choice'] === 'Two';
|
||||
let hdlr2 = [(ev) => { bExpr2['choice'] = ev.target.value; }];
|
||||
return block1([attr1, hdlr1, attr2, hdlr2]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -331,13 +331,13 @@ exports[`t-model directive on an input, type=checkbox 1`] = `
|
||||
let b2,b3;
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['flag'];
|
||||
let hdlr2 = [(ev) => { bExpr1['flag'] = ev.target.checked; }];
|
||||
let hdlr1 = [(ev) => { bExpr1['flag'] = ev.target.checked; }];
|
||||
if (ctx['state'].flag) {
|
||||
b2 = text(\`yes\`);
|
||||
} else {
|
||||
b3 = text(\`no\`);
|
||||
}
|
||||
return block1([attr1, hdlr2], [b2, b3]);
|
||||
return block1([attr1, hdlr1], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -353,9 +353,9 @@ exports[`t-model directive on an textarea 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['text'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt3 = ctx['state'].text;
|
||||
return block1([attr1, hdlr2, txt3]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text'] = ev.target.value; }];
|
||||
let txt1 = ctx['state'].text;
|
||||
return block1([attr1, hdlr1, txt1]);
|
||||
}
|
||||
}"
|
||||
`;
|
||||
@@ -375,14 +375,14 @@ exports[`t-model directive two inputs in a div alternating with a t-if 1`] = `
|
||||
if (ctx['state'].flag) {
|
||||
const bExpr1 = ctx['state'];
|
||||
let attr1 = ctx['state']['text1'];
|
||||
let hdlr2 = [(ev) => { bExpr1['text1'] = ev.target.value; }];
|
||||
b2 = block2([attr1, hdlr2]);
|
||||
let hdlr1 = [(ev) => { bExpr1['text1'] = ev.target.value; }];
|
||||
b2 = block2([attr1, hdlr1]);
|
||||
}
|
||||
if (!ctx['state'].flag) {
|
||||
const bExpr2 = ctx['state'];
|
||||
let attr3 = ctx['state']['text2'];
|
||||
let hdlr4 = [(ev) => { bExpr2['text2'] = ev.target.value; }];
|
||||
b3 = block3([attr3, hdlr4]);
|
||||
let attr2 = ctx['state']['text2'];
|
||||
let hdlr2 = [(ev) => { bExpr2['text2'] = ev.target.value; }];
|
||||
b3 = block3([attr2, hdlr2]);
|
||||
}
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
|
||||
@@ -50,8 +50,8 @@ exports[`t-on t-on expression in t-foreach 1`] = `
|
||||
let txt2 = ctx['val']+'';
|
||||
const v1 = ctx['otherState'];
|
||||
const v2 = ctx['val'];
|
||||
let hdlr3 = [()=>v1.vals.push(v2), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr3]), key1);
|
||||
let hdlr1 = [()=>v1.vals.push(v2), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr1]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -84,8 +84,8 @@ exports[`t-on t-on expression in t-foreach with t-set 1`] = `
|
||||
const v1 = ctx['otherState'];
|
||||
const v2 = ctx['val'];
|
||||
const v3 = ctx['bossa'];
|
||||
let hdlr3 = [()=>v1.vals.push(v2+'_'+v3), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr3]), key1);
|
||||
let hdlr1 = [()=>v1.vals.push(v2+'_'+v3), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr1]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
@@ -112,8 +112,8 @@ exports[`t-on t-on method call in t-foreach 1`] = `
|
||||
let txt1 = ctx['val_index'];
|
||||
let txt2 = ctx['val']+'';
|
||||
const v1 = ctx['val'];
|
||||
let hdlr3 = [()=>this.addVal(v1), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr3]), key1);
|
||||
let hdlr1 = [()=>this.addVal(v1), ctx];
|
||||
c_block2[i1] = withKey(block3([txt1, txt2, hdlr1]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
|
||||
@@ -8,7 +8,7 @@ exports[`t-set slot setted value (with t-set) not accessible with t-esc 1`] = `
|
||||
|
||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||
|
||||
function slot2(ctx, node, key = \\"\\") {
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1
|
||||
setContextValue(ctx, \\"iter\\", 'inCall');
|
||||
@@ -21,7 +21,7 @@ exports[`t-set slot setted value (with t-set) not accessible with t-esc 1`] = `
|
||||
setContextValue(ctx, \\"iter\\", 'source');
|
||||
let txt1 = ctx['iter'];
|
||||
const ctx1 = capture(ctx);
|
||||
let b2 = component(\`Childcomp\`, {slots: {'default': {__render: slot2, __ctx: ctx1}}}, key + \`__3\`, node, ctx);
|
||||
let b2 = component(\`Childcomp\`, {slots: {'default': {__render: slot1, __ctx: ctx1}}}, key + \`__1\`, node, ctx);
|
||||
let txt2 = ctx['iter'];
|
||||
return block1([txt1, txt2], [b2]);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user