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.
@@ -215,7 +217,7 @@ var LWC = (function (exports) {
215
217
  AriaPropNameToAttrNameMap = _ref.AriaPropNameToAttrNameMap;
216
218
  // These attributes take either an ID or a list of IDs as values.
217
219
  // This includes aria-* attributes as well as the special non-ARIA "for" attribute
218
- var ID_REFERENCING_ATTRIBUTES_SET = new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
220
+ 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']);
219
221
 
220
222
  /*
221
223
  * Copyright (c) 2018, salesforce.com, inc.
@@ -278,11 +280,11 @@ var LWC = (function (exports) {
278
280
  /**
279
281
  * Map associating previously transformed HTML property into HTML attribute.
280
282
  */
281
- var CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
283
+ var CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/new Map();
282
284
  /**
283
285
  * Map associating previously transformed HTML attribute into HTML property.
284
286
  */
285
- var CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
287
+ var CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/new Map();
286
288
  function htmlPropertyToAttribute(propName) {
287
289
  var ariaAttributeName = AriaPropNameToAttrNameMap[propName];
288
290
  if (!isUndefined$1(ariaAttributeName)) {
@@ -338,12 +340,12 @@ var LWC = (function (exports) {
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
- var LWC_VERSION = "2.45.2";
343
+ var LWC_VERSION = "2.45.3";
342
344
  var 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
  /*
@@ -420,10 +422,10 @@ var LWC = (function (exports) {
420
422
  setFeatureFlag(name, value);
421
423
  }
422
424
  }
423
- /** version: 2.45.2 */
425
+ /** version: 2.45.3 */
424
426
 
425
427
  /**
426
- * Copyright (C) 2018 salesforce.com, inc.
428
+ * Copyright (C) 2023 salesforce.com, inc.
427
429
  */
428
430
 
429
431
  /*
@@ -484,7 +486,7 @@ var LWC = (function (exports) {
484
486
  }
485
487
  }
486
488
  }
487
- /** version: 2.45.2 */
489
+ /** version: 2.45.3 */
488
490
 
489
491
  /*
490
492
  * Copyright (c) 2018, salesforce.com, inc.
@@ -498,7 +500,9 @@ var LWC = (function (exports) {
498
500
  applyAriaReflection();
499
501
  }
500
502
 
501
- /* proxy-compat-disable */
503
+ /**
504
+ * Copyright (C) 2023 salesforce.com, inc.
505
+ */
502
506
 
503
507
  /*
504
508
  * Copyright (c) 2018, salesforce.com, inc.
@@ -951,19 +955,6 @@ var LWC = (function (exports) {
951
955
  */
952
956
  // These properties get added to LWCElement.prototype publicProps automatically
953
957
  var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
954
- var controlledElement = null;
955
- var controlledAttributeName;
956
- function isAttributeLocked(elm, attrName) {
957
- return elm !== controlledElement || attrName !== controlledAttributeName;
958
- }
959
- function lockAttribute(_elm, _key) {
960
- controlledElement = null;
961
- controlledAttributeName = undefined;
962
- }
963
- function unlockAttribute(elm, key) {
964
- controlledElement = elm;
965
- controlledAttributeName = key;
966
- }
967
958
 
968
959
  /*
969
960
  * Copyright (c) 2018, salesforce.com, inc.
@@ -1002,6 +993,7 @@ var LWC = (function (exports) {
1002
993
  * SPDX-License-Identifier: MIT
1003
994
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1004
995
  */
996
+ /* eslint @lwc/lwc-internal/no-production-assert: "off" */
1005
997
  function generateDataDescriptor(options) {
1006
998
  return assign({
1007
999
  configurable: true,
@@ -1947,6 +1939,14 @@ var LWC = (function (exports) {
1947
1939
  * SPDX-License-Identifier: MIT
1948
1940
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1949
1941
  */
1942
+ /**
1943
+ * This module is responsible for producing the ComponentDef object that is always
1944
+ * accessible via `vm.def`. This is lazily created during the creation of the first
1945
+ * instance of a component class, and shared across all instances.
1946
+ *
1947
+ * This structure can be used to synthetically create proxies, and understand the
1948
+ * shape of a component. It is also used internally to apply extra optimizations.
1949
+ */
1950
1950
  /**
1951
1951
  * This operation is called with a descriptor of an standard html property
1952
1952
  * that a Custom Element can support (including AOM properties), which
@@ -2123,17 +2123,13 @@ var LWC = (function (exports) {
2123
2123
  var vm = getAssociatedVM(this);
2124
2124
  var elm = vm.elm,
2125
2125
  removeAttribute = vm.renderer.removeAttribute;
2126
- unlockAttribute(elm, name);
2127
2126
  removeAttribute(elm, name);
2128
- lockAttribute();
2129
2127
  },
2130
2128
  removeAttributeNS: function removeAttributeNS(namespace, name) {
2131
2129
  var _getAssociatedVM = getAssociatedVM(this),
2132
2130
  elm = _getAssociatedVM.elm,
2133
2131
  removeAttribute = _getAssociatedVM.renderer.removeAttribute;
2134
- unlockAttribute(elm, name);
2135
2132
  removeAttribute(elm, name, namespace);
2136
- lockAttribute();
2137
2133
  },
2138
2134
  getAttribute: function getAttribute(name) {
2139
2135
  var vm = getAssociatedVM(this);
@@ -2156,9 +2152,7 @@ var LWC = (function (exports) {
2156
2152
  logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
2157
2153
  }
2158
2154
  }
2159
- unlockAttribute(elm, name);
2160
2155
  setAttribute(elm, name, value);
2161
- lockAttribute();
2162
2156
  },
2163
2157
  setAttributeNS: function setAttributeNS(namespace, name, value) {
2164
2158
  var vm = getAssociatedVM(this);
@@ -2169,9 +2163,7 @@ var LWC = (function (exports) {
2169
2163
  logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
2170
2164
  }
2171
2165
  }
2172
- unlockAttribute(elm, name);
2173
2166
  setAttribute(elm, name, value, namespace);
2174
- lockAttribute();
2175
2167
  },
2176
2168
  getBoundingClientRect: function getBoundingClientRect() {
2177
2169
  var vm = getAssociatedVM(this);
@@ -2571,7 +2563,9 @@ var LWC = (function (exports) {
2571
2563
  });
2572
2564
  runWithBoundaryProtection(vm, vm, noop, function () {
2573
2565
  // job
2574
- connector = new adapter(dataCallback);
2566
+ connector = new adapter(dataCallback, {
2567
+ tagName: vm.tagName
2568
+ });
2575
2569
  }, noop);
2576
2570
  var updateConnectorConfig = function updateConnectorConfig(config) {
2577
2571
  // every time the config is recomputed due to tracking,
@@ -3161,6 +3155,10 @@ var LWC = (function (exports) {
3161
3155
  * SPDX-License-Identifier: MIT
3162
3156
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3163
3157
  */
3158
+ /**
3159
+ * This module is responsible for creating the base bridge class BaseBridgeElement
3160
+ * that represents the HTMLElement extension used for any LWC inserted in the DOM.
3161
+ */
3164
3162
  // A bridge descriptor is a descriptor whose job is just to get the component instance
3165
3163
  // from the element instance, and get the value or set a new value on the component.
3166
3164
  // This means that across different elements, similar names can get the exact same
@@ -3215,14 +3213,6 @@ var LWC = (function (exports) {
3215
3213
  }
3216
3214
  return;
3217
3215
  }
3218
- if (!isAttributeLocked(this, attrName)) {
3219
- // Ignore changes triggered by the engine itself during:
3220
- // * diffing when public props are attempting to reflect to the DOM
3221
- // * component via `this.setAttribute()`, should never update the prop
3222
- // Both cases, the setAttribute call is always wrapped by the unlocking of the
3223
- // attribute to be changed
3224
- return;
3225
- }
3226
3216
  // Reflect attribute change to the corresponding property when changed from outside.
3227
3217
  this[propName] = newValue;
3228
3218
  };
@@ -3637,6 +3627,14 @@ var LWC = (function (exports) {
3637
3627
  * SPDX-License-Identifier: MIT
3638
3628
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3639
3629
  */
3630
+ /**
3631
+ * This module is responsible for producing the ComponentDef object that is always
3632
+ * accessible via `vm.def`. This is lazily created during the creation of the first
3633
+ * instance of a component class, and shared across all instances.
3634
+ *
3635
+ * This structure can be used to synthetically create proxies, and understand the
3636
+ * shape of a component. It is also used internally to apply extra optimizations.
3637
+ */
3640
3638
  var CtorToDefMap = new WeakMap();
3641
3639
  function getCtorProto(Ctor) {
3642
3640
  var proto = getPrototypeOf$1(Ctor);
@@ -3835,9 +3833,9 @@ var LWC = (function (exports) {
3835
3833
  };
3836
3834
  }
3837
3835
  var publicMethods = {};
3838
- for (var _key2 in methods) {
3836
+ for (var _key in methods) {
3839
3837
  // avoid leaking the reference to the public method descriptors
3840
- publicMethods[_key2] = methods[_key2].value;
3838
+ publicMethods[_key] = methods[_key].value;
3841
3839
  }
3842
3840
  return {
3843
3841
  ctor: ctor,
@@ -4096,7 +4094,6 @@ var LWC = (function (exports) {
4096
4094
  var cur = attrs[key];
4097
4095
  var old = oldAttrs[key];
4098
4096
  if (old !== cur) {
4099
- unlockAttribute(elm, key);
4100
4097
  if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
4101
4098
  // Assume xml namespace
4102
4099
  setAttribute(elm, key, cur, XML_NAMESPACE);
@@ -4108,7 +4105,6 @@ var LWC = (function (exports) {
4108
4105
  } else {
4109
4106
  setAttribute(elm, key, cur);
4110
4107
  }
4111
- lockAttribute();
4112
4108
  }
4113
4109
  }
4114
4110
  }
@@ -5769,8 +5765,8 @@ var LWC = (function (exports) {
5769
5765
  }
5770
5766
  function buildParseFragmentFn(createFragmentFn) {
5771
5767
  return function (strings) {
5772
- for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
5773
- keys[_key3 - 1] = arguments[_key3];
5768
+ for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key2 = 1; _key2 < _len3; _key2++) {
5769
+ keys[_key2 - 1] = arguments[_key2];
5774
5770
  }
5775
5771
  var cache = create(null);
5776
5772
  return function () {
@@ -7187,14 +7183,12 @@ var LWC = (function (exports) {
7187
7183
  function hydrateChildren(node, children, parentNode, owner) {
7188
7184
  var hasWarned = false;
7189
7185
  var nextNode = node;
7190
- var anchor = null;
7191
7186
  var renderer = owner.renderer;
7192
7187
  for (var _i36 = 0; _i36 < children.length; _i36++) {
7193
7188
  var childVnode = children[_i36];
7194
7189
  if (!isNull(childVnode)) {
7195
7190
  if (nextNode) {
7196
7191
  nextNode = hydrateNode(nextNode, childVnode, renderer);
7197
- anchor = childVnode.elm;
7198
7192
  } else {
7199
7193
  hasMismatch = true;
7200
7194
  if (process.env.NODE_ENV !== 'production') {
@@ -7203,8 +7197,8 @@ var LWC = (function (exports) {
7203
7197
  logError("Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.", owner);
7204
7198
  }
7205
7199
  }
7206
- mount(childVnode, parentNode, renderer, anchor);
7207
- anchor = childVnode.elm;
7200
+ mount(childVnode, parentNode, renderer, nextNode);
7201
+ nextNode = renderer.nextSibling(childVnode.elm);
7208
7202
  }
7209
7203
  }
7210
7204
  }
@@ -7742,7 +7736,7 @@ var LWC = (function (exports) {
7742
7736
  }
7743
7737
  return getReadOnlyProxy(obj);
7744
7738
  }
7745
- /* version: 2.45.2 */
7739
+ /** version: 2.45.3 */
7746
7740
 
7747
7741
  /*
7748
7742
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8002,6 +7996,7 @@ var LWC = (function (exports) {
8002
7996
  * SPDX-License-Identifier: MIT
8003
7997
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
8004
7998
  */
7999
+ new WeakMap();
8005
8000
  // Creates a custom element for compat (legacy) browser environments
8006
8001
  var createCustomElementCompat = function createCustomElementCompat(tagName, upgradeCallback) {
8007
8002
  var elm = document.createElement(tagName);
@@ -8129,7 +8124,7 @@ var LWC = (function (exports) {
8129
8124
  function rendererFactory(baseRenderer) {
8130
8125
  var renderer = function (exports) {
8131
8126
  /**
8132
- * Copyright (C) 2018 salesforce.com, inc.
8127
+ * Copyright (C) 2023 salesforce.com, inc.
8133
8128
  */
8134
8129
  /*
8135
8130
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8168,7 +8163,7 @@ var LWC = (function (exports) {
8168
8163
  function isNull(obj) {
8169
8164
  return obj === null;
8170
8165
  }
8171
- /** version: 2.45.2 */
8166
+ /** version: 2.45.3 */
8172
8167
 
8173
8168
  /*
8174
8169
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8810,7 +8805,7 @@ var LWC = (function (exports) {
8810
8805
  });
8811
8806
  });
8812
8807
  }
8813
- /* version: 2.45.2 */
8808
+ /** version: 2.45.3 */
8814
8809
 
8815
8810
  exports.LightningElement = LightningElement;
8816
8811
  exports.__unstable__ProfilerControl = profilerControl;