lwc 2.41.3 → 2.43.0

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 (64) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +41 -24
  2. package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
  3. package/dist/engine-dom/iife/es2017/engine-dom.js +41 -23
  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 +32 -16
  7. package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
  8. package/dist/engine-dom/iife/es5/engine-dom.js +42 -24
  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 +34 -18
  12. package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
  13. package/dist/engine-dom/umd/es2017/engine-dom.js +41 -23
  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 +32 -16
  17. package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
  18. package/dist/engine-dom/umd/es5/engine-dom.js +42 -24
  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 +34 -18
  22. package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
  23. package/dist/engine-server/commonjs/es2017/engine-server.js +37 -14
  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 +37 -15
  27. package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
  28. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  29. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
  30. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  31. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
  32. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  33. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
  34. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  35. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
  36. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  37. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
  38. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  39. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
  40. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  41. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
  42. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  43. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
  44. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  45. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -1
  46. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  47. package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
  48. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  49. package/dist/wire-service/iife/es2017/wire-service.js.map +1 -1
  50. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  51. package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -1
  52. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  53. package/dist/wire-service/iife/es5/wire-service.js.map +1 -1
  54. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  55. package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -1
  56. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  57. package/dist/wire-service/umd/es2017/wire-service.js.map +1 -1
  58. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  59. package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -1
  60. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  61. package/dist/wire-service/umd/es5/wire-service.js.map +1 -1
  62. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  63. package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
  64. package/package.json +7 -7
@@ -348,9 +348,9 @@ var LWC = (function (exports) {
348
348
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
349
349
  */
350
350
  // Increment whenever the LWC template compiler changes
351
- var LWC_VERSION = "2.41.3";
351
+ var LWC_VERSION = "2.43.0";
352
352
  var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
353
- /** version: 2.41.3 */
353
+ /** version: 2.43.0 */
354
354
 
355
355
  /**
356
356
  * Copyright (C) 2018 salesforce.com, inc.
@@ -430,7 +430,7 @@ var LWC = (function (exports) {
430
430
  setFeatureFlag(name, value);
431
431
  }
432
432
  }
433
- /** version: 2.41.3 */
433
+ /** version: 2.43.0 */
434
434
 
435
435
  /**
436
436
  * Copyright (C) 2018 salesforce.com, inc.
@@ -494,7 +494,7 @@ var LWC = (function (exports) {
494
494
  }
495
495
  }
496
496
  }
497
- /** version: 2.41.3 */
497
+ /** version: 2.43.0 */
498
498
 
499
499
  /*
500
500
  * Copyright (c) 2018, salesforce.com, inc.
@@ -4045,6 +4045,15 @@ var LWC = (function (exports) {
4045
4045
  // the stylesheet, while internally, we have a replacement for it.
4046
4046
  stylesheet = getStyleOrSwappedStyle(stylesheet);
4047
4047
  }
4048
+ // Check that this stylesheet was generated by our compiler
4049
+ if (!isStylesheetRegistered(stylesheet)) {
4050
+ if (process.env.NODE_ENV !== 'production') {
4051
+ logWarnOnce("TypeError: Unexpected LWC stylesheet content found for component <".concat(vm.tagName.toLowerCase(), ">."));
4052
+ }
4053
+ report("UnexpectedStylesheetContent" /* ReportingEventId.UnexpectedStylesheetContent */, {
4054
+ tagName: vm.tagName.toLowerCase()
4055
+ });
4056
+ }
4048
4057
  var isScopedCss = stylesheet[KEY__SCOPED_CSS];
4049
4058
  if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS && !isScopedCss && vm.renderMode === 0 /* RenderMode.Light */) {
4050
4059
  logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
@@ -4159,6 +4168,18 @@ var LWC = (function (exports) {
4159
4168
  }
4160
4169
  return null;
4161
4170
  }
4171
+ var signedStylesheetSet = new Set();
4172
+ /**
4173
+ * INTERNAL: This function can only be invoked by compiled code. The compiler
4174
+ * will prevent this function from being imported by userland code.
4175
+ */
4176
+ function registerStylesheet(stylesheet) {
4177
+ signedStylesheetSet.add(stylesheet);
4178
+ return stylesheet;
4179
+ }
4180
+ function isStylesheetRegistered(stylesheet) {
4181
+ return signedStylesheetSet.has(stylesheet);
4182
+ }
4162
4183
 
4163
4184
  /*
4164
4185
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5857,19 +5878,12 @@ var LWC = (function (exports) {
5857
5878
  function setVMBeingRendered(vm) {
5858
5879
  vmBeingRendered = vm;
5859
5880
  }
5860
- function validateSlots(vm, html) {
5881
+ function validateSlots(vm) {
5861
5882
  assertNotProd(); // this method should never leak to prod
5862
5883
  var cmpSlots = vm.cmpSlots;
5863
- var _html$slots = html.slots,
5864
- slots = _html$slots === void 0 ? EmptyArray : _html$slots;
5865
5884
  for (var slotName in cmpSlots.slotAssignments) {
5866
5885
  // eslint-disable-next-line @lwc/lwc-internal/no-production-assert
5867
5886
  assert.isTrue(isArray$1(cmpSlots.slotAssignments[slotName]), "Slots can only be set to an array, instead received ".concat(toString$1(cmpSlots.slotAssignments[slotName]), " for slot \"").concat(slotName, "\" in ").concat(vm, "."));
5868
- if (slotName !== '' && ArrayIndexOf.call(slots, slotName) === -1) {
5869
- // TODO [#1297]: this should never really happen because the compiler should always validate
5870
- // eslint-disable-next-line @lwc/lwc-internal/no-production-assert
5871
- logError("Ignoring unknown provided slot name \"".concat(slotName, "\" in ").concat(vm, ". Check for a typo on the slot attribute."), vm);
5872
- }
5873
5887
  }
5874
5888
  }
5875
5889
  function validateLightDomTemplate(template, vm) {
@@ -6002,7 +6016,7 @@ var LWC = (function (exports) {
6002
6016
  }
6003
6017
  if (process.env.NODE_ENV !== 'production') {
6004
6018
  // validating slots in every rendering since the allocated content might change over time
6005
- validateSlots(vm, html);
6019
+ validateSlots(vm);
6006
6020
  // add the VM to the list of host VMs that can be re-rendered if html is swapped
6007
6021
  setActiveVM(vm);
6008
6022
  }
@@ -7005,7 +7019,7 @@ var LWC = (function (exports) {
7005
7019
  if (!isLightningElement(elm)) {
7006
7020
  var vm = findVM(elm);
7007
7021
  if (process.env.NODE_ENV !== 'production') {
7008
- logWarnOnce("Element <".concat(elm.tagName.toLowerCase(), "> ") + (isUndefined$1(vm) ? '' : "owned by <".concat(vm.elm.tagName.toLowerCase(), "> ")) + "uses non-standard property \"".concat(prop, "\". This will be removed in a future version of LWC. ") + "See https://sfdc.co/deprecated-aria");
7022
+ logWarnOnce("Element <".concat(elm.tagName.toLowerCase(), "> ") + (isUndefined$1(vm) ? '' : "owned by <".concat(vm.tagName.toLowerCase(), "> ")) + "uses non-standard property \"".concat(prop, "\". This will be removed in a future version of LWC. ") + "See https://sfdc.co/deprecated-aria");
7009
7023
  }
7010
7024
  var setValueType;
7011
7025
  if (isSetter) {
@@ -7393,7 +7407,8 @@ var LWC = (function (exports) {
7393
7407
  var className = data.className,
7394
7408
  classMap = data.classMap;
7395
7409
  var getProperty = renderer.getProperty,
7396
- getClassList = renderer.getClassList;
7410
+ getClassList = renderer.getClassList,
7411
+ getAttribute = renderer.getAttribute;
7397
7412
  var scopedToken = getScopeTokenClass(owner);
7398
7413
  var stylesheetTokenHost = isVCustomElement(vnode) ? getStylesheetTokenHost(vnode) : null;
7399
7414
  // Classnames for scoped CSS are added directly to the DOM during rendering,
@@ -7425,11 +7440,12 @@ var LWC = (function (exports) {
7425
7440
  }
7426
7441
  var nodesAreCompatible = true;
7427
7442
  var readableVnodeClassname;
7428
- var elmClassName = getProperty(elm, 'className');
7443
+ var elmClassName = getAttribute(elm, 'class');
7429
7444
  if (!isUndefined$1(className) && String(className) !== elmClassName) {
7430
7445
  // className is used when class is bound to an expr.
7431
7446
  nodesAreCompatible = false;
7432
- readableVnodeClassname = className;
7447
+ // stringify for pretty-printing
7448
+ readableVnodeClassname = JSON.stringify(className);
7433
7449
  } else if (!isUndefined$1(classMap)) {
7434
7450
  // classMap is used when class is set to static value.
7435
7451
  var classList = getClassList(elm);
@@ -7441,18 +7457,19 @@ var LWC = (function (exports) {
7441
7457
  nodesAreCompatible = false;
7442
7458
  }
7443
7459
  }
7444
- readableVnodeClassname = computedClassName.trim();
7460
+ // stringify for pretty-printing
7461
+ readableVnodeClassname = JSON.stringify(computedClassName.trim());
7445
7462
  if (classList.length > keys(classMap).length) {
7446
7463
  nodesAreCompatible = false;
7447
7464
  }
7448
- } else if (isUndefined$1(className) && elmClassName !== '') {
7465
+ } else if (isUndefined$1(className) && !isNull(elmClassName)) {
7449
7466
  // SSR contains a className but client-side VDOM does not
7450
7467
  nodesAreCompatible = false;
7451
- readableVnodeClassname = '';
7468
+ readableVnodeClassname = '""';
7452
7469
  }
7453
7470
  if (!nodesAreCompatible) {
7454
7471
  if (process.env.NODE_ENV !== 'production') {
7455
- logError("Mismatch hydrating element <".concat(getProperty(elm, 'tagName').toLowerCase(), ">: attribute \"class\" has different values, expected \"").concat(readableVnodeClassname, "\" but found \"").concat(elmClassName, "\""), vnode.owner);
7472
+ logError("Mismatch hydrating element <".concat(getProperty(elm, 'tagName').toLowerCase(), ">: attribute \"class\" has different values, expected ").concat(readableVnodeClassname, " but found ").concat(JSON.stringify(elmClassName)), vnode.owner);
7456
7473
  }
7457
7474
  }
7458
7475
  return nodesAreCompatible;
@@ -7822,7 +7839,7 @@ var LWC = (function (exports) {
7822
7839
  }
7823
7840
  return getReadOnlyProxy(obj);
7824
7841
  }
7825
- /* version: 2.41.3 */
7842
+ /* version: 2.43.0 */
7826
7843
 
7827
7844
  /*
7828
7845
  * Copyright (c) 2018, salesforce.com, inc.
@@ -8248,7 +8265,7 @@ var LWC = (function (exports) {
8248
8265
  function isNull(obj) {
8249
8266
  return obj === null;
8250
8267
  }
8251
- /** version: 2.41.3 */
8268
+ /** version: 2.43.0 */
8252
8269
 
8253
8270
  /*
8254
8271
  * Copyright (c) 2023, salesforce.com, inc.
@@ -8890,7 +8907,7 @@ var LWC = (function (exports) {
8890
8907
  });
8891
8908
  });
8892
8909
  }
8893
- /* version: 2.41.3 */
8910
+ /* version: 2.43.0 */
8894
8911
 
8895
8912
  exports.LightningElement = LightningElement;
8896
8913
  exports.__unstable__ProfilerControl = profilerControl;
@@ -8911,6 +8928,7 @@ var LWC = (function (exports) {
8911
8928
  exports.register = register;
8912
8929
  exports.registerComponent = registerComponent;
8913
8930
  exports.registerDecorators = registerDecorators;
8931
+ exports.registerStylesheet = registerStylesheet;
8914
8932
  exports.registerTemplate = registerTemplate;
8915
8933
  exports.renderer = renderer;
8916
8934
  exports.rendererFactory = rendererFactory;