@odoo/owl 3.0.0-alpha.21 → 3.0.0-alpha.22

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.
Binary file
package/dist/owl.cjs.js CHANGED
@@ -284,31 +284,6 @@ function toClassObj(expr) {
284
284
  return { [expr]: true };
285
285
  }
286
286
  }
287
- function setClass(val) {
288
- val = val === "" ? {} : toClassObj(val);
289
- // add classes
290
- const cl = this.classList;
291
- for (let c in val) {
292
- tokenListAdd.call(cl, c);
293
- }
294
- }
295
- function updateClass(val, oldVal) {
296
- oldVal = oldVal === "" ? {} : toClassObj(oldVal);
297
- val = val === "" ? {} : toClassObj(val);
298
- const cl = this.classList;
299
- // remove classes
300
- for (let c in oldVal) {
301
- if (!(c in val)) {
302
- tokenListRemove.call(cl, c);
303
- }
304
- }
305
- // add classes
306
- for (let c in val) {
307
- if (!(c in oldVal)) {
308
- tokenListAdd.call(cl, c);
309
- }
310
- }
311
- }
312
287
  // ---------------------------------------------------------------------------
313
288
  // Style
314
289
  // ---------------------------------------------------------------------------
@@ -341,7 +316,7 @@ function toStyleObj(expr) {
341
316
  }
342
317
  const prop = trim.call(part.slice(0, colonIdx));
343
318
  const value = trim.call(part.slice(colonIdx + 1));
344
- if (prop && value) {
319
+ if (prop && value && value !== "undefined") {
345
320
  result[prop] = value;
346
321
  }
347
322
  }
@@ -359,6 +334,32 @@ function toStyleObj(expr) {
359
334
  return {};
360
335
  }
361
336
  }
337
+ // ---------------------------------------------------------------------------
338
+ // Class
339
+ // ---------------------------------------------------------------------------
340
+ function setClass(val) {
341
+ val = val === "" ? {} : toClassObj(val);
342
+ for (let k in val) {
343
+ tokenListAdd.call(this.classList, k);
344
+ }
345
+ }
346
+ function updateClass(val, oldVal) {
347
+ oldVal = oldVal === "" ? {} : toClassObj(oldVal);
348
+ val = val === "" ? {} : toClassObj(val);
349
+ for (let k in oldVal) {
350
+ if (!(k in val)) {
351
+ tokenListRemove.call(this.classList, k);
352
+ }
353
+ }
354
+ for (let k in val) {
355
+ if (val[k] !== oldVal[k]) {
356
+ tokenListAdd.call(this.classList, k);
357
+ }
358
+ }
359
+ }
360
+ // ---------------------------------------------------------------------------
361
+ // Style setters
362
+ // ---------------------------------------------------------------------------
362
363
  function setStyle(val) {
363
364
  val = val === "" ? {} : toStyleObj(val);
364
365
  const style = this.style;
@@ -370,18 +371,19 @@ function updateStyle(val, oldVal) {
370
371
  oldVal = oldVal === "" ? {} : toStyleObj(oldVal);
371
372
  val = val === "" ? {} : toStyleObj(val);
372
373
  const style = this.style;
373
- // remove old styles
374
374
  for (let prop in oldVal) {
375
375
  if (!(prop in val)) {
376
376
  style.removeProperty(prop);
377
377
  }
378
378
  }
379
- // set new/changed styles
380
379
  for (let prop in val) {
381
380
  if (val[prop] !== oldVal[prop]) {
382
381
  style.setProperty(prop, val[prop]);
383
382
  }
384
383
  }
384
+ if (!style.cssText) {
385
+ removeAttribute.call(this, "style");
386
+ }
385
387
  }
386
388
 
387
389
  /**
@@ -5672,7 +5674,7 @@ function compile(template, options = {
5672
5674
  }
5673
5675
 
5674
5676
  // do not modify manually. This file is generated by the release script.
5675
- const version = "3.0.0-alpha.21";
5677
+ const version = "3.0.0-alpha.22";
5676
5678
 
5677
5679
  function effect(fn) {
5678
5680
  const computation = createComputation(() => {
@@ -6813,6 +6815,6 @@ exports.whenReady = whenReady;
6813
6815
  exports.xml = xml;
6814
6816
 
6815
6817
 
6816
- __info__.date = '2026-04-02T11:14:58.432Z';
6817
- __info__.hash = '9ca35d8';
6818
+ __info__.date = '2026-04-08T13:31:02.500Z';
6819
+ __info__.hash = '2e9164e';
6818
6820
  __info__.url = 'https://github.com/odoo/owl';
package/dist/owl.es.js CHANGED
@@ -282,31 +282,6 @@ function toClassObj(expr) {
282
282
  return { [expr]: true };
283
283
  }
284
284
  }
285
- function setClass(val) {
286
- val = val === "" ? {} : toClassObj(val);
287
- // add classes
288
- const cl = this.classList;
289
- for (let c in val) {
290
- tokenListAdd.call(cl, c);
291
- }
292
- }
293
- function updateClass(val, oldVal) {
294
- oldVal = oldVal === "" ? {} : toClassObj(oldVal);
295
- val = val === "" ? {} : toClassObj(val);
296
- const cl = this.classList;
297
- // remove classes
298
- for (let c in oldVal) {
299
- if (!(c in val)) {
300
- tokenListRemove.call(cl, c);
301
- }
302
- }
303
- // add classes
304
- for (let c in val) {
305
- if (!(c in oldVal)) {
306
- tokenListAdd.call(cl, c);
307
- }
308
- }
309
- }
310
285
  // ---------------------------------------------------------------------------
311
286
  // Style
312
287
  // ---------------------------------------------------------------------------
@@ -339,7 +314,7 @@ function toStyleObj(expr) {
339
314
  }
340
315
  const prop = trim.call(part.slice(0, colonIdx));
341
316
  const value = trim.call(part.slice(colonIdx + 1));
342
- if (prop && value) {
317
+ if (prop && value && value !== "undefined") {
343
318
  result[prop] = value;
344
319
  }
345
320
  }
@@ -357,6 +332,32 @@ function toStyleObj(expr) {
357
332
  return {};
358
333
  }
359
334
  }
335
+ // ---------------------------------------------------------------------------
336
+ // Class
337
+ // ---------------------------------------------------------------------------
338
+ function setClass(val) {
339
+ val = val === "" ? {} : toClassObj(val);
340
+ for (let k in val) {
341
+ tokenListAdd.call(this.classList, k);
342
+ }
343
+ }
344
+ function updateClass(val, oldVal) {
345
+ oldVal = oldVal === "" ? {} : toClassObj(oldVal);
346
+ val = val === "" ? {} : toClassObj(val);
347
+ for (let k in oldVal) {
348
+ if (!(k in val)) {
349
+ tokenListRemove.call(this.classList, k);
350
+ }
351
+ }
352
+ for (let k in val) {
353
+ if (val[k] !== oldVal[k]) {
354
+ tokenListAdd.call(this.classList, k);
355
+ }
356
+ }
357
+ }
358
+ // ---------------------------------------------------------------------------
359
+ // Style setters
360
+ // ---------------------------------------------------------------------------
360
361
  function setStyle(val) {
361
362
  val = val === "" ? {} : toStyleObj(val);
362
363
  const style = this.style;
@@ -368,18 +369,19 @@ function updateStyle(val, oldVal) {
368
369
  oldVal = oldVal === "" ? {} : toStyleObj(oldVal);
369
370
  val = val === "" ? {} : toStyleObj(val);
370
371
  const style = this.style;
371
- // remove old styles
372
372
  for (let prop in oldVal) {
373
373
  if (!(prop in val)) {
374
374
  style.removeProperty(prop);
375
375
  }
376
376
  }
377
- // set new/changed styles
378
377
  for (let prop in val) {
379
378
  if (val[prop] !== oldVal[prop]) {
380
379
  style.setProperty(prop, val[prop]);
381
380
  }
382
381
  }
382
+ if (!style.cssText) {
383
+ removeAttribute.call(this, "style");
384
+ }
383
385
  }
384
386
 
385
387
  /**
@@ -5670,7 +5672,7 @@ function compile(template, options = {
5670
5672
  }
5671
5673
 
5672
5674
  // do not modify manually. This file is generated by the release script.
5673
- const version = "3.0.0-alpha.21";
5675
+ const version = "3.0.0-alpha.22";
5674
5676
 
5675
5677
  function effect(fn) {
5676
5678
  const computation = createComputation(() => {
@@ -6769,6 +6771,6 @@ TemplateSet.prototype._compileTemplate = function _compileTemplate(name, templat
6769
6771
  export { App, Component, EventBus, OwlError, Plugin, Registry, Resource, __info__, assertType, batched, blockDom, computed, config, effect, htmlEscape, markRaw, markup, mount, onError, onMounted, onPatched, onWillDestroy, onWillPatch, onWillStart, onWillUnmount, onWillUpdateProps, plugin, props, providePlugins, proxy, signal, status, toRaw, types, untrack, useApp, useContext, useEffect, useListener, useResource, validateType, whenReady, xml };
6770
6772
 
6771
6773
 
6772
- __info__.date = '2026-04-02T11:14:58.432Z';
6773
- __info__.hash = '9ca35d8';
6774
+ __info__.date = '2026-04-08T13:31:02.500Z';
6775
+ __info__.hash = '2e9164e';
6774
6776
  __info__.url = 'https://github.com/odoo/owl';
package/dist/owl.iife.js CHANGED
@@ -285,31 +285,6 @@
285
285
  return { [expr]: true };
286
286
  }
287
287
  }
288
- function setClass(val) {
289
- val = val === "" ? {} : toClassObj(val);
290
- // add classes
291
- const cl = this.classList;
292
- for (let c in val) {
293
- tokenListAdd.call(cl, c);
294
- }
295
- }
296
- function updateClass(val, oldVal) {
297
- oldVal = oldVal === "" ? {} : toClassObj(oldVal);
298
- val = val === "" ? {} : toClassObj(val);
299
- const cl = this.classList;
300
- // remove classes
301
- for (let c in oldVal) {
302
- if (!(c in val)) {
303
- tokenListRemove.call(cl, c);
304
- }
305
- }
306
- // add classes
307
- for (let c in val) {
308
- if (!(c in oldVal)) {
309
- tokenListAdd.call(cl, c);
310
- }
311
- }
312
- }
313
288
  // ---------------------------------------------------------------------------
314
289
  // Style
315
290
  // ---------------------------------------------------------------------------
@@ -342,7 +317,7 @@
342
317
  }
343
318
  const prop = trim.call(part.slice(0, colonIdx));
344
319
  const value = trim.call(part.slice(colonIdx + 1));
345
- if (prop && value) {
320
+ if (prop && value && value !== "undefined") {
346
321
  result[prop] = value;
347
322
  }
348
323
  }
@@ -360,6 +335,32 @@
360
335
  return {};
361
336
  }
362
337
  }
338
+ // ---------------------------------------------------------------------------
339
+ // Class
340
+ // ---------------------------------------------------------------------------
341
+ function setClass(val) {
342
+ val = val === "" ? {} : toClassObj(val);
343
+ for (let k in val) {
344
+ tokenListAdd.call(this.classList, k);
345
+ }
346
+ }
347
+ function updateClass(val, oldVal) {
348
+ oldVal = oldVal === "" ? {} : toClassObj(oldVal);
349
+ val = val === "" ? {} : toClassObj(val);
350
+ for (let k in oldVal) {
351
+ if (!(k in val)) {
352
+ tokenListRemove.call(this.classList, k);
353
+ }
354
+ }
355
+ for (let k in val) {
356
+ if (val[k] !== oldVal[k]) {
357
+ tokenListAdd.call(this.classList, k);
358
+ }
359
+ }
360
+ }
361
+ // ---------------------------------------------------------------------------
362
+ // Style setters
363
+ // ---------------------------------------------------------------------------
363
364
  function setStyle(val) {
364
365
  val = val === "" ? {} : toStyleObj(val);
365
366
  const style = this.style;
@@ -371,18 +372,19 @@
371
372
  oldVal = oldVal === "" ? {} : toStyleObj(oldVal);
372
373
  val = val === "" ? {} : toStyleObj(val);
373
374
  const style = this.style;
374
- // remove old styles
375
375
  for (let prop in oldVal) {
376
376
  if (!(prop in val)) {
377
377
  style.removeProperty(prop);
378
378
  }
379
379
  }
380
- // set new/changed styles
381
380
  for (let prop in val) {
382
381
  if (val[prop] !== oldVal[prop]) {
383
382
  style.setProperty(prop, val[prop]);
384
383
  }
385
384
  }
385
+ if (!style.cssText) {
386
+ removeAttribute.call(this, "style");
387
+ }
386
388
  }
387
389
 
388
390
  /**
@@ -5673,7 +5675,7 @@
5673
5675
  }
5674
5676
 
5675
5677
  // do not modify manually. This file is generated by the release script.
5676
- const version = "3.0.0-alpha.21";
5678
+ const version = "3.0.0-alpha.22";
5677
5679
 
5678
5680
  function effect(fn) {
5679
5681
  const computation = createComputation(() => {
@@ -6814,8 +6816,8 @@
6814
6816
  exports.xml = xml;
6815
6817
 
6816
6818
 
6817
- __info__.date = '2026-04-02T11:14:58.432Z';
6818
- __info__.hash = '9ca35d8';
6819
+ __info__.date = '2026-04-08T13:31:02.500Z';
6820
+ __info__.hash = '2e9164e';
6819
6821
  __info__.url = 'https://github.com/odoo/owl';
6820
6822
 
6821
6823