[IMP] web: update owl from 2.2.5 to 2.2.6

Commits:
[IMP] devtools: add svg elements detection
[FIX] reactivity: do not notify for NOOPs on collections
[IMP] app: export apps set as static property
[IMP] runtime: do not check template equality outside dev mode
[FIX] runtime: properly support t-foreach on strings

More details: https://github.com/odoo/owl/releases/tag/v2.2.6

closes odoo/odoo#136591

X-original-commit: c92f9f8a7de6e10354ec0feea64bfc045a0edafb
Signed-off-by: Aaron Bohy (aab) <aab@odoo.com>
Signed-off-by: Géry Debongnie <ged@odoo.com>
This commit is contained in:
Géry Debongnie
2023-09-27 18:56:17 +00:00
parent 14bcc336e4
commit a54865632c
+19 -21
View File
@@ -2180,7 +2180,7 @@
if (hadKey !== hasKey) {
notifyReactives(target, KEYCHANGES);
}
if (originalValue !== value) {
if (originalValue !== target[getterName](key)) {
notifyReactives(target, key);
}
return ret;
@@ -3001,15 +3001,13 @@
keys = [...collection.keys()];
values = [...collection.values()];
}
else if (Symbol.iterator in Object(collection)) {
keys = [...collection];
values = keys;
}
else if (collection && typeof collection === "object") {
if (Symbol.iterator in collection) {
keys = [...collection];
values = keys;
}
else {
values = Object.values(collection);
keys = Object.keys(collection);
}
values = Object.values(collection);
keys = Object.keys(collection);
}
else {
throw new OwlError(`Invalid loop expression: "${collection}" is not iterable`);
@@ -3210,6 +3208,10 @@
}
addTemplate(name, template) {
if (name in this.rawTemplates) {
// this check can be expensive, just silently ignore double definitions outside dev mode
if (!this.dev) {
return;
}
const rawTemplate = this.rawTemplates[name];
const currentAsString = typeof rawTemplate === "string"
? rawTemplate
@@ -5556,7 +5558,7 @@
}
// do not modify manually. This file is generated by the release script.
const version = "2.2.5";
const version = "2.2.6";
// -----------------------------------------------------------------------------
// Scheduler
@@ -5645,13 +5647,8 @@
This is not suitable for production use.
See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration for more information.`;
};
window.__OWL_DEVTOOLS__ || (window.__OWL_DEVTOOLS__ = {
apps: new Set(),
Fiber: Fiber,
RootFiber: RootFiber,
toRaw: toRaw,
reactive: reactive,
});
const apps = new Set();
window.__OWL_DEVTOOLS__ || (window.__OWL_DEVTOOLS__ = { apps, Fiber, RootFiber, toRaw, reactive });
class App extends TemplateSet {
constructor(Root, config = {}) {
super(config);
@@ -5659,7 +5656,7 @@ See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration
this.root = null;
this.name = config.name || "";
this.Root = Root;
window.__OWL_DEVTOOLS__.apps.add(this);
apps.add(this);
if (config.test) {
this.dev = true;
}
@@ -5716,7 +5713,7 @@ See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration
this.root.destroy();
this.scheduler.processTasks();
}
window.__OWL_DEVTOOLS__.apps.delete(this);
apps.delete(this);
}
createComponent(name, isStatic, hasSlotsProp, hasDynamicPropList, propList) {
const isDynamic = !isStatic;
@@ -5791,6 +5788,7 @@ See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration
}
}
App.validateTarget = validateTarget;
App.apps = apps;
App.version = version;
async function mount(C, target, config = {}) {
return new App(C, config).mount(target, config);
@@ -6025,8 +6023,8 @@ See https://github.com/odoo/owl/blob/${hash}/doc/reference/app.md#configuration
Object.defineProperty(exports, '__esModule', { value: true });
__info__.date = '2023-08-07T10:26:30.557Z';
__info__.hash = 'b25e988';
__info__.date = '2023-09-25T11:50:11.419Z';
__info__.hash = '5dcee25';
__info__.url = 'https://github.com/odoo/owl';