mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
[REF] compiler: introduce define helper, slightly refactor code
This commit is contained in:
committed by
Samuel Degueldre
parent
50355e6a3d
commit
998ecbb337
@@ -8,7 +8,7 @@ exports[`slots can define a default content 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`Dialog\`, {}, key + \`__1\`, node, ctx);
|
||||
const b2 = component(\`Dialog\`, {}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -27,7 +27,7 @@ exports[`slots can define a default content 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = callSlot(ctx, node, key, 'default', false, {}, defaultContent1);
|
||||
const b3 = callSlot(ctx, node, key, 'default', false, {}, defaultContent1);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -53,7 +53,7 @@ exports[`slots can define and call slots 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b4 = component(\`Dialog\`, {slots: markRaw({'header': {__render: slot1, __ctx: ctx1}, 'footer': {__render: slot2, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b4 = component(\`Dialog\`, {slots: markRaw({'header': {__render: slot1, __ctx: ctx1}, 'footer': {__render: slot2, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b4]);
|
||||
}
|
||||
}"
|
||||
@@ -68,8 +68,8 @@ exports[`slots can define and call slots 2`] = `
|
||||
let block1 = createBlock(\`<div><div><block-child-0/></div><div><block-child-1/></div></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'header', false, {});
|
||||
let b3 = callSlot(ctx, node, key, 'footer', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'header', false, {});
|
||||
const b3 = callSlot(ctx, node, key, 'footer', false, {});
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -99,8 +99,8 @@ exports[`slots can define and call slots with bound params 2`] = `
|
||||
let { callSlot } = helpers;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'abc', false, {});
|
||||
let b3 = text(ctx['props'].slots['abc'].getValue());
|
||||
const b2 = callSlot(ctx, node, key, 'abc', false, {});
|
||||
const b3 = text(ctx['props'].slots['abc'].getValue());
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -126,7 +126,7 @@ exports[`slots can define and call slots with params 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b4 = component(\`Dialog\`, {slots: markRaw({'header': {__render: slot1, __ctx: ctx1, param: ctx['var']}, 'footer': {__render: slot2, __ctx: ctx1, param: '5'}})}, key + \`__1\`, node, ctx);
|
||||
const b4 = component(\`Dialog\`, {slots: markRaw({'header': {__render: slot1, __ctx: ctx1, param: ctx['var']}, 'footer': {__render: slot2, __ctx: ctx1, param: '5'}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b4]);
|
||||
}
|
||||
}"
|
||||
@@ -142,9 +142,9 @@ exports[`slots can define and call slots with params 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['props'].slots['header'].param;
|
||||
let b2 = callSlot(ctx, node, key, 'header', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'header', false, {});
|
||||
let txt2 = ctx['props'].slots['footer'].param;
|
||||
let b3 = callSlot(ctx, node, key, 'footer', false, {});
|
||||
const b3 = callSlot(ctx, node, key, 'footer', false, {});
|
||||
return block1([txt1, txt2], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -161,8 +161,8 @@ exports[`slots can render node with t-ref and Component in same slot 1`] = `
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
const refs = ctx.__owl__.refs;
|
||||
const ref1 = (el) => refs[\`div\`] = el;
|
||||
let b2 = block2([ref1]);
|
||||
let b3 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
const b2 = block2([ref1]);
|
||||
const b3 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
|
||||
@@ -317,7 +317,7 @@ exports[`slots content is the default slot 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -332,7 +332,7 @@ exports[`slots content is the default slot 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -352,7 +352,7 @@ exports[`slots default content is not rendered if named slot is provided 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'header': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'header': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -371,7 +371,7 @@ exports[`slots default content is not rendered if named slot is provided 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = callSlot(ctx, node, key, 'header', false, {}, defaultContent1);
|
||||
const b3 = callSlot(ctx, node, key, 'header', false, {}, defaultContent1);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -390,7 +390,7 @@ exports[`slots default content is not rendered if slot is provided 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -409,7 +409,7 @@ exports[`slots default content is not rendered if slot is provided 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = callSlot(ctx, node, key, 'default', false, {}, defaultContent1);
|
||||
const b3 = callSlot(ctx, node, key, 'default', false, {}, defaultContent1);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -429,7 +429,7 @@ exports[`slots default slot next to named slot, with default content 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'footer': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'footer': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -452,8 +452,8 @@ exports[`slots default slot next to named slot, with default content 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = callSlot(ctx, node, key, 'default', false, {}, defaultContent1);
|
||||
let b5 = callSlot(ctx, node, key, 'footer', false, {}, defaultContent2);
|
||||
const b3 = callSlot(ctx, node, key, 'default', false, {}, defaultContent1);
|
||||
const b5 = callSlot(ctx, node, key, 'footer', false, {}, defaultContent2);
|
||||
return block1([], [b3, b5]);
|
||||
}
|
||||
}"
|
||||
@@ -518,7 +518,7 @@ exports[`slots default slot with slot scope: shorthand syntax 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {bool: ctx['state'].bool});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {bool: ctx['state'].bool});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -565,7 +565,7 @@ exports[`slots default slot work with text nodes 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -580,7 +580,7 @@ exports[`slots default slot work with text nodes 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -598,8 +598,8 @@ exports[`slots dynamic t-slot call 1`] = `
|
||||
let block5 = createBlock(\`<h1>slot2</h1>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = block3();
|
||||
let b4 = block4();
|
||||
const b3 = block3();
|
||||
const b4 = block4();
|
||||
return multi([b3, b4]);
|
||||
}
|
||||
|
||||
@@ -609,7 +609,7 @@ exports[`slots dynamic t-slot call 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b6 = component(\`Toggler\`, {slots: markRaw({'slot1': {__render: slot1, __ctx: ctx1}, 'slot2': {__render: slot2, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b6 = component(\`Toggler\`, {slots: markRaw({'slot1': {__render: slot1, __ctx: ctx1}, 'slot2': {__render: slot2, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b6]);
|
||||
}
|
||||
}"
|
||||
@@ -626,7 +626,7 @@ exports[`slots dynamic t-slot call 2`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['toggle'], ctx];
|
||||
const slot1 = (ctx['current'].slot);
|
||||
let b2 = toggler(slot1, callSlot(ctx, node, key, slot1), true, {});
|
||||
const b2 = toggler(slot1, callSlot(ctx, node, key, slot1), true, {});
|
||||
return block1([hdlr1], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -644,8 +644,8 @@ exports[`slots dynamic t-slot call with default 1`] = `
|
||||
let block5 = createBlock(\`<h1>slot2</h1>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = block3();
|
||||
let b4 = block4();
|
||||
const b3 = block3();
|
||||
const b4 = block4();
|
||||
return multi([b3, b4]);
|
||||
}
|
||||
|
||||
@@ -655,7 +655,7 @@ exports[`slots dynamic t-slot call with default 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b6 = component(\`Toggler\`, {slots: markRaw({'slot1': {__render: slot1, __ctx: ctx1}, 'slot2': {__render: slot2, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b6 = component(\`Toggler\`, {slots: markRaw({'slot1': {__render: slot1, __ctx: ctx1}, 'slot2': {__render: slot2, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b6]);
|
||||
}
|
||||
}"
|
||||
@@ -675,7 +675,7 @@ exports[`slots dynamic t-slot call with default 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['toggle'], ctx];
|
||||
let b3 = callSlot(ctx, node, key, (ctx['current'].slot), true, {}, defaultContent1);
|
||||
const b3 = callSlot(ctx, node, key, (ctx['current'].slot), true, {}, defaultContent1);
|
||||
return block1([hdlr1], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -704,8 +704,8 @@ exports[`slots fun: two calls to the same slot 2`] = `
|
||||
let { callSlot } = helpers;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
let b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -719,7 +719,7 @@ exports[`slots missing slots are ignored 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`Dialog\`, {}, key + \`__1\`, node, ctx);
|
||||
const b2 = component(\`Dialog\`, {}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -734,8 +734,8 @@ exports[`slots missing slots are ignored 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/><span>some content</span><block-child-1/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
let b3 = callSlot(ctx, node, key, 'footer', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b3 = callSlot(ctx, node, key, 'footer', false, {});
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -761,8 +761,8 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['inc'], ctx];
|
||||
let b2 = block2([hdlr1]);
|
||||
let b3 = component(\`A\`, {number: ctx['state'].number}, key + \`__1\`, node, ctx);
|
||||
const b2 = block2([hdlr1]);
|
||||
const b3 = component(\`A\`, {number: ctx['state'].number}, key + \`__1\`, node, ctx);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -776,8 +776,8 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
|
||||
const callTemplate_1 = getTemplate(\`__template__1002\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b2 = text(\`[A]\`);
|
||||
let b3 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
const b2 = text(\`[A]\`);
|
||||
const b3 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
|
||||
@@ -798,12 +798,12 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1
|
||||
let b2 = text(\`[sub1] \`);
|
||||
const b2 = text(\`[sub1] \`);
|
||||
setContextValue(ctx, \\"dummy\\", ctx['validate']);
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1;
|
||||
setContextValue(ctx, \\"v\\", ctx['props'].number);
|
||||
let b3 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
const b3 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -815,9 +815,9 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = text(\`[sub2\`);
|
||||
let b3 = text(ctx['v']);
|
||||
let b4 = text(\`]\`);
|
||||
const b2 = text(\`[sub2\`);
|
||||
const b3 = text(ctx['v']);
|
||||
const b4 = text(\`]\`);
|
||||
return multi([b2, b3, b4]);
|
||||
}
|
||||
}"
|
||||
@@ -829,8 +829,8 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
|
||||
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = text(\`[B]\`);
|
||||
let b3 = component(\`C\`, {slots: ctx['props'].slots}, key + \`__1\`, node, ctx);
|
||||
const b2 = text(\`[B]\`);
|
||||
const b3 = component(\`C\`, {slots: ctx['props'].slots}, key + \`__1\`, node, ctx);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -843,8 +843,8 @@ exports[`slots mix of slots, t-call, t-call with body, and giving own props chil
|
||||
let { callSlot } = helpers;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = text(\`[C]\`);
|
||||
let b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = text(\`[C]\`);
|
||||
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -861,13 +861,13 @@ exports[`slots multiple roots are allowed in a default slot 1`] = `
|
||||
let block4 = createBlock(\`<span>rocks</span>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = block3();
|
||||
let b4 = block4();
|
||||
const b3 = block3();
|
||||
const b4 = block4();
|
||||
return multi([b3, b4]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b5 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
const b5 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -882,7 +882,7 @@ exports[`slots multiple roots are allowed in a default slot 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -899,14 +899,14 @@ exports[`slots multiple roots are allowed in a named slot 1`] = `
|
||||
let block4 = createBlock(\`<span>rocks</span>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b3 = block3();
|
||||
let b4 = block4();
|
||||
const b3 = block3();
|
||||
const b4 = block4();
|
||||
return multi([b3, b4]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Dialog\`, {slots: markRaw({'content': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b5 = component(\`Dialog\`, {slots: markRaw({'content': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -921,7 +921,7 @@ exports[`slots multiple roots are allowed in a named slot 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'content', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'content', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -957,8 +957,8 @@ exports[`slots multiple slots containing components 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 's1', false, {});
|
||||
let b3 = callSlot(ctx, node, key, 's2', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 's1', false, {});
|
||||
const b3 = callSlot(ctx, node, key, 's2', false, {});
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1005,7 +1005,7 @@ exports[`slots named slot inside slot 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Child\`, {slots: markRaw({'brol': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
const b5 = component(\`Child\`, {slots: markRaw({'brol': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -1020,8 +1020,8 @@ exports[`slots named slot inside slot 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'brol', false, {});
|
||||
let b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'brol', false, {});
|
||||
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1054,7 +1054,7 @@ exports[`slots named slot inside slot, part 3 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Child\`, {slots: markRaw({'brol': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
const b5 = component(\`Child\`, {slots: markRaw({'brol': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -1069,8 +1069,8 @@ exports[`slots named slot inside slot, part 3 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'brol', false, {});
|
||||
let b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'brol', false, {});
|
||||
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1084,7 +1084,7 @@ exports[`slots named slots can define a default content 1`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`Dialog\`, {}, key + \`__1\`, node, ctx);
|
||||
const b2 = component(\`Dialog\`, {}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1103,7 +1103,7 @@ exports[`slots named slots can define a default content 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = callSlot(ctx, node, key, 'header', false, {}, defaultContent1);
|
||||
const b3 = callSlot(ctx, node, key, 'header', false, {}, defaultContent1);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1136,7 +1136,7 @@ exports[`slots named slots inside slot, again 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b5 = component(\`Child\`, {slots: markRaw({'brol1': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
const b5 = component(\`Child\`, {slots: markRaw({'brol1': {__render: slot1, __ctx: ctx1}, 'default': {__render: slot2, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b5]);
|
||||
}
|
||||
}"
|
||||
@@ -1159,9 +1159,9 @@ exports[`slots named slots inside slot, again 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = callSlot(ctx, node, key, 'brol1', false, {}, defaultContent1);
|
||||
let b5 = callSlot(ctx, node, key, 'brol2', false, {}, defaultContent2);
|
||||
let b6 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b3 = callSlot(ctx, node, key, 'brol1', false, {}, defaultContent1);
|
||||
const b5 = callSlot(ctx, node, key, 'brol2', false, {}, defaultContent2);
|
||||
const b6 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b3, b5, b6]);
|
||||
}
|
||||
}"
|
||||
@@ -1184,7 +1184,7 @@ exports[`slots nested slots in same template 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b4 = component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__3\`, node, ctx);
|
||||
const b4 = component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__3\`, node, ctx);
|
||||
return block1([], [b4]);
|
||||
}
|
||||
}"
|
||||
@@ -1199,7 +1199,7 @@ exports[`slots nested slots in same template 2`] = `
|
||||
let block1 = createBlock(\`<span id=\\"c1\\"><div><block-child-0/></div></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1214,7 +1214,7 @@ exports[`slots nested slots in same template 3`] = `
|
||||
let block1 = createBlock(\`<span id=\\"c2\\"><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1274,7 +1274,7 @@ exports[`slots nested slots: evaluation context and parented relationship 3`] =
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1314,7 +1314,7 @@ exports[`slots no named slot content => just no children 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'header', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'header', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1345,7 +1345,7 @@ exports[`slots simple default slot 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1382,7 +1382,7 @@ exports[`slots simple default slot with params 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {bool: ctx['state'].bool});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {bool: ctx['state'].bool});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1476,7 +1476,7 @@ exports[`slots simple slot with slot scope 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'slotName', false, {bool: ctx['state'].bool});
|
||||
const b2 = callSlot(ctx, node, key, 'slotName', false, {bool: ctx['state'].bool});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1497,7 +1497,7 @@ exports[`slots slot and (inline) t-call 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1525,7 +1525,7 @@ exports[`slots slot and (inline) t-call 3`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1546,7 +1546,7 @@ exports[`slots slot and t-call 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1574,7 +1574,7 @@ exports[`slots slot and t-call 3`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1593,7 +1593,7 @@ exports[`slots slot and t-esc 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1608,7 +1608,7 @@ exports[`slots slot and t-esc 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1629,7 +1629,7 @@ exports[`slots slot are properly rendered if inner props are changed 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['inc'], ctx];
|
||||
let txt1 = ctx['state'].val;
|
||||
let b3 = component(\`GenericComponent\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
const b3 = component(\`GenericComponent\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
return block1([hdlr1, txt1], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1644,7 +1644,7 @@ exports[`slots slot are properly rendered if inner props are changed 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1687,9 +1687,9 @@ exports[`slots slot content has different key from other content -- dynamic slot
|
||||
let { callSlot } = helpers;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`Child\`, {parent: 'SlotDisplay'}, key + \`__1\`, node, ctx);
|
||||
const b2 = component(\`Child\`, {parent: 'SlotDisplay'}, key + \`__1\`, node, ctx);
|
||||
const slot1 = (ctx['slotName']);
|
||||
let b3 = toggler(slot1, callSlot(ctx, node, key, slot1), true, {});
|
||||
const b3 = toggler(slot1, callSlot(ctx, node, key, slot1), true, {});
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1732,8 +1732,8 @@ exports[`slots slot content has different key from other content -- static slot
|
||||
let { callSlot } = helpers;
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`Child\`, {parent: 'SlotDisplay'}, key + \`__1\`, node, ctx);
|
||||
let b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = component(\`Child\`, {parent: 'SlotDisplay'}, key + \`__1\`, node, ctx);
|
||||
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1785,7 +1785,7 @@ exports[`slots slot content is bound to caller (variation) 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1819,7 +1819,7 @@ exports[`slots slot content is bound to caller 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -1838,7 +1838,7 @@ exports[`slots slot preserves properly parented relationship 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
const b3 = component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1882,7 +1882,7 @@ exports[`slots slot preserves properly parented relationship, even through t-cal
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
const b3 = component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -1947,7 +1947,7 @@ exports[`slots slots and wrapper components 2`] = `
|
||||
let block1 = createBlock(\`<a href=\\"abc\\"><block-child-0/></a>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2004,7 +2004,7 @@ exports[`slots slots are rendered with proper context 1`] = `
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].val;
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'footer': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'footer': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([txt1], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2019,7 +2019,7 @@ exports[`slots slots are rendered with proper context 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'footer', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'footer', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2035,22 +2035,22 @@ exports[`slots slots are rendered with proper context, part 2 1`] = `
|
||||
let block3 = createBlock(\`<li><block-child-0/></li>\`);
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let b5 = text(\`User \`);
|
||||
let b6 = text(ctx['user'].name);
|
||||
const b5 = text(\`User \`);
|
||||
const b6 = text(ctx['user'].name);
|
||||
return multi([b5, b6]);
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].users);
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].users);;
|
||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||
ctx[\`user\`] = v_block2[i1];
|
||||
let key1 = ctx['user'].id;
|
||||
const key1 = ctx['user'].id;
|
||||
const ctx1 = capture(ctx);
|
||||
let b7 = component(\`Link\`, {to: '/user/'+ctx['user'].id,slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1__\${key1}\`, node, ctx);
|
||||
const b7 = component(\`Link\`, {to: '/user/'+ctx['user'].id,slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1__\${key1}\`, node, ctx);
|
||||
c_block2[i1] = withKey(block3([], [b7]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
const b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2066,7 +2066,7 @@ exports[`slots slots are rendered with proper context, part 2 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let attr1 = ctx['props'].to;
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([attr1], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2089,16 +2089,16 @@ exports[`slots slots are rendered with proper context, part 3 1`] = `
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1
|
||||
ctx = Object.create(ctx);
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].users);
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].users);;
|
||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||
ctx[\`user\`] = v_block2[i1];
|
||||
let key1 = ctx['user'].id;
|
||||
const 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: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1__\${key1}\`, node, ctx);
|
||||
const b5 = component(\`Link\`, {to: '/user/'+ctx['user'].id,slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1__\${key1}\`, node, ctx);
|
||||
c_block2[i1] = withKey(block3([], [b5]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
const b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2114,7 +2114,7 @@ exports[`slots slots are rendered with proper context, part 3 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let attr1 = ctx['props'].to;
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([attr1], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2137,7 +2137,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: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Link\`, {to: '/user/'+ctx['state'].user.id,slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2153,7 +2153,7 @@ exports[`slots slots are rendered with proper context, part 4 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let attr1 = ctx['props'].to;
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([attr1], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2178,7 +2178,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: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`A\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2197,7 +2197,7 @@ exports[`slots slots in slots, with vars 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`B\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`B\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2212,7 +2212,7 @@ exports[`slots slots in slots, with vars 3`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2232,15 +2232,15 @@ exports[`slots slots in t-foreach and re-rendering 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(Array(2));
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(Array(2));;
|
||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||
ctx[\`n\`] = v_block2[i1];
|
||||
ctx[\`n_index\`] = i1;
|
||||
let key1 = ctx['n_index'];
|
||||
const key1 = ctx['n_index'];
|
||||
const ctx1 = capture(ctx);
|
||||
c_block2[i1] = withKey(component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1__\${key1}\`, node, ctx), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
const b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2256,7 +2256,7 @@ exports[`slots slots in t-foreach and re-rendering 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].val;
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([txt1], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2280,26 +2280,26 @@ exports[`slots slots in t-foreach in t-foreach 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['tree']);
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['tree']);;
|
||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||
ctx[\`node1\`] = v_block2[i1];
|
||||
let key1 = ctx['node1'].key;
|
||||
const key1 = ctx['node1'].key;
|
||||
let txt1 = ctx['node1'].value;
|
||||
let b4 = block4([txt1]);
|
||||
const b4 = block4([txt1]);
|
||||
ctx = Object.create(ctx);
|
||||
const [k_block6, v_block6, l_block6, c_block6] = prepareList(ctx['node1'].nodes);
|
||||
const [k_block6, v_block6, l_block6, c_block6] = prepareList(ctx['node1'].nodes);;
|
||||
for (let i2 = 0; i2 < l_block6; i2++) {
|
||||
ctx[\`node2\`] = v_block6[i2];
|
||||
let key2 = ctx['node2'].key;
|
||||
const key2 = ctx['node2'].key;
|
||||
const ctx1 = capture(ctx);
|
||||
c_block6[i2] = withKey(component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1__\${key1}__\${key2}\`, node, ctx), key2);
|
||||
}
|
||||
ctx = ctx.__proto__;
|
||||
let b6 = list(c_block6);
|
||||
let b5 = block5([], [b6]);
|
||||
const b6 = list(c_block6);
|
||||
const b5 = block5([], [b6]);
|
||||
c_block2[i1] = withKey(multi([b4, b5]), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
const b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2314,7 +2314,7 @@ exports[`slots slots in t-foreach in t-foreach 2`] = `
|
||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2336,16 +2336,16 @@ exports[`slots slots in t-foreach with t-set and re-rendering 1`] = `
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1
|
||||
ctx = Object.create(ctx);
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(Array(2));
|
||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(Array(2));;
|
||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||
ctx[\`n\`] = v_block2[i1];
|
||||
ctx[\`n_index\`] = i1;
|
||||
let key1 = ctx['n_index'];
|
||||
const key1 = ctx['n_index'];
|
||||
setContextValue(ctx, \\"dummy\\", ctx['n_index']);
|
||||
const ctx1 = capture(ctx);
|
||||
c_block2[i1] = withKey(component(\`Child\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1__\${key1}\`, node, ctx), key1);
|
||||
}
|
||||
let b2 = list(c_block2);
|
||||
const b2 = list(c_block2);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2361,7 +2361,7 @@ exports[`slots slots in t-foreach with t-set and re-rendering 2`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let txt1 = ctx['state'].val;
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([txt1], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2382,7 +2382,7 @@ exports[`slots t-debug on a t-set-slot (defining a slot) 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'content': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'content': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2397,7 +2397,7 @@ exports[`slots t-debug on a t-set-slot (defining a slot) 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'content', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'content', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2420,7 +2420,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: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2435,7 +2435,7 @@ exports[`slots t-set t-value in a slot 2`] = `
|
||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2451,16 +2451,16 @@ exports[`slots t-slot in recursive templates 1`] = `
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
ctx = Object.create(ctx);
|
||||
ctx[isBoundary] = 1
|
||||
let b2 = text(ctx['name']);
|
||||
const b2 = text(ctx['name']);
|
||||
ctx = Object.create(ctx);
|
||||
const [k_block3, v_block3, l_block3, c_block3] = prepareList(ctx['items']);
|
||||
const [k_block3, v_block3, l_block3, c_block3] = prepareList(ctx['items']);;
|
||||
for (let i1 = 0; i1 < l_block3; i1++) {
|
||||
ctx[\`item\`] = v_block3[i1];
|
||||
ctx[\`item_first\`] = i1 === 0;
|
||||
ctx[\`item_last\`] = i1 === v_block3.length - 1;
|
||||
ctx[\`item_index\`] = i1;
|
||||
ctx[\`item_value\`] = k_block3[i1];
|
||||
let key1 = ctx['item'].name;
|
||||
const key1 = ctx['item'].name;
|
||||
let b5,b6;
|
||||
if (!ctx['item'].children.length) {
|
||||
b5 = text(ctx['item'].name);
|
||||
@@ -2475,7 +2475,7 @@ exports[`slots t-slot in recursive templates 1`] = `
|
||||
c_block3[i1] = withKey(multi([b5, b6]), key1);
|
||||
}
|
||||
ctx = ctx.__proto__;
|
||||
let b3 = list(c_block3);
|
||||
const b3 = list(c_block3);
|
||||
return multi([b2, b3]);
|
||||
}
|
||||
|
||||
@@ -2495,7 +2495,7 @@ exports[`slots t-slot in recursive templates 2`] = `
|
||||
let block1 = createBlock(\`<wrapper><block-child-0/></wrapper>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2514,7 +2514,7 @@ exports[`slots t-slot nested within another slot 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
const b3 = component(\`Dialog\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2537,7 +2537,7 @@ exports[`slots t-slot nested within another slot 2`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b4 = component(\`Modal\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
const b4 = component(\`Modal\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b4]);
|
||||
}
|
||||
}"
|
||||
@@ -2552,7 +2552,7 @@ exports[`slots t-slot nested within another slot 3`] = `
|
||||
let block1 = createBlock(\`<span id=\\"modal\\"><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2567,7 +2567,7 @@ exports[`slots t-slot nested within another slot 4`] = `
|
||||
let block1 = createBlock(\`<span id=\\"portal\\"><block-child-0/></span>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2614,7 +2614,7 @@ exports[`slots t-slot scope context 2`] = `
|
||||
|
||||
function slot1(ctx, node, key = \\"\\") {
|
||||
let hdlr1 = [ctx['onClick'], ctx];
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([hdlr1], [b2]);
|
||||
}
|
||||
|
||||
@@ -2651,7 +2651,7 @@ exports[`slots t-slot within dynamic t-call 1`] = `
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
const ctx1 = capture(ctx);
|
||||
let b3 = component(\`Slotted\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
const b3 = component(\`Slotted\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx1}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
@@ -2666,7 +2666,7 @@ exports[`slots t-slot within dynamic t-call 2`] = `
|
||||
let block1 = createBlock(\`<div class=\\"slotted\\"><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
const b2 = callSlot(ctx, node, key, 'default', false, {});
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2680,7 +2680,7 @@ exports[`slots t-slot within dynamic t-call 3`] = `
|
||||
let block1 = createBlock(\`<div class=\\"slot\\"><block-child-0/></div>\`);
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
const b2 = component(\`Child\`, {}, key + \`__1\`, node, ctx);
|
||||
return block1([], [b2]);
|
||||
}
|
||||
}"
|
||||
@@ -2712,7 +2712,7 @@ exports[`slots template can just return a slot 1`] = `
|
||||
}
|
||||
|
||||
return function template(ctx, node, key = \\"\\") {
|
||||
let b3 = component(\`SlotComponent\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
const b3 = component(\`SlotComponent\`, {slots: markRaw({'default': {__render: slot1, __ctx: ctx}})}, key + \`__2\`, node, ctx);
|
||||
return block1([], [b3]);
|
||||
}
|
||||
}"
|
||||
|
||||
Reference in New Issue
Block a user