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
@@ -32,9 +32,11 @@
32
32
  function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
33
33
  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); }
34
34
  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); }
35
- /* proxy-compat-disable */
36
35
  /**
37
- * Copyright (C) 2018 salesforce.com, inc.
36
+ * Copyright (C) 2023 salesforce.com, inc.
37
+ */
38
+ /**
39
+ * Copyright (C) 2023 salesforce.com, inc.
38
40
  */
39
41
  /*
40
42
  * Copyright (c) 2018, salesforce.com, inc.
@@ -218,7 +220,7 @@
218
220
  AriaPropNameToAttrNameMap = _ref.AriaPropNameToAttrNameMap;
219
221
  // These attributes take either an ID or a list of IDs as values.
220
222
  // This includes aria-* attributes as well as the special non-ARIA "for" attribute
221
- var ID_REFERENCING_ATTRIBUTES_SET = new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
223
+ 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']);
222
224
 
223
225
  /*
224
226
  * Copyright (c) 2018, salesforce.com, inc.
@@ -281,11 +283,11 @@
281
283
  /**
282
284
  * Map associating previously transformed HTML property into HTML attribute.
283
285
  */
284
- var CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
286
+ var CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/new Map();
285
287
  /**
286
288
  * Map associating previously transformed HTML attribute into HTML property.
287
289
  */
288
- var CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
290
+ var CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/new Map();
289
291
  function htmlPropertyToAttribute(propName) {
290
292
  var ariaAttributeName = AriaPropNameToAttrNameMap[propName];
291
293
  if (!isUndefined$1(ariaAttributeName)) {
@@ -341,12 +343,12 @@
341
343
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
342
344
  */
343
345
  // Increment whenever the LWC template compiler changes
344
- var LWC_VERSION = "2.45.2";
346
+ var LWC_VERSION = "2.45.3";
345
347
  var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
346
- /** version: 2.45.2 */
348
+ /** version: 2.45.3 */
347
349
 
348
350
  /**
349
- * Copyright (C) 2018 salesforce.com, inc.
351
+ * Copyright (C) 2023 salesforce.com, inc.
350
352
  */
351
353
 
352
354
  /*
@@ -423,10 +425,10 @@
423
425
  setFeatureFlag(name, value);
424
426
  }
425
427
  }
426
- /** version: 2.45.2 */
428
+ /** version: 2.45.3 */
427
429
 
428
430
  /**
429
- * Copyright (C) 2018 salesforce.com, inc.
431
+ * Copyright (C) 2023 salesforce.com, inc.
430
432
  */
431
433
 
432
434
  /*
@@ -487,7 +489,7 @@
487
489
  }
488
490
  }
489
491
  }
490
- /** version: 2.45.2 */
492
+ /** version: 2.45.3 */
491
493
 
492
494
  /*
493
495
  * Copyright (c) 2018, salesforce.com, inc.
@@ -501,7 +503,9 @@
501
503
  applyAriaReflection();
502
504
  }
503
505
 
504
- /* proxy-compat-disable */
506
+ /**
507
+ * Copyright (C) 2023 salesforce.com, inc.
508
+ */
505
509
 
506
510
  /*
507
511
  * Copyright (c) 2018, salesforce.com, inc.
@@ -954,19 +958,6 @@
954
958
  */
955
959
  // These properties get added to LWCElement.prototype publicProps automatically
956
960
  var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
957
- var controlledElement = null;
958
- var controlledAttributeName;
959
- function isAttributeLocked(elm, attrName) {
960
- return elm !== controlledElement || attrName !== controlledAttributeName;
961
- }
962
- function lockAttribute(_elm, _key) {
963
- controlledElement = null;
964
- controlledAttributeName = undefined;
965
- }
966
- function unlockAttribute(elm, key) {
967
- controlledElement = elm;
968
- controlledAttributeName = key;
969
- }
970
961
 
971
962
  /*
972
963
  * Copyright (c) 2018, salesforce.com, inc.
@@ -1005,6 +996,7 @@
1005
996
  * SPDX-License-Identifier: MIT
1006
997
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1007
998
  */
999
+ /* eslint @lwc/lwc-internal/no-production-assert: "off" */
1008
1000
  function generateDataDescriptor(options) {
1009
1001
  return assign({
1010
1002
  configurable: true,
@@ -1950,6 +1942,14 @@
1950
1942
  * SPDX-License-Identifier: MIT
1951
1943
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1952
1944
  */
1945
+ /**
1946
+ * This module is responsible for producing the ComponentDef object that is always
1947
+ * accessible via `vm.def`. This is lazily created during the creation of the first
1948
+ * instance of a component class, and shared across all instances.
1949
+ *
1950
+ * This structure can be used to synthetically create proxies, and understand the
1951
+ * shape of a component. It is also used internally to apply extra optimizations.
1952
+ */
1953
1953
  /**
1954
1954
  * This operation is called with a descriptor of an standard html property
1955
1955
  * that a Custom Element can support (including AOM properties), which
@@ -2126,17 +2126,13 @@
2126
2126
  var vm = getAssociatedVM(this);
2127
2127
  var elm = vm.elm,
2128
2128
  removeAttribute = vm.renderer.removeAttribute;
2129
- unlockAttribute(elm, name);
2130
2129
  removeAttribute(elm, name);
2131
- lockAttribute();
2132
2130
  },
2133
2131
  removeAttributeNS: function removeAttributeNS(namespace, name) {
2134
2132
  var _getAssociatedVM = getAssociatedVM(this),
2135
2133
  elm = _getAssociatedVM.elm,
2136
2134
  removeAttribute = _getAssociatedVM.renderer.removeAttribute;
2137
- unlockAttribute(elm, name);
2138
2135
  removeAttribute(elm, name, namespace);
2139
- lockAttribute();
2140
2136
  },
2141
2137
  getAttribute: function getAttribute(name) {
2142
2138
  var vm = getAssociatedVM(this);
@@ -2159,9 +2155,7 @@
2159
2155
  logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
2160
2156
  }
2161
2157
  }
2162
- unlockAttribute(elm, name);
2163
2158
  setAttribute(elm, name, value);
2164
- lockAttribute();
2165
2159
  },
2166
2160
  setAttributeNS: function setAttributeNS(namespace, name, value) {
2167
2161
  var vm = getAssociatedVM(this);
@@ -2172,9 +2166,7 @@
2172
2166
  logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
2173
2167
  }
2174
2168
  }
2175
- unlockAttribute(elm, name);
2176
2169
  setAttribute(elm, name, value, namespace);
2177
- lockAttribute();
2178
2170
  },
2179
2171
  getBoundingClientRect: function getBoundingClientRect() {
2180
2172
  var vm = getAssociatedVM(this);
@@ -2574,7 +2566,9 @@
2574
2566
  });
2575
2567
  runWithBoundaryProtection(vm, vm, noop, function () {
2576
2568
  // job
2577
- connector = new adapter(dataCallback);
2569
+ connector = new adapter(dataCallback, {
2570
+ tagName: vm.tagName
2571
+ });
2578
2572
  }, noop);
2579
2573
  var updateConnectorConfig = function updateConnectorConfig(config) {
2580
2574
  // every time the config is recomputed due to tracking,
@@ -3164,6 +3158,10 @@
3164
3158
  * SPDX-License-Identifier: MIT
3165
3159
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3166
3160
  */
3161
+ /**
3162
+ * This module is responsible for creating the base bridge class BaseBridgeElement
3163
+ * that represents the HTMLElement extension used for any LWC inserted in the DOM.
3164
+ */
3167
3165
  // A bridge descriptor is a descriptor whose job is just to get the component instance
3168
3166
  // from the element instance, and get the value or set a new value on the component.
3169
3167
  // This means that across different elements, similar names can get the exact same
@@ -3218,14 +3216,6 @@
3218
3216
  }
3219
3217
  return;
3220
3218
  }
3221
- if (!isAttributeLocked(this, attrName)) {
3222
- // Ignore changes triggered by the engine itself during:
3223
- // * diffing when public props are attempting to reflect to the DOM
3224
- // * component via `this.setAttribute()`, should never update the prop
3225
- // Both cases, the setAttribute call is always wrapped by the unlocking of the
3226
- // attribute to be changed
3227
- return;
3228
- }
3229
3219
  // Reflect attribute change to the corresponding property when changed from outside.
3230
3220
  this[propName] = newValue;
3231
3221
  };
@@ -3640,6 +3630,14 @@
3640
3630
  * SPDX-License-Identifier: MIT
3641
3631
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3642
3632
  */
3633
+ /**
3634
+ * This module is responsible for producing the ComponentDef object that is always
3635
+ * accessible via `vm.def`. This is lazily created during the creation of the first
3636
+ * instance of a component class, and shared across all instances.
3637
+ *
3638
+ * This structure can be used to synthetically create proxies, and understand the
3639
+ * shape of a component. It is also used internally to apply extra optimizations.
3640
+ */
3643
3641
  var CtorToDefMap = new WeakMap();
3644
3642
  function getCtorProto(Ctor) {
3645
3643
  var proto = getPrototypeOf$1(Ctor);
@@ -3838,9 +3836,9 @@
3838
3836
  };
3839
3837
  }
3840
3838
  var publicMethods = {};
3841
- for (var _key2 in methods) {
3839
+ for (var _key in methods) {
3842
3840
  // avoid leaking the reference to the public method descriptors
3843
- publicMethods[_key2] = methods[_key2].value;
3841
+ publicMethods[_key] = methods[_key].value;
3844
3842
  }
3845
3843
  return {
3846
3844
  ctor: ctor,
@@ -4099,7 +4097,6 @@
4099
4097
  var cur = attrs[key];
4100
4098
  var old = oldAttrs[key];
4101
4099
  if (old !== cur) {
4102
- unlockAttribute(elm, key);
4103
4100
  if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
4104
4101
  // Assume xml namespace
4105
4102
  setAttribute(elm, key, cur, XML_NAMESPACE);
@@ -4111,7 +4108,6 @@
4111
4108
  } else {
4112
4109
  setAttribute(elm, key, cur);
4113
4110
  }
4114
- lockAttribute();
4115
4111
  }
4116
4112
  }
4117
4113
  }
@@ -5772,8 +5768,8 @@
5772
5768
  }
5773
5769
  function buildParseFragmentFn(createFragmentFn) {
5774
5770
  return function (strings) {
5775
- for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key3 = 1; _key3 < _len3; _key3++) {
5776
- keys[_key3 - 1] = arguments[_key3];
5771
+ for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key2 = 1; _key2 < _len3; _key2++) {
5772
+ keys[_key2 - 1] = arguments[_key2];
5777
5773
  }
5778
5774
  var cache = create(null);
5779
5775
  return function () {
@@ -7190,14 +7186,12 @@
7190
7186
  function hydrateChildren(node, children, parentNode, owner) {
7191
7187
  var hasWarned = false;
7192
7188
  var nextNode = node;
7193
- var anchor = null;
7194
7189
  var renderer = owner.renderer;
7195
7190
  for (var _i36 = 0; _i36 < children.length; _i36++) {
7196
7191
  var childVnode = children[_i36];
7197
7192
  if (!isNull(childVnode)) {
7198
7193
  if (nextNode) {
7199
7194
  nextNode = hydrateNode(nextNode, childVnode, renderer);
7200
- anchor = childVnode.elm;
7201
7195
  } else {
7202
7196
  hasMismatch = true;
7203
7197
  if (process.env.NODE_ENV !== 'production') {
@@ -7206,8 +7200,8 @@
7206
7200
  logError("Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.", owner);
7207
7201
  }
7208
7202
  }
7209
- mount(childVnode, parentNode, renderer, anchor);
7210
- anchor = childVnode.elm;
7203
+ mount(childVnode, parentNode, renderer, nextNode);
7204
+ nextNode = renderer.nextSibling(childVnode.elm);
7211
7205
  }
7212
7206
  }
7213
7207
  }
@@ -7745,7 +7739,7 @@
7745
7739
  }
7746
7740
  return getReadOnlyProxy(obj);
7747
7741
  }
7748
- /* version: 2.45.2 */
7742
+ /** version: 2.45.3 */
7749
7743
 
7750
7744
  /*
7751
7745
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8005,6 +7999,7 @@
8005
7999
  * SPDX-License-Identifier: MIT
8006
8000
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
8007
8001
  */
8002
+ new WeakMap();
8008
8003
  // Creates a custom element for compat (legacy) browser environments
8009
8004
  var createCustomElementCompat = function createCustomElementCompat(tagName, upgradeCallback) {
8010
8005
  var elm = document.createElement(tagName);
@@ -8132,7 +8127,7 @@
8132
8127
  function rendererFactory(baseRenderer) {
8133
8128
  var renderer = function (exports) {
8134
8129
  /**
8135
- * Copyright (C) 2018 salesforce.com, inc.
8130
+ * Copyright (C) 2023 salesforce.com, inc.
8136
8131
  */
8137
8132
  /*
8138
8133
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8171,7 +8166,7 @@
8171
8166
  function isNull(obj) {
8172
8167
  return obj === null;
8173
8168
  }
8174
- /** version: 2.45.2 */
8169
+ /** version: 2.45.3 */
8175
8170
 
8176
8171
  /*
8177
8172
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8813,7 +8808,7 @@
8813
8808
  });
8814
8809
  });
8815
8810
  }
8816
- /* version: 2.45.2 */
8811
+ /** version: 2.45.3 */
8817
8812
 
8818
8813
  exports.LightningElement = LightningElement;
8819
8814
  exports.__unstable__ProfilerControl = profilerControl;