[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[`attributes changing a class with t-att-class (preexisting class 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -15,7 +15,7 @@ exports[`attributes changing a class with t-att-class (preexisting class 1`] = `
`;
exports[`attributes changing a class with t-att-class 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -29,7 +29,7 @@ exports[`attributes changing a class with t-att-class 1`] = `
`;
exports[`attributes changing an attribute with t-att- 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -43,7 +43,7 @@ exports[`attributes changing an attribute with t-att- 1`] = `
`;
exports[`attributes class and t-att-class should combine together 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -57,7 +57,7 @@ exports[`attributes class and t-att-class should combine together 1`] = `
`;
exports[`attributes class and t-attf-class with ternary operation 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -71,7 +71,7 @@ exports[`attributes class and t-attf-class with ternary operation 1`] = `
`;
exports[`attributes dynamic attribute evaluating to 0 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -85,7 +85,7 @@ exports[`attributes dynamic attribute evaluating to 0 1`] = `
`;
exports[`attributes dynamic attribute falsy variable 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -99,7 +99,7 @@ exports[`attributes dynamic attribute falsy variable 1`] = `
`;
exports[`attributes dynamic attribute with a dash 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -113,7 +113,7 @@ exports[`attributes dynamic attribute with a dash 1`] = `
`;
exports[`attributes dynamic attributes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -127,7 +127,7 @@ exports[`attributes dynamic attributes 1`] = `
`;
exports[`attributes dynamic class attribute 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -141,7 +141,7 @@ exports[`attributes dynamic class attribute 1`] = `
`;
exports[`attributes dynamic class attribute evaluating to 0 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -155,7 +155,7 @@ exports[`attributes dynamic class attribute evaluating to 0 1`] = `
`;
exports[`attributes dynamic empty class attribute 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -169,7 +169,7 @@ exports[`attributes dynamic empty class attribute 1`] = `
`;
exports[`attributes dynamic formatted attributes with a dash 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -183,7 +183,7 @@ exports[`attributes dynamic formatted attributes with a dash 1`] = `
`;
exports[`attributes dynamic undefined class attribute 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -197,7 +197,7 @@ exports[`attributes dynamic undefined class attribute 1`] = `
`;
exports[`attributes dynamic undefined generic attribute 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -211,7 +211,7 @@ exports[`attributes dynamic undefined generic attribute 1`] = `
`;
exports[`attributes fixed variable 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -225,7 +225,7 @@ exports[`attributes fixed variable 1`] = `
`;
exports[`attributes format expression 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -239,7 +239,7 @@ exports[`attributes format expression 1`] = `
`;
exports[`attributes format literal 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -253,7 +253,7 @@ exports[`attributes format literal 1`] = `
`;
exports[`attributes format multiple 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -267,7 +267,7 @@ exports[`attributes format multiple 1`] = `
`;
exports[`attributes format value 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -281,7 +281,7 @@ exports[`attributes format value 1`] = `
`;
exports[`attributes from object variables set previously 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
let { isBoundary, withDefault, setContextValue } = helpers;
@@ -299,7 +299,7 @@ exports[`attributes from object variables set previously 1`] = `
`;
exports[`attributes from variables set previously (no external node) 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
let { isBoundary, withDefault, setContextValue } = helpers;
@@ -317,7 +317,7 @@ exports[`attributes from variables set previously (no external node) 1`] = `
`;
exports[`attributes from variables set previously 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
let { isBoundary, withDefault, setContextValue } = helpers;
@@ -335,7 +335,7 @@ exports[`attributes from variables set previously 1`] = `
`;
exports[`attributes object 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -349,7 +349,7 @@ exports[`attributes object 1`] = `
`;
exports[`attributes static attributes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -362,7 +362,7 @@ exports[`attributes static attributes 1`] = `
`;
exports[`attributes static attributes on void elements 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -375,7 +375,7 @@ exports[`attributes static attributes on void elements 1`] = `
`;
exports[`attributes static attributes with dashes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -388,7 +388,7 @@ exports[`attributes static attributes with dashes 1`] = `
`;
exports[`attributes t-att-class and class should combine together 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -402,7 +402,7 @@ exports[`attributes t-att-class and class should combine together 1`] = `
`;
exports[`attributes t-att-class with multiple classes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -416,7 +416,7 @@ exports[`attributes t-att-class with multiple classes 1`] = `
`;
exports[`attributes t-att-class with multiple classes 2`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -430,7 +430,7 @@ exports[`attributes t-att-class with multiple classes 2`] = `
`;
exports[`attributes t-att-class with multiple classes, some of which are duplicate 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -444,7 +444,7 @@ exports[`attributes t-att-class with multiple classes, some of which are duplica
`;
exports[`attributes t-att-class with object 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -458,7 +458,7 @@ exports[`attributes t-att-class with object 1`] = `
`;
exports[`attributes t-attf-class 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -472,7 +472,7 @@ exports[`attributes t-attf-class 1`] = `
`;
exports[`attributes t-attf-class should combine with class 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -486,7 +486,7 @@ exports[`attributes t-attf-class should combine with class 1`] = `
`;
exports[`attributes t-attf-class with multiple classes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -500,7 +500,7 @@ exports[`attributes t-attf-class with multiple classes 1`] = `
`;
exports[`attributes t-attf-class with multiple classes separated by multiple spaces 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -514,7 +514,7 @@ exports[`attributes t-attf-class with multiple classes separated by multiple spa
`;
exports[`attributes tuple literal 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -528,7 +528,7 @@ exports[`attributes tuple literal 1`] = `
`;
exports[`attributes tuple variable 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -542,7 +542,7 @@ exports[`attributes tuple variable 1`] = `
`;
exports[`attributes two classes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -555,7 +555,7 @@ exports[`attributes two classes 1`] = `
`;
exports[`attributes two dynamic attributes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -570,7 +570,7 @@ exports[`attributes two dynamic attributes 1`] = `
`;
exports[`attributes updating classes (with obj notation) 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -584,7 +584,7 @@ exports[`attributes updating classes (with obj notation) 1`] = `
`;
exports[`attributes various escapes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -600,7 +600,7 @@ exports[`attributes various escapes 1`] = `
`;
exports[`attributes various escapes 2 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -613,7 +613,7 @@ exports[`attributes various escapes 2 1`] = `
`;
exports[`special cases for some specific html attributes/properties input of type checkbox with t-att-indeterminate 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -627,7 +627,7 @@ exports[`special cases for some specific html attributes/properties input of typ
`;
exports[`special cases for some specific html attributes/properties input type= checkbox, with t-att-checked 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -641,7 +641,7 @@ exports[`special cases for some specific html attributes/properties input type=
`;
exports[`special cases for some specific html attributes/properties input with t-att-value 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -655,7 +655,7 @@ exports[`special cases for some specific html attributes/properties input with t
`;
exports[`special cases for some specific html attributes/properties select with t-att-value 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -669,7 +669,7 @@ exports[`special cases for some specific html attributes/properties select with
`;
exports[`special cases for some specific html attributes/properties textarea with t-att-value 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;
@@ -683,7 +683,7 @@ exports[`special cases for some specific html attributes/properties textarea wit
`;
exports[`special cases for some specific html attributes/properties various boolean html attributes 1`] = `
"function anonymous(bdom, helpers
"function anonymous(app, bdom, helpers
) {
let { text, createBlock, list, multi, html, toggler, component, comment } = bdom;