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
@@ -29,9 +29,11 @@ var LWC = (function (exports) {
29
29
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
30
30
  function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
31
31
  function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
32
- /* proxy-compat-disable */
33
32
  /**
34
- * Copyright (C) 2018 salesforce.com, inc.
33
+ * Copyright (C) 2023 salesforce.com, inc.
34
+ */
35
+ /**
36
+ * Copyright (C) 2023 salesforce.com, inc.
35
37
  */
36
38
  /*
37
39
  * Copyright (c) 2018, salesforce.com, inc.
@@ -211,7 +213,7 @@ var LWC = (function (exports) {
211
213
  AriaPropNameToAttrNameMap = _ref.AriaPropNameToAttrNameMap;
212
214
  // These attributes take either an ID or a list of IDs as values.
213
215
  // This includes aria-* attributes as well as the special non-ARIA "for" attribute
214
- var ID_REFERENCING_ATTRIBUTES_SET = new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
216
+ var ID_REFERENCING_ATTRIBUTES_SET = /*@__PURE__*/new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
215
217
 
216
218
  /*
217
219
  * Copyright (c) 2018, salesforce.com, inc.
@@ -274,11 +276,11 @@ var LWC = (function (exports) {
274
276
  /**
275
277
  * Map associating previously transformed HTML property into HTML attribute.
276
278
  */
277
- var CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
279
+ var CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/new Map();
278
280
  /**
279
281
  * Map associating previously transformed HTML attribute into HTML property.
280
282
  */
281
- var CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
283
+ var CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/new Map();
282
284
  function htmlPropertyToAttribute(propName) {
283
285
  var ariaAttributeName = AriaPropNameToAttrNameMap[propName];
284
286
  if (!isUndefined$1(ariaAttributeName)) {
@@ -326,10 +328,10 @@ var LWC = (function (exports) {
326
328
  CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
327
329
  return propertyName;
328
330
  }
329
- /** version: 2.45.2 */
331
+ /** version: 2.45.3 */
330
332
 
331
333
  /**
332
- * Copyright (C) 2018 salesforce.com, inc.
334
+ * Copyright (C) 2023 salesforce.com, inc.
333
335
  */
334
336
 
335
337
  /*
@@ -397,10 +399,10 @@ var LWC = (function (exports) {
397
399
  */
398
400
  function setFeatureFlagForTest(name, value) {
399
401
  }
400
- /** version: 2.45.2 */
402
+ /** version: 2.45.3 */
401
403
 
402
404
  /**
403
- * Copyright (C) 2018 salesforce.com, inc.
405
+ * Copyright (C) 2023 salesforce.com, inc.
404
406
  */
405
407
 
406
408
  /*
@@ -461,7 +463,7 @@ var LWC = (function (exports) {
461
463
  }
462
464
  }
463
465
  }
464
- /** version: 2.45.2 */
466
+ /** version: 2.45.3 */
465
467
 
466
468
  /*
467
469
  * Copyright (c) 2018, salesforce.com, inc.
@@ -475,7 +477,9 @@ var LWC = (function (exports) {
475
477
  applyAriaReflection();
476
478
  }
477
479
 
478
- /* proxy-compat-disable */
480
+ /**
481
+ * Copyright (C) 2023 salesforce.com, inc.
482
+ */
479
483
 
480
484
  /*
481
485
  * Copyright (c) 2018, salesforce.com, inc.
@@ -899,19 +903,6 @@ var LWC = (function (exports) {
899
903
  */
900
904
  // These properties get added to LWCElement.prototype publicProps automatically
901
905
  var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
902
- var controlledElement = null;
903
- var controlledAttributeName;
904
- function isAttributeLocked(elm, attrName) {
905
- return elm !== controlledElement || attrName !== controlledAttributeName;
906
- }
907
- function lockAttribute(_elm, _key) {
908
- controlledElement = null;
909
- controlledAttributeName = undefined;
910
- }
911
- function unlockAttribute(elm, key) {
912
- controlledElement = elm;
913
- controlledAttributeName = key;
914
- }
915
906
 
916
907
  /*
917
908
  * Copyright (c) 2018, salesforce.com, inc.
@@ -1527,6 +1518,14 @@ var LWC = (function (exports) {
1527
1518
  * SPDX-License-Identifier: MIT
1528
1519
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1529
1520
  */
1521
+ /**
1522
+ * This module is responsible for producing the ComponentDef object that is always
1523
+ * accessible via `vm.def`. This is lazily created during the creation of the first
1524
+ * instance of a component class, and shared across all instances.
1525
+ *
1526
+ * This structure can be used to synthetically create proxies, and understand the
1527
+ * shape of a component. It is also used internally to apply extra optimizations.
1528
+ */
1530
1529
  /**
1531
1530
  * This operation is called with a descriptor of an standard html property
1532
1531
  * that a Custom Element can support (including AOM properties), which
@@ -1657,17 +1656,13 @@ var LWC = (function (exports) {
1657
1656
  var vm = getAssociatedVM(this);
1658
1657
  var elm = vm.elm,
1659
1658
  removeAttribute = vm.renderer.removeAttribute;
1660
- unlockAttribute(elm, name);
1661
1659
  removeAttribute(elm, name);
1662
- lockAttribute();
1663
1660
  },
1664
1661
  removeAttributeNS: function removeAttributeNS(namespace, name) {
1665
1662
  var _getAssociatedVM = getAssociatedVM(this),
1666
1663
  elm = _getAssociatedVM.elm,
1667
1664
  removeAttribute = _getAssociatedVM.renderer.removeAttribute;
1668
- unlockAttribute(elm, name);
1669
1665
  removeAttribute(elm, name, namespace);
1670
- lockAttribute();
1671
1666
  },
1672
1667
  getAttribute: function getAttribute(name) {
1673
1668
  var vm = getAssociatedVM(this);
@@ -1685,17 +1680,13 @@ var LWC = (function (exports) {
1685
1680
  var vm = getAssociatedVM(this);
1686
1681
  var elm = vm.elm,
1687
1682
  setAttribute = vm.renderer.setAttribute;
1688
- unlockAttribute(elm, name);
1689
1683
  setAttribute(elm, name, value);
1690
- lockAttribute();
1691
1684
  },
1692
1685
  setAttributeNS: function setAttributeNS(namespace, name, value) {
1693
1686
  var vm = getAssociatedVM(this);
1694
1687
  var elm = vm.elm,
1695
1688
  setAttribute = vm.renderer.setAttribute;
1696
- unlockAttribute(elm, name);
1697
1689
  setAttribute(elm, name, value, namespace);
1698
- lockAttribute();
1699
1690
  },
1700
1691
  getBoundingClientRect: function getBoundingClientRect() {
1701
1692
  var vm = getAssociatedVM(this);
@@ -2028,7 +2019,9 @@ var LWC = (function (exports) {
2028
2019
  });
2029
2020
  runWithBoundaryProtection(vm, vm, noop, function () {
2030
2021
  // job
2031
- connector = new adapter(dataCallback);
2022
+ connector = new adapter(dataCallback, {
2023
+ tagName: vm.tagName
2024
+ });
2032
2025
  }, noop);
2033
2026
  var updateConnectorConfig = function updateConnectorConfig(config) {
2034
2027
  // every time the config is recomputed due to tracking,
@@ -2413,6 +2406,10 @@ var LWC = (function (exports) {
2413
2406
  * SPDX-License-Identifier: MIT
2414
2407
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2415
2408
  */
2409
+ /**
2410
+ * This module is responsible for creating the base bridge class BaseBridgeElement
2411
+ * that represents the HTMLElement extension used for any LWC inserted in the DOM.
2412
+ */
2416
2413
  // A bridge descriptor is a descriptor whose job is just to get the component instance
2417
2414
  // from the element instance, and get the value or set a new value on the component.
2418
2415
  // This means that across different elements, similar names can get the exact same
@@ -2467,14 +2464,6 @@ var LWC = (function (exports) {
2467
2464
  }
2468
2465
  return;
2469
2466
  }
2470
- if (!isAttributeLocked(this, attrName)) {
2471
- // Ignore changes triggered by the engine itself during:
2472
- // * diffing when public props are attempting to reflect to the DOM
2473
- // * component via `this.setAttribute()`, should never update the prop
2474
- // Both cases, the setAttribute call is always wrapped by the unlocking of the
2475
- // attribute to be changed
2476
- return;
2477
- }
2478
2467
  // Reflect attribute change to the corresponding property when changed from outside.
2479
2468
  this[propName] = newValue;
2480
2469
  };
@@ -2693,6 +2682,15 @@ var LWC = (function (exports) {
2693
2682
  return ModernWeakMultiMap;
2694
2683
  }();
2695
2684
  var WeakMultiMap = supportsWeakRefs ? ModernWeakMultiMap : LegacyWeakMultiMap;
2685
+
2686
+ /*
2687
+ * Copyright (c) 2020, salesforce.com, inc.
2688
+ * All rights reserved.
2689
+ * SPDX-License-Identifier: MIT
2690
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2691
+ */
2692
+ new WeakMap();
2693
+ new WeakMap();
2696
2694
  var swappedStyleMap = new WeakMap();
2697
2695
  // The important thing here is the weak values – VMs are transient (one per component instance) and should be GC'ed,
2698
2696
  // so we don't want to create strong references to them.
@@ -2763,6 +2761,14 @@ var LWC = (function (exports) {
2763
2761
  * SPDX-License-Identifier: MIT
2764
2762
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2765
2763
  */
2764
+ /**
2765
+ * This module is responsible for producing the ComponentDef object that is always
2766
+ * accessible via `vm.def`. This is lazily created during the creation of the first
2767
+ * instance of a component class, and shared across all instances.
2768
+ *
2769
+ * This structure can be used to synthetically create proxies, and understand the
2770
+ * shape of a component. It is also used internally to apply extra optimizations.
2771
+ */
2766
2772
  var CtorToDefMap = new WeakMap();
2767
2773
  function getCtorProto(Ctor) {
2768
2774
  var proto = getPrototypeOf$1(Ctor);
@@ -2934,9 +2940,9 @@ var LWC = (function (exports) {
2934
2940
  };
2935
2941
  }
2936
2942
  var publicMethods = {};
2937
- for (var _key2 in methods) {
2943
+ for (var _key in methods) {
2938
2944
  // avoid leaking the reference to the public method descriptors
2939
- publicMethods[_key2] = methods[_key2].value;
2945
+ publicMethods[_key] = methods[_key].value;
2940
2946
  }
2941
2947
  return {
2942
2948
  ctor: ctor,
@@ -3187,7 +3193,6 @@ var LWC = (function (exports) {
3187
3193
  var cur = attrs[key];
3188
3194
  var old = oldAttrs[key];
3189
3195
  if (old !== cur) {
3190
- unlockAttribute(elm, key);
3191
3196
  if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
3192
3197
  // Assume xml namespace
3193
3198
  setAttribute(elm, key, cur, XML_NAMESPACE);
@@ -3199,7 +3204,6 @@ var LWC = (function (exports) {
3199
3204
  } else {
3200
3205
  setAttribute(elm, key, cur);
3201
3206
  }
3202
- lockAttribute();
3203
3207
  }
3204
3208
  }
3205
3209
  }
@@ -4609,8 +4613,8 @@ var LWC = (function (exports) {
4609
4613
  }
4610
4614
  function buildParseFragmentFn(createFragmentFn) {
4611
4615
  return function (strings) {
4612
- for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
4613
- keys[_key3 - 1] = arguments[_key3];
4616
+ for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key2 = 1; _key2 < _len3; _key2++) {
4617
+ keys[_key2 - 1] = arguments[_key2];
4614
4618
  }
4615
4619
  var cache = create(null);
4616
4620
  return function () {
@@ -5852,18 +5856,16 @@ var LWC = (function (exports) {
5852
5856
  }
5853
5857
  function hydrateChildren(node, children, parentNode, owner) {
5854
5858
  var nextNode = node;
5855
- var anchor = null;
5856
5859
  var renderer = owner.renderer;
5857
5860
  for (var _i36 = 0; _i36 < children.length; _i36++) {
5858
5861
  var childVnode = children[_i36];
5859
5862
  if (!isNull(childVnode)) {
5860
5863
  if (nextNode) {
5861
5864
  nextNode = hydrateNode(nextNode, childVnode, renderer);
5862
- anchor = childVnode.elm;
5863
5865
  } else {
5864
5866
  hasMismatch = true;
5865
- mount(childVnode, parentNode, renderer, anchor);
5866
- anchor = childVnode.elm;
5867
+ mount(childVnode, parentNode, renderer, nextNode);
5868
+ nextNode = renderer.nextSibling(childVnode.elm);
5867
5869
  }
5868
5870
  }
5869
5871
  }
@@ -6529,6 +6531,7 @@ var LWC = (function (exports) {
6529
6531
  * SPDX-License-Identifier: MIT
6530
6532
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6531
6533
  */
6534
+ new WeakMap();
6532
6535
  // Creates a custom element for compat (legacy) browser environments
6533
6536
  var createCustomElementCompat = function createCustomElementCompat(tagName, upgradeCallback) {
6534
6537
  var elm = document.createElement(tagName);
@@ -6656,7 +6659,7 @@ var LWC = (function (exports) {
6656
6659
  function rendererFactory(baseRenderer) {
6657
6660
  var renderer = function (exports) {
6658
6661
  /**
6659
- * Copyright (C) 2018 salesforce.com, inc.
6662
+ * Copyright (C) 2023 salesforce.com, inc.
6660
6663
  */
6661
6664
  /*
6662
6665
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6695,7 +6698,7 @@ var LWC = (function (exports) {
6695
6698
  function isNull(obj) {
6696
6699
  return obj === null;
6697
6700
  }
6698
- /** version: 2.45.2 */
6701
+ /** version: 2.45.3 */
6699
6702
 
6700
6703
  /*
6701
6704
  * Copyright (c) 2023, salesforce.com, inc.
@@ -7330,7 +7333,7 @@ var LWC = (function (exports) {
7330
7333
  });
7331
7334
  });
7332
7335
  }
7333
- /* version: 2.45.2 */
7336
+ /** version: 2.45.3 */
7334
7337
 
7335
7338
  exports.LightningElement = LightningElement;
7336
7339
  exports.__unstable__ProfilerControl = profilerControl;