mirror of
https://github.com/odoo/owl.git
synced 2025-10-06 19:59:41 +07:00
Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fb97955729 |
@@ -117,7 +117,7 @@ const { loadFile, mount } = owl;
|
|||||||
Dev mode activates some additional checks and developer amenities:
|
Dev mode activates some additional checks and developer amenities:
|
||||||
|
|
||||||
- [Props validation](./props.md#props-validation) is performed
|
- [Props validation](./props.md#props-validation) is performed
|
||||||
- [t-foreach](./templates.md#loops) loops check for key unicity
|
- [t-for and t-foreach](./templates.md#loops) loops check for key unicity
|
||||||
- Lifecycle hooks are wrapped to report their errors in a more developer-friendly way
|
- Lifecycle hooks are wrapped to report their errors in a more developer-friendly way
|
||||||
- onWillStart and onWillUpdateProps will emit a warning in the console when they
|
- onWillStart and onWillUpdateProps will emit a warning in the console when they
|
||||||
take longer than 3 seconds in an effort to ease debugging the presence of deadlocks
|
take longer than 3 seconds in an effort to ease debugging the presence of deadlocks
|
||||||
|
|||||||
+31
-20
@@ -61,7 +61,7 @@ For reference, here is a list of all standard QWeb directives:
|
|||||||
| `t-out` | [Outputting value, possibly without escaping](#outputting-data) |
|
| `t-out` | [Outputting value, possibly without escaping](#outputting-data) |
|
||||||
| `t-set`, `t-value` | [Setting variables](#setting-variables) |
|
| `t-set`, `t-value` | [Setting variables](#setting-variables) |
|
||||||
| `t-if`, `t-elif`, `t-else`, | [conditionally rendering](#conditionals) |
|
| `t-if`, `t-elif`, `t-else`, | [conditionally rendering](#conditionals) |
|
||||||
| `t-foreach`, `t-as` | [Loops](#loops) |
|
| `t-for/t-of`, `t-foreach/t-as` | [Loops](#loops) |
|
||||||
| `t-att`, `t-attf-*`, `t-att-*` | [Dynamic attributes](#dynamic-attributes) |
|
| `t-att`, `t-attf-*`, `t-att-*` | [Dynamic attributes](#dynamic-attributes) |
|
||||||
| `t-call` | [Rendering sub templates](#sub-templates) |
|
| `t-call` | [Rendering sub templates](#sub-templates) |
|
||||||
| `t-debug`, `t-log` | [Debugging](#debugging) |
|
| `t-debug`, `t-log` | [Debugging](#debugging) |
|
||||||
@@ -372,6 +372,24 @@ Like conditions, `t-foreach` applies to the element bearing the directive’s at
|
|||||||
|
|
||||||
is equivalent to the previous example.
|
is equivalent to the previous example.
|
||||||
|
|
||||||
|
Owl also has another pair of directives that can be used for looping that allow
|
||||||
|
destructuring the contents of the loop item: `t-for` and `t-of`, which behaves
|
||||||
|
much like `for..of` in javascript:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<t t-for="[left, right]" t-of="[['a', 1], ['b', 2], ['c', 3]]" t-key="left">
|
||||||
|
<p><t t-esc="left"/>: <t t-esc="right"/></p>
|
||||||
|
</t>
|
||||||
|
```
|
||||||
|
|
||||||
|
will be rendered as:
|
||||||
|
|
||||||
|
```xml
|
||||||
|
<p>a: 1</p>
|
||||||
|
<p>b: 2</p>
|
||||||
|
<p>c: 3</p>
|
||||||
|
```
|
||||||
|
|
||||||
An important difference should be made with the usual `QWeb` behaviour: Owl
|
An important difference should be made with the usual `QWeb` behaviour: Owl
|
||||||
requires the presence of a `t-key` directive, to be able to properly reconcile
|
requires the presence of a `t-key` directive, to be able to properly reconcile
|
||||||
renderings.
|
renderings.
|
||||||
@@ -380,8 +398,9 @@ renderings.
|
|||||||
and maps, it will expose the key of the current iteration as the contents of the
|
and maps, it will expose the key of the current iteration as the contents of the
|
||||||
`t-as`, and the corresponding value with the same name and the suffix `_value`.
|
`t-as`, and the corresponding value with the same name and the suffix `_value`.
|
||||||
|
|
||||||
In addition to the name passed via t-as, `t-foreach` provides a few other useful
|
In addition to the name passed via t-as, `t-foreach` (but not `t-for`) provides
|
||||||
variables (note: `$as` will be replaced with the name passed to `t-as`):
|
a few other useful variables (note: `$as` will be replaced with the name passed
|
||||||
|
to `t-as`):
|
||||||
|
|
||||||
- `$as_value`: the current iteration value, identical to `$as` for arrays and
|
- `$as_value`: the current iteration value, identical to `$as` for arrays and
|
||||||
other iterables, but for objects and maps, it provides the value (where `$as`
|
other iterables, but for objects and maps, it provides the value (where `$as`
|
||||||
@@ -393,10 +412,9 @@ variables (note: `$as` will be replaced with the name passed to `t-as`):
|
|||||||
(equivalent to `$as_index + 1 == $as_size`), requires the iteratee’s size be
|
(equivalent to `$as_index + 1 == $as_size`), requires the iteratee’s size be
|
||||||
available
|
available
|
||||||
|
|
||||||
These extra variables provided and all new variables created into the `t-foreach`
|
These variables and all new variables created inside`t-foreach` and `t-for` are
|
||||||
are only available in the scope of the `t-foreach`. If the variable exists outside
|
only available inside of the loop. If a variable existed outside the context of
|
||||||
the context of the `t-foreach`, the value is copied at the end of the foreach
|
the loop, the assignment will affect the outer variable.
|
||||||
into the global context.
|
|
||||||
|
|
||||||
```xml
|
```xml
|
||||||
<t t-set="existing_variable" t-value="false"/>
|
<t t-set="existing_variable" t-value="false"/>
|
||||||
@@ -408,7 +426,7 @@ into the global context.
|
|||||||
<!-- existing_variable and new_variable now true -->
|
<!-- existing_variable and new_variable now true -->
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<!-- existing_variable always true -->
|
<!-- existing_variable still true -->
|
||||||
<!-- new_variable undefined -->
|
<!-- new_variable undefined -->
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -471,18 +489,11 @@ are all equivalent:
|
|||||||
</t>
|
</t>
|
||||||
```
|
```
|
||||||
|
|
||||||
If there is no `t-key` directive, Owl will use the index as a default key.
|
The `t-key` directive is mandatory, and as mentioned should represent the object's
|
||||||
|
identity. You may be tempted to use the loop index as a key, but keep in mind that
|
||||||
Note: the `t-foreach` directive only accepts arrays (lists) or objects. It does
|
this is only correct if items in the loop cannot be reordered. If this is not the
|
||||||
not work with other iterables, such as `Set`. However, it is only a matter of
|
case, using the index as the key can lead to bugs that are difficult to find, so
|
||||||
using the `...` javascript operator. For example:
|
use the index as the key only if you are sure items cannot be reordered.
|
||||||
|
|
||||||
```xml
|
|
||||||
<t t-foreach="[...items]" t-as="item">...</t>
|
|
||||||
```
|
|
||||||
|
|
||||||
The `...` operator will convert the `Set` (or any other iterables) into a list,
|
|
||||||
which will work with Owl QWeb.
|
|
||||||
|
|
||||||
### Sub Templates
|
### Sub Templates
|
||||||
|
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ import {
|
|||||||
ASTTCallBlock,
|
ASTTCallBlock,
|
||||||
ASTTEsc,
|
ASTTEsc,
|
||||||
ASTText,
|
ASTText,
|
||||||
|
ASTTFor,
|
||||||
ASTTForEach,
|
ASTTForEach,
|
||||||
ASTTif,
|
ASTTif,
|
||||||
ASTTKey,
|
ASTTKey,
|
||||||
@@ -43,7 +44,6 @@ export interface Config {
|
|||||||
export interface CodeGenOptions extends Config {
|
export interface CodeGenOptions extends Config {
|
||||||
hasSafeContext?: boolean;
|
hasSafeContext?: boolean;
|
||||||
name?: string;
|
name?: string;
|
||||||
alias?: string;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// using a non-html document so that <inner/outer>HTML serializes as XML instead
|
// using a non-html document so that <inner/outer>HTML serializes as XML instead
|
||||||
@@ -198,7 +198,6 @@ class CodeTarget {
|
|||||||
hasRefWrapper: boolean = false;
|
hasRefWrapper: boolean = false;
|
||||||
|
|
||||||
constructor(name: string, on?: EventHandlers | null) {
|
constructor(name: string, on?: EventHandlers | null) {
|
||||||
debugger
|
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.on = on || null;
|
this.on = on || null;
|
||||||
}
|
}
|
||||||
@@ -245,13 +244,6 @@ 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 TRANSLATABLE_ATTRS = ["label", "title", "placeholder", "alt"];
|
||||||
const translationRE = /^(\s*)([\s\S]+?)(\s*)$/;
|
const translationRE = /^(\s*)([\s\S]+?)(\s*)$/;
|
||||||
|
|
||||||
@@ -261,7 +253,7 @@ export class CodeGenerator {
|
|||||||
hasSafeContext: boolean;
|
hasSafeContext: boolean;
|
||||||
isDebug: boolean = false;
|
isDebug: boolean = false;
|
||||||
targets: CodeTarget[] = [];
|
targets: CodeTarget[] = [];
|
||||||
target: CodeTarget;
|
target = new CodeTarget("template");
|
||||||
templateName?: string;
|
templateName?: string;
|
||||||
dev: boolean;
|
dev: boolean;
|
||||||
translateFn: (s: string) => string;
|
translateFn: (s: string) => string;
|
||||||
@@ -272,7 +264,6 @@ export class CodeGenerator {
|
|||||||
helpers: Set<string> = new Set();
|
helpers: Set<string> = new Set();
|
||||||
|
|
||||||
constructor(ast: AST, options: CodeGenOptions) {
|
constructor(ast: AST, options: CodeGenOptions) {
|
||||||
this.target = new CodeTarget(toFnName(options.name, options.alias));
|
|
||||||
this.translateFn = options.translateFn || ((s: string) => s);
|
this.translateFn = options.translateFn || ((s: string) => s);
|
||||||
if (options.translatableAttributes) {
|
if (options.translatableAttributes) {
|
||||||
const attrs = new Set(TRANSLATABLE_ATTRS);
|
const attrs = new Set(TRANSLATABLE_ATTRS);
|
||||||
@@ -481,6 +472,8 @@ export class CodeGenerator {
|
|||||||
return this.compileTIf(ast, ctx);
|
return this.compileTIf(ast, ctx);
|
||||||
case ASTType.TForEach:
|
case ASTType.TForEach:
|
||||||
return this.compileTForeach(ast, ctx);
|
return this.compileTForeach(ast, ctx);
|
||||||
|
case ASTType.TFor:
|
||||||
|
return this.compileTFor(ast, ctx);
|
||||||
case ASTType.TKey:
|
case ASTType.TKey:
|
||||||
return this.compileTKey(ast, ctx);
|
return this.compileTKey(ast, ctx);
|
||||||
case ASTType.Multi:
|
case ASTType.Multi:
|
||||||
@@ -917,7 +910,7 @@ export class CodeGenerator {
|
|||||||
if (!ast.hasNoValue) {
|
if (!ast.hasNoValue) {
|
||||||
this.addLine(`ctx[\`${ast.elem}_value\`] = ${keys}[${loopVar}];`);
|
this.addLine(`ctx[\`${ast.elem}_value\`] = ${keys}[${loopVar}];`);
|
||||||
}
|
}
|
||||||
this.define(`key${this.target.loopLevel}`, ast.key ? compileExpr(ast.key) : loopVar);
|
this.define(`key${this.target.loopLevel}`, compileExpr(ast.key));
|
||||||
if (this.dev) {
|
if (this.dev) {
|
||||||
// Throw error on duplicate keys in dev mode
|
// Throw error on duplicate keys in dev mode
|
||||||
this.helpers.add("OwlError");
|
this.helpers.add("OwlError");
|
||||||
@@ -964,6 +957,46 @@ export class CodeGenerator {
|
|||||||
return block.varName;
|
return block.varName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
compileTFor(ast: ASTTFor, ctx: Context): string {
|
||||||
|
let { block } = ctx;
|
||||||
|
if (block) {
|
||||||
|
this.insertAnchor(block);
|
||||||
|
}
|
||||||
|
block = this.createBlock(block, "list", ctx);
|
||||||
|
this.target.loopLevel++;
|
||||||
|
this.addLine(`ctx = Object.create(ctx);`);
|
||||||
|
// Throw errors on duplicate keys in dev mode
|
||||||
|
if (this.dev) {
|
||||||
|
this.define(`keys${block.id}`, `new Set()`);
|
||||||
|
}
|
||||||
|
this.define(`c_block${block.id}`, "[]");
|
||||||
|
const index = `i${this.target.loopLevel}`;
|
||||||
|
this.addLine(`let ${index} = ${0};`);
|
||||||
|
const binding = compileExpr(ast.binding);
|
||||||
|
this.addLine(`for (${binding} of ${compileExpr(ast.iterable)}) {`);
|
||||||
|
this.target.indentLevel++;
|
||||||
|
this.define(`key${this.target.loopLevel}`, compileExpr(ast.key));
|
||||||
|
if (this.dev) {
|
||||||
|
// Throw error on duplicate keys in dev mode
|
||||||
|
this.helpers.add("OwlError");
|
||||||
|
this.addLine(
|
||||||
|
`if (keys${block.id}.has(String(key${this.target.loopLevel}))) { throw new OwlError(\`Got duplicate key in t-for: \${key${this.target.loopLevel}}\`)}`
|
||||||
|
);
|
||||||
|
this.addLine(`keys${block.id}.add(String(key${this.target.loopLevel}));`);
|
||||||
|
}
|
||||||
|
const subCtx = createContext(ctx, { block, index });
|
||||||
|
this.compileAST(ast.body, subCtx);
|
||||||
|
this.addLine(`${index}++;`);
|
||||||
|
this.target.indentLevel--;
|
||||||
|
this.target.loopLevel--;
|
||||||
|
this.addLine(`}`);
|
||||||
|
if (!ctx.isLast) {
|
||||||
|
this.addLine(`ctx = ctx.__proto__;`);
|
||||||
|
}
|
||||||
|
this.insertBlock("l", block, ctx);
|
||||||
|
return block.varName;
|
||||||
|
}
|
||||||
|
|
||||||
compileTKey(ast: ASTTKey, ctx: Context): string | null {
|
compileTKey(ast: ASTTKey, ctx: Context): string | null {
|
||||||
const tKeyExpr = generateId("tKey_");
|
const tKeyExpr = generateId("tKey_");
|
||||||
this.define(tKeyExpr, compileExpr(ast.expr));
|
this.define(tKeyExpr, compileExpr(ast.expr));
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export type TemplateFunction = (app: TemplateSet, bdom: any, helpers: any) => Te
|
|||||||
|
|
||||||
interface CompileOptions extends Config {
|
interface CompileOptions extends Config {
|
||||||
name?: string;
|
name?: string;
|
||||||
alias?: string;
|
|
||||||
}
|
}
|
||||||
export function compile(
|
export function compile(
|
||||||
template: string | Element,
|
template: string | Element,
|
||||||
|
|||||||
+42
-1
@@ -26,6 +26,7 @@ export const enum ASTType {
|
|||||||
TCallBlock,
|
TCallBlock,
|
||||||
TTranslation,
|
TTranslation,
|
||||||
TPortal,
|
TPortal,
|
||||||
|
TFor,
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ASTText {
|
export interface ASTText {
|
||||||
@@ -104,7 +105,15 @@ export interface ASTTForEach {
|
|||||||
hasNoLast: boolean;
|
hasNoLast: boolean;
|
||||||
hasNoIndex: boolean;
|
hasNoIndex: boolean;
|
||||||
hasNoValue: boolean;
|
hasNoValue: boolean;
|
||||||
key: string | null;
|
key: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ASTTFor {
|
||||||
|
type: ASTType.TFor;
|
||||||
|
iterable: string;
|
||||||
|
binding: string;
|
||||||
|
body: AST;
|
||||||
|
key: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ASTTKey {
|
export interface ASTTKey {
|
||||||
@@ -183,6 +192,7 @@ export type AST =
|
|||||||
| ASTTCall
|
| ASTTCall
|
||||||
| ASTTOut
|
| ASTTOut
|
||||||
| ASTTForEach
|
| ASTTForEach
|
||||||
|
| ASTTFor
|
||||||
| ASTTKey
|
| ASTTKey
|
||||||
| ASTComponent
|
| ASTComponent
|
||||||
| ASTSlot
|
| ASTSlot
|
||||||
@@ -230,6 +240,7 @@ function parseNode(node: Node, ctx: ParsingContext): AST | null {
|
|||||||
return (
|
return (
|
||||||
parseTDebugLog(node, ctx) ||
|
parseTDebugLog(node, ctx) ||
|
||||||
parseTForEach(node, ctx) ||
|
parseTForEach(node, ctx) ||
|
||||||
|
parseTFor(node, ctx) ||
|
||||||
parseTIf(node, ctx) ||
|
parseTIf(node, ctx) ||
|
||||||
parseTPortal(node, ctx) ||
|
parseTPortal(node, ctx) ||
|
||||||
parseTCall(node, ctx) ||
|
parseTCall(node, ctx) ||
|
||||||
@@ -531,6 +542,36 @@ function parseTForEach(node: Element, ctx: ParsingContext): AST | null {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function parseTFor(node: Element, ctx: ParsingContext): AST | null {
|
||||||
|
if (!node.hasAttribute("t-for")) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
const binding = node.getAttribute("t-for")!;
|
||||||
|
node.removeAttribute("t-for");
|
||||||
|
const iterable = node.getAttribute("t-of") || "";
|
||||||
|
node.removeAttribute("t-of");
|
||||||
|
const key = node.getAttribute("t-key");
|
||||||
|
if (!key) {
|
||||||
|
throw new OwlError(
|
||||||
|
`"Directive t-for should always be used with a t-key!" (expression: t-for="${binding}" t-of="${iterable}")`
|
||||||
|
);
|
||||||
|
}
|
||||||
|
node.removeAttribute("t-key");
|
||||||
|
const body = parseNode(node, ctx);
|
||||||
|
|
||||||
|
if (!body) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
type: ASTType.TFor,
|
||||||
|
iterable,
|
||||||
|
binding,
|
||||||
|
body,
|
||||||
|
key,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
function parseTKey(node: Element, ctx: ParsingContext): AST | null {
|
function parseTKey(node: Element, ctx: ParsingContext): AST | null {
|
||||||
if (!node.hasAttribute("t-key")) {
|
if (!node.hasAttribute("t-key")) {
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
+1
-3
@@ -5,12 +5,10 @@ export * from "./runtime";
|
|||||||
|
|
||||||
TemplateSet.prototype._compileTemplate = function _compileTemplate(
|
TemplateSet.prototype._compileTemplate = function _compileTemplate(
|
||||||
name: string,
|
name: string,
|
||||||
template: string | Element,
|
template: string | Element
|
||||||
alias?: string
|
|
||||||
) {
|
) {
|
||||||
return compile(template, {
|
return compile(template, {
|
||||||
name,
|
name,
|
||||||
alias,
|
|
||||||
dev: this.dev,
|
dev: this.dev,
|
||||||
translateFn: this.translateFn,
|
translateFn: this.translateFn,
|
||||||
translatableAttributes: this.translatableAttributes,
|
translatableAttributes: this.translatableAttributes,
|
||||||
|
|||||||
@@ -116,7 +116,7 @@ export class ComponentNode<P extends Props = any, E = any> implements VNode<Comp
|
|||||||
}
|
}
|
||||||
this.component = new C(props, env, this);
|
this.component = new C(props, env, this);
|
||||||
const ctx = Object.assign(Object.create(this.component), { this: this.component });
|
const ctx = Object.assign(Object.create(this.component), { this: this.component });
|
||||||
this.renderFn = app.getTemplate(C.template, C.name).bind(this.component, ctx, this);
|
this.renderFn = app.getTemplate(C.template).bind(this.component, ctx, this);
|
||||||
this.component.setup();
|
this.component.setup();
|
||||||
currentNode = null;
|
currentNode = null;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ export class TemplateSet {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
getTemplate(name: string, alias?: string): Template {
|
getTemplate(name: string): Template {
|
||||||
if (!(name in this.templates)) {
|
if (!(name in this.templates)) {
|
||||||
const rawTemplate = this.rawTemplates[name];
|
const rawTemplate = this.rawTemplates[name];
|
||||||
if (rawTemplate === undefined) {
|
if (rawTemplate === undefined) {
|
||||||
@@ -106,7 +106,7 @@ export class TemplateSet {
|
|||||||
throw new OwlError(`Missing template: "${name}"${extraInfo}`);
|
throw new OwlError(`Missing template: "${name}"${extraInfo}`);
|
||||||
}
|
}
|
||||||
const isFn = typeof rawTemplate === "function" && !(rawTemplate instanceof Element);
|
const isFn = typeof rawTemplate === "function" && !(rawTemplate instanceof Element);
|
||||||
const templateFn = isFn ? rawTemplate : this._compileTemplate(name, rawTemplate, alias);
|
const templateFn = isFn ? rawTemplate : this._compileTemplate(name, rawTemplate);
|
||||||
// first add a function to lazily get the template, in case there is a
|
// first add a function to lazily get the template, in case there is a
|
||||||
// recursive call to the template name
|
// recursive call to the template name
|
||||||
const templates = this.templates;
|
const templates = this.templates;
|
||||||
@@ -119,7 +119,7 @@ export class TemplateSet {
|
|||||||
return this.templates[name];
|
return this.templates[name];
|
||||||
}
|
}
|
||||||
|
|
||||||
_compileTemplate(name: string, template: string | Element, alias?: string): ReturnType<typeof compile> {
|
_compileTemplate(name: string, template: string | Element): ReturnType<typeof compile> {
|
||||||
throw new OwlError(`Unable to compile a template. Please use owl full build instead`);
|
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 const globalTemplates: { [key: string]: string | Element | TemplateFunction } = {};
|
||||||
|
|
||||||
export function xml(...args: Parameters<typeof String.raw>) {
|
export function xml(...args: Parameters<typeof String.raw>) {
|
||||||
const name = `xml_template_${xml.nextId++}`;
|
const name = `__template__${xml.nextId++}`;
|
||||||
const value = String.raw(...args);
|
const value = String.raw(...args);
|
||||||
globalTemplates[name] = value;
|
globalTemplates[name] = value;
|
||||||
return name;
|
return name;
|
||||||
|
|||||||
@@ -50,12 +50,11 @@ exports[`Reactivity: useState destroyed component before being mounted is inacti
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -69,11 +68,10 @@ exports[`Reactivity: useState destroyed component before being mounted is inacti
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj'].a;
|
let txt1 = ctx['contextObj'].a;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -84,12 +82,11 @@ exports[`Reactivity: useState destroyed component is inactive 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -103,11 +100,10 @@ exports[`Reactivity: useState destroyed component is inactive 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj'].a;
|
let txt1 = ctx['contextObj'].a;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -118,11 +114,10 @@ exports[`Reactivity: useState one components can subscribe twice to same context
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj1'].a;
|
let txt1 = ctx['contextObj1'].a;
|
||||||
let txt2 = ctx['contextObj2'].b;
|
let txt2 = ctx['contextObj2'].b;
|
||||||
return block1([txt1, txt2]);
|
return block1([txt1, txt2]);
|
||||||
@@ -134,12 +129,11 @@ exports[`Reactivity: useState parent and children subscribed to same context 1`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
let txt1 = ctx['contextObj'].b;
|
let txt1 = ctx['contextObj'].b;
|
||||||
return block1([txt1], [b2]);
|
return block1([txt1], [b2]);
|
||||||
@@ -151,11 +145,10 @@ exports[`Reactivity: useState parent and children subscribed to same context 2`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj'].a;
|
let txt1 = ctx['contextObj'].a;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -229,13 +222,12 @@ exports[`Reactivity: useState two components are updated in parallel 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp2 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
const b3 = comp2({}, key + \`__2\`, node, this, null);
|
const b3 = comp2({}, key + \`__2\`, node, this, null);
|
||||||
return block1([], [b2, b3]);
|
return block1([], [b2, b3]);
|
||||||
@@ -247,11 +239,10 @@ exports[`Reactivity: useState two components are updated in parallel 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj'].value;
|
let txt1 = ctx['contextObj'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -262,13 +253,12 @@ exports[`Reactivity: useState two components can subscribe to same context 1`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp2 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
const b3 = comp2({}, key + \`__2\`, node, this, null);
|
const b3 = comp2({}, key + \`__2\`, node, this, null);
|
||||||
return block1([], [b2, b3]);
|
return block1([], [b2, b3]);
|
||||||
@@ -280,11 +270,10 @@ exports[`Reactivity: useState two components can subscribe to same context 2`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj'].value;
|
let txt1 = ctx['contextObj'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -295,13 +284,12 @@ exports[`Reactivity: useState two independent components on different levels are
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`Parent\`, true, false, false, []);
|
const comp2 = app.createComponent(\`Parent\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1001_GrandFather(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
const b3 = comp2({}, key + \`__2\`, node, this, null);
|
const b3 = comp2({}, key + \`__2\`, node, this, null);
|
||||||
return block1([], [b2, b3]);
|
return block1([], [b2, b3]);
|
||||||
@@ -313,11 +301,10 @@ exports[`Reactivity: useState two independent components on different levels are
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj'].value;
|
let txt1 = ctx['contextObj'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -328,12 +315,11 @@ exports[`Reactivity: useState two independent components on different levels are
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -344,11 +330,10 @@ exports[`Reactivity: useState useContext=useState hook is reactive, for one comp
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj'].value;
|
let txt1 = ctx['contextObj'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -360,12 +345,11 @@ exports[`Reactivity: useState useless atoms should be deleted 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Quantity\`, true, false, false, [\\"id\\"]);
|
const comp1 = app.createComponent(\`Quantity\`, true, false, false, [\\"id\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/> Total: <block-text-0/> Count: <block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/> Total: <block-text-0/> Count: <block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_ListOfQuantities(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(Object.keys(ctx['state']));;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(Object.keys(ctx['state']));;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -386,11 +370,10 @@ exports[`Reactivity: useState useless atoms should be deleted 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Quantity(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].quantity;
|
let txt1 = ctx['state'].quantity;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -401,11 +384,10 @@ exports[`Reactivity: useState very simple use, with initial value 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['contextObj'].value;
|
let txt1 = ctx['contextObj'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ exports[`app App supports env with getters/setters 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/> <block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/> <block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['env'].someVal;
|
let txt1 = ctx['env'].someVal;
|
||||||
let txt2 = Object.keys(ctx['env'].services);
|
let txt2 = Object.keys(ctx['env'].services);
|
||||||
return block1([txt1, txt2]);
|
return block1([txt1, txt2]);
|
||||||
@@ -20,10 +19,9 @@ exports[`app app: clear scheduler tasks and destroy cancelled nodes immediately
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`B\`, true, false, false, []);
|
const comp1 = app.createComponent(\`B\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_A(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
b2 = text(\`A\`);
|
b2 = text(\`A\`);
|
||||||
if (ctx['state'].value) {
|
if (ctx['state'].value) {
|
||||||
@@ -38,9 +36,8 @@ exports[`app app: clear scheduler tasks and destroy cancelled nodes immediately
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_B(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`B\`);
|
return text(\`B\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -50,11 +47,10 @@ exports[`app can configure an app with props 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -65,11 +61,10 @@ exports[`app can mount app in an iframe 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"my-div\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"my-div\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -79,11 +74,10 @@ exports[`app destroy remove the widget from the DOM 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -93,11 +87,10 @@ exports[`app warnIfNoStaticProps works as expected 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['message'];
|
let txt1 = ctx['message'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -156,10 +156,9 @@ exports[`t-on handler is bound to proper owner, part 3 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -169,11 +168,10 @@ exports[`t-on handler is bound to proper owner, part 3 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['add'], ctx];
|
let hdlr1 = [ctx['add'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -185,10 +183,9 @@ exports[`t-on handler is bound to proper owner, part 4 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList([1]);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList([1]);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -209,11 +206,10 @@ exports[`t-on handler is bound to proper owner, part 4 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['add'], ctx];
|
let hdlr1 = [ctx['add'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -475,12 +471,11 @@ exports[`t-on t-on with t-call 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -491,11 +486,10 @@ exports[`t-on t-on with t-call 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['update'], ctx];
|
let hdlr1 = [ctx['update'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -506,12 +500,11 @@ exports[`t-on t-on, with arguments and t-call 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -522,11 +515,10 @@ exports[`t-on t-on, with arguments and t-call 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const v1 = ctx['this'];
|
const v1 = ctx['this'];
|
||||||
const v2 = ctx['value'];
|
const v2 = ctx['value'];
|
||||||
let hdlr1 = [()=>v1.update(v2), ctx];
|
let hdlr1 = [()=>v1.update(v2), ctx];
|
||||||
|
|||||||
@@ -84,7 +84,6 @@ exports[`misc global 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, isBoundary, withDefault, setContextValue, zero, withKey } = helpers;
|
let { prepareList, isBoundary, withDefault, setContextValue, zero, withKey } = helpers;
|
||||||
// Template name: \\"caller\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`_callee-uses-foo\`);
|
const callTemplate_1 = app.getTemplate(\`_callee-uses-foo\`);
|
||||||
const callTemplate_2 = app.getTemplate(\`_callee-uses-foo\`);
|
const callTemplate_2 = app.getTemplate(\`_callee-uses-foo\`);
|
||||||
const callTemplate_3 = app.getTemplate(\`_callee-uses-foo\`);
|
const callTemplate_3 = app.getTemplate(\`_callee-uses-foo\`);
|
||||||
@@ -94,7 +93,7 @@ exports[`misc global 1`] = `
|
|||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block4 = createBlock(\`<span><block-text-0/></span>\`);
|
let block4 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function caller(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -137,11 +136,10 @@ exports[`misc global 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { withDefault } = helpers;
|
let { withDefault } = helpers;
|
||||||
// Template name: \\"_callee-uses-foo\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function _callee_uses_foo(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = withDefault(ctx['foo'], \`foo default\`);
|
let txt1 = withDefault(ctx['foo'], \`foo default\`);
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -153,11 +151,10 @@ exports[`misc global 3`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"_callee-asc\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<año block-attribute-0=\\"falló\\"><block-child-0/></año>\`);
|
let block1 = createBlock(\`<año block-attribute-0=\\"falló\\"><block-child-0/></año>\`);
|
||||||
|
|
||||||
return function _callee_asc(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = 'agüero';
|
let attr1 = 'agüero';
|
||||||
const b2 = ctx[zero];
|
const b2 = ctx[zero];
|
||||||
return block1([attr1], [b2]);
|
return block1([attr1], [b2]);
|
||||||
@@ -170,11 +167,10 @@ exports[`misc global 4`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { safeOutput } = helpers;
|
let { safeOutput } = helpers;
|
||||||
// Template name: \\"_callee-asc-toto\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function _callee_asc_toto(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = text(\`toto default\`);
|
const b3 = text(\`toto default\`);
|
||||||
const b2 = safeOutput(ctx['toto'], b3);
|
const b2 = safeOutput(ctx['toto'], b3);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
|
|||||||
@@ -158,9 +158,8 @@ exports[`simple templates, mostly static empty string in a template set 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"potato\\"
|
|
||||||
|
|
||||||
return function potato(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`\`);
|
return text(\`\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -56,13 +56,12 @@ exports[`properly support svg svg creates new block if it is within html -- 2 1`
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><polygon fill=\\"#000000\\" points=\\"0 0 4 4 8 0\\" transform=\\"translate(5 7)\\"/><block-child-0/></svg>\`);
|
let block2 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><polygon fill=\\"#000000\\" points=\\"0 0 4 4 8 0\\" transform=\\"translate(5 7)\\"/><block-child-0/></svg>\`);
|
||||||
let block3 = createBlock(\`<path block-ns=\\"http://www.w3.org/2000/svg\\"/>\`);
|
let block3 = createBlock(\`<path block-ns=\\"http://www.w3.org/2000/svg\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b3;
|
let b3;
|
||||||
if (ctx['hasPath']) {
|
if (ctx['hasPath']) {
|
||||||
b3 = block3();
|
b3 = block3();
|
||||||
@@ -77,12 +76,11 @@ exports[`properly support svg svg creates new block if it is within html 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><polygon fill=\\"#000000\\" points=\\"0 0 4 4 8 0\\" transform=\\"translate(5 7)\\"/></svg>\`);
|
let block2 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><polygon fill=\\"#000000\\" points=\\"0 0 4 4 8 0\\" transform=\\"translate(5 7)\\"/></svg>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -93,12 +91,11 @@ exports[`properly support svg svg namespace added to sub templates if root tag i
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"svg\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`path\`);
|
const callTemplate_1 = app.getTemplate(\`path\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><block-child-0/></svg>\`);
|
let block1 = createBlock(\`<svg block-ns=\\"http://www.w3.org/2000/svg\\"><block-child-0/></svg>\`);
|
||||||
|
|
||||||
return function svg_Svg(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -109,11 +106,10 @@ exports[`properly support svg svg namespace added to sub templates if root tag i
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"path\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<path block-ns=\\"http://www.w3.org/2000/svg\\"/>\`);
|
let block1 = createBlock(\`<path block-ns=\\"http://www.w3.org/2000/svg\\"/>\`);
|
||||||
|
|
||||||
return function path(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ exports[`t-call (template calling) basic caller 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"caller\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`_basic-callee\`);
|
const callTemplate_1 = app.getTemplate(\`_basic-callee\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function caller(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -20,11 +19,10 @@ exports[`t-call (template calling) basic caller 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"_basic-callee\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>ok</span>\`);
|
let block1 = createBlock(\`<span>ok</span>\`);
|
||||||
|
|
||||||
return function _basic_callee(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -34,10 +32,9 @@ exports[`t-call (template calling) basic caller, no parent node 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"caller\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`_basic-callee\`);
|
const callTemplate_1 = app.getTemplate(\`_basic-callee\`);
|
||||||
|
|
||||||
return function caller(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -47,11 +44,10 @@ exports[`t-call (template calling) basic caller, no parent node 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"_basic-callee\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>ok</span>\`);
|
let block1 = createBlock(\`<span>ok</span>\`);
|
||||||
|
|
||||||
return function _basic_callee(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -62,14 +58,13 @@ exports[`t-call (template calling) call with several sub nodes on same line 1`]
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<span>hey</span>\`);
|
let block3 = createBlock(\`<span>hey</span>\`);
|
||||||
let block5 = createBlock(\`<span>yay</span>\`);
|
let block5 = createBlock(\`<span>yay</span>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b3 = block3();
|
const b3 = block3();
|
||||||
@@ -88,11 +83,10 @@ exports[`t-call (template calling) call with several sub nodes on same line 2`]
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = ctx[zero];
|
const b2 = ctx[zero];
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -104,14 +98,13 @@ exports[`t-call (template calling) cascading t-call t-out='0' 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`subTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`subTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<span>hey</span>\`);
|
let block3 = createBlock(\`<span>hey</span>\`);
|
||||||
let block5 = createBlock(\`<span>yay</span>\`);
|
let block5 = createBlock(\`<span>yay</span>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b3 = block3();
|
const b3 = block3();
|
||||||
@@ -130,13 +123,12 @@ exports[`t-call (template calling) cascading t-call t-out='0' 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"subTemplate\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`subSubTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`subSubTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<span>cascade 0</span>\`);
|
let block3 = createBlock(\`<span>cascade 0</span>\`);
|
||||||
|
|
||||||
return function subTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b3 = block3();
|
const b3 = block3();
|
||||||
@@ -154,13 +146,12 @@ exports[`t-call (template calling) cascading t-call t-out='0' 3`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"subSubTemplate\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`finalTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`finalTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<span>cascade 1</span>\`);
|
let block3 = createBlock(\`<span>cascade 1</span>\`);
|
||||||
|
|
||||||
return function subSubTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b3 = block3();
|
const b3 = block3();
|
||||||
@@ -178,11 +169,10 @@ exports[`t-call (template calling) cascading t-call t-out='0' 4`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"finalTemplate\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>cascade 2</span><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><span>cascade 2</span><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function finalTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = ctx[zero];
|
const b2 = ctx[zero];
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -194,13 +184,12 @@ exports[`t-call (template calling) cascading t-call t-out='0', without external
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`subTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`subTemplate\`);
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>hey</span>\`);
|
let block2 = createBlock(\`<span>hey</span>\`);
|
||||||
let block4 = createBlock(\`<span>yay</span>\`);
|
let block4 = createBlock(\`<span>yay</span>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
@@ -218,12 +207,11 @@ exports[`t-call (template calling) cascading t-call t-out='0', without external
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"subTemplate\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`subSubTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`subSubTemplate\`);
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>cascade 0</span>\`);
|
let block2 = createBlock(\`<span>cascade 0</span>\`);
|
||||||
|
|
||||||
return function subTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
@@ -240,12 +228,11 @@ exports[`t-call (template calling) cascading t-call t-out='0', without external
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"subSubTemplate\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`finalTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`finalTemplate\`);
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>cascade 1</span>\`);
|
let block2 = createBlock(\`<span>cascade 1</span>\`);
|
||||||
|
|
||||||
return function subSubTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
@@ -262,11 +249,10 @@ exports[`t-call (template calling) cascading t-call t-out='0', without external
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"finalTemplate\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<span>cascade 2</span>\`);
|
let block2 = createBlock(\`<span>cascade 2</span>\`);
|
||||||
|
|
||||||
return function finalTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
const b3 = ctx[zero];
|
const b3 = ctx[zero];
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -278,12 +264,11 @@ exports[`t-call (template calling) dynamic t-call 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const call = app.callTemplate.bind(app);
|
const call = app.callTemplate.bind(app);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const template1 = (ctx['template']);
|
const template1 = (ctx['template']);
|
||||||
const b2 = call(this, template1, ctx, node, key + \`__1\`);
|
const b2 = call(this, template1, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
@@ -295,11 +280,10 @@ exports[`t-call (template calling) dynamic t-call 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"foo\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<foo><block-text-0/></foo>\`);
|
let block1 = createBlock(\`<foo><block-text-0/></foo>\`);
|
||||||
|
|
||||||
return function foo(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['val'];
|
let txt1 = ctx['val'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -310,11 +294,10 @@ exports[`t-call (template calling) dynamic t-call 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"bar\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<bar><block-text-0/></bar>\`);
|
let block1 = createBlock(\`<bar><block-text-0/></bar>\`);
|
||||||
|
|
||||||
return function bar(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['val'];
|
let txt1 = ctx['val'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -326,12 +309,11 @@ exports[`t-call (template calling) inherit context 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"foo\\", 1);
|
setContextValue(ctx, \\"foo\\", 1);
|
||||||
@@ -345,9 +327,8 @@ exports[`t-call (template calling) inherit context 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['foo']);
|
return text(ctx['foo']);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -358,13 +339,12 @@ exports[`t-call (template calling) nested t-calls with magic variable 0 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`grandchild\`);
|
const callTemplate_1 = app.getTemplate(\`grandchild\`);
|
||||||
const callTemplate_2 = app.getTemplate(\`child\`);
|
const callTemplate_2 = app.getTemplate(\`child\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<p>Some content...</p>\`);
|
let block1 = createBlock(\`<p>Some content...</p>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -384,9 +364,8 @@ exports[`t-call (template calling) nested t-calls with magic variable 0 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"grandchild\\"
|
|
||||||
|
|
||||||
return function grandchild(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\`grandchild\`);
|
const b2 = text(\`grandchild\`);
|
||||||
const b3 = ctx[zero];
|
const b3 = ctx[zero];
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -399,9 +378,8 @@ exports[`t-call (template calling) nested t-calls with magic variable 0 3`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"child\\"
|
|
||||||
|
|
||||||
return function child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return ctx[zero];
|
return ctx[zero];
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -411,12 +389,11 @@ exports[`t-call (template calling) recursive template, part 1 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"recursive\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`recursive\`);
|
const callTemplate_1 = app.getTemplate(\`recursive\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>hey</span><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><span>hey</span><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function recursive(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (false) {
|
if (false) {
|
||||||
b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
@@ -431,12 +408,11 @@ exports[`t-call (template calling) recursive template, part 2 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"Parent\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -453,12 +429,11 @@ exports[`t-call (template calling) recursive template, part 2 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
// Template name: \\"nodeTemplate\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function nodeTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let txt1 = ctx['node'].val;
|
let txt1 = ctx['node'].val;
|
||||||
@@ -488,12 +463,11 @@ exports[`t-call (template calling) recursive template, part 3 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"Parent\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -510,12 +484,11 @@ exports[`t-call (template calling) recursive template, part 3 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
// Template name: \\"nodeTemplate\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function nodeTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let txt1 = ctx['node'].val;
|
let txt1 = ctx['node'].val;
|
||||||
@@ -545,12 +518,11 @@ exports[`t-call (template calling) recursive template, part 4: with t-set recurs
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"Parent\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -568,12 +540,11 @@ exports[`t-call (template calling) recursive template, part 4: with t-set recurs
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue, prepareList, withKey } = helpers;
|
let { isBoundary, withDefault, setContextValue, prepareList, withKey } = helpers;
|
||||||
// Template name: \\"nodeTemplate\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`nodeTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/> <block-text-1/></p><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/> <block-text-1/></p><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function nodeTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"recursive_idx\\", ctx['recursive_idx']+1);
|
setContextValue(ctx, \\"recursive_idx\\", ctx['recursive_idx']+1);
|
||||||
@@ -605,12 +576,11 @@ exports[`t-call (template calling) scoped parameters 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -628,9 +598,8 @@ exports[`t-call (template calling) scoped parameters 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`ok\`);
|
return text(\`ok\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -641,12 +610,11 @@ exports[`t-call (template calling) scoped parameters, part 2 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"foo\\", 11);
|
setContextValue(ctx, \\"foo\\", 11);
|
||||||
@@ -665,9 +633,8 @@ exports[`t-call (template calling) scoped parameters, part 2 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['foo']);
|
return text(ctx['foo']);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -677,12 +644,11 @@ exports[`t-call (template calling) t-call allowed on a non t node 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -693,11 +659,10 @@ exports[`t-call (template calling) t-call allowed on a non t node 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>ok</span>\`);
|
let block1 = createBlock(\`<span>ok</span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -707,12 +672,11 @@ exports[`t-call (template calling) t-call on a div with t-call-context 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ctx1 = ctx['obj'];
|
let ctx1 = ctx['obj'];
|
||||||
const b2 = callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
@@ -724,11 +688,10 @@ exports[`t-call (template calling) t-call on a div with t-call-context 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['value'];
|
let txt1 = ctx['value'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -740,12 +703,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 { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`antony\`);
|
const callTemplate_1 = app.getTemplate(\`antony\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<p>antony</p>\`);
|
let block1 = createBlock(\`<p>antony</p>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b1 = block1();
|
const b1 = block1();
|
||||||
@@ -760,11 +722,10 @@ 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 { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"antony\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<foo><block-child-0/></foo>\`);
|
let block1 = createBlock(\`<foo><block-child-0/></foo>\`);
|
||||||
|
|
||||||
return function antony(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = ctx[zero];
|
const b2 = ctx[zero];
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -775,12 +736,11 @@ exports[`t-call (template calling) t-call with t-if 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['flag']) {
|
if (ctx['flag']) {
|
||||||
b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
@@ -794,11 +754,10 @@ exports[`t-call (template calling) t-call with t-if 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>ok</span>\`);
|
let block1 = createBlock(\`<span>ok</span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -809,12 +768,11 @@ 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 { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -830,11 +788,10 @@ exports[`t-call (template calling) t-call with t-set inside and body text conten
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['val'];
|
let txt1 = ctx['val'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -846,12 +803,11 @@ exports[`t-call (template calling) t-call with t-set inside and outside 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -880,11 +836,10 @@ exports[`t-call (template calling) t-call with t-set inside and outside 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['val3'];
|
let txt1 = ctx['val3'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -896,12 +851,11 @@ 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 { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"wrapper\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`main\`);
|
const callTemplate_1 = app.getTemplate(\`main\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
return function wrapper(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"w\\", 'fromwrapper');
|
setContextValue(ctx, \\"w\\", 'fromwrapper');
|
||||||
@@ -916,12 +870,11 @@ 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 { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -950,11 +903,10 @@ exports[`t-call (template calling) t-call with t-set inside and outside. 2 3`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['val3'];
|
let txt1 = ctx['val3'];
|
||||||
const b2 = block2([txt1]);
|
const b2 = block2([txt1]);
|
||||||
const b3 = text(ctx['w']);
|
const b3 = text(ctx['w']);
|
||||||
@@ -968,13 +920,12 @@ 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 { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"caller\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`callee1\`);
|
const callTemplate_1 = app.getTemplate(\`callee1\`);
|
||||||
const callTemplate_2 = app.getTemplate(\`callee2\`);
|
const callTemplate_2 = app.getTemplate(\`callee2\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
return function caller(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
@@ -997,11 +948,10 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"callee1\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>callee1</div>\`);
|
let block1 = createBlock(\`<div>callee1</div>\`);
|
||||||
|
|
||||||
return function callee1(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -1011,11 +961,10 @@ exports[`t-call (template calling) t-call, conditional and t-set in t-call body
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"callee2\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>callee2 <block-text-0/></div>\`);
|
let block1 = createBlock(\`<div>callee2 <block-text-0/></div>\`);
|
||||||
|
|
||||||
return function callee2(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['v'];
|
let txt1 = ctx['v'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -1026,10 +975,9 @@ exports[`t-call (template calling) t-call-context 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ctx1 = ctx['obj'];
|
let ctx1 = ctx['obj'];
|
||||||
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
@@ -1040,11 +988,10 @@ exports[`t-call (template calling) t-call-context 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['value'];
|
let txt1 = ctx['value'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -1056,10 +1003,9 @@ exports[`t-call (template calling) t-call-context and value in body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let ctx1 = ctx['obj'];
|
let ctx1 = ctx['obj'];
|
||||||
@@ -1075,11 +1021,10 @@ exports[`t-call (template calling) t-call-context and value in body 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['value1'];
|
let txt1 = ctx['value1'];
|
||||||
let txt2 = ctx['value2'];
|
let txt2 = ctx['value2'];
|
||||||
return block1([txt1, txt2]);
|
return block1([txt1, txt2]);
|
||||||
@@ -1092,12 +1037,11 @@ 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 { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"v\\", \`Hi\`);
|
setContextValue(ctx, \\"v\\", \`Hi\`);
|
||||||
@@ -1111,11 +1055,10 @@ exports[`t-call (template calling) t-esc inside t-call, with t-set outside 2`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['v'];
|
let txt1 = ctx['v'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -1127,10 +1070,9 @@ exports[`t-call (template calling) with unused body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b1 = text(\`WHEEE\`);
|
const b1 = text(\`WHEEE\`);
|
||||||
@@ -1144,11 +1086,10 @@ exports[`t-call (template calling) with unused body 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>ok</div>\`);
|
let block1 = createBlock(\`<div>ok</div>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -1159,10 +1100,9 @@ exports[`t-call (template calling) with unused setbody 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -1177,11 +1117,10 @@ exports[`t-call (template calling) with unused setbody 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>ok</div>\`);
|
let block1 = createBlock(\`<div>ok</div>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -1192,10 +1131,9 @@ exports[`t-call (template calling) with used body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b1 = text(\`ok\`);
|
const b1 = text(\`ok\`);
|
||||||
@@ -1210,11 +1148,10 @@ exports[`t-call (template calling) with used body 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<h1><block-text-0/></h1>\`);
|
let block1 = createBlock(\`<h1><block-text-0/></h1>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx[zero];
|
let txt1 = ctx[zero];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -1226,12 +1163,11 @@ exports[`t-call (template calling) with used setbody 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -1247,9 +1183,8 @@ exports[`t-call (template calling) with used setbody 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['foo']);
|
return text(ctx['foo']);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -177,13 +177,12 @@ exports[`t-esc t-esc=0 is escaped 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<p>escaped</p>\`);
|
let block2 = createBlock(\`<p>escaped</p>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
@@ -199,11 +198,10 @@ exports[`t-esc t-esc=0 is escaped 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx[zero];
|
let txt1 = ctx[zero];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,670 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`t-for destructuring array items 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for ([ctx['key'],ctx['value']] of Object.entries({a:1,b:2})) {
|
||||||
|
const key1 = ctx['key'];
|
||||||
|
const b3 = text(\`(\`);
|
||||||
|
const b4 = text(ctx['key']);
|
||||||
|
const b5 = text(\`: \`);
|
||||||
|
const b6 = text(ctx['value']);
|
||||||
|
const b7 = text(\`)\`);
|
||||||
|
c_block1[i1] = withKey(multi([b3, b4, b5, b6, b7]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for destructuring array items: rest 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for ([ctx['head'],...ctx['tail']] of [[1,2,3],[4,5,6]]) {
|
||||||
|
const key1 = ctx['head'];
|
||||||
|
const b3 = text(\`(\`);
|
||||||
|
const b4 = text(ctx['head']);
|
||||||
|
const b5 = text(\`;\`);
|
||||||
|
const b6 = text(ctx['tail']);
|
||||||
|
const b7 = text(\`)\`);
|
||||||
|
c_block1[i1] = withKey(multi([b3, b4, b5, b6, b7]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for destructuring object items 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for ({k:ctx['k'],v:ctx['v']} of [{k:'a',v:1},{k:'b',v:2}]) {
|
||||||
|
const key1 = ctx['k'];
|
||||||
|
const b3 = text(\`(\`);
|
||||||
|
const b4 = text(ctx['k']);
|
||||||
|
const b5 = text(\`: \`);
|
||||||
|
const b6 = text(ctx['v']);
|
||||||
|
const b7 = text(\`)\`);
|
||||||
|
c_block1[i1] = withKey(multi([b3, b4, b5, b6, b7]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for destructuring object items: rest 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for ({k:ctx['k'],v:ctx['v']} of [{k:'a',v:1},{k:'b',v:2}]) {
|
||||||
|
const key1 = ctx['k'];
|
||||||
|
const b3 = text(\`(\`);
|
||||||
|
const b4 = text(ctx['k']);
|
||||||
|
const b5 = text(\`: \`);
|
||||||
|
const b6 = text(ctx['v']);
|
||||||
|
const b7 = text(\`)\`);
|
||||||
|
c_block1[i1] = withKey(multi([b3, b4, b5, b6, b7]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for does not pollute the rendering context 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of [1]) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
c_block2[i1] = withKey(text(ctx['item']), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for iterate on items (on a element node) 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
let block3 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of [1,2]) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
let txt1 = ctx['item'];
|
||||||
|
c_block2[i1] = withKey(block3([txt1]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for iterate, Map param 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for ([ctx['key'],ctx['value']] of ctx['map']) {
|
||||||
|
const key1 = ctx['key'];
|
||||||
|
const b3 = text(\` [\`);
|
||||||
|
const b4 = text(ctx['key']);
|
||||||
|
const b5 = text(\`: \`);
|
||||||
|
const b6 = text(ctx['value']);
|
||||||
|
const b7 = text(\`] \`);
|
||||||
|
c_block1[i1] = withKey(multi([b3, b4, b5, b6, b7]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for iterate, Set param 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of ctx['set']) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
c_block1[i1] = withKey(text(ctx['item']), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for iterate, generator param 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of ctx['gen']()) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
c_block1[i1] = withKey(text(ctx['item']), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for iterate, iterable param 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of ctx['map'].values()) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
c_block1[i1] = withKey(text(ctx['item']), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for nested destructuring 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for ([ctx['key'],{left:ctx['left'],right:ctx['right']}] of Object.entries(ctx['obj'])) {
|
||||||
|
const key1 = ctx['key'];
|
||||||
|
const b3 = text(\`(\`);
|
||||||
|
const b4 = text(ctx['key']);
|
||||||
|
const b5 = text(\`: [\`);
|
||||||
|
const b6 = text(ctx['left']);
|
||||||
|
const b7 = text(\`, \`);
|
||||||
|
const b8 = text(ctx['right']);
|
||||||
|
const b9 = text(\`])\`);
|
||||||
|
c_block1[i1] = withKey(multi([b3, b4, b5, b6, b7, b8, b9]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for simple iteration (in a node) 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of [3,2,1]) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
c_block2[i1] = withKey(text(ctx['item']), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for simple iteration 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of [3,2,1]) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
c_block1[i1] = withKey(text(ctx['item']), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for simple iteration with two nodes inside 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block3 = createBlock(\`<span>a<block-text-0/></span>\`);
|
||||||
|
let block4 = createBlock(\`<span>b<block-text-0/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of [3,2,1]) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
let txt1 = ctx['item'];
|
||||||
|
const b3 = block3([txt1]);
|
||||||
|
let txt2 = ctx['item'];
|
||||||
|
const b4 = block4([txt2]);
|
||||||
|
c_block1[i1] = withKey(multi([b3, b4]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-call with body in t-for in t-for 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
||||||
|
let block6 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['a'] of ctx['numbers']) {
|
||||||
|
const key1 = ctx['a'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block4 = [];
|
||||||
|
let i2 = 0;
|
||||||
|
for (ctx['b'] of ctx['letters']) {
|
||||||
|
const key2 = ctx['b'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1;
|
||||||
|
setContextValue(ctx, \\"c\\", 'x'+'_'+ctx['a']+'_'+ctx['b']);
|
||||||
|
c_block4[i2] = withKey(callTemplate_1.call(this, ctx, node, key + \`__1__\${key1}__\${key2}\`), key2);
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
const b4 = list(c_block4);
|
||||||
|
let txt1 = ctx['c'];
|
||||||
|
const b6 = block6([txt1]);
|
||||||
|
c_block2[i1] = withKey(multi([b4, b6]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
let txt2 = ctx['a'];
|
||||||
|
let txt3 = ctx['b'];
|
||||||
|
let txt4 = ctx['c'];
|
||||||
|
return block1([txt2, txt3, txt4], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-call with body in t-for in t-for 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
const b2 = text(\` [\`);
|
||||||
|
const b3 = text(ctx['a']);
|
||||||
|
const b4 = text(\`] [\`);
|
||||||
|
const b5 = text(ctx['b']);
|
||||||
|
const b6 = text(\`] [\`);
|
||||||
|
const b7 = text(ctx['c']);
|
||||||
|
const b8 = text(\`] \`);
|
||||||
|
return multi([b2, b3, b4, b5, b6, b7, b8]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-call without body in t-for in t-for 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
||||||
|
let block6 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['a'] of ctx['numbers']) {
|
||||||
|
const key1 = ctx['a'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block4 = [];
|
||||||
|
let i2 = 0;
|
||||||
|
for (ctx['b'] of ctx['letters']) {
|
||||||
|
const key2 = ctx['b'];
|
||||||
|
c_block4[i2] = withKey(callTemplate_1.call(this, ctx, node, key + \`__1__\${key1}__\${key2}\`), key2);
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
const b4 = list(c_block4);
|
||||||
|
let txt1 = ctx['c'];
|
||||||
|
const b6 = block6([txt1]);
|
||||||
|
c_block2[i1] = withKey(multi([b4, b6]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
let txt2 = ctx['a'];
|
||||||
|
let txt3 = ctx['b'];
|
||||||
|
let txt4 = ctx['c'];
|
||||||
|
return block1([txt2, txt3, txt4], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-call without body in t-for in t-for 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"c\\", 'x'+'_'+ctx['a']+'_'+ctx['b']);
|
||||||
|
const b2 = text(\` [\`);
|
||||||
|
const b3 = text(ctx['a']);
|
||||||
|
const b4 = text(\`] [\`);
|
||||||
|
const b5 = text(ctx['b']);
|
||||||
|
const b6 = text(\`] [\`);
|
||||||
|
const b7 = text(ctx['c']);
|
||||||
|
const b8 = text(\`] \`);
|
||||||
|
return multi([b2, b3, b4, b5, b6, b7, b8]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-for in t-for 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['number'] of ctx['numbers']) {
|
||||||
|
const key1 = ctx['number'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block3 = [];
|
||||||
|
let i2 = 0;
|
||||||
|
for (ctx['letter'] of ctx['letters']) {
|
||||||
|
const key2 = ctx['letter'];
|
||||||
|
const b5 = text(\` [\`);
|
||||||
|
const b6 = text(ctx['number']);
|
||||||
|
const b7 = text(ctx['letter']);
|
||||||
|
const b8 = text(\`] \`);
|
||||||
|
c_block3[i2] = withKey(multi([b5, b6, b7, b8]), key2);
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
c_block2[i1] = withKey(list(c_block3), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-for in t-foreach 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { prepareList, withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(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++) {
|
||||||
|
ctx[\`number\`] = v_block2[i1];
|
||||||
|
const key1 = ctx['number'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block3 = [];
|
||||||
|
let i2 = 0;
|
||||||
|
for (ctx['letter'] of ctx['letters']) {
|
||||||
|
const key2 = ctx['letter'];
|
||||||
|
const b5 = text(\` [\`);
|
||||||
|
const b6 = text(ctx['number']);
|
||||||
|
const b7 = text(ctx['letter']);
|
||||||
|
const b8 = text(\`] \`);
|
||||||
|
c_block3[i2] = withKey(multi([b5, b6, b7, b8]), key2);
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
c_block2[i1] = withKey(list(c_block3), key1);
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-for with t-if inside (no external node) 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block3 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for ({id:ctx['id'],text:ctx['text']} of ctx['elems']) {
|
||||||
|
const key1 = ctx['id'];
|
||||||
|
let b3;
|
||||||
|
if (ctx['id']<3) {
|
||||||
|
let txt1 = ctx['text'];
|
||||||
|
b3 = block3([txt1]);
|
||||||
|
}
|
||||||
|
c_block1[i1] = withKey(multi([b3]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-for with t-if inside 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
let block4 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for ({id:ctx['id'],text:ctx['text']} of ctx['elems']) {
|
||||||
|
const key1 = ctx['id'];
|
||||||
|
let b4;
|
||||||
|
if (ctx['id']<3) {
|
||||||
|
let txt1 = ctx['text'];
|
||||||
|
b4 = block4([txt1]);
|
||||||
|
}
|
||||||
|
c_block2[i1] = withKey(multi([b4]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-foreach in t-for 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { prepareList, withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['number'] of ctx['numbers']) {
|
||||||
|
const key1 = ctx['number'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const [k_block3, v_block3, l_block3, c_block3] = prepareList(ctx['letters']);;
|
||||||
|
for (let i2 = 0; i2 < l_block3; i2++) {
|
||||||
|
ctx[\`letter\`] = v_block3[i2];
|
||||||
|
const key2 = ctx['letter'];
|
||||||
|
const b5 = text(\` [\`);
|
||||||
|
const b6 = text(ctx['number']);
|
||||||
|
const b7 = text(ctx['letter']);
|
||||||
|
const b8 = text(\`] \`);
|
||||||
|
c_block3[i2] = withKey(multi([b5, b6, b7, b8]), key2);
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
c_block2[i1] = withKey(list(c_block3), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for t-key on t-for 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
let block3 = createBlock(\`<span/>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['thing'] of ctx['things']) {
|
||||||
|
const key1 = ctx['thing'];
|
||||||
|
c_block2[i1] = withKey(block3(), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-for throws error if invalid loop expression 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
let block3 = createBlock(\`<span/>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of ctx['abc']) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
const tKey_1 = ctx['item'];
|
||||||
|
c_block2[i1] = withKey(block3(), tKey_1 + key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
@@ -328,13 +328,12 @@ exports[`t-foreach t-call with body in t-foreach in t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
let { prepareList, isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
||||||
let block6 = createBlock(\`<span><block-text-0/></span>\`);
|
let block6 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -381,9 +380,8 @@ exports[`t-foreach t-call with body in t-foreach in t-foreach 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\` [\`);
|
const b2 = text(\` [\`);
|
||||||
const b3 = text(ctx['a']);
|
const b3 = text(ctx['a']);
|
||||||
const b4 = text(\`] [\`);
|
const b4 = text(\`] [\`);
|
||||||
@@ -401,13 +399,12 @@ exports[`t-foreach t-call without body in t-foreach in t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><span>[<block-text-0/>][<block-text-1/>][<block-text-2/>]</span></div>\`);
|
||||||
let block6 = createBlock(\`<span><block-text-0/></span>\`);
|
let block6 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['numbers']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['numbers']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -449,9 +446,8 @@ exports[`t-foreach t-call without body in t-foreach in t-foreach 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"c\\", 'x'+'_'+ctx['a']+'_'+ctx['b']);
|
setContextValue(ctx, \\"c\\", 'x'+'_'+ctx['a']+'_'+ctx['b']);
|
||||||
|
|||||||
@@ -32,13 +32,12 @@ exports[`t-out multiple calls to t-out 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<span>coucou</span>\`);
|
let block2 = createBlock(\`<span>coucou</span>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
@@ -54,11 +53,10 @@ exports[`t-out multiple calls to t-out 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><div>Greeter</div><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><div>Greeter</div><block-child-1/></div>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = ctx[zero];
|
const b2 = ctx[zero];
|
||||||
const b3 = ctx[zero];
|
const b3 = ctx[zero];
|
||||||
return block1([], [b2, b3]);
|
return block1([], [b2, b3]);
|
||||||
@@ -101,13 +99,12 @@ exports[`t-out t-out 0 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"caller\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`_basic-callee\`);
|
const callTemplate_1 = app.getTemplate(\`_basic-callee\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<div>zero</div>\`);
|
let block2 = createBlock(\`<div>zero</div>\`);
|
||||||
|
|
||||||
return function caller(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
@@ -123,11 +120,10 @@ exports[`t-out t-out 0 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { zero } = helpers;
|
let { zero } = helpers;
|
||||||
// Template name: \\"_basic-callee\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function _basic_callee(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = ctx[zero];
|
const b2 = ctx[zero];
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -48,12 +48,11 @@ exports[`t-ref ref in a t-call 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -64,11 +63,10 @@ exports[`t-ref ref in a t-call 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>1<span block-ref=\\"0\\"/>2</div>\`);
|
let block1 = createBlock(\`<div>1<span block-ref=\\"0\\"/>2</div>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`name\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`name\`), el);
|
||||||
return block1([ref1]);
|
return block1([ref1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -219,12 +219,11 @@ exports[`t-set t-set can't alter from within callee 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"iter\\", 'source');
|
setContextValue(ctx, \\"iter\\", 'source');
|
||||||
@@ -241,11 +240,10 @@ exports[`t-set t-set can't alter from within callee 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let txt1 = ctx['iter'];
|
let txt1 = ctx['iter'];
|
||||||
@@ -261,12 +259,11 @@ exports[`t-set t-set can't alter in t-call body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"iter\\", 'source');
|
setContextValue(ctx, \\"iter\\", 'source');
|
||||||
@@ -287,11 +284,10 @@ exports[`t-set t-set can't alter in t-call body 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let txt1 = ctx['iter'];
|
let txt1 = ctx['iter'];
|
||||||
@@ -339,6 +335,99 @@ exports[`t-set t-set evaluates an expression only once 1`] = `
|
|||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set outside modified in t-for 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><p>EndLoop: <block-text-0/></p></div>\`);
|
||||||
|
let block3 = createBlock(\`<p>InLoop: <block-text-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['val'] of ['a','b']) {
|
||||||
|
const key1 = ctx['val'];
|
||||||
|
let txt1 = ctx['iter'];
|
||||||
|
c_block2[i1] = withKey(block3([txt1]), key1);
|
||||||
|
setContextValue(ctx, \\"iter\\", ctx['iter']+1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
let txt2 = ctx['iter'];
|
||||||
|
return block1([txt2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set outside modified in t-for increment-after operator 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><p>EndLoop: <block-text-0/></p></div>\`);
|
||||||
|
let block3 = createBlock(\`<p>InLoop: <block-text-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['val'] of ['a','b']) {
|
||||||
|
const key1 = ctx['val'];
|
||||||
|
let txt1 = ctx['iter'];
|
||||||
|
c_block2[i1] = withKey(block3([txt1]), key1);
|
||||||
|
setContextValue(ctx, \\"iter\\", ctx['iter']++);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
let txt2 = ctx['iter'];
|
||||||
|
return block1([txt2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set outside modified in t-for increment-before operator 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/><p>EndLoop: <block-text-0/></p></div>\`);
|
||||||
|
let block3 = createBlock(\`<p>InLoop: <block-text-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['val'] of ['a','b']) {
|
||||||
|
const key1 = ctx['val'];
|
||||||
|
let txt1 = ctx['iter'];
|
||||||
|
c_block2[i1] = withKey(block3([txt1]), key1);
|
||||||
|
setContextValue(ctx, \\"iter\\", ++ctx['iter']);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
let txt2 = ctx['iter'];
|
||||||
|
return block1([txt2], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`t-set t-set outside modified in t-foreach 1`] = `
|
exports[`t-set t-set outside modified in t-foreach 1`] = `
|
||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
@@ -458,6 +547,35 @@ exports[`t-set t-set should reuse variable if possible 1`] = `
|
|||||||
}"
|
}"
|
||||||
`;
|
`;
|
||||||
|
|
||||||
|
exports[`t-set t-set should reuse variable if possible: for..of 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { isBoundary, withDefault, setContextValue, withKey } = helpers;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
let block3 = createBlock(\`<div><span>v<block-text-0/></span></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
ctx[isBoundary] = 1
|
||||||
|
setContextValue(ctx, \\"v\\", 1);
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['elem'] of ctx['list']) {
|
||||||
|
const key1 = ctx['elem_index'];
|
||||||
|
let txt1 = ctx['v'];
|
||||||
|
setContextValue(ctx, \\"v\\", ctx['elem']);
|
||||||
|
c_block2[i1] = withKey(block3([txt1]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
exports[`t-set t-set with content and sub t-esc 1`] = `
|
exports[`t-set t-set with content and sub t-esc 1`] = `
|
||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ exports[`loading templates addTemplates does not modify its xml document in plac
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"hey\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function hey(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['value'];
|
let txt1 = ctx['value'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -19,11 +18,10 @@ exports[`loading templates can initialize qweb with a string 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"hey\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>jupiler</div>\`);
|
let block1 = createBlock(\`<div>jupiler</div>\`);
|
||||||
|
|
||||||
return function hey(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -33,11 +31,10 @@ exports[`loading templates can initialize qweb with an XMLDocument 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"hey\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>jupiler</div>\`);
|
let block1 = createBlock(\`<div>jupiler</div>\`);
|
||||||
|
|
||||||
return function hey(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -47,12 +44,11 @@ exports[`loading templates can load a few templates from a xml string 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`items\`);
|
const callTemplate_1 = app.getTemplate(\`items\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<ul><block-child-0/></ul>\`);
|
let block1 = createBlock(\`<ul><block-child-0/></ul>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -63,12 +59,11 @@ exports[`loading templates can load a few templates from a xml string 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"items\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<li>ok</li>\`);
|
let block2 = createBlock(\`<li>ok</li>\`);
|
||||||
let block3 = createBlock(\`<li>foo</li>\`);
|
let block3 = createBlock(\`<li>foo</li>\`);
|
||||||
|
|
||||||
return function items(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
const b3 = block3();
|
const b3 = block3();
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -80,12 +75,11 @@ exports[`loading templates can load a few templates from an XMLDocument 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"main\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`items\`);
|
const callTemplate_1 = app.getTemplate(\`items\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<ul><block-child-0/></ul>\`);
|
let block1 = createBlock(\`<ul><block-child-0/></ul>\`);
|
||||||
|
|
||||||
return function main(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -96,12 +90,11 @@ exports[`loading templates can load a few templates from an XMLDocument 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"items\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<li>ok</li>\`);
|
let block2 = createBlock(\`<li>ok</li>\`);
|
||||||
let block3 = createBlock(\`<li>foo</li>\`);
|
let block3 = createBlock(\`<li>foo</li>\`);
|
||||||
|
|
||||||
return function items(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
const b3 = block3();
|
const b3 = block3();
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
|
|||||||
@@ -5,9 +5,8 @@ exports[`translation support body of t-sets are translated 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"label\\", \`translated\`);
|
setContextValue(ctx, \\"label\\", \`translated\`);
|
||||||
@@ -21,9 +20,8 @@ exports[`translation support body of t-sets inside translation=off are not trans
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"label\\", \`untranslated\`);
|
setContextValue(ctx, \\"label\\", \`untranslated\`);
|
||||||
@@ -37,7 +35,6 @@ exports[`translation support body of t-sets with html content are translated 1`]
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, LazyValue, safeOutput } = helpers;
|
let { isBoundary, withDefault, LazyValue, safeOutput } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>translated</div>\`);
|
let block1 = createBlock(\`<div>translated</div>\`);
|
||||||
|
|
||||||
@@ -45,7 +42,7 @@ exports[`translation support body of t-sets with html content are translated 1`]
|
|||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx[\`label\`] = new LazyValue(value1, ctx, this, node, key);
|
ctx[\`label\`] = new LazyValue(value1, ctx, this, node, key);
|
||||||
@@ -59,7 +56,6 @@ exports[`translation support body of t-sets with text and html content are trans
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, LazyValue, safeOutput } = helpers;
|
let { isBoundary, withDefault, LazyValue, safeOutput } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block3 = createBlock(\`<div>translated</div>\`);
|
let block3 = createBlock(\`<div>translated</div>\`);
|
||||||
|
|
||||||
@@ -69,7 +65,7 @@ exports[`translation support body of t-sets with text and html content are trans
|
|||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx[\`label\`] = new LazyValue(value1, ctx, this, node, key);
|
ctx[\`label\`] = new LazyValue(value1, ctx, this, node, key);
|
||||||
@@ -82,11 +78,10 @@ exports[`translation support can set and remove translatable attributes 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div tomato=\\"word\\" potato=\\"mot\\" title=\\"mot\\" label=\\"word\\">text</div>\`);
|
let block1 = createBlock(\`<div tomato=\\"word\\" potato=\\"mot\\" title=\\"mot\\" label=\\"word\\">text</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -96,11 +91,10 @@ exports[`translation support can translate node content 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>mot</div>\`);
|
let block1 = createBlock(\`<div>mot</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -110,11 +104,10 @@ exports[`translation support does not translate node content if disabled 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span>mot</span><span>word</span></div>\`);
|
let block1 = createBlock(\`<div><span>mot</span><span>word</span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -124,11 +117,10 @@ exports[`translation support some attributes are translated 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p label=\\"mot\\">mot</p><p title=\\"mot\\">mot</p><p placeholder=\\"mot\\">mot</p><p alt=\\"mot\\">mot</p><p something=\\"word\\">mot</p></div>\`);
|
let block1 = createBlock(\`<div><p label=\\"mot\\">mot</p><p title=\\"mot\\">mot</p><p placeholder=\\"mot\\">mot</p><p alt=\\"mot\\">mot</p><p something=\\"word\\">mot</p></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -139,9 +131,8 @@ exports[`translation support t-set and falsy t-value: t-body are translated 1`]
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"label\\", withDefault(false, \`translated\`));
|
setContextValue(ctx, \\"label\\", withDefault(false, \`translated\`));
|
||||||
@@ -154,11 +145,10 @@ exports[`translation support translation is done on the trimmed text, with extra
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div> mot </div>\`);
|
let block1 = createBlock(\`<div> mot </div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -168,11 +158,10 @@ exports[`translation support translation works, even if initial string has inner
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>un mot</div>\`);
|
let block1 = createBlock(\`<div>un mot</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -0,0 +1,317 @@
|
|||||||
|
import {
|
||||||
|
renderToBdom,
|
||||||
|
renderToString,
|
||||||
|
snapshotEverything,
|
||||||
|
TestContext,
|
||||||
|
makeTestFixture,
|
||||||
|
} from "../helpers";
|
||||||
|
import { mount, patch } from "../../src/runtime/blockdom";
|
||||||
|
|
||||||
|
snapshotEverything();
|
||||||
|
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
// t-for
|
||||||
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
describe("t-for", () => {
|
||||||
|
test("simple iteration", () => {
|
||||||
|
const template = `<t t-for="item" t-of="[3, 2, 1]" t-key="item"><t t-esc="item"/></t>`;
|
||||||
|
expect(renderToString(template)).toBe("321");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simple iteration with two nodes inside", () => {
|
||||||
|
const template = `
|
||||||
|
<t t-for="item" t-of="[3, 2, 1]" t-key="item">
|
||||||
|
<span>a<t t-esc="item"/></span>
|
||||||
|
<span>b<t t-esc="item"/></span>
|
||||||
|
</t>`;
|
||||||
|
const expected =
|
||||||
|
"<span>a3</span><span>b3</span><span>a2</span><span>b2</span><span>a1</span><span>b1</span>";
|
||||||
|
expect(renderToString(template)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("destructuring array items", () => {
|
||||||
|
const template = `<t t-for="[key, value]" t-of="Object.entries({ a: 1, b: 2 })" t-key="key">(<t t-esc="key"/>: <t t-esc="value"/>)</t>`;
|
||||||
|
expect(renderToString(template)).toBe("(a: 1)(b: 2)");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("destructuring array items: rest", () => {
|
||||||
|
const template = `<t t-for="[head, ...tail]" t-of="[[1, 2, 3], [4, 5, 6]]" t-key="head">(<t t-esc="head"/>;<t t-esc="tail"/>)</t>`;
|
||||||
|
expect(renderToString(template)).toBe("(1;2,3)(4;5,6)");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("destructuring object items", () => {
|
||||||
|
const template = `<t t-for="{ k, v }" t-of="[{ k: 'a', v: 1 }, { k: 'b', v: 2 }]" t-key="k">(<t t-esc="k"/>: <t t-esc="v"/>)</t>`;
|
||||||
|
expect(renderToString(template)).toBe("(a: 1)(b: 2)");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("destructuring object items: rest", () => {
|
||||||
|
const template = `<t t-for="{ k, v }" t-of="[{ k: 'a', v: 1 }, { k: 'b', v: 2 }]" t-key="k">(<t t-esc="k"/>: <t t-esc="v"/>)</t>`;
|
||||||
|
expect(renderToString(template)).toBe("(a: 1)(b: 2)");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("nested destructuring", () => {
|
||||||
|
const template = `<t t-for="[key, {left, right}]" t-of="Object.entries(obj)" t-key="key">(<t t-esc="key"/>: [<t t-esc="left"/>, <t t-esc="right"/>])</t>`;
|
||||||
|
expect(
|
||||||
|
renderToString(template, {
|
||||||
|
obj: {
|
||||||
|
a: { left: 1, right: 2 },
|
||||||
|
b: { left: 3, right: 4 },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
).toBe("(a: [1, 2])(b: [3, 4])");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-key on t-for", async () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-for="thing" t-of="things" t-key="thing">
|
||||||
|
<span/>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
const fixture = makeTestFixture();
|
||||||
|
|
||||||
|
const vnode1 = renderToBdom(template, { things: [1, 2] });
|
||||||
|
mount(vnode1, fixture);
|
||||||
|
let elm = fixture;
|
||||||
|
expect(elm.innerHTML).toBe("<div><span></span><span></span></div>");
|
||||||
|
const first = elm.querySelectorAll("span")[0];
|
||||||
|
const second = elm.querySelectorAll("span")[1];
|
||||||
|
|
||||||
|
const vnode2 = renderToBdom(template, { things: [2, 1] });
|
||||||
|
patch(vnode1, vnode2);
|
||||||
|
|
||||||
|
expect(elm.innerHTML).toBe("<div><span></span><span></span></div>");
|
||||||
|
expect(first).toBe(elm.querySelectorAll("span")[1]);
|
||||||
|
expect(second).toBe(elm.querySelectorAll("span")[0]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("simple iteration (in a node)", () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-for="item" t-of="[3, 2, 1]" t-key="item"><t t-esc="item"/></t>
|
||||||
|
</div>`;
|
||||||
|
expect(renderToString(template)).toBe("<div>321</div>");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("iterate on items (on a element node)", () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<span t-for="item" t-of="[1, 2]" t-key="item"><t t-esc="item"/></span>
|
||||||
|
</div>`;
|
||||||
|
const expected = `<div><span>1</span><span>2</span></div>`;
|
||||||
|
expect(renderToString(template)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("iterate, Map param", () => {
|
||||||
|
const template = `
|
||||||
|
<t t-for="[key, value]" t-of="map" t-key="key">
|
||||||
|
[<t t-esc="key"/>: <t t-esc="value"/>]
|
||||||
|
</t>`;
|
||||||
|
const expected = ` [a: 1] [b: 2] [c: 3] `;
|
||||||
|
const context = {
|
||||||
|
map: new Map([
|
||||||
|
["a", 1],
|
||||||
|
["b", 2],
|
||||||
|
["c", 3],
|
||||||
|
]),
|
||||||
|
};
|
||||||
|
expect(renderToString(template, context)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("iterate, Set param", () => {
|
||||||
|
const template = `
|
||||||
|
<t t-for="item" t-of="set" t-key="item">
|
||||||
|
<t t-esc="item"/>
|
||||||
|
</t>`;
|
||||||
|
const expected = `123`;
|
||||||
|
const context = { set: new Set([1, 2, 3]) };
|
||||||
|
expect(renderToString(template, context)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("iterate, iterable param", () => {
|
||||||
|
const template = `
|
||||||
|
<t t-for="item" t-of="map.values()" t-key="item">
|
||||||
|
<t t-esc="item"/>
|
||||||
|
</t>`;
|
||||||
|
const expected = `123`;
|
||||||
|
const context = {
|
||||||
|
map: new Map([
|
||||||
|
["a", 1],
|
||||||
|
["b", 2],
|
||||||
|
["c", 3],
|
||||||
|
]),
|
||||||
|
};
|
||||||
|
expect(renderToString(template, context)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("iterate, generator param", () => {
|
||||||
|
const template = `
|
||||||
|
<t t-for="item" t-of="gen()" t-key="item">
|
||||||
|
<t t-esc="item"/>
|
||||||
|
</t>`;
|
||||||
|
const expected = `123`;
|
||||||
|
const context = {
|
||||||
|
*gen() {
|
||||||
|
yield 1;
|
||||||
|
yield 2;
|
||||||
|
yield 3;
|
||||||
|
},
|
||||||
|
};
|
||||||
|
expect(renderToString(template, context)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("does not pollute the rendering context", () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-for="item" t-of="[1]" t-key="item"><t t-esc="item"/></t>
|
||||||
|
</div>`;
|
||||||
|
const context = { __owl__: {} };
|
||||||
|
renderToString(template, context);
|
||||||
|
expect(Object.keys(context)).toEqual(["__owl__"]);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-for in t-for", () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-for="number" t-of="numbers" t-key="number">
|
||||||
|
<t t-for="letter" t-of="letters" t-key="letter">
|
||||||
|
[<t t-esc="number"/><t t-esc="letter"/>]
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
const context = { numbers: [1, 2, 3], letters: ["a", "b"] };
|
||||||
|
const expected = "<div> [1a] [1b] [2a] [2b] [3a] [3b] </div>";
|
||||||
|
expect(renderToString(template, context)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-for in t-foreach", () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-foreach="numbers" t-as="number" t-key="number">
|
||||||
|
<t t-for="letter" t-of="letters" t-key="letter">
|
||||||
|
[<t t-esc="number"/><t t-esc="letter"/>]
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
const context = { numbers: [1, 2, 3], letters: ["a", "b"] };
|
||||||
|
const expected = "<div> [1a] [1b] [2a] [2b] [3a] [3b] </div>";
|
||||||
|
expect(renderToString(template, context)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-foreach in t-for", () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-for="number" t-of="numbers" t-key="number">
|
||||||
|
<t t-foreach="letters" t-as="letter" t-key="letter">
|
||||||
|
[<t t-esc="number"/><t t-esc="letter"/>]
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
const context = { numbers: [1, 2, 3], letters: ["a", "b"] };
|
||||||
|
const expected = "<div> [1a] [1b] [2a] [2b] [3a] [3b] </div>";
|
||||||
|
expect(renderToString(template, context)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-call without body in t-for in t-for", () => {
|
||||||
|
const context = new TestContext();
|
||||||
|
const sub = `
|
||||||
|
<t>
|
||||||
|
<t t-set="c" t-value="'x' + '_' + a + '_'+ b" />
|
||||||
|
[<t t-esc="a" />]
|
||||||
|
[<t t-esc="b" />]
|
||||||
|
[<t t-esc="c" />]
|
||||||
|
</t>`;
|
||||||
|
|
||||||
|
const main = `
|
||||||
|
<div>
|
||||||
|
<t t-for="a" t-of="numbers" t-key="a">
|
||||||
|
<t t-for="b" t-of="letters" t-key="b">
|
||||||
|
<t t-call="sub" />
|
||||||
|
</t>
|
||||||
|
<span t-esc="c"/>
|
||||||
|
</t>
|
||||||
|
<span>[<t t-esc="a" />][<t t-esc="b" />][<t t-esc="c" />]</span>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
context.addTemplate("sub", sub);
|
||||||
|
context.addTemplate("main", main);
|
||||||
|
|
||||||
|
const ctx = { numbers: [1, 2, 3], letters: ["a", "b"] };
|
||||||
|
const expected =
|
||||||
|
"<div> [1] [a] [x_1_a] [1] [b] [x_1_b] <span></span> [2] [a] [x_2_a] [2] [b] [x_2_b] <span></span> [3] [a] [x_3_a] [3] [b] [x_3_b] <span></span><span>[][][]</span></div>";
|
||||||
|
expect(context.renderToString("main", ctx)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-call with body in t-for in t-for", () => {
|
||||||
|
const context = new TestContext();
|
||||||
|
const sub = `
|
||||||
|
<t>
|
||||||
|
[<t t-esc="a" />]
|
||||||
|
[<t t-esc="b" />]
|
||||||
|
[<t t-esc="c" />]
|
||||||
|
</t>`;
|
||||||
|
|
||||||
|
const main = `
|
||||||
|
<div>
|
||||||
|
<t t-for="a" t-of="numbers" t-key="a">
|
||||||
|
<t t-for="b" t-of="letters" t-key="b">
|
||||||
|
<t t-call="sub" >
|
||||||
|
<t t-set="c" t-value="'x' + '_' + a + '_'+ b" />
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
<span t-esc="c"/>
|
||||||
|
</t>
|
||||||
|
<span>[<t t-esc="a" />][<t t-esc="b" />][<t t-esc="c" />]</span>
|
||||||
|
</div>`;
|
||||||
|
|
||||||
|
context.addTemplate("sub", sub);
|
||||||
|
context.addTemplate("main", main);
|
||||||
|
|
||||||
|
const ctx = { numbers: [1, 2, 3], letters: ["a", "b"] };
|
||||||
|
const expected =
|
||||||
|
"<div> [1] [a] [x_1_a] [1] [b] [x_1_b] <span></span> [2] [a] [x_2_a] [2] [b] [x_2_b] <span></span> [3] [a] [x_3_a] [3] [b] [x_3_b] <span></span><span>[][][]</span></div>";
|
||||||
|
expect(context.renderToString("main", ctx)).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("throws error if invalid loop expression", () => {
|
||||||
|
const test = `<div><t t-for="item" t-of="abc" t-key="item"><span t-key="item"/></t></div>`;
|
||||||
|
expect(() => renderToString(test)).toThrow("ctx.abc is not iterable");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-for with t-if inside", () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-for="{ id, text }" t-of="elems" t-key="id">
|
||||||
|
<span t-if="id lt 3"><t t-esc="text"/></span>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
const ctx = {
|
||||||
|
elems: [
|
||||||
|
{ id: 1, text: "a" },
|
||||||
|
{ id: 2, text: "b" },
|
||||||
|
{ id: 3, text: "c" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
expect(renderToString(template, ctx)).toBe("<div><span>a</span><span>b</span></div>");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-for with t-if inside (no external node)", () => {
|
||||||
|
const template = `
|
||||||
|
<t t-for="{ id, text }" t-of="elems" t-key="id">
|
||||||
|
<span t-if="id lt 3"><t t-esc="text"/></span>
|
||||||
|
</t>`;
|
||||||
|
const ctx = {
|
||||||
|
elems: [
|
||||||
|
{ id: 1, text: "a" },
|
||||||
|
{ id: 2, text: "b" },
|
||||||
|
{ id: 3, text: "c" },
|
||||||
|
],
|
||||||
|
};
|
||||||
|
expect(renderToString(template, ctx)).toBe("<span>a</span><span>b</span>");
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -122,6 +122,19 @@ describe("t-set", () => {
|
|||||||
expect(renderToString(template, { list: ["a", "b"] })).toBe(expected);
|
expect(renderToString(template, { list: ["a", "b"] })).toBe(expected);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("t-set should reuse variable if possible: for..of", () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-set="v" t-value="1"/>
|
||||||
|
<div t-for="elem" t-of="list" t-key="elem_index">
|
||||||
|
<span>v<t t-esc="v"/></span>
|
||||||
|
<t t-set="v" t-value="elem"/>
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
const expected = "<div><div><span>v1</span></div><div><span>va</span></div></div>";
|
||||||
|
expect(renderToString(template, { list: ["a", "b"] })).toBe(expected);
|
||||||
|
});
|
||||||
|
|
||||||
test("t-set with content and sub t-esc", () => {
|
test("t-set with content and sub t-esc", () => {
|
||||||
const template = `
|
const template = `
|
||||||
<div>
|
<div>
|
||||||
@@ -232,6 +245,22 @@ describe("t-set", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("t-set outside modified in t-for", async () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="0"/>
|
||||||
|
<t t-for="val" t-of="['a','b']" t-key="val">
|
||||||
|
<p>InLoop: <t t-esc="iter"/></p>
|
||||||
|
<t t-set="iter" t-value="iter + 1"/>
|
||||||
|
</t>
|
||||||
|
<p>EndLoop: <t t-esc="iter"/></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
expect(renderToString(template)).toBe(
|
||||||
|
"<div><p>InLoop: 0</p><p>InLoop: 1</p><p>EndLoop: 2</p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test("t-set outside modified in t-foreach increment-after operator", async () => {
|
test("t-set outside modified in t-foreach increment-after operator", async () => {
|
||||||
const template = `
|
const template = `
|
||||||
<div>
|
<div>
|
||||||
@@ -248,6 +277,22 @@ describe("t-set", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("t-set outside modified in t-for increment-after operator", async () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="0"/>
|
||||||
|
<t t-for="val" t-of="['a','b']" t-key="val">
|
||||||
|
<p>InLoop: <t t-esc="iter"/></p>
|
||||||
|
<t t-set="iter" t-value="iter++"/>
|
||||||
|
</t>
|
||||||
|
<p>EndLoop: <t t-esc="iter"/></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
expect(renderToString(template)).toBe(
|
||||||
|
"<div><p>InLoop: 0</p><p>InLoop: 0</p><p>EndLoop: 0</p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test("t-set outside modified in t-foreach increment-before operator", async () => {
|
test("t-set outside modified in t-foreach increment-before operator", async () => {
|
||||||
const template = `
|
const template = `
|
||||||
<div>
|
<div>
|
||||||
@@ -264,6 +309,22 @@ describe("t-set", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test("t-set outside modified in t-for increment-before operator", async () => {
|
||||||
|
const template = `
|
||||||
|
<div>
|
||||||
|
<t t-set="iter" t-value="0"/>
|
||||||
|
<t t-for="val" t-of="['a','b']" t-key="val">
|
||||||
|
<p>InLoop: <t t-esc="iter"/></p>
|
||||||
|
<t t-set="iter" t-value="++iter"/>
|
||||||
|
</t>
|
||||||
|
<p>EndLoop: <t t-esc="iter"/></p>
|
||||||
|
</div>
|
||||||
|
`;
|
||||||
|
expect(renderToString(template)).toBe(
|
||||||
|
"<div><p>InLoop: 0</p><p>InLoop: 1</p><p>EndLoop: 0</p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
test("t-set can't alter from within callee", async () => {
|
test("t-set can't alter from within callee", async () => {
|
||||||
const context = new TestContext();
|
const context = new TestContext();
|
||||||
const sub = `<div><t t-esc="iter"/><t t-set="iter" t-value="'called'"/><t t-esc="iter"/></div>`;
|
const sub = `<div><t t-esc="iter"/><t t-set="iter" t-value="'called'"/><t t-esc="iter"/></div>`;
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -4,11 +4,10 @@ exports[`event handling Invalid handler throws an error 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">click</button>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['dosomething'], ctx];
|
let hdlr1 = [ctx['dosomething'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -19,11 +18,10 @@ exports[`event handling handler is not called if component is destroyed 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span block-handler-0=\\"click\\"/>\`);
|
let block1 = createBlock(\`<span block-handler-0=\\"click\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['click'], ctx];
|
let hdlr1 = [ctx['click'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -34,12 +32,11 @@ exports[`event handling handler receive the event as argument 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span block-handler-0=\\"click\\"><block-child-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span block-handler-0=\\"click\\"><block-child-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['inc'], ctx];
|
let hdlr1 = [ctx['inc'], ctx];
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
let txt1 = ctx['state'].value;
|
let txt1 = ctx['state'].value;
|
||||||
@@ -52,11 +49,10 @@ exports[`event handling handler receive the event as argument 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
let block1 = createBlock(\`<div>simple vnode</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -66,11 +62,10 @@ exports[`event handling handler works when app is mounted in an iframe 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span block-handler-0=\\"click\\">click me</span>\`);
|
let block1 = createBlock(\`<span block-handler-0=\\"click\\">click me</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['inc'], ctx];
|
let hdlr1 = [ctx['inc'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -81,12 +76,11 @@ exports[`event handling input blur event is not called if component is destroyed
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><textarea/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><textarea/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].cond) {
|
if (ctx['state'].cond) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -100,11 +94,10 @@ exports[`event handling input blur event is not called if component is destroyed
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<input block-handler-0=\\"blur\\"/>\`);
|
let block1 = createBlock(\`<input block-handler-0=\\"blur\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['blur'], ctx];
|
let hdlr1 = [ctx['blur'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -116,12 +109,11 @@ exports[`event handling objects from scope are properly captured by t-on 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div class=\\"item\\" block-handler-0=\\"click\\"/>\`);
|
let block3 = createBlock(\`<div class=\\"item\\" block-handler-0=\\"click\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['items']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['items']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -142,11 +134,10 @@ exports[`event handling support for callable expression in event handler 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><input type=\\"text\\" block-handler-1=\\"input\\"/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><input type=\\"text\\" block-handler-1=\\"input\\"/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Counter(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].value;
|
let txt1 = ctx['state'].value;
|
||||||
let hdlr1 = [ctx['obj'].onInput, ctx];
|
let hdlr1 = [ctx['obj'].onInput, ctx];
|
||||||
return block1([txt1, hdlr1]);
|
return block1([txt1, hdlr1]);
|
||||||
@@ -159,12 +150,11 @@ exports[`event handling t-on with handler bound to dynamic argument on a t-forea
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div class=\\"item\\" block-handler-0=\\"click\\"/>\`);
|
let block3 = createBlock(\`<div class=\\"item\\" block-handler-0=\\"click\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['items']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['items']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ exports[`basics basic use 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"p\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"p\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({p: 1}, key + \`__1\`, node, this, null);
|
return comp1({p: 1}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -17,11 +16,10 @@ exports[`basics basic use 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child<block-text-0/></span>\`);
|
let block1 = createBlock(\`<span>child<block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].p;
|
let txt1 = ctx['props'].p;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -32,11 +30,10 @@ exports[`basics can select a sub widget 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`OtherChild\`, true, false, false, []);
|
const comp2 = app.createComponent(\`OtherChild\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
if (ctx['env'].options.flag) {
|
if (ctx['env'].options.flag) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -53,11 +50,10 @@ exports[`basics can select a sub widget 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>CHILD 1</span>\`);
|
let block1 = createBlock(\`<span>CHILD 1</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -67,11 +63,10 @@ exports[`basics can select a sub widget 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>CHILD 2</div>\`);
|
let block1 = createBlock(\`<div>CHILD 2</div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_OtherChild(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -81,11 +76,10 @@ exports[`basics can select a sub widget, part 2 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`OtherChild\`, true, false, false, []);
|
const comp2 = app.createComponent(\`OtherChild\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -102,11 +96,10 @@ exports[`basics can select a sub widget, part 2 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>CHILD 1</span>\`);
|
let block1 = createBlock(\`<span>CHILD 1</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -116,11 +109,10 @@ exports[`basics can select a sub widget, part 2 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>CHILD 2</div>\`);
|
let block1 = createBlock(\`<div>CHILD 2</div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_OtherChild(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -130,10 +122,9 @@ exports[`basics sub widget is interactive 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"p\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"p\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({p: 1}, key + \`__1\`, node, this, null);
|
return comp1({p: 1}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -143,11 +134,10 @@ exports[`basics sub widget is interactive 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><button block-handler-0=\\"click\\">click</button>child<block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><button block-handler-0=\\"click\\">click</button>child<block-text-1/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['inc'], ctx];
|
let hdlr1 = [ctx['inc'], ctx];
|
||||||
let txt1 = ctx['state'].val;
|
let txt1 = ctx['state'].val;
|
||||||
return block1([hdlr1, txt1]);
|
return block1([hdlr1, txt1]);
|
||||||
@@ -159,12 +149,11 @@ exports[`basics top level sub widget with a parent 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`ComponentB\`, true, false, false, []);
|
const comp1 = app.createComponent(\`ComponentB\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1001_ComponentA(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -175,10 +164,9 @@ exports[`basics top level sub widget with a parent 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`ComponentC\`, true, false, false, []);
|
const comp1 = app.createComponent(\`ComponentC\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_ComponentB(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -188,11 +176,10 @@ exports[`basics top level sub widget with a parent 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>Hello</span>\`);
|
let block1 = createBlock(\`<span>Hello</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_ComponentC(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ exports[`hooks autofocus hook input in a t-if 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-ref=\\"0\\"/><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><input block-ref=\\"0\\"/><block-child-0/></div>\`);
|
||||||
let block2 = createBlock(\`<input block-ref=\\"0\\"/>\`);
|
let block2 = createBlock(\`<input block-ref=\\"0\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`input1\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`input1\`), el);
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
@@ -25,11 +24,10 @@ exports[`hooks autofocus hook simple input 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-ref=\\"0\\"/><input block-ref=\\"1\\"/></div>\`);
|
let block1 = createBlock(\`<div><input block-ref=\\"0\\"/><input block-ref=\\"1\\"/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`input1\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`input1\`), el);
|
||||||
let ref2 = (el) => this.__owl__.setRef((\`input2\`), el);
|
let ref2 = (el) => this.__owl__.setRef((\`input2\`), el);
|
||||||
return block1([ref1, ref2]);
|
return block1([ref1, ref2]);
|
||||||
@@ -41,10 +39,9 @@ exports[`hooks can use onWillStart, onWillUpdateProps 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`MyComponent\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`MyComponent\`, true, false, false, [\\"value\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_App(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null);
|
return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -54,11 +51,10 @@ exports[`hooks can use onWillStart, onWillUpdateProps 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_MyComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -69,11 +65,10 @@ exports[`hooks can use useComponent 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -83,11 +78,10 @@ exports[`hooks can use useEnv 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['env'].val;
|
let txt1 = ctx['env'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -98,11 +92,10 @@ exports[`hooks mounted callbacks should be called in reverse order from willUnmo
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].value;
|
let txt1 = ctx['state'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -113,10 +106,9 @@ exports[`hooks parent and child env (with useChildSubEnv then useSubEnv) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['env'].val);
|
const b2 = text(ctx['env'].val);
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -128,11 +120,10 @@ exports[`hooks parent and child env (with useChildSubEnv then useSubEnv) 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<div><block-text-0/></div>\`);
|
let block2 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['env'].hasParent) {
|
if (ctx['env'].hasParent) {
|
||||||
let txt1 = ctx['env'].val;
|
let txt1 = ctx['env'].val;
|
||||||
@@ -147,10 +138,9 @@ exports[`hooks parent and child env (with useChildSubEnv) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['env'].val);
|
const b2 = text(ctx['env'].val);
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -162,11 +152,10 @@ exports[`hooks parent and child env (with useChildSubEnv) 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['env'].val;
|
let txt1 = ctx['env'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -177,10 +166,9 @@ exports[`hooks parent and child env (with useSubEnv) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['env'].val);
|
const b2 = text(ctx['env'].val);
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -192,11 +180,10 @@ exports[`hooks parent and child env (with useSubEnv) 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['env'].val;
|
let txt1 = ctx['env'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -207,11 +194,10 @@ exports[`hooks two different call to willPatch/patched should work 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
let block1 = createBlock(\`<div>hey<block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].value;
|
let txt1 = ctx['state'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -222,11 +208,10 @@ exports[`hooks useChildSubEnv does not pollute user env 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['env'].val;
|
let txt1 = ctx['env'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -237,10 +222,9 @@ exports[`hooks useChildSubEnv supports arbitrary descriptor 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -250,11 +234,10 @@ exports[`hooks useChildSubEnv supports arbitrary descriptor 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/> <block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/> <block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['env'].someVal;
|
let txt1 = ctx['env'].someVal;
|
||||||
let txt2 = ctx['env'].someVal2;
|
let txt2 = ctx['env'].someVal2;
|
||||||
return block1([txt1, txt2]);
|
return block1([txt1, txt2]);
|
||||||
@@ -266,11 +249,10 @@ exports[`hooks useEffect hook dependencies prevent effects from rerunning when u
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_MyComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -280,11 +262,10 @@ exports[`hooks useEffect hook effect can depend on stuff in dom 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<div block-ref=\\"0\\"/>\`);
|
let block2 = createBlock(\`<div block-ref=\\"0\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_MyComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].value) {
|
if (ctx['state'].value) {
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`div\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`div\`), el);
|
||||||
@@ -299,11 +280,10 @@ exports[`hooks useEffect hook effect runs on mount, is reapplied on patch, and i
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_MyComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -313,11 +293,10 @@ exports[`hooks useEffect hook effect with empty dependency list never reruns 1`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_MyComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].value;
|
let txt1 = ctx['state'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -328,11 +307,10 @@ exports[`hooks useEffect hook properly behaves when the effect function throws 1
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_MyComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -342,10 +320,9 @@ exports[`hooks useExternalListener 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`MyComponent\`, true, false, false, []);
|
const comp1 = app.createComponent(\`MyComponent\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_App(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -359,11 +336,10 @@ exports[`hooks useExternalListener 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_MyComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -374,11 +350,10 @@ exports[`hooks useRef hook: basic use 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><button block-ref=\\"0\\"><block-text-1/></button></div>\`);
|
let block1 = createBlock(\`<div><button block-ref=\\"0\\"><block-text-1/></button></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Counter(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`button\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`button\`), el);
|
||||||
let txt1 = ctx['value'];
|
let txt1 = ctx['value'];
|
||||||
return block1([ref1, txt1]);
|
return block1([ref1, txt1]);
|
||||||
@@ -390,11 +365,10 @@ exports[`hooks useSubEnv modifies user env 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['env'].val;
|
let txt1 = ctx['env'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -405,10 +379,9 @@ exports[`hooks useSubEnv supports arbitrary descriptor 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -418,11 +391,10 @@ exports[`hooks useSubEnv supports arbitrary descriptor 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/> <block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/> <block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['env'].someVal;
|
let txt1 = ctx['env'].someVal;
|
||||||
let txt2 = ctx['env'].someVal2;
|
let txt2 = ctx['env'].someVal2;
|
||||||
return block1([txt1, txt2]);
|
return block1([txt1, txt2]);
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ exports[`lifecycle hooks basic checks for a component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>test</span>\`);
|
let block1 = createBlock(\`<span>test</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -18,13 +17,12 @@ exports[`lifecycle hooks component semantics 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1004\\"
|
|
||||||
const comp1 = app.createComponent(\`B\`, true, false, false, []);
|
const comp1 = app.createComponent(\`B\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`C\`, true, false, false, []);
|
const comp2 = app.createComponent(\`C\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>A<block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div>A<block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1004_A(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
const b3 = comp2({}, key + \`__2\`, node, this, null);
|
const b3 = comp2({}, key + \`__2\`, node, this, null);
|
||||||
return block1([], [b2, b3]);
|
return block1([], [b2, b3]);
|
||||||
@@ -36,11 +34,10 @@ exports[`lifecycle hooks component semantics 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>B</div>\`);
|
let block1 = createBlock(\`<div>B</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_B(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -50,14 +47,13 @@ exports[`lifecycle hooks component semantics 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1003\\"
|
|
||||||
const comp1 = app.createComponent(\`D\`, true, false, false, []);
|
const comp1 = app.createComponent(\`D\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`E\`, true, false, false, []);
|
const comp2 = app.createComponent(\`E\`, true, false, false, []);
|
||||||
const comp3 = app.createComponent(\`F\`, true, false, false, []);
|
const comp3 = app.createComponent(\`F\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>C<block-child-0/><block-child-1/><block-child-2/></div>\`);
|
let block1 = createBlock(\`<div>C<block-child-0/><block-child-1/><block-child-2/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1003_C(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3,b4;
|
let b2,b3,b4;
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
@@ -74,11 +70,10 @@ exports[`lifecycle hooks component semantics 4`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>D</div>\`);
|
let block1 = createBlock(\`<div>D</div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_D(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -88,11 +83,10 @@ exports[`lifecycle hooks component semantics 5`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>E</div>\`);
|
let block1 = createBlock(\`<div>E</div>\`);
|
||||||
|
|
||||||
return function xml_template_1001_E(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -102,11 +96,10 @@ exports[`lifecycle hooks component semantics 6`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1002\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>F</div>\`);
|
let block1 = createBlock(\`<div>F</div>\`);
|
||||||
|
|
||||||
return function xml_template_1002_F(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -116,12 +109,11 @@ exports[`lifecycle hooks components are unmounted and destroyed if no longer in
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
||||||
|
|
||||||
let block2 = createBlock(\`<div><block-child-0/></div>\`);
|
let block2 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
const b3 = comp1({n: ctx['state'].n}, key + \`__1\`, node, this, null);
|
const b3 = comp1({n: ctx['state'].n}, key + \`__1\`, node, this, null);
|
||||||
@@ -136,11 +128,10 @@ exports[`lifecycle hooks components are unmounted and destroyed if no longer in
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].n;
|
let txt1 = ctx['props'].n;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -151,10 +142,9 @@ exports[`lifecycle hooks components are unmounted destroyed if no longer in DOM
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].ok) {
|
if (ctx['state'].ok) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -168,11 +158,10 @@ exports[`lifecycle hooks components are unmounted destroyed if no longer in DOM
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -182,10 +171,9 @@ exports[`lifecycle hooks destroy new children before being mountged 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3,b4;
|
let b2,b3,b4;
|
||||||
b2 = text(\`before\`);
|
b2 = text(\`before\`);
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
@@ -201,9 +189,8 @@ exports[`lifecycle hooks destroy new children before being mountged 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -213,12 +200,11 @@ exports[`lifecycle hooks hooks are called in proper order in widget creation/des
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -229,11 +215,10 @@ exports[`lifecycle hooks hooks are called in proper order in widget creation/des
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -243,10 +228,9 @@ exports[`lifecycle hooks lifecycle callbacks are bound to component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Test\`, true, false, false, [\\"rev\\"]);
|
const comp1 = app.createComponent(\`Test\`, true, false, false, [\\"rev\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({rev: ctx['rev']}, key + \`__1\`, node, this, null);
|
return comp1({rev: ctx['rev']}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -256,9 +240,8 @@ exports[`lifecycle hooks lifecycle callbacks are bound to component 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].rev);
|
return text(ctx['props'].rev);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -268,12 +251,11 @@ exports[`lifecycle hooks lifecycle semantics 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"a\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"a\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({a: ctx['state'].a}, key + \`__1\`, node, this, null);
|
const b2 = comp1({a: ctx['state'].a}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -284,11 +266,10 @@ exports[`lifecycle hooks lifecycle semantics 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -298,10 +279,9 @@ exports[`lifecycle hooks lifecycle semantics, part 2 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].hasChild) {
|
if (ctx['state'].hasChild) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -315,10 +295,9 @@ exports[`lifecycle hooks lifecycle semantics, part 2 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`GrandChild\`, true, false, false, []);
|
const comp1 = app.createComponent(\`GrandChild\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -328,11 +307,10 @@ exports[`lifecycle hooks lifecycle semantics, part 2 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_GrandChild(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -342,10 +320,9 @@ exports[`lifecycle hooks lifecycle semantics, part 3 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].hasChild) {
|
if (ctx['state'].hasChild) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -359,10 +336,9 @@ exports[`lifecycle hooks lifecycle semantics, part 4 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].hasChild) {
|
if (ctx['state'].hasChild) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -376,10 +352,9 @@ exports[`lifecycle hooks lifecycle semantics, part 4 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`GrandChild\`, true, false, false, []);
|
const comp1 = app.createComponent(\`GrandChild\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -389,11 +364,10 @@ exports[`lifecycle hooks lifecycle semantics, part 4 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_GrandChild(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -403,10 +377,9 @@ exports[`lifecycle hooks lifecycle semantics, part 5 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].hasChild) {
|
if (ctx['state'].hasChild) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -420,11 +393,10 @@ exports[`lifecycle hooks lifecycle semantics, part 5 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -434,10 +406,9 @@ exports[`lifecycle hooks lifecycle semantics, part 6 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null);
|
return comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -447,11 +418,10 @@ exports[`lifecycle hooks lifecycle semantics, part 6 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -461,11 +431,10 @@ exports[`lifecycle hooks mounted hook is called if mounted in DOM 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -475,10 +444,9 @@ exports[`lifecycle hooks mounted hook is called on every mount, not just the fir
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].hasChild) {
|
if (ctx['state'].hasChild) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -492,11 +460,10 @@ exports[`lifecycle hooks mounted hook is called on every mount, not just the fir
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child</div>\`);
|
let block1 = createBlock(\`<div>child</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -506,12 +473,11 @@ exports[`lifecycle hooks mounted hook is called on subcomponents, in proper orde
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -522,11 +488,10 @@ exports[`lifecycle hooks mounted hook is called on subcomponents, in proper orde
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -536,12 +501,11 @@ exports[`lifecycle hooks mounted hook is called on subsubcomponents, in proper o
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -555,12 +519,11 @@ exports[`lifecycle hooks mounted hook is called on subsubcomponents, in proper o
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`ChildChild\`, true, false, false, []);
|
const comp1 = app.createComponent(\`ChildChild\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -571,11 +534,10 @@ exports[`lifecycle hooks mounted hook is called on subsubcomponents, in proper o
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_ChildChild(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -585,10 +547,9 @@ exports[`lifecycle hooks onWillRender 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"someValue\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"someValue\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({someValue: ctx['state'].value}, key + \`__1\`, node, this, null);
|
return comp1({someValue: ctx['state'].value}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -598,11 +559,10 @@ exports[`lifecycle hooks onWillRender 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\"><block-text-1/></button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\"><block-text-1/></button>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['increment'], ctx];
|
let hdlr1 = [ctx['increment'], ctx];
|
||||||
let txt1 = ctx['state'].value;
|
let txt1 = ctx['state'].value;
|
||||||
return block1([hdlr1, txt1]);
|
return block1([hdlr1, txt1]);
|
||||||
@@ -614,12 +574,11 @@ exports[`lifecycle hooks patched hook is called after updateProps 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"a\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"a\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({a: ctx['state'].a}, key + \`__1\`, node, this, null);
|
const b2 = comp1({a: ctx['state'].a}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -630,11 +589,10 @@ exports[`lifecycle hooks patched hook is called after updateProps 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -644,11 +602,10 @@ exports[`lifecycle hooks patched hook is called after updating State 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].a;
|
let txt1 = ctx['state'].a;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -659,11 +616,10 @@ exports[`lifecycle hooks render in mounted 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['patched'];
|
let txt1 = ctx['patched'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -674,11 +630,10 @@ exports[`lifecycle hooks render in patched 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['patched'];
|
let txt1 = ctx['patched'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -689,11 +644,10 @@ exports[`lifecycle hooks render in willPatch 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['patched'];
|
let txt1 = ctx['patched'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -704,10 +658,9 @@ exports[`lifecycle hooks sub widget (inside sub node): hooks are correctly calle
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -721,11 +674,10 @@ exports[`lifecycle hooks sub widget (inside sub node): hooks are correctly calle
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -735,11 +687,10 @@ exports[`lifecycle hooks timeout in onWillStart emits a warning 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span/>\`);
|
let block1 = createBlock(\`<span/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -749,10 +700,9 @@ exports[`lifecycle hooks timeout in onWillUpdateProps emits a warning 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"prop\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"prop\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const props1 = {prop: ctx['state'].prop};
|
const props1 = {prop: ctx['state'].prop};
|
||||||
helpers.validateProps(\`Child\`, props1, this);
|
helpers.validateProps(\`Child\`, props1, this);
|
||||||
return comp1(props1, key + \`__1\`, node, this, null);
|
return comp1(props1, key + \`__1\`, node, this, null);
|
||||||
@@ -764,9 +714,8 @@ exports[`lifecycle hooks timeout in onWillUpdateProps emits a warning 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`\`);
|
return text(\`\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -776,12 +725,11 @@ exports[`lifecycle hooks willPatch, patched hook are called on subsubcomponents,
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({n: ctx['state'].n}, key + \`__1\`, node, this, null);
|
const b2 = comp1({n: ctx['state'].n}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -792,12 +740,11 @@ exports[`lifecycle hooks willPatch, patched hook are called on subsubcomponents,
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`ChildChild\`, true, false, false, [\\"n\\"]);
|
const comp1 = app.createComponent(\`ChildChild\`, true, false, false, [\\"n\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({n: ctx['props'].n}, key + \`__1\`, node, this, null);
|
const b2 = comp1({n: ctx['props'].n}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -808,11 +755,10 @@ exports[`lifecycle hooks willPatch, patched hook are called on subsubcomponents,
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_ChildChild(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].n;
|
let txt1 = ctx['props'].n;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -823,10 +769,9 @@ exports[`lifecycle hooks willStart hook is called on sub component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -836,11 +781,10 @@ exports[`lifecycle hooks willStart hook is called on sub component 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -850,11 +794,10 @@ exports[`lifecycle hooks willStart is called 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -864,11 +807,10 @@ exports[`lifecycle hooks willStart is called with component as this 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
let block1 = createBlock(\`<span>simple vnode</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -878,13 +820,12 @@ exports[`lifecycle hooks willStart, mounted on subwidget rendered after main is
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block3 = createBlock(\`<div/>\`);
|
let block3 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
if (ctx['state'].ok) {
|
if (ctx['state'].ok) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -900,11 +841,10 @@ exports[`lifecycle hooks willStart, mounted on subwidget rendered after main is
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -914,10 +854,9 @@ exports[`lifecycle hooks willUpdateProps hook is called 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({n: ctx['state'].n}, key + \`__1\`, node, this, null);
|
return comp1({n: ctx['state'].n}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -927,11 +866,10 @@ exports[`lifecycle hooks willUpdateProps hook is called 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].n;
|
let txt1 = ctx['props'].n;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ exports[`.alike suffix in a list 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Todo\`, true, false, false, [\\"todo\\"]);
|
const comp1 = app.createComponent(\`Todo\`, true, false, false, [\\"todo\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['state'].elems);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['state'].elems);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -27,11 +26,10 @@ exports[`.alike suffix in a list 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\"><block-text-1/><block-child-0/></button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\"><block-text-1/><block-child-0/></button>\`);
|
||||||
|
|
||||||
return function xml_template_999_Todo(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
let hdlr1 = [ctx['props'].toggle, ctx];
|
let hdlr1 = [ctx['props'].toggle, ctx];
|
||||||
let txt1 = ctx['props'].todo.id;
|
let txt1 = ctx['props'].todo.id;
|
||||||
@@ -47,10 +45,9 @@ exports[`.alike suffix in a simple case 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['state'].counter);
|
const b2 = text(ctx['state'].counter);
|
||||||
const b3 = comp1({fn: ()=>1}, key + \`__1\`, node, this, null);
|
const b3 = comp1({fn: ()=>1}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -62,9 +59,8 @@ exports[`.alike suffix in a simple case 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].fn());
|
return text(ctx['props'].fn());
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -74,12 +70,11 @@ exports[`basics accept ES6-like syntax for props (with getters) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"greetings\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"greetings\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({greetings: ctx['greetings']}, key + \`__1\`, node, this, null);
|
const b2 = comp1({greetings: ctx['greetings']}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -90,11 +85,10 @@ exports[`basics accept ES6-like syntax for props (with getters) 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].greetings;
|
let txt1 = ctx['props'].greetings;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -106,10 +100,9 @@ exports[`basics arrow functions as prop correctly capture their scope 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"onClick\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"onClick\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['items']);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['items']);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -128,11 +121,10 @@ exports[`basics arrow functions as prop correctly capture their scope 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\"/>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['props'].onClick, ctx];
|
let hdlr1 = [ctx['props'].onClick, ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -143,12 +135,11 @@ exports[`basics explicit object prop 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({value: ctx['state'].val}, key + \`__1\`, node, this, null);
|
const b2 = comp1({value: ctx['state'].val}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -159,11 +150,10 @@ exports[`basics explicit object prop 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].someval;
|
let txt1 = ctx['state'].someval;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -174,10 +164,9 @@ exports[`basics prop names can contain - 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"prop-name\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"prop-name\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({'prop-name': 7}, key + \`__1\`, node, this, null);
|
return comp1({'prop-name': 7}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -187,11 +176,10 @@ exports[`basics prop names can contain - 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props']['prop-name'];
|
let txt1 = ctx['props']['prop-name'];
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -202,10 +190,9 @@ exports[`basics support prop names that aren't valid bare object property names
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"some-dashed-prop\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"some-dashed-prop\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({'some-dashed-prop': 5}, key + \`__1\`, node, this, null);
|
return comp1({'some-dashed-prop': 5}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -215,11 +202,10 @@ exports[`basics support prop names that aren't valid bare object property names
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\"/>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['props'].onClick, ctx];
|
let hdlr1 = [ctx['props'].onClick, ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -231,7 +217,6 @@ exports[`basics t-set with a body expression can be passed in props, and then t-
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, LazyValue } = helpers;
|
let { isBoundary, withDefault, LazyValue } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
@@ -241,7 +226,7 @@ exports[`basics t-set with a body expression can be passed in props, and then t-
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx[\`abc\`] = new LazyValue(value1, ctx, this, node, key);
|
ctx[\`abc\`] = new LazyValue(value1, ctx, this, node, key);
|
||||||
@@ -256,11 +241,10 @@ exports[`basics t-set with a body expression can be passed in props, and then t-
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { safeOutput } = helpers;
|
let { safeOutput } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-child-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
const b2 = safeOutput(ctx['props'].val);
|
const b2 = safeOutput(ctx['props'].val);
|
||||||
return block1([txt1], [b2]);
|
return block1([txt1], [b2]);
|
||||||
@@ -273,12 +257,11 @@ exports[`basics t-set with a body expression can be used as textual prop 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"abc\\", \`42\`);
|
setContextValue(ctx, \\"abc\\", \`42\`);
|
||||||
@@ -292,11 +275,10 @@ exports[`basics t-set with a body expression can be used as textual prop 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -308,12 +290,11 @@ exports[`basics t-set works 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"val\\", 42);
|
setContextValue(ctx, \\"val\\", 42);
|
||||||
@@ -327,11 +308,10 @@ exports[`basics t-set works 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -342,10 +322,9 @@ exports[`basics template string in prop 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"propName\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"propName\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({propName: \`1\${ctx['someVal']}3\`}, key + \`__1\`, node, this, null);
|
return comp1({propName: \`1\${ctx['someVal']}3\`}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -355,9 +334,8 @@ exports[`basics template string in prop 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`\`);
|
return text(\`\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -367,10 +345,9 @@ exports[`bound functions are considered 'alike' 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['state'].val);
|
const b2 = text(ctx['state'].val);
|
||||||
const b3 = comp1({fn: (ctx['someFunction']).bind(this)}, key + \`__1\`, node, this, null);
|
const b3 = comp1({fn: (ctx['someFunction']).bind(this)}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -382,9 +359,8 @@ exports[`bound functions are considered 'alike' 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -394,10 +370,9 @@ exports[`bound functions is not referentially equal after update 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({val: ctx['state'].val,fn: (ctx['someFunction']).bind(this)}, key + \`__1\`, node, this, null);
|
return comp1({val: ctx['state'].val,fn: (ctx['someFunction']).bind(this)}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -407,9 +382,8 @@ exports[`bound functions is not referentially equal after update 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].val);
|
return text(ctx['props'].val);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -419,10 +393,9 @@ exports[`can bind function prop with bind suffix 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({doSomething: (ctx['doSomething']).bind(this)}, key + \`__1\`, node, this, null);
|
return comp1({doSomething: (ctx['doSomething']).bind(this)}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -432,9 +405,8 @@ exports[`can bind function prop with bind suffix 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -444,10 +416,9 @@ exports[`do not crash when binding anonymous function prop with bind suffix 1`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const v1 = ctx['this'];
|
const v1 = ctx['this'];
|
||||||
return comp1({doSomething: ((_val)=>v1.doSomething(_val)).bind(this)}, key + \`__1\`, node, this, null);
|
return comp1({doSomething: ((_val)=>v1.doSomething(_val)).bind(this)}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
@@ -458,9 +429,8 @@ exports[`do not crash when binding anonymous function prop with bind suffix 2`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,10 +4,9 @@ exports[`reactivity in lifecycle Child component doesn't render when state they
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"state\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"state\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].renderChild) {
|
if (ctx['state'].renderChild) {
|
||||||
b2 = comp1({state: ctx['state']}, key + \`__1\`, node, this, null);
|
b2 = comp1({state: ctx['state']}, key + \`__1\`, node, this, null);
|
||||||
@@ -21,9 +20,8 @@ exports[`reactivity in lifecycle Child component doesn't render when state they
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].state.content.a);
|
return text(ctx['props'].state.content.a);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -33,10 +31,9 @@ exports[`reactivity in lifecycle Component is automatically subscribed to reacti
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"obj\\",\\"reactiveObj\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"obj\\",\\"reactiveObj\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({obj: ctx['obj'],reactiveObj: ctx['reactiveObj']}, key + \`__1\`, node, this, null);
|
return comp1({obj: ctx['obj'],reactiveObj: ctx['reactiveObj']}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -46,9 +43,8 @@ exports[`reactivity in lifecycle Component is automatically subscribed to reacti
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['props'].obj.a);
|
const b2 = text(ctx['props'].obj.a);
|
||||||
const b3 = text(ctx['props'].reactiveObj.b);
|
const b3 = text(ctx['props'].reactiveObj.b);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -60,11 +56,10 @@ exports[`reactivity in lifecycle can use a state hook 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Counter(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['counter'].value;
|
let txt1 = ctx['counter'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -75,11 +70,10 @@ exports[`reactivity in lifecycle can use a state hook 2 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].a;
|
let txt1 = ctx['state'].a;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -90,11 +84,10 @@ exports[`reactivity in lifecycle can use a state hook on Map 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Counter(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['counter'].get('value');
|
let txt1 = ctx['counter'].get('value');
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -105,11 +98,10 @@ exports[`reactivity in lifecycle change state while mounting component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].val;
|
let txt1 = ctx['state'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -120,12 +112,11 @@ exports[`reactivity in lifecycle state changes in willUnmount do not trigger rer
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
b2 = comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
b2 = comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
||||||
@@ -139,11 +130,10 @@ exports[`reactivity in lifecycle state changes in willUnmount do not trigger rer
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
let txt2 = ctx['state'].n;
|
let txt2 = ctx['state'].n;
|
||||||
return block1([txt1, txt2]);
|
return block1([txt1, txt2]);
|
||||||
@@ -155,9 +145,8 @@ exports[`subscriptions subscriptions returns the keys and targets observed by th
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['state'].a);
|
return text(ctx['state'].a);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -167,10 +156,9 @@ exports[`subscriptions subscriptions returns the keys observed by the component
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"state\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"state\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['state'].a);
|
const b2 = text(ctx['state'].a);
|
||||||
const b3 = comp1({state: ctx['state']}, key + \`__1\`, node, this, null);
|
const b3 = comp1({state: ctx['state']}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -182,9 +170,8 @@ exports[`subscriptions subscriptions returns the keys observed by the component
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].state.b);
|
return text(ctx['props'].state.b);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ exports[`refs basic use 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-ref=\\"0\\"/>\`);
|
let block1 = createBlock(\`<div block-ref=\\"0\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`div\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`div\`), el);
|
||||||
return block1([ref1]);
|
return block1([ref1]);
|
||||||
}
|
}
|
||||||
@@ -19,12 +18,11 @@ exports[`refs can use 2 refs with same name in a t-if/t-else situation 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<div block-ref=\\"0\\"/>\`);
|
let block2 = createBlock(\`<div block-ref=\\"0\\"/>\`);
|
||||||
let block3 = createBlock(\`<span block-ref=\\"0\\"/>\`);
|
let block3 = createBlock(\`<span block-ref=\\"0\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
if (ctx['state'].value) {
|
if (ctx['state'].value) {
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`coucou\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`coucou\`), el);
|
||||||
@@ -42,11 +40,10 @@ exports[`refs ref is unset when t-if goes to false after unrelated render 1`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<div block-attribute-0=\\"class\\" block-ref=\\"1\\"/>\`);
|
let block2 = createBlock(\`<div block-attribute-0=\\"class\\" block-ref=\\"1\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].show) {
|
if (ctx['state'].show) {
|
||||||
let attr1 = ctx['state'].class;
|
let attr1 = ctx['state'].class;
|
||||||
@@ -62,12 +59,11 @@ exports[`refs refs and recursive templates 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const comp1 = app.createComponent(\`Test\`, true, false, false, [\\"tree\\"]);
|
const comp1 = app.createComponent(\`Test\`, true, false, false, [\\"tree\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-ref=\\"0\\"><block-text-1/><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p block-ref=\\"0\\"><block-text-1/><block-child-0/></p>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`root\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`root\`), el);
|
||||||
let txt1 = ctx['props'].tree.value;
|
let txt1 = ctx['props'].tree.value;
|
||||||
@@ -83,12 +79,11 @@ exports[`refs refs and t-key 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<button block-handler-0=\\"click\\"/>\`);
|
let block2 = createBlock(\`<button block-handler-0=\\"click\\"/>\`);
|
||||||
let block3 = createBlock(\`<p block-ref=\\"0\\"/>\`);
|
let block3 = createBlock(\`<p block-ref=\\"0\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const v1 = ctx['state'];
|
const v1 = ctx['state'];
|
||||||
let hdlr1 = [()=>v1.renderId++, ctx];
|
let hdlr1 = [()=>v1.renderId++, ctx];
|
||||||
const b2 = block2([hdlr1]);
|
const b2 = block2([hdlr1]);
|
||||||
@@ -105,7 +100,6 @@ exports[`refs refs are properly bound in slots 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { capture, markRaw } = helpers;
|
let { capture, markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Dialog\`, true, true, false, []);
|
const comp1 = app.createComponent(\`Dialog\`, true, true, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span class=\\"counter\\"><block-text-0/></span><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><span class=\\"counter\\"><block-text-0/></span><block-child-0/></div>\`);
|
||||||
@@ -117,7 +111,7 @@ exports[`refs refs are properly bound in slots 1`] = `
|
|||||||
return block2([hdlr1, ref1]);
|
return block2([hdlr1, ref1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].val;
|
let txt1 = ctx['state'].val;
|
||||||
const ctx1 = capture(ctx);
|
const ctx1 = capture(ctx);
|
||||||
const b3 = comp1({slots: markRaw({'footer': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__1\`, node, this, null);
|
const b3 = comp1({slots: markRaw({'footer': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__1\`, node, this, null);
|
||||||
@@ -131,11 +125,10 @@ exports[`refs refs are properly bound in slots 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot } = helpers;
|
let { callSlot } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Dialog(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callSlot(ctx, node, key, 'footer', false, {});
|
const b2 = callSlot(ctx, node, key, 'footer', false, {});
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -147,12 +140,11 @@ exports[`refs throws if there are 2 same refs at the same time 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { makeRefWrapper } = helpers;
|
let { makeRefWrapper } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<div block-ref=\\"0\\"/>\`);
|
let block2 = createBlock(\`<div block-ref=\\"0\\"/>\`);
|
||||||
let block3 = createBlock(\`<span block-ref=\\"0\\"/>\`);
|
let block3 = createBlock(\`<span block-ref=\\"0\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let refWrapper = makeRefWrapper(this.__owl__);
|
let refWrapper = makeRefWrapper(this.__owl__);
|
||||||
let ref1 = refWrapper(\`coucou\`, (el) => this.__owl__.setRef((\`coucou\`), el));
|
let ref1 = refWrapper(\`coucou\`, (el) => this.__owl__.setRef((\`coucou\`), el));
|
||||||
const b2 = block2([ref1]);
|
const b2 = block2([ref1]);
|
||||||
|
|||||||
@@ -4,10 +4,9 @@ exports[`children, default props and renderings 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['state'].value);
|
const b2 = text(ctx['state'].value);
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -19,9 +18,8 @@ exports[`children, default props and renderings 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -31,10 +29,9 @@ exports[`force render in case of existing render 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`B\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`B\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
return function xml_template_1001_A(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -44,10 +41,9 @@ exports[`force render in case of existing render 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`C\`, true, false, false, []);
|
const comp1 = app.createComponent(\`C\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_B(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
const b3 = text(ctx['props'].val);
|
const b3 = text(ctx['props'].val);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -59,9 +55,8 @@ exports[`force render in case of existing render 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_C(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`C\`);
|
return text(\`C\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -71,10 +66,9 @@ exports[`rendering semantics can force a render to update sub tree 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['state'].value);
|
const b2 = text(ctx['state'].value);
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -86,9 +80,8 @@ exports[`rendering semantics can force a render to update sub tree 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -98,10 +91,9 @@ exports[`rendering semantics can render a parent without rendering child 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['state'].value);
|
const b2 = text(ctx['state'].value);
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -113,9 +105,8 @@ exports[`rendering semantics can render a parent without rendering child 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -125,10 +116,9 @@ exports[`rendering semantics props are reactive (nested prop) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"a\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"a\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({a: ctx['state']}, key + \`__1\`, node, this, null);
|
return comp1({a: ctx['state']}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -138,9 +128,8 @@ exports[`rendering semantics props are reactive (nested prop) 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].a.b.c);
|
return text(ctx['props'].a.b.c);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -150,10 +139,9 @@ exports[`rendering semantics props are reactive 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"a\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"a\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({a: ctx['state']}, key + \`__1\`, node, this, null);
|
return comp1({a: ctx['state']}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -163,9 +151,8 @@ exports[`rendering semantics props are reactive 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].a.b);
|
return text(ctx['props'].a.b);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -175,10 +162,9 @@ exports[`rendering semantics render need a boolean = true to be 'deep' 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['state'].value);
|
const b2 = text(ctx['state'].value);
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -190,9 +176,8 @@ exports[`rendering semantics render need a boolean = true to be 'deep' 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -202,10 +187,9 @@ exports[`rendering semantics render with deep=true followed by render with deep=
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\`parent\`);
|
const b2 = text(\`parent\`);
|
||||||
const b3 = text(ctx['state'].value);
|
const b3 = text(ctx['state'].value);
|
||||||
const b4 = comp1({}, key + \`__1\`, node, this, null);
|
const b4 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -218,9 +202,8 @@ exports[`rendering semantics render with deep=true followed by render with deep=
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\`child\`);
|
const b2 = text(\`child\`);
|
||||||
const b3 = text(ctx['env'].getValue());
|
const b3 = text(ctx['env'].getValue());
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -232,10 +215,9 @@ exports[`rendering semantics rendering is atomic (for one subtree) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`B\`, true, false, false, [\\"obj\\"]);
|
const comp1 = app.createComponent(\`B\`, true, false, false, [\\"obj\\"]);
|
||||||
|
|
||||||
return function xml_template_1001_A(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['state'].obj.val);
|
const b2 = text(ctx['state'].obj.val);
|
||||||
const b3 = comp1({obj: ctx['state'].obj}, key + \`__1\`, node, this, null);
|
const b3 = comp1({obj: ctx['state'].obj}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -247,10 +229,9 @@ exports[`rendering semantics rendering is atomic (for one subtree) 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`C\`, true, false, false, [\\"obj\\"]);
|
const comp1 = app.createComponent(\`C\`, true, false, false, [\\"obj\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_B(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({obj: ctx['props'].obj}, key + \`__1\`, node, this, null);
|
return comp1({obj: ctx['props'].obj}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -260,9 +241,8 @@ exports[`rendering semantics rendering is atomic (for one subtree) 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_C(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['props'].obj.val);
|
return text(ctx['props'].obj.val);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -272,10 +252,9 @@ exports[`rendering semantics works as expected for dynamic number of props 1`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, true, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, true, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1(Object.assign({}, ctx['state']), key + \`__1\`, node, this, null);
|
return comp1(Object.assign({}, ctx['state']), key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -285,9 +264,8 @@ exports[`rendering semantics works as expected for dynamic number of props 2`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(Object.keys(ctx['props']).length);
|
return text(Object.keys(ctx['props']).length);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -4,10 +4,9 @@ exports[`style and class handling can set class on multi root component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'fromparent'}, key + \`__1\`, node, this, null);
|
return comp1({class: 'fromparent'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -17,12 +16,11 @@ exports[`style and class handling can set class on multi root component 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<div>a</div>\`);
|
let block2 = createBlock(\`<div>a</div>\`);
|
||||||
let block3 = createBlock(\`<span block-attribute-0=\\"class\\">b</span>\`);
|
let block3 = createBlock(\`<span block-attribute-0=\\"class\\">b</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
const b3 = block3([attr1]);
|
const b3 = block3([attr1]);
|
||||||
@@ -35,10 +33,9 @@ exports[`style and class handling can set class on sub component, as prop 1`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'some-class'}, key + \`__1\`, node, this, null);
|
return comp1({class: 'some-class'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -48,11 +45,10 @@ exports[`style and class handling can set class on sub component, as prop 2`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -63,10 +59,9 @@ exports[`style and class handling can set class on sub sub component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'fromparent'}, key + \`__1\`, node, this, null);
|
return comp1({class: 'fromparent'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -76,10 +71,9 @@ exports[`style and class handling can set class on sub sub component 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`ChildChild\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`ChildChild\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: (ctx['props'].class||'')+' fromchild'}, key + \`__1\`, node, this, null);
|
return comp1({class: (ctx['props'].class||'')+' fromchild'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -89,11 +83,10 @@ exports[`style and class handling can set class on sub sub component 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">childchild</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">childchild</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_ChildChild(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -104,10 +97,9 @@ exports[`style and class handling can set more than one class on sub component 1
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'a b'}, key + \`__1\`, node, this, null);
|
return comp1({class: 'a b'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -117,11 +109,10 @@ exports[`style and class handling can set more than one class on sub component 2
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -132,11 +123,10 @@ exports[`style and class handling can set style and class inside component 1`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div style=\\"font-weight:bold;\\" class=\\"some-class\\">world</div>\`);
|
let block1 = createBlock(\`<div style=\\"font-weight:bold;\\" class=\\"some-class\\">world</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -146,11 +136,10 @@ exports[`style and class handling class on components do not interfere with user
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_App(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = {c:ctx['state'].c};
|
let attr1 = {c:ctx['state'].c};
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -161,10 +150,9 @@ exports[`style and class handling class on sub component, which is switched to a
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1002\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\",\\"child\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\",\\"child\\"]);
|
||||||
|
|
||||||
return function xml_template_1002_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'someclass',child: ctx['state'].child}, key + \`__1\`, node, this, null);
|
return comp1({class: 'someclass',child: ctx['state'].child}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -174,11 +162,10 @@ exports[`style and class handling class on sub component, which is switched to a
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`ChildA\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`ChildA\`, true, false, false, [\\"class\\"]);
|
||||||
const comp2 = app.createComponent(\`ChildB\`, true, false, false, [\\"class\\"]);
|
const comp2 = app.createComponent(\`ChildB\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1001_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
if (ctx['props'].child==='a') {
|
if (ctx['props'].child==='a') {
|
||||||
b2 = comp1({class: ctx['props'].class}, key + \`__1\`, node, this, null);
|
b2 = comp1({class: ctx['props'].class}, key + \`__1\`, node, this, null);
|
||||||
@@ -194,11 +181,10 @@ exports[`style and class handling class on sub component, which is switched to a
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">a</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">a</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_ChildA(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -209,11 +195,10 @@ exports[`style and class handling class on sub component, which is switched to a
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span block-attribute-0=\\"class\\">b</span>\`);
|
let block1 = createBlock(\`<span block-attribute-0=\\"class\\">b</span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_ChildB(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -224,12 +209,11 @@ exports[`style and class handling class with extra whitespaces (variation) 1`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
let block1 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({class: 'a b c d'}, key + \`__1\`, node, this, null);
|
const b2 = comp1({class: 'a b c d'}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -240,11 +224,10 @@ exports[`style and class handling class with extra whitespaces (variation) 2`] =
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -255,10 +238,9 @@ exports[`style and class handling class with extra whitespaces 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'a b c d'}, key + \`__1\`, node, this, null);
|
return comp1({class: 'a b c d'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -268,11 +250,10 @@ exports[`style and class handling class with extra whitespaces 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -283,10 +264,9 @@ exports[`style and class handling component class and parent class combine toget
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'from parent'}, key + \`__1\`, node, this, null);
|
return comp1({class: 'from parent'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -296,11 +276,10 @@ exports[`style and class handling component class and parent class combine toget
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"child\\" block-attribute-0=\\"class\\">child</div>\`);
|
let block1 = createBlock(\`<div class=\\"child\\" block-attribute-0=\\"class\\">child</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -338,12 +317,11 @@ exports[`style and class handling empty class attribute is not added on widget r
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({class: undefined}, key + \`__1\`, node, this, null);
|
const b2 = comp1({class: undefined}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -354,11 +332,10 @@ exports[`style and class handling empty class attribute is not added on widget r
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<span block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -369,10 +346,9 @@ exports[`style and class handling error in subcomponent with class 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'a'}, key + \`__1\`, node, this, null);
|
return comp1({class: 'a'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -382,11 +358,10 @@ exports[`style and class handling error in subcomponent with class 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\"><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
let txt1 = ctx['this'].will.crash;
|
let txt1 = ctx['this'].will.crash;
|
||||||
return block1([attr1, txt1]);
|
return block1([attr1, txt1]);
|
||||||
@@ -398,10 +373,9 @@ exports[`style and class handling no class is set is child ignores it 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: 'hey'}, key + \`__1\`, node, this, null);
|
return comp1({class: 'hey'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -411,11 +385,10 @@ exports[`style and class handling no class is set is child ignores it 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child</div>\`);
|
let block1 = createBlock(\`<div>child</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -425,10 +398,9 @@ exports[`style and class handling no class is set is parent does not give it as
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -438,11 +410,10 @@ exports[`style and class handling no class is set is parent does not give it as
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"class\\">child</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].class;
|
let attr1 = ctx['props'].class;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -453,10 +424,9 @@ exports[`style and class handling style is properly added on widget root el 1`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"style\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"style\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_ParentWidget(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({style: 'font-weight: bold;'}, key + \`__1\`, node, this, null);
|
return comp1({style: 'font-weight: bold;'}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -466,11 +436,10 @@ exports[`style and class handling style is properly added on widget root el 2`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"style\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"style\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].style;
|
let attr1 = ctx['props'].style;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -481,12 +450,11 @@ exports[`style and class handling t-att-class is properly added/removed on widge
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({class: {b:ctx['state'].b}}, key + \`__1\`, node, this, null);
|
const b2 = comp1({class: {b:ctx['state'].b}}, key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -497,11 +465,10 @@ exports[`style and class handling t-att-class is properly added/removed on widge
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span class=\\"c\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<span class=\\"c\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = {d:ctx['state'].d,...ctx['props'].class};
|
let attr1 = {d:ctx['state'].d,...ctx['props'].class};
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -512,10 +479,9 @@ exports[`style and class handling t-att-class is properly added/removed on widge
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"class\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({class: {a:true,b:ctx['state'].b}}, key + \`__1\`, node, this, null);
|
return comp1({class: {a:true,b:ctx['state'].b}}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -525,11 +491,10 @@ exports[`style and class handling t-att-class is properly added/removed on widge
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span class=\\"c\\" block-attribute-0=\\"class\\"/>\`);
|
let block1 = createBlock(\`<span class=\\"c\\" block-attribute-0=\\"class\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = {d:ctx['state'].d,...ctx['props'].class};
|
let attr1 = {d:ctx['state'].d,...ctx['props'].class};
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,10 +5,9 @@ exports[`t-call dynamic t-call 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, zero } = helpers;
|
let { isBoundary, zero } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const call = app.callTemplate.bind(app);
|
const call = app.callTemplate.bind(app);
|
||||||
|
|
||||||
return function xml_template_999_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1;
|
ctx[isBoundary] = 1;
|
||||||
const b1 = text(\` owl \`);
|
const b1 = text(\` owl \`);
|
||||||
@@ -23,11 +22,10 @@ exports[`t-call dynamic t-call 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"foo\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>foo</div>\`);
|
let block1 = createBlock(\`<div>foo</div>\`);
|
||||||
|
|
||||||
return function foo(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -37,9 +35,8 @@ exports[`t-call dynamic t-call 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"bar\\"
|
|
||||||
|
|
||||||
return function bar(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`bar\`);
|
return text(\`bar\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -49,10 +46,9 @@ exports[`t-call dynamic t-call with same sub component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const call = app.callTemplate.bind(app);
|
const call = app.callTemplate.bind(app);
|
||||||
|
|
||||||
return function xml_template_1000_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['current'].template);
|
const b2 = text(ctx['current'].template);
|
||||||
const template1 = (ctx['current'].template);
|
const template1 = (ctx['current'].template);
|
||||||
const b3 = call(this, template1, ctx, node, key + \`__1\`);
|
const b3 = call(this, template1, ctx, node, key + \`__1\`);
|
||||||
@@ -65,10 +61,9 @@ exports[`t-call dynamic t-call with same sub component 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"A\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function A(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -78,9 +73,8 @@ exports[`t-call dynamic t-call with same sub component 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -90,10 +84,9 @@ exports[`t-call dynamic t-call with same sub component 4`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"B\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function B(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -103,11 +96,10 @@ exports[`t-call dynamic t-call: key is propagated 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const call = app.callTemplate.bind(app);
|
const call = app.callTemplate.bind(app);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
const template1 = (ctx['sub']);
|
const template1 = (ctx['sub']);
|
||||||
const b3 = call(this, template1, ctx, node, key + \`__2\`);
|
const b3 = call(this, template1, ctx, node, key + \`__2\`);
|
||||||
@@ -120,11 +112,10 @@ exports[`t-call dynamic t-call: key is propagated 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0=\\"id\\"/>\`);
|
let block1 = createBlock(\`<div block-attribute-0=\\"id\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['id'];
|
let attr1 = ctx['id'];
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -135,10 +126,9 @@ exports[`t-call dynamic t-call: key is propagated 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -148,13 +138,12 @@ exports[`t-call handlers are properly bound through a dynamic t-call 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const call = app.callTemplate.bind(app);
|
const call = app.callTemplate.bind(app);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const template1 = ('xml_template_999');
|
const template1 = ('__template__999');
|
||||||
const b2 = call(this, template1, ctx, node, key + \`__1\`);
|
const b2 = call(this, template1, ctx, node, key + \`__1\`);
|
||||||
let txt1 = ctx['counter'];
|
let txt1 = ctx['counter'];
|
||||||
return block1([txt1], [b2]);
|
return block1([txt1], [b2]);
|
||||||
@@ -166,11 +155,10 @@ exports[`t-call handlers are properly bound through a dynamic t-call 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
return function xml_template_999(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const v1 = ctx['this'];
|
const v1 = ctx['this'];
|
||||||
let hdlr1 = [()=>v1.update(), ctx];
|
let hdlr1 = [()=>v1.update(), ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
@@ -182,12 +170,11 @@ exports[`t-call handlers are properly bound through a t-call 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
const callTemplate_1 = app.getTemplate(\`__template__999\`);
|
||||||
const callTemplate_1 = app.getTemplate(\`xml_template_999\`);
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
let txt1 = ctx['counter'];
|
let txt1 = ctx['counter'];
|
||||||
return block1([txt1], [b2]);
|
return block1([txt1], [b2]);
|
||||||
@@ -199,11 +186,10 @@ exports[`t-call handlers are properly bound through a t-call 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
return function xml_template_999(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['update'], ctx];
|
let hdlr1 = [ctx['update'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -214,12 +200,11 @@ exports[`t-call handlers with arguments are properly bound through a t-call 1`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
const callTemplate_1 = app.getTemplate(\`__template__999\`);
|
||||||
const callTemplate_1 = app.getTemplate(\`xml_template_999\`);
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -230,11 +215,10 @@ exports[`t-call handlers with arguments are properly bound through a t-call 2`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
let block1 = createBlock(\`<p block-handler-0=\\"click\\">lucas</p>\`);
|
||||||
|
|
||||||
return function xml_template_999(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const v1 = ctx['this'];
|
const v1 = ctx['this'];
|
||||||
const v2 = ctx['a'];
|
const v2 = ctx['a'];
|
||||||
let hdlr1 = [()=>v1.update(v2), ctx];
|
let hdlr1 = [()=>v1.update(v2), ctx];
|
||||||
@@ -247,12 +231,11 @@ exports[`t-call parent is set within t-call 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
const callTemplate_1 = app.getTemplate(\`__template__999\`);
|
||||||
const callTemplate_1 = app.getTemplate(\`xml_template_999\`);
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -263,10 +246,9 @@ exports[`t-call parent is set within t-call 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_999(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -276,11 +258,10 @@ exports[`t-call parent is set within t-call 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>lucas</span>\`);
|
let block1 = createBlock(\`<span>lucas</span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -290,10 +271,9 @@ exports[`t-call parent is set within t-call with no parentNode 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
const callTemplate_1 = app.getTemplate(\`__template__999\`);
|
||||||
const callTemplate_1 = app.getTemplate(\`xml_template_999\`);
|
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -303,10 +283,9 @@ exports[`t-call parent is set within t-call with no parentNode 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_999(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -316,11 +295,10 @@ exports[`t-call parent is set within t-call with no parentNode 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>lucas</span>\`);
|
let block1 = createBlock(\`<span>lucas</span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -331,12 +309,11 @@ exports[`t-call recursive t-call binding this -- static t-call 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`recursive\`);
|
const callTemplate_1 = app.getTemplate(\`recursive\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -353,12 +330,11 @@ exports[`t-call recursive t-call binding this -- static t-call 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"recursive\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`recursive\`);
|
const callTemplate_1 = app.getTemplate(\`recursive\`);
|
||||||
|
|
||||||
let block3 = createBlock(\`<div block-handler-0=\\"click.stop\\"><block-text-1/></div>\`);
|
let block3 = createBlock(\`<div block-handler-0=\\"click.stop\\"><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function recursive(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let b2;
|
let b2;
|
||||||
@@ -382,13 +358,12 @@ exports[`t-call sub components in two t-calls 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`sub\`);
|
const callTemplate_1 = app.getTemplate(\`sub\`);
|
||||||
const callTemplate_2 = app.getTemplate(\`sub\`);
|
const callTemplate_2 = app.getTemplate(\`sub\`);
|
||||||
|
|
||||||
let block3 = createBlock(\`<div><block-child-0/></div>\`);
|
let block3 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
if (ctx['state'].val===1) {
|
if (ctx['state'].val===1) {
|
||||||
b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
@@ -405,10 +380,9 @@ exports[`t-call sub components in two t-calls 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"sub\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
return function sub(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -418,11 +392,10 @@ exports[`t-call sub components in two t-calls 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -434,12 +407,11 @@ exports[`t-call t-call in t-foreach and children component 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1001\\"
|
const callTemplate_1 = app.getTemplate(\`__template__999\`);
|
||||||
const callTemplate_1 = app.getTemplate(\`xml_template_999\`);
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(['a','b','c']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(['a','b','c']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -461,10 +433,9 @@ exports[`t-call t-call in t-foreach and children component 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
return function xml_template_999(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({val: ctx['val']}, key + \`__1\`, node, this, null);
|
return comp1({val: ctx['val']}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -474,11 +445,10 @@ exports[`t-call t-call in t-foreach and children component 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -489,10 +459,9 @@ exports[`t-call t-call with t-call-context and subcomponent 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
||||||
|
|
||||||
return function xml_template_1000_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ctx1 = ctx['subctx'];
|
let ctx1 = ctx['subctx'];
|
||||||
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
@@ -503,11 +472,10 @@ exports[`t-call t-call with t-call-context and subcomponent 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"someTemplate\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"name\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"name\\"]);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"name\\"]);
|
const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"name\\"]);
|
||||||
|
|
||||||
return function someTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({name: ctx['aab']}, key + \`__1\`, node, this, null);
|
const b2 = comp1({name: ctx['aab']}, key + \`__1\`, node, this, null);
|
||||||
const b3 = comp2({name: ctx['lpe']}, key + \`__2\`, node, this, null);
|
const b3 = comp2({name: ctx['lpe']}, key + \`__2\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -519,9 +487,8 @@ exports[`t-call t-call with t-call-context and subcomponent 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\`child\`);
|
const b2 = text(\`child\`);
|
||||||
const b3 = text(ctx['props'].name);
|
const b3 = text(ctx['props'].name);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -533,10 +500,9 @@ exports[`t-call t-call with t-call-context and subcomponent, in dev mode 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
||||||
|
|
||||||
return function xml_template_1000_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ctx1 = ctx['subctx'];
|
let ctx1 = ctx['subctx'];
|
||||||
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
@@ -547,11 +513,10 @@ exports[`t-call t-call with t-call-context and subcomponent, in dev mode 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"someTemplate\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"name\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"name\\"]);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"name\\"]);
|
const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"name\\"]);
|
||||||
|
|
||||||
return function someTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const props1 = {name: ctx['aab']};
|
const props1 = {name: ctx['aab']};
|
||||||
helpers.validateProps(\`Child\`, props1, this);
|
helpers.validateProps(\`Child\`, props1, this);
|
||||||
const b2 = comp1(props1, key + \`__1\`, node, this, null);
|
const b2 = comp1(props1, key + \`__1\`, node, this, null);
|
||||||
@@ -567,9 +532,8 @@ exports[`t-call t-call with t-call-context and subcomponent, in dev mode 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\`child\`);
|
const b2 = text(\`child\`);
|
||||||
const b3 = text(ctx['props'].name);
|
const b3 = text(ctx['props'].name);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -581,10 +545,9 @@ exports[`t-call t-call with t-call-context, simple use 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
||||||
|
|
||||||
return function xml_template_999_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ctx1 = ctx['subctx'];
|
let ctx1 = ctx['subctx'];
|
||||||
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
@@ -595,9 +558,8 @@ exports[`t-call t-call with t-call-context, simple use 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"someTemplate\\"
|
|
||||||
|
|
||||||
return function someTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(ctx['aab']);
|
const b2 = text(ctx['aab']);
|
||||||
const b3 = text(ctx['lpe']);
|
const b3 = text(ctx['lpe']);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -609,10 +571,9 @@ exports[`t-call t-call-context: ComponentNode is not looked up in the context 1`
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
||||||
|
|
||||||
return function xml_template_1000_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ctx1 = {method:function(){}};
|
let ctx1 = {method:function(){}};
|
||||||
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
@@ -624,7 +585,6 @@ exports[`t-call t-call-context: ComponentNode is not looked up in the context 2`
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { capture, isBoundary, withDefault, setContextValue, markRaw } = helpers;
|
let { capture, isBoundary, withDefault, setContextValue, markRaw } = helpers;
|
||||||
// Template name: \\"someTemplate\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
let block2 = createBlock(\`<div block-ref=\\"0\\">outside slot</div>\`);
|
let block2 = createBlock(\`<div block-ref=\\"0\\">outside slot</div>\`);
|
||||||
@@ -642,7 +602,7 @@ exports[`t-call t-call-context: ComponentNode is not looked up in the context 2`
|
|||||||
return multi([b4, b5]);
|
return multi([b4, b5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function someTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`myRef\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`myRef\`), el);
|
||||||
const b2 = block2([ref1]);
|
const b2 = block2([ref1]);
|
||||||
const ctx1 = capture(ctx);
|
const ctx1 = capture(ctx);
|
||||||
@@ -657,9 +617,8 @@ exports[`t-call t-call-context: ComponentNode is not looked up in the context 3`
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot } = helpers;
|
let { callSlot } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return callSlot(ctx, node, key, 'default', false, {});
|
return callSlot(ctx, node, key, 'default', false, {});
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -669,10 +628,9 @@ exports[`t-call t-call-context: slots don't make component available again when
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`template\`);
|
const callTemplate_1 = app.getTemplate(\`template\`);
|
||||||
|
|
||||||
return function xml_template_1000_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ctx1 = {};
|
let ctx1 = {};
|
||||||
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
@@ -684,7 +642,6 @@ exports[`t-call t-call-context: slots don't make component available again when
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue, capture, markRaw } = helpers;
|
let { isBoundary, withDefault, setContextValue, capture, markRaw } = helpers;
|
||||||
// Template name: \\"template\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
function slot1(ctx, node, key = \\"\\") {
|
function slot1(ctx, node, key = \\"\\") {
|
||||||
@@ -708,9 +665,8 @@ exports[`t-call t-call-context: slots don't make component available again when
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot } = helpers;
|
let { callSlot } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return callSlot(ctx, node, key, 'default', false, {});
|
return callSlot(ctx, node, key, 'default', false, {});
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -720,10 +676,9 @@ exports[`t-call t-call-context: this is not available inside t-call-context 1`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`someTemplate\`);
|
||||||
|
|
||||||
return function xml_template_999_Root(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ctx1 = {};
|
let ctx1 = {};
|
||||||
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
return callTemplate_1.call(this, ctx1, node, key + \`__1\`);
|
||||||
}
|
}
|
||||||
@@ -734,9 +689,8 @@ exports[`t-call t-call-context: this is not available inside t-call-context 2`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"someTemplate\\"
|
|
||||||
|
|
||||||
return function someTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(ctx['this']);
|
return text(ctx['this']);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ exports[`t-call-block simple t-call-block with static text 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = ctx['myBlock']();
|
const b2 = ctx['myBlock']();
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ exports[`t-component can switch between dynamic components without the need for
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(null, false, false, false, []);
|
const comp1 = app.createComponent(null, false, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1001_App(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const Comp1 = ctx['constructor'].components[ctx['state'].child];
|
const Comp1 = ctx['constructor'].components[ctx['state'].child];
|
||||||
const b2 = toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1));
|
const b2 = toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1));
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
@@ -21,11 +20,10 @@ exports[`t-component can switch between dynamic components without the need for
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child a</span>\`);
|
let block1 = createBlock(\`<span>child a</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_A(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -35,11 +33,10 @@ exports[`t-component can switch between dynamic components without the need for
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child b</span>\`);
|
let block1 = createBlock(\`<span>child b</span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_B(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -49,10 +46,9 @@ exports[`t-component can use dynamic components (the class) if given (with diffe
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(null, false, false, false, []);
|
const comp1 = app.createComponent(null, false, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const tKey_1 = ctx['state'].child;
|
const tKey_1 = ctx['state'].child;
|
||||||
const Comp1 = ctx['myComponent'];
|
const Comp1 = ctx['myComponent'];
|
||||||
return toggler(tKey_1, toggler(Comp1, comp1({}, (Comp1).name + tKey_1 + key + \`__1\`, node, this, Comp1)));
|
return toggler(tKey_1, toggler(Comp1, comp1({}, (Comp1).name + tKey_1 + key + \`__1\`, node, this, Comp1)));
|
||||||
@@ -64,11 +60,10 @@ exports[`t-component can use dynamic components (the class) if given (with diffe
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child a</span>\`);
|
let block1 = createBlock(\`<span>child a</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_A(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -78,11 +73,10 @@ exports[`t-component can use dynamic components (the class) if given (with diffe
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child b</div>\`);
|
let block1 = createBlock(\`<div>child b</div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_B(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -92,10 +86,9 @@ exports[`t-component can use dynamic components (the class) if given 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(null, false, false, false, []);
|
const comp1 = app.createComponent(null, false, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const tKey_1 = ctx['state'].child;
|
const tKey_1 = ctx['state'].child;
|
||||||
const Comp1 = ctx['myComponent'];
|
const Comp1 = ctx['myComponent'];
|
||||||
return toggler(tKey_1, toggler(Comp1, comp1({}, (Comp1).name + tKey_1 + key + \`__1\`, node, this, Comp1)));
|
return toggler(tKey_1, toggler(Comp1, comp1({}, (Comp1).name + tKey_1 + key + \`__1\`, node, this, Comp1)));
|
||||||
@@ -107,11 +100,10 @@ exports[`t-component can use dynamic components (the class) if given 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child a</span>\`);
|
let block1 = createBlock(\`<span>child a</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_A(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -121,11 +113,10 @@ exports[`t-component can use dynamic components (the class) if given 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>child b</span>\`);
|
let block1 = createBlock(\`<span>child b</span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_B(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -135,12 +126,11 @@ exports[`t-component modifying a sub widget 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(null, false, false, false, []);
|
const comp1 = app.createComponent(null, false, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_ParentWidget(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const Comp1 = ctx['Counter'];
|
const Comp1 = ctx['Counter'];
|
||||||
const b2 = toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1));
|
const b2 = toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1));
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
@@ -152,11 +142,10 @@ exports[`t-component modifying a sub widget 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><button block-handler-1=\\"click\\">Inc</button></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><button block-handler-1=\\"click\\">Inc</button></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Counter(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].counter;
|
let txt1 = ctx['state'].counter;
|
||||||
const v1 = ctx['state'];
|
const v1 = ctx['state'];
|
||||||
let hdlr1 = [()=>v1.counter++, ctx];
|
let hdlr1 = [()=>v1.counter++, ctx];
|
||||||
@@ -169,10 +158,9 @@ exports[`t-component switching dynamic component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(null, false, false, false, []);
|
const comp1 = app.createComponent(null, false, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const Comp1 = ctx['Child'];
|
const Comp1 = ctx['Child'];
|
||||||
return toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1));
|
return toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1));
|
||||||
}
|
}
|
||||||
@@ -183,11 +171,10 @@ exports[`t-component switching dynamic component 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child a</div>\`);
|
let block1 = createBlock(\`<div>child a</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_ChildA(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -197,9 +184,8 @@ exports[`t-component switching dynamic component 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
return function xml_template_1000_ChildB(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child b\`);
|
return text(\`child b\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -209,10 +195,9 @@ exports[`t-component t-component works in simple case 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(null, false, false, false, []);
|
const comp1 = app.createComponent(null, false, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const Comp1 = ctx['Child'];
|
const Comp1 = ctx['Child'];
|
||||||
return toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1));
|
return toggler(Comp1, comp1({}, (Comp1).name + key + \`__1\`, node, this, Comp1));
|
||||||
}
|
}
|
||||||
@@ -223,11 +208,10 @@ exports[`t-component t-component works in simple case 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div>child</div>\`);
|
let block1 = createBlock(\`<div>child</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -0,0 +1,493 @@
|
|||||||
|
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||||
|
|
||||||
|
exports[`list of components components in a node in a t-for 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"item\\"]);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><ul><block-child-0/></ul></div>\`);
|
||||||
|
let block3 = createBlock(\`<li><block-child-0/></li>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of ctx['items']) {
|
||||||
|
const key1 = 'li_'+ctx['item'];
|
||||||
|
const b4 = comp1({item: ctx['item']}, key + \`__1__\${key1}\`, node, this, null);
|
||||||
|
c_block2[i1] = withKey(block3([], [b4]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components components in a node in a t-for 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let txt1 = ctx['props'].item;
|
||||||
|
return block1([txt1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components crash on duplicate key in dev mode 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { OwlError, withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const keys1 = new Set();
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of [1,2]) {
|
||||||
|
const key1 = 'child';
|
||||||
|
if (keys1.has(String(key1))) { throw new OwlError(\`Got duplicate key in t-for: \${key1}\`)}
|
||||||
|
keys1.add(String(key1));
|
||||||
|
const props1 = {};
|
||||||
|
helpers.validateProps(\`Child\`, props1, this);
|
||||||
|
c_block1[i1] = withKey(comp1(props1, key + \`__1__\${key1}\`, node, this, null), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components crash on duplicate key in dev mode 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
return text(\`\`);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components crash when using object as keys that serialize to the same string 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { OwlError, withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const keys1 = new Set();
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['item'] of [{},{}]) {
|
||||||
|
const key1 = ctx['item'];
|
||||||
|
if (keys1.has(String(key1))) { throw new OwlError(\`Got duplicate key in t-for: \${key1}\`)}
|
||||||
|
keys1.add(String(key1));
|
||||||
|
const props1 = {};
|
||||||
|
helpers.validateProps(\`Child\`, props1, this);
|
||||||
|
c_block1[i1] = withKey(comp1(props1, key + \`__1__\${key1}\`, node, this, null), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components crash when using object as keys that serialize to the same string 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
return text(\`\`);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components list of sub components inside other nodes 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`SubComponent\`, true, false, false, []);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
let block3 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['blip'] of ctx['state'].blips) {
|
||||||
|
const key1 = ctx['blip'].id;
|
||||||
|
const b4 = comp1({}, key + \`__1__\${key1}\`, node, this, null);
|
||||||
|
c_block2[i1] = withKey(block3([], [b4]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components list of sub components inside other nodes 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<span>asdf</span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
return block1();
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components order is correct when slots are not of same type 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { capture, markRaw } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
|
let block2 = createBlock(\`<div>A</div>\`);
|
||||||
|
|
||||||
|
function slot1(ctx, node, key = \\"\\") {
|
||||||
|
let b2;
|
||||||
|
if (!ctx['state'].active) {
|
||||||
|
b2 = block2();
|
||||||
|
}
|
||||||
|
return multi([b2]);
|
||||||
|
}
|
||||||
|
|
||||||
|
function slot2(ctx, node, key = \\"\\") {
|
||||||
|
return text(\`B\`);
|
||||||
|
}
|
||||||
|
|
||||||
|
function slot3(ctx, node, key = \\"\\") {
|
||||||
|
return text(\`C\`);
|
||||||
|
}
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
const ctx1 = capture(ctx);
|
||||||
|
return comp1({slots: markRaw({'a': {__render: slot1.bind(this), __ctx: ctx1, active: !ctx['state'].active}, 'b': {__render: slot2.bind(this), __ctx: ctx1, active: true}, 'c': {__render: slot3.bind(this), __ctx: ctx1, active: ctx['state'].active}})}, key + \`__1\`, node, this, null);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components order is correct when slots are not of same type 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { callSlot, withKey } = helpers;
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['slotName'] of ctx['slotNames']) {
|
||||||
|
const key1 = ctx['slotName'];
|
||||||
|
const slot1 = (ctx['slotName']);
|
||||||
|
c_block1[i1] = withKey(toggler(slot1, callSlot(ctx, node, key1 + \`__1__\${key1}\`, slot1, true, {})), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components reconciliation alg works for t-for in t-for 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"blip\\"]);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['section'] of ctx['state'].s) {
|
||||||
|
const key1 = ctx['section'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block3 = [];
|
||||||
|
let i2 = 0;
|
||||||
|
for (ctx['blip'] of ctx['section'].blips) {
|
||||||
|
const key2 = ctx['blip'];
|
||||||
|
c_block3[i2] = withKey(comp1({blip: ctx['blip']}, key + \`__1__\${key1}__\${key2}\`, node, this, null), key2);
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
c_block2[i1] = withKey(list(c_block3), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components reconciliation alg works for t-for in t-for 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let txt1 = ctx['props'].blip;
|
||||||
|
return block1([txt1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components reconciliation alg works for t-for in t-for, 2 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"row\\",\\"col\\"]);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
let block3 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
let block5 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['row'] of ctx['state'].rows) {
|
||||||
|
const key1 = ctx['row'];
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block4 = [];
|
||||||
|
let i2 = 0;
|
||||||
|
for (ctx['col'] of ctx['state'].cols) {
|
||||||
|
const key2 = ctx['col'];
|
||||||
|
const b6 = comp1({row: ctx['row'],col: ctx['col']}, key + \`__1__\${key1}__\${key2}\`, node, this, null);
|
||||||
|
c_block4[i2] = withKey(block5([], [b6]), key2);
|
||||||
|
i2++;
|
||||||
|
}
|
||||||
|
ctx = ctx.__proto__;
|
||||||
|
const b4 = list(c_block4);
|
||||||
|
c_block2[i1] = withKey(block3([], [b4]), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components reconciliation alg works for t-for in t-for, 2 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let txt1 = ctx['props'].row+'_'+ctx['props'].col;
|
||||||
|
return block1([txt1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components simple list 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block1 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['elem'] of ctx['state'].elems) {
|
||||||
|
const key1 = ctx['elem'].id;
|
||||||
|
c_block1[i1] = withKey(comp1({value: ctx['elem'].value}, key + \`__1__\${key1}\`, node, this, null), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
return list(c_block1);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components simple list 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let txt1 = ctx['props'].value;
|
||||||
|
return block1([txt1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components sub components rendered in a loop 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['number'] of ctx['state'].numbers) {
|
||||||
|
const key1 = ctx['number'];
|
||||||
|
c_block2[i1] = withKey(comp1({n: ctx['number']}, key + \`__1__\${key1}\`, node, this, null), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components sub components rendered in a loop 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let txt1 = ctx['props'].n;
|
||||||
|
return block1([txt1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components sub components with some state rendered in a loop 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['number'] of ctx['state'].numbers) {
|
||||||
|
const key1 = ctx['number'];
|
||||||
|
c_block2[i1] = withKey(comp1({}, key + \`__1__\${key1}\`, node, this, null), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components sub components with some state rendered in a loop 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let txt1 = ctx['state'].n;
|
||||||
|
return block1([txt1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components switch component position 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['c'] of ctx['clist']) {
|
||||||
|
const key1 = ctx['c'];
|
||||||
|
c_block2[i1] = withKey(comp1({key: ctx['c']}, key + \`__1__\${key1}\`, node, this, null), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components switch component position 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let txt1 = ctx['props'].key;
|
||||||
|
return block1([txt1]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components t-for with t-component, and update 1`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
let { withKey } = helpers;
|
||||||
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
ctx = Object.create(ctx);
|
||||||
|
const c_block2 = [];
|
||||||
|
let i1 = 0;
|
||||||
|
for (ctx['n'] of [0,1]) {
|
||||||
|
const key1 = ctx['n'];
|
||||||
|
c_block2[i1] = withKey(comp1({val: ctx['n']}, key + \`__1__\${key1}\`, node, this, null), key1);
|
||||||
|
i1++;
|
||||||
|
}
|
||||||
|
const b2 = list(c_block2);
|
||||||
|
return block1([], [b2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
|
|
||||||
|
exports[`list of components t-for with t-component, and update 2`] = `
|
||||||
|
"function anonymous(app, bdom, helpers
|
||||||
|
) {
|
||||||
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
|
|
||||||
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
|
return function template(ctx, node, key = \\"\\") {
|
||||||
|
let txt1 = ctx['state'].val;
|
||||||
|
let txt2 = ctx['props'].val;
|
||||||
|
return block1([txt1, txt2]);
|
||||||
|
}
|
||||||
|
}"
|
||||||
|
`;
|
||||||
@@ -5,13 +5,12 @@ exports[`list of components components in a node in a t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"item\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"item\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><ul><block-child-0/></ul></div>\`);
|
let block1 = createBlock(\`<div><ul><block-child-0/></ul></div>\`);
|
||||||
let block3 = createBlock(\`<li><block-child-0/></li>\`);
|
let block3 = createBlock(\`<li><block-child-0/></li>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['items']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['items']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -30,11 +29,10 @@ exports[`list of components components in a node in a t-foreach 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].item;
|
let txt1 = ctx['props'].item;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -46,10 +44,9 @@ exports[`list of components crash on duplicate key in dev mode 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, OwlError, withKey } = helpers;
|
let { prepareList, OwlError, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList([1,2]);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList([1,2]);;
|
||||||
const keys1 = new Set();
|
const keys1 = new Set();
|
||||||
@@ -71,9 +68,8 @@ exports[`list of components crash on duplicate key in dev mode 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`\`);
|
return text(\`\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -84,10 +80,9 @@ exports[`list of components crash when using object as keys that serialize to th
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, OwlError, withKey } = helpers;
|
let { prepareList, OwlError, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList([{},{}]);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList([{},{}]);;
|
||||||
const keys1 = new Set();
|
const keys1 = new Set();
|
||||||
@@ -109,9 +104,8 @@ exports[`list of components crash when using object as keys that serialize to th
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`\`);
|
return text(\`\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -122,13 +116,12 @@ exports[`list of components list of sub components inside other nodes 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`SubComponent\`, true, false, false, []);
|
const comp1 = app.createComponent(\`SubComponent\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-child-0/></div>\`);
|
let block3 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].blips);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].blips);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -147,11 +140,10 @@ exports[`list of components list of sub components inside other nodes 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span>asdf</span>\`);
|
let block1 = createBlock(\`<span>asdf</span>\`);
|
||||||
|
|
||||||
return function xml_template_999_SubComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -162,7 +154,6 @@ exports[`list of components order is correct when slots are not of same type 1`]
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { capture, markRaw } = helpers;
|
let { capture, markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
let block2 = createBlock(\`<div>A</div>\`);
|
let block2 = createBlock(\`<div>A</div>\`);
|
||||||
@@ -183,7 +174,7 @@ exports[`list of components order is correct when slots are not of same type 1`]
|
|||||||
return text(\`C\`);
|
return text(\`C\`);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const ctx1 = capture(ctx);
|
const ctx1 = capture(ctx);
|
||||||
return comp1({slots: markRaw({'a': {__render: slot1.bind(this), __ctx: ctx1, active: !ctx['state'].active}, 'b': {__render: slot2.bind(this), __ctx: ctx1, active: true}, 'c': {__render: slot3.bind(this), __ctx: ctx1, active: ctx['state'].active}})}, key + \`__1\`, node, this, null);
|
return comp1({slots: markRaw({'a': {__render: slot1.bind(this), __ctx: ctx1, active: !ctx['state'].active}, 'b': {__render: slot2.bind(this), __ctx: ctx1, active: true}, 'c': {__render: slot3.bind(this), __ctx: ctx1, active: ctx['state'].active}})}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
@@ -195,9 +186,8 @@ exports[`list of components order is correct when slots are not of same type 2`]
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, callSlot, withKey } = helpers;
|
let { prepareList, callSlot, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['slotNames']);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['slotNames']);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -216,12 +206,11 @@ exports[`list of components reconciliation alg works for t-foreach in t-foreach
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"blip\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"blip\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].s);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].s);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -249,11 +238,10 @@ exports[`list of components reconciliation alg works for t-foreach in t-foreach
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].blip;
|
let txt1 = ctx['props'].blip;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -265,14 +253,13 @@ exports[`list of components reconciliation alg works for t-foreach in t-foreach,
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"row\\",\\"col\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"row\\",\\"col\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<p><block-child-0/></p>\`);
|
let block3 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
let block5 = createBlock(\`<p><block-child-0/></p>\`);
|
let block5 = createBlock(\`<p><block-child-0/></p>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].rows);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].rows);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -300,11 +287,10 @@ exports[`list of components reconciliation alg works for t-foreach in t-foreach,
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].row+'_'+ctx['props'].col;
|
let txt1 = ctx['props'].row+'_'+ctx['props'].col;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -316,10 +302,9 @@ exports[`list of components simple list 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['state'].elems);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['state'].elems);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -336,11 +321,10 @@ exports[`list of components simple list 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -352,12 +336,11 @@ exports[`list of components sub components rendered in a loop 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"n\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].numbers);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].numbers);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -375,11 +358,10 @@ exports[`list of components sub components rendered in a loop 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].n;
|
let txt1 = ctx['props'].n;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -391,12 +373,11 @@ exports[`list of components sub components with some state rendered in a loop 1`
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].numbers);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].numbers);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -414,11 +395,10 @@ exports[`list of components sub components with some state rendered in a loop 2`
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].n;
|
let txt1 = ctx['state'].n;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -430,12 +410,11 @@ exports[`list of components switch component position 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['clist']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['clist']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -453,11 +432,10 @@ exports[`list of components switch component position 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].key;
|
let txt1 = ctx['props'].key;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -469,12 +447,11 @@ exports[`list of components t-foreach with t-component, and update 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(Array(2));;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(Array(2));;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -493,11 +470,10 @@ exports[`list of components t-foreach with t-component, and update 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/><block-text-1/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['state'].val;
|
let txt1 = ctx['state'].val;
|
||||||
let txt2 = ctx['props'].val;
|
let txt2 = ctx['props'].val;
|
||||||
return block1([txt1, txt2]);
|
return block1([txt1, txt2]);
|
||||||
|
|||||||
@@ -5,12 +5,11 @@ exports[`t-key t-foreach with t-key switch component position 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['clist']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['clist']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -29,11 +28,10 @@ exports[`t-key t-foreach with t-key switch component position 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].key;
|
let txt1 = ctx['props'].key;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -44,10 +42,9 @@ exports[`t-key t-key on Component 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const tKey_1 = ctx['key'];
|
const tKey_1 = ctx['key'];
|
||||||
return toggler(tKey_1, comp1({key: ctx['key']}, tKey_1 + key + \`__1\`, node, this, null));
|
return toggler(tKey_1, comp1({key: ctx['key']}, tKey_1 + key + \`__1\`, node, this, null));
|
||||||
}
|
}
|
||||||
@@ -58,11 +55,10 @@ exports[`t-key t-key on Component 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].key;
|
let txt1 = ctx['props'].key;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -73,12 +69,11 @@ exports[`t-key t-key on Component as a function 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const tKey_1 = ctx['key'];
|
const tKey_1 = ctx['key'];
|
||||||
const b2 = toggler(tKey_1, comp1({key: ctx['key']}, tKey_1 + key + \`__1\`, node, this, null));
|
const b2 = toggler(tKey_1, comp1({key: ctx['key']}, tKey_1 + key + \`__1\`, node, this, null));
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
@@ -90,11 +85,10 @@ exports[`t-key t-key on Component as a function 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].key;
|
let txt1 = ctx['props'].key;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -105,13 +99,12 @@ exports[`t-key t-key on multiple Components 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/><block-child-1/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/><block-child-1/></span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const tKey_1 = ctx['key1'];
|
const tKey_1 = ctx['key1'];
|
||||||
const b2 = toggler(tKey_1, comp1({key: ctx['key1']}, tKey_1 + key + \`__1\`, node, this, null));
|
const b2 = toggler(tKey_1, comp1({key: ctx['key1']}, tKey_1 + key + \`__1\`, node, this, null));
|
||||||
const tKey_2 = ctx['key2'];
|
const tKey_2 = ctx['key2'];
|
||||||
@@ -125,11 +118,10 @@ exports[`t-key t-key on multiple Components 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].key;
|
let txt1 = ctx['props'].key;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -141,13 +133,12 @@ exports[`t-key t-key on multiple Components with t-call 1 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`calledTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`calledTemplate\`);
|
||||||
const callTemplate_2 = app.getTemplate(\`calledTemplate\`);
|
const callTemplate_2 = app.getTemplate(\`calledTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/><block-child-1/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/><block-child-1/></span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -168,10 +159,9 @@ exports[`t-key t-key on multiple Components with t-call 1 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"calledTemplate\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
|
|
||||||
return function calledTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const tKey_1 = ctx['key'];
|
const tKey_1 = ctx['key'];
|
||||||
return toggler(tKey_1, comp1({key: ctx['key']}, tKey_1 + key + \`__1\`, node, this, null));
|
return toggler(tKey_1, comp1({key: ctx['key']}, tKey_1 + key + \`__1\`, node, this, null));
|
||||||
}
|
}
|
||||||
@@ -182,11 +172,10 @@ exports[`t-key t-key on multiple Components with t-call 1 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].key;
|
let txt1 = ctx['props'].key;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -197,12 +186,11 @@ exports[`t-key t-key on multiple Components with t-call 2 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const callTemplate_1 = app.getTemplate(\`calledTemplate\`);
|
const callTemplate_1 = app.getTemplate(\`calledTemplate\`);
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
let block1 = createBlock(\`<span><block-child-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
const b2 = callTemplate_1.call(this, ctx, node, key + \`__1\`);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -213,11 +201,10 @@ exports[`t-key t-key on multiple Components with t-call 2 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"calledTemplate\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
const comp2 = app.createComponent(\`Child\`, true, false, false, [\\"key\\"]);
|
||||||
|
|
||||||
return function calledTemplate(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const tKey_1 = ctx['key1'];
|
const tKey_1 = ctx['key1'];
|
||||||
const b2 = toggler(tKey_1, comp1({key: ctx['key1']}, tKey_1 + key + \`__1\`, node, this, null));
|
const b2 = toggler(tKey_1, comp1({key: ctx['key1']}, tKey_1 + key + \`__1\`, node, this, null));
|
||||||
const tKey_2 = ctx['key2'];
|
const tKey_2 = ctx['key2'];
|
||||||
@@ -231,11 +218,10 @@ exports[`t-key t-key on multiple Components with t-call 2 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].key;
|
let txt1 = ctx['props'].key;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,11 +5,10 @@ exports[`t-model directive .lazy modifier 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"change\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"change\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -25,11 +24,10 @@ exports[`t-model directive .number modifier 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'number';
|
const expr1 = 'number';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -45,11 +43,10 @@ exports[`t-model directive .trim modifier 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -65,11 +62,10 @@ exports[`t-model directive basic use, on an input 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -85,11 +81,10 @@ exports[`t-model directive basic use, on an input with bracket expression 1`] =
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -105,11 +100,10 @@ exports[`t-model directive basic use, on another key in component 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['some'];
|
const bExpr1 = ctx['some'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -125,11 +119,10 @@ exports[`t-model directive can also define t-on directive on same event, part 1
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\" block-handler-2=\\"input\\"/></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\" block-handler-2=\\"input\\"/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -145,11 +138,10 @@ exports[`t-model directive can also define t-on directive on same event, part 2
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\" block-handler-2=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-3=\\"checked\\" block-handler-4=\\"click\\" block-handler-5=\\"click\\"/><input type=\\"radio\\" id=\\"three\\" value=\\"Three\\" block-property-6=\\"checked\\" block-handler-7=\\"click\\" block-handler-8=\\"click\\"/></div>\`);
|
let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\" block-handler-2=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-3=\\"checked\\" block-handler-4=\\"click\\" block-handler-5=\\"click\\"/><input type=\\"radio\\" id=\\"three\\" value=\\"Three\\" block-property-6=\\"checked\\" block-handler-7=\\"click\\" block-handler-8=\\"click\\"/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'choice';
|
const expr1 = 'choice';
|
||||||
let prop1 = bExpr1[expr1] === 'One';
|
let prop1 = bExpr1[expr1] === 'One';
|
||||||
@@ -175,11 +167,10 @@ exports[`t-model directive following a scope protecting directive (e.g. t-set) 1
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue, toNumber } = helpers;
|
let { isBoundary, withDefault, setContextValue, toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"admiral\\", 'Bruno');
|
setContextValue(ctx, \\"admiral\\", 'Bruno');
|
||||||
@@ -197,12 +188,11 @@ exports[`t-model directive in a t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, toNumber, withKey } = helpers;
|
let { prepareList, toNumber, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<input type=\\"checkbox\\" block-property-0=\\"checked\\" block-handler-1=\\"input\\"/>\`);
|
let block3 = createBlock(\`<input type=\\"checkbox\\" block-property-0=\\"checked\\" block-handler-1=\\"input\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -225,12 +215,11 @@ exports[`t-model directive in a t-foreach, part 2 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, toNumber, withKey } = helpers;
|
let { prepareList, toNumber, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
let block3 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -254,12 +243,11 @@ exports[`t-model directive in a t-foreach, part 3 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, toNumber, withKey } = helpers;
|
let { prepareList, toNumber, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
let block3 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['names']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['names']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -283,11 +271,10 @@ exports[`t-model directive on a select 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"\\">Please select one</option><option value=\\"red\\">Red</option><option value=\\"blue\\">Blue</option></select><span>Choice: <block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"\\">Please select one</option><option value=\\"red\\">Red</option><option value=\\"blue\\">Blue</option></select><span>Choice: <block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'color';
|
const expr1 = 'color';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -303,11 +290,10 @@ exports[`t-model directive on a select, initial state 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"\\">Please select one</option><option value=\\"red\\">Red</option><option value=\\"blue\\">Blue</option></select></div>\`);
|
let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"\\">Please select one</option><option value=\\"red\\">Red</option><option value=\\"blue\\">Blue</option></select></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'color';
|
const expr1 = 'color';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -322,11 +308,10 @@ exports[`t-model directive on a sub state key 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'].something;
|
const bExpr1 = ctx['state'].something;
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -342,11 +327,10 @@ exports[`t-model directive on an input type=radio 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/><span>Choice: <block-text-4/></span></div>\`);
|
let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/><span>Choice: <block-text-4/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'choice';
|
const expr1 = 'choice';
|
||||||
let prop1 = bExpr1[expr1] === 'One';
|
let prop1 = bExpr1[expr1] === 'One';
|
||||||
@@ -366,11 +350,10 @@ exports[`t-model directive on an input type=radio, with initial value 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/></div>\`);
|
let block1 = createBlock(\`<div><input type=\\"radio\\" id=\\"one\\" value=\\"One\\" block-property-0=\\"checked\\" block-handler-1=\\"click\\"/><input type=\\"radio\\" id=\\"two\\" value=\\"Two\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'choice';
|
const expr1 = 'choice';
|
||||||
let prop1 = bExpr1[expr1] === 'One';
|
let prop1 = bExpr1[expr1] === 'One';
|
||||||
@@ -389,11 +372,10 @@ exports[`t-model directive on an input, type=checkbox 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input type=\\"checkbox\\" block-property-0=\\"checked\\" block-handler-1=\\"input\\"/><span><block-child-0/><block-child-1/></span></div>\`);
|
let block1 = createBlock(\`<div><input type=\\"checkbox\\" block-property-0=\\"checked\\" block-handler-1=\\"input\\"/><span><block-child-0/><block-child-1/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'flag';
|
const expr1 = 'flag';
|
||||||
@@ -414,11 +396,10 @@ exports[`t-model directive on an textarea 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><textarea block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><textarea block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -434,11 +415,10 @@ exports[`t-model directive t-model is applied before t-on-input 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\" block-handler-2=\\"input\\"/></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\" block-handler-2=\\"input\\"/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -454,11 +434,10 @@ exports[`t-model directive t-model on an input with an undefined value 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
let block1 = createBlock(\`<input block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'text';
|
const expr1 = 'text';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -473,11 +452,10 @@ exports[`t-model directive t-model on select with static options 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"a\\"><block-text-2/></option><option value=\\"b\\"><block-text-3/></option><option value=\\"c\\"><block-text-4/></option></select></div>\`);
|
let block1 = createBlock(\`<div><select block-property-0=\\"value\\" block-handler-1=\\"change\\"><option value=\\"a\\"><block-text-2/></option><option value=\\"b\\"><block-text-3/></option><option value=\\"c\\"><block-text-4/></option></select></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'model';
|
const expr1 = 'model';
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
@@ -495,12 +473,11 @@ exports[`t-model directive t-model with dynamic number values on select options
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber, prepareList, withKey } = helpers;
|
let { toNumber, prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<select block-handler-0=\\"change\\"><block-child-0/></select>\`);
|
let block1 = createBlock(\`<select block-handler-0=\\"change\\"><block-child-0/></select>\`);
|
||||||
let block3 = createBlock(\`<option block-attribute-0=\\"value\\" block-attribute-1=\\"selected\\"><block-text-2/></option>\`);
|
let block3 = createBlock(\`<option block-attribute-0=\\"value\\" block-attribute-1=\\"selected\\"><block-text-2/></option>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'value';
|
const expr1 = 'value';
|
||||||
const bValue1 = bExpr1[expr1];
|
const bValue1 = bExpr1[expr1];
|
||||||
@@ -526,11 +503,10 @@ exports[`t-model directive t-model with dynamic values on select options -- 2 1`
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option block-attribute-4=\\"value\\" block-attribute-5=\\"selected\\"><block-text-6/></option></select></div>\`);
|
let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option block-attribute-4=\\"value\\" block-attribute-5=\\"selected\\"><block-text-6/></option></select></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'model';
|
const expr1 = 'model';
|
||||||
const bValue1 = bExpr1[expr1];
|
const bValue1 = bExpr1[expr1];
|
||||||
@@ -551,11 +527,10 @@ exports[`t-model directive t-model with dynamic values on select options -- 3 1`
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option value=\\"b\\" block-attribute-4=\\"selected\\"><block-text-5/></option></select></div>\`);
|
let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option value=\\"b\\" block-attribute-4=\\"selected\\"><block-text-5/></option></select></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'model';
|
const expr1 = 'model';
|
||||||
const bValue1 = bExpr1[expr1];
|
const bValue1 = bExpr1[expr1];
|
||||||
@@ -575,11 +550,10 @@ exports[`t-model directive t-model with dynamic values on select options 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option block-attribute-4=\\"value\\" block-attribute-5=\\"selected\\"><block-text-6/></option></select></div>\`);
|
let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><option block-attribute-1=\\"value\\" block-attribute-2=\\"selected\\"><block-text-3/></option><option block-attribute-4=\\"value\\" block-attribute-5=\\"selected\\"><block-text-6/></option></select></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'model';
|
const expr1 = 'model';
|
||||||
const bValue1 = bExpr1[expr1];
|
const bValue1 = bExpr1[expr1];
|
||||||
@@ -600,12 +574,11 @@ exports[`t-model directive t-model with dynamic values on select options in fore
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber, prepareList, withKey } = helpers;
|
let { toNumber, prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><block-child-0/></select></div>\`);
|
let block1 = createBlock(\`<div><select block-handler-0=\\"change\\"><block-child-0/></select></div>\`);
|
||||||
let block3 = createBlock(\`<option block-attribute-0=\\"value\\" block-attribute-1=\\"selected\\"><block-text-2/></option>\`);
|
let block3 = createBlock(\`<option block-attribute-0=\\"value\\" block-attribute-1=\\"selected\\"><block-text-2/></option>\`);
|
||||||
|
|
||||||
return function xml_template_999_Test(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
const expr1 = 'model';
|
const expr1 = 'model';
|
||||||
const bValue1 = bExpr1[expr1];
|
const bValue1 = bExpr1[expr1];
|
||||||
@@ -631,12 +604,11 @@ exports[`t-model directive t-model with radio button group in t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, toNumber, withKey } = helpers;
|
let { prepareList, toNumber, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div id=\\"get_data\\" block-handler-0=\\"click\\"><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div id=\\"get_data\\" block-handler-0=\\"click\\"><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<input type=\\"radio\\" name=\\"radio_group\\" block-property-0=\\"value\\" block-attribute-1=\\"id\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/>\`);
|
let block3 = createBlock(\`<input type=\\"radio\\" name=\\"radio_group\\" block-property-0=\\"value\\" block-attribute-1=\\"id\\" block-property-2=\\"checked\\" block-handler-3=\\"click\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['getData'], ctx];
|
let hdlr1 = [ctx['getData'], ctx];
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['options']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['options']);;
|
||||||
@@ -662,13 +634,12 @@ exports[`t-model directive two inputs in a div alternating with a t-if 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
let block2 = createBlock(\`<input class=\\"a\\" block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
let block2 = createBlock(\`<input class=\\"a\\" block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
||||||
let block3 = createBlock(\`<input class=\\"b\\" block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
let block3 = createBlock(\`<input class=\\"b\\" block-property-0=\\"value\\" block-handler-1=\\"input\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
const bExpr1 = ctx['state'];
|
const bExpr1 = ctx['state'];
|
||||||
@@ -694,11 +665,10 @@ exports[`t-model directive with expression having a changing key 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { toNumber } = helpers;
|
let { toNumber } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
let block1 = createBlock(\`<div><input block-property-0=\\"value\\" block-handler-1=\\"input\\"/><span><block-text-2/></span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const bExpr1 = ctx['state'].something;
|
const bExpr1 = ctx['state'].something;
|
||||||
const expr1 = ctx['text'].key;
|
const expr1 = ctx['text'].key;
|
||||||
let prop1 = bExpr1[expr1];
|
let prop1 = bExpr1[expr1];
|
||||||
|
|||||||
@@ -5,12 +5,11 @@ exports[`t-on t-on expression captured in t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue, prepareList, withKey } = helpers;
|
let { isBoundary, withDefault, setContextValue, prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><button block-handler-0=\\"click\\">expr</button></div>\`);
|
let block3 = createBlock(\`<div><button block-handler-0=\\"click\\">expr</button></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"iter\\", 0);
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
@@ -36,12 +35,11 @@ exports[`t-on t-on expression in t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">Expr</button></div>\`);
|
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">Expr</button></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].values);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].values);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -66,12 +64,11 @@ exports[`t-on t-on expression in t-foreach with t-set 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue, prepareList, withKey } = helpers;
|
let { isBoundary, withDefault, setContextValue, prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">Expr</button></div>\`);
|
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">Expr</button></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"bossa\\", 'nova');
|
setContextValue(ctx, \\"bossa\\", 'nova');
|
||||||
@@ -101,12 +98,11 @@ exports[`t-on t-on method call in t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">meth call</button></div>\`);
|
let block3 = createBlock(\`<div><block-text-0/>: <block-text-1/><button block-handler-2=\\"click\\">meth call</button></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].values);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['state'].values);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -131,13 +127,12 @@ exports[`t-on t-on on component next to t-on on div 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { createCatcher } = helpers;
|
let { createCatcher } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
const catcher1 = createCatcher({\\"click\\":0});
|
const catcher1 = createCatcher({\\"click\\":0});
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><p block-handler-0=\\"click\\">dec</p></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><p block-handler-0=\\"click\\">dec</p></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const hdlr1 = [ctx['increment'], ctx];
|
const hdlr1 = [ctx['increment'], ctx];
|
||||||
const b2 = catcher1(comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null), [hdlr1]);
|
const b2 = catcher1(comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null), [hdlr1]);
|
||||||
let hdlr2 = [ctx['decrement'], ctx];
|
let hdlr2 = [ctx['decrement'], ctx];
|
||||||
@@ -150,11 +145,10 @@ exports[`t-on t-on on component next to t-on on div 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button><block-text-0/></button>\`);
|
let block1 = createBlock(\`<button><block-text-0/></button>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -166,11 +160,10 @@ exports[`t-on t-on on components 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { createCatcher } = helpers;
|
let { createCatcher } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
const catcher1 = createCatcher({\\"click\\":0});
|
const catcher1 = createCatcher({\\"click\\":0});
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const hdlr1 = [ctx['increment'], ctx];
|
const hdlr1 = [ctx['increment'], ctx];
|
||||||
return catcher1(comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null), [hdlr1]);
|
return catcher1(comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null), [hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -181,11 +174,10 @@ exports[`t-on t-on on components 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button><block-text-0/></button>\`);
|
let block1 = createBlock(\`<button><block-text-0/></button>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -197,11 +189,10 @@ exports[`t-on t-on on components and t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, createCatcher, withKey } = helpers;
|
let { prepareList, createCatcher, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
const catcher1 = createCatcher({\\"click\\":0});
|
const catcher1 = createCatcher({\\"click\\":0});
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(['John','Raoul','Gérald']);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(['John','Raoul','Gérald']);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -221,11 +212,10 @@ exports[`t-on t-on on components and t-foreach 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -237,13 +227,12 @@ exports[`t-on t-on on components, variation 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { createCatcher } = helpers;
|
let { createCatcher } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
const catcher1 = createCatcher({\\"click\\":0});
|
const catcher1 = createCatcher({\\"click\\":0});
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><span/><block-child-0/><p/></div>\`);
|
let block1 = createBlock(\`<div><span/><block-child-0/><p/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const hdlr1 = [ctx['increment'], ctx];
|
const hdlr1 = [ctx['increment'], ctx];
|
||||||
const b2 = catcher1(comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null), [hdlr1]);
|
const b2 = catcher1(comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null), [hdlr1]);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
@@ -255,11 +244,10 @@ exports[`t-on t-on on components, variation 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button><block-text-0/></button>\`);
|
let block1 = createBlock(\`<button><block-text-0/></button>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -271,11 +259,10 @@ exports[`t-on t-on on components, with 'prevent' modifier 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { createCatcher } = helpers;
|
let { createCatcher } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
const catcher1 = createCatcher({\\"click.prevent\\":0});
|
const catcher1 = createCatcher({\\"click.prevent\\":0});
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const hdlr1 = [\\"prevent\\", ctx['increment'], ctx];
|
const hdlr1 = [\\"prevent\\", ctx['increment'], ctx];
|
||||||
return catcher1(comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null), [hdlr1]);
|
return catcher1(comp1({value: ctx['state'].value}, key + \`__1\`, node, this, null), [hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -286,11 +273,10 @@ exports[`t-on t-on on components, with 'prevent' modifier 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button><block-text-0/></button>\`);
|
let block1 = createBlock(\`<button><block-text-0/></button>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -302,11 +288,10 @@ exports[`t-on t-on on components, with a handler update 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue, createCatcher } = helpers;
|
let { isBoundary, withDefault, setContextValue, createCatcher } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"value\\"]);
|
||||||
const catcher1 = createCatcher({\\"click\\":0});
|
const catcher1 = createCatcher({\\"click\\":0});
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"name\\", ctx['state'].name);
|
setContextValue(ctx, \\"name\\", ctx['state'].name);
|
||||||
@@ -322,11 +307,10 @@ exports[`t-on t-on on components, with a handler update 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].value;
|
let txt1 = ctx['props'].value;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -337,12 +321,11 @@ exports[`t-on t-on on destroyed components 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].flag) {
|
if (ctx['state'].flag) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -356,11 +339,10 @@ exports[`t-on t-on on destroyed components 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-handler-0=\\"click\\"/>\`);
|
let block1 = createBlock(\`<div block-handler-0=\\"click\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['onClick'], ctx];
|
let hdlr1 = [ctx['onClick'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -372,7 +354,6 @@ exports[`t-on t-on on slot, with 'prevent' modifier 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { markRaw } = helpers;
|
let { markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<button>button</button>\`);
|
let block1 = createBlock(\`<button>button</button>\`);
|
||||||
@@ -381,7 +362,7 @@ exports[`t-on t-on on slot, with 'prevent' modifier 1`] = `
|
|||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__1\`, node, this, null);
|
return comp1({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -392,10 +373,9 @@ exports[`t-on t-on on slot, with 'prevent' modifier 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot, createCatcher } = helpers;
|
let { callSlot, createCatcher } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const catcher1 = createCatcher({\\"click.prevent\\":0});
|
const catcher1 = createCatcher({\\"click.prevent\\":0});
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const hdlr1 = [\\"prevent\\", ctx['doSomething'], ctx];
|
const hdlr1 = [\\"prevent\\", ctx['doSomething'], ctx];
|
||||||
return catcher1(callSlot(ctx, node, key, 'default', false, {}), [hdlr1]);
|
return catcher1(callSlot(ctx, node, key, 'default', false, {}), [hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -407,7 +387,6 @@ exports[`t-on t-on on t-set-slots 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { capture, createCatcher, markRaw } = helpers;
|
let { capture, createCatcher, markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const catcher1 = createCatcher({\\"click\\":0});
|
const catcher1 = createCatcher({\\"click\\":0});
|
||||||
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
@@ -422,7 +401,7 @@ exports[`t-on t-on on t-set-slots 1`] = `
|
|||||||
return catcher1(multi([b6, b7]), [hdlr1]);
|
return catcher1(multi([b6, b7]), [hdlr1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\` [\`);
|
const b2 = text(\` [\`);
|
||||||
const b3 = text(ctx['state'].count);
|
const b3 = text(ctx['state'].count);
|
||||||
const b4 = text(\`] \`);
|
const b4 = text(\`] \`);
|
||||||
@@ -438,9 +417,8 @@ exports[`t-on t-on on t-set-slots 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot } = helpers;
|
let { callSlot } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return callSlot(ctx, node, key, 'myslot', false, {});
|
return callSlot(ctx, node, key, 'myslot', false, {});
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -451,7 +429,6 @@ exports[`t-on t-on on t-slots 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { markRaw } = helpers;
|
let { markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<p>something</p>\`);
|
let block1 = createBlock(\`<p>something</p>\`);
|
||||||
@@ -460,7 +437,7 @@ exports[`t-on t-on on t-slots 1`] = `
|
|||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__1\`, node, this, null);
|
return comp1({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -471,10 +448,9 @@ exports[`t-on t-on on t-slots 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot, createCatcher } = helpers;
|
let { callSlot, createCatcher } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const catcher1 = createCatcher({\\"click\\":0});
|
const catcher1 = createCatcher({\\"click\\":0});
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\` [\`);
|
const b2 = text(\` [\`);
|
||||||
const b3 = text(ctx['state'].count);
|
const b3 = text(ctx['state'].count);
|
||||||
const b4 = text(\`] \`);
|
const b4 = text(\`] \`);
|
||||||
@@ -491,13 +467,12 @@ exports[`t-on t-on when first component child is an empty component 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { createCatcher } = helpers;
|
let { createCatcher } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"list\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"list\\"]);
|
||||||
const catcher1 = createCatcher({\\"click\\":0});
|
const catcher1 = createCatcher({\\"click\\":0});
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-handler-0=\\"click\\"><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div block-handler-0=\\"click\\"><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['push'], ctx];
|
let hdlr1 = [ctx['push'], ctx];
|
||||||
const hdlr2 = [()=>{}, ctx];
|
const hdlr2 = [()=>{}, ctx];
|
||||||
const b2 = catcher1(comp1({list: ctx['list']}, key + \`__1\`, node, this, null), [hdlr2]);
|
const b2 = catcher1(comp1({list: ctx['list']}, key + \`__1\`, node, this, null), [hdlr2]);
|
||||||
@@ -511,11 +486,10 @@ exports[`t-on t-on when first component child is an empty component 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, withKey } = helpers;
|
let { prepareList, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
let block2 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['props'].list);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['props'].list);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
|
|||||||
@@ -5,14 +5,13 @@ exports[`components in t-out simple list 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, isBoundary, withDefault, LazyValue, safeOutput, withKey } = helpers;
|
let { prepareList, isBoundary, withDefault, LazyValue, safeOutput, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
function value1(ctx, node, key = \\"\\") {
|
function value1(ctx, node, key = \\"\\") {
|
||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
@@ -32,9 +31,8 @@ exports[`components in t-out simple list 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`child\`);
|
return text(\`child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -4,12 +4,11 @@ exports[`t-props basic use 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, true, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, true, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1(Object.assign({}, ctx['some'].obj), key + \`__1\`, node, this, null);
|
const b2 = comp1(Object.assign({}, ctx['some'].obj), key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -20,11 +19,10 @@ exports[`t-props basic use 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].a+ctx['props'].b;
|
let txt1 = ctx['props'].a+ctx['props'].b;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -35,10 +33,9 @@ exports[`t-props child receives a copy of the t-props object, not the original 1
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, true, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, true, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1(Object.assign({}, ctx['childProps']), key + \`__1\`, node, this, null);
|
return comp1(Object.assign({}, ctx['childProps']), key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -48,11 +45,10 @@ exports[`t-props child receives a copy of the t-props object, not the original 2
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -62,12 +58,11 @@ exports[`t-props t-props and other props 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Comp\`, true, false, true, [\\"a\\"]);
|
const comp1 = app.createComponent(\`Comp\`, true, false, true, [\\"a\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><div><block-child-0/></div></div>\`);
|
let block1 = createBlock(\`<div><div><block-child-0/></div></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1(Object.assign({}, ctx['state1'], {a: ctx['a']}), key + \`__1\`, node, this, null);
|
const b2 = comp1(Object.assign({}, ctx['state1'], {a: ctx['a']}), key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -78,11 +73,10 @@ exports[`t-props t-props and other props 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].a;
|
let txt1 = ctx['props'].a;
|
||||||
let txt2 = ctx['props'].b;
|
let txt2 = ctx['props'].b;
|
||||||
return block1([txt1, txt2]);
|
return block1([txt1, txt2]);
|
||||||
@@ -94,12 +88,11 @@ exports[`t-props t-props only 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Comp\`, true, false, true, []);
|
const comp1 = app.createComponent(\`Comp\`, true, false, true, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><div><block-child-0/></div></div>\`);
|
let block1 = createBlock(\`<div><div><block-child-0/></div></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1(Object.assign({}, ctx['state']), key + \`__1\`, node, this, null);
|
const b2 = comp1(Object.assign({}, ctx['state']), key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -110,11 +103,10 @@ exports[`t-props t-props only 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].a;
|
let txt1 = ctx['props'].a;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -125,12 +117,11 @@ exports[`t-props t-props with props 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, true, [\\"a\\",\\"b\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, true, [\\"a\\",\\"b\\"]);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1(Object.assign({}, ctx['childProps'], {a: 1,b: 2}), key + \`__1\`, node, this, null);
|
const b2 = comp1(Object.assign({}, ctx['childProps'], {a: 1,b: 2}), key + \`__1\`, node, this, null);
|
||||||
return block1([], [b2]);
|
return block1([], [b2]);
|
||||||
}
|
}
|
||||||
@@ -141,11 +132,10 @@ exports[`t-props t-props with props 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div/>\`);
|
let block1 = createBlock(\`<div/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ exports[`t-set slot setted value (with t-set) not accessible with t-esc 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue, capture, markRaw } = helpers;
|
let { isBoundary, withDefault, setContextValue, capture, markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Childcomp\`, true, true, false, []);
|
const comp1 = app.createComponent(\`Childcomp\`, true, true, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||||
@@ -17,7 +16,7 @@ exports[`t-set slot setted value (with t-set) not accessible with t-esc 1`] = `
|
|||||||
return text('');
|
return text('');
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"iter\\", 'source');
|
setContextValue(ctx, \\"iter\\", 'source');
|
||||||
@@ -35,11 +34,10 @@ exports[`t-set slot setted value (with t-set) not accessible with t-esc 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Childcomp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let txt1 = ctx['iter'];
|
let txt1 = ctx['iter'];
|
||||||
@@ -55,7 +53,6 @@ exports[`t-set slots with a t-set with a component in body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { capture, isBoundary, withDefault, LazyValue, safeOutput, markRaw } = helpers;
|
let { capture, isBoundary, withDefault, LazyValue, safeOutput, markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`C\`, true, false, false, []);
|
const comp1 = app.createComponent(\`C\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp2 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
@@ -72,7 +69,7 @@ exports[`t-set slots with a t-set with a component in body 1`] = `
|
|||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1001_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const ctx1 = capture(ctx);
|
const ctx1 = capture(ctx);
|
||||||
return comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__2\`, node, this, null);
|
return comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__2\`, node, this, null);
|
||||||
}
|
}
|
||||||
@@ -84,9 +81,8 @@ exports[`t-set slots with a t-set with a component in body 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot } = helpers;
|
let { callSlot } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\`Child \`);
|
const b2 = text(\`Child \`);
|
||||||
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -98,9 +94,8 @@ exports[`t-set slots with a t-set with a component in body 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_C(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`C\`);
|
return text(\`C\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -111,7 +106,6 @@ exports[`t-set slots with an t-set with a component in body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { capture, isBoundary, withDefault, LazyValue, safeOutput, markRaw } = helpers;
|
let { capture, isBoundary, withDefault, LazyValue, safeOutput, markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`Blorg\`, true, true, false, []);
|
const comp2 = app.createComponent(\`Blorg\`, true, true, false, []);
|
||||||
|
|
||||||
@@ -132,7 +126,7 @@ exports[`t-set slots with an t-set with a component in body 1`] = `
|
|||||||
return multi([b3, b4]);
|
return multi([b3, b4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1001_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const ctx1 = capture(ctx);
|
const ctx1 = capture(ctx);
|
||||||
return comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__2\`, node, this, null);
|
return comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__2\`, node, this, null);
|
||||||
}
|
}
|
||||||
@@ -144,9 +138,8 @@ exports[`t-set slots with an t-set with a component in body 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot } = helpers;
|
let { callSlot } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
|
|
||||||
return function xml_template_1000_Blorg(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\`Blorg \`);
|
const b2 = text(\`Blorg \`);
|
||||||
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -158,9 +151,8 @@ exports[`t-set slots with an t-set with a component in body 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`Child\`);
|
return text(\`Child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -171,7 +163,6 @@ exports[`t-set slots with an unused t-set with a component in body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { capture, isBoundary, withDefault, LazyValue, markRaw } = helpers;
|
let { capture, isBoundary, withDefault, LazyValue, markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp2 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
@@ -186,7 +177,7 @@ exports[`t-set slots with an unused t-set with a component in body 1`] = `
|
|||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const ctx1 = capture(ctx);
|
const ctx1 = capture(ctx);
|
||||||
return comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__2\`, node, this, null);
|
return comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx1}})}, key + \`__2\`, node, this, null);
|
||||||
}
|
}
|
||||||
@@ -198,9 +189,8 @@ exports[`t-set slots with an unused t-set with a component in body 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot } = helpers;
|
let { callSlot } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = text(\`Child \`);
|
const b2 = text(\`Child \`);
|
||||||
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
const b3 = callSlot(ctx, node, key, 'default', false, {});
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -213,11 +203,10 @@ exports[`t-set t-set can't alter component even if key in component 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><p><block-text-1/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let txt1 = ctx['iter'];
|
let txt1 = ctx['iter'];
|
||||||
@@ -233,11 +222,10 @@ exports[`t-set t-set can't alter component if key not in component 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><p><block-text-1/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let txt1 = ctx['iter'];
|
let txt1 = ctx['iter'];
|
||||||
@@ -253,11 +241,10 @@ exports[`t-set t-set in t-if 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"flag\\", ctx['state'].flag);
|
setContextValue(ctx, \\"flag\\", ctx['state'].flag);
|
||||||
@@ -279,12 +266,11 @@ exports[`t-set t-set not altered by child comp 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Childcomp\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Childcomp\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p><block-child-0/><p><block-text-1/></p></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"iter\\", 'source');
|
setContextValue(ctx, \\"iter\\", 'source');
|
||||||
@@ -301,11 +287,10 @@ exports[`t-set t-set not altered by child comp 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
let block1 = createBlock(\`<div><block-text-0/><block-text-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Childcomp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
let txt1 = ctx['iter'];
|
let txt1 = ctx['iter'];
|
||||||
@@ -321,11 +306,10 @@ exports[`t-set t-set outside modified in t-if 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, setContextValue } = helpers;
|
let { isBoundary, withDefault, setContextValue } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><p><block-text-0/></p></div>\`);
|
let block1 = createBlock(\`<div><p><block-text-0/></p></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
setContextValue(ctx, \\"iter\\", 0);
|
setContextValue(ctx, \\"iter\\", 0);
|
||||||
@@ -348,7 +332,6 @@ exports[`t-set t-set with a component in body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, LazyValue, safeOutput } = helpers;
|
let { isBoundary, withDefault, LazyValue, safeOutput } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><div><block-child-0/></div></div>\`);
|
let block1 = createBlock(\`<div><div><block-child-0/></div></div>\`);
|
||||||
@@ -357,7 +340,7 @@ exports[`t-set t-set with a component in body 1`] = `
|
|||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx[\`v\`] = new LazyValue(value1, ctx, this, node, key);
|
ctx[\`v\`] = new LazyValue(value1, ctx, this, node, key);
|
||||||
@@ -371,9 +354,8 @@ exports[`t-set t-set with a component in body 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return text(\`Child\`);
|
return text(\`Child\`);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -384,7 +366,6 @@ exports[`t-set t-set with something in body 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { isBoundary, withDefault, LazyValue, safeOutput } = helpers;
|
let { isBoundary, withDefault, LazyValue, safeOutput } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><div><block-child-0/></div></div>\`);
|
let block1 = createBlock(\`<div><div><block-child-0/></div></div>\`);
|
||||||
let block2 = createBlock(\`<p>coucou</p>\`);
|
let block2 = createBlock(\`<p>coucou</p>\`);
|
||||||
@@ -393,7 +374,7 @@ exports[`t-set t-set with something in body 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
ctx[isBoundary] = 1
|
ctx[isBoundary] = 1
|
||||||
ctx[\`v\`] = new LazyValue(value1, ctx, this, node, key);
|
ctx[\`v\`] = new LazyValue(value1, ctx, this, node, key);
|
||||||
|
|||||||
@@ -156,16 +156,15 @@ describe("basics", () => {
|
|||||||
} catch (e) {
|
} catch (e) {
|
||||||
error = e as Error;
|
error = e as Error;
|
||||||
}
|
}
|
||||||
const expectedErrorMessage = `Failed to compile template "xml_template_999": Unexpected identifier
|
const expectedErrorMessage = `Failed to compile anonymous template: Unexpected identifier
|
||||||
|
|
||||||
generated code:
|
generated code:
|
||||||
function(app, bdom, helpers) {
|
function(app, bdom, helpers) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: "xml_template_999"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0="class">test</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0="class">test</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Comp(ctx, node, key = "") {
|
return function template(ctx, node, key = "") {
|
||||||
let attr1 = ctx['a']ctx['b'];
|
let attr1 = ctx['a']ctx['b'];
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
@@ -182,16 +181,15 @@ function(app, bdom, helpers) {
|
|||||||
static components = { Child };
|
static components = { Child };
|
||||||
static template = xml`<Child/>`;
|
static template = xml`<Child/>`;
|
||||||
}
|
}
|
||||||
const expectedErrorMessage = `Failed to compile template "xml_template_999": Unexpected identifier
|
const expectedErrorMessage = `Failed to compile anonymous template: Unexpected identifier
|
||||||
|
|
||||||
generated code:
|
generated code:
|
||||||
function(app, bdom, helpers) {
|
function(app, bdom, helpers) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: "xml_template_999"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-attribute-0="class">test</div>\`);
|
let block1 = createBlock(\`<div block-attribute-0="class">test</div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = "") {
|
return function template(ctx, node, key = "") {
|
||||||
let attr1 = ctx['a']ctx['b'];
|
let attr1 = ctx['a']ctx['b'];
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,391 @@
|
|||||||
|
import { App, Component, mount, onMounted, useState, xml } from "../../src/index";
|
||||||
|
import {
|
||||||
|
makeTestFixture,
|
||||||
|
nextAppError,
|
||||||
|
nextTick,
|
||||||
|
snapshotEverything,
|
||||||
|
useLogLifecycle,
|
||||||
|
} from "../helpers";
|
||||||
|
|
||||||
|
snapshotEverything();
|
||||||
|
|
||||||
|
let originalconsoleWarn = console.warn;
|
||||||
|
let mockConsoleWarn: any;
|
||||||
|
|
||||||
|
let fixture: HTMLElement;
|
||||||
|
|
||||||
|
beforeEach(() => {
|
||||||
|
fixture = makeTestFixture();
|
||||||
|
mockConsoleWarn = jest.fn(() => {});
|
||||||
|
console.warn = mockConsoleWarn;
|
||||||
|
});
|
||||||
|
|
||||||
|
afterEach(() => {
|
||||||
|
console.warn = originalconsoleWarn;
|
||||||
|
});
|
||||||
|
|
||||||
|
describe("list of components", () => {
|
||||||
|
test("simple list", async () => {
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`<span><t t-esc="props.value"/></span>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<t t-for="elem" t-of="state.elems" t-key="elem.id">
|
||||||
|
<Child value="elem.value"/>
|
||||||
|
</t>`;
|
||||||
|
static components = { Child };
|
||||||
|
|
||||||
|
state = useState({
|
||||||
|
elems: [
|
||||||
|
{ id: 1, value: "a" },
|
||||||
|
{ id: 2, value: "b" },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
const parent = await mount(Parent, fixture);
|
||||||
|
expect(fixture.innerHTML).toBe("<span>a</span><span>b</span>");
|
||||||
|
parent.state.elems.push({ id: 4, value: "d" });
|
||||||
|
await nextTick();
|
||||||
|
expect(fixture.innerHTML).toBe("<span>a</span><span>b</span><span>d</span>");
|
||||||
|
|
||||||
|
parent.state.elems.pop();
|
||||||
|
|
||||||
|
await nextTick();
|
||||||
|
expect(fixture.innerHTML).toBe("<span>a</span><span>b</span>");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("components in a node in a t-for ", async () => {
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`<div><t t-esc="props.item"/></div>`;
|
||||||
|
setup() {
|
||||||
|
useLogLifecycle();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<ul>
|
||||||
|
<t t-for="item" t-of="items" t-key="'li_'+item">
|
||||||
|
<li>
|
||||||
|
<Child item="item"/>
|
||||||
|
</li>
|
||||||
|
</t>
|
||||||
|
</ul>
|
||||||
|
</div>`;
|
||||||
|
static components = { Child };
|
||||||
|
|
||||||
|
setup() {
|
||||||
|
useLogLifecycle();
|
||||||
|
}
|
||||||
|
|
||||||
|
get items() {
|
||||||
|
return [1, 2];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await mount(Parent, fixture);
|
||||||
|
expect(fixture.innerHTML).toBe(
|
||||||
|
"<div><ul><li><div>1</div></li><li><div>2</div></li></ul></div>"
|
||||||
|
);
|
||||||
|
expect([
|
||||||
|
"Parent:setup",
|
||||||
|
"Parent:willStart",
|
||||||
|
"Parent:willRender",
|
||||||
|
"Child:setup",
|
||||||
|
"Child:willStart",
|
||||||
|
"Child:setup",
|
||||||
|
"Child:willStart",
|
||||||
|
"Parent:rendered",
|
||||||
|
"Child:willRender",
|
||||||
|
"Child:rendered",
|
||||||
|
"Child:willRender",
|
||||||
|
"Child:rendered",
|
||||||
|
"Child:mounted",
|
||||||
|
"Child:mounted",
|
||||||
|
"Parent:mounted",
|
||||||
|
]).toBeLogged();
|
||||||
|
});
|
||||||
|
|
||||||
|
test("reconciliation alg works for t-for in t-for", async () => {
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`<div><t t-esc="props.blip"/></div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<t t-for="section" t-of="state.s" t-key="section">
|
||||||
|
<t t-for="blip" t-of="section.blips" t-key="blip">
|
||||||
|
<Child blip="blip"/>
|
||||||
|
</t>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
static components = { Child };
|
||||||
|
state = { s: [{ blips: ["a1", "a2"] }, { blips: ["b1"] }] };
|
||||||
|
}
|
||||||
|
|
||||||
|
await mount(Parent, fixture);
|
||||||
|
expect(fixture.innerHTML).toBe("<div><div>a1</div><div>a2</div><div>b1</div></div>");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("reconciliation alg works for t-for in t-for, 2", async () => {
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`<div><t t-esc="props.row + '_' + props.col"/></div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<p t-for="row" t-of="state.rows" t-key="row">
|
||||||
|
<p t-for="col" t-of="state.cols" t-key="col">
|
||||||
|
<Child row="row" col="col"/>
|
||||||
|
</p>
|
||||||
|
</p>
|
||||||
|
</div>`;
|
||||||
|
static components = { Child };
|
||||||
|
state = useState({ rows: [1, 2], cols: ["a", "b"] });
|
||||||
|
}
|
||||||
|
|
||||||
|
const parent = await mount(Parent, fixture);
|
||||||
|
expect(fixture.innerHTML).toBe(
|
||||||
|
"<div><p><p><div>1_a</div></p><p><div>1_b</div></p></p><p><p><div>2_a</div></p><p><div>2_b</div></p></p></div>"
|
||||||
|
);
|
||||||
|
parent.state.rows = [2, 1];
|
||||||
|
await nextTick();
|
||||||
|
expect(fixture.innerHTML).toBe(
|
||||||
|
"<div><p><p><div>2_a</div></p><p><div>2_b</div></p></p><p><p><div>1_a</div></p><p><div>1_b</div></p></p></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("sub components rendered in a loop", async () => {
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`<p><t t-esc="props.n"/></p>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<t t-for="number" t-of="state.numbers" t-key="number" >
|
||||||
|
<Child n="number"/>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
static components = { Child };
|
||||||
|
|
||||||
|
state = useState({ numbers: [1, 2, 3] });
|
||||||
|
}
|
||||||
|
await mount(Parent, fixture);
|
||||||
|
|
||||||
|
expect(fixture.innerHTML).toBe(`<div><p>1</p><p>2</p><p>3</p></div>`);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("sub components with some state rendered in a loop", async () => {
|
||||||
|
let n = 1;
|
||||||
|
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`<p><t t-esc="state.n"/></p>`;
|
||||||
|
state: any;
|
||||||
|
setup() {
|
||||||
|
this.state = useState({ n });
|
||||||
|
n++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<t t-for="number" t-of="state.numbers" t-key="number">
|
||||||
|
<Child/>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
static components = { Child };
|
||||||
|
|
||||||
|
state = useState({
|
||||||
|
numbers: [1, 2, 3],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const parent = await mount(Parent, fixture);
|
||||||
|
|
||||||
|
parent.state.numbers = [1, 3];
|
||||||
|
await nextTick();
|
||||||
|
expect(fixture.innerHTML).toBe(`<div><p>1</p><p>3</p></div>`);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("list of sub components inside other nodes", async () => {
|
||||||
|
// this confuses the patching algorithm...
|
||||||
|
class SubComponent extends Component {
|
||||||
|
static template = xml`<span>asdf</span>`;
|
||||||
|
}
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<div t-for="blip" t-of="state.blips" t-key="blip.id">
|
||||||
|
<SubComponent />
|
||||||
|
</div>
|
||||||
|
</div>`;
|
||||||
|
static components = { SubComponent };
|
||||||
|
state = useState({
|
||||||
|
blips: [
|
||||||
|
{ a: "a", id: 1 },
|
||||||
|
{ b: "b", id: 2 },
|
||||||
|
{ c: "c", id: 4 },
|
||||||
|
],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const parent = await mount(Parent, fixture);
|
||||||
|
expect(fixture.innerHTML).toBe(
|
||||||
|
"<div><div><span>asdf</span></div><div><span>asdf</span></div><div><span>asdf</span></div></div>"
|
||||||
|
);
|
||||||
|
parent.state.blips.splice(0, 1);
|
||||||
|
await nextTick();
|
||||||
|
expect(fixture.innerHTML).toBe(
|
||||||
|
"<div><div><span>asdf</span></div><div><span>asdf</span></div></div>"
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("t-for with t-component, and update", async () => {
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<span>
|
||||||
|
<t t-esc="state.val"/>
|
||||||
|
<t t-esc="props.val"/>
|
||||||
|
</span>`;
|
||||||
|
state = useState({ val: "A" });
|
||||||
|
setup() {
|
||||||
|
onMounted(() => {
|
||||||
|
this.state.val = "B";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
class Parent extends Component {
|
||||||
|
static components = { Child };
|
||||||
|
static template = xml`
|
||||||
|
<div>
|
||||||
|
<t t-for="n" t-of="[0, 1]" t-key="n">
|
||||||
|
<Child val="n"/>
|
||||||
|
</t>
|
||||||
|
</div>`;
|
||||||
|
}
|
||||||
|
|
||||||
|
await mount(Parent, fixture);
|
||||||
|
expect(fixture.innerHTML).toBe("<div><span>A0</span><span>A1</span></div>");
|
||||||
|
|
||||||
|
await nextTick(); // wait for changes triggered in mounted to be applied
|
||||||
|
expect(fixture.innerHTML).toBe("<div><span>B0</span><span>B1</span></div>");
|
||||||
|
});
|
||||||
|
|
||||||
|
test("switch component position", async () => {
|
||||||
|
const childInstances = [];
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`<div t-esc="props.key"></div>`;
|
||||||
|
setup() {
|
||||||
|
childInstances.push(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static components = { Child };
|
||||||
|
static template = xml`<span>
|
||||||
|
<t t-for="c" t-of="clist" t-key="c">
|
||||||
|
<Child key="c"/>
|
||||||
|
</t>
|
||||||
|
</span>`;
|
||||||
|
|
||||||
|
clist = [1, 2];
|
||||||
|
}
|
||||||
|
|
||||||
|
const parent = await mount(Parent, fixture);
|
||||||
|
expect(fixture.innerHTML).toBe("<span><div>1</div><div>2</div></span>");
|
||||||
|
parent.clist = [2, 1];
|
||||||
|
parent.render();
|
||||||
|
await nextTick();
|
||||||
|
expect(fixture.innerHTML).toBe("<span><div>2</div><div>1</div></span>");
|
||||||
|
expect(childInstances.length).toBe(2);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("crash on duplicate key in dev mode", async () => {
|
||||||
|
const consoleInfo = console.info;
|
||||||
|
console.info = jest.fn();
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml``;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<t t-for="item" t-of="[1, 2]" t-key="'child'">
|
||||||
|
<Child/>
|
||||||
|
</t>
|
||||||
|
`;
|
||||||
|
static components = { Child };
|
||||||
|
}
|
||||||
|
|
||||||
|
const app = new App(Parent, { test: true });
|
||||||
|
const mountProm = expect(app.mount(fixture)).rejects.toThrow(
|
||||||
|
"Got duplicate key in t-for: child"
|
||||||
|
);
|
||||||
|
await expect(nextAppError(app)).resolves.toThrow("Got duplicate key in t-for: child");
|
||||||
|
await mountProm;
|
||||||
|
console.info = consoleInfo;
|
||||||
|
expect(mockConsoleWarn).toBeCalledTimes(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("crash when using object as keys that serialize to the same string", async () => {
|
||||||
|
const consoleInfo = console.info;
|
||||||
|
console.info = jest.fn();
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml``;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<t t-for="item" t-of="[{}, {}]" t-key="item">
|
||||||
|
<Child/>
|
||||||
|
</t>
|
||||||
|
`;
|
||||||
|
static components = { Child };
|
||||||
|
}
|
||||||
|
|
||||||
|
const app = new App(Parent, { test: true });
|
||||||
|
const mountProm = expect(app.mount(fixture)).rejects.toThrow(
|
||||||
|
"Got duplicate key in t-for: [object Object]"
|
||||||
|
);
|
||||||
|
await expect(nextAppError(app)).resolves.toThrow("Got duplicate key in t-for: [object Object]");
|
||||||
|
await mountProm;
|
||||||
|
console.info = consoleInfo;
|
||||||
|
expect(mockConsoleWarn).toBeCalledTimes(1);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("order is correct when slots are not of same type", async () => {
|
||||||
|
class Child extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<t t-slot="{{ slotName }}" t-for="slotName" t-of="slotNames" t-key="slotName"/>
|
||||||
|
`;
|
||||||
|
get slotNames() {
|
||||||
|
return Object.entries(this.props.slots)
|
||||||
|
.filter((entry: any) => entry[1].active)
|
||||||
|
.map((entry) => entry[0]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
class Parent extends Component {
|
||||||
|
static template = xml`
|
||||||
|
<Child>
|
||||||
|
<t t-set-slot="a" active="!state.active"><div t-if="!state.active">A</div></t>
|
||||||
|
<t t-set-slot="b" active="true">B</t>
|
||||||
|
<t t-set-slot="c" active="state.active">C</t>
|
||||||
|
</Child>
|
||||||
|
`;
|
||||||
|
static components = { Child };
|
||||||
|
state = useState({ active: false });
|
||||||
|
}
|
||||||
|
|
||||||
|
const parent = await mount(Parent, fixture);
|
||||||
|
expect(fixture.textContent).toBe("AB");
|
||||||
|
parent.state.active = true;
|
||||||
|
await nextTick();
|
||||||
|
expect(fixture.textContent).toBe("BC");
|
||||||
|
});
|
||||||
|
});
|
||||||
+2
-2
@@ -128,8 +128,8 @@ export function snapshotEverything() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
const originalCompileTemplate = TemplateSet.prototype._compileTemplate;
|
const originalCompileTemplate = TemplateSet.prototype._compileTemplate;
|
||||||
TemplateSet.prototype._compileTemplate = function (name: string, template: string | Element, alias?: string) {
|
TemplateSet.prototype._compileTemplate = function (name: string, template: string | Element) {
|
||||||
const fn = originalCompileTemplate.call(this, name, template, alias);
|
const fn = originalCompileTemplate.call(this, "", template);
|
||||||
if (!globalTemplateNames.has(name)) {
|
if (!globalTemplateNames.has(name)) {
|
||||||
expect(fn.toString()).toMatchSnapshot();
|
expect(fn.toString()).toMatchSnapshot();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ exports[`Portal Add and remove portals 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, capture, withKey } = helpers;
|
let { prepareList, capture, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ exports[`Portal Add and remove portals 1`] = `
|
|||||||
return multi([b3, b4]);
|
return multi([b3, b4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['portalIds']);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['portalIds']);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -34,7 +33,6 @@ exports[`Portal Add and remove portals on div 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, capture, withKey } = helpers;
|
let { prepareList, capture, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -45,7 +43,7 @@ exports[`Portal Add and remove portals on div 1`] = `
|
|||||||
return block2([txt1]);
|
return block2([txt1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['portalIds']);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['portalIds']);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -64,7 +62,6 @@ exports[`Portal Add and remove portals with t-foreach 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, capture, withKey } = helpers;
|
let { prepareList, capture, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -76,7 +73,7 @@ exports[`Portal Add and remove portals with t-foreach 1`] = `
|
|||||||
return multi([b4, b5]);
|
return multi([b4, b5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['portalIds']);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['portalIds']);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -97,7 +94,6 @@ exports[`Portal Add and remove portals with t-foreach and destroy 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, capture, withKey } = helpers;
|
let { prepareList, capture, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -109,7 +105,7 @@ exports[`Portal Add and remove portals with t-foreach and destroy 1`] = `
|
|||||||
return multi([b4, b5]);
|
return multi([b4, b5]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['portalIds']);;
|
const [k_block1, v_block1, l_block1, c_block1] = prepareList(ctx['portalIds']);;
|
||||||
for (let i1 = 0; i1 < l_block1; i1++) {
|
for (let i1 = 0; i1 < l_block1; i1++) {
|
||||||
@@ -130,7 +126,6 @@ exports[`Portal Add and remove portals with t-foreach inside div 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, capture, withKey } = helpers;
|
let { prepareList, capture, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -143,7 +138,7 @@ exports[`Portal Add and remove portals with t-foreach inside div 1`] = `
|
|||||||
return multi([b5, b6]);
|
return multi([b5, b6]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['portalIds']);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList(ctx['portalIds']);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -164,12 +159,11 @@ exports[`Portal Child and Portal 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block3 = createBlock(\`<div class=\\"portal\\"/>\`);
|
let block3 = createBlock(\`<div class=\\"portal\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
const b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
const b3 = block3();
|
const b3 = block3();
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -181,7 +175,6 @@ exports[`Portal Child and Portal 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -192,7 +185,7 @@ exports[`Portal Child and Portal 2`] = `
|
|||||||
return block3();
|
return block3();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
const b4 = comp1({target: '.portal',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b4 = comp1({target: '.portal',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return multi([b2, b4]);
|
return multi([b2, b4]);
|
||||||
@@ -205,7 +198,6 @@ exports[`Portal Portal composed with t-slot 1`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { markRaw } = helpers;
|
let { markRaw } = helpers;
|
||||||
// Template name: \\"xml_template_1001\\"
|
|
||||||
const comp1 = app.createComponent(\`Child2\`, true, false, false, [\\"customHandler\\"]);
|
const comp1 = app.createComponent(\`Child2\`, true, false, false, [\\"customHandler\\"]);
|
||||||
const comp2 = app.createComponent(\`Child\`, true, true, false, []);
|
const comp2 = app.createComponent(\`Child\`, true, true, false, []);
|
||||||
|
|
||||||
@@ -215,7 +207,7 @@ exports[`Portal Portal composed with t-slot 1`] = `
|
|||||||
return comp1({customHandler: ctx['_handled']}, key + \`__1\`, node, this, null);
|
return comp1({customHandler: ctx['_handled']}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1001_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null);
|
const b3 = comp2({slots: markRaw({'default': {__render: slot1.bind(this), __ctx: ctx}})}, key + \`__2\`, node, this, null);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -227,7 +219,6 @@ exports[`Portal Portal composed with t-slot 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { callSlot } = helpers;
|
let { callSlot } = helpers;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -235,7 +226,7 @@ exports[`Portal Portal composed with t-slot 2`] = `
|
|||||||
return callSlot(ctx, node, key, 'default', false, {});
|
return callSlot(ctx, node, key, 'default', false, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
return comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -245,11 +236,10 @@ exports[`Portal Portal composed with t-slot 3`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div block-handler-0=\\"custom\\"><span id=\\"childSpan\\">child2</span></div>\`);
|
let block1 = createBlock(\`<div block-handler-0=\\"custom\\"><span id=\\"childSpan\\">child2</span></div>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child2(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['onCustom'], ctx];
|
let hdlr1 = [ctx['onCustom'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -260,7 +250,6 @@ exports[`Portal basic use of portal 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -271,7 +260,7 @@ exports[`Portal basic use of portal 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -282,7 +271,6 @@ exports[`Portal basic use of portal in dev mode 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -293,7 +281,7 @@ exports[`Portal basic use of portal in dev mode 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -304,7 +292,6 @@ exports[`Portal basic use of portal on div 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -315,7 +302,7 @@ exports[`Portal basic use of portal on div 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -326,7 +313,6 @@ exports[`Portal basic use of portal, variation 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -337,7 +323,7 @@ exports[`Portal basic use of portal, variation 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: ctx['target'],slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: ctx['target'],slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -348,7 +334,6 @@ exports[`Portal conditional use of Portal (with sub Component) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
const comp2 = app.createComponent(null, false, true, false, false);
|
const comp2 = app.createComponent(null, false, true, false, false);
|
||||||
@@ -359,7 +344,7 @@ exports[`Portal conditional use of Portal (with sub Component) 1`] = `
|
|||||||
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b4;
|
let b2,b4;
|
||||||
b2 = block2();
|
b2 = block2();
|
||||||
if (ctx['state'].hasPortal) {
|
if (ctx['state'].hasPortal) {
|
||||||
@@ -374,11 +359,10 @@ exports[`Portal conditional use of Portal (with sub Component) 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
let block1 = createBlock(\`<p><block-text-0/></p>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -389,7 +373,6 @@ exports[`Portal conditional use of Portal 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -400,7 +383,7 @@ exports[`Portal conditional use of Portal 1`] = `
|
|||||||
return block3();
|
return block3();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b4;
|
let b2,b4;
|
||||||
b2 = block2();
|
b2 = block2();
|
||||||
if (ctx['state'].hasPortal) {
|
if (ctx['state'].hasPortal) {
|
||||||
@@ -415,10 +398,9 @@ exports[`Portal conditional use of Portal with child and div 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].hasPortal) {
|
if (ctx['state'].hasPortal) {
|
||||||
b2 = comp1({}, key + \`__1\`, node, this, null);
|
b2 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -433,7 +415,6 @@ exports[`Portal conditional use of Portal with child and div 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, capture, withKey } = helpers;
|
let { prepareList, capture, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -444,7 +425,7 @@ exports[`Portal conditional use of Portal with child and div 2`] = `
|
|||||||
return block3();
|
return block3();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block2, v_block2, l_block2, c_block2] = prepareList([1]);;
|
const [k_block2, v_block2, l_block2, c_block2] = prepareList([1]);;
|
||||||
for (let i1 = 0; i1 < l_block2; i1++) {
|
for (let i1 = 0; i1 < l_block2; i1++) {
|
||||||
@@ -463,12 +444,11 @@ exports[`Portal conditional use of Portal with child and div, variation 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block2 = createBlock(\`<div><block-child-0/></div>\`);
|
let block2 = createBlock(\`<div><block-child-0/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].hasPortal) {
|
if (ctx['state'].hasPortal) {
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
@@ -484,7 +464,6 @@ exports[`Portal conditional use of Portal with child and div, variation 2`] = `
|
|||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
let { prepareList, capture, withKey } = helpers;
|
let { prepareList, capture, withKey } = helpers;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -495,7 +474,7 @@ exports[`Portal conditional use of Portal with child and div, variation 2`] = `
|
|||||||
return block4();
|
return block4();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
ctx = Object.create(ctx);
|
ctx = Object.create(ctx);
|
||||||
const [k_block3, v_block3, l_block3, c_block3] = prepareList([1]);;
|
const [k_block3, v_block3, l_block3, c_block3] = prepareList([1]);;
|
||||||
@@ -515,7 +494,6 @@ exports[`Portal conditional use of Portal with div 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -526,7 +504,7 @@ exports[`Portal conditional use of Portal with div 1`] = `
|
|||||||
return block3();
|
return block3();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2;
|
let b2;
|
||||||
if (ctx['state'].hasPortal) {
|
if (ctx['state'].hasPortal) {
|
||||||
const b4 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b4 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
@@ -541,7 +519,6 @@ exports[`Portal lifecycle hooks of portal sub component are properly called 1`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
const comp2 = app.createComponent(null, false, true, false, false);
|
const comp2 = app.createComponent(null, false, true, false, false);
|
||||||
@@ -552,7 +529,7 @@ exports[`Portal lifecycle hooks of portal sub component are properly called 1`]
|
|||||||
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b3;
|
let b3;
|
||||||
if (ctx['state'].hasChild) {
|
if (ctx['state'].hasChild) {
|
||||||
b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
||||||
@@ -566,11 +543,10 @@ exports[`Portal lifecycle hooks of portal sub component are properly called 2`]
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -581,12 +557,11 @@ exports[`Portal portal and Child 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
|
|
||||||
let block2 = createBlock(\`<div class=\\"portal\\"/>\`);
|
let block2 = createBlock(\`<div class=\\"portal\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
const b3 = comp1({}, key + \`__1\`, node, this, null);
|
||||||
return multi([b2, b3]);
|
return multi([b2, b3]);
|
||||||
@@ -598,7 +573,6 @@ exports[`Portal portal and Child 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -609,7 +583,7 @@ exports[`Portal portal and Child 2`] = `
|
|||||||
return block3();
|
return block3();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b2 = block2();
|
const b2 = block2();
|
||||||
const b4 = comp1({target: '.portal',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b4 = comp1({target: '.portal',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return multi([b2, b4]);
|
return multi([b2, b4]);
|
||||||
@@ -621,7 +595,6 @@ exports[`Portal portal could have dynamically no content 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -637,7 +610,7 @@ exports[`Portal portal could have dynamically no content 1`] = `
|
|||||||
return multi([b3]);
|
return multi([b3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b4 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b4 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b4]);
|
return block1([], [b4]);
|
||||||
}
|
}
|
||||||
@@ -648,7 +621,6 @@ exports[`Portal portal destroys on crash 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"error\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"error\\"]);
|
||||||
const comp2 = app.createComponent(null, false, true, false, false);
|
const comp2 = app.createComponent(null, false, true, false, false);
|
||||||
@@ -659,7 +631,7 @@ exports[`Portal portal destroys on crash 1`] = `
|
|||||||
return comp1({error: ctx['state'].error}, key + \`__1\`, node, this, null);
|
return comp1({error: ctx['state'].error}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
const b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -670,11 +642,10 @@ exports[`Portal portal destroys on crash 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].error&&ctx['this'].will.crash;
|
let txt1 = ctx['props'].error&&ctx['this'].will.crash;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -685,7 +656,6 @@ exports[`Portal portal with child and props 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
const comp2 = app.createComponent(null, false, true, false, false);
|
const comp2 = app.createComponent(null, false, true, false, false);
|
||||||
@@ -696,7 +666,7 @@ exports[`Portal portal with child and props 1`] = `
|
|||||||
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
const b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -707,11 +677,10 @@ exports[`Portal portal with child and props 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
let block1 = createBlock(\`<span><block-text-0/></span>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let txt1 = ctx['props'].val;
|
let txt1 = ctx['props'].val;
|
||||||
return block1([txt1]);
|
return block1([txt1]);
|
||||||
}
|
}
|
||||||
@@ -722,7 +691,6 @@ exports[`Portal portal with dynamic body 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -741,7 +709,7 @@ exports[`Portal portal with dynamic body 1`] = `
|
|||||||
return multi([b3, b4]);
|
return multi([b3, b4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b5 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b5 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b5]);
|
return block1([], [b5]);
|
||||||
}
|
}
|
||||||
@@ -752,7 +720,6 @@ exports[`Portal portal with many children 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -766,7 +733,7 @@ exports[`Portal portal with many children 1`] = `
|
|||||||
return multi([b3, b4]);
|
return multi([b3, b4]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b5 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b5 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b5]);
|
return block1([], [b5]);
|
||||||
}
|
}
|
||||||
@@ -777,7 +744,6 @@ exports[`Portal portal with no content 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -791,7 +757,7 @@ exports[`Portal portal with no content 1`] = `
|
|||||||
return multi([b3]);
|
return multi([b3]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b4 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b4 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b4]);
|
return block1([], [b4]);
|
||||||
}
|
}
|
||||||
@@ -802,7 +768,6 @@ exports[`Portal portal with only text as content 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -812,7 +777,7 @@ exports[`Portal portal with only text as content 1`] = `
|
|||||||
return text('only text');
|
return text('only text');
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -823,7 +788,6 @@ exports[`Portal portal with target not in dom 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -834,7 +798,7 @@ exports[`Portal portal with target not in dom 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: '#does-not-exist',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: '#does-not-exist',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -845,7 +809,6 @@ exports[`Portal portal's parent's env is not polluted 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, []);
|
||||||
const comp2 = app.createComponent(null, false, true, false, false);
|
const comp2 = app.createComponent(null, false, true, false, false);
|
||||||
@@ -856,7 +819,7 @@ exports[`Portal portal's parent's env is not polluted 1`] = `
|
|||||||
return comp1({}, key + \`__1\`, node, this, null);
|
return comp1({}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
const b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -867,11 +830,10 @@ exports[`Portal portal's parent's env is not polluted 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button>child</button>\`);
|
let block1 = createBlock(\`<button>child</button>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -881,12 +843,11 @@ exports[`Portal simple catchError with portal 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const comp1 = app.createComponent(\`Boom\`, true, false, false, []);
|
const comp1 = app.createComponent(\`Boom\`, true, false, false, []);
|
||||||
|
|
||||||
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
let block1 = createBlock(\`<div><block-child-0/><block-child-1/></div>\`);
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let b2,b3;
|
let b2,b3;
|
||||||
if (ctx['error']) {
|
if (ctx['error']) {
|
||||||
b2 = text(\`Error\`);
|
b2 = text(\`Error\`);
|
||||||
@@ -902,7 +863,6 @@ exports[`Portal simple catchError with portal 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -914,7 +874,7 @@ exports[`Portal simple catchError with portal 2`] = `
|
|||||||
return block2([txt1]);
|
return block2([txt1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Boom(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -925,7 +885,6 @@ exports[`Portal with target in template (after portal) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -936,7 +895,7 @@ exports[`Portal with target in template (after portal) 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: '#local-target',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: '#local-target',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -947,7 +906,6 @@ exports[`Portal with target in template (before portal) 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -958,7 +916,7 @@ exports[`Portal with target in template (before portal) 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: '#local-target',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: '#local-target',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -969,7 +927,6 @@ exports[`Portal: Props validation target must be a valid selector 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -980,7 +937,7 @@ exports[`Portal: Props validation target must be a valid selector 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: ' ',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: ' ',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -991,7 +948,6 @@ exports[`Portal: Props validation target must be a valid selector 2 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(null, false, true, false, false);
|
const comp1 = app.createComponent(null, false, true, false, false);
|
||||||
|
|
||||||
@@ -1002,7 +958,7 @@ exports[`Portal: Props validation target must be a valid selector 2 1`] = `
|
|||||||
return block2();
|
return block2();
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_999_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp1({target: 'aa',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
const b3 = comp1({target: 'aa',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__1\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -1013,7 +969,6 @@ exports[`Portal: UI/UX focus is kept across re-renders 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_1000\\"
|
|
||||||
const Portal = app.Portal;
|
const Portal = app.Portal;
|
||||||
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
const comp1 = app.createComponent(\`Child\`, true, false, false, [\\"val\\"]);
|
||||||
const comp2 = app.createComponent(null, false, true, false, false);
|
const comp2 = app.createComponent(null, false, true, false, false);
|
||||||
@@ -1024,7 +979,7 @@ exports[`Portal: UI/UX focus is kept across re-renders 1`] = `
|
|||||||
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
return comp1({val: ctx['state'].val}, key + \`__1\`, node, this, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
return function xml_template_1000_Parent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
const b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
const b3 = comp2({target: '#outside',slots: {'default': {__render: slot1.bind(this), __ctx: ctx}}}, key + \`__2\`, node, ctx, Portal);
|
||||||
return block1([], [b3]);
|
return block1([], [b3]);
|
||||||
}
|
}
|
||||||
@@ -1035,11 +990,10 @@ exports[`Portal: UI/UX focus is kept across re-renders 2`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<input id=\\"target-me\\" block-attribute-0=\\"placeholder\\"/>\`);
|
let block1 = createBlock(\`<input id=\\"target-me\\" block-attribute-0=\\"placeholder\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_Child(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let attr1 = ctx['props'].val;
|
let attr1 = ctx['props'].val;
|
||||||
return block1([attr1]);
|
return block1([attr1]);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,11 +4,10 @@ exports[`shadow_dom can bind event handler 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
let block1 = createBlock(\`<button block-handler-0=\\"click\\">Click</button>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let hdlr1 = [ctx['add'], ctx];
|
let hdlr1 = [ctx['add'], ctx];
|
||||||
return block1([hdlr1]);
|
return block1([hdlr1]);
|
||||||
}
|
}
|
||||||
@@ -19,11 +18,10 @@ exports[`shadow_dom can mount app 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"my-div\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"my-div\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
return block1();
|
return block1();
|
||||||
}
|
}
|
||||||
}"
|
}"
|
||||||
@@ -33,11 +31,10 @@ exports[`shadow_dom useRef hook 1`] = `
|
|||||||
"function anonymous(app, bdom, helpers
|
"function anonymous(app, bdom, helpers
|
||||||
) {
|
) {
|
||||||
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
let { text, createBlock, list, multi, html, toggler, comment } = bdom;
|
||||||
// Template name: \\"xml_template_999\\"
|
|
||||||
|
|
||||||
let block1 = createBlock(\`<div class=\\"my-div\\" block-ref=\\"0\\"/>\`);
|
let block1 = createBlock(\`<div class=\\"my-div\\" block-ref=\\"0\\"/>\`);
|
||||||
|
|
||||||
return function xml_template_999_SomeComponent(ctx, node, key = \\"\\") {
|
return function template(ctx, node, key = \\"\\") {
|
||||||
let ref1 = (el) => this.__owl__.setRef((\`refName\`), el);
|
let ref1 = (el) => this.__owl__.setRef((\`refName\`), el);
|
||||||
return block1([ref1]);
|
return block1([ref1]);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user