lwc 2.5.3 → 2.5.7

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 (41) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +151 -101
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +151 -100
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +139 -80
  5. package/dist/engine-dom/iife/es5/engine-dom.js +181 -109
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -2
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +167 -87
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +151 -100
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +139 -80
  11. package/dist/engine-dom/umd/es5/engine-dom.js +181 -109
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +2 -2
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +167 -87
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +151 -107
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -2
  16. package/dist/engine-server/esm/es2017/engine-server.js +151 -108
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +46 -40
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +46 -40
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +45 -39
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +46 -40
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +45 -39
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +46 -40
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +45 -39
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +46 -40
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +45 -39
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  36. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  37. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  38. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  41. package/package.json +8 -8
@@ -350,7 +350,7 @@
350
350
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
351
351
  return attributeName;
352
352
  }
353
- /** version: 2.5.3 */
353
+ /** version: 2.5.7 */
354
354
 
355
355
  /*
356
356
  * Copyright (c) 2018, salesforce.com, inc.
@@ -530,7 +530,7 @@
530
530
  setFeatureFlag(name, value);
531
531
  }
532
532
  }
533
- /** version: 2.5.3 */
533
+ /** version: 2.5.7 */
534
534
 
535
535
  /* proxy-compat-disable */
536
536
 
@@ -2825,9 +2825,9 @@
2825
2825
  }
2826
2826
  }
2827
2827
 
2828
- function warnIfInvokedDuringConstruction(vm, methodName) {
2828
+ function warnIfInvokedDuringConstruction(vm, methodOrPropName) {
2829
2829
  if (isBeingConstructed(vm)) {
2830
- logError("this.".concat(methodName, "() should not be called during the construction of the custom element for ").concat(getComponentTag(vm), " because the element is not yet in the DOM or has no children yet."));
2830
+ logError("this.".concat(methodOrPropName, " should not be called during the construction of the custom element for ").concat(getComponentTag(vm), " because the element is not yet in the DOM or has no children yet."));
2831
2831
  }
2832
2832
  } // @ts-ignore
2833
2833
 
@@ -2942,55 +2942,11 @@
2942
2942
  getBoundingClientRect = vm.renderer.getBoundingClientRect;
2943
2943
 
2944
2944
  if (process.env.NODE_ENV !== 'production') {
2945
- warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect');
2945
+ warnIfInvokedDuringConstruction(vm, 'getBoundingClientRect()');
2946
2946
  }
2947
2947
 
2948
2948
  return getBoundingClientRect(elm);
2949
2949
  },
2950
- querySelector: function querySelector(selectors) {
2951
- var vm = getAssociatedVM(this);
2952
- var elm = vm.elm,
2953
- querySelector = vm.renderer.querySelector;
2954
-
2955
- if (process.env.NODE_ENV !== 'production') {
2956
- warnIfInvokedDuringConstruction(vm, 'querySelector');
2957
- }
2958
-
2959
- return querySelector(elm, selectors);
2960
- },
2961
- querySelectorAll: function querySelectorAll(selectors) {
2962
- var vm = getAssociatedVM(this);
2963
- var elm = vm.elm,
2964
- querySelectorAll = vm.renderer.querySelectorAll;
2965
-
2966
- if (process.env.NODE_ENV !== 'production') {
2967
- warnIfInvokedDuringConstruction(vm, 'querySelectorAll');
2968
- }
2969
-
2970
- return querySelectorAll(elm, selectors);
2971
- },
2972
- getElementsByTagName: function getElementsByTagName(tagNameOrWildCard) {
2973
- var vm = getAssociatedVM(this);
2974
- var elm = vm.elm,
2975
- getElementsByTagName = vm.renderer.getElementsByTagName;
2976
-
2977
- if (process.env.NODE_ENV !== 'production') {
2978
- warnIfInvokedDuringConstruction(vm, 'getElementsByTagName');
2979
- }
2980
-
2981
- return getElementsByTagName(elm, tagNameOrWildCard);
2982
- },
2983
- getElementsByClassName: function getElementsByClassName(names) {
2984
- var vm = getAssociatedVM(this);
2985
- var elm = vm.elm,
2986
- getElementsByClassName = vm.renderer.getElementsByClassName;
2987
-
2988
- if (process.env.NODE_ENV !== 'production') {
2989
- warnIfInvokedDuringConstruction(vm, 'getElementsByClassName');
2990
- }
2991
-
2992
- return getElementsByClassName(elm, names);
2993
- },
2994
2950
 
2995
2951
  get isConnected() {
2996
2952
  var _getAssociatedVM8 = getAssociatedVM(this),
@@ -3043,6 +2999,62 @@
3043
2999
  return "[object ".concat(vm.def.name, "]");
3044
3000
  }
3045
3001
  };
3002
+ var queryAndChildGetterDescriptors = create(null);
3003
+ var childGetters = [['children', 'getChildren'], ['childNodes', 'getChildNodes'], ['firstChild', 'getFirstChild'], ['firstElementChild', 'getFirstElementChild'], ['lastChild', 'getLastChild'], ['lastElementChild', 'getLastElementChild']]; // Generic passthrough for child getters on HTMLElement to the relevant Renderer APIs
3004
+
3005
+ var _loop = function _loop() {
3006
+ var _childGetters$_i = _slicedToArray(_childGetters[_i9], 2),
3007
+ elementProp = _childGetters$_i[0],
3008
+ rendererMethod = _childGetters$_i[1];
3009
+
3010
+ queryAndChildGetterDescriptors[elementProp] = {
3011
+ get: function get() {
3012
+ var vm = getAssociatedVM(this);
3013
+ var elm = vm.elm,
3014
+ renderer = vm.renderer;
3015
+
3016
+ if (process.env.NODE_ENV !== 'production') {
3017
+ warnIfInvokedDuringConstruction(vm, elementProp);
3018
+ }
3019
+
3020
+ return renderer[rendererMethod](elm);
3021
+ },
3022
+ configurable: true,
3023
+ enumerable: true
3024
+ };
3025
+ };
3026
+
3027
+ for (var _i9 = 0, _childGetters = childGetters; _i9 < _childGetters.length; _i9++) {
3028
+ _loop();
3029
+ }
3030
+
3031
+ var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
3032
+
3033
+ var _loop2 = function _loop2() {
3034
+ var queryMethod = _queryMethods[_i10];
3035
+ queryAndChildGetterDescriptors[queryMethod] = {
3036
+ value: function value(arg) {
3037
+ var vm = getAssociatedVM(this);
3038
+ var elm = vm.elm,
3039
+ renderer = vm.renderer;
3040
+
3041
+ if (process.env.NODE_ENV !== 'production') {
3042
+ warnIfInvokedDuringConstruction(vm, "".concat(queryMethod, "()"));
3043
+ }
3044
+
3045
+ return renderer[queryMethod](elm, arg);
3046
+ },
3047
+ configurable: true,
3048
+ enumerable: true,
3049
+ writable: true
3050
+ };
3051
+ };
3052
+
3053
+ for (var _i10 = 0, _queryMethods = queryMethods; _i10 < _queryMethods.length; _i10++) {
3054
+ _loop2();
3055
+ }
3056
+
3057
+ defineProperties(LightningElement.prototype, queryAndChildGetterDescriptors);
3046
3058
  var lightningBasedDescriptors = create(null);
3047
3059
 
3048
3060
  for (var _propName in HTMLElementOriginalDescriptors) {
@@ -3561,8 +3573,8 @@
3561
3573
  }
3562
3574
 
3563
3575
  if (!isUndefined$1(fields)) {
3564
- for (var _i9 = 0, n = fields.length; _i9 < n; _i9++) {
3565
- var _fieldName2 = fields[_i9];
3576
+ for (var _i11 = 0, n = fields.length; _i11 < n; _i11++) {
3577
+ var _fieldName2 = fields[_i11];
3566
3578
  descriptor = getOwnPropertyDescriptor$1(proto, _fieldName2);
3567
3579
 
3568
3580
  if (process.env.NODE_ENV !== 'production') {
@@ -3635,15 +3647,14 @@
3635
3647
  return tpl;
3636
3648
  }
3637
3649
  /**
3638
- * EXPERIMENTAL: This function acts like a hook for Lightning Locker
3639
- * Service and other similar libraries to sanitize vulnerable attributes.
3640
- * This API is subject to change or being removed.
3650
+ * EXPERIMENTAL: This function acts like a hook for Lightning Locker Service and other similar
3651
+ * libraries to sanitize vulnerable attributes.
3641
3652
  */
3642
3653
 
3643
3654
 
3644
3655
  function sanitizeAttribute(tagName, namespaceUri, attrName, attrValue) {
3645
- // locker-service patches this function during runtime to sanitize vulnerable attributes.
3646
- // when ran off-core this function becomes a noop and returns the user authored value.
3656
+ // locker-service patches this function during runtime to sanitize vulnerable attributes. When
3657
+ // ran off-core this function becomes a noop and returns the user authored value.
3647
3658
  return attrValue;
3648
3659
  }
3649
3660
  /*
@@ -3784,8 +3795,8 @@
3784
3795
  superObservedAttributes = _SuperClass$observedA === void 0 ? [] : _SuperClass$observedA;
3785
3796
  var descriptors = create(null); // expose getters and setters for each public props on the new Element Bridge
3786
3797
 
3787
- for (var _i10 = 0, _len3 = props.length; _i10 < _len3; _i10 += 1) {
3788
- var _propName2 = props[_i10];
3798
+ for (var _i12 = 0, _len3 = props.length; _i12 < _len3; _i12 += 1) {
3799
+ var _propName2 = props[_i12];
3789
3800
  attributeToPropMap[htmlPropertyToAttribute(_propName2)] = _propName2;
3790
3801
  descriptors[_propName2] = {
3791
3802
  get: createGetter(_propName2),
@@ -3796,8 +3807,8 @@
3796
3807
  } // expose public methods as props on the new Element Bridge
3797
3808
 
3798
3809
 
3799
- for (var _i11 = 0, _len4 = methods.length; _i11 < _len4; _i11 += 1) {
3800
- var methodName = methods[_i11];
3810
+ for (var _i13 = 0, _len4 = methods.length; _i13 < _len4; _i13 += 1) {
3811
+ var methodName = methods[_i13];
3801
3812
  descriptors[methodName] = {
3802
3813
  value: createMethodCaller(methodName),
3803
3814
  writable: true,
@@ -4208,7 +4219,7 @@
4208
4219
  if (!isUndefined$1(ctorShadowSupportMode)) {
4209
4220
  assert.invariant(ctorShadowSupportMode === "any"
4210
4221
  /* Any */
4211
- || ctorShadowSupportMode === "default"
4222
+ || ctorShadowSupportMode === "reset"
4212
4223
  /* Default */
4213
4224
  , "Invalid value for static property shadowSupportMode: '".concat(ctorShadowSupportMode, "'"));
4214
4225
  }
@@ -4366,7 +4377,7 @@
4366
4377
  renderMode: 1
4367
4378
  /* Shadow */
4368
4379
  ,
4369
- shadowSupportMode: "default"
4380
+ shadowSupportMode: "reset"
4370
4381
  /* Default */
4371
4382
  ,
4372
4383
  wire: EmptyObject,
@@ -5094,7 +5105,7 @@
5094
5105
  next = iterator.next();
5095
5106
  last = next.done; // template factory logic based on the previous collected value
5096
5107
 
5097
- var vnode = factory(value, j, j === 0, last);
5108
+ var vnode = factory(value, j, j === 0, last === true);
5098
5109
 
5099
5110
  if (isArray$1(vnode)) {
5100
5111
  ArrayPush$1.apply(list, vnode);
@@ -5357,24 +5368,48 @@
5357
5368
  markAsDynamicChildren(vnodes);
5358
5369
  return vnodes;
5359
5370
  }
5371
+ /**
5372
+ * EXPERIMENTAL: This function acts like a hook for Lightning Locker Service and other similar
5373
+ * libraries to sanitize HTML content. This hook process the content passed via the template to
5374
+ * lwc:inner-html directive.
5375
+ * It is meant to be overridden with setSanitizeHtmlContentHook, it throws an error by default.
5376
+ */
5360
5377
 
5361
- var api = /*#__PURE__*/Object.freeze({
5362
- __proto__: null,
5363
- h: h,
5364
- ti: ti,
5378
+
5379
+ var sanitizeHtmlContentHook = function sanitizeHtmlContentHook() {
5380
+ // locker-service patches this function during runtime to sanitize HTML content.
5381
+ throw new Error('sanitizeHtmlContent hook must be implemented.');
5382
+ };
5383
+ /**
5384
+ * Sets the sanitizeHtmlContentHook.
5385
+ */
5386
+
5387
+
5388
+ function setSanitizeHtmlContentHook(newHookImpl) {
5389
+ sanitizeHtmlContentHook = newHookImpl;
5390
+ } // [s]anitize [h]tml [c]ontent
5391
+
5392
+
5393
+ function shc(content) {
5394
+ return sanitizeHtmlContentHook(content);
5395
+ }
5396
+
5397
+ var api = freeze({
5365
5398
  s: s,
5399
+ h: h,
5366
5400
  c: c,
5367
5401
  i: i,
5368
5402
  f: f,
5369
5403
  t: t,
5370
- co: co,
5371
5404
  d: d,
5372
5405
  b: b,
5373
5406
  k: k,
5407
+ co: co,
5408
+ dc: dc,
5409
+ ti: ti,
5374
5410
  gid: gid,
5375
5411
  fid: fid,
5376
- dc: dc,
5377
- sc: sc
5412
+ shc: shc
5378
5413
  });
5379
5414
  /*
5380
5415
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5388,12 +5423,12 @@
5388
5423
  }
5389
5424
 
5390
5425
  function createInlineStyleVNode(content) {
5391
- return h('style', {
5426
+ return api.h('style', {
5392
5427
  key: 'style',
5393
5428
  attrs: {
5394
5429
  type: 'text/css'
5395
5430
  }
5396
- }, [t(content)]);
5431
+ }, [api.t(content)]);
5397
5432
  }
5398
5433
 
5399
5434
  function updateStylesheetToken(vm, template) {
@@ -5454,8 +5489,8 @@
5454
5489
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
5455
5490
  var content = [];
5456
5491
 
5457
- for (var _i12 = 0; _i12 < stylesheets.length; _i12++) {
5458
- var stylesheet = stylesheets[_i12];
5492
+ for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
5493
+ var stylesheet = stylesheets[_i14];
5459
5494
 
5460
5495
  if (isArray$1(stylesheet)) {
5461
5496
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
@@ -5531,8 +5566,8 @@
5531
5566
  && shadowMode === 1
5532
5567
  /* Synthetic */
5533
5568
  ) {
5534
- for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
5535
- renderer.insertGlobalStylesheet(stylesheets[_i13]);
5569
+ for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
5570
+ renderer.insertGlobalStylesheet(stylesheets[_i15]);
5536
5571
  }
5537
5572
  } else if (renderer.ssr) {
5538
5573
  // native shadow or light DOM, SSR
@@ -5543,12 +5578,12 @@
5543
5578
  var root = getNearestNativeShadowComponent(vm);
5544
5579
  var isGlobal = isNull(root);
5545
5580
 
5546
- for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
5581
+ for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
5547
5582
  if (isGlobal) {
5548
- renderer.insertGlobalStylesheet(stylesheets[_i14]);
5583
+ renderer.insertGlobalStylesheet(stylesheets[_i16]);
5549
5584
  } else {
5550
5585
  // local level
5551
- renderer.insertStylesheet(stylesheets[_i14], root.cmpRoot);
5586
+ renderer.insertStylesheet(stylesheets[_i16], root.cmpRoot);
5552
5587
  }
5553
5588
  }
5554
5589
  }
@@ -5825,8 +5860,8 @@
5825
5860
  var stylesheets = template.stylesheets;
5826
5861
 
5827
5862
  if (!isUndefined$1(stylesheets)) {
5828
- for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
5829
- if (isTrue(stylesheets[_i15][KEY__SCOPED_CSS])) {
5863
+ for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
5864
+ if (isTrue(stylesheets[_i17][KEY__SCOPED_CSS])) {
5830
5865
  return true;
5831
5866
  }
5832
5867
  }
@@ -6056,8 +6091,8 @@
6056
6091
  assert.isTrue(isObject(service), "Invalid service declaration, ".concat(service, ": service must be an object"));
6057
6092
  }
6058
6093
 
6059
- for (var _i16 = 0; _i16 < hooks.length; ++_i16) {
6060
- var hookName = hooks[_i16];
6094
+ for (var _i18 = 0; _i18 < hooks.length; ++_i18) {
6095
+ var hookName = hooks[_i18];
6061
6096
 
6062
6097
  if (hookName in service) {
6063
6098
  var l = Services[hookName];
@@ -6080,8 +6115,8 @@
6080
6115
  def = vm.def,
6081
6116
  context = vm.context;
6082
6117
 
6083
- for (var _i17 = 0, _len6 = cbs.length; _i17 < _len6; ++_i17) {
6084
- cbs[_i17].call(undefined, component, {}, def, context);
6118
+ for (var _i19 = 0, _len6 = cbs.length; _i19 < _len6; ++_i19) {
6119
+ cbs[_i19].call(undefined, component, {}, def, context);
6085
6120
  }
6086
6121
  }
6087
6122
  /*
@@ -6444,19 +6479,19 @@
6444
6479
  });
6445
6480
  rehydrateQueue = []; // reset to a new queue
6446
6481
 
6447
- for (var _i18 = 0, _len7 = vms.length; _i18 < _len7; _i18 += 1) {
6448
- var vm = vms[_i18];
6482
+ for (var _i20 = 0, _len7 = vms.length; _i20 < _len7; _i20 += 1) {
6483
+ var vm = vms[_i20];
6449
6484
 
6450
6485
  try {
6451
6486
  rehydrate(vm);
6452
6487
  } catch (error) {
6453
- if (_i18 + 1 < _len7) {
6488
+ if (_i20 + 1 < _len7) {
6454
6489
  // pieces of the queue are still pending to be rehydrated, those should have priority
6455
6490
  if (rehydrateQueue.length === 0) {
6456
6491
  addCallbackToNextTick(flushRehydrationQueue);
6457
6492
  }
6458
6493
 
6459
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i18 + 1));
6494
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i20 + 1));
6460
6495
  } // we need to end the measure before throwing.
6461
6496
 
6462
6497
 
@@ -6560,8 +6595,8 @@
6560
6595
  var vCustomElementCollection = vm.velements; // Reporting disconnection for every child in inverse order since they are
6561
6596
  // inserted in reserved order.
6562
6597
 
6563
- for (var _i19 = vCustomElementCollection.length - 1; _i19 >= 0; _i19 -= 1) {
6564
- var elm = vCustomElementCollection[_i19].elm; // There are two cases where the element could be undefined:
6598
+ for (var _i21 = vCustomElementCollection.length - 1; _i21 >= 0; _i21 -= 1) {
6599
+ var elm = vCustomElementCollection[_i21].elm; // There are two cases where the element could be undefined:
6565
6600
  // * when there is an error during the construction phase, and an error
6566
6601
  // boundary picks it, there is a possibility that the VCustomElement
6567
6602
  // is not properly initialized, and therefore is should be ignored.
@@ -6595,8 +6630,8 @@
6595
6630
 
6596
6631
 
6597
6632
  function recursivelyDisconnectChildren(vnodes) {
6598
- for (var _i20 = 0, _len8 = vnodes.length; _i20 < _len8; _i20 += 1) {
6599
- var vnode = vnodes[_i20];
6633
+ for (var _i22 = 0, _len8 = vnodes.length; _i22 < _len8; _i22 += 1) {
6634
+ var vnode = vnodes[_i22];
6600
6635
 
6601
6636
  if (!isNull(vnode) && isArray$1(vnode.children) && !isUndefined$1(vnode.elm)) {
6602
6637
  // vnode is a VElement with children
@@ -6620,8 +6655,8 @@
6620
6655
  renderer = vm.renderer;
6621
6656
  var rootNode = getRenderRoot(vm);
6622
6657
 
6623
- for (var _i21 = 0, _len9 = children.length; _i21 < _len9; _i21++) {
6624
- var child = children[_i21];
6658
+ for (var _i23 = 0, _len9 = children.length; _i23 < _len9; _i23++) {
6659
+ var child = children[_i23];
6625
6660
 
6626
6661
  if (!isNull(child) && !isUndefined$1(child.elm)) {
6627
6662
  renderer.remove(child.elm, rootNode);
@@ -6666,8 +6701,8 @@
6666
6701
  var oldSlots = vm.cmpSlots;
6667
6702
  var cmpSlots = vm.cmpSlots = create(null);
6668
6703
 
6669
- for (var _i22 = 0, _len10 = children.length; _i22 < _len10; _i22 += 1) {
6670
- var vnode = children[_i22];
6704
+ for (var _i24 = 0, _len10 = children.length; _i24 < _len10; _i24 += 1) {
6705
+ var vnode = children[_i24];
6671
6706
 
6672
6707
  if (isNull(vnode)) {
6673
6708
  continue;
@@ -6697,8 +6732,8 @@
6697
6732
  return;
6698
6733
  }
6699
6734
 
6700
- for (var _i23 = 0, _len11 = oldKeys.length; _i23 < _len11; _i23 += 1) {
6701
- var key = oldKeys[_i23];
6735
+ for (var _i25 = 0, _len11 = oldKeys.length; _i25 < _len11; _i25 += 1) {
6736
+ var key = oldKeys[_i25];
6702
6737
 
6703
6738
  if (isUndefined$1(cmpSlots[key]) || oldSlots[key].length !== cmpSlots[key].length) {
6704
6739
  markComponentAsDirty(vm);
@@ -7061,8 +7096,8 @@
7061
7096
  function connectWireAdapters(vm) {
7062
7097
  var wiredConnecting = vm.context.wiredConnecting;
7063
7098
 
7064
- for (var _i24 = 0, _len12 = wiredConnecting.length; _i24 < _len12; _i24 += 1) {
7065
- wiredConnecting[_i24]();
7099
+ for (var _i26 = 0, _len12 = wiredConnecting.length; _i26 < _len12; _i26 += 1) {
7100
+ wiredConnecting[_i26]();
7066
7101
  }
7067
7102
  }
7068
7103
 
@@ -7070,8 +7105,8 @@
7070
7105
  var wiredDisconnecting = vm.context.wiredDisconnecting;
7071
7106
  runWithBoundaryProtection(vm, vm, noop, function () {
7072
7107
  // job
7073
- for (var _i25 = 0, _len13 = wiredDisconnecting.length; _i25 < _len13; _i25 += 1) {
7074
- wiredDisconnecting[_i25]();
7108
+ for (var _i27 = 0, _len13 = wiredDisconnecting.length; _i27 < _len13; _i27 += 1) {
7109
+ wiredDisconnecting[_i27]();
7075
7110
  }
7076
7111
  }, noop);
7077
7112
  }
@@ -7146,7 +7181,22 @@
7146
7181
 
7147
7182
  return reactiveMembrane.getReadOnlyProxy(obj);
7148
7183
  }
7149
- /* version: 2.5.3 */
7184
+ /*
7185
+ * Copyright (c) 2018, salesforce.com, inc.
7186
+ * All rights reserved.
7187
+ * SPDX-License-Identifier: MIT
7188
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
7189
+ */
7190
+
7191
+
7192
+ var hooksAreSet = false;
7193
+
7194
+ function setHooks(hooks) {
7195
+ assert.isFalse(hooksAreSet, 'Hooks are already overridden, only one definition is allowed.');
7196
+ hooksAreSet = true;
7197
+ setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
7198
+ }
7199
+ /* version: 2.5.7 */
7150
7200
 
7151
7201
  /*
7152
7202
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7161,15 +7211,18 @@
7161
7211
  if (process.env.NODE_ENV === 'development') {
7162
7212
  // @ts-ignore
7163
7213
  window.__lwcResetGlobalStylesheets = function () {
7164
- for (var _i26 = 0, _Object$keys = Object.keys(globalStylesheets); _i26 < _Object$keys.length; _i26++) {
7165
- var key = _Object$keys[_i26];
7214
+ for (var _i28 = 0, _Object$keys = Object.keys(globalStylesheets); _i28 < _Object$keys.length; _i28++) {
7215
+ var key = _Object$keys[_i28];
7166
7216
  delete globalStylesheets[key];
7167
7217
  }
7168
7218
  };
7169
7219
  }
7170
7220
 
7171
- var globalStylesheetsParentElement = document.head || document.body || document;
7172
- var supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.replaceSync);
7221
+ var globalStylesheetsParentElement = document.head || document.body || document; // This check for constructable stylesheets is similar to Fast's:
7222
+ // https://github.com/microsoft/fast/blob/d49d1ec/packages/web-components/fast-element/src/dom.ts#L51-L53
7223
+ // See also: https://github.com/whatwg/webidl/issues/1027#issuecomment-934510070
7224
+
7225
+ var supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.replaceSync) && isArray$1(document.adoptedStyleSheets);
7173
7226
  var styleElements = create(null);
7174
7227
  var styleSheets = create(null);
7175
7228
  var nodesToStyleSheets = new WeakMap();
@@ -7384,6 +7437,24 @@
7384
7437
  getElementsByClassName: function getElementsByClassName(element, names) {
7385
7438
  return element.getElementsByClassName(names);
7386
7439
  },
7440
+ getChildren: function getChildren(element) {
7441
+ return element.children;
7442
+ },
7443
+ getChildNodes: function getChildNodes(element) {
7444
+ return element.childNodes;
7445
+ },
7446
+ getFirstChild: function getFirstChild(element) {
7447
+ return element.firstChild;
7448
+ },
7449
+ getFirstElementChild: function getFirstElementChild(element) {
7450
+ return element.firstElementChild;
7451
+ },
7452
+ getLastChild: function getLastChild(element) {
7453
+ return element.lastChild;
7454
+ },
7455
+ getLastElementChild: function getLastElementChild(element) {
7456
+ return element.lastElementChild;
7457
+ },
7387
7458
  isConnected: function isConnected(node) {
7388
7459
  return node.isConnected;
7389
7460
  },
@@ -7699,7 +7770,7 @@
7699
7770
  });
7700
7771
  freeze(LightningElement);
7701
7772
  seal(LightningElement.prototype);
7702
- /* version: 2.5.3 */
7773
+ /* version: 2.5.7 */
7703
7774
 
7704
7775
  exports.LightningElement = LightningElement;
7705
7776
  exports.__unstable__ProfilerControl = profilerControl;
@@ -7719,6 +7790,7 @@
7719
7790
  exports.sanitizeAttribute = sanitizeAttribute;
7720
7791
  exports.setFeatureFlag = setFeatureFlag;
7721
7792
  exports.setFeatureFlagForTest = setFeatureFlagForTest;
7793
+ exports.setHooks = setHooks;
7722
7794
  exports.swapComponent = swapComponent;
7723
7795
  exports.swapStyle = swapStyle;
7724
7796
  exports.swapTemplate = swapTemplate;