[REF] simplify template definition

This commit is contained in:
Géry Debongnie
2022-05-26 15:09:09 +02:00
committed by Sam Degueldre
parent 98b58b505b
commit 2b4d8874c7
52 changed files with 1519 additions and 1535 deletions
@@ -1,7 +1,7 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
exports[`style and class handling can set class on multi root component 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -12,7 +12,7 @@ exports[`style and class handling can set class on multi root component 1`] = `
`;
exports[`style and class handling can set class on multi root component 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -29,7 +29,7 @@ exports[`style and class handling can set class on multi root component 2`] = `
`;
exports[`style and class handling can set class on sub component, as prop 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -40,7 +40,7 @@ exports[`style and class handling can set class on sub component, as prop 1`] =
`;
exports[`style and class handling can set class on sub component, as prop 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -54,7 +54,7 @@ exports[`style and class handling can set class on sub component, as prop 2`] =
`;
exports[`style and class handling can set class on sub sub component 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -65,7 +65,7 @@ exports[`style and class handling can set class on sub sub component 1`] = `
`;
exports[`style and class handling can set class on sub sub component 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -76,7 +76,7 @@ exports[`style and class handling can set class on sub sub component 2`] = `
`;
exports[`style and class handling can set class on sub sub component 3`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -90,7 +90,7 @@ exports[`style and class handling can set class on sub sub component 3`] = `
`;
exports[`style and class handling can set more than one class on sub component 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -101,7 +101,7 @@ exports[`style and class handling can set more than one class on sub component 1
`;
exports[`style and class handling can set more than one class on sub component 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -115,7 +115,7 @@ exports[`style and class handling can set more than one class on sub component 2
`;
exports[`style and class handling can set style and class inside component 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -128,7 +128,7 @@ exports[`style and class handling can set style and class inside component 1`] =
`;
exports[`style and class handling class on components do not interfere with user defined classes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -142,7 +142,7 @@ exports[`style and class handling class on components do not interfere with user
`;
exports[`style and class handling class on sub component, which is switched to another 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -153,7 +153,7 @@ exports[`style and class handling class on sub component, which is switched to a
`;
exports[`style and class handling class on sub component, which is switched to another 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -170,7 +170,7 @@ exports[`style and class handling class on sub component, which is switched to a
`;
exports[`style and class handling class on sub component, which is switched to another 3`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -184,7 +184,7 @@ exports[`style and class handling class on sub component, which is switched to a
`;
exports[`style and class handling class on sub component, which is switched to another 4`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -198,7 +198,7 @@ exports[`style and class handling class on sub component, which is switched to a
`;
exports[`style and class handling class with extra whitespaces (variation) 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -212,7 +212,7 @@ exports[`style and class handling class with extra whitespaces (variation) 1`] =
`;
exports[`style and class handling class with extra whitespaces (variation) 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -226,7 +226,7 @@ exports[`style and class handling class with extra whitespaces (variation) 2`] =
`;
exports[`style and class handling class with extra whitespaces 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -237,7 +237,7 @@ exports[`style and class handling class with extra whitespaces 1`] = `
`;
exports[`style and class handling class with extra whitespaces 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -251,7 +251,7 @@ exports[`style and class handling class with extra whitespaces 2`] = `
`;
exports[`style and class handling component class and parent class combine together 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -262,7 +262,7 @@ exports[`style and class handling component class and parent class combine toget
`;
exports[`style and class handling component class and parent class combine together 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -303,7 +303,7 @@ exports[`style and class handling dynamic t-att-style is properly added and upda
`;
exports[`style and class handling empty class attribute is not added on widget root el 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -317,7 +317,7 @@ exports[`style and class handling empty class attribute is not added on widget r
`;
exports[`style and class handling empty class attribute is not added on widget root el 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -331,7 +331,7 @@ exports[`style and class handling empty class attribute is not added on widget r
`;
exports[`style and class handling error in subcomponent with class 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -342,7 +342,7 @@ exports[`style and class handling error in subcomponent with class 1`] = `
`;
exports[`style and class handling error in subcomponent with class 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -357,7 +357,7 @@ exports[`style and class handling error in subcomponent with class 2`] = `
`;
exports[`style and class handling no class is set is child ignores it 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -368,7 +368,7 @@ exports[`style and class handling no class is set is child ignores it 1`] = `
`;
exports[`style and class handling no class is set is child ignores it 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -381,7 +381,7 @@ exports[`style and class handling no class is set is child ignores it 2`] = `
`;
exports[`style and class handling no class is set is parent does not give it as prop 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -392,7 +392,7 @@ exports[`style and class handling no class is set is parent does not give it as
`;
exports[`style and class handling no class is set is parent does not give it as prop 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -406,7 +406,7 @@ exports[`style and class handling no class is set is parent does not give it as
`;
exports[`style and class handling style is properly added on widget root el 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -417,7 +417,7 @@ exports[`style and class handling style is properly added on widget root el 1`]
`;
exports[`style and class handling style is properly added on widget root el 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -431,7 +431,7 @@ exports[`style and class handling style is properly added on widget root el 2`]
`;
exports[`style and class handling t-att-class is properly added/removed on widget root el (v2) 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -445,7 +445,7 @@ exports[`style and class handling t-att-class is properly added/removed on widge
`;
exports[`style and class handling t-att-class is properly added/removed on widget root el (v2) 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -459,7 +459,7 @@ exports[`style and class handling t-att-class is properly added/removed on widge
`;
exports[`style and class handling t-att-class is properly added/removed on widget root el (v3) 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -470,7 +470,7 @@ exports[`style and class handling t-att-class is properly added/removed on widge
`;
exports[`style and class handling t-att-class is properly added/removed on widget root el (v3) 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;