lwc 2.10.0 → 2.11.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 (35) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +4261 -5855
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +4261 -5855
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +3244 -4594
  5. package/dist/engine-dom/iife/es5/engine-dom.js +50 -63
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +45 -40
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +4261 -5855
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +3244 -4594
  11. package/dist/engine-dom/umd/es5/engine-dom.js +50 -63
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +45 -40
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +4041 -5380
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +4041 -5380
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +2952 -3673
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +2952 -3673
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +2825 -3532
  20. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +11 -3
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +11 -3
  22. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +2952 -3673
  23. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +2825 -3532
  24. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +11 -3
  25. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +11 -3
  26. package/dist/wire-service/esm/es2017/wire-service.js +128 -174
  27. package/dist/wire-service/iife/es2017/wire-service.js +128 -174
  28. package/dist/wire-service/iife/es2017/wire-service_debug.js +128 -174
  29. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  30. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  31. package/dist/wire-service/umd/es2017/wire-service.js +128 -174
  32. package/dist/wire-service/umd/es2017/wire-service_debug.js +128 -174
  33. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  34. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  35. package/package.json +7 -7
@@ -348,7 +348,7 @@
348
348
  var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
349
349
  var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
350
350
  var XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
351
- /** version: 2.10.0 */
351
+ /** version: 2.11.0 */
352
352
 
353
353
  /*
354
354
  * Copyright (c) 2018, salesforce.com, inc.
@@ -451,12 +451,12 @@
451
451
 
452
452
 
453
453
  var features = {
454
- DISABLE_MIXED_SHADOW_MODE: null,
455
454
  ENABLE_ELEMENT_PATCH: null,
456
455
  ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST: null,
457
456
  ENABLE_HMR: null,
458
457
  ENABLE_HTML_COLLECTIONS_PATCH: null,
459
458
  ENABLE_INNER_OUTER_TEXT_PATCH: null,
459
+ ENABLE_MIXED_SHADOW_MODE: null,
460
460
  ENABLE_NODE_LIST_PATCH: null,
461
461
  ENABLE_NODE_PATCH: null,
462
462
  ENABLE_REACTIVE_SETTER: null,
@@ -518,7 +518,7 @@
518
518
 
519
519
  function setFeatureFlagForTest(name, value) {
520
520
  }
521
- /** version: 2.10.0 */
521
+ /** version: 2.11.0 */
522
522
 
523
523
  /* proxy-compat-disable */
524
524
 
@@ -1054,6 +1054,7 @@
1054
1054
  * SPDX-License-Identifier: MIT
1055
1055
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1056
1056
  */
1057
+ // These properties get added to LWCElement.prototype publicProps automatically
1057
1058
 
1058
1059
  var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
1059
1060
 
@@ -2593,13 +2594,6 @@
2593
2594
  var meta = signedDecoratorToMetaMap.get(Ctor);
2594
2595
  return isUndefined$1(meta) ? defaultMeta : meta;
2595
2596
  }
2596
- /*
2597
- * Copyright (c) 2018, salesforce.com, inc.
2598
- * All rights reserved.
2599
- * SPDX-License-Identifier: MIT
2600
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2601
- */
2602
-
2603
2597
 
2604
2598
  var signedTemplateSet = new Set();
2605
2599
 
@@ -2642,6 +2636,7 @@
2642
2636
  * SPDX-License-Identifier: MIT
2643
2637
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2644
2638
  */
2639
+ // A bridge descriptor is a descriptor whose job is just to get the component instance
2645
2640
  // from the element instance, and get the value or set a new value on the component.
2646
2641
  // This means that across different elements, similar names can get the exact same
2647
2642
  // descriptor, so we can cache them:
@@ -3335,6 +3330,7 @@
3335
3330
  * SPDX-License-Identifier: MIT
3336
3331
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3337
3332
  */
3333
+ // The style property is a string when defined via an expression in the template.
3338
3334
 
3339
3335
 
3340
3336
  function patchStyleAttribute(oldVnode, vnode) {
@@ -3379,6 +3375,7 @@
3379
3375
  * SPDX-License-Identifier: MIT
3380
3376
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3381
3377
  */
3378
+ // The HTML class property becomes the vnode.data.classMap object when defined as a string in the template.
3382
3379
  // The compiler takes care of transforming the inline classnames into an object. It's faster to set the
3383
3380
  // different classnames properties individually instead of via a string.
3384
3381
 
@@ -3403,6 +3400,7 @@
3403
3400
  * SPDX-License-Identifier: MIT
3404
3401
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3405
3402
  */
3403
+ // The HTML style property becomes the vnode.data.styleDecls object when defined as a string in the template.
3406
3404
  // The compiler takes care of transforming the inline style into an object. It's faster to set the
3407
3405
  // different style properties individually instead of via a string.
3408
3406
 
@@ -5386,34 +5384,38 @@
5386
5384
  /* Native */
5387
5385
  ;
5388
5386
  } else if (isNativeShadowDefined$1) {
5389
- if (runtimeFlags.DISABLE_MIXED_SHADOW_MODE) {
5390
- shadowMode = 1
5391
- /* Synthetic */
5392
- ;
5393
- } else if (def.shadowSupportMode === "any"
5394
- /* Any */
5395
- ) {
5396
- shadowMode = 0
5397
- /* Native */
5398
- ;
5399
- } else {
5400
- var shadowAncestor = getNearestShadowAncestor(vm);
5401
-
5402
- if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
5403
- /* Native */
5387
+ // Not combined with above condition because @lwc/features only supports identifiers in
5388
+ // the if-condition.
5389
+ if (runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
5390
+ if (def.shadowSupportMode === "any"
5391
+ /* Any */
5404
5392
  ) {
5405
- // Transitive support for native Shadow DOM. A component in native mode
5406
- // transitively opts all of its descendants into native.
5407
5393
  shadowMode = 0
5408
5394
  /* Native */
5409
5395
  ;
5410
5396
  } else {
5411
- // Synthetic if neither this component nor any of its ancestors are configured
5412
- // to be native.
5413
- shadowMode = 1
5414
- /* Synthetic */
5415
- ;
5397
+ var shadowAncestor = getNearestShadowAncestor(vm);
5398
+
5399
+ if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
5400
+ /* Native */
5401
+ ) {
5402
+ // Transitive support for native Shadow DOM. A component in native mode
5403
+ // transitively opts all of its descendants into native.
5404
+ shadowMode = 0
5405
+ /* Native */
5406
+ ;
5407
+ } else {
5408
+ // Synthetic if neither this component nor any of its ancestors are configured
5409
+ // to be native.
5410
+ shadowMode = 1
5411
+ /* Synthetic */
5412
+ ;
5413
+ }
5416
5414
  }
5415
+ } else {
5416
+ shadowMode = 1
5417
+ /* Synthetic */
5418
+ ;
5417
5419
  }
5418
5420
  } else {
5419
5421
  // Synthetic if there is no native Shadow DOM support.
@@ -6077,6 +6079,7 @@
6077
6079
  * SPDX-License-Identifier: MIT
6078
6080
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6079
6081
  */
6082
+ // this is lwc internal implementation
6080
6083
 
6081
6084
 
6082
6085
  function createContextProvider(adapter) {
@@ -6151,7 +6154,7 @@
6151
6154
  hooksAreSet = true;
6152
6155
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
6153
6156
  }
6154
- /* version: 2.10.0 */
6157
+ /* version: 2.11.0 */
6155
6158
 
6156
6159
  /*
6157
6160
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6171,7 +6174,7 @@
6171
6174
  var supportsMutableAdoptedStyleSheets = supportsConstructableStyleSheets && getOwnPropertyDescriptor$1(document.adoptedStyleSheets, 'length').writable;
6172
6175
  var styleElements = create(null);
6173
6176
  var styleSheets = create(null);
6174
- var nodesToStyleSheets = new WeakMap();
6177
+ var shadowRootsToStyleSheets = new WeakMap();
6175
6178
  var getCustomElement;
6176
6179
  var defineCustomElement;
6177
6180
  var HTMLElementConstructor;
@@ -6223,24 +6226,26 @@
6223
6226
  styleSheets[content] = styleSheet;
6224
6227
  }
6225
6228
 
6226
- if (!target.adoptedStyleSheets.includes(styleSheet)) {
6229
+ var adoptedStyleSheets = target.adoptedStyleSheets;
6230
+
6231
+ if (!adoptedStyleSheets.includes(styleSheet)) {
6227
6232
  if (supportsMutableAdoptedStyleSheets) {
6228
6233
  // This is only supported in later versions of Chromium:
6229
6234
  // https://chromestatus.com/feature/5638996492288000
6230
- target.adoptedStyleSheets.push(styleSheet);
6235
+ adoptedStyleSheets.push(styleSheet);
6231
6236
  } else {
6232
- target.adoptedStyleSheets = [].concat(_toConsumableArray(target.adoptedStyleSheets), [styleSheet]);
6237
+ target.adoptedStyleSheets = [].concat(_toConsumableArray(adoptedStyleSheets), [styleSheet]);
6233
6238
  }
6234
6239
  }
6235
6240
  }
6236
6241
 
6237
6242
  function insertStyleElement(content, target) {
6238
6243
  // Avoid inserting duplicate `<style>`s
6239
- var sheets = nodesToStyleSheets.get(target);
6244
+ var sheets = shadowRootsToStyleSheets.get(target);
6240
6245
 
6241
6246
  if (isUndefined$1(sheets)) {
6242
6247
  sheets = create(null);
6243
- nodesToStyleSheets.set(target, sheets);
6248
+ shadowRootsToStyleSheets.set(target, sheets);
6244
6249
  }
6245
6250
 
6246
6251
  if (sheets[content]) {
@@ -6892,7 +6897,7 @@
6892
6897
  });
6893
6898
  freeze(LightningElement);
6894
6899
  seal(LightningElement.prototype);
6895
- /* version: 2.10.0 */
6900
+ /* version: 2.11.0 */
6896
6901
 
6897
6902
  exports.LightningElement = LightningElement;
6898
6903
  exports.__unstable__ProfilerControl = profilerControl;