@odoo/owl 2.8.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compile_templates.mjs +69 -23
- package/dist/owl-devtools.zip +0 -0
- package/dist/owl.cjs.js +72 -26
- package/dist/owl.es.js +72 -26
- package/dist/owl.iife.js +72 -26
- package/dist/owl.iife.min.js +1 -1
- package/dist/types/compiler/parser.d.ts +24 -19
- package/dist/types/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -1175,7 +1175,7 @@ class CodeGenerator {
|
|
|
1175
1175
|
const isNewBlock = !block || forceNewBlock;
|
|
1176
1176
|
let codeIdx = this.target.code.length;
|
|
1177
1177
|
if (isNewBlock) {
|
|
1178
|
-
const n = ast.content.filter((c) => c.
|
|
1178
|
+
const n = ast.content.filter((c) => !c.hasNoRepresentation).length;
|
|
1179
1179
|
let result = null;
|
|
1180
1180
|
if (n <= 1) {
|
|
1181
1181
|
for (let child of ast.content) {
|
|
@@ -1189,15 +1189,15 @@ class CodeGenerator {
|
|
|
1189
1189
|
let index = 0;
|
|
1190
1190
|
for (let i = 0, l = ast.content.length; i < l; i++) {
|
|
1191
1191
|
const child = ast.content[i];
|
|
1192
|
-
const
|
|
1192
|
+
const forceNewBlock = !child.hasNoRepresentation;
|
|
1193
1193
|
const subCtx = createContext(ctx, {
|
|
1194
1194
|
block,
|
|
1195
1195
|
index,
|
|
1196
|
-
forceNewBlock
|
|
1196
|
+
forceNewBlock,
|
|
1197
1197
|
isLast: ctx.isLast && i === l - 1,
|
|
1198
1198
|
});
|
|
1199
1199
|
this.compileAST(child, subCtx);
|
|
1200
|
-
if (
|
|
1200
|
+
if (forceNewBlock) {
|
|
1201
1201
|
index++;
|
|
1202
1202
|
}
|
|
1203
1203
|
}
|
|
@@ -1651,9 +1651,9 @@ function parseNode(node, ctx) {
|
|
|
1651
1651
|
parseTCallBlock(node) ||
|
|
1652
1652
|
parseTTranslation(node, ctx) ||
|
|
1653
1653
|
parseTTranslationContext(node, ctx) ||
|
|
1654
|
+
parseTKey(node, ctx) ||
|
|
1654
1655
|
parseTEscNode(node, ctx) ||
|
|
1655
1656
|
parseTOutNode(node, ctx) ||
|
|
1656
|
-
parseTKey(node, ctx) ||
|
|
1657
1657
|
parseTSlot(node, ctx) ||
|
|
1658
1658
|
parseComponent(node, ctx) ||
|
|
1659
1659
|
parseDOMNode(node, ctx) ||
|
|
@@ -1721,19 +1721,29 @@ function parseTCustom(node, ctx) {
|
|
|
1721
1721
|
function parseTDebugLog(node, ctx) {
|
|
1722
1722
|
if (node.hasAttribute("t-debug")) {
|
|
1723
1723
|
node.removeAttribute("t-debug");
|
|
1724
|
-
|
|
1724
|
+
const content = parseNode(node, ctx);
|
|
1725
|
+
const ast = {
|
|
1725
1726
|
type: 12 /* TDebug */,
|
|
1726
|
-
content
|
|
1727
|
+
content,
|
|
1727
1728
|
};
|
|
1729
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
1730
|
+
ast.hasNoRepresentation = true;
|
|
1731
|
+
}
|
|
1732
|
+
return ast;
|
|
1728
1733
|
}
|
|
1729
1734
|
if (node.hasAttribute("t-log")) {
|
|
1730
1735
|
const expr = node.getAttribute("t-log");
|
|
1731
1736
|
node.removeAttribute("t-log");
|
|
1732
|
-
|
|
1737
|
+
const content = parseNode(node, ctx);
|
|
1738
|
+
const ast = {
|
|
1733
1739
|
type: 13 /* TLog */,
|
|
1734
1740
|
expr,
|
|
1735
|
-
content
|
|
1741
|
+
content,
|
|
1736
1742
|
};
|
|
1743
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
1744
|
+
ast.hasNoRepresentation = true;
|
|
1745
|
+
}
|
|
1746
|
+
return ast;
|
|
1737
1747
|
}
|
|
1738
1748
|
return null;
|
|
1739
1749
|
}
|
|
@@ -1963,11 +1973,19 @@ function parseTKey(node, ctx) {
|
|
|
1963
1973
|
}
|
|
1964
1974
|
const key = node.getAttribute("t-key");
|
|
1965
1975
|
node.removeAttribute("t-key");
|
|
1966
|
-
const
|
|
1967
|
-
if (!
|
|
1976
|
+
const content = parseNode(node, ctx);
|
|
1977
|
+
if (!content) {
|
|
1968
1978
|
return null;
|
|
1969
1979
|
}
|
|
1970
|
-
|
|
1980
|
+
const ast = {
|
|
1981
|
+
type: 10 /* TKey */,
|
|
1982
|
+
expr: key,
|
|
1983
|
+
content,
|
|
1984
|
+
};
|
|
1985
|
+
if (content.hasNoRepresentation) {
|
|
1986
|
+
ast.hasNoRepresentation = true;
|
|
1987
|
+
}
|
|
1988
|
+
return ast;
|
|
1971
1989
|
}
|
|
1972
1990
|
// -----------------------------------------------------------------------------
|
|
1973
1991
|
// t-call
|
|
@@ -2076,7 +2094,7 @@ function parseTSetNode(node, ctx) {
|
|
|
2076
2094
|
if (node.textContent !== node.innerHTML) {
|
|
2077
2095
|
body = parseChildren(node, ctx);
|
|
2078
2096
|
}
|
|
2079
|
-
return { type: 6 /* TSet */, name, value, defaultValue, body };
|
|
2097
|
+
return { type: 6 /* TSet */, name, value, defaultValue, body, hasNoRepresentation: true };
|
|
2080
2098
|
}
|
|
2081
2099
|
// -----------------------------------------------------------------------------
|
|
2082
2100
|
// Components
|
|
@@ -2255,30 +2273,51 @@ function parseTSlot(node, ctx) {
|
|
|
2255
2273
|
// -----------------------------------------------------------------------------
|
|
2256
2274
|
// Translation
|
|
2257
2275
|
// -----------------------------------------------------------------------------
|
|
2276
|
+
function wrapInTTranslationAST(r) {
|
|
2277
|
+
const ast = { type: 16 /* TTranslation */, content: r };
|
|
2278
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
2279
|
+
ast.hasNoRepresentation = true;
|
|
2280
|
+
}
|
|
2281
|
+
return ast;
|
|
2282
|
+
}
|
|
2258
2283
|
function parseTTranslation(node, ctx) {
|
|
2259
2284
|
if (node.getAttribute("t-translation") !== "off") {
|
|
2260
2285
|
return null;
|
|
2261
2286
|
}
|
|
2262
2287
|
node.removeAttribute("t-translation");
|
|
2263
|
-
|
|
2264
|
-
|
|
2265
|
-
content
|
|
2266
|
-
|
|
2288
|
+
const result = parseNode(node, ctx);
|
|
2289
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
2290
|
+
const children = result.content.map(wrapInTTranslationAST);
|
|
2291
|
+
return makeASTMulti(children);
|
|
2292
|
+
}
|
|
2293
|
+
return wrapInTTranslationAST(result);
|
|
2267
2294
|
}
|
|
2268
2295
|
// -----------------------------------------------------------------------------
|
|
2269
2296
|
// Translation Context
|
|
2270
2297
|
// -----------------------------------------------------------------------------
|
|
2298
|
+
function wrapInTTranslationContextAST(r, translationCtx) {
|
|
2299
|
+
const ast = {
|
|
2300
|
+
type: 17 /* TTranslationContext */,
|
|
2301
|
+
content: r,
|
|
2302
|
+
translationCtx,
|
|
2303
|
+
};
|
|
2304
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
2305
|
+
ast.hasNoRepresentation = true;
|
|
2306
|
+
}
|
|
2307
|
+
return ast;
|
|
2308
|
+
}
|
|
2271
2309
|
function parseTTranslationContext(node, ctx) {
|
|
2272
2310
|
const translationCtx = node.getAttribute("t-translation-context");
|
|
2273
2311
|
if (!translationCtx) {
|
|
2274
2312
|
return null;
|
|
2275
2313
|
}
|
|
2276
2314
|
node.removeAttribute("t-translation-context");
|
|
2277
|
-
|
|
2278
|
-
|
|
2279
|
-
content
|
|
2280
|
-
|
|
2281
|
-
}
|
|
2315
|
+
const result = parseNode(node, ctx);
|
|
2316
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
2317
|
+
const children = result.content.map((c) => wrapInTTranslationContextAST(c, translationCtx));
|
|
2318
|
+
return makeASTMulti(children);
|
|
2319
|
+
}
|
|
2320
|
+
return wrapInTTranslationContextAST(result, translationCtx);
|
|
2282
2321
|
}
|
|
2283
2322
|
// -----------------------------------------------------------------------------
|
|
2284
2323
|
// Portal
|
|
@@ -2323,6 +2362,13 @@ function parseChildren(node, ctx) {
|
|
|
2323
2362
|
}
|
|
2324
2363
|
return children;
|
|
2325
2364
|
}
|
|
2365
|
+
function makeASTMulti(children) {
|
|
2366
|
+
const ast = { type: 3 /* Multi */, content: children };
|
|
2367
|
+
if (children.every((c) => c.hasNoRepresentation)) {
|
|
2368
|
+
ast.hasNoRepresentation = true;
|
|
2369
|
+
}
|
|
2370
|
+
return ast;
|
|
2371
|
+
}
|
|
2326
2372
|
/**
|
|
2327
2373
|
* Parse all the child nodes of a given node and return an ast if possible.
|
|
2328
2374
|
* In the case there are multiple children, they are wrapped in a astmulti.
|
|
@@ -2335,7 +2381,7 @@ function parseChildNodes(node, ctx) {
|
|
|
2335
2381
|
case 1:
|
|
2336
2382
|
return children[0];
|
|
2337
2383
|
default:
|
|
2338
|
-
return
|
|
2384
|
+
return makeASTMulti(children);
|
|
2339
2385
|
}
|
|
2340
2386
|
}
|
|
2341
2387
|
/**
|
package/dist/owl-devtools.zip
CHANGED
|
Binary file
|
package/dist/owl.cjs.js
CHANGED
|
@@ -4543,7 +4543,7 @@ class CodeGenerator {
|
|
|
4543
4543
|
const isNewBlock = !block || forceNewBlock;
|
|
4544
4544
|
let codeIdx = this.target.code.length;
|
|
4545
4545
|
if (isNewBlock) {
|
|
4546
|
-
const n = ast.content.filter((c) => c.
|
|
4546
|
+
const n = ast.content.filter((c) => !c.hasNoRepresentation).length;
|
|
4547
4547
|
let result = null;
|
|
4548
4548
|
if (n <= 1) {
|
|
4549
4549
|
for (let child of ast.content) {
|
|
@@ -4557,15 +4557,15 @@ class CodeGenerator {
|
|
|
4557
4557
|
let index = 0;
|
|
4558
4558
|
for (let i = 0, l = ast.content.length; i < l; i++) {
|
|
4559
4559
|
const child = ast.content[i];
|
|
4560
|
-
const
|
|
4560
|
+
const forceNewBlock = !child.hasNoRepresentation;
|
|
4561
4561
|
const subCtx = createContext(ctx, {
|
|
4562
4562
|
block,
|
|
4563
4563
|
index,
|
|
4564
|
-
forceNewBlock
|
|
4564
|
+
forceNewBlock,
|
|
4565
4565
|
isLast: ctx.isLast && i === l - 1,
|
|
4566
4566
|
});
|
|
4567
4567
|
this.compileAST(child, subCtx);
|
|
4568
|
-
if (
|
|
4568
|
+
if (forceNewBlock) {
|
|
4569
4569
|
index++;
|
|
4570
4570
|
}
|
|
4571
4571
|
}
|
|
@@ -4983,9 +4983,9 @@ function parseNode(node, ctx) {
|
|
|
4983
4983
|
parseTCallBlock(node) ||
|
|
4984
4984
|
parseTTranslation(node, ctx) ||
|
|
4985
4985
|
parseTTranslationContext(node, ctx) ||
|
|
4986
|
+
parseTKey(node, ctx) ||
|
|
4986
4987
|
parseTEscNode(node, ctx) ||
|
|
4987
4988
|
parseTOutNode(node, ctx) ||
|
|
4988
|
-
parseTKey(node, ctx) ||
|
|
4989
4989
|
parseTSlot(node, ctx) ||
|
|
4990
4990
|
parseComponent(node, ctx) ||
|
|
4991
4991
|
parseDOMNode(node, ctx) ||
|
|
@@ -5053,19 +5053,29 @@ function parseTCustom(node, ctx) {
|
|
|
5053
5053
|
function parseTDebugLog(node, ctx) {
|
|
5054
5054
|
if (node.hasAttribute("t-debug")) {
|
|
5055
5055
|
node.removeAttribute("t-debug");
|
|
5056
|
-
|
|
5056
|
+
const content = parseNode(node, ctx);
|
|
5057
|
+
const ast = {
|
|
5057
5058
|
type: 12 /* TDebug */,
|
|
5058
|
-
content
|
|
5059
|
+
content,
|
|
5059
5060
|
};
|
|
5061
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
5062
|
+
ast.hasNoRepresentation = true;
|
|
5063
|
+
}
|
|
5064
|
+
return ast;
|
|
5060
5065
|
}
|
|
5061
5066
|
if (node.hasAttribute("t-log")) {
|
|
5062
5067
|
const expr = node.getAttribute("t-log");
|
|
5063
5068
|
node.removeAttribute("t-log");
|
|
5064
|
-
|
|
5069
|
+
const content = parseNode(node, ctx);
|
|
5070
|
+
const ast = {
|
|
5065
5071
|
type: 13 /* TLog */,
|
|
5066
5072
|
expr,
|
|
5067
|
-
content
|
|
5073
|
+
content,
|
|
5068
5074
|
};
|
|
5075
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
5076
|
+
ast.hasNoRepresentation = true;
|
|
5077
|
+
}
|
|
5078
|
+
return ast;
|
|
5069
5079
|
}
|
|
5070
5080
|
return null;
|
|
5071
5081
|
}
|
|
@@ -5295,11 +5305,19 @@ function parseTKey(node, ctx) {
|
|
|
5295
5305
|
}
|
|
5296
5306
|
const key = node.getAttribute("t-key");
|
|
5297
5307
|
node.removeAttribute("t-key");
|
|
5298
|
-
const
|
|
5299
|
-
if (!
|
|
5308
|
+
const content = parseNode(node, ctx);
|
|
5309
|
+
if (!content) {
|
|
5300
5310
|
return null;
|
|
5301
5311
|
}
|
|
5302
|
-
|
|
5312
|
+
const ast = {
|
|
5313
|
+
type: 10 /* TKey */,
|
|
5314
|
+
expr: key,
|
|
5315
|
+
content,
|
|
5316
|
+
};
|
|
5317
|
+
if (content.hasNoRepresentation) {
|
|
5318
|
+
ast.hasNoRepresentation = true;
|
|
5319
|
+
}
|
|
5320
|
+
return ast;
|
|
5303
5321
|
}
|
|
5304
5322
|
// -----------------------------------------------------------------------------
|
|
5305
5323
|
// t-call
|
|
@@ -5408,7 +5426,7 @@ function parseTSetNode(node, ctx) {
|
|
|
5408
5426
|
if (node.textContent !== node.innerHTML) {
|
|
5409
5427
|
body = parseChildren(node, ctx);
|
|
5410
5428
|
}
|
|
5411
|
-
return { type: 6 /* TSet */, name, value, defaultValue, body };
|
|
5429
|
+
return { type: 6 /* TSet */, name, value, defaultValue, body, hasNoRepresentation: true };
|
|
5412
5430
|
}
|
|
5413
5431
|
// -----------------------------------------------------------------------------
|
|
5414
5432
|
// Components
|
|
@@ -5587,30 +5605,51 @@ function parseTSlot(node, ctx) {
|
|
|
5587
5605
|
// -----------------------------------------------------------------------------
|
|
5588
5606
|
// Translation
|
|
5589
5607
|
// -----------------------------------------------------------------------------
|
|
5608
|
+
function wrapInTTranslationAST(r) {
|
|
5609
|
+
const ast = { type: 16 /* TTranslation */, content: r };
|
|
5610
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
5611
|
+
ast.hasNoRepresentation = true;
|
|
5612
|
+
}
|
|
5613
|
+
return ast;
|
|
5614
|
+
}
|
|
5590
5615
|
function parseTTranslation(node, ctx) {
|
|
5591
5616
|
if (node.getAttribute("t-translation") !== "off") {
|
|
5592
5617
|
return null;
|
|
5593
5618
|
}
|
|
5594
5619
|
node.removeAttribute("t-translation");
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
content
|
|
5598
|
-
|
|
5620
|
+
const result = parseNode(node, ctx);
|
|
5621
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
5622
|
+
const children = result.content.map(wrapInTTranslationAST);
|
|
5623
|
+
return makeASTMulti(children);
|
|
5624
|
+
}
|
|
5625
|
+
return wrapInTTranslationAST(result);
|
|
5599
5626
|
}
|
|
5600
5627
|
// -----------------------------------------------------------------------------
|
|
5601
5628
|
// Translation Context
|
|
5602
5629
|
// -----------------------------------------------------------------------------
|
|
5630
|
+
function wrapInTTranslationContextAST(r, translationCtx) {
|
|
5631
|
+
const ast = {
|
|
5632
|
+
type: 17 /* TTranslationContext */,
|
|
5633
|
+
content: r,
|
|
5634
|
+
translationCtx,
|
|
5635
|
+
};
|
|
5636
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
5637
|
+
ast.hasNoRepresentation = true;
|
|
5638
|
+
}
|
|
5639
|
+
return ast;
|
|
5640
|
+
}
|
|
5603
5641
|
function parseTTranslationContext(node, ctx) {
|
|
5604
5642
|
const translationCtx = node.getAttribute("t-translation-context");
|
|
5605
5643
|
if (!translationCtx) {
|
|
5606
5644
|
return null;
|
|
5607
5645
|
}
|
|
5608
5646
|
node.removeAttribute("t-translation-context");
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
content
|
|
5612
|
-
|
|
5613
|
-
}
|
|
5647
|
+
const result = parseNode(node, ctx);
|
|
5648
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
5649
|
+
const children = result.content.map((c) => wrapInTTranslationContextAST(c, translationCtx));
|
|
5650
|
+
return makeASTMulti(children);
|
|
5651
|
+
}
|
|
5652
|
+
return wrapInTTranslationContextAST(result, translationCtx);
|
|
5614
5653
|
}
|
|
5615
5654
|
// -----------------------------------------------------------------------------
|
|
5616
5655
|
// Portal
|
|
@@ -5655,6 +5694,13 @@ function parseChildren(node, ctx) {
|
|
|
5655
5694
|
}
|
|
5656
5695
|
return children;
|
|
5657
5696
|
}
|
|
5697
|
+
function makeASTMulti(children) {
|
|
5698
|
+
const ast = { type: 3 /* Multi */, content: children };
|
|
5699
|
+
if (children.every((c) => c.hasNoRepresentation)) {
|
|
5700
|
+
ast.hasNoRepresentation = true;
|
|
5701
|
+
}
|
|
5702
|
+
return ast;
|
|
5703
|
+
}
|
|
5658
5704
|
/**
|
|
5659
5705
|
* Parse all the child nodes of a given node and return an ast if possible.
|
|
5660
5706
|
* In the case there are multiple children, they are wrapped in a astmulti.
|
|
@@ -5667,7 +5713,7 @@ function parseChildNodes(node, ctx) {
|
|
|
5667
5713
|
case 1:
|
|
5668
5714
|
return children[0];
|
|
5669
5715
|
default:
|
|
5670
|
-
return
|
|
5716
|
+
return makeASTMulti(children);
|
|
5671
5717
|
}
|
|
5672
5718
|
}
|
|
5673
5719
|
/**
|
|
@@ -5771,7 +5817,7 @@ function compile(template, options = {
|
|
|
5771
5817
|
}
|
|
5772
5818
|
|
|
5773
5819
|
// do not modify manually. This file is generated by the release script.
|
|
5774
|
-
const version = "2.8.
|
|
5820
|
+
const version = "2.8.1";
|
|
5775
5821
|
|
|
5776
5822
|
// -----------------------------------------------------------------------------
|
|
5777
5823
|
// Scheduler
|
|
@@ -6278,6 +6324,6 @@ exports.whenReady = whenReady;
|
|
|
6278
6324
|
exports.xml = xml;
|
|
6279
6325
|
|
|
6280
6326
|
|
|
6281
|
-
__info__.date = '2025-
|
|
6282
|
-
__info__.hash = '
|
|
6327
|
+
__info__.date = '2025-09-23T07:17:45.055Z';
|
|
6328
|
+
__info__.hash = '5211116';
|
|
6283
6329
|
__info__.url = 'https://github.com/odoo/owl';
|
package/dist/owl.es.js
CHANGED
|
@@ -4539,7 +4539,7 @@ class CodeGenerator {
|
|
|
4539
4539
|
const isNewBlock = !block || forceNewBlock;
|
|
4540
4540
|
let codeIdx = this.target.code.length;
|
|
4541
4541
|
if (isNewBlock) {
|
|
4542
|
-
const n = ast.content.filter((c) => c.
|
|
4542
|
+
const n = ast.content.filter((c) => !c.hasNoRepresentation).length;
|
|
4543
4543
|
let result = null;
|
|
4544
4544
|
if (n <= 1) {
|
|
4545
4545
|
for (let child of ast.content) {
|
|
@@ -4553,15 +4553,15 @@ class CodeGenerator {
|
|
|
4553
4553
|
let index = 0;
|
|
4554
4554
|
for (let i = 0, l = ast.content.length; i < l; i++) {
|
|
4555
4555
|
const child = ast.content[i];
|
|
4556
|
-
const
|
|
4556
|
+
const forceNewBlock = !child.hasNoRepresentation;
|
|
4557
4557
|
const subCtx = createContext(ctx, {
|
|
4558
4558
|
block,
|
|
4559
4559
|
index,
|
|
4560
|
-
forceNewBlock
|
|
4560
|
+
forceNewBlock,
|
|
4561
4561
|
isLast: ctx.isLast && i === l - 1,
|
|
4562
4562
|
});
|
|
4563
4563
|
this.compileAST(child, subCtx);
|
|
4564
|
-
if (
|
|
4564
|
+
if (forceNewBlock) {
|
|
4565
4565
|
index++;
|
|
4566
4566
|
}
|
|
4567
4567
|
}
|
|
@@ -4979,9 +4979,9 @@ function parseNode(node, ctx) {
|
|
|
4979
4979
|
parseTCallBlock(node) ||
|
|
4980
4980
|
parseTTranslation(node, ctx) ||
|
|
4981
4981
|
parseTTranslationContext(node, ctx) ||
|
|
4982
|
+
parseTKey(node, ctx) ||
|
|
4982
4983
|
parseTEscNode(node, ctx) ||
|
|
4983
4984
|
parseTOutNode(node, ctx) ||
|
|
4984
|
-
parseTKey(node, ctx) ||
|
|
4985
4985
|
parseTSlot(node, ctx) ||
|
|
4986
4986
|
parseComponent(node, ctx) ||
|
|
4987
4987
|
parseDOMNode(node, ctx) ||
|
|
@@ -5049,19 +5049,29 @@ function parseTCustom(node, ctx) {
|
|
|
5049
5049
|
function parseTDebugLog(node, ctx) {
|
|
5050
5050
|
if (node.hasAttribute("t-debug")) {
|
|
5051
5051
|
node.removeAttribute("t-debug");
|
|
5052
|
-
|
|
5052
|
+
const content = parseNode(node, ctx);
|
|
5053
|
+
const ast = {
|
|
5053
5054
|
type: 12 /* TDebug */,
|
|
5054
|
-
content
|
|
5055
|
+
content,
|
|
5055
5056
|
};
|
|
5057
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
5058
|
+
ast.hasNoRepresentation = true;
|
|
5059
|
+
}
|
|
5060
|
+
return ast;
|
|
5056
5061
|
}
|
|
5057
5062
|
if (node.hasAttribute("t-log")) {
|
|
5058
5063
|
const expr = node.getAttribute("t-log");
|
|
5059
5064
|
node.removeAttribute("t-log");
|
|
5060
|
-
|
|
5065
|
+
const content = parseNode(node, ctx);
|
|
5066
|
+
const ast = {
|
|
5061
5067
|
type: 13 /* TLog */,
|
|
5062
5068
|
expr,
|
|
5063
|
-
content
|
|
5069
|
+
content,
|
|
5064
5070
|
};
|
|
5071
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
5072
|
+
ast.hasNoRepresentation = true;
|
|
5073
|
+
}
|
|
5074
|
+
return ast;
|
|
5065
5075
|
}
|
|
5066
5076
|
return null;
|
|
5067
5077
|
}
|
|
@@ -5291,11 +5301,19 @@ function parseTKey(node, ctx) {
|
|
|
5291
5301
|
}
|
|
5292
5302
|
const key = node.getAttribute("t-key");
|
|
5293
5303
|
node.removeAttribute("t-key");
|
|
5294
|
-
const
|
|
5295
|
-
if (!
|
|
5304
|
+
const content = parseNode(node, ctx);
|
|
5305
|
+
if (!content) {
|
|
5296
5306
|
return null;
|
|
5297
5307
|
}
|
|
5298
|
-
|
|
5308
|
+
const ast = {
|
|
5309
|
+
type: 10 /* TKey */,
|
|
5310
|
+
expr: key,
|
|
5311
|
+
content,
|
|
5312
|
+
};
|
|
5313
|
+
if (content.hasNoRepresentation) {
|
|
5314
|
+
ast.hasNoRepresentation = true;
|
|
5315
|
+
}
|
|
5316
|
+
return ast;
|
|
5299
5317
|
}
|
|
5300
5318
|
// -----------------------------------------------------------------------------
|
|
5301
5319
|
// t-call
|
|
@@ -5404,7 +5422,7 @@ function parseTSetNode(node, ctx) {
|
|
|
5404
5422
|
if (node.textContent !== node.innerHTML) {
|
|
5405
5423
|
body = parseChildren(node, ctx);
|
|
5406
5424
|
}
|
|
5407
|
-
return { type: 6 /* TSet */, name, value, defaultValue, body };
|
|
5425
|
+
return { type: 6 /* TSet */, name, value, defaultValue, body, hasNoRepresentation: true };
|
|
5408
5426
|
}
|
|
5409
5427
|
// -----------------------------------------------------------------------------
|
|
5410
5428
|
// Components
|
|
@@ -5583,30 +5601,51 @@ function parseTSlot(node, ctx) {
|
|
|
5583
5601
|
// -----------------------------------------------------------------------------
|
|
5584
5602
|
// Translation
|
|
5585
5603
|
// -----------------------------------------------------------------------------
|
|
5604
|
+
function wrapInTTranslationAST(r) {
|
|
5605
|
+
const ast = { type: 16 /* TTranslation */, content: r };
|
|
5606
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
5607
|
+
ast.hasNoRepresentation = true;
|
|
5608
|
+
}
|
|
5609
|
+
return ast;
|
|
5610
|
+
}
|
|
5586
5611
|
function parseTTranslation(node, ctx) {
|
|
5587
5612
|
if (node.getAttribute("t-translation") !== "off") {
|
|
5588
5613
|
return null;
|
|
5589
5614
|
}
|
|
5590
5615
|
node.removeAttribute("t-translation");
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
content
|
|
5594
|
-
|
|
5616
|
+
const result = parseNode(node, ctx);
|
|
5617
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
5618
|
+
const children = result.content.map(wrapInTTranslationAST);
|
|
5619
|
+
return makeASTMulti(children);
|
|
5620
|
+
}
|
|
5621
|
+
return wrapInTTranslationAST(result);
|
|
5595
5622
|
}
|
|
5596
5623
|
// -----------------------------------------------------------------------------
|
|
5597
5624
|
// Translation Context
|
|
5598
5625
|
// -----------------------------------------------------------------------------
|
|
5626
|
+
function wrapInTTranslationContextAST(r, translationCtx) {
|
|
5627
|
+
const ast = {
|
|
5628
|
+
type: 17 /* TTranslationContext */,
|
|
5629
|
+
content: r,
|
|
5630
|
+
translationCtx,
|
|
5631
|
+
};
|
|
5632
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
5633
|
+
ast.hasNoRepresentation = true;
|
|
5634
|
+
}
|
|
5635
|
+
return ast;
|
|
5636
|
+
}
|
|
5599
5637
|
function parseTTranslationContext(node, ctx) {
|
|
5600
5638
|
const translationCtx = node.getAttribute("t-translation-context");
|
|
5601
5639
|
if (!translationCtx) {
|
|
5602
5640
|
return null;
|
|
5603
5641
|
}
|
|
5604
5642
|
node.removeAttribute("t-translation-context");
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
content
|
|
5608
|
-
|
|
5609
|
-
}
|
|
5643
|
+
const result = parseNode(node, ctx);
|
|
5644
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
5645
|
+
const children = result.content.map((c) => wrapInTTranslationContextAST(c, translationCtx));
|
|
5646
|
+
return makeASTMulti(children);
|
|
5647
|
+
}
|
|
5648
|
+
return wrapInTTranslationContextAST(result, translationCtx);
|
|
5610
5649
|
}
|
|
5611
5650
|
// -----------------------------------------------------------------------------
|
|
5612
5651
|
// Portal
|
|
@@ -5651,6 +5690,13 @@ function parseChildren(node, ctx) {
|
|
|
5651
5690
|
}
|
|
5652
5691
|
return children;
|
|
5653
5692
|
}
|
|
5693
|
+
function makeASTMulti(children) {
|
|
5694
|
+
const ast = { type: 3 /* Multi */, content: children };
|
|
5695
|
+
if (children.every((c) => c.hasNoRepresentation)) {
|
|
5696
|
+
ast.hasNoRepresentation = true;
|
|
5697
|
+
}
|
|
5698
|
+
return ast;
|
|
5699
|
+
}
|
|
5654
5700
|
/**
|
|
5655
5701
|
* Parse all the child nodes of a given node and return an ast if possible.
|
|
5656
5702
|
* In the case there are multiple children, they are wrapped in a astmulti.
|
|
@@ -5663,7 +5709,7 @@ function parseChildNodes(node, ctx) {
|
|
|
5663
5709
|
case 1:
|
|
5664
5710
|
return children[0];
|
|
5665
5711
|
default:
|
|
5666
|
-
return
|
|
5712
|
+
return makeASTMulti(children);
|
|
5667
5713
|
}
|
|
5668
5714
|
}
|
|
5669
5715
|
/**
|
|
@@ -5767,7 +5813,7 @@ function compile(template, options = {
|
|
|
5767
5813
|
}
|
|
5768
5814
|
|
|
5769
5815
|
// do not modify manually. This file is generated by the release script.
|
|
5770
|
-
const version = "2.8.
|
|
5816
|
+
const version = "2.8.1";
|
|
5771
5817
|
|
|
5772
5818
|
// -----------------------------------------------------------------------------
|
|
5773
5819
|
// Scheduler
|
|
@@ -6238,6 +6284,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat
|
|
|
6238
6284
|
export { App, Component, EventBus, OwlError, __info__, batched, blockDom, htmlEscape, loadFile, markRaw, markup, mount, onError, onMounted, onPatched, onRendered, onWillDestroy, onWillPatch, onWillRender, onWillStart, onWillUnmount, onWillUpdateProps, reactive, status, toRaw, useChildSubEnv, useComponent, useEffect, useEnv, useExternalListener, useRef, useState, useSubEnv, validate, validateType, whenReady, xml };
|
|
6239
6285
|
|
|
6240
6286
|
|
|
6241
|
-
__info__.date = '2025-
|
|
6242
|
-
__info__.hash = '
|
|
6287
|
+
__info__.date = '2025-09-23T07:17:45.055Z';
|
|
6288
|
+
__info__.hash = '5211116';
|
|
6243
6289
|
__info__.url = 'https://github.com/odoo/owl';
|