Skip to content

Commit

Permalink
[REL] v2.2.7
Browse files Browse the repository at this point in the history
# v2.2.7

 - [IMP] types: correctly support `Function` type for props-validation
 - [IMP] app: allow to instantiate templates lazily
 - [FIX] compiler: compile named slot in t-component in named slot
 - [IMP] devtools: update the devtools documentation
 - [IMP] owl-vision: syntax scripts, single quotes attributes and slot props highlight and switch below command
 - [IMP] doc: improve documentation of useExternalListener
 - [FIX] devtools: remove highlights when out of devtools
 - [IMP] devtools: highlight component on select
 - [ADD] owl-vision: vscode extension initial commit
  • Loading branch information
sdegueldre committed Dec 6, 2023
1 parent e94428a commit 9dcbbe5
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 11 deletions.
23 changes: 15 additions & 8 deletions docs/owl.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down Expand Up @@ -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) {
Expand Down Expand Up @@ -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");
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -5902,7 +5909,7 @@ function useChildSubEnv(envExtension) {
*
* @template T
* @param {Effect<T>} 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
Expand Down Expand Up @@ -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';
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion src/version.ts
Original file line number Diff line number Diff line change
@@ -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";

0 comments on commit 9dcbbe5

Please sign in to comment.