diff --git a/docs/owl.js b/docs/owl.js index 60f496b9..e857c50c 100644 --- a/docs/owl.js +++ b/docs/owl.js @@ -2073,7 +2073,7 @@ function basicProxyHandler(callback) { set(target, key, value, receiver) { const hadKey = objectHasOwnProperty.call(target, key); const originalValue = Reflect.get(target, key, receiver); - const ret = Reflect.set(target, key, value, receiver); + const ret = Reflect.set(target, key, toRaw(value), receiver); if (!hadKey && objectHasOwnProperty.call(target, key)) { notifyReactives(target, KEYCHANGES); } @@ -3197,7 +3197,14 @@ class TemplateSet { this.translateFn = config.translateFn; this.translatableAttributes = config.translatableAttributes; if (config.templates) { - this.addTemplates(config.templates); + if (config.templates instanceof Document || typeof config.templates === "string") { + this.addTemplates(config.templates); + } + else { + for (const name in config.templates) { + this.addTemplate(name, config.templates[name]); + } + } } } static registerTemplate(name, fn) { @@ -5279,14 +5286,14 @@ function parseComponent(node, ctx) { // be ignored) let el = slotNode.parentElement; let isInSubComponent = false; - while (el !== clone) { + while (el && el !== clone) { if (el.hasAttribute("t-component") || el.tagName[0] === el.tagName[0].toUpperCase()) { isInSubComponent = true; break; } el = el.parentElement; } - if (isInSubComponent) { + if (isInSubComponent || !el) { continue; } slotNode.removeAttribute("t-set-slot"); @@ -5555,7 +5562,7 @@ function compile(template, options = {}) { } // do not modify manually. This file is generated by the release script. -const version = "2.2.6"; +const version = "2.2.7"; // ----------------------------------------------------------------------------- // Scheduler @@ -5902,7 +5909,7 @@ function useChildSubEnv(envExtension) { * * @template T * @param {Effect} effect the effect to run on component mount and/or patch - * @param {()=>T} [computeDependencies=()=>[NaN]] a callback to compute + * @param {()=>[...T]} [computeDependencies=()=>[NaN]] a callback to compute * dependencies that will decide if the effect needs to be cleaned up and * run again. If the dependencies did not change, the effect will not run * again. The default value returns an array containing only NaN because @@ -5984,6 +5991,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat export { App, Component, EventBus, OwlError, __info__, 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 }; -__info__.date = '2023-09-25T11:48:01.531Z'; -__info__.hash = '752160f'; +__info__.date = '2023-12-06T13:56:01.636Z'; +__info__.hash = 'e94428a'; __info__.url = 'https://github.com/odoo/owl'; diff --git a/package-lock.json b/package-lock.json index 473baee7..90f112f8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "@odoo/owl", - "version": "2.2.6", + "version": "2.2.7", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 135fca28..26508924 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@odoo/owl", - "version": "2.2.6", + "version": "2.2.7", "description": "Odoo Web Library (OWL)", "main": "dist/owl.cjs.js", "module": "dist/owl.es.js", diff --git a/src/version.ts b/src/version.ts index d12bf1e1..6657bdbf 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,2 @@ // do not modify manually. This file is generated by the release script. -export const version = "2.2.6"; +export const version = "2.2.7";