@odoo/owl 2.8.0 → 2.8.2
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 +83 -30
- package/dist/owl.es.js +83 -30
- package/dist/owl.iife.js +83 -30
- 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
package/dist/owl.es.js
CHANGED
|
@@ -681,7 +681,7 @@ const characterDataProto = CharacterData.prototype;
|
|
|
681
681
|
const characterDataSetData = getDescriptor$1(characterDataProto, "data").set;
|
|
682
682
|
const nodeGetFirstChild = getDescriptor$1(nodeProto$2, "firstChild").get;
|
|
683
683
|
const nodeGetNextSibling = getDescriptor$1(nodeProto$2, "nextSibling").get;
|
|
684
|
-
const NO_OP = () => { };
|
|
684
|
+
const NO_OP$1 = () => { };
|
|
685
685
|
function makePropSetter(name) {
|
|
686
686
|
return function setProp(value) {
|
|
687
687
|
// support 0, fallback to empty string for other falsy values
|
|
@@ -1011,7 +1011,7 @@ function updateCtx(ctx, tree) {
|
|
|
1011
1011
|
idx: info.idx,
|
|
1012
1012
|
refIdx: info.refIdx,
|
|
1013
1013
|
setData: makeRefSetter(index, ctx.refList),
|
|
1014
|
-
updateData: NO_OP,
|
|
1014
|
+
updateData: NO_OP$1,
|
|
1015
1015
|
});
|
|
1016
1016
|
}
|
|
1017
1017
|
}
|
|
@@ -1637,6 +1637,7 @@ function handleError(params) {
|
|
|
1637
1637
|
let current = fiber;
|
|
1638
1638
|
do {
|
|
1639
1639
|
current.node.fiber = current;
|
|
1640
|
+
fibersInError.set(current, error);
|
|
1640
1641
|
current = current.parent;
|
|
1641
1642
|
} while (current);
|
|
1642
1643
|
fibersInError.set(fiber.root, error);
|
|
@@ -2383,13 +2384,19 @@ function useState(state) {
|
|
|
2383
2384
|
const node = getCurrent();
|
|
2384
2385
|
let render = batchedRenderFunctions.get(node);
|
|
2385
2386
|
if (!render) {
|
|
2386
|
-
|
|
2387
|
+
const wrapper = { fn: batched(node.render.bind(node, false)) };
|
|
2388
|
+
render = (...args) => wrapper.fn(...args);
|
|
2387
2389
|
batchedRenderFunctions.set(node, render);
|
|
2388
2390
|
// manual implementation of onWillDestroy to break cyclic dependency
|
|
2389
|
-
node.willDestroy.push(
|
|
2391
|
+
node.willDestroy.push(cleanupRenderAndReactives.bind(null, wrapper, render));
|
|
2390
2392
|
}
|
|
2391
2393
|
return reactive(state, render);
|
|
2392
2394
|
}
|
|
2395
|
+
const NO_OP = () => { };
|
|
2396
|
+
function cleanupRenderAndReactives(wrapper, render) {
|
|
2397
|
+
wrapper.fn = NO_OP;
|
|
2398
|
+
clearReactivesForCallback(render);
|
|
2399
|
+
}
|
|
2393
2400
|
class ComponentNode {
|
|
2394
2401
|
constructor(C, props, app, parent, parentKey) {
|
|
2395
2402
|
this.fiber = null;
|
|
@@ -4539,7 +4546,7 @@ class CodeGenerator {
|
|
|
4539
4546
|
const isNewBlock = !block || forceNewBlock;
|
|
4540
4547
|
let codeIdx = this.target.code.length;
|
|
4541
4548
|
if (isNewBlock) {
|
|
4542
|
-
const n = ast.content.filter((c) => c.
|
|
4549
|
+
const n = ast.content.filter((c) => !c.hasNoRepresentation).length;
|
|
4543
4550
|
let result = null;
|
|
4544
4551
|
if (n <= 1) {
|
|
4545
4552
|
for (let child of ast.content) {
|
|
@@ -4553,15 +4560,15 @@ class CodeGenerator {
|
|
|
4553
4560
|
let index = 0;
|
|
4554
4561
|
for (let i = 0, l = ast.content.length; i < l; i++) {
|
|
4555
4562
|
const child = ast.content[i];
|
|
4556
|
-
const
|
|
4563
|
+
const forceNewBlock = !child.hasNoRepresentation;
|
|
4557
4564
|
const subCtx = createContext(ctx, {
|
|
4558
4565
|
block,
|
|
4559
4566
|
index,
|
|
4560
|
-
forceNewBlock
|
|
4567
|
+
forceNewBlock,
|
|
4561
4568
|
isLast: ctx.isLast && i === l - 1,
|
|
4562
4569
|
});
|
|
4563
4570
|
this.compileAST(child, subCtx);
|
|
4564
|
-
if (
|
|
4571
|
+
if (forceNewBlock) {
|
|
4565
4572
|
index++;
|
|
4566
4573
|
}
|
|
4567
4574
|
}
|
|
@@ -4979,9 +4986,9 @@ function parseNode(node, ctx) {
|
|
|
4979
4986
|
parseTCallBlock(node) ||
|
|
4980
4987
|
parseTTranslation(node, ctx) ||
|
|
4981
4988
|
parseTTranslationContext(node, ctx) ||
|
|
4989
|
+
parseTKey(node, ctx) ||
|
|
4982
4990
|
parseTEscNode(node, ctx) ||
|
|
4983
4991
|
parseTOutNode(node, ctx) ||
|
|
4984
|
-
parseTKey(node, ctx) ||
|
|
4985
4992
|
parseTSlot(node, ctx) ||
|
|
4986
4993
|
parseComponent(node, ctx) ||
|
|
4987
4994
|
parseDOMNode(node, ctx) ||
|
|
@@ -5049,19 +5056,29 @@ function parseTCustom(node, ctx) {
|
|
|
5049
5056
|
function parseTDebugLog(node, ctx) {
|
|
5050
5057
|
if (node.hasAttribute("t-debug")) {
|
|
5051
5058
|
node.removeAttribute("t-debug");
|
|
5052
|
-
|
|
5059
|
+
const content = parseNode(node, ctx);
|
|
5060
|
+
const ast = {
|
|
5053
5061
|
type: 12 /* TDebug */,
|
|
5054
|
-
content
|
|
5062
|
+
content,
|
|
5055
5063
|
};
|
|
5064
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
5065
|
+
ast.hasNoRepresentation = true;
|
|
5066
|
+
}
|
|
5067
|
+
return ast;
|
|
5056
5068
|
}
|
|
5057
5069
|
if (node.hasAttribute("t-log")) {
|
|
5058
5070
|
const expr = node.getAttribute("t-log");
|
|
5059
5071
|
node.removeAttribute("t-log");
|
|
5060
|
-
|
|
5072
|
+
const content = parseNode(node, ctx);
|
|
5073
|
+
const ast = {
|
|
5061
5074
|
type: 13 /* TLog */,
|
|
5062
5075
|
expr,
|
|
5063
|
-
content
|
|
5076
|
+
content,
|
|
5064
5077
|
};
|
|
5078
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
5079
|
+
ast.hasNoRepresentation = true;
|
|
5080
|
+
}
|
|
5081
|
+
return ast;
|
|
5065
5082
|
}
|
|
5066
5083
|
return null;
|
|
5067
5084
|
}
|
|
@@ -5291,11 +5308,19 @@ function parseTKey(node, ctx) {
|
|
|
5291
5308
|
}
|
|
5292
5309
|
const key = node.getAttribute("t-key");
|
|
5293
5310
|
node.removeAttribute("t-key");
|
|
5294
|
-
const
|
|
5295
|
-
if (!
|
|
5311
|
+
const content = parseNode(node, ctx);
|
|
5312
|
+
if (!content) {
|
|
5296
5313
|
return null;
|
|
5297
5314
|
}
|
|
5298
|
-
|
|
5315
|
+
const ast = {
|
|
5316
|
+
type: 10 /* TKey */,
|
|
5317
|
+
expr: key,
|
|
5318
|
+
content,
|
|
5319
|
+
};
|
|
5320
|
+
if (content.hasNoRepresentation) {
|
|
5321
|
+
ast.hasNoRepresentation = true;
|
|
5322
|
+
}
|
|
5323
|
+
return ast;
|
|
5299
5324
|
}
|
|
5300
5325
|
// -----------------------------------------------------------------------------
|
|
5301
5326
|
// t-call
|
|
@@ -5404,7 +5429,7 @@ function parseTSetNode(node, ctx) {
|
|
|
5404
5429
|
if (node.textContent !== node.innerHTML) {
|
|
5405
5430
|
body = parseChildren(node, ctx);
|
|
5406
5431
|
}
|
|
5407
|
-
return { type: 6 /* TSet */, name, value, defaultValue, body };
|
|
5432
|
+
return { type: 6 /* TSet */, name, value, defaultValue, body, hasNoRepresentation: true };
|
|
5408
5433
|
}
|
|
5409
5434
|
// -----------------------------------------------------------------------------
|
|
5410
5435
|
// Components
|
|
@@ -5583,30 +5608,51 @@ function parseTSlot(node, ctx) {
|
|
|
5583
5608
|
// -----------------------------------------------------------------------------
|
|
5584
5609
|
// Translation
|
|
5585
5610
|
// -----------------------------------------------------------------------------
|
|
5611
|
+
function wrapInTTranslationAST(r) {
|
|
5612
|
+
const ast = { type: 16 /* TTranslation */, content: r };
|
|
5613
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
5614
|
+
ast.hasNoRepresentation = true;
|
|
5615
|
+
}
|
|
5616
|
+
return ast;
|
|
5617
|
+
}
|
|
5586
5618
|
function parseTTranslation(node, ctx) {
|
|
5587
5619
|
if (node.getAttribute("t-translation") !== "off") {
|
|
5588
5620
|
return null;
|
|
5589
5621
|
}
|
|
5590
5622
|
node.removeAttribute("t-translation");
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
content
|
|
5594
|
-
|
|
5623
|
+
const result = parseNode(node, ctx);
|
|
5624
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
5625
|
+
const children = result.content.map(wrapInTTranslationAST);
|
|
5626
|
+
return makeASTMulti(children);
|
|
5627
|
+
}
|
|
5628
|
+
return wrapInTTranslationAST(result);
|
|
5595
5629
|
}
|
|
5596
5630
|
// -----------------------------------------------------------------------------
|
|
5597
5631
|
// Translation Context
|
|
5598
5632
|
// -----------------------------------------------------------------------------
|
|
5633
|
+
function wrapInTTranslationContextAST(r, translationCtx) {
|
|
5634
|
+
const ast = {
|
|
5635
|
+
type: 17 /* TTranslationContext */,
|
|
5636
|
+
content: r,
|
|
5637
|
+
translationCtx,
|
|
5638
|
+
};
|
|
5639
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
5640
|
+
ast.hasNoRepresentation = true;
|
|
5641
|
+
}
|
|
5642
|
+
return ast;
|
|
5643
|
+
}
|
|
5599
5644
|
function parseTTranslationContext(node, ctx) {
|
|
5600
5645
|
const translationCtx = node.getAttribute("t-translation-context");
|
|
5601
5646
|
if (!translationCtx) {
|
|
5602
5647
|
return null;
|
|
5603
5648
|
}
|
|
5604
5649
|
node.removeAttribute("t-translation-context");
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
content
|
|
5608
|
-
|
|
5609
|
-
}
|
|
5650
|
+
const result = parseNode(node, ctx);
|
|
5651
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
5652
|
+
const children = result.content.map((c) => wrapInTTranslationContextAST(c, translationCtx));
|
|
5653
|
+
return makeASTMulti(children);
|
|
5654
|
+
}
|
|
5655
|
+
return wrapInTTranslationContextAST(result, translationCtx);
|
|
5610
5656
|
}
|
|
5611
5657
|
// -----------------------------------------------------------------------------
|
|
5612
5658
|
// Portal
|
|
@@ -5651,6 +5697,13 @@ function parseChildren(node, ctx) {
|
|
|
5651
5697
|
}
|
|
5652
5698
|
return children;
|
|
5653
5699
|
}
|
|
5700
|
+
function makeASTMulti(children) {
|
|
5701
|
+
const ast = { type: 3 /* Multi */, content: children };
|
|
5702
|
+
if (children.every((c) => c.hasNoRepresentation)) {
|
|
5703
|
+
ast.hasNoRepresentation = true;
|
|
5704
|
+
}
|
|
5705
|
+
return ast;
|
|
5706
|
+
}
|
|
5654
5707
|
/**
|
|
5655
5708
|
* Parse all the child nodes of a given node and return an ast if possible.
|
|
5656
5709
|
* In the case there are multiple children, they are wrapped in a astmulti.
|
|
@@ -5663,7 +5716,7 @@ function parseChildNodes(node, ctx) {
|
|
|
5663
5716
|
case 1:
|
|
5664
5717
|
return children[0];
|
|
5665
5718
|
default:
|
|
5666
|
-
return
|
|
5719
|
+
return makeASTMulti(children);
|
|
5667
5720
|
}
|
|
5668
5721
|
}
|
|
5669
5722
|
/**
|
|
@@ -5767,7 +5820,7 @@ function compile(template, options = {
|
|
|
5767
5820
|
}
|
|
5768
5821
|
|
|
5769
5822
|
// do not modify manually. This file is generated by the release script.
|
|
5770
|
-
const version = "2.8.
|
|
5823
|
+
const version = "2.8.2";
|
|
5771
5824
|
|
|
5772
5825
|
// -----------------------------------------------------------------------------
|
|
5773
5826
|
// Scheduler
|
|
@@ -6238,6 +6291,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat
|
|
|
6238
6291
|
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
6292
|
|
|
6240
6293
|
|
|
6241
|
-
__info__.date = '
|
|
6242
|
-
__info__.hash = '
|
|
6294
|
+
__info__.date = '2026-01-30T07:49:47.618Z';
|
|
6295
|
+
__info__.hash = '52abf8d';
|
|
6243
6296
|
__info__.url = 'https://github.com/odoo/owl';
|
package/dist/owl.iife.js
CHANGED
|
@@ -684,7 +684,7 @@
|
|
|
684
684
|
const characterDataSetData = getDescriptor$1(characterDataProto, "data").set;
|
|
685
685
|
const nodeGetFirstChild = getDescriptor$1(nodeProto$2, "firstChild").get;
|
|
686
686
|
const nodeGetNextSibling = getDescriptor$1(nodeProto$2, "nextSibling").get;
|
|
687
|
-
const NO_OP = () => { };
|
|
687
|
+
const NO_OP$1 = () => { };
|
|
688
688
|
function makePropSetter(name) {
|
|
689
689
|
return function setProp(value) {
|
|
690
690
|
// support 0, fallback to empty string for other falsy values
|
|
@@ -1014,7 +1014,7 @@
|
|
|
1014
1014
|
idx: info.idx,
|
|
1015
1015
|
refIdx: info.refIdx,
|
|
1016
1016
|
setData: makeRefSetter(index, ctx.refList),
|
|
1017
|
-
updateData: NO_OP,
|
|
1017
|
+
updateData: NO_OP$1,
|
|
1018
1018
|
});
|
|
1019
1019
|
}
|
|
1020
1020
|
}
|
|
@@ -1640,6 +1640,7 @@
|
|
|
1640
1640
|
let current = fiber;
|
|
1641
1641
|
do {
|
|
1642
1642
|
current.node.fiber = current;
|
|
1643
|
+
fibersInError.set(current, error);
|
|
1643
1644
|
current = current.parent;
|
|
1644
1645
|
} while (current);
|
|
1645
1646
|
fibersInError.set(fiber.root, error);
|
|
@@ -2386,13 +2387,19 @@
|
|
|
2386
2387
|
const node = getCurrent();
|
|
2387
2388
|
let render = batchedRenderFunctions.get(node);
|
|
2388
2389
|
if (!render) {
|
|
2389
|
-
|
|
2390
|
+
const wrapper = { fn: batched(node.render.bind(node, false)) };
|
|
2391
|
+
render = (...args) => wrapper.fn(...args);
|
|
2390
2392
|
batchedRenderFunctions.set(node, render);
|
|
2391
2393
|
// manual implementation of onWillDestroy to break cyclic dependency
|
|
2392
|
-
node.willDestroy.push(
|
|
2394
|
+
node.willDestroy.push(cleanupRenderAndReactives.bind(null, wrapper, render));
|
|
2393
2395
|
}
|
|
2394
2396
|
return reactive(state, render);
|
|
2395
2397
|
}
|
|
2398
|
+
const NO_OP = () => { };
|
|
2399
|
+
function cleanupRenderAndReactives(wrapper, render) {
|
|
2400
|
+
wrapper.fn = NO_OP;
|
|
2401
|
+
clearReactivesForCallback(render);
|
|
2402
|
+
}
|
|
2396
2403
|
class ComponentNode {
|
|
2397
2404
|
constructor(C, props, app, parent, parentKey) {
|
|
2398
2405
|
this.fiber = null;
|
|
@@ -4542,7 +4549,7 @@
|
|
|
4542
4549
|
const isNewBlock = !block || forceNewBlock;
|
|
4543
4550
|
let codeIdx = this.target.code.length;
|
|
4544
4551
|
if (isNewBlock) {
|
|
4545
|
-
const n = ast.content.filter((c) => c.
|
|
4552
|
+
const n = ast.content.filter((c) => !c.hasNoRepresentation).length;
|
|
4546
4553
|
let result = null;
|
|
4547
4554
|
if (n <= 1) {
|
|
4548
4555
|
for (let child of ast.content) {
|
|
@@ -4556,15 +4563,15 @@
|
|
|
4556
4563
|
let index = 0;
|
|
4557
4564
|
for (let i = 0, l = ast.content.length; i < l; i++) {
|
|
4558
4565
|
const child = ast.content[i];
|
|
4559
|
-
const
|
|
4566
|
+
const forceNewBlock = !child.hasNoRepresentation;
|
|
4560
4567
|
const subCtx = createContext(ctx, {
|
|
4561
4568
|
block,
|
|
4562
4569
|
index,
|
|
4563
|
-
forceNewBlock
|
|
4570
|
+
forceNewBlock,
|
|
4564
4571
|
isLast: ctx.isLast && i === l - 1,
|
|
4565
4572
|
});
|
|
4566
4573
|
this.compileAST(child, subCtx);
|
|
4567
|
-
if (
|
|
4574
|
+
if (forceNewBlock) {
|
|
4568
4575
|
index++;
|
|
4569
4576
|
}
|
|
4570
4577
|
}
|
|
@@ -4982,9 +4989,9 @@
|
|
|
4982
4989
|
parseTCallBlock(node) ||
|
|
4983
4990
|
parseTTranslation(node, ctx) ||
|
|
4984
4991
|
parseTTranslationContext(node, ctx) ||
|
|
4992
|
+
parseTKey(node, ctx) ||
|
|
4985
4993
|
parseTEscNode(node, ctx) ||
|
|
4986
4994
|
parseTOutNode(node, ctx) ||
|
|
4987
|
-
parseTKey(node, ctx) ||
|
|
4988
4995
|
parseTSlot(node, ctx) ||
|
|
4989
4996
|
parseComponent(node, ctx) ||
|
|
4990
4997
|
parseDOMNode(node, ctx) ||
|
|
@@ -5052,19 +5059,29 @@
|
|
|
5052
5059
|
function parseTDebugLog(node, ctx) {
|
|
5053
5060
|
if (node.hasAttribute("t-debug")) {
|
|
5054
5061
|
node.removeAttribute("t-debug");
|
|
5055
|
-
|
|
5062
|
+
const content = parseNode(node, ctx);
|
|
5063
|
+
const ast = {
|
|
5056
5064
|
type: 12 /* TDebug */,
|
|
5057
|
-
content
|
|
5065
|
+
content,
|
|
5058
5066
|
};
|
|
5067
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
5068
|
+
ast.hasNoRepresentation = true;
|
|
5069
|
+
}
|
|
5070
|
+
return ast;
|
|
5059
5071
|
}
|
|
5060
5072
|
if (node.hasAttribute("t-log")) {
|
|
5061
5073
|
const expr = node.getAttribute("t-log");
|
|
5062
5074
|
node.removeAttribute("t-log");
|
|
5063
|
-
|
|
5075
|
+
const content = parseNode(node, ctx);
|
|
5076
|
+
const ast = {
|
|
5064
5077
|
type: 13 /* TLog */,
|
|
5065
5078
|
expr,
|
|
5066
|
-
content
|
|
5079
|
+
content,
|
|
5067
5080
|
};
|
|
5081
|
+
if (content === null || content === void 0 ? void 0 : content.hasNoRepresentation) {
|
|
5082
|
+
ast.hasNoRepresentation = true;
|
|
5083
|
+
}
|
|
5084
|
+
return ast;
|
|
5068
5085
|
}
|
|
5069
5086
|
return null;
|
|
5070
5087
|
}
|
|
@@ -5294,11 +5311,19 @@
|
|
|
5294
5311
|
}
|
|
5295
5312
|
const key = node.getAttribute("t-key");
|
|
5296
5313
|
node.removeAttribute("t-key");
|
|
5297
|
-
const
|
|
5298
|
-
if (!
|
|
5314
|
+
const content = parseNode(node, ctx);
|
|
5315
|
+
if (!content) {
|
|
5299
5316
|
return null;
|
|
5300
5317
|
}
|
|
5301
|
-
|
|
5318
|
+
const ast = {
|
|
5319
|
+
type: 10 /* TKey */,
|
|
5320
|
+
expr: key,
|
|
5321
|
+
content,
|
|
5322
|
+
};
|
|
5323
|
+
if (content.hasNoRepresentation) {
|
|
5324
|
+
ast.hasNoRepresentation = true;
|
|
5325
|
+
}
|
|
5326
|
+
return ast;
|
|
5302
5327
|
}
|
|
5303
5328
|
// -----------------------------------------------------------------------------
|
|
5304
5329
|
// t-call
|
|
@@ -5407,7 +5432,7 @@
|
|
|
5407
5432
|
if (node.textContent !== node.innerHTML) {
|
|
5408
5433
|
body = parseChildren(node, ctx);
|
|
5409
5434
|
}
|
|
5410
|
-
return { type: 6 /* TSet */, name, value, defaultValue, body };
|
|
5435
|
+
return { type: 6 /* TSet */, name, value, defaultValue, body, hasNoRepresentation: true };
|
|
5411
5436
|
}
|
|
5412
5437
|
// -----------------------------------------------------------------------------
|
|
5413
5438
|
// Components
|
|
@@ -5586,30 +5611,51 @@
|
|
|
5586
5611
|
// -----------------------------------------------------------------------------
|
|
5587
5612
|
// Translation
|
|
5588
5613
|
// -----------------------------------------------------------------------------
|
|
5614
|
+
function wrapInTTranslationAST(r) {
|
|
5615
|
+
const ast = { type: 16 /* TTranslation */, content: r };
|
|
5616
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
5617
|
+
ast.hasNoRepresentation = true;
|
|
5618
|
+
}
|
|
5619
|
+
return ast;
|
|
5620
|
+
}
|
|
5589
5621
|
function parseTTranslation(node, ctx) {
|
|
5590
5622
|
if (node.getAttribute("t-translation") !== "off") {
|
|
5591
5623
|
return null;
|
|
5592
5624
|
}
|
|
5593
5625
|
node.removeAttribute("t-translation");
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
content
|
|
5597
|
-
|
|
5626
|
+
const result = parseNode(node, ctx);
|
|
5627
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
5628
|
+
const children = result.content.map(wrapInTTranslationAST);
|
|
5629
|
+
return makeASTMulti(children);
|
|
5630
|
+
}
|
|
5631
|
+
return wrapInTTranslationAST(result);
|
|
5598
5632
|
}
|
|
5599
5633
|
// -----------------------------------------------------------------------------
|
|
5600
5634
|
// Translation Context
|
|
5601
5635
|
// -----------------------------------------------------------------------------
|
|
5636
|
+
function wrapInTTranslationContextAST(r, translationCtx) {
|
|
5637
|
+
const ast = {
|
|
5638
|
+
type: 17 /* TTranslationContext */,
|
|
5639
|
+
content: r,
|
|
5640
|
+
translationCtx,
|
|
5641
|
+
};
|
|
5642
|
+
if (r === null || r === void 0 ? void 0 : r.hasNoRepresentation) {
|
|
5643
|
+
ast.hasNoRepresentation = true;
|
|
5644
|
+
}
|
|
5645
|
+
return ast;
|
|
5646
|
+
}
|
|
5602
5647
|
function parseTTranslationContext(node, ctx) {
|
|
5603
5648
|
const translationCtx = node.getAttribute("t-translation-context");
|
|
5604
5649
|
if (!translationCtx) {
|
|
5605
5650
|
return null;
|
|
5606
5651
|
}
|
|
5607
5652
|
node.removeAttribute("t-translation-context");
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
content
|
|
5611
|
-
|
|
5612
|
-
}
|
|
5653
|
+
const result = parseNode(node, ctx);
|
|
5654
|
+
if ((result === null || result === void 0 ? void 0 : result.type) === 3 /* Multi */) {
|
|
5655
|
+
const children = result.content.map((c) => wrapInTTranslationContextAST(c, translationCtx));
|
|
5656
|
+
return makeASTMulti(children);
|
|
5657
|
+
}
|
|
5658
|
+
return wrapInTTranslationContextAST(result, translationCtx);
|
|
5613
5659
|
}
|
|
5614
5660
|
// -----------------------------------------------------------------------------
|
|
5615
5661
|
// Portal
|
|
@@ -5654,6 +5700,13 @@
|
|
|
5654
5700
|
}
|
|
5655
5701
|
return children;
|
|
5656
5702
|
}
|
|
5703
|
+
function makeASTMulti(children) {
|
|
5704
|
+
const ast = { type: 3 /* Multi */, content: children };
|
|
5705
|
+
if (children.every((c) => c.hasNoRepresentation)) {
|
|
5706
|
+
ast.hasNoRepresentation = true;
|
|
5707
|
+
}
|
|
5708
|
+
return ast;
|
|
5709
|
+
}
|
|
5657
5710
|
/**
|
|
5658
5711
|
* Parse all the child nodes of a given node and return an ast if possible.
|
|
5659
5712
|
* In the case there are multiple children, they are wrapped in a astmulti.
|
|
@@ -5666,7 +5719,7 @@
|
|
|
5666
5719
|
case 1:
|
|
5667
5720
|
return children[0];
|
|
5668
5721
|
default:
|
|
5669
|
-
return
|
|
5722
|
+
return makeASTMulti(children);
|
|
5670
5723
|
}
|
|
5671
5724
|
}
|
|
5672
5725
|
/**
|
|
@@ -5770,7 +5823,7 @@
|
|
|
5770
5823
|
}
|
|
5771
5824
|
|
|
5772
5825
|
// do not modify manually. This file is generated by the release script.
|
|
5773
|
-
const version = "2.8.
|
|
5826
|
+
const version = "2.8.2";
|
|
5774
5827
|
|
|
5775
5828
|
// -----------------------------------------------------------------------------
|
|
5776
5829
|
// Scheduler
|
|
@@ -6279,8 +6332,8 @@
|
|
|
6279
6332
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6280
6333
|
|
|
6281
6334
|
|
|
6282
|
-
__info__.date = '
|
|
6283
|
-
__info__.hash = '
|
|
6335
|
+
__info__.date = '2026-01-30T07:49:47.618Z';
|
|
6336
|
+
__info__.hash = '52abf8d';
|
|
6284
6337
|
__info__.url = 'https://github.com/odoo/owl';
|
|
6285
6338
|
|
|
6286
6339
|
|