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,9 +1,11 @@
1
1
  var LWC = (function (exports) {
2
2
  'use strict';
3
3
 
4
- /* proxy-compat-disable */
5
4
  /**
6
- * Copyright (C) 2018 salesforce.com, inc.
5
+ * Copyright (C) 2023 salesforce.com, inc.
6
+ */
7
+ /**
8
+ * Copyright (C) 2023 salesforce.com, inc.
7
9
  */
8
10
  /*
9
11
  * Copyright (c) 2018, salesforce.com, inc.
@@ -196,7 +198,7 @@ var LWC = (function (exports) {
196
198
  })();
197
199
  // These attributes take either an ID or a list of IDs as values.
198
200
  // This includes aria-* attributes as well as the special non-ARIA "for" attribute
199
- const ID_REFERENCING_ATTRIBUTES_SET = new Set([
201
+ const ID_REFERENCING_ATTRIBUTES_SET = /*@__PURE__*/ new Set([
200
202
  'aria-activedescendant',
201
203
  'aria-controls',
202
204
  'aria-describedby',
@@ -283,11 +285,11 @@ var LWC = (function (exports) {
283
285
  /**
284
286
  * Map associating previously transformed HTML property into HTML attribute.
285
287
  */
286
- const CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
288
+ const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map();
287
289
  /**
288
290
  * Map associating previously transformed HTML attribute into HTML property.
289
291
  */
290
- const CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
292
+ const CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/ new Map();
291
293
  function htmlPropertyToAttribute(propName) {
292
294
  const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
293
295
  if (!isUndefined$1(ariaAttributeName)) {
@@ -341,12 +343,12 @@ var LWC = (function (exports) {
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
- const LWC_VERSION = "2.45.2";
346
+ const LWC_VERSION = "2.45.3";
345
347
  const 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
  /*
@@ -421,10 +423,10 @@ var LWC = (function (exports) {
421
423
  setFeatureFlag(name, value);
422
424
  }
423
425
  }
424
- /** version: 2.45.2 */
426
+ /** version: 2.45.3 */
425
427
 
426
428
  /**
427
- * Copyright (C) 2018 salesforce.com, inc.
429
+ * Copyright (C) 2023 salesforce.com, inc.
428
430
  */
429
431
 
430
432
  /*
@@ -485,7 +487,7 @@ var LWC = (function (exports) {
485
487
  }
486
488
  }
487
489
  }
488
- /** version: 2.45.2 */
490
+ /** version: 2.45.3 */
489
491
 
490
492
  /*
491
493
  * Copyright (c) 2018, salesforce.com, inc.
@@ -499,7 +501,9 @@ var LWC = (function (exports) {
499
501
  applyAriaReflection();
500
502
  }
501
503
 
502
- /* proxy-compat-disable */
504
+ /**
505
+ * Copyright (C) 2023 salesforce.com, inc.
506
+ */
503
507
 
504
508
  /*
505
509
  * Copyright (c) 2018, salesforce.com, inc.
@@ -928,19 +932,6 @@ var LWC = (function (exports) {
928
932
  'tabIndex',
929
933
  'title',
930
934
  ];
931
- let controlledElement = null;
932
- let controlledAttributeName;
933
- function isAttributeLocked(elm, attrName) {
934
- return elm !== controlledElement || attrName !== controlledAttributeName;
935
- }
936
- function lockAttribute(_elm, _key) {
937
- controlledElement = null;
938
- controlledAttributeName = undefined;
939
- }
940
- function unlockAttribute(elm, key) {
941
- controlledElement = elm;
942
- controlledAttributeName = key;
943
- }
944
935
 
945
936
  /*
946
937
  * Copyright (c) 2018, salesforce.com, inc.
@@ -979,6 +970,7 @@ var LWC = (function (exports) {
979
970
  * SPDX-License-Identifier: MIT
980
971
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
981
972
  */
973
+ /* eslint @lwc/lwc-internal/no-production-assert: "off" */
982
974
  function generateDataDescriptor(options) {
983
975
  return assign({
984
976
  configurable: true,
@@ -1808,6 +1800,14 @@ var LWC = (function (exports) {
1808
1800
  * SPDX-License-Identifier: MIT
1809
1801
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1810
1802
  */
1803
+ /**
1804
+ * This module is responsible for producing the ComponentDef object that is always
1805
+ * accessible via `vm.def`. This is lazily created during the creation of the first
1806
+ * instance of a component class, and shared across all instances.
1807
+ *
1808
+ * This structure can be used to synthetically create proxies, and understand the
1809
+ * shape of a component. It is also used internally to apply extra optimizations.
1810
+ */
1811
1811
  /**
1812
1812
  * This operation is called with a descriptor of an standard html property
1813
1813
  * that a Custom Element can support (including AOM properties), which
@@ -1971,15 +1971,11 @@ var LWC = (function (exports) {
1971
1971
  removeAttribute(name) {
1972
1972
  const vm = getAssociatedVM(this);
1973
1973
  const { elm, renderer: { removeAttribute }, } = vm;
1974
- unlockAttribute(elm, name);
1975
1974
  removeAttribute(elm, name);
1976
- lockAttribute();
1977
1975
  },
1978
1976
  removeAttributeNS(namespace, name) {
1979
1977
  const { elm, renderer: { removeAttribute }, } = getAssociatedVM(this);
1980
- unlockAttribute(elm, name);
1981
1978
  removeAttribute(elm, name, namespace);
1982
- lockAttribute();
1983
1979
  },
1984
1980
  getAttribute(name) {
1985
1981
  const vm = getAssociatedVM(this);
@@ -2001,9 +1997,7 @@ var LWC = (function (exports) {
2001
1997
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2002
1998
  }
2003
1999
  }
2004
- unlockAttribute(elm, name);
2005
2000
  setAttribute(elm, name, value);
2006
- lockAttribute();
2007
2001
  },
2008
2002
  setAttributeNS(namespace, name, value) {
2009
2003
  const vm = getAssociatedVM(this);
@@ -2013,9 +2007,7 @@ var LWC = (function (exports) {
2013
2007
  logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
2014
2008
  }
2015
2009
  }
2016
- unlockAttribute(elm, name);
2017
2010
  setAttribute(elm, name, value, namespace);
2018
- lockAttribute();
2019
2011
  },
2020
2012
  getBoundingClientRect() {
2021
2013
  const vm = getAssociatedVM(this);
@@ -2397,7 +2389,7 @@ var LWC = (function (exports) {
2397
2389
  });
2398
2390
  runWithBoundaryProtection(vm, vm, noop, () => {
2399
2391
  // job
2400
- connector = new adapter(dataCallback);
2392
+ connector = new adapter(dataCallback, { tagName: vm.tagName });
2401
2393
  }, noop);
2402
2394
  const updateConnectorConfig = (config) => {
2403
2395
  // every time the config is recomputed due to tracking,
@@ -2965,6 +2957,10 @@ var LWC = (function (exports) {
2965
2957
  * SPDX-License-Identifier: MIT
2966
2958
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2967
2959
  */
2960
+ /**
2961
+ * This module is responsible for creating the base bridge class BaseBridgeElement
2962
+ * that represents the HTMLElement extension used for any LWC inserted in the DOM.
2963
+ */
2968
2964
  // A bridge descriptor is a descriptor whose job is just to get the component instance
2969
2965
  // from the element instance, and get the value or set a new value on the component.
2970
2966
  // This means that across different elements, similar names can get the exact same
@@ -3018,14 +3014,6 @@ var LWC = (function (exports) {
3018
3014
  }
3019
3015
  return;
3020
3016
  }
3021
- if (!isAttributeLocked(this, attrName)) {
3022
- // Ignore changes triggered by the engine itself during:
3023
- // * diffing when public props are attempting to reflect to the DOM
3024
- // * component via `this.setAttribute()`, should never update the prop
3025
- // Both cases, the setAttribute call is always wrapped by the unlocking of the
3026
- // attribute to be changed
3027
- return;
3028
- }
3029
3017
  // Reflect attribute change to the corresponding property when changed from outside.
3030
3018
  this[propName] = newValue;
3031
3019
  };
@@ -3370,6 +3358,14 @@ var LWC = (function (exports) {
3370
3358
  * SPDX-License-Identifier: MIT
3371
3359
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3372
3360
  */
3361
+ /**
3362
+ * This module is responsible for producing the ComponentDef object that is always
3363
+ * accessible via `vm.def`. This is lazily created during the creation of the first
3364
+ * instance of a component class, and shared across all instances.
3365
+ *
3366
+ * This structure can be used to synthetically create proxies, and understand the
3367
+ * shape of a component. It is also used internally to apply extra optimizations.
3368
+ */
3373
3369
  const CtorToDefMap = new WeakMap();
3374
3370
  function getCtorProto(Ctor) {
3375
3371
  let proto = getPrototypeOf$1(Ctor);
@@ -3811,7 +3807,6 @@ var LWC = (function (exports) {
3811
3807
  const cur = attrs[key];
3812
3808
  const old = oldAttrs[key];
3813
3809
  if (old !== cur) {
3814
- unlockAttribute(elm, key);
3815
3810
  if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
3816
3811
  // Assume xml namespace
3817
3812
  setAttribute(elm, key, cur, XML_NAMESPACE);
@@ -3826,7 +3821,6 @@ var LWC = (function (exports) {
3826
3821
  else {
3827
3822
  setAttribute(elm, key, cur);
3828
3823
  }
3829
- lockAttribute();
3830
3824
  }
3831
3825
  }
3832
3826
  }
@@ -6856,14 +6850,12 @@ var LWC = (function (exports) {
6856
6850
  function hydrateChildren(node, children, parentNode, owner) {
6857
6851
  let hasWarned = false;
6858
6852
  let nextNode = node;
6859
- let anchor = null;
6860
6853
  const { renderer } = owner;
6861
6854
  for (let i = 0; i < children.length; i++) {
6862
6855
  const childVnode = children[i];
6863
6856
  if (!isNull(childVnode)) {
6864
6857
  if (nextNode) {
6865
6858
  nextNode = hydrateNode(nextNode, childVnode, renderer);
6866
- anchor = childVnode.elm;
6867
6859
  }
6868
6860
  else {
6869
6861
  hasMismatch = true;
@@ -6873,8 +6865,8 @@ var LWC = (function (exports) {
6873
6865
  logError(`Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.`, owner);
6874
6866
  }
6875
6867
  }
6876
- mount(childVnode, parentNode, renderer, anchor);
6877
- anchor = childVnode.elm;
6868
+ mount(childVnode, parentNode, renderer, nextNode);
6869
+ nextNode = renderer.nextSibling(childVnode.elm);
6878
6870
  }
6879
6871
  }
6880
6872
  }
@@ -7381,7 +7373,7 @@ var LWC = (function (exports) {
7381
7373
  }
7382
7374
  return getReadOnlyProxy(obj);
7383
7375
  }
7384
- /* version: 2.45.2 */
7376
+ /** version: 2.45.3 */
7385
7377
 
7386
7378
  /*
7387
7379
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7643,6 +7635,7 @@ var LWC = (function (exports) {
7643
7635
  * SPDX-License-Identifier: MIT
7644
7636
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
7645
7637
  */
7638
+ new WeakMap();
7646
7639
  // Creates a custom element for compat (legacy) browser environments
7647
7640
  const createCustomElementCompat = (tagName, upgradeCallback) => {
7648
7641
  const elm = document.createElement(tagName);
@@ -7769,7 +7762,7 @@ var LWC = (function (exports) {
7769
7762
  const renderer = (function (exports) {
7770
7763
 
7771
7764
  /**
7772
- * Copyright (C) 2018 salesforce.com, inc.
7765
+ * Copyright (C) 2023 salesforce.com, inc.
7773
7766
  */
7774
7767
  /*
7775
7768
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7809,7 +7802,7 @@ var LWC = (function (exports) {
7809
7802
  function isNull(obj) {
7810
7803
  return obj === null;
7811
7804
  }
7812
- /** version: 2.45.2 */
7805
+ /** version: 2.45.3 */
7813
7806
 
7814
7807
  /*
7815
7808
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8428,7 +8421,7 @@ var LWC = (function (exports) {
8428
8421
  });
8429
8422
  }));
8430
8423
  }
8431
- /* version: 2.45.2 */
8424
+ /** version: 2.45.3 */
8432
8425
 
8433
8426
  exports.LightningElement = LightningElement;
8434
8427
  exports.__unstable__ProfilerControl = profilerControl;