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
@@ -1,6 +1,10 @@
1
1
  /* proxy-compat-disable */
2
2
  /**
3
- * Copyright (C) 2018 salesforce.com, inc.
3
+ * Copyright (C) 2023 salesforce.com, inc.
4
+ */
5
+ /* proxy-compat-disable */
6
+ /**
7
+ * Copyright (C) 2023 salesforce.com, inc.
4
8
  */
5
9
  /*
6
10
  * Copyright (c) 2018, salesforce.com, inc.
@@ -193,7 +197,7 @@ const { AriaAttrNameToPropNameMap, AriaPropNameToAttrNameMap } = /*@__PURE__*/ (
193
197
  })();
194
198
  // These attributes take either an ID or a list of IDs as values.
195
199
  // This includes aria-* attributes as well as the special non-ARIA "for" attribute
196
- const ID_REFERENCING_ATTRIBUTES_SET = new Set([
200
+ const ID_REFERENCING_ATTRIBUTES_SET = /*@__PURE__*/ new Set([
197
201
  'aria-activedescendant',
198
202
  'aria-controls',
199
203
  'aria-describedby',
@@ -280,11 +284,11 @@ const { NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING, NO_STANDARD_PROPERTY_ATTRIBUTE_M
280
284
  /**
281
285
  * Map associating previously transformed HTML property into HTML attribute.
282
286
  */
283
- const CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
287
+ const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map();
284
288
  /**
285
289
  * Map associating previously transformed HTML attribute into HTML property.
286
290
  */
287
- const CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
291
+ const CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/ new Map();
288
292
  function htmlPropertyToAttribute(propName) {
289
293
  const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
290
294
  if (!isUndefined$1(ariaAttributeName)) {
@@ -338,12 +342,13 @@ function htmlAttributeToProperty(attrName) {
338
342
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
339
343
  */
340
344
  // Increment whenever the LWC template compiler changes
341
- const LWC_VERSION = "2.45.2";
345
+ const LWC_VERSION = "2.45.4";
342
346
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
343
- /** version: 2.45.2 */
347
+ /** version: 2.45.4 */
344
348
 
349
+ /* proxy-compat-disable */
345
350
  /**
346
- * Copyright (C) 2018 salesforce.com, inc.
351
+ * Copyright (C) 2023 salesforce.com, inc.
347
352
  */
348
353
 
349
354
  /*
@@ -418,10 +423,11 @@ function setFeatureFlagForTest(name, value) {
418
423
  setFeatureFlag(name, value);
419
424
  }
420
425
  }
421
- /** version: 2.45.2 */
426
+ /** version: 2.45.4 */
422
427
 
428
+ /* proxy-compat-disable */
423
429
  /**
424
- * Copyright (C) 2018 salesforce.com, inc.
430
+ * Copyright (C) 2023 salesforce.com, inc.
425
431
  */
426
432
 
427
433
  /*
@@ -482,7 +488,7 @@ function applyAriaReflection(prototype = Element.prototype) {
482
488
  }
483
489
  }
484
490
  }
485
- /** version: 2.45.2 */
491
+ /** version: 2.45.4 */
486
492
 
487
493
  /*
488
494
  * Copyright (c) 2018, salesforce.com, inc.
@@ -497,6 +503,9 @@ if (!lwcRuntimeFlags.DISABLE_ARIA_REFLECTION_POLYFILL) {
497
503
  }
498
504
 
499
505
  /* proxy-compat-disable */
506
+ /**
507
+ * Copyright (C) 2023 salesforce.com, inc.
508
+ */
500
509
 
501
510
  /*
502
511
  * Copyright (c) 2018, salesforce.com, inc.
@@ -925,19 +934,6 @@ const defaultDefHTMLPropertyNames = [
925
934
  'tabIndex',
926
935
  'title',
927
936
  ];
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
937
 
942
938
  /*
943
939
  * Copyright (c) 2018, salesforce.com, inc.
@@ -976,6 +972,7 @@ forEach.call(defaultDefHTMLPropertyNames, (propName) => {
976
972
  * SPDX-License-Identifier: MIT
977
973
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
978
974
  */
975
+ /* eslint @lwc/lwc-internal/no-production-assert: "off" */
979
976
  function generateDataDescriptor(options) {
980
977
  return assign({
981
978
  configurable: true,
@@ -1805,6 +1802,14 @@ function markLockerLiveObject(obj) {
1805
1802
  * SPDX-License-Identifier: MIT
1806
1803
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1807
1804
  */
1805
+ /**
1806
+ * This module is responsible for producing the ComponentDef object that is always
1807
+ * accessible via `vm.def`. This is lazily created during the creation of the first
1808
+ * instance of a component class, and shared across all instances.
1809
+ *
1810
+ * This structure can be used to synthetically create proxies, and understand the
1811
+ * shape of a component. It is also used internally to apply extra optimizations.
1812
+ */
1808
1813
  /**
1809
1814
  * This operation is called with a descriptor of an standard html property
1810
1815
  * that a Custom Element can support (including AOM properties), which
@@ -1968,15 +1973,11 @@ LightningElement.prototype = {
1968
1973
  removeAttribute(name) {
1969
1974
  const vm = getAssociatedVM(this);
1970
1975
  const { elm, renderer: { removeAttribute }, } = vm;
1971
- unlockAttribute(elm, name);
1972
1976
  removeAttribute(elm, name);
1973
- lockAttribute();
1974
1977
  },
1975
1978
  removeAttributeNS(namespace, name) {
1976
1979
  const { elm, renderer: { removeAttribute }, } = getAssociatedVM(this);
1977
- unlockAttribute(elm, name);
1978
1980
  removeAttribute(elm, name, namespace);
1979
- lockAttribute();
1980
1981
  },
1981
1982
  getAttribute(name) {
1982
1983
  const vm = getAssociatedVM(this);
@@ -1998,9 +1999,7 @@ LightningElement.prototype = {
1998
1999
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
1999
2000
  }
2000
2001
  }
2001
- unlockAttribute(elm, name);
2002
2002
  setAttribute(elm, name, value);
2003
- lockAttribute();
2004
2003
  },
2005
2004
  setAttributeNS(namespace, name, value) {
2006
2005
  const vm = getAssociatedVM(this);
@@ -2010,9 +2009,7 @@ LightningElement.prototype = {
2010
2009
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2011
2010
  }
2012
2011
  }
2013
- unlockAttribute(elm, name);
2014
2012
  setAttribute(elm, name, value, namespace);
2015
- lockAttribute();
2016
2013
  },
2017
2014
  getBoundingClientRect() {
2018
2015
  const vm = getAssociatedVM(this);
@@ -2394,7 +2391,7 @@ function createConnector(vm, name, wireDef) {
2394
2391
  });
2395
2392
  runWithBoundaryProtection(vm, vm, noop, () => {
2396
2393
  // job
2397
- connector = new adapter(dataCallback);
2394
+ connector = new adapter(dataCallback, { tagName: vm.tagName });
2398
2395
  }, noop);
2399
2396
  const updateConnectorConfig = (config) => {
2400
2397
  // every time the config is recomputed due to tracking,
@@ -2962,6 +2959,10 @@ function sanitizeAttribute(tagName, namespaceUri, attrName, attrValue) {
2962
2959
  * SPDX-License-Identifier: MIT
2963
2960
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2964
2961
  */
2962
+ /**
2963
+ * This module is responsible for creating the base bridge class BaseBridgeElement
2964
+ * that represents the HTMLElement extension used for any LWC inserted in the DOM.
2965
+ */
2965
2966
  // A bridge descriptor is a descriptor whose job is just to get the component instance
2966
2967
  // from the element instance, and get the value or set a new value on the component.
2967
2968
  // This means that across different elements, similar names can get the exact same
@@ -3015,14 +3016,6 @@ function createAttributeChangedCallback(attributeToPropMap, superAttributeChange
3015
3016
  }
3016
3017
  return;
3017
3018
  }
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
3019
  // Reflect attribute change to the corresponding property when changed from outside.
3027
3020
  this[propName] = newValue;
3028
3021
  };
@@ -3367,6 +3360,14 @@ function swapStyle(oldStyle, newStyle) {
3367
3360
  * SPDX-License-Identifier: MIT
3368
3361
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3369
3362
  */
3363
+ /**
3364
+ * This module is responsible for producing the ComponentDef object that is always
3365
+ * accessible via `vm.def`. This is lazily created during the creation of the first
3366
+ * instance of a component class, and shared across all instances.
3367
+ *
3368
+ * This structure can be used to synthetically create proxies, and understand the
3369
+ * shape of a component. It is also used internally to apply extra optimizations.
3370
+ */
3370
3371
  const CtorToDefMap = new WeakMap();
3371
3372
  function getCtorProto(Ctor) {
3372
3373
  let proto = getPrototypeOf$1(Ctor);
@@ -3808,7 +3809,6 @@ function patchAttributes(oldVnode, vnode, renderer) {
3808
3809
  const cur = attrs[key];
3809
3810
  const old = oldAttrs[key];
3810
3811
  if (old !== cur) {
3811
- unlockAttribute(elm, key);
3812
3812
  if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
3813
3813
  // Assume xml namespace
3814
3814
  setAttribute(elm, key, cur, XML_NAMESPACE);
@@ -3823,7 +3823,6 @@ function patchAttributes(oldVnode, vnode, renderer) {
3823
3823
  else {
3824
3824
  setAttribute(elm, key, cur);
3825
3825
  }
3826
- lockAttribute();
3827
3826
  }
3828
3827
  }
3829
3828
  }
@@ -6853,14 +6852,12 @@ function hydrateCustomElement(elm, vnode, renderer) {
6853
6852
  function hydrateChildren(node, children, parentNode, owner) {
6854
6853
  let hasWarned = false;
6855
6854
  let nextNode = node;
6856
- let anchor = null;
6857
6855
  const { renderer } = owner;
6858
6856
  for (let i = 0; i < children.length; i++) {
6859
6857
  const childVnode = children[i];
6860
6858
  if (!isNull(childVnode)) {
6861
6859
  if (nextNode) {
6862
6860
  nextNode = hydrateNode(nextNode, childVnode, renderer);
6863
- anchor = childVnode.elm;
6864
6861
  }
6865
6862
  else {
6866
6863
  hasMismatch = true;
@@ -6870,8 +6867,8 @@ function hydrateChildren(node, children, parentNode, owner) {
6870
6867
  logError(`Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.`, owner);
6871
6868
  }
6872
6869
  }
6873
- mount(childVnode, parentNode, renderer, anchor);
6874
- anchor = childVnode.elm;
6870
+ mount(childVnode, parentNode, renderer, nextNode);
6871
+ nextNode = renderer.nextSibling(childVnode.elm);
6875
6872
  }
6876
6873
  }
6877
6874
  }
@@ -7378,7 +7375,7 @@ function readonly(obj) {
7378
7375
  }
7379
7376
  return getReadOnlyProxy(obj);
7380
7377
  }
7381
- /* version: 2.45.2 */
7378
+ /** version: 2.45.4 */
7382
7379
 
7383
7380
  /*
7384
7381
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7640,6 +7637,7 @@ const hasCustomElements = isCustomElementRegistryAvailable();
7640
7637
  * SPDX-License-Identifier: MIT
7641
7638
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
7642
7639
  */
7640
+ new WeakMap();
7643
7641
  // Creates a custom element for compat (legacy) browser environments
7644
7642
  const createCustomElementCompat = (tagName, upgradeCallback) => {
7645
7643
  const elm = document.createElement(tagName);
@@ -7765,8 +7763,9 @@ else {
7765
7763
  function rendererFactory(baseRenderer) {
7766
7764
  const renderer = (function (exports) {
7767
7765
 
7766
+ /* proxy-compat-disable */
7768
7767
  /**
7769
- * Copyright (C) 2018 salesforce.com, inc.
7768
+ * Copyright (C) 2023 salesforce.com, inc.
7770
7769
  */
7771
7770
  /*
7772
7771
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7806,7 +7805,7 @@ function rendererFactory(baseRenderer) {
7806
7805
  function isNull(obj) {
7807
7806
  return obj === null;
7808
7807
  }
7809
- /** version: 2.45.2 */
7808
+ /** version: 2.45.4 */
7810
7809
 
7811
7810
  /*
7812
7811
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8425,7 +8424,7 @@ function registerContextProvider(elm, adapterContextToken, onContextSubscription
8425
8424
  });
8426
8425
  }));
8427
8426
  }
8428
- /* version: 2.45.2 */
8427
+ /** version: 2.45.4 */
8429
8428
 
8430
8429
  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
8430
  //# sourceMappingURL=engine-dom.js.map