lwc 2.45.2 → 2.45.3

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 +45 -52
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +45 -52
  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 +51 -50
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +51 -56
  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 +57 -54
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +45 -52
  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 +51 -50
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +51 -56
  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 +57 -54
  22. package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
  23. package/dist/engine-server/commonjs/es2017/engine-server.js +7795 -91
  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 +7794 -71
  27. package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
  28. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +71 -12
  29. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
  30. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +71 -12
  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 +55 -5
  34. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
  35. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +71 -12
  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 +43 -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 +71 -12
  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 +55 -5
  44. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
  45. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +71 -12
  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 +43 -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 +10 -4
  51. package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
  52. package/dist/wire-service/iife/es2017/wire-service.js +10 -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 +10 -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 +10 -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 +10 -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 +10 -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 +10 -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 +10 -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 +10 -4
  67. package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
  68. package/package.json +7 -7
@@ -1,6 +1,8 @@
1
- /* proxy-compat-disable */
2
1
  /**
3
- * Copyright (C) 2018 salesforce.com, inc.
2
+ * Copyright (C) 2023 salesforce.com, inc.
3
+ */
4
+ /**
5
+ * Copyright (C) 2023 salesforce.com, inc.
4
6
  */
5
7
  /*
6
8
  * Copyright (c) 2018, salesforce.com, inc.
@@ -193,7 +195,7 @@ const { AriaAttrNameToPropNameMap, AriaPropNameToAttrNameMap } = /*@__PURE__*/ (
193
195
  })();
194
196
  // These attributes take either an ID or a list of IDs as values.
195
197
  // This includes aria-* attributes as well as the special non-ARIA "for" attribute
196
- const ID_REFERENCING_ATTRIBUTES_SET = new Set([
198
+ const ID_REFERENCING_ATTRIBUTES_SET = /*@__PURE__*/ new Set([
197
199
  'aria-activedescendant',
198
200
  'aria-controls',
199
201
  'aria-describedby',
@@ -280,11 +282,11 @@ const { NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING, NO_STANDARD_PROPERTY_ATTRIBUTE_M
280
282
  /**
281
283
  * Map associating previously transformed HTML property into HTML attribute.
282
284
  */
283
- const CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
285
+ const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map();
284
286
  /**
285
287
  * Map associating previously transformed HTML attribute into HTML property.
286
288
  */
287
- const CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
289
+ const CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/ new Map();
288
290
  function htmlPropertyToAttribute(propName) {
289
291
  const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
290
292
  if (!isUndefined$1(ariaAttributeName)) {
@@ -338,12 +340,12 @@ function htmlAttributeToProperty(attrName) {
338
340
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
339
341
  */
340
342
  // Increment whenever the LWC template compiler changes
341
- const LWC_VERSION = "2.45.2";
343
+ const LWC_VERSION = "2.45.3";
342
344
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
343
- /** version: 2.45.2 */
345
+ /** version: 2.45.3 */
344
346
 
345
347
  /**
346
- * Copyright (C) 2018 salesforce.com, inc.
348
+ * Copyright (C) 2023 salesforce.com, inc.
347
349
  */
348
350
 
349
351
  /*
@@ -418,10 +420,10 @@ function setFeatureFlagForTest(name, value) {
418
420
  setFeatureFlag(name, value);
419
421
  }
420
422
  }
421
- /** version: 2.45.2 */
423
+ /** version: 2.45.3 */
422
424
 
423
425
  /**
424
- * Copyright (C) 2018 salesforce.com, inc.
426
+ * Copyright (C) 2023 salesforce.com, inc.
425
427
  */
426
428
 
427
429
  /*
@@ -482,7 +484,7 @@ function applyAriaReflection(prototype = Element.prototype) {
482
484
  }
483
485
  }
484
486
  }
485
- /** version: 2.45.2 */
487
+ /** version: 2.45.3 */
486
488
 
487
489
  /*
488
490
  * Copyright (c) 2018, salesforce.com, inc.
@@ -496,7 +498,9 @@ if (!lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
496
498
  applyAriaReflection();
497
499
  }
498
500
 
499
- /* proxy-compat-disable */
501
+ /**
502
+ * Copyright (C) 2023 salesforce.com, inc.
503
+ */
500
504
 
501
505
  /*
502
506
  * Copyright (c) 2018, salesforce.com, inc.
@@ -925,19 +929,6 @@ const defaultDefHTMLPropertyNames = [
925
929
  'tabIndex',
926
930
  'title',
927
931
  ];
928
- let controlledElement = null;
929
- let controlledAttributeName;
930
- function isAttributeLocked(elm, attrName) {
931
- return elm !== controlledElement || attrName !== controlledAttributeName;
932
- }
933
- function lockAttribute(_elm, _key) {
934
- controlledElement = null;
935
- controlledAttributeName = undefined;
936
- }
937
- function unlockAttribute(elm, key) {
938
- controlledElement = elm;
939
- controlledAttributeName = key;
940
- }
941
932
 
942
933
  /*
943
934
  * Copyright (c) 2018, salesforce.com, inc.
@@ -976,6 +967,7 @@ forEach.call(defaultDefHTMLPropertyNames, (propName) => {
976
967
  * SPDX-License-Identifier: MIT
977
968
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
978
969
  */
970
+ /* eslint @lwc/lwc-internal/no-production-assert: "off" */
979
971
  function generateDataDescriptor(options) {
980
972
  return assign({
981
973
  configurable: true,
@@ -1805,6 +1797,14 @@ function markLockerLiveObject(obj) {
1805
1797
  * SPDX-License-Identifier: MIT
1806
1798
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1807
1799
  */
1800
+ /**
1801
+ * This module is responsible for producing the ComponentDef object that is always
1802
+ * accessible via `vm.def`. This is lazily created during the creation of the first
1803
+ * instance of a component class, and shared across all instances.
1804
+ *
1805
+ * This structure can be used to synthetically create proxies, and understand the
1806
+ * shape of a component. It is also used internally to apply extra optimizations.
1807
+ */
1808
1808
  /**
1809
1809
  * This operation is called with a descriptor of an standard html property
1810
1810
  * that a Custom Element can support (including AOM properties), which
@@ -1968,15 +1968,11 @@ LightningElement.prototype = {
1968
1968
  removeAttribute(name) {
1969
1969
  const vm = getAssociatedVM(this);
1970
1970
  const { elm, renderer: { removeAttribute }, } = vm;
1971
- unlockAttribute(elm, name);
1972
1971
  removeAttribute(elm, name);
1973
- lockAttribute();
1974
1972
  },
1975
1973
  removeAttributeNS(namespace, name) {
1976
1974
  const { elm, renderer: { removeAttribute }, } = getAssociatedVM(this);
1977
- unlockAttribute(elm, name);
1978
1975
  removeAttribute(elm, name, namespace);
1979
- lockAttribute();
1980
1976
  },
1981
1977
  getAttribute(name) {
1982
1978
  const vm = getAssociatedVM(this);
@@ -1998,9 +1994,7 @@ LightningElement.prototype = {
1998
1994
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1999
1995
  }
2000
1996
  }
2001
- unlockAttribute(elm, name);
2002
1997
  setAttribute(elm, name, value);
2003
- lockAttribute();
2004
1998
  },
2005
1999
  setAttributeNS(namespace, name, value) {
2006
2000
  const vm = getAssociatedVM(this);
@@ -2010,9 +2004,7 @@ LightningElement.prototype = {
2010
2004
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2011
2005
  }
2012
2006
  }
2013
- unlockAttribute(elm, name);
2014
2007
  setAttribute(elm, name, value, namespace);
2015
- lockAttribute();
2016
2008
  },
2017
2009
  getBoundingClientRect() {
2018
2010
  const vm = getAssociatedVM(this);
@@ -2394,7 +2386,7 @@ function createConnector(vm, name, wireDef) {
2394
2386
  });
2395
2387
  runWithBoundaryProtection(vm, vm, noop, () => {
2396
2388
  // job
2397
- connector = new adapter(dataCallback);
2389
+ connector = new adapter(dataCallback, { tagName: vm.tagName });
2398
2390
  }, noop);
2399
2391
  const updateConnectorConfig = (config) => {
2400
2392
  // every time the config is recomputed due to tracking,
@@ -2962,6 +2954,10 @@ function sanitizeAttribute(tagName, namespaceUri, attrName, attrValue) {
2962
2954
  * SPDX-License-Identifier: MIT
2963
2955
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2964
2956
  */
2957
+ /**
2958
+ * This module is responsible for creating the base bridge class BaseBridgeElement
2959
+ * that represents the HTMLElement extension used for any LWC inserted in the DOM.
2960
+ */
2965
2961
  // A bridge descriptor is a descriptor whose job is just to get the component instance
2966
2962
  // from the element instance, and get the value or set a new value on the component.
2967
2963
  // This means that across different elements, similar names can get the exact same
@@ -3015,14 +3011,6 @@ function createAttributeChangedCallback(attributeToPropMap, superAttributeChange
3015
3011
  }
3016
3012
  return;
3017
3013
  }
3018
- if (!isAttributeLocked(this, attrName)) {
3019
- // Ignore changes triggered by the engine itself during:
3020
- // * diffing when public props are attempting to reflect to the DOM
3021
- // * component via `this.setAttribute()`, should never update the prop
3022
- // Both cases, the setAttribute call is always wrapped by the unlocking of the
3023
- // attribute to be changed
3024
- return;
3025
- }
3026
3014
  // Reflect attribute change to the corresponding property when changed from outside.
3027
3015
  this[propName] = newValue;
3028
3016
  };
@@ -3367,6 +3355,14 @@ function swapStyle(oldStyle, newStyle) {
3367
3355
  * SPDX-License-Identifier: MIT
3368
3356
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3369
3357
  */
3358
+ /**
3359
+ * This module is responsible for producing the ComponentDef object that is always
3360
+ * accessible via `vm.def`. This is lazily created during the creation of the first
3361
+ * instance of a component class, and shared across all instances.
3362
+ *
3363
+ * This structure can be used to synthetically create proxies, and understand the
3364
+ * shape of a component. It is also used internally to apply extra optimizations.
3365
+ */
3370
3366
  const CtorToDefMap = new WeakMap();
3371
3367
  function getCtorProto(Ctor) {
3372
3368
  let proto = getPrototypeOf$1(Ctor);
@@ -3808,7 +3804,6 @@ function patchAttributes(oldVnode, vnode, renderer) {
3808
3804
  const cur = attrs[key];
3809
3805
  const old = oldAttrs[key];
3810
3806
  if (old !== cur) {
3811
- unlockAttribute(elm, key);
3812
3807
  if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
3813
3808
  // Assume xml namespace
3814
3809
  setAttribute(elm, key, cur, XML_NAMESPACE);
@@ -3823,7 +3818,6 @@ function patchAttributes(oldVnode, vnode, renderer) {
3823
3818
  else {
3824
3819
  setAttribute(elm, key, cur);
3825
3820
  }
3826
- lockAttribute();
3827
3821
  }
3828
3822
  }
3829
3823
  }
@@ -6853,14 +6847,12 @@ function hydrateCustomElement(elm, vnode, renderer) {
6853
6847
  function hydrateChildren(node, children, parentNode, owner) {
6854
6848
  let hasWarned = false;
6855
6849
  let nextNode = node;
6856
- let anchor = null;
6857
6850
  const { renderer } = owner;
6858
6851
  for (let i = 0; i < children.length; i++) {
6859
6852
  const childVnode = children[i];
6860
6853
  if (!isNull(childVnode)) {
6861
6854
  if (nextNode) {
6862
6855
  nextNode = hydrateNode(nextNode, childVnode, renderer);
6863
- anchor = childVnode.elm;
6864
6856
  }
6865
6857
  else {
6866
6858
  hasMismatch = true;
@@ -6870,8 +6862,8 @@ function hydrateChildren(node, children, parentNode, owner) {
6870
6862
  logError(`Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.`, owner);
6871
6863
  }
6872
6864
  }
6873
- mount(childVnode, parentNode, renderer, anchor);
6874
- anchor = childVnode.elm;
6865
+ mount(childVnode, parentNode, renderer, nextNode);
6866
+ nextNode = renderer.nextSibling(childVnode.elm);
6875
6867
  }
6876
6868
  }
6877
6869
  }
@@ -7378,7 +7370,7 @@ function readonly(obj) {
7378
7370
  }
7379
7371
  return getReadOnlyProxy(obj);
7380
7372
  }
7381
- /* version: 2.45.2 */
7373
+ /** version: 2.45.3 */
7382
7374
 
7383
7375
  /*
7384
7376
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7640,6 +7632,7 @@ const hasCustomElements = isCustomElementRegistryAvailable();
7640
7632
  * SPDX-License-Identifier: MIT
7641
7633
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
7642
7634
  */
7635
+ new WeakMap();
7643
7636
  // Creates a custom element for compat (legacy) browser environments
7644
7637
  const createCustomElementCompat = (tagName, upgradeCallback) => {
7645
7638
  const elm = document.createElement(tagName);
@@ -7766,7 +7759,7 @@ function rendererFactory(baseRenderer) {
7766
7759
  const renderer = (function (exports) {
7767
7760
 
7768
7761
  /**
7769
- * Copyright (C) 2018 salesforce.com, inc.
7762
+ * Copyright (C) 2023 salesforce.com, inc.
7770
7763
  */
7771
7764
  /*
7772
7765
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7806,7 +7799,7 @@ function rendererFactory(baseRenderer) {
7806
7799
  function isNull(obj) {
7807
7800
  return obj === null;
7808
7801
  }
7809
- /** version: 2.45.2 */
7802
+ /** version: 2.45.3 */
7810
7803
 
7811
7804
  /*
7812
7805
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8425,7 +8418,7 @@ function registerContextProvider(elm, adapterContextToken, onContextSubscription
8425
8418
  });
8426
8419
  }));
8427
8420
  }
8428
- /* version: 2.45.2 */
8421
+ /** version: 2.45.3 */
8429
8422
 
8430
8423
  export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, freezeTemplate, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeShadowed as isNodeFromTemplate, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderer, rendererFactory, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
8431
8424
  //# sourceMappingURL=engine-dom.js.map