@odoo/owl 2.5.0 → 2.5.3
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 +2414 -0
- package/dist/owl-devtools.zip +0 -0
- package/dist/owl.cjs.js +23 -7
- package/dist/owl.es.js +23 -7
- package/dist/owl.iife.js +23 -7
- package/dist/owl.iife.min.js +1 -1
- package/dist/types/common/types.d.ts +1 -1
- package/dist/types/compiler/standalone/index.d.ts +2 -0
- package/dist/types/compiler/standalone/setup_jsdom.d.ts +1 -0
- package/dist/types/owl.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +9 -2
- package/tools/compile_owl_templates.mjs +31 -0
package/dist/owl-devtools.zip
CHANGED
|
Binary file
|
package/dist/owl.cjs.js
CHANGED
|
@@ -1629,6 +1629,13 @@ function makeRootFiber(node) {
|
|
|
1629
1629
|
fibersInError.delete(current);
|
|
1630
1630
|
fibersInError.delete(root);
|
|
1631
1631
|
current.appliedToDom = false;
|
|
1632
|
+
if (current instanceof RootFiber) {
|
|
1633
|
+
// it is possible that this fiber is a fiber that crashed while being
|
|
1634
|
+
// mounted, so the mounted list is possibly corrupted. We restore it to
|
|
1635
|
+
// its normal initial state (which is empty list or a list with a mount
|
|
1636
|
+
// fiber.
|
|
1637
|
+
current.mounted = current instanceof MountFiber ? [current] : [];
|
|
1638
|
+
}
|
|
1632
1639
|
}
|
|
1633
1640
|
return current;
|
|
1634
1641
|
}
|
|
@@ -1745,6 +1752,7 @@ class RootFiber extends Fiber {
|
|
|
1745
1752
|
const node = this.node;
|
|
1746
1753
|
this.locked = true;
|
|
1747
1754
|
let current = undefined;
|
|
1755
|
+
let mountedFibers = this.mounted;
|
|
1748
1756
|
try {
|
|
1749
1757
|
// Step 1: calling all willPatch lifecycle hooks
|
|
1750
1758
|
for (current of this.willPatch) {
|
|
@@ -1764,7 +1772,6 @@ class RootFiber extends Fiber {
|
|
|
1764
1772
|
node._patch();
|
|
1765
1773
|
this.locked = false;
|
|
1766
1774
|
// Step 4: calling all mounted lifecycle hooks
|
|
1767
|
-
let mountedFibers = this.mounted;
|
|
1768
1775
|
while ((current = mountedFibers.pop())) {
|
|
1769
1776
|
current = current;
|
|
1770
1777
|
if (current.appliedToDom) {
|
|
@@ -1785,6 +1792,15 @@ class RootFiber extends Fiber {
|
|
|
1785
1792
|
}
|
|
1786
1793
|
}
|
|
1787
1794
|
catch (e) {
|
|
1795
|
+
// if mountedFibers is not empty, this means that a crash occured while
|
|
1796
|
+
// calling the mounted hooks of some component. So, there may still be
|
|
1797
|
+
// some component that have been mounted, but for which the mounted hooks
|
|
1798
|
+
// have not been called. Here, we remove the willUnmount hooks for these
|
|
1799
|
+
// specific component to prevent a worse situation (willUnmount being
|
|
1800
|
+
// called even though mounted has not been called)
|
|
1801
|
+
for (let fiber of mountedFibers) {
|
|
1802
|
+
fiber.node.willUnmount = [];
|
|
1803
|
+
}
|
|
1788
1804
|
this.locked = false;
|
|
1789
1805
|
node.app.handleError({ fiber: current || this, error: e });
|
|
1790
1806
|
}
|
|
@@ -4632,7 +4648,7 @@ class CodeGenerator {
|
|
|
4632
4648
|
case "translate":
|
|
4633
4649
|
break;
|
|
4634
4650
|
default:
|
|
4635
|
-
throw new OwlError(
|
|
4651
|
+
throw new OwlError(`Invalid prop suffix: ${suffix}`);
|
|
4636
4652
|
}
|
|
4637
4653
|
}
|
|
4638
4654
|
name = /^[a-z_]+$/i.test(name) ? name : `'${name}'`;
|
|
@@ -4938,10 +4954,10 @@ function parseTCustom(node, ctx) {
|
|
|
4938
4954
|
throw new OwlError(`Custom directive "${directiveName}" is not defined`);
|
|
4939
4955
|
}
|
|
4940
4956
|
const value = node.getAttribute(attr);
|
|
4941
|
-
const
|
|
4957
|
+
const modifiers = attr.split(".").slice(1);
|
|
4942
4958
|
node.removeAttribute(attr);
|
|
4943
4959
|
try {
|
|
4944
|
-
customDirective(node, value,
|
|
4960
|
+
customDirective(node, value, modifiers);
|
|
4945
4961
|
}
|
|
4946
4962
|
catch (error) {
|
|
4947
4963
|
throw new OwlError(`Custom directive "${directiveName}" throw the following error: ${error}`);
|
|
@@ -5608,7 +5624,7 @@ function compile(template, options = {
|
|
|
5608
5624
|
}
|
|
5609
5625
|
|
|
5610
5626
|
// do not modify manually. This file is generated by the release script.
|
|
5611
|
-
const version = "2.5.
|
|
5627
|
+
const version = "2.5.3";
|
|
5612
5628
|
|
|
5613
5629
|
// -----------------------------------------------------------------------------
|
|
5614
5630
|
// Scheduler
|
|
@@ -6121,6 +6137,6 @@ exports.whenReady = whenReady;
|
|
|
6121
6137
|
exports.xml = xml;
|
|
6122
6138
|
|
|
6123
6139
|
|
|
6124
|
-
__info__.date = '
|
|
6125
|
-
__info__.hash = '
|
|
6140
|
+
__info__.date = '2025-01-10T10:10:53.709Z';
|
|
6141
|
+
__info__.hash = 'b31fa81';
|
|
6126
6142
|
__info__.url = 'https://github.com/odoo/owl';
|
package/dist/owl.es.js
CHANGED
|
@@ -1625,6 +1625,13 @@ function makeRootFiber(node) {
|
|
|
1625
1625
|
fibersInError.delete(current);
|
|
1626
1626
|
fibersInError.delete(root);
|
|
1627
1627
|
current.appliedToDom = false;
|
|
1628
|
+
if (current instanceof RootFiber) {
|
|
1629
|
+
// it is possible that this fiber is a fiber that crashed while being
|
|
1630
|
+
// mounted, so the mounted list is possibly corrupted. We restore it to
|
|
1631
|
+
// its normal initial state (which is empty list or a list with a mount
|
|
1632
|
+
// fiber.
|
|
1633
|
+
current.mounted = current instanceof MountFiber ? [current] : [];
|
|
1634
|
+
}
|
|
1628
1635
|
}
|
|
1629
1636
|
return current;
|
|
1630
1637
|
}
|
|
@@ -1741,6 +1748,7 @@ class RootFiber extends Fiber {
|
|
|
1741
1748
|
const node = this.node;
|
|
1742
1749
|
this.locked = true;
|
|
1743
1750
|
let current = undefined;
|
|
1751
|
+
let mountedFibers = this.mounted;
|
|
1744
1752
|
try {
|
|
1745
1753
|
// Step 1: calling all willPatch lifecycle hooks
|
|
1746
1754
|
for (current of this.willPatch) {
|
|
@@ -1760,7 +1768,6 @@ class RootFiber extends Fiber {
|
|
|
1760
1768
|
node._patch();
|
|
1761
1769
|
this.locked = false;
|
|
1762
1770
|
// Step 4: calling all mounted lifecycle hooks
|
|
1763
|
-
let mountedFibers = this.mounted;
|
|
1764
1771
|
while ((current = mountedFibers.pop())) {
|
|
1765
1772
|
current = current;
|
|
1766
1773
|
if (current.appliedToDom) {
|
|
@@ -1781,6 +1788,15 @@ class RootFiber extends Fiber {
|
|
|
1781
1788
|
}
|
|
1782
1789
|
}
|
|
1783
1790
|
catch (e) {
|
|
1791
|
+
// if mountedFibers is not empty, this means that a crash occured while
|
|
1792
|
+
// calling the mounted hooks of some component. So, there may still be
|
|
1793
|
+
// some component that have been mounted, but for which the mounted hooks
|
|
1794
|
+
// have not been called. Here, we remove the willUnmount hooks for these
|
|
1795
|
+
// specific component to prevent a worse situation (willUnmount being
|
|
1796
|
+
// called even though mounted has not been called)
|
|
1797
|
+
for (let fiber of mountedFibers) {
|
|
1798
|
+
fiber.node.willUnmount = [];
|
|
1799
|
+
}
|
|
1784
1800
|
this.locked = false;
|
|
1785
1801
|
node.app.handleError({ fiber: current || this, error: e });
|
|
1786
1802
|
}
|
|
@@ -4628,7 +4644,7 @@ class CodeGenerator {
|
|
|
4628
4644
|
case "translate":
|
|
4629
4645
|
break;
|
|
4630
4646
|
default:
|
|
4631
|
-
throw new OwlError(
|
|
4647
|
+
throw new OwlError(`Invalid prop suffix: ${suffix}`);
|
|
4632
4648
|
}
|
|
4633
4649
|
}
|
|
4634
4650
|
name = /^[a-z_]+$/i.test(name) ? name : `'${name}'`;
|
|
@@ -4934,10 +4950,10 @@ function parseTCustom(node, ctx) {
|
|
|
4934
4950
|
throw new OwlError(`Custom directive "${directiveName}" is not defined`);
|
|
4935
4951
|
}
|
|
4936
4952
|
const value = node.getAttribute(attr);
|
|
4937
|
-
const
|
|
4953
|
+
const modifiers = attr.split(".").slice(1);
|
|
4938
4954
|
node.removeAttribute(attr);
|
|
4939
4955
|
try {
|
|
4940
|
-
customDirective(node, value,
|
|
4956
|
+
customDirective(node, value, modifiers);
|
|
4941
4957
|
}
|
|
4942
4958
|
catch (error) {
|
|
4943
4959
|
throw new OwlError(`Custom directive "${directiveName}" throw the following error: ${error}`);
|
|
@@ -5604,7 +5620,7 @@ function compile(template, options = {
|
|
|
5604
5620
|
}
|
|
5605
5621
|
|
|
5606
5622
|
// do not modify manually. This file is generated by the release script.
|
|
5607
|
-
const version = "2.5.
|
|
5623
|
+
const version = "2.5.3";
|
|
5608
5624
|
|
|
5609
5625
|
// -----------------------------------------------------------------------------
|
|
5610
5626
|
// Scheduler
|
|
@@ -6082,6 +6098,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat
|
|
|
6082
6098
|
export { App, Component, EventBus, OwlError, __info__, batched, blockDom, 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 };
|
|
6083
6099
|
|
|
6084
6100
|
|
|
6085
|
-
__info__.date = '
|
|
6086
|
-
__info__.hash = '
|
|
6101
|
+
__info__.date = '2025-01-10T10:10:53.709Z';
|
|
6102
|
+
__info__.hash = 'b31fa81';
|
|
6087
6103
|
__info__.url = 'https://github.com/odoo/owl';
|
package/dist/owl.iife.js
CHANGED
|
@@ -1628,6 +1628,13 @@
|
|
|
1628
1628
|
fibersInError.delete(current);
|
|
1629
1629
|
fibersInError.delete(root);
|
|
1630
1630
|
current.appliedToDom = false;
|
|
1631
|
+
if (current instanceof RootFiber) {
|
|
1632
|
+
// it is possible that this fiber is a fiber that crashed while being
|
|
1633
|
+
// mounted, so the mounted list is possibly corrupted. We restore it to
|
|
1634
|
+
// its normal initial state (which is empty list or a list with a mount
|
|
1635
|
+
// fiber.
|
|
1636
|
+
current.mounted = current instanceof MountFiber ? [current] : [];
|
|
1637
|
+
}
|
|
1631
1638
|
}
|
|
1632
1639
|
return current;
|
|
1633
1640
|
}
|
|
@@ -1744,6 +1751,7 @@
|
|
|
1744
1751
|
const node = this.node;
|
|
1745
1752
|
this.locked = true;
|
|
1746
1753
|
let current = undefined;
|
|
1754
|
+
let mountedFibers = this.mounted;
|
|
1747
1755
|
try {
|
|
1748
1756
|
// Step 1: calling all willPatch lifecycle hooks
|
|
1749
1757
|
for (current of this.willPatch) {
|
|
@@ -1763,7 +1771,6 @@
|
|
|
1763
1771
|
node._patch();
|
|
1764
1772
|
this.locked = false;
|
|
1765
1773
|
// Step 4: calling all mounted lifecycle hooks
|
|
1766
|
-
let mountedFibers = this.mounted;
|
|
1767
1774
|
while ((current = mountedFibers.pop())) {
|
|
1768
1775
|
current = current;
|
|
1769
1776
|
if (current.appliedToDom) {
|
|
@@ -1784,6 +1791,15 @@
|
|
|
1784
1791
|
}
|
|
1785
1792
|
}
|
|
1786
1793
|
catch (e) {
|
|
1794
|
+
// if mountedFibers is not empty, this means that a crash occured while
|
|
1795
|
+
// calling the mounted hooks of some component. So, there may still be
|
|
1796
|
+
// some component that have been mounted, but for which the mounted hooks
|
|
1797
|
+
// have not been called. Here, we remove the willUnmount hooks for these
|
|
1798
|
+
// specific component to prevent a worse situation (willUnmount being
|
|
1799
|
+
// called even though mounted has not been called)
|
|
1800
|
+
for (let fiber of mountedFibers) {
|
|
1801
|
+
fiber.node.willUnmount = [];
|
|
1802
|
+
}
|
|
1787
1803
|
this.locked = false;
|
|
1788
1804
|
node.app.handleError({ fiber: current || this, error: e });
|
|
1789
1805
|
}
|
|
@@ -4631,7 +4647,7 @@
|
|
|
4631
4647
|
case "translate":
|
|
4632
4648
|
break;
|
|
4633
4649
|
default:
|
|
4634
|
-
throw new OwlError(
|
|
4650
|
+
throw new OwlError(`Invalid prop suffix: ${suffix}`);
|
|
4635
4651
|
}
|
|
4636
4652
|
}
|
|
4637
4653
|
name = /^[a-z_]+$/i.test(name) ? name : `'${name}'`;
|
|
@@ -4937,10 +4953,10 @@
|
|
|
4937
4953
|
throw new OwlError(`Custom directive "${directiveName}" is not defined`);
|
|
4938
4954
|
}
|
|
4939
4955
|
const value = node.getAttribute(attr);
|
|
4940
|
-
const
|
|
4956
|
+
const modifiers = attr.split(".").slice(1);
|
|
4941
4957
|
node.removeAttribute(attr);
|
|
4942
4958
|
try {
|
|
4943
|
-
customDirective(node, value,
|
|
4959
|
+
customDirective(node, value, modifiers);
|
|
4944
4960
|
}
|
|
4945
4961
|
catch (error) {
|
|
4946
4962
|
throw new OwlError(`Custom directive "${directiveName}" throw the following error: ${error}`);
|
|
@@ -5607,7 +5623,7 @@
|
|
|
5607
5623
|
}
|
|
5608
5624
|
|
|
5609
5625
|
// do not modify manually. This file is generated by the release script.
|
|
5610
|
-
const version = "2.5.
|
|
5626
|
+
const version = "2.5.3";
|
|
5611
5627
|
|
|
5612
5628
|
// -----------------------------------------------------------------------------
|
|
5613
5629
|
// Scheduler
|
|
@@ -6122,8 +6138,8 @@ See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration
|
|
|
6122
6138
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
6123
6139
|
|
|
6124
6140
|
|
|
6125
|
-
__info__.date = '
|
|
6126
|
-
__info__.hash = '
|
|
6141
|
+
__info__.date = '2025-01-10T10:10:53.709Z';
|
|
6142
|
+
__info__.hash = 'b31fa81';
|
|
6127
6143
|
__info__.url = 'https://github.com/odoo/owl';
|
|
6128
6144
|
|
|
6129
6145
|
|