diff --git a/src/compiler/code_generator.ts b/src/compiler/code_generator.ts index 3c0d6498c..969b182d8 100644 --- a/src/compiler/code_generator.ts +++ b/src/compiler/code_generator.ts @@ -43,6 +43,7 @@ export interface Config { export interface CodeGenOptions extends Config { hasSafeContext?: boolean; name?: string; + alias?: string; } // using a non-html document so that HTML serializes as XML instead @@ -197,6 +198,7 @@ class CodeTarget { hasRefWrapper: boolean = false; constructor(name: string, on?: EventHandlers | null) { + debugger this.name = name; this.on = on || null; } @@ -243,6 +245,13 @@ class CodeTarget { } } +function toFnName(name: string = "", alias?: string) { + if (alias) { + name += `_${alias}`; + } + return name.replace(/[^A-Za-z_$0-9]+/g, "_") || "template"; +} + const TRANSLATABLE_ATTRS = ["label", "title", "placeholder", "alt"]; const translationRE = /^(\s*)([\s\S]+?)(\s*)$/; @@ -252,7 +261,7 @@ export class CodeGenerator { hasSafeContext: boolean; isDebug: boolean = false; targets: CodeTarget[] = []; - target = new CodeTarget("template"); + target: CodeTarget; templateName?: string; dev: boolean; translateFn: (s: string) => string; @@ -263,6 +272,7 @@ export class CodeGenerator { helpers: Set = new Set(); constructor(ast: AST, options: CodeGenOptions) { + this.target = new CodeTarget(toFnName(options.name, options.alias)); this.translateFn = options.translateFn || ((s: string) => s); if (options.translatableAttributes) { const attrs = new Set(TRANSLATABLE_ATTRS); diff --git a/src/compiler/index.ts b/src/compiler/index.ts index d79e95345..5d820efd2 100644 --- a/src/compiler/index.ts +++ b/src/compiler/index.ts @@ -10,6 +10,7 @@ export type TemplateFunction = (app: TemplateSet, bdom: any, helpers: any) => Te interface CompileOptions extends Config { name?: string; + alias?: string; } export function compile( template: string | Element, diff --git a/src/index.ts b/src/index.ts index 83d84e892..191cda8b1 100644 --- a/src/index.ts +++ b/src/index.ts @@ -5,10 +5,12 @@ export * from "./runtime"; TemplateSet.prototype._compileTemplate = function _compileTemplate( name: string, - template: string | Element + template: string | Element, + alias?: string ) { return compile(template, { name, + alias, dev: this.dev, translateFn: this.translateFn, translatableAttributes: this.translatableAttributes, diff --git a/src/runtime/component_node.ts b/src/runtime/component_node.ts index 98f580a47..d4cdccc41 100644 --- a/src/runtime/component_node.ts +++ b/src/runtime/component_node.ts @@ -116,7 +116,7 @@ export class ComponentNode

implements VNode { + _compileTemplate(name: string, template: string | Element, alias?: string): ReturnType { throw new OwlError(`Unable to compile a template. Please use owl full build instead`); } @@ -135,7 +135,7 @@ export class TemplateSet { export const globalTemplates: { [key: string]: string | Element | TemplateFunction } = {}; export function xml(...args: Parameters) { - const name = `__template__${xml.nextId++}`; + const name = `xml_template_${xml.nextId++}`; const value = String.raw(...args); globalTemplates[name] = value; return name; diff --git a/tests/__snapshots__/reactivity.test.ts.snap b/tests/__snapshots__/reactivity.test.ts.snap index 9740828b4..3cca0596d 100644 --- a/tests/__snapshots__/reactivity.test.ts.snap +++ b/tests/__snapshots__/reactivity.test.ts.snap @@ -50,11 +50,12 @@ exports[`Reactivity: useState destroyed component before being mounted is inacti "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['state'].flag) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -68,10 +69,11 @@ exports[`Reactivity: useState destroyed component before being mounted is inacti "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj'].a; return block1([txt1]); } @@ -82,11 +84,12 @@ exports[`Reactivity: useState destroyed component is inactive 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['state'].flag) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -100,10 +103,11 @@ exports[`Reactivity: useState destroyed component is inactive 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj'].a; return block1([txt1]); } @@ -114,10 +118,11 @@ exports[`Reactivity: useState one components can subscribe twice to same context "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Comp(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj1'].a; let txt2 = ctx['contextObj2'].b; return block1([txt1, txt2]); @@ -129,11 +134,12 @@ exports[`Reactivity: useState parent and children subscribed to same context 1`] "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); let txt1 = ctx['contextObj'].b; return block1([txt1], [b2]); @@ -145,10 +151,11 @@ exports[`Reactivity: useState parent and children subscribed to same context 2`] "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj'].a; return block1([txt1]); } @@ -222,12 +229,13 @@ exports[`Reactivity: useState two components are updated in parallel 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); const comp2 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); const b3 = comp2({}, key + \`__2\`, node, this, null); return block1([], [b2, b3]); @@ -239,10 +247,11 @@ exports[`Reactivity: useState two components are updated in parallel 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj'].value; return block1([txt1]); } @@ -253,12 +262,13 @@ exports[`Reactivity: useState two components can subscribe to same context 1`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); const comp2 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); const b3 = comp2({}, key + \`__2\`, node, this, null); return block1([], [b2, b3]); @@ -270,10 +280,11 @@ exports[`Reactivity: useState two components can subscribe to same context 2`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj'].value; return block1([txt1]); } @@ -284,12 +295,13 @@ exports[`Reactivity: useState two independent components on different levels are "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); const comp2 = app.createComponent(\`Parent\`, true, false, false, []); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_GrandFather(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); const b3 = comp2({}, key + \`__2\`, node, this, null); return block1([], [b2, b3]); @@ -301,10 +313,11 @@ exports[`Reactivity: useState two independent components on different levels are "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj'].value; return block1([txt1]); } @@ -315,11 +328,12 @@ exports[`Reactivity: useState two independent components on different levels are "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -330,10 +344,11 @@ exports[`Reactivity: useState useContext=useState hook is reactive, for one comp "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Comp(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj'].value; return block1([txt1]); } @@ -345,11 +360,12 @@ exports[`Reactivity: useState useless atoms should be deleted 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Quantity\`, true, false, false, [\\"id\\"]); let block1 = createBlock(\`
Total: Count:
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ListOfQuantities(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block2, v_block2, l_block2, c_block2] = prepareList(Object.keys(ctx['state']));; for (let i1 = 0; i1 < l_block2; i1++) { @@ -370,10 +386,11 @@ exports[`Reactivity: useState useless atoms should be deleted 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Quantity(ctx, node, key = \\"\\") { let txt1 = ctx['state'].quantity; return block1([txt1]); } @@ -384,10 +401,11 @@ exports[`Reactivity: useState very simple use, with initial value 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Comp(ctx, node, key = \\"\\") { let txt1 = ctx['contextObj'].value; return block1([txt1]); } diff --git a/tests/app/__snapshots__/app.test.ts.snap b/tests/app/__snapshots__/app.test.ts.snap index 309c2ddad..8dfe1b54b 100644 --- a/tests/app/__snapshots__/app.test.ts.snap +++ b/tests/app/__snapshots__/app.test.ts.snap @@ -4,10 +4,11 @@ exports[`app App supports env with getters/setters 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { let txt1 = ctx['env'].someVal; let txt2 = Object.keys(ctx['env'].services); return block1([txt1, txt2]); @@ -19,9 +20,10 @@ exports[`app app: clear scheduler tasks and destroy cancelled nodes immediately "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`B\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_A(ctx, node, key = \\"\\") { let b2,b3; b2 = text(\`A\`); if (ctx['state'].value) { @@ -36,8 +38,9 @@ exports[`app app: clear scheduler tasks and destroy cancelled nodes immediately "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_B(ctx, node, key = \\"\\") { return text(\`B\`); } }" @@ -47,10 +50,11 @@ exports[`app can configure an app with props 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { let txt1 = ctx['props'].value; return block1([txt1]); } @@ -61,10 +65,11 @@ exports[`app can mount app in an iframe 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -74,10 +79,11 @@ exports[`app destroy remove the widget from the DOM 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -87,10 +93,11 @@ exports[`app warnIfNoStaticProps works as expected 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { let txt1 = ctx['message']; return block1([txt1]); } diff --git a/tests/compiler/__snapshots__/event_handling.test.ts.snap b/tests/compiler/__snapshots__/event_handling.test.ts.snap index e1c13502f..ff63c679f 100644 --- a/tests/compiler/__snapshots__/event_handling.test.ts.snap +++ b/tests/compiler/__snapshots__/event_handling.test.ts.snap @@ -156,9 +156,10 @@ exports[`t-on handler is bound to proper owner, part 3 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { return callTemplate_1.call(this, ctx, node, key + \`__1\`); } }" @@ -168,10 +169,11 @@ exports[`t-on handler is bound to proper owner, part 3 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let hdlr1 = [ctx['add'], ctx]; return block1([hdlr1]); } @@ -183,9 +185,10 @@ exports[`t-on handler is bound to proper owner, part 4 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block1, v_block1, l_block1, c_block1] = prepareList([1]);; for (let i1 = 0; i1 < l_block1; i1++) { @@ -206,10 +209,11 @@ exports[`t-on handler is bound to proper owner, part 4 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let hdlr1 = [ctx['add'], ctx]; return block1([hdlr1]); } @@ -471,11 +475,12 @@ exports[`t-on t-on with t-call 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); return block1([], [b2]); } @@ -486,10 +491,11 @@ exports[`t-on t-on with t-call 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`

lucas

\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let hdlr1 = [ctx['update'], ctx]; return block1([hdlr1]); } @@ -500,11 +506,12 @@ exports[`t-on t-on, with arguments and t-call 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); return block1([], [b2]); } @@ -515,10 +522,11 @@ exports[`t-on t-on, with arguments and t-call 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`

lucas

\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { const v1 = ctx['this']; const v2 = ctx['value']; let hdlr1 = [()=>v1.update(v2), ctx]; diff --git a/tests/compiler/__snapshots__/misc.test.ts.snap b/tests/compiler/__snapshots__/misc.test.ts.snap index 2d4aa3bf4..f97e13c55 100644 --- a/tests/compiler/__snapshots__/misc.test.ts.snap +++ b/tests/compiler/__snapshots__/misc.test.ts.snap @@ -84,6 +84,7 @@ exports[`misc global 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, isBoundary, withDefault, setContextValue, zero, withKey } = helpers; + // Template name: \\"caller\\" const callTemplate_1 = app.getTemplate(\`_callee-uses-foo\`); const callTemplate_2 = app.getTemplate(\`_callee-uses-foo\`); const callTemplate_3 = app.getTemplate(\`_callee-uses-foo\`); @@ -93,7 +94,7 @@ exports[`misc global 1`] = ` let block1 = createBlock(\`
\`); let block4 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function caller(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -136,10 +137,11 @@ exports[`misc global 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { withDefault } = helpers; + // Template name: \\"_callee-uses-foo\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function _callee_uses_foo(ctx, node, key = \\"\\") { let txt1 = withDefault(ctx['foo'], \`foo default\`); return block1([txt1]); } @@ -151,10 +153,11 @@ exports[`misc global 3`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"_callee-asc\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function _callee_asc(ctx, node, key = \\"\\") { let attr1 = 'agüero'; const b2 = ctx[zero]; return block1([attr1], [b2]); @@ -167,10 +170,11 @@ exports[`misc global 4`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { safeOutput } = helpers; + // Template name: \\"_callee-asc-toto\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function _callee_asc_toto(ctx, node, key = \\"\\") { const b3 = text(\`toto default\`); const b2 = safeOutput(ctx['toto'], b3); return block1([], [b2]); diff --git a/tests/compiler/__snapshots__/simple_templates.test.ts.snap b/tests/compiler/__snapshots__/simple_templates.test.ts.snap index e6e75add7..1a908e633 100644 --- a/tests/compiler/__snapshots__/simple_templates.test.ts.snap +++ b/tests/compiler/__snapshots__/simple_templates.test.ts.snap @@ -158,8 +158,9 @@ exports[`simple templates, mostly static empty string in a template set 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"potato\\" - return function template(ctx, node, key = \\"\\") { + return function potato(ctx, node, key = \\"\\") { return text(\`\`); } }" diff --git a/tests/compiler/__snapshots__/svg.test.ts.snap b/tests/compiler/__snapshots__/svg.test.ts.snap index f8c710636..fbf54ec7b 100644 --- a/tests/compiler/__snapshots__/svg.test.ts.snap +++ b/tests/compiler/__snapshots__/svg.test.ts.snap @@ -56,12 +56,13 @@ exports[`properly support svg svg creates new block if it is within html -- 2 1` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); let block2 = createBlock(\`\`); let block3 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { let b3; if (ctx['hasPath']) { b3 = block3(); @@ -76,11 +77,12 @@ exports[`properly support svg svg creates new block if it is within html 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
\`); let block2 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { const b2 = block2(); return block1([], [b2]); } @@ -91,11 +93,12 @@ exports[`properly support svg svg namespace added to sub templates if root tag i "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"svg\\" const callTemplate_1 = app.getTemplate(\`path\`); let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function svg_Svg(ctx, node, key = \\"\\") { const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); return block1([], [b2]); } @@ -106,10 +109,11 @@ exports[`properly support svg svg namespace added to sub templates if root tag i "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"path\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function path(ctx, node, key = \\"\\") { return block1(); } }" diff --git a/tests/compiler/__snapshots__/t_call.test.ts.snap b/tests/compiler/__snapshots__/t_call.test.ts.snap index a586b9cf7..3be92356b 100644 --- a/tests/compiler/__snapshots__/t_call.test.ts.snap +++ b/tests/compiler/__snapshots__/t_call.test.ts.snap @@ -4,11 +4,12 @@ exports[`t-call (template calling) basic caller 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"caller\\" const callTemplate_1 = app.getTemplate(\`_basic-callee\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function caller(ctx, node, key = \\"\\") { const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); return block1([], [b2]); } @@ -19,10 +20,11 @@ exports[`t-call (template calling) basic caller 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"_basic-callee\\" let block1 = createBlock(\`ok\`); - return function template(ctx, node, key = \\"\\") { + return function _basic_callee(ctx, node, key = \\"\\") { return block1(); } }" @@ -32,9 +34,10 @@ exports[`t-call (template calling) basic caller, no parent node 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"caller\\" const callTemplate_1 = app.getTemplate(\`_basic-callee\`); - return function template(ctx, node, key = \\"\\") { + return function caller(ctx, node, key = \\"\\") { return callTemplate_1.call(this, ctx, node, key + \`__1\`); } }" @@ -44,10 +47,11 @@ exports[`t-call (template calling) basic caller, no parent node 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"_basic-callee\\" let block1 = createBlock(\`ok\`); - return function template(ctx, node, key = \\"\\") { + return function _basic_callee(ctx, node, key = \\"\\") { return block1(); } }" @@ -58,13 +62,14 @@ exports[`t-call (template calling) call with several sub nodes on same line 1`] ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); let block3 = createBlock(\`hey\`); let block5 = createBlock(\`yay\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b3 = block3(); @@ -83,10 +88,11 @@ exports[`t-call (template calling) call with several sub nodes on same line 2`] ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"sub\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { const b2 = ctx[zero]; return block1([], [b2]); } @@ -98,13 +104,14 @@ exports[`t-call (template calling) cascading t-call t-out='0' 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`subTemplate\`); let block1 = createBlock(\`
\`); let block3 = createBlock(\`hey\`); let block5 = createBlock(\`yay\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b3 = block3(); @@ -123,12 +130,13 @@ exports[`t-call (template calling) cascading t-call t-out='0' 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"subTemplate\\" const callTemplate_1 = app.getTemplate(\`subSubTemplate\`); let block1 = createBlock(\`
\`); let block3 = createBlock(\`cascade 0\`); - return function template(ctx, node, key = \\"\\") { + return function subTemplate(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b3 = block3(); @@ -146,12 +154,13 @@ exports[`t-call (template calling) cascading t-call t-out='0' 3`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"subSubTemplate\\" const callTemplate_1 = app.getTemplate(\`finalTemplate\`); let block1 = createBlock(\`
\`); let block3 = createBlock(\`cascade 1\`); - return function template(ctx, node, key = \\"\\") { + return function subSubTemplate(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b3 = block3(); @@ -169,10 +178,11 @@ exports[`t-call (template calling) cascading t-call t-out='0' 4`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"finalTemplate\\" let block1 = createBlock(\`
cascade 2
\`); - return function template(ctx, node, key = \\"\\") { + return function finalTemplate(ctx, node, key = \\"\\") { const b2 = ctx[zero]; return block1([], [b2]); } @@ -184,12 +194,13 @@ exports[`t-call (template calling) cascading t-call t-out='0', without external ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`subTemplate\`); let block2 = createBlock(\`hey\`); let block4 = createBlock(\`yay\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b2 = block2(); @@ -207,11 +218,12 @@ exports[`t-call (template calling) cascading t-call t-out='0', without external ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"subTemplate\\" const callTemplate_1 = app.getTemplate(\`subSubTemplate\`); let block2 = createBlock(\`cascade 0\`); - return function template(ctx, node, key = \\"\\") { + return function subTemplate(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b2 = block2(); @@ -228,11 +240,12 @@ exports[`t-call (template calling) cascading t-call t-out='0', without external ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"subSubTemplate\\" const callTemplate_1 = app.getTemplate(\`finalTemplate\`); let block2 = createBlock(\`cascade 1\`); - return function template(ctx, node, key = \\"\\") { + return function subSubTemplate(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b2 = block2(); @@ -249,10 +262,11 @@ exports[`t-call (template calling) cascading t-call t-out='0', without external ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"finalTemplate\\" let block2 = createBlock(\`cascade 2\`); - return function template(ctx, node, key = \\"\\") { + return function finalTemplate(ctx, node, key = \\"\\") { const b2 = block2(); const b3 = ctx[zero]; return multi([b2, b3]); @@ -264,11 +278,12 @@ exports[`t-call (template calling) dynamic t-call 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const call = app.callTemplate.bind(app); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { const template1 = (ctx['template']); const b2 = call(this, template1, ctx, node, key + \`__1\`); return block1([], [b2]); @@ -280,10 +295,11 @@ exports[`t-call (template calling) dynamic t-call 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"foo\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function foo(ctx, node, key = \\"\\") { let txt1 = ctx['val']; return block1([txt1]); } @@ -294,10 +310,11 @@ exports[`t-call (template calling) dynamic t-call 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"bar\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function bar(ctx, node, key = \\"\\") { let txt1 = ctx['val']; return block1([txt1]); } @@ -309,11 +326,12 @@ exports[`t-call (template calling) inherit context 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"foo\\", 1); @@ -327,8 +345,9 @@ exports[`t-call (template calling) inherit context 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { return text(ctx['foo']); } }" @@ -339,12 +358,13 @@ exports[`t-call (template calling) nested t-calls with magic variable 0 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`grandchild\`); const callTemplate_2 = app.getTemplate(\`child\`); let block1 = createBlock(\`

Some content...

\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; ctx = Object.create(ctx); @@ -364,8 +384,9 @@ exports[`t-call (template calling) nested t-calls with magic variable 0 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"grandchild\\" - return function template(ctx, node, key = \\"\\") { + return function grandchild(ctx, node, key = \\"\\") { const b2 = text(\`grandchild\`); const b3 = ctx[zero]; return multi([b2, b3]); @@ -378,8 +399,9 @@ exports[`t-call (template calling) nested t-calls with magic variable 0 3`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"child\\" - return function template(ctx, node, key = \\"\\") { + return function child(ctx, node, key = \\"\\") { return ctx[zero]; } }" @@ -389,11 +411,12 @@ exports[`t-call (template calling) recursive template, part 1 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"recursive\\" const callTemplate_1 = app.getTemplate(\`recursive\`); let block1 = createBlock(\`
hey
\`); - return function template(ctx, node, key = \\"\\") { + return function recursive(ctx, node, key = \\"\\") { let b2; if (false) { b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); @@ -408,11 +431,12 @@ exports[`t-call (template calling) recursive template, part 2 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"Parent\\" const callTemplate_1 = app.getTemplate(\`nodeTemplate\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function Parent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -429,11 +453,12 @@ exports[`t-call (template calling) recursive template, part 2 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers; + // Template name: \\"nodeTemplate\\" const callTemplate_1 = app.getTemplate(\`nodeTemplate\`); let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function nodeTemplate(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 let txt1 = ctx['node'].val; @@ -463,11 +488,12 @@ exports[`t-call (template calling) recursive template, part 3 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"Parent\\" const callTemplate_1 = app.getTemplate(\`nodeTemplate\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function Parent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -484,11 +510,12 @@ exports[`t-call (template calling) recursive template, part 3 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers; + // Template name: \\"nodeTemplate\\" const callTemplate_1 = app.getTemplate(\`nodeTemplate\`); let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function nodeTemplate(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 let txt1 = ctx['node'].val; @@ -518,11 +545,12 @@ exports[`t-call (template calling) recursive template, part 4: with t-set recurs ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"Parent\\" const callTemplate_1 = app.getTemplate(\`nodeTemplate\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function Parent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -540,11 +568,12 @@ exports[`t-call (template calling) recursive template, part 4: with t-set recurs ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue, prepareList, withKey } = helpers; + // Template name: \\"nodeTemplate\\" const callTemplate_1 = app.getTemplate(\`nodeTemplate\`); let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function nodeTemplate(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"recursive_idx\\", ctx['recursive_idx']+1); @@ -576,11 +605,12 @@ exports[`t-call (template calling) scoped parameters 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -598,8 +628,9 @@ exports[`t-call (template calling) scoped parameters 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { return text(\`ok\`); } }" @@ -610,11 +641,12 @@ exports[`t-call (template calling) scoped parameters, part 2 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"foo\\", 11); @@ -633,8 +665,9 @@ exports[`t-call (template calling) scoped parameters, part 2 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { return text(ctx['foo']); } }" @@ -644,11 +677,12 @@ exports[`t-call (template calling) t-call allowed on a non t node 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); return block1([], [b2]); } @@ -659,10 +693,11 @@ exports[`t-call (template calling) t-call allowed on a non t node 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`ok\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { return block1(); } }" @@ -672,11 +707,12 @@ exports[`t-call (template calling) t-call on a div with t-call-context 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { let ctx1 = ctx['obj']; const b2 = callTemplate_1.call(this, ctx1, node, key + \`__1\`); return block1([], [b2]); @@ -688,10 +724,11 @@ exports[`t-call (template calling) t-call on a div with t-call-context 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -703,11 +740,12 @@ exports[`t-call (template calling) t-call with body content as root of a templat ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`antony\`); let block1 = createBlock(\`

antony

\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b1 = block1(); @@ -722,10 +760,11 @@ exports[`t-call (template calling) t-call with body content as root of a templat ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"antony\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function antony(ctx, node, key = \\"\\") { const b2 = ctx[zero]; return block1([], [b2]); } @@ -736,11 +775,12 @@ exports[`t-call (template calling) t-call with t-if 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { let b2; if (ctx['flag']) { b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); @@ -754,10 +794,11 @@ exports[`t-call (template calling) t-call with t-if 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`ok\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { return block1(); } }" @@ -768,11 +809,12 @@ exports[`t-call (template calling) t-call with t-set inside and body text conten ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -788,10 +830,11 @@ exports[`t-call (template calling) t-call with t-set inside and body text conten "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx['val']; return block1([txt1]); } @@ -803,11 +846,12 @@ exports[`t-call (template calling) t-call with t-set inside and outside 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -836,10 +880,11 @@ exports[`t-call (template calling) t-call with t-set inside and outside 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx['val3']; return block1([txt1]); } @@ -851,11 +896,12 @@ exports[`t-call (template calling) t-call with t-set inside and outside. 2 1`] = ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"wrapper\\" const callTemplate_1 = app.getTemplate(\`main\`); let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function wrapper(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"w\\", 'fromwrapper'); @@ -870,11 +916,12 @@ exports[`t-call (template calling) t-call with t-set inside and outside. 2 2`] = ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -903,10 +950,11 @@ exports[`t-call (template calling) t-call with t-set inside and outside. 2 3`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block2 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx['val3']; const b2 = block2([txt1]); const b3 = text(ctx['w']); @@ -920,12 +968,13 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"caller\\" const callTemplate_1 = app.getTemplate(\`callee1\`); const callTemplate_2 = app.getTemplate(\`callee2\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function caller(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 let b2,b3; @@ -948,10 +997,11 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"callee1\\" let block1 = createBlock(\`
callee1
\`); - return function template(ctx, node, key = \\"\\") { + return function callee1(ctx, node, key = \\"\\") { return block1(); } }" @@ -961,10 +1011,11 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"callee2\\" let block1 = createBlock(\`
callee2
\`); - return function template(ctx, node, key = \\"\\") { + return function callee2(ctx, node, key = \\"\\") { let txt1 = ctx['v']; return block1([txt1]); } @@ -975,9 +1026,10 @@ exports[`t-call (template calling) t-call-context 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { let ctx1 = ctx['obj']; return callTemplate_1.call(this, ctx1, node, key + \`__1\`); } @@ -988,10 +1040,11 @@ exports[`t-call (template calling) t-call-context 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -1003,9 +1056,10 @@ exports[`t-call (template calling) t-call-context and value in body 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 let ctx1 = ctx['obj']; @@ -1021,10 +1075,11 @@ exports[`t-call (template calling) t-call-context and value in body 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx['value1']; let txt2 = ctx['value2']; return block1([txt1, txt2]); @@ -1037,11 +1092,12 @@ exports[`t-call (template calling) t-esc inside t-call, with t-set outside 1`] = ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"v\\", \`Hi\`); @@ -1055,10 +1111,11 @@ exports[`t-call (template calling) t-esc inside t-call, with t-set outside 2`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx['v']; return block1([txt1]); } @@ -1070,9 +1127,10 @@ exports[`t-call (template calling) with unused body 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b1 = text(\`WHEEE\`); @@ -1086,10 +1144,11 @@ exports[`t-call (template calling) with unused body 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`
ok
\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { return block1(); } }" @@ -1100,9 +1159,10 @@ exports[`t-call (template calling) with unused setbody 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -1117,10 +1177,11 @@ exports[`t-call (template calling) with unused setbody 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`
ok
\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { return block1(); } }" @@ -1131,9 +1192,10 @@ exports[`t-call (template calling) with used body 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b1 = text(\`ok\`); @@ -1148,10 +1210,11 @@ exports[`t-call (template calling) with used body 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"sub\\" let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx[zero]; return block1([txt1]); } @@ -1163,11 +1226,12 @@ exports[`t-call (template calling) with used setbody 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -1183,8 +1247,9 @@ exports[`t-call (template calling) with used setbody 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { return text(ctx['foo']); } }" diff --git a/tests/compiler/__snapshots__/t_esc.test.ts.snap b/tests/compiler/__snapshots__/t_esc.test.ts.snap index 290cc58ca..0a1928444 100644 --- a/tests/compiler/__snapshots__/t_esc.test.ts.snap +++ b/tests/compiler/__snapshots__/t_esc.test.ts.snap @@ -177,12 +177,13 @@ exports[`t-esc t-esc=0 is escaped 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); let block2 = createBlock(\`

escaped

\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b2 = block2(); @@ -198,10 +199,11 @@ exports[`t-esc t-esc=0 is escaped 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"sub\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let txt1 = ctx[zero]; return block1([txt1]); } diff --git a/tests/compiler/__snapshots__/t_foreach.test.ts.snap b/tests/compiler/__snapshots__/t_foreach.test.ts.snap index 1dcee1018..fddd30ec9 100644 --- a/tests/compiler/__snapshots__/t_foreach.test.ts.snap +++ b/tests/compiler/__snapshots__/t_foreach.test.ts.snap @@ -328,12 +328,13 @@ exports[`t-foreach t-call with body in t-foreach in t-foreach 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
[][][]
\`); let block6 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx = Object.create(ctx); @@ -380,8 +381,9 @@ exports[`t-foreach t-call with body in t-foreach in t-foreach 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { const b2 = text(\` [\`); const b3 = text(ctx['a']); const b4 = text(\`] [\`); @@ -399,12 +401,13 @@ exports[`t-foreach t-call without body in t-foreach in t-foreach 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
[][][]
\`); let block6 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['numbers']);; for (let i1 = 0; i1 < l_block2; i1++) { @@ -446,8 +449,9 @@ exports[`t-foreach t-call without body in t-foreach in t-foreach 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"sub\\" - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"c\\", 'x'+'_'+ctx['a']+'_'+ctx['b']); diff --git a/tests/compiler/__snapshots__/t_out.test.ts.snap b/tests/compiler/__snapshots__/t_out.test.ts.snap index 0d01b7188..f962dc82a 100644 --- a/tests/compiler/__snapshots__/t_out.test.ts.snap +++ b/tests/compiler/__snapshots__/t_out.test.ts.snap @@ -32,12 +32,13 @@ exports[`t-out multiple calls to t-out 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); let block2 = createBlock(\`coucou\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b2 = block2(); @@ -53,10 +54,11 @@ exports[`t-out multiple calls to t-out 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"sub\\" let block1 = createBlock(\`
Greeter
\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { const b2 = ctx[zero]; const b3 = ctx[zero]; return block1([], [b2, b3]); @@ -99,12 +101,13 @@ exports[`t-out t-out 0 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, zero } = helpers; + // Template name: \\"caller\\" const callTemplate_1 = app.getTemplate(\`_basic-callee\`); let block1 = createBlock(\`
\`); let block2 = createBlock(\`
zero
\`); - return function template(ctx, node, key = \\"\\") { + return function caller(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1; const b2 = block2(); @@ -120,10 +123,11 @@ exports[`t-out t-out 0 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { zero } = helpers; + // Template name: \\"_basic-callee\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function _basic_callee(ctx, node, key = \\"\\") { const b2 = ctx[zero]; return block1([], [b2]); } diff --git a/tests/compiler/__snapshots__/t_ref.test.ts.snap b/tests/compiler/__snapshots__/t_ref.test.ts.snap index a9d4d1e03..6c4ebe38b 100644 --- a/tests/compiler/__snapshots__/t_ref.test.ts.snap +++ b/tests/compiler/__snapshots__/t_ref.test.ts.snap @@ -48,11 +48,12 @@ exports[`t-ref ref in a t-call 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); return block1([], [b2]); } @@ -63,10 +64,11 @@ exports[`t-ref ref in a t-call 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"sub\\" let block1 = createBlock(\`
12
\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { let ref1 = (el) => this.__owl__.setRef((\`name\`), el); return block1([ref1]); } diff --git a/tests/compiler/__snapshots__/t_set.test.ts.snap b/tests/compiler/__snapshots__/t_set.test.ts.snap index aec7b5b3d..87488c85d 100644 --- a/tests/compiler/__snapshots__/t_set.test.ts.snap +++ b/tests/compiler/__snapshots__/t_set.test.ts.snap @@ -219,11 +219,12 @@ exports[`t-set t-set can't alter from within callee 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"iter\\", 'source'); @@ -240,10 +241,11 @@ exports[`t-set t-set can't alter from within callee 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"sub\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 let txt1 = ctx['iter']; @@ -259,11 +261,12 @@ exports[`t-set t-set can't alter in t-call body 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`sub\`); let block1 = createBlock(\`

\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"iter\\", 'source'); @@ -284,10 +287,11 @@ exports[`t-set t-set can't alter in t-call body 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"sub\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function sub(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 let txt1 = ctx['iter']; diff --git a/tests/compiler/__snapshots__/template_set.test.ts.snap b/tests/compiler/__snapshots__/template_set.test.ts.snap index 370787a8c..69aa9cb5a 100644 --- a/tests/compiler/__snapshots__/template_set.test.ts.snap +++ b/tests/compiler/__snapshots__/template_set.test.ts.snap @@ -4,10 +4,11 @@ exports[`loading templates addTemplates does not modify its xml document in plac "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"hey\\" let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function hey(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -18,10 +19,11 @@ exports[`loading templates can initialize qweb with a string 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"hey\\" let block1 = createBlock(\`
jupiler
\`); - return function template(ctx, node, key = \\"\\") { + return function hey(ctx, node, key = \\"\\") { return block1(); } }" @@ -31,10 +33,11 @@ exports[`loading templates can initialize qweb with an XMLDocument 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"hey\\" let block1 = createBlock(\`
jupiler
\`); - return function template(ctx, node, key = \\"\\") { + return function hey(ctx, node, key = \\"\\") { return block1(); } }" @@ -44,11 +47,12 @@ exports[`loading templates can load a few templates from a xml string 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`items\`); let block1 = createBlock(\`
\`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); return block1([], [b2]); } @@ -59,11 +63,12 @@ exports[`loading templates can load a few templates from a xml string 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"items\\" let block2 = createBlock(\`
  • ok
  • \`); let block3 = createBlock(\`
  • foo
  • \`); - return function template(ctx, node, key = \\"\\") { + return function items(ctx, node, key = \\"\\") { const b2 = block2(); const b3 = block3(); return multi([b2, b3]); @@ -75,11 +80,12 @@ exports[`loading templates can load a few templates from an XMLDocument 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"main\\" const callTemplate_1 = app.getTemplate(\`items\`); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function main(ctx, node, key = \\"\\") { const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`); return block1([], [b2]); } @@ -90,11 +96,12 @@ exports[`loading templates can load a few templates from an XMLDocument 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"items\\" let block2 = createBlock(\`
  • ok
  • \`); let block3 = createBlock(\`
  • foo
  • \`); - return function template(ctx, node, key = \\"\\") { + return function items(ctx, node, key = \\"\\") { const b2 = block2(); const b3 = block3(); return multi([b2, b3]); diff --git a/tests/compiler/__snapshots__/translation.test.ts.snap b/tests/compiler/__snapshots__/translation.test.ts.snap index 6e493cb33..0810d4f35 100644 --- a/tests/compiler/__snapshots__/translation.test.ts.snap +++ b/tests/compiler/__snapshots__/translation.test.ts.snap @@ -5,8 +5,9 @@ exports[`translation support body of t-sets are translated 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"label\\", \`translated\`); @@ -20,8 +21,9 @@ exports[`translation support body of t-sets inside translation=off are not trans ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"label\\", \`untranslated\`); @@ -35,6 +37,7 @@ exports[`translation support body of t-sets with html content are translated 1`] ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, LazyValue, safeOutput } = helpers; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    translated
    \`); @@ -42,7 +45,7 @@ exports[`translation support body of t-sets with html content are translated 1`] return block1(); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx[\`label\`] = new LazyValue(value1, ctx, this, node, key); @@ -56,6 +59,7 @@ exports[`translation support body of t-sets with text and html content are trans ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, LazyValue, safeOutput } = helpers; + // Template name: \\"xml_template_999\\" let block3 = createBlock(\`
    translated
    \`); @@ -65,7 +69,7 @@ exports[`translation support body of t-sets with text and html content are trans return multi([b2, b3]); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 ctx[\`label\`] = new LazyValue(value1, ctx, this, node, key); @@ -78,10 +82,11 @@ exports[`translation support can set and remove translatable attributes 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -91,10 +96,11 @@ exports[`translation support can translate node content 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    mot
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -104,10 +110,11 @@ exports[`translation support does not translate node content if disabled 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    motword
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -117,10 +124,11 @@ exports[`translation support some attributes are translated 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    mot

    mot

    mot

    mot

    mot

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -131,8 +139,9 @@ exports[`translation support t-set and falsy t-value: t-body are translated 1`] ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { isBoundary, withDefault, setContextValue } = helpers; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); ctx[isBoundary] = 1 setContextValue(ctx, \\"label\\", withDefault(false, \`translated\`)); @@ -145,10 +154,11 @@ exports[`translation support translation is done on the trimmed text, with extra "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    mot
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -158,10 +168,11 @@ exports[`translation support translation works, even if initial string has inner "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    un mot
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" diff --git a/tests/components/__snapshots__/basics.test.ts.snap b/tests/components/__snapshots__/basics.test.ts.snap index 0cb031295..120b9809b 100644 --- a/tests/components/__snapshots__/basics.test.ts.snap +++ b/tests/components/__snapshots__/basics.test.ts.snap @@ -4,9 +4,10 @@ exports[`basics GrandChild display is controlled by its GrandParent 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(null, false, false, false, [\\"displayGrandChild\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { const Comp1 = ctx['myComp']; return toggler(Comp1, comp1({displayGrandChild: ctx['displayGrandChild']}, (Comp1).name + key + \`__1\`, node, this, Comp1)); } @@ -17,9 +18,10 @@ exports[`basics GrandChild display is controlled by its GrandParent 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`GrandChild\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Child(ctx, node, key = \\"\\") { let b2; if (ctx['props'].displayGrandChild) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -33,10 +35,11 @@ exports[`basics GrandChild display is controlled by its GrandParent 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_GrandChild(ctx, node, key = \\"\\") { return block1(); } }" @@ -46,11 +49,12 @@ exports[`basics Multi root component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block2 = createBlock(\`1\`); let block4 = createBlock(\`2\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { const b2 = block2(); const b3 = text(\`text\`); const b4 = block4(); @@ -63,9 +67,10 @@ exports[`basics a class component inside a class component, no external dom 1`] "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -75,10 +80,11 @@ exports[`basics a class component inside a class component, no external dom 2`] "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    simple vnode
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -88,10 +94,11 @@ exports[`basics a component cannot be mounted in a detached node (even if node i "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return block1(); } }" @@ -101,11 +108,12 @@ exports[`basics a component inside a component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -116,10 +124,11 @@ exports[`basics a component inside a component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    simple vnode
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -129,10 +138,11 @@ exports[`basics can be clicked on and updated 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Counter(ctx, node, key = \\"\\") { let txt1 = ctx['state'].counter; const v1 = ctx['state']; let hdlr1 = [()=>v1.counter++, ctx]; @@ -145,11 +155,12 @@ exports[`basics can handle empty props 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({val: undefined}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -160,10 +171,11 @@ exports[`basics can handle empty props 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; return block1([txt1]); } @@ -174,9 +186,10 @@ exports[`basics can inject values in tagged templates 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; - const callTemplate_1 = app.getTemplate(\`__template__999\`); + // Template name: \\"xml_template_1000\\" + const callTemplate_1 = app.getTemplate(\`xml_template_999\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return callTemplate_1.call(this, ctx, node, key + \`__1\`); } }" @@ -186,10 +199,11 @@ exports[`basics can inject values in tagged templates 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999(ctx, node, key = \\"\\") { let txt1 = ctx['state'].n; return block1([txt1]); } @@ -200,8 +214,9 @@ exports[`basics can mount a component with just some text 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return text(\`just text\`); } }" @@ -211,8 +226,9 @@ exports[`basics can mount a component with no text 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return text(\`\`); } }" @@ -222,10 +238,11 @@ exports[`basics can mount a simple component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`simple vnode\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return block1(); } }" @@ -235,11 +252,12 @@ exports[`basics can mount a simple component with multiple roots 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block2 = createBlock(\`\`); let block3 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { const b2 = block2(); const b3 = block3(); return multi([b2, b3]); @@ -251,10 +269,11 @@ exports[`basics can mount a simple component with props 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { let txt1 = ctx['props'].value; return block1([txt1]); } @@ -265,9 +284,10 @@ exports[`basics child can be updated 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].counter}, key + \`__1\`, node, this, null); } }" @@ -277,8 +297,9 @@ exports[`basics child can be updated 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return text(ctx['props'].value); } }" @@ -288,10 +309,11 @@ exports[`basics class component with dynamic text 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`My value: \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -302,9 +324,10 @@ exports[`basics class parent, class child component with props 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({value: 42}, key + \`__1\`, node, this, null); } }" @@ -314,10 +337,11 @@ exports[`basics class parent, class child component with props 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['props'].value; return block1([txt1]); } @@ -328,9 +352,10 @@ exports[`basics component children doesn't leak (if case) 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['ifVar']) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -344,10 +369,11 @@ exports[`basics component children doesn't leak (if case) 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -357,9 +383,10 @@ exports[`basics component children doesn't leak (t-key case) 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const tKey_1 = ctx['keyVar']; return toggler(tKey_1, comp1({}, tKey_1 + key + \`__1\`, node, this, null)); } @@ -370,10 +397,11 @@ exports[`basics component children doesn't leak (t-key case) 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -383,10 +411,11 @@ exports[`basics component with dynamic content can be updated 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -397,10 +426,11 @@ exports[`basics do not remove previously rendered dom if not necessary 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -410,10 +440,11 @@ exports[`basics do not remove previously rendered dom if not necessary, variatio "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    h1

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { let txt1 = ctx['state'].value; return block1([txt1]); } @@ -424,9 +455,10 @@ exports[`basics higher order components parent and child 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"child\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_Parent(ctx, node, key = \\"\\") { return comp1({child: ctx['state'].child}, key + \`__1\`, node, this, null); } }" @@ -436,10 +468,11 @@ exports[`basics higher order components parent and child 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ChildA\`, true, false, false, []); const comp2 = app.createComponent(\`ChildB\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Child(ctx, node, key = \\"\\") { let b2,b3; if (ctx['props'].child==='a') { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -455,10 +488,11 @@ exports[`basics higher order components parent and child 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    a
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ChildA(ctx, node, key = \\"\\") { return block1(); } }" @@ -468,10 +502,11 @@ exports[`basics higher order components parent and child 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`b\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ChildB(ctx, node, key = \\"\\") { return block1(); } }" @@ -482,13 +517,14 @@ exports[`basics list of two sub components inside other nodes 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`SubWidget\`, true, false, false, []); const comp2 = app.createComponent(\`SubWidget\`, true, false, false, []); let block1 = createBlock(\`
    \`); let block3 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].blips);; for (let i1 = 0; i1 < l_block2; i1++) { @@ -508,10 +544,11 @@ exports[`basics list of two sub components inside other nodes 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`asdf\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SubWidget(ctx, node, key = \\"\\") { return block1(); } }" @@ -521,9 +558,10 @@ exports[`basics parent, child and grandchild 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -533,9 +571,10 @@ exports[`basics parent, child and grandchild 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`GrandChild\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Child(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -545,10 +584,11 @@ exports[`basics parent, child and grandchild 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    hey
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_GrandChild(ctx, node, key = \\"\\") { return block1(); } }" @@ -558,10 +598,11 @@ exports[`basics props is set on root component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`simple vnode\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return block1(); } }" @@ -571,10 +612,11 @@ exports[`basics props value are own property of props object 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`simple vnode\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return block1(); } }" @@ -584,10 +626,11 @@ exports[`basics props value are own property of props object, even with default "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`simple vnode\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return block1(); } }" @@ -597,12 +640,13 @@ exports[`basics reconciliation alg is not confused in some specific situation 1` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); const comp2 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); const tKey_1 = 4; const b3 = toggler(tKey_1, comp2({}, tKey_1 + key + \`__2\`, node, this, null)); @@ -615,10 +659,11 @@ exports[`basics reconciliation alg is not confused in some specific situation 2` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`child\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -628,9 +673,10 @@ exports[`basics rerendering a widget with a sub widget 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Counter\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -640,10 +686,11 @@ exports[`basics rerendering a widget with a sub widget 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Counter(ctx, node, key = \\"\\") { let txt1 = ctx['state'].counter; const v1 = ctx['state']; let hdlr1 = [()=>v1.counter++, ctx]; @@ -656,12 +703,13 @@ exports[`basics same t-keys in two different places 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"blip\\"]); const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"blip\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const tKey_1 = 1; const b2 = toggler(tKey_1, comp1({blip: '1'}, tKey_1 + key + \`__1\`, node, this, null)); const tKey_2 = 1; @@ -675,10 +723,11 @@ exports[`basics same t-keys in two different places 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['props'].blip; return block1([txt1]); } @@ -689,10 +738,11 @@ exports[`basics simple component with a dynamic text 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -703,10 +753,11 @@ exports[`basics simple component, useState 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { let txt1 = ctx['state'].value; return block1([txt1]); } @@ -717,10 +768,11 @@ exports[`basics some simple sanity checks (el/status) 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`simple vnode\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return block1(); } }" @@ -730,6 +782,7 @@ exports[`basics sub components between t-ifs 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); @@ -737,7 +790,7 @@ exports[`basics sub components between t-ifs 1`] = ` let block3 = createBlock(\`

    noo

    \`); let block5 = createBlock(\`test\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3,b4,b5; if (ctx['state'].flag) { b2 = block2(); @@ -757,10 +810,11 @@ exports[`basics sub components between t-ifs 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`child\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -770,12 +824,13 @@ exports[`basics t-elif works with t-component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); let block2 = createBlock(\`
    somediv
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].flag) { b2 = block2(); @@ -791,10 +846,11 @@ exports[`basics t-elif works with t-component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`hey\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -804,12 +860,13 @@ exports[`basics t-else with empty string works with t-component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); let block2 = createBlock(\`
    somediv
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].flag) { b2 = block2(); @@ -825,10 +882,11 @@ exports[`basics t-else with empty string works with t-component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`hey\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -838,12 +896,13 @@ exports[`basics t-else works with t-component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); let block2 = createBlock(\`
    somediv
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].flag) { b2 = block2(); @@ -859,10 +918,11 @@ exports[`basics t-else works with t-component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`hey\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -872,11 +932,12 @@ exports[`basics t-if works with t-component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['state'].flag) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -890,10 +951,11 @@ exports[`basics t-if works with t-component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`hey\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -903,12 +965,13 @@ exports[`basics t-key on a component with t-if, and a sibling component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); const comp2 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; if (false) { const tKey_1 = 'str'; @@ -924,10 +987,11 @@ exports[`basics t-key on a component with t-if, and a sibling component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`child\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -937,11 +1001,12 @@ exports[`basics text after a conditional component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['state'].hasChild) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -956,10 +1021,11 @@ exports[`basics text after a conditional component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    simple vnode

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -969,9 +1035,10 @@ exports[`basics three level of components with collapsing root nodes 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -981,9 +1048,10 @@ exports[`basics three level of components with collapsing root nodes 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`GrandChild\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Child(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -993,10 +1061,11 @@ exports[`basics three level of components with collapsing root nodes 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    2
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_GrandChild(ctx, node, key = \\"\\") { return block1(); } }" @@ -1006,10 +1075,11 @@ exports[`basics two child components 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); const comp2 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); const b3 = comp2({}, key + \`__2\`, node, this, null); return multi([b2, b3]); @@ -1021,10 +1091,11 @@ exports[`basics two child components 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    simple vnode
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -1034,11 +1105,12 @@ exports[`basics update props of component without concrete own node 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`Child\`, true, false, true, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { const tKey_1 = ctx['childProps'].key; const b2 = toggler(tKey_1, comp1(Object.assign({}, ctx['childProps']), tKey_1 + key + \`__1\`, node, this, null)); return block1([], [b2]); @@ -1050,9 +1122,10 @@ exports[`basics update props of component without concrete own node 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Custom\`, true, false, false, [\\"key\\",\\"subKey\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Child(ctx, node, key = \\"\\") { const tKey_1 = ctx['props'].subKey; return toggler(tKey_1, comp1({key: ctx['props'].key,subKey: ctx['props'].subKey}, tKey_1 + key + \`__1\`, node, this, null)); } @@ -1063,10 +1136,11 @@ exports[`basics update props of component without concrete own node 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    __
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Custom(ctx, node, key = \\"\\") { let txt1 = ctx['props'].key; let txt2 = ctx['props'].subKey; return block1([txt1, txt2]); @@ -1079,8 +1153,9 @@ exports[`basics updating a component with t-foreach as root 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['items']);; for (let i1 = 0; i1 < l_block1; i1++) { @@ -1097,9 +1172,10 @@ exports[`basics updating widget immediately 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"flag\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({flag: ctx['state'].flag}, key + \`__1\`, node, this, null); } }" @@ -1109,10 +1185,11 @@ exports[`basics updating widget immediately 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`abc\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let b2; if (ctx['props'].flag) { b2 = text(\`def\`); @@ -1127,11 +1204,12 @@ exports[`basics widget after a t-foreach 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`SomeComponent\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Test(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block2, v_block2, l_block2, c_block2] = prepareList(Array(2));; for (let i1 = 0; i1 < l_block2; i1++) { @@ -1152,10 +1230,11 @@ exports[`basics widget after a t-foreach 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -1165,9 +1244,10 @@ exports[`basics zero or one child components 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['state'].hasChild) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -1181,10 +1261,11 @@ exports[`basics zero or one child components 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    simple vnode
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -1194,10 +1275,11 @@ exports[`mount targets can mount a component (with default position='last-child' "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    app
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return block1(); } }" @@ -1207,10 +1289,11 @@ exports[`mount targets can mount a component (with position='first-child') 1`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    app
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return block1(); } }" @@ -1220,10 +1303,11 @@ exports[`mount targets default mount option is 'last-child' 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    app
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return block1(); } }" @@ -1233,10 +1317,11 @@ exports[`mount targets mount function: can mount a component (with default posit "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    app
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return block1(); } }" @@ -1246,11 +1331,12 @@ exports[`support svg components add proper namespace to svg 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`GComp\`, true, false, false, []); let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Svg(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -1261,10 +1347,11 @@ exports[`support svg components add proper namespace to svg 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_GComp(ctx, node, key = \\"\\") { return block1(); } }" @@ -1275,10 +1362,11 @@ exports[`t-out in components can render list of t-out 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, safeOutput, withKey } = helpers; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].items);; for (let i1 = 0; i1 < l_block2; i1++) { @@ -1299,8 +1387,9 @@ exports[`t-out in components can switch the contents of two t-out repeatedly 1`] ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { safeOutput } = helpers; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { const b2 = safeOutput(ctx['state'].a); const b3 = safeOutput(ctx['state'].b); return multi([b2, b3]); @@ -1313,8 +1402,9 @@ exports[`t-out in components t-out and updating falsy values, 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { safeOutput } = helpers; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { return safeOutput(ctx['state'].a); } }" @@ -1325,10 +1415,11 @@ exports[`t-out in components update properly on state changes 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { safeOutput } = helpers; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { const b2 = safeOutput(ctx['state'].value); return block1([], [b2]); } diff --git a/tests/components/__snapshots__/concurrency.test.ts.snap b/tests/components/__snapshots__/concurrency.test.ts.snap index a3c864910..ab6e34746 100644 --- a/tests/components/__snapshots__/concurrency.test.ts.snap +++ b/tests/components/__snapshots__/concurrency.test.ts.snap @@ -5,9 +5,10 @@ exports[`Cascading renders after microtaskTick 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); const b3 = text(\` _ \`); ctx = Object.create(ctx); @@ -28,9 +29,10 @@ exports[`Cascading renders after microtaskTick 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Element\`, true, false, false, [\\"id\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Child(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['state']);; for (let i1 = 0; i1 < l_block1; i1++) { @@ -47,8 +49,9 @@ exports[`Cascading renders after microtaskTick 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Element(ctx, node, key = \\"\\") { return text(ctx['props'].id); } }" @@ -58,9 +61,10 @@ exports[`another scenario with delayed rendering 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { let b2,b3; b2 = text(\`A\`); if (ctx['state'].value<15) { @@ -75,9 +79,10 @@ exports[`another scenario with delayed rendering 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`C\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { const b2 = text(ctx['props'].value); const b3 = comp1({}, key + \`__1\`, node, this, null); return multi([b2, b3]); @@ -89,10 +94,11 @@ exports[`another scenario with delayed rendering 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { let hdlr1 = [ctx['increment'], ctx]; let txt1 = ctx['state'].val; return block1([hdlr1, txt1]); @@ -104,10 +110,11 @@ exports[`async rendering destroying a widget before start is over 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_W(ctx, node, key = \\"\\") { return block1(); } }" @@ -117,9 +124,10 @@ exports[`calling render in destroy 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"fromA\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { const tKey_1 = ctx['key']; return toggler(tKey_1, comp1({fromA: ctx['state']}, tKey_1 + key + \`__1\`, node, this, null)); } @@ -130,9 +138,10 @@ exports[`calling render in destroy 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`C\`, true, false, false, [\\"fromA\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { return comp1({fromA: ctx['props'].fromA}, key + \`__1\`, node, this, null); } }" @@ -142,10 +151,11 @@ exports[`calling render in destroy 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; return block1([txt1]); } @@ -156,10 +166,11 @@ exports[`change state and call manually render: no unnecessary rendering 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Test(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -170,11 +181,12 @@ exports[`changing state before first render does not trigger a render (with pare "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`TestW\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['state'].flag) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -188,10 +200,11 @@ exports[`changing state before first render does not trigger a render (with pare "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_TestW(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -202,10 +215,11 @@ exports[`changing state before first render does not trigger a render 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_TestW(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -216,9 +230,10 @@ exports[`component destroyed just after render 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`B\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_A(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -228,8 +243,9 @@ exports[`component destroyed just after render 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_B(ctx, node, key = \\"\\") { const b2 = text(\`B\`); const b3 = text(ctx['state'].value); return multi([b2, b3]); @@ -241,9 +257,10 @@ exports[`components are not destroyed between animation frame 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { let b2,b3; b2 = text(\`A\`); if (ctx['state'].flag) { @@ -258,9 +275,10 @@ exports[`components are not destroyed between animation frame 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`C\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { const b2 = text(\`B\`); const b3 = comp1({}, key + \`__1\`, node, this, null); return multi([b2, b3]); @@ -272,8 +290,9 @@ exports[`components are not destroyed between animation frame 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { return text(\`C\`); } }" @@ -283,11 +302,12 @@ exports[`concurrent renderings scenario 1 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -298,11 +318,12 @@ exports[`concurrent renderings scenario 1 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentC\`, true, false, false, [\\"fromA\\",\\"fromB\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentB(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['props'].fromA,fromB: ctx['state'].fromB}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -313,10 +334,11 @@ exports[`concurrent renderings scenario 1 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentC(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['someValue'](); return block1([txt1, txt2]); @@ -328,11 +350,12 @@ exports[`concurrent renderings scenario 2 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ComponentA(ctx, node, key = \\"\\") { let txt1 = ctx['state'].fromA; const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([txt1], [b2]); @@ -344,11 +367,12 @@ exports[`concurrent renderings scenario 2 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentC\`, true, false, false, [\\"fromA\\",\\"fromB\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentB(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['props'].fromA,fromB: ctx['state'].fromB}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -359,10 +383,11 @@ exports[`concurrent renderings scenario 2 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentC(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['props'].fromB; return block1([txt1, txt2]); @@ -374,11 +399,12 @@ exports[`concurrent renderings scenario 2bis 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -389,11 +415,12 @@ exports[`concurrent renderings scenario 2bis 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentC\`, true, false, false, [\\"fromA\\",\\"fromB\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentB(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['props'].fromA,fromB: ctx['state'].fromB}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -404,10 +431,11 @@ exports[`concurrent renderings scenario 2bis 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentC(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['props'].fromB; return block1([txt1, txt2]); @@ -419,11 +447,12 @@ exports[`concurrent renderings scenario 3 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -434,11 +463,12 @@ exports[`concurrent renderings scenario 3 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ComponentC\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ComponentB(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['props'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -449,11 +479,12 @@ exports[`concurrent renderings scenario 3 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentD\`, true, false, false, [\\"fromA\\",\\"fromC\\"]); let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentC(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['props'].fromA,fromC: ctx['state'].fromC}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -464,10 +495,11 @@ exports[`concurrent renderings scenario 3 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentD(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['someValue'](); return block1([txt1, txt2]); @@ -479,11 +511,12 @@ exports[`concurrent renderings scenario 4 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -494,11 +527,12 @@ exports[`concurrent renderings scenario 4 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ComponentC\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ComponentB(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['props'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -509,11 +543,12 @@ exports[`concurrent renderings scenario 4 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentD\`, true, false, false, [\\"fromA\\",\\"fromC\\"]); let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentC(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['props'].fromA,fromC: ctx['state'].fromC}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -524,10 +559,11 @@ exports[`concurrent renderings scenario 4 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentD(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['someValue'](); return block1([txt1, txt2]); @@ -539,11 +575,12 @@ exports[`concurrent renderings scenario 5 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -554,10 +591,11 @@ exports[`concurrent renderings scenario 5 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentB(ctx, node, key = \\"\\") { let txt1 = ctx['someValue'](); return block1([txt1]); } @@ -568,11 +606,12 @@ exports[`concurrent renderings scenario 6 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -583,10 +622,11 @@ exports[`concurrent renderings scenario 6 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentB(ctx, node, key = \\"\\") { let txt1 = ctx['someValue'](); return block1([txt1]); } @@ -597,11 +637,12 @@ exports[`concurrent renderings scenario 7 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -612,10 +653,11 @@ exports[`concurrent renderings scenario 7 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentB(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['someValue'](); return block1([txt1, txt2]); @@ -627,11 +669,12 @@ exports[`concurrent renderings scenario 8 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -642,10 +685,11 @@ exports[`concurrent renderings scenario 8 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentB(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['state'].fromB; return block1([txt1, txt2]); @@ -657,12 +701,13 @@ exports[`concurrent renderings scenario 9 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"fromA\\"]); const comp2 = app.createComponent(\`ComponentC\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_ComponentA(ctx, node, key = \\"\\") { let txt1 = ctx['state'].fromA; const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); const b3 = comp2({fromA: ctx['state'].fromA}, key + \`__2\`, node, this, null); @@ -675,10 +720,11 @@ exports[`concurrent renderings scenario 9 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ComponentB(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; return block1([txt1]); } @@ -689,11 +735,12 @@ exports[`concurrent renderings scenario 9 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentD\`, true, false, false, [\\"fromA\\",\\"fromC\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentC(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['props'].fromA,fromC: ctx['state'].fromC}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -704,10 +751,11 @@ exports[`concurrent renderings scenario 9 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentD(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['props'].fromC; return block1([txt1, txt2]); @@ -719,11 +767,12 @@ exports[`concurrent renderings scenario 10 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ComponentB\`, true, false, false, [\\"value\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ComponentA(ctx, node, key = \\"\\") { const b2 = comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -734,11 +783,12 @@ exports[`concurrent renderings scenario 10 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ComponentC\`, true, false, false, [\\"value\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ComponentB(ctx, node, key = \\"\\") { let b2; if (ctx['state'].hasChild) { b2 = comp1({value: ctx['props'].value}, key + \`__1\`, node, this, null); @@ -752,10 +802,11 @@ exports[`concurrent renderings scenario 10 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ComponentC(ctx, node, key = \\"\\") { let txt1 = ctx['value']; return block1([txt1]); } @@ -766,11 +817,12 @@ exports[`concurrent renderings scenario 11 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({val: ctx['state'].valA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -781,10 +833,11 @@ exports[`concurrent renderings scenario 11 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`|\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; let txt2 = ctx['val']; return block1([txt1, txt2]); @@ -796,11 +849,12 @@ exports[`concurrent renderings scenario 12 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({val: ctx['val']}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -811,10 +865,11 @@ exports[`concurrent renderings scenario 12 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; return block1([txt1]); } @@ -825,12 +880,13 @@ exports[`concurrent renderings scenario 13 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); const comp2 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; b2 = comp1({}, key + \`__1\`, node, this, null); if (ctx['state'].bool) { @@ -845,10 +901,11 @@ exports[`concurrent renderings scenario 13 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['state'].val; return block1([txt1]); } @@ -859,11 +916,12 @@ exports[`concurrent renderings scenario 14 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -874,11 +932,12 @@ exports[`concurrent renderings scenario 14 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`C\`, true, false, false, [\\"fromB\\",\\"fromA\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { const b2 = comp1({fromB: ctx['state'].fromB,fromA: ctx['props'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -889,10 +948,11 @@ exports[`concurrent renderings scenario 14 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['props'].fromB; let txt3 = ctx['state'].fromC; @@ -905,11 +965,12 @@ exports[`concurrent renderings scenario 15 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"fromA\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { const b2 = comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -920,11 +981,12 @@ exports[`concurrent renderings scenario 15 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`C\`, true, false, false, [\\"fromB\\",\\"fromA\\"]); let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { const b2 = comp1({fromB: ctx['state'].fromB,fromA: ctx['props'].fromA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -935,10 +997,11 @@ exports[`concurrent renderings scenario 15 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { let txt1 = ctx['props'].fromA; let txt2 = ctx['props'].fromB; let txt3 = ctx['state'].fromC; @@ -951,9 +1014,10 @@ exports[`concurrent renderings scenario 16 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"fromA\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_A(ctx, node, key = \\"\\") { return comp1({fromA: ctx['state'].fromA}, key + \`__1\`, node, this, null); } }" @@ -963,9 +1027,10 @@ exports[`concurrent renderings scenario 16 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`C\`, true, false, false, [\\"fromB\\",\\"fromA\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_B(ctx, node, key = \\"\\") { return comp1({fromB: ctx['state'].fromB,fromA: ctx['props'].fromA}, key + \`__1\`, node, this, null); } }" @@ -975,9 +1040,10 @@ exports[`concurrent renderings scenario 16 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`D\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_C(ctx, node, key = \\"\\") { let b2,b3,b4,b5,b6,b7,b8; b2 = text(ctx['props'].fromA); b3 = text(\`:\`); @@ -997,8 +1063,9 @@ exports[`concurrent renderings scenario 16 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_D(ctx, node, key = \\"\\") { return text(\`D\`); } }" @@ -1008,10 +1075,11 @@ exports[`creating two async components, scenario 1 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ChildA\`, true, false, false, []); const comp2 = app.createComponent(\`ChildB\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].flagA) { b2 = comp1({}, key + \`__1\`, node, this, null); @@ -1028,10 +1096,11 @@ exports[`creating two async components, scenario 1 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ChildA(ctx, node, key = \\"\\") { let txt1 = ctx['getValue'](); return block1([txt1]); } @@ -1042,10 +1111,11 @@ exports[`creating two async components, scenario 1 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`b\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ChildB(ctx, node, key = \\"\\") { return block1(); } }" @@ -1055,12 +1125,13 @@ exports[`creating two async components, scenario 2 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ChildA\`, true, false, false, [\\"val\\"]); const comp2 = app.createComponent(\`ChildB\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { let b2,b3; b2 = comp1({val: ctx['state'].valA}, key + \`__1\`, node, this, null); if (ctx['state'].flagB) { @@ -1075,10 +1146,11 @@ exports[`creating two async components, scenario 2 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`a\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ChildA(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; return block1([txt1]); } @@ -1089,10 +1161,11 @@ exports[`creating two async components, scenario 2 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`b\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ChildB(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; return block1([txt1]); } @@ -1103,12 +1176,13 @@ exports[`creating two async components, scenario 3 (patching in the same frame) "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ChildA\`, true, false, false, [\\"val\\"]); const comp2 = app.createComponent(\`ChildB\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { let b2,b3; b2 = comp1({val: ctx['state'].valA}, key + \`__1\`, node, this, null); if (ctx['state'].flagB) { @@ -1123,10 +1197,11 @@ exports[`creating two async components, scenario 3 (patching in the same frame) "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`a\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ChildA(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; return block1([txt1]); } @@ -1137,10 +1212,11 @@ exports[`creating two async components, scenario 3 (patching in the same frame) "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`b\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ChildB(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; return block1([txt1]); } @@ -1151,9 +1227,10 @@ exports[`delay willUpdateProps 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); } }" @@ -1163,8 +1240,9 @@ exports[`delay willUpdateProps 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { const b2 = text(ctx['props'].value); const b3 = text(\`_\`); const b4 = text(ctx['state'].int); @@ -1177,9 +1255,10 @@ exports[`delay willUpdateProps with rendering grandchild 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`Parent\`, true, false, false, [\\"state\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_GrandParent(ctx, node, key = \\"\\") { return comp1({state: ctx['state']}, key + \`__1\`, node, this, null); } }" @@ -1189,10 +1268,11 @@ exports[`delay willUpdateProps with rendering grandchild 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`DelayedChild\`, true, false, false, [\\"value\\"]); const comp2 = app.createComponent(\`ReactiveChild\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { const b2 = comp1({value: ctx['props'].state.value}, key + \`__1\`, node, this, null); const b3 = comp2({}, key + \`__2\`, node, this, null); return multi([b2, b3]); @@ -1204,8 +1284,9 @@ exports[`delay willUpdateProps with rendering grandchild 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_DelayedChild(ctx, node, key = \\"\\") { const b2 = text(ctx['props'].value); const b3 = text(\`_\`); const b4 = text(ctx['state'].int); @@ -1218,10 +1299,11 @@ exports[`delay willUpdateProps with rendering grandchild 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ReactiveChild(ctx, node, key = \\"\\") { return block1(); } }" @@ -1231,9 +1313,10 @@ exports[`delayed fiber does not get rendered if it was cancelled 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`B\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_A(ctx, node, key = \\"\\") { const b2 = text(\`A\`); const b3 = comp1({}, key + \`__1\`, node, this, null); return multi([b2, b3]); @@ -1245,9 +1328,10 @@ exports[`delayed fiber does not get rendered if it was cancelled 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`C\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_B(ctx, node, key = \\"\\") { const b2 = text(\`B\`); const b3 = comp1({}, key + \`__1\`, node, this, null); return multi([b2, b3]); @@ -1259,9 +1343,10 @@ exports[`delayed fiber does not get rendered if it was cancelled 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`D\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_C(ctx, node, key = \\"\\") { const b2 = text(\`C\`); const b3 = comp1({}, key + \`__1\`, node, this, null); return multi([b2, b3]); @@ -1273,8 +1358,9 @@ exports[`delayed fiber does not get rendered if it was cancelled 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_D(ctx, node, key = \\"\\") { return text(\`D\`); } }" @@ -1284,9 +1370,10 @@ exports[`delayed render does not go through when t-component value changed 1`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(null, false, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { const b2 = text(\`A\`); const Comp1 = ctx['state'].component; const b3 = toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1)); @@ -1299,8 +1386,9 @@ exports[`delayed render does not go through when t-component value changed 2`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { const b2 = text(\`B\`); const b3 = text(ctx['state'].val); return multi([b2, b3]); @@ -1312,8 +1400,9 @@ exports[`delayed render does not go through when t-component value changed 3`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { return text(\`C\`); } }" @@ -1323,9 +1412,10 @@ exports[`delayed render is not cancelled by upcoming render 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"state\\",\\"isEmpty\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_A(ctx, node, key = \\"\\") { return comp1({state: ctx['state'],isEmpty: ctx['state'].groups.length===0}, key + \`__1\`, node, this, null); } }" @@ -1335,8 +1425,9 @@ exports[`delayed render is not cancelled by upcoming render 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_B(ctx, node, key = \\"\\") { const b2 = text(ctx['props'].state.groups.length); const b3 = text(ctx['props'].state.config.test); return multi([b2, b3]); @@ -1348,9 +1439,10 @@ exports[`delayed rendering, but then initial rendering is cancelled by yet anoth "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_A(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); } }" @@ -1360,9 +1452,10 @@ exports[`delayed rendering, but then initial rendering is cancelled by yet anoth "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`C\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_B(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].someValue+ctx['props'].value}, key + \`__1\`, node, this, null); } }" @@ -1372,11 +1465,12 @@ exports[`delayed rendering, but then initial rendering is cancelled by yet anoth "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`D\`, true, false, false, []); let block3 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_C(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); let txt1 = ctx['props'].value; const b3 = block3([txt1]); @@ -1389,10 +1483,11 @@ exports[`delayed rendering, but then initial rendering is cancelled by yet anoth "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_D(ctx, node, key = \\"\\") { let hdlr1 = [ctx['increment'], ctx]; let txt1 = ctx['state'].val; return block1([hdlr1, txt1]); @@ -1404,9 +1499,10 @@ exports[`delayed rendering, destruction, stuff happens 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_A(ctx, node, key = \\"\\") { const b2 = text(\`A\`); const b3 = comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); return multi([b2, b3]); @@ -1418,9 +1514,10 @@ exports[`delayed rendering, destruction, stuff happens 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`C\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_B(ctx, node, key = \\"\\") { let b2,b3; b2 = text(\`B\`); if (ctx['state'].hasChild) { @@ -1435,11 +1532,12 @@ exports[`delayed rendering, destruction, stuff happens 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`D\`, true, false, false, []); let block4 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_C(ctx, node, key = \\"\\") { const b2 = text(\`C\`); const b3 = comp1({}, key + \`__1\`, node, this, null); let txt1 = ctx['props'].value; @@ -1453,10 +1551,11 @@ exports[`delayed rendering, destruction, stuff happens 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block3 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_D(ctx, node, key = \\"\\") { const b2 = text(\`D\`); let hdlr1 = [ctx['increment'], ctx]; let txt1 = ctx['state'].val; @@ -1470,9 +1569,10 @@ exports[`delayed rendering, reusing fiber and stuff 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); } }" @@ -1482,9 +1582,10 @@ exports[`delayed rendering, reusing fiber and stuff 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`C\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { const b2 = text(ctx['props'].value); const b3 = comp1({}, key + \`__1\`, node, this, null); return multi([b2, b3]); @@ -1496,10 +1597,11 @@ exports[`delayed rendering, reusing fiber and stuff 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { let hdlr1 = [ctx['increment'], ctx]; let txt1 = ctx['state'].val; return block1([hdlr1, txt1]); @@ -1511,9 +1613,10 @@ exports[`delayed rendering, reusing fiber then component is destroyed and stuff "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { let b2,b3; b2 = text(\`A\`); if (ctx['state'].value<15) { @@ -1528,9 +1631,10 @@ exports[`delayed rendering, reusing fiber then component is destroyed and stuff "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`C\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { const b2 = text(ctx['props'].value); const b3 = comp1({}, key + \`__1\`, node, this, null); return multi([b2, b3]); @@ -1542,10 +1646,11 @@ exports[`delayed rendering, reusing fiber then component is destroyed and stuff "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { let hdlr1 = [ctx['increment'], ctx]; let txt1 = ctx['state'].val; return block1([hdlr1, txt1]); @@ -1557,9 +1662,10 @@ exports[`delayed rendering, then component is destroyed and stuff 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); } }" @@ -1569,9 +1675,10 @@ exports[`delayed rendering, then component is destroyed and stuff 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`C\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_B(ctx, node, key = \\"\\") { let b2,b3; b2 = text(ctx['props'].value); if (ctx['props'].value<10) { @@ -1586,10 +1693,11 @@ exports[`delayed rendering, then component is destroyed and stuff 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_C(ctx, node, key = \\"\\") { let hdlr1 = [ctx['increment'], ctx]; let txt1 = ctx['state'].val; return block1([hdlr1, txt1]); @@ -1601,10 +1709,11 @@ exports[`destroyed component causes other soon to be destroyed component to rere "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"value\\"]); const comp2 = app.createComponent(\`C\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_A(ctx, node, key = \\"\\") { let b2,b3; b2 = text(\` A \`); if (ctx['state'].flag) { @@ -1621,8 +1730,9 @@ exports[`destroyed component causes other soon to be destroyed component to rere "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_B(ctx, node, key = \\"\\") { return text(ctx['props'].value); } }" @@ -1632,8 +1742,9 @@ exports[`destroyed component causes other soon to be destroyed component to rere "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_C(ctx, node, key = \\"\\") { return text(ctx['state'].val+ctx['props'].value); } }" @@ -1643,9 +1754,10 @@ exports[`destroying/recreating a subcomponent, other scenario 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; b2 = text(\`parent\`); if (ctx['state'].hasChild) { @@ -1660,8 +1772,9 @@ exports[`destroying/recreating a subcomponent, other scenario 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return text(\`child\`); } }" @@ -1671,11 +1784,12 @@ exports[`destroying/recreating a subwidget with different props (if start is not "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_W(ctx, node, key = \\"\\") { let b2; if (ctx['state'].val>1) { b2 = comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null); @@ -1689,10 +1803,11 @@ exports[`destroying/recreating a subwidget with different props (if start is not "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`child:\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; return block1([txt1]); } @@ -1703,9 +1818,10 @@ exports[`parent and child rendered at exact same time 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); } }" @@ -1715,8 +1831,9 @@ exports[`parent and child rendered at exact same time 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return text(ctx['props'].value); } }" @@ -1726,11 +1843,12 @@ exports[`properly behave when destroyed/unmounted while rendering 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['state'].flag) { b2 = comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null); @@ -1744,11 +1862,12 @@ exports[`properly behave when destroyed/unmounted while rendering 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`SubChild\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Child(ctx, node, key = \\"\\") { const b2 = comp1({val: ctx['props'].val}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -1759,10 +1878,11 @@ exports[`properly behave when destroyed/unmounted while rendering 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_SubChild(ctx, node, key = \\"\\") { return block1(); } }" @@ -1772,11 +1892,12 @@ exports[`rendering component again in next microtick 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; let hdlr1 = [ctx['onClick'], ctx]; if (ctx['env'].config.flag) { @@ -1791,10 +1912,11 @@ exports[`rendering component again in next microtick 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    Child
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -1804,9 +1926,10 @@ exports[`rendering parent twice, with different props on child and stuff 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); } }" @@ -1816,8 +1939,9 @@ exports[`rendering parent twice, with different props on child and stuff 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return text(ctx['props'].value); } }" @@ -1827,10 +1951,11 @@ exports[`renderings, destruction, patch, stuff, ... yet another variation 1`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`B\`, true, false, false, [\\"value\\"]); const comp2 = app.createComponent(\`D\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_A(ctx, node, key = \\"\\") { const b2 = text(\`A\`); const b3 = comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); const b4 = comp2({}, key + \`__2\`, node, this, null); @@ -1843,9 +1968,10 @@ exports[`renderings, destruction, patch, stuff, ... yet another variation 2`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`C\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_B(ctx, node, key = \\"\\") { let b2,b3; b2 = text(\`B\`); if (ctx['props'].value===33) { @@ -1860,10 +1986,11 @@ exports[`renderings, destruction, patch, stuff, ... yet another variation 3`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block3 = createBlock(\`

    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_D(ctx, node, key = \\"\\") { const b2 = text(\`D\`); let hdlr1 = [ctx['increment'], ctx]; let txt1 = ctx['state'].val; @@ -1877,10 +2004,11 @@ exports[`renderings, destruction, patch, stuff, ... yet another variation 4`] = "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block3 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_C(ctx, node, key = \\"\\") { const b2 = text(\`C\`); let hdlr1 = [ctx['increment'], ctx]; let txt1 = ctx['state'].val; @@ -1895,9 +2023,10 @@ exports[`t-foreach with dynamic async component 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, withKey } = helpers; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(null, false, false, false, [\\"key\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['list']);; for (let i1 = 0; i1 < l_block1; i1++) { @@ -1920,10 +2049,11 @@ exports[`t-foreach with dynamic async component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['props'].key; return block1([txt1]); } @@ -1934,11 +2064,12 @@ exports[`t-key on dom node having a component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(null, false, false, false, [\\"key\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const tKey_1 = ctx['key']; const Comp1 = ctx['myComp']; const b2 = toggler(tKey_1, toggler(Comp1, comp1({key: ctx['key']}, (Comp1).name + tKey_1 + key + \`__1\`, node, this, Comp1))); @@ -1951,8 +2082,9 @@ exports[`t-key on dom node having a component 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return text(ctx['props'].key); } }" @@ -1962,9 +2094,10 @@ exports[`t-key on dynamic async component (toggler is never patched) 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(null, false, false, false, [\\"key\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const tKey_1 = ctx['key']; const Comp1 = ctx['myComp']; return toggler(tKey_1, toggler(Comp1, comp1({key: ctx['key']}, (Comp1).name + tKey_1 + key + \`__1\`, node, this, Comp1))); @@ -1976,10 +2109,11 @@ exports[`t-key on dynamic async component (toggler is never patched) 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['props'].key; return block1([txt1]); } @@ -1990,11 +2124,12 @@ exports[`two renderings initiated between willPatch and patched 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Panel\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2; if (ctx['state'].flag) { const tKey_1 = 'panel_'+ctx['state'].panel; @@ -2009,10 +2144,11 @@ exports[`two renderings initiated between willPatch and patched 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Panel(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; let txt2 = ctx['mounted']; return block1([txt1, txt2]); @@ -2024,9 +2160,10 @@ exports[`two sequential renderings before an animation frame 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null); } }" @@ -2036,8 +2173,9 @@ exports[`two sequential renderings before an animation frame 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return text(ctx['props'].value); } }" @@ -2047,11 +2185,12 @@ exports[`update a sub-component twice in the same frame 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ChildA\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({val: ctx['state'].valA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -2062,10 +2201,11 @@ exports[`update a sub-component twice in the same frame 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ChildA(ctx, node, key = \\"\\") { let txt1 = ctx['props'].val; return block1([txt1]); } @@ -2076,11 +2216,12 @@ exports[`update a sub-component twice in the same frame, 2 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ChildA\`, true, false, false, [\\"val\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({val: ctx['state'].valA}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -2091,10 +2232,11 @@ exports[`update a sub-component twice in the same frame, 2 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ChildA(ctx, node, key = \\"\\") { let txt1 = ctx['val'](); return block1([txt1]); } diff --git a/tests/components/__snapshots__/error_handling.test.ts.snap b/tests/components/__snapshots__/error_handling.test.ts.snap index e326292d0..476f6ff87 100644 --- a/tests/components/__snapshots__/error_handling.test.ts.snap +++ b/tests/components/__snapshots__/error_handling.test.ts.snap @@ -4,9 +4,10 @@ exports[`basics display a nice error if a component is not a component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" const comp1 = app.createComponent(\`SomeComponent\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -16,9 +17,10 @@ exports[`basics display a nice error if a non-root component template fails to c "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -28,9 +30,10 @@ exports[`basics display a nice error if it cannot find component (in dev mode) 1 "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" const comp1 = app.createComponent(\`SomeMispelledComponent\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Parent(ctx, node, key = \\"\\") { const props1 = {}; helpers.validateProps(\`SomeMispelledComponent\`, props1, this); return comp1(props1, key + \`__1\`, node, this, null); @@ -42,9 +45,10 @@ exports[`basics display a nice error if it cannot find component 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" const comp1 = app.createComponent(\`SomeMispelledComponent\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -54,11 +58,12 @@ exports[`basics display a nice error if the components key is missing with subco "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" const comp1 = app.createComponent(\`MissingChild\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -69,11 +74,12 @@ exports[`basics no component catching error lead to full app destruction 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, [\\"flag\\"]); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({flag: ctx['state'].flag}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -84,10 +90,11 @@ exports[`basics no component catching error lead to full app destruction 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    hey
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { let txt1 = ctx['props'].flag&&ctx['state'].this.will.crash; return block1([txt1]); } @@ -98,11 +105,12 @@ exports[`basics simple catchError 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Boom\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; if (ctx['error']) { b2 = text(\`Error\`); @@ -118,10 +126,11 @@ exports[`basics simple catchError 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Boom(ctx, node, key = \\"\\") { let txt1 = ctx['a'].b.c; return block1([txt1]); } @@ -132,8 +141,9 @@ exports[`can catch errors Errors have the right cause 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return text(ctx['state'].value); } }" @@ -143,8 +153,9 @@ exports[`can catch errors Errors in owl lifecycle are wrapped in dev mode: async "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return text(ctx['state'].value); } }" @@ -154,8 +165,9 @@ exports[`can catch errors Errors in owl lifecycle are wrapped out of dev mode: a "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return text(ctx['state'].value); } }" @@ -165,8 +177,9 @@ exports[`can catch errors Errors in owl lifecycle are wrapped outside dev mode: "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return text(ctx['state'].value); } }" @@ -176,8 +189,9 @@ exports[`can catch errors Thrown values that are not errors are wrapped in dev m "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return text(ctx['state'].value); } }" @@ -187,8 +201,9 @@ exports[`can catch errors Thrown values that are not errors are wrapped outside "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return text(ctx['state'].value); } }" @@ -198,9 +213,10 @@ exports[`can catch errors an error in onWillDestroy 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; b2 = text(ctx['state'].value); if (ctx['state'].hasChild) { @@ -215,10 +231,11 @@ exports[`can catch errors an error in onWillDestroy 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    abc
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -228,9 +245,10 @@ exports[`can catch errors an error in onWillDestroy, variation 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let b2,b3; b2 = text(ctx['state'].value); if (ctx['state'].hasChild) { @@ -245,10 +263,11 @@ exports[`can catch errors an error in onWillDestroy, variation 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    abc
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -258,8 +277,9 @@ exports[`can catch errors calling a hook outside setup should crash 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return text(ctx['state'].value); } }" @@ -270,6 +290,7 @@ exports[`can catch errors can catch an error in a component render function 1`] ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, [\\"flag\\"]); const comp2 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -279,7 +300,7 @@ exports[`can catch errors can catch an error in a component render function 1`] return comp1({flag: ctx['state'].flag}, key + \`__1\`, node, this, null); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_App(ctx, node, key = \\"\\") { const b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null); return block1([], [b3]); } @@ -291,10 +312,11 @@ exports[`can catch errors can catch an error in a component render function 2`] ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -310,10 +332,11 @@ exports[`can catch errors can catch an error in a component render function 3`] "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    hey
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { let txt1 = ctx['props'].flag&&ctx['state'].this.will.crash; return block1([txt1]); } @@ -325,6 +348,7 @@ exports[`can catch errors can catch an error in the constructor call of a compon ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, []); const comp2 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -334,7 +358,7 @@ exports[`can catch errors can catch an error in the constructor call of a compon return comp1({}, key + \`__1\`, node, this, null); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_App(ctx, node, key = \\"\\") { const b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null); return block1([], [b3]); } @@ -346,10 +370,11 @@ exports[`can catch errors can catch an error in the constructor call of a compon ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -366,6 +391,7 @@ exports[`can catch errors can catch an error in the constructor call of a compon ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`ClassicCompoent\`, true, false, false, []); const comp2 = app.createComponent(\`ErrorComponent\`, true, false, false, []); const comp3 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -378,7 +404,7 @@ exports[`can catch errors can catch an error in the constructor call of a compon return multi([b3, b4]); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_App(ctx, node, key = \\"\\") { const b5 = comp3({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__3\`, node, this, null); return block1([], [b5]); } @@ -390,10 +416,11 @@ exports[`can catch errors can catch an error in the constructor call of a compon ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1001\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -409,10 +436,11 @@ exports[`can catch errors can catch an error in the constructor call of a compon "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    classic
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ClassicCompoent(ctx, node, key = \\"\\") { return block1(); } }" @@ -422,10 +450,11 @@ exports[`can catch errors can catch an error in the constructor call of a compon "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    Some text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -435,10 +464,11 @@ exports[`can catch errors can catch an error in the constructor call of a compon "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    Some text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -449,6 +479,7 @@ exports[`can catch errors can catch an error in the initial call of a component ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, []); const comp2 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -458,7 +489,7 @@ exports[`can catch errors can catch an error in the initial call of a component return comp1({}, key + \`__1\`, node, this, null); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_App(ctx, node, key = \\"\\") { const b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null); return block1([], [b3]); } @@ -470,10 +501,11 @@ exports[`can catch errors can catch an error in the initial call of a component ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -489,10 +521,11 @@ exports[`can catch errors can catch an error in the initial call of a component "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    hey
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { let txt1 = ctx['state'].this.will.crash; return block1([txt1]); } @@ -504,6 +537,7 @@ exports[`can catch errors can catch an error in the initial call of a component ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, []); const comp2 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -513,7 +547,7 @@ exports[`can catch errors can catch an error in the initial call of a component return comp1({}, key + \`__1\`, node, this, null); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_App(ctx, node, key = \\"\\") { let b3; if (ctx['state'].flag) { b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null); @@ -528,10 +562,11 @@ exports[`can catch errors can catch an error in the initial call of a component ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -547,10 +582,11 @@ exports[`can catch errors can catch an error in the initial call of a component "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    hey
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { let txt1 = ctx['state'].this.will.crash; return block1([txt1]); } @@ -561,9 +597,10 @@ exports[`can catch errors can catch an error in the mounted call (in child of ch "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`B\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_A(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -573,11 +610,12 @@ exports[`can catch errors can catch an error in the mounted call (in child of ch "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`C\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_B(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -588,11 +626,12 @@ exports[`can catch errors can catch an error in the mounted call (in child of ch "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Boom\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_C(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -608,10 +647,11 @@ exports[`can catch errors can catch an error in the mounted call (in child of ch "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    Some text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Boom(ctx, node, key = \\"\\") { return block1(); } }" @@ -621,11 +661,12 @@ exports[`can catch errors can catch an error in the mounted call (in root compon "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Root(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -641,10 +682,11 @@ exports[`can catch errors can catch an error in the mounted call (in root compon "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    Some text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -655,6 +697,7 @@ exports[`can catch errors can catch an error in the mounted call 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, []); const comp2 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -664,7 +707,7 @@ exports[`can catch errors can catch an error in the mounted call 1`] = ` return comp1({}, key + \`__1\`, node, this, null); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Root(ctx, node, key = \\"\\") { const b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null); return block1([], [b3]); } @@ -676,10 +719,11 @@ exports[`can catch errors can catch an error in the mounted call 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -695,10 +739,11 @@ exports[`can catch errors can catch an error in the mounted call 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    Some text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -709,6 +754,7 @@ exports[`can catch errors can catch an error in the willPatch call 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, [\\"message\\"]); const comp2 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -718,7 +764,7 @@ exports[`can catch errors can catch an error in the willPatch call 1`] = ` return comp1({message: ctx['state'].message}, key + \`__1\`, node, this, null); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_App(ctx, node, key = \\"\\") { let txt1 = ctx['state'].message; const b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null); return block1([txt1], [b3]); @@ -731,10 +777,11 @@ exports[`can catch errors can catch an error in the willPatch call 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -750,10 +797,11 @@ exports[`can catch errors can catch an error in the willPatch call 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { let txt1 = ctx['props'].message; return block1([txt1]); } @@ -765,6 +813,7 @@ exports[`can catch errors can catch an error in the willStart call 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, []); const comp2 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -774,7 +823,7 @@ exports[`can catch errors can catch an error in the willStart call 1`] = ` return comp1({}, key + \`__1\`, node, this, null); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_App(ctx, node, key = \\"\\") { const b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null); return block1([], [b3]); } @@ -786,10 +835,11 @@ exports[`can catch errors can catch an error in the willStart call 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -805,10 +855,11 @@ exports[`can catch errors can catch an error in the willStart call 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    Some text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -819,6 +870,7 @@ exports[`can catch errors can catch an error origination from a child's willStar ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`ClassicCompoent\`, true, false, false, []); const comp2 = app.createComponent(\`ErrorComponent\`, true, false, false, []); const comp3 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -831,7 +883,7 @@ exports[`can catch errors can catch an error origination from a child's willStar return multi([b3, b4]); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_App(ctx, node, key = \\"\\") { const b5 = comp3({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__3\`, node, this, null); return block1([], [b5]); } @@ -843,10 +895,11 @@ exports[`can catch errors can catch an error origination from a child's willStar ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1001\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -862,10 +915,11 @@ exports[`can catch errors can catch an error origination from a child's willStar "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    classic
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ClassicCompoent(ctx, node, key = \\"\\") { return block1(); } }" @@ -875,10 +929,11 @@ exports[`can catch errors can catch an error origination from a child's willStar "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    Some text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -888,11 +943,12 @@ exports[`can catch errors catchError in catchError 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Parent(ctx, node, key = \\"\\") { let b2,b3; if (ctx['error']) { b2 = text(\`Error\`); @@ -908,11 +964,12 @@ exports[`can catch errors catchError in catchError 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Boom\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Child(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -923,10 +980,11 @@ exports[`can catch errors catchError in catchError 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Boom(ctx, node, key = \\"\\") { let txt1 = ctx['a'].b.c; return block1([txt1]); } @@ -938,6 +996,7 @@ exports[`can catch errors catching error, rethrow, render parent -- a main comp ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, capture, markRaw, withKey } = helpers; + // Template name: \\"xml_template_1003\\" const comp1 = app.createComponent(null, false, false, false, []); const comp2 = app.createComponent(\`ErrorHandler\`, true, true, false, [\\"onError\\"]); @@ -946,7 +1005,7 @@ exports[`can catch errors catching error, rethrow, render parent -- a main comp return toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1)); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1003_Parent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block1, v_block1, l_block1, c_block1] = prepareList(Object.values(ctx['state'].cps));; for (let i1 = 0; i1 < l_block1; i1++) { @@ -967,8 +1026,9 @@ exports[`can catch errors catching error, rethrow, render parent -- a main comp ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1002\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_ErrorHandler(ctx, node, key = \\"\\") { return callSlot(ctx, node, key, 'default', false, {}); } }" @@ -978,9 +1038,10 @@ exports[`can catch errors catching error, rethrow, render parent -- a main comp "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`ErrorComponent\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Child(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -990,10 +1051,11 @@ exports[`can catch errors catching error, rethrow, render parent -- a main comp "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -1003,10 +1065,11 @@ exports[`can catch errors catching error, rethrow, render parent -- a main comp "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" let block1 = createBlock(\`
    Sibling
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Sibling(ctx, node, key = \\"\\") { return block1(); } }" @@ -1017,6 +1080,7 @@ exports[`can catch errors catching in child makes parent render 1`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { prepareList, capture, markRaw, withKey } = helpers; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(null, false, false, false, [\\"id\\"]); const comp2 = app.createComponent(\`Catch\`, true, true, false, [\\"onError\\"]); @@ -1025,7 +1089,7 @@ exports[`can catch errors catching in child makes parent render 1`] = ` return toggler(Comp1, comp1({id: ctx['elem'][0]}, (Comp1).name + key + \`__1\`, node, this, Comp1)); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_Parent(ctx, node, key = \\"\\") { ctx = Object.create(ctx); const [k_block1, v_block1, l_block1, c_block1] = prepareList(Object.entries(ctx['this'].elements));; for (let i1 = 0; i1 < l_block1; i1++) { @@ -1046,8 +1110,9 @@ exports[`can catch errors catching in child makes parent render 2`] = ` ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1001\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_Catch(ctx, node, key = \\"\\") { return callSlot(ctx, node, key, 'default', false, {}); } }" @@ -1057,10 +1122,11 @@ exports[`can catch errors catching in child makes parent render 3`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorComp(ctx, node, key = \\"\\") { return block1(); } }" @@ -1070,10 +1136,11 @@ exports[`can catch errors catching in child makes parent render 4`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = 'Child '+ctx['props'].id; return block1([txt1]); } @@ -1085,6 +1152,7 @@ exports[`can catch errors error in mounted on a component with a sibling (proper ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { markRaw } = helpers; + // Template name: \\"xml_template_1002\\" const comp1 = app.createComponent(\`OK\`, true, false, false, []); const comp2 = app.createComponent(\`ErrorComponent\`, true, false, false, []); const comp3 = app.createComponent(\`ErrorBoundary\`, true, true, false, []); @@ -1095,7 +1163,7 @@ exports[`can catch errors error in mounted on a component with a sibling (proper return comp2({}, key + \`__2\`, node, this, null); } - return function template(ctx, node, key = \\"\\") { + return function xml_template_1002_Root(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); const b4 = comp3({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__3\`, node, this, null); return block1([], [b2, b4]); @@ -1107,8 +1175,9 @@ exports[`can catch errors error in mounted on a component with a sibling (proper "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1001\\" - return function template(ctx, node, key = \\"\\") { + return function xml_template_1001_OK(ctx, node, key = \\"\\") { return text(\`OK\`); } }" @@ -1119,10 +1188,11 @@ exports[`can catch errors error in mounted on a component with a sibling (proper ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; let { callSlot } = helpers; + // Template name: \\"xml_template_1000\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_ErrorBoundary(ctx, node, key = \\"\\") { let b2,b3; if (ctx['state'].error) { b2 = text(\`Error handled\`); @@ -1138,10 +1208,11 @@ exports[`can catch errors error in mounted on a component with a sibling (proper "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    Some text
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_ErrorComponent(ctx, node, key = \\"\\") { return block1(); } }" @@ -1151,9 +1222,10 @@ exports[`can catch errors onError in class inheritance is called if rethrown 1`] "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Concrete\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -1163,10 +1235,11 @@ exports[`can catch errors onError in class inheritance is called if rethrown 2`] "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Concrete(ctx, node, key = \\"\\") { let b2,b3; if (!ctx['state'].error) { b2 = text(ctx['this'].will.crash); @@ -1182,9 +1255,10 @@ exports[`can catch errors onError in class inheritance is not called if no rethr "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Concrete\`, true, false, false, []); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { return comp1({}, key + \`__1\`, node, this, null); } }" @@ -1194,10 +1268,11 @@ exports[`can catch errors onError in class inheritance is not called if no rethr "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Concrete(ctx, node, key = \\"\\") { let b2,b3; if (!ctx['state'].error) { b2 = text(ctx['this'].will.crash); @@ -1213,11 +1288,12 @@ exports[`errors and promises a rendering error in a sub component will reject th "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); return block1([], [b2]); } @@ -1228,10 +1304,11 @@ exports[`errors and promises a rendering error in a sub component will reject th "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { let txt1 = ctx['this'].will.crash; return block1([txt1]); } @@ -1242,10 +1319,11 @@ exports[`errors and promises a rendering error will reject the mount promise 1`] "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { let txt1 = ctx['this'].will.crash; return block1([txt1]); } @@ -1256,11 +1334,12 @@ exports[`errors and promises a rendering error will reject the render promise (w "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { const b2 = comp1({}, key + \`__1\`, node, this, null); let txt1 = ctx['x'].y; return block1([txt1], [b2]); @@ -1272,10 +1351,11 @@ exports[`errors and promises a rendering error will reject the render promise (w "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -1285,10 +1365,11 @@ exports[`errors and promises a rendering error will reject the render promise 1` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { let b2; if (ctx['flag']) { b2 = text(ctx['this'].will.crash); @@ -1302,10 +1383,11 @@ exports[`errors and promises an error in mounted call will reject the mount prom "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    abc
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return block1(); } }" @@ -1315,10 +1397,11 @@ exports[`errors and promises an error in onMounted callback will have the compon "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    abc
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return block1(); } }" @@ -1328,10 +1411,11 @@ exports[`errors and promises an error in patched call will reject the render pro "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { let txt1 = ctx['val']; return block1([txt1]); } @@ -1342,10 +1426,11 @@ exports[`errors and promises an error in willPatch call will reject the render p "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { let txt1 = ctx['val']; return block1([txt1]); } @@ -1356,10 +1441,11 @@ exports[`errors and promises errors in mounted and in willUnmount 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Example(ctx, node, key = \\"\\") { return block1(); } }" @@ -1369,10 +1455,11 @@ exports[`errors and promises errors in onWillRender/onRender aren't wrapped more "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    abc
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return block1(); } }" @@ -1382,10 +1469,11 @@ exports[`errors and promises errors in rerender 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Example(ctx, node, key = \\"\\") { let txt1 = ctx['state'].a.b; return block1([txt1]); } @@ -1396,10 +1484,11 @@ exports[`errors and promises wrapped errors in async code are correctly caught 1 "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    abc
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Root(ctx, node, key = \\"\\") { return block1(); } }" diff --git a/tests/components/__snapshots__/event_handling.test.ts.snap b/tests/components/__snapshots__/event_handling.test.ts.snap index 3884bf074..b2fdc76aa 100644 --- a/tests/components/__snapshots__/event_handling.test.ts.snap +++ b/tests/components/__snapshots__/event_handling.test.ts.snap @@ -4,10 +4,11 @@ exports[`event handling Invalid handler throws an error 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Parent(ctx, node, key = \\"\\") { let hdlr1 = [ctx['dosomething'], ctx]; return block1([hdlr1]); } @@ -18,10 +19,11 @@ exports[`event handling handler is not called if component is destroyed 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Parent(ctx, node, key = \\"\\") { let hdlr1 = [ctx['click'], ctx]; return block1([hdlr1]); } @@ -32,11 +34,12 @@ exports[`event handling handler receive the event as argument 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_1000_Parent(ctx, node, key = \\"\\") { let hdlr1 = [ctx['inc'], ctx]; const b2 = comp1({}, key + \`__1\`, node, this, null); let txt1 = ctx['state'].value; @@ -49,10 +52,11 @@ exports[`event handling handler receive the event as argument 2`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`
    simple vnode
    \`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Child(ctx, node, key = \\"\\") { return block1(); } }" @@ -62,10 +66,11 @@ exports[`event handling handler works when app is mounted in an iframe 1`] = ` "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_999\\" let block1 = createBlock(\`click me\`); - return function template(ctx, node, key = \\"\\") { + return function xml_template_999_Parent(ctx, node, key = \\"\\") { let hdlr1 = [ctx['inc'], ctx]; return block1([hdlr1]); } @@ -76,11 +81,12 @@ exports[`event handling input blur event is not called if component is destroyed "function anonymous(app, bdom, helpers ) { let { text, createBlock, list, multi, html, toggler, comment } = bdom; + // Template name: \\"xml_template_1000\\" const comp1 = app.createComponent(\`Child\`, true, false, false, []); let block1 = createBlock(\`