lwc 2.45.2 → 2.45.4

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.
Files changed (68) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +49 -50
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +49 -50
  4. package/dist/engine-dom/iife/es2017/engine-dom.js.map +1 -1
  5. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  6. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +55 -48
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +55 -54
  9. package/dist/engine-dom/iife/es5/engine-dom.js.map +1 -1
  10. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  11. package/dist/engine-dom/iife/es5/engine-dom_debug.js +61 -52
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +49 -50
  14. package/dist/engine-dom/umd/es2017/engine-dom.js.map +1 -1
  15. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  16. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +55 -48
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +55 -54
  19. package/dist/engine-dom/umd/es5/engine-dom.js.map +1 -1
  20. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  21. package/dist/engine-dom/umd/es5/engine-dom_debug.js +61 -52
  22. package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
  23. package/dist/engine-server/commonjs/es2017/engine-server.js +7798 -89
  24. package/dist/engine-server/commonjs/es2017/engine-server.js.map +1 -1
  25. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  26. package/dist/engine-server/esm/es2017/engine-server.js +7797 -69
  27. package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
  28. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +73 -11
  29. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
  30. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +73 -11
  31. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
  32. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +39 -1
  33. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +57 -4
  34. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
  35. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +73 -11
  36. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
  37. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +39 -1
  38. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +44 -4
  39. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
  40. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +73 -11
  41. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
  42. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +39 -1
  43. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +57 -4
  44. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
  45. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +73 -11
  46. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
  47. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +39 -1
  48. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +44 -4
  49. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -1
  50. package/dist/wire-service/esm/es2017/wire-service.js +12 -4
  51. package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
  52. package/dist/wire-service/iife/es2017/wire-service.js +12 -4
  53. package/dist/wire-service/iife/es2017/wire-service.js.map +1 -1
  54. package/dist/wire-service/iife/es2017/wire-service_debug.js +12 -4
  55. package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -1
  56. package/dist/wire-service/iife/es5/wire-service.js +12 -4
  57. package/dist/wire-service/iife/es5/wire-service.js.map +1 -1
  58. package/dist/wire-service/iife/es5/wire-service_debug.js +12 -4
  59. package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -1
  60. package/dist/wire-service/umd/es2017/wire-service.js +12 -4
  61. package/dist/wire-service/umd/es2017/wire-service.js.map +1 -1
  62. package/dist/wire-service/umd/es2017/wire-service_debug.js +12 -4
  63. package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -1
  64. package/dist/wire-service/umd/es5/wire-service.js +12 -4
  65. package/dist/wire-service/umd/es5/wire-service.js.map +1 -1
  66. package/dist/wire-service/umd/es5/wire-service_debug.js +12 -4
  67. package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
  68. package/package.json +7 -7
@@ -6,7 +6,11 @@
6
6
 
7
7
  /* proxy-compat-disable */
8
8
  /**
9
- * Copyright (C) 2018 salesforce.com, inc.
9
+ * Copyright (C) 2023 salesforce.com, inc.
10
+ */
11
+ /* proxy-compat-disable */
12
+ /**
13
+ * Copyright (C) 2023 salesforce.com, inc.
10
14
  */
11
15
  /*
12
16
  * Copyright (c) 2018, salesforce.com, inc.
@@ -199,7 +203,7 @@
199
203
  })();
200
204
  // These attributes take either an ID or a list of IDs as values.
201
205
  // This includes aria-* attributes as well as the special non-ARIA "for" attribute
202
- const ID_REFERENCING_ATTRIBUTES_SET = new Set([
206
+ const ID_REFERENCING_ATTRIBUTES_SET = /*@__PURE__*/ new Set([
203
207
  'aria-activedescendant',
204
208
  'aria-controls',
205
209
  'aria-describedby',
@@ -286,11 +290,11 @@
286
290
  /**
287
291
  * Map associating previously transformed HTML property into HTML attribute.
288
292
  */
289
- const CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
293
+ const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map();
290
294
  /**
291
295
  * Map associating previously transformed HTML attribute into HTML property.
292
296
  */
293
- const CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
297
+ const CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/ new Map();
294
298
  function htmlPropertyToAttribute(propName) {
295
299
  const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
296
300
  if (!isUndefined$1(ariaAttributeName)) {
@@ -344,12 +348,13 @@
344
348
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
345
349
  */
346
350
  // Increment whenever the LWC template compiler changes
347
- const LWC_VERSION = "2.45.2";
351
+ const LWC_VERSION = "2.45.4";
348
352
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
349
- /** version: 2.45.2 */
353
+ /** version: 2.45.4 */
350
354
 
355
+ /* proxy-compat-disable */
351
356
  /**
352
- * Copyright (C) 2018 salesforce.com, inc.
357
+ * Copyright (C) 2023 salesforce.com, inc.
353
358
  */
354
359
 
355
360
  /*
@@ -424,10 +429,11 @@
424
429
  setFeatureFlag(name, value);
425
430
  }
426
431
  }
427
- /** version: 2.45.2 */
432
+ /** version: 2.45.4 */
428
433
 
434
+ /* proxy-compat-disable */
429
435
  /**
430
- * Copyright (C) 2018 salesforce.com, inc.
436
+ * Copyright (C) 2023 salesforce.com, inc.
431
437
  */
432
438
 
433
439
  /*
@@ -488,7 +494,7 @@
488
494
  }
489
495
  }
490
496
  }
491
- /** version: 2.45.2 */
497
+ /** version: 2.45.4 */
492
498
 
493
499
  /*
494
500
  * Copyright (c) 2018, salesforce.com, inc.
@@ -503,6 +509,9 @@
503
509
  }
504
510
 
505
511
  /* proxy-compat-disable */
512
+ /**
513
+ * Copyright (C) 2023 salesforce.com, inc.
514
+ */
506
515
 
507
516
  /*
508
517
  * Copyright (c) 2018, salesforce.com, inc.
@@ -931,19 +940,6 @@
931
940
  'tabIndex',
932
941
  'title',
933
942
  ];
934
- let controlledElement = null;
935
- let controlledAttributeName;
936
- function isAttributeLocked(elm, attrName) {
937
- return elm !== controlledElement || attrName !== controlledAttributeName;
938
- }
939
- function lockAttribute(_elm, _key) {
940
- controlledElement = null;
941
- controlledAttributeName = undefined;
942
- }
943
- function unlockAttribute(elm, key) {
944
- controlledElement = elm;
945
- controlledAttributeName = key;
946
- }
947
943
 
948
944
  /*
949
945
  * Copyright (c) 2018, salesforce.com, inc.
@@ -982,6 +978,7 @@
982
978
  * SPDX-License-Identifier: MIT
983
979
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
984
980
  */
981
+ /* eslint @lwc/lwc-internal/no-production-assert: "off" */
985
982
  function generateDataDescriptor(options) {
986
983
  return assign({
987
984
  configurable: true,
@@ -1811,6 +1808,14 @@
1811
1808
  * SPDX-License-Identifier: MIT
1812
1809
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1813
1810
  */
1811
+ /**
1812
+ * This module is responsible for producing the ComponentDef object that is always
1813
+ * accessible via `vm.def`. This is lazily created during the creation of the first
1814
+ * instance of a component class, and shared across all instances.
1815
+ *
1816
+ * This structure can be used to synthetically create proxies, and understand the
1817
+ * shape of a component. It is also used internally to apply extra optimizations.
1818
+ */
1814
1819
  /**
1815
1820
  * This operation is called with a descriptor of an standard html property
1816
1821
  * that a Custom Element can support (including AOM properties), which
@@ -1974,15 +1979,11 @@
1974
1979
  removeAttribute(name) {
1975
1980
  const vm = getAssociatedVM(this);
1976
1981
  const { elm, renderer: { removeAttribute }, } = vm;
1977
- unlockAttribute(elm, name);
1978
1982
  removeAttribute(elm, name);
1979
- lockAttribute();
1980
1983
  },
1981
1984
  removeAttributeNS(namespace, name) {
1982
1985
  const { elm, renderer: { removeAttribute }, } = getAssociatedVM(this);
1983
- unlockAttribute(elm, name);
1984
1986
  removeAttribute(elm, name, namespace);
1985
- lockAttribute();
1986
1987
  },
1987
1988
  getAttribute(name) {
1988
1989
  const vm = getAssociatedVM(this);
@@ -2004,9 +2005,7 @@
2004
2005
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2005
2006
  }
2006
2007
  }
2007
- unlockAttribute(elm, name);
2008
2008
  setAttribute(elm, name, value);
2009
- lockAttribute();
2010
2009
  },
2011
2010
  setAttributeNS(namespace, name, value) {
2012
2011
  const vm = getAssociatedVM(this);
@@ -2016,9 +2015,7 @@
2016
2015
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2017
2016
  }
2018
2017
  }
2019
- unlockAttribute(elm, name);
2020
2018
  setAttribute(elm, name, value, namespace);
2021
- lockAttribute();
2022
2019
  },
2023
2020
  getBoundingClientRect() {
2024
2021
  const vm = getAssociatedVM(this);
@@ -2400,7 +2397,7 @@
2400
2397
  });
2401
2398
  runWithBoundaryProtection(vm, vm, noop, () => {
2402
2399
  // job
2403
- connector = new adapter(dataCallback);
2400
+ connector = new adapter(dataCallback, { tagName: vm.tagName });
2404
2401
  }, noop);
2405
2402
  const updateConnectorConfig = (config) => {
2406
2403
  // every time the config is recomputed due to tracking,
@@ -2968,6 +2965,10 @@
2968
2965
  * SPDX-License-Identifier: MIT
2969
2966
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2970
2967
  */
2968
+ /**
2969
+ * This module is responsible for creating the base bridge class BaseBridgeElement
2970
+ * that represents the HTMLElement extension used for any LWC inserted in the DOM.
2971
+ */
2971
2972
  // A bridge descriptor is a descriptor whose job is just to get the component instance
2972
2973
  // from the element instance, and get the value or set a new value on the component.
2973
2974
  // This means that across different elements, similar names can get the exact same
@@ -3021,14 +3022,6 @@
3021
3022
  }
3022
3023
  return;
3023
3024
  }
3024
- if (!isAttributeLocked(this, attrName)) {
3025
- // Ignore changes triggered by the engine itself during:
3026
- // * diffing when public props are attempting to reflect to the DOM
3027
- // * component via `this.setAttribute()`, should never update the prop
3028
- // Both cases, the setAttribute call is always wrapped by the unlocking of the
3029
- // attribute to be changed
3030
- return;
3031
- }
3032
3025
  // Reflect attribute change to the corresponding property when changed from outside.
3033
3026
  this[propName] = newValue;
3034
3027
  };
@@ -3373,6 +3366,14 @@
3373
3366
  * SPDX-License-Identifier: MIT
3374
3367
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3375
3368
  */
3369
+ /**
3370
+ * This module is responsible for producing the ComponentDef object that is always
3371
+ * accessible via `vm.def`. This is lazily created during the creation of the first
3372
+ * instance of a component class, and shared across all instances.
3373
+ *
3374
+ * This structure can be used to synthetically create proxies, and understand the
3375
+ * shape of a component. It is also used internally to apply extra optimizations.
3376
+ */
3376
3377
  const CtorToDefMap = new WeakMap();
3377
3378
  function getCtorProto(Ctor) {
3378
3379
  let proto = getPrototypeOf$1(Ctor);
@@ -3814,7 +3815,6 @@
3814
3815
  const cur = attrs[key];
3815
3816
  const old = oldAttrs[key];
3816
3817
  if (old !== cur) {
3817
- unlockAttribute(elm, key);
3818
3818
  if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
3819
3819
  // Assume xml namespace
3820
3820
  setAttribute(elm, key, cur, XML_NAMESPACE);
@@ -3829,7 +3829,6 @@
3829
3829
  else {
3830
3830
  setAttribute(elm, key, cur);
3831
3831
  }
3832
- lockAttribute();
3833
3832
  }
3834
3833
  }
3835
3834
  }
@@ -6859,14 +6858,12 @@
6859
6858
  function hydrateChildren(node, children, parentNode, owner) {
6860
6859
  let hasWarned = false;
6861
6860
  let nextNode = node;
6862
- let anchor = null;
6863
6861
  const { renderer } = owner;
6864
6862
  for (let i = 0; i < children.length; i++) {
6865
6863
  const childVnode = children[i];
6866
6864
  if (!isNull(childVnode)) {
6867
6865
  if (nextNode) {
6868
6866
  nextNode = hydrateNode(nextNode, childVnode, renderer);
6869
- anchor = childVnode.elm;
6870
6867
  }
6871
6868
  else {
6872
6869
  hasMismatch = true;
@@ -6876,8 +6873,8 @@
6876
6873
  logError(`Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.`, owner);
6877
6874
  }
6878
6875
  }
6879
- mount(childVnode, parentNode, renderer, anchor);
6880
- anchor = childVnode.elm;
6876
+ mount(childVnode, parentNode, renderer, nextNode);
6877
+ nextNode = renderer.nextSibling(childVnode.elm);
6881
6878
  }
6882
6879
  }
6883
6880
  }
@@ -7384,7 +7381,7 @@
7384
7381
  }
7385
7382
  return getReadOnlyProxy(obj);
7386
7383
  }
7387
- /* version: 2.45.2 */
7384
+ /** version: 2.45.4 */
7388
7385
 
7389
7386
  /*
7390
7387
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7646,6 +7643,7 @@
7646
7643
  * SPDX-License-Identifier: MIT
7647
7644
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
7648
7645
  */
7646
+ new WeakMap();
7649
7647
  // Creates a custom element for compat (legacy) browser environments
7650
7648
  const createCustomElementCompat = (tagName, upgradeCallback) => {
7651
7649
  const elm = document.createElement(tagName);
@@ -7771,8 +7769,9 @@
7771
7769
  function rendererFactory(baseRenderer) {
7772
7770
  const renderer = (function (exports) {
7773
7771
 
7772
+ /* proxy-compat-disable */
7774
7773
  /**
7775
- * Copyright (C) 2018 salesforce.com, inc.
7774
+ * Copyright (C) 2023 salesforce.com, inc.
7776
7775
  */
7777
7776
  /*
7778
7777
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7812,7 +7811,7 @@
7812
7811
  function isNull(obj) {
7813
7812
  return obj === null;
7814
7813
  }
7815
- /** version: 2.45.2 */
7814
+ /** version: 2.45.4 */
7816
7815
 
7817
7816
  /*
7818
7817
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8431,7 +8430,7 @@
8431
8430
  });
8432
8431
  }));
8433
8432
  }
8434
- /* version: 2.45.2 */
8433
+ /** version: 2.45.4 */
8435
8434
 
8436
8435
  exports.LightningElement = LightningElement;
8437
8436
  exports.__unstable__ProfilerControl = profilerControl;