lwc 2.5.2 → 2.5.6

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 +181 -101
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +183 -101
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +163 -82
  5. package/dist/engine-dom/iife/es5/engine-dom.js +211 -108
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -2
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +189 -87
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +184 -102
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +164 -83
  11. package/dist/engine-dom/umd/es5/engine-dom.js +212 -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 +190 -88
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +174 -99
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -2
  16. package/dist/engine-server/esm/es2017/engine-server.js +173 -100
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +46 -40
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +47 -41
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +46 -40
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +47 -41
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +46 -40
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +48 -42
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +47 -41
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +48 -42
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +47 -41
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +3 -3
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +3 -3
  33. package/dist/wire-service/iife/es5/wire-service.js +3 -3
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +3 -3
  36. package/dist/wire-service/umd/es2017/wire-service.js +4 -4
  37. package/dist/wire-service/umd/es2017/wire-service_debug.js +4 -4
  38. package/dist/wire-service/umd/es5/wire-service.js +4 -4
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +4 -4
  41. package/package.json +8 -8
@@ -2,7 +2,7 @@
2
2
  typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
3
3
  typeof define === 'function' && define.amd ? define(['exports'], factory) :
4
4
  (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.LWC = {}));
5
- }(this, (function (exports) { 'use strict';
5
+ })(this, (function (exports) { 'use strict';
6
6
 
7
7
  function _wrapNativeSuper(Class) { var _cache = typeof Map === "function" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== "function") { throw new TypeError("Super expression must either be null or a function"); } if (typeof _cache !== "undefined") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf2(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }
8
8
 
@@ -344,7 +344,7 @@
344
344
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
345
345
  return attributeName;
346
346
  }
347
- /** version: 2.5.2 */
347
+ /** version: 2.5.6 */
348
348
 
349
349
  /*
350
350
  * Copyright (c) 2018, salesforce.com, inc.
@@ -452,6 +452,7 @@
452
452
  ENABLE_HMR: null,
453
453
  ENABLE_INNER_OUTER_TEXT_PATCH: null,
454
454
  ENABLE_ELEMENT_PATCH: null,
455
+ ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST: null,
455
456
  ENABLE_NODE_LIST_PATCH: null,
456
457
  ENABLE_HTML_COLLECTIONS_PATCH: null,
457
458
  ENABLE_NODE_PATCH: null,
@@ -515,7 +516,7 @@
515
516
 
516
517
  function setFeatureFlagForTest(name, value) {
517
518
  }
518
- /** version: 2.5.2 */
519
+ /** version: 2.5.6 */
519
520
 
520
521
  /* proxy-compat-disable */
521
522
 
@@ -2340,34 +2341,6 @@
2340
2341
 
2341
2342
  return getBoundingClientRect(elm);
2342
2343
  },
2343
- querySelector: function querySelector(selectors) {
2344
- var vm = getAssociatedVM(this);
2345
- var elm = vm.elm,
2346
- querySelector = vm.renderer.querySelector;
2347
-
2348
- return querySelector(elm, selectors);
2349
- },
2350
- querySelectorAll: function querySelectorAll(selectors) {
2351
- var vm = getAssociatedVM(this);
2352
- var elm = vm.elm,
2353
- querySelectorAll = vm.renderer.querySelectorAll;
2354
-
2355
- return querySelectorAll(elm, selectors);
2356
- },
2357
- getElementsByTagName: function getElementsByTagName(tagNameOrWildCard) {
2358
- var vm = getAssociatedVM(this);
2359
- var elm = vm.elm,
2360
- getElementsByTagName = vm.renderer.getElementsByTagName;
2361
-
2362
- return getElementsByTagName(elm, tagNameOrWildCard);
2363
- },
2364
- getElementsByClassName: function getElementsByClassName(names) {
2365
- var vm = getAssociatedVM(this);
2366
- var elm = vm.elm,
2367
- getElementsByClassName = vm.renderer.getElementsByClassName;
2368
-
2369
- return getElementsByClassName(elm, names);
2370
- },
2371
2344
 
2372
2345
  get isConnected() {
2373
2346
  var _getAssociatedVM8 = getAssociatedVM(this),
@@ -2406,6 +2379,49 @@
2406
2379
  return "[object ".concat(vm.def.name, "]");
2407
2380
  }
2408
2381
  };
2382
+ var queryAndChildGetterDescriptors = create(null);
2383
+ 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
2384
+
2385
+ var _loop = function _loop() {
2386
+ var _childGetters$_i = _slicedToArray(_childGetters[_i9], 2),
2387
+ elementProp = _childGetters$_i[0],
2388
+ rendererMethod = _childGetters$_i[1];
2389
+
2390
+ queryAndChildGetterDescriptors[elementProp] = {
2391
+ get: function get() {
2392
+ var vm = getAssociatedVM(this);
2393
+ var elm = vm.elm,
2394
+ renderer = vm.renderer;
2395
+
2396
+ return renderer[rendererMethod](elm);
2397
+ }
2398
+ };
2399
+ };
2400
+
2401
+ for (var _i9 = 0, _childGetters = childGetters; _i9 < _childGetters.length; _i9++) {
2402
+ _loop();
2403
+ }
2404
+
2405
+ var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2406
+
2407
+ var _loop2 = function _loop2() {
2408
+ var queryMethod = _queryMethods[_i10];
2409
+ queryAndChildGetterDescriptors[queryMethod] = {
2410
+ value: function value(arg) {
2411
+ var vm = getAssociatedVM(this);
2412
+ var elm = vm.elm,
2413
+ renderer = vm.renderer;
2414
+
2415
+ return renderer[queryMethod](elm, arg);
2416
+ }
2417
+ };
2418
+ };
2419
+
2420
+ for (var _i10 = 0, _queryMethods = queryMethods; _i10 < _queryMethods.length; _i10++) {
2421
+ _loop2();
2422
+ }
2423
+
2424
+ defineProperties(LightningElement.prototype, queryAndChildGetterDescriptors);
2409
2425
  var lightningBasedDescriptors = create(null);
2410
2426
 
2411
2427
  for (var _propName in HTMLElementOriginalDescriptors) {
@@ -2762,8 +2778,8 @@
2762
2778
  }
2763
2779
 
2764
2780
  if (!isUndefined$1(fields)) {
2765
- for (var _i9 = 0, n = fields.length; _i9 < n; _i9++) {
2766
- var _fieldName2 = fields[_i9];
2781
+ for (var _i11 = 0, n = fields.length; _i11 < n; _i11++) {
2782
+ var _fieldName2 = fields[_i11];
2767
2783
  descriptor = getOwnPropertyDescriptor$1(proto, _fieldName2);
2768
2784
  // tracked property. This is only here for backward compatibility purposes.
2769
2785
 
@@ -2832,15 +2848,14 @@
2832
2848
  return tpl;
2833
2849
  }
2834
2850
  /**
2835
- * EXPERIMENTAL: This function acts like a hook for Lightning Locker
2836
- * Service and other similar libraries to sanitize vulnerable attributes.
2837
- * This API is subject to change or being removed.
2851
+ * EXPERIMENTAL: This function acts like a hook for Lightning Locker Service and other similar
2852
+ * libraries to sanitize vulnerable attributes.
2838
2853
  */
2839
2854
 
2840
2855
 
2841
2856
  function sanitizeAttribute(tagName, namespaceUri, attrName, attrValue) {
2842
- // locker-service patches this function during runtime to sanitize vulnerable attributes.
2843
- // when ran off-core this function becomes a noop and returns the user authored value.
2857
+ // locker-service patches this function during runtime to sanitize vulnerable attributes. When
2858
+ // ran off-core this function becomes a noop and returns the user authored value.
2844
2859
  return attrValue;
2845
2860
  }
2846
2861
  /*
@@ -2981,8 +2996,8 @@
2981
2996
  superObservedAttributes = _SuperClass$observedA === void 0 ? [] : _SuperClass$observedA;
2982
2997
  var descriptors = create(null); // expose getters and setters for each public props on the new Element Bridge
2983
2998
 
2984
- for (var _i10 = 0, _len3 = props.length; _i10 < _len3; _i10 += 1) {
2985
- var _propName2 = props[_i10];
2999
+ for (var _i12 = 0, _len3 = props.length; _i12 < _len3; _i12 += 1) {
3000
+ var _propName2 = props[_i12];
2986
3001
  attributeToPropMap[htmlPropertyToAttribute(_propName2)] = _propName2;
2987
3002
  descriptors[_propName2] = {
2988
3003
  get: createGetter(_propName2),
@@ -2993,8 +3008,8 @@
2993
3008
  } // expose public methods as props on the new Element Bridge
2994
3009
 
2995
3010
 
2996
- for (var _i11 = 0, _len4 = methods.length; _i11 < _len4; _i11 += 1) {
2997
- var methodName = methods[_i11];
3011
+ for (var _i13 = 0, _len4 = methods.length; _i13 < _len4; _i13 += 1) {
3012
+ var methodName = methods[_i13];
2998
3013
  descriptors[methodName] = {
2999
3014
  value: createMethodCaller(methodName),
3000
3015
  writable: true,
@@ -3586,6 +3601,38 @@
3586
3601
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3587
3602
  */
3588
3603
 
3604
+ /**
3605
+ * EXPERIMENTAL: This function acts like a hook for Lightning Locker Service and other similar
3606
+ * libraries to sanitize HTML content. This hook process the content passed via the template to
3607
+ * lwc:inner-html directive.
3608
+ * It is meant to be overridden with setSanitizeHtmlContentHook
3609
+ */
3610
+
3611
+
3612
+ var sanitizeHtmlContentHook = function sanitizeHtmlContentHook() {
3613
+ // locker-service patches this function during runtime to sanitize HTML content.
3614
+ throw new Error('sanitizeHtmlContent hook must be implemented.');
3615
+ };
3616
+ /**
3617
+ * Sets the sanitizeHtmlContentHook.
3618
+ *
3619
+ * @param newHookImpl
3620
+ * @returns oldHookImplementation.
3621
+ */
3622
+
3623
+
3624
+ function setSanitizeHtmlContentHook(newHookImpl) {
3625
+ var currentHook = sanitizeHtmlContentHook;
3626
+ sanitizeHtmlContentHook = newHookImpl;
3627
+ return currentHook;
3628
+ }
3629
+ /*
3630
+ * Copyright (c) 2018, salesforce.com, inc.
3631
+ * All rights reserved.
3632
+ * SPDX-License-Identifier: MIT
3633
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3634
+ */
3635
+
3589
3636
 
3590
3637
  var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
3591
3638
  var SymbolIterator = Symbol.iterator;
@@ -3854,7 +3901,7 @@
3854
3901
  next = iterator.next();
3855
3902
  last = next.done; // template factory logic based on the previous collected value
3856
3903
 
3857
- var vnode = factory(value, j, j === 0, last);
3904
+ var vnode = factory(value, j, j === 0, last === true);
3858
3905
 
3859
3906
  if (isArray$1(vnode)) {
3860
3907
  ArrayPush$1.apply(list, vnode);
@@ -4067,25 +4114,29 @@
4067
4114
 
4068
4115
  markAsDynamicChildren(vnodes);
4069
4116
  return vnodes;
4117
+ } // [s]anitize [h]tml [c]ontent
4118
+
4119
+
4120
+ function shc(content) {
4121
+ return sanitizeHtmlContentHook(content);
4070
4122
  }
4071
4123
 
4072
- var api = /*#__PURE__*/Object.freeze({
4073
- __proto__: null,
4074
- h: h,
4075
- ti: ti,
4124
+ var api = freeze({
4076
4125
  s: s,
4126
+ h: h,
4077
4127
  c: c,
4078
4128
  i: i,
4079
4129
  f: f,
4080
4130
  t: t,
4081
- co: co,
4082
4131
  d: d,
4083
4132
  b: b,
4084
4133
  k: k,
4134
+ co: co,
4135
+ dc: dc,
4136
+ ti: ti,
4085
4137
  gid: gid,
4086
4138
  fid: fid,
4087
- dc: dc,
4088
- sc: sc
4139
+ shc: shc
4089
4140
  });
4090
4141
  /*
4091
4142
  * Copyright (c) 2018, salesforce.com, inc.
@@ -4099,12 +4150,12 @@
4099
4150
  }
4100
4151
 
4101
4152
  function createInlineStyleVNode(content) {
4102
- return h('style', {
4153
+ return api.h('style', {
4103
4154
  key: 'style',
4104
4155
  attrs: {
4105
4156
  type: 'text/css'
4106
4157
  }
4107
- }, [t(content)]);
4158
+ }, [api.t(content)]);
4108
4159
  }
4109
4160
 
4110
4161
  function updateStylesheetToken(vm, template) {
@@ -4165,8 +4216,8 @@
4165
4216
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
4166
4217
  var content = [];
4167
4218
 
4168
- for (var _i12 = 0; _i12 < stylesheets.length; _i12++) {
4169
- var stylesheet = stylesheets[_i12];
4219
+ for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
4220
+ var stylesheet = stylesheets[_i14];
4170
4221
 
4171
4222
  if (isArray$1(stylesheet)) {
4172
4223
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
@@ -4236,8 +4287,8 @@
4236
4287
  && shadowMode === 1
4237
4288
  /* Synthetic */
4238
4289
  ) {
4239
- for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
4240
- renderer.insertGlobalStylesheet(stylesheets[_i13]);
4290
+ for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
4291
+ renderer.insertGlobalStylesheet(stylesheets[_i15]);
4241
4292
  }
4242
4293
  } else if (renderer.ssr) {
4243
4294
  // native shadow or light DOM, SSR
@@ -4248,12 +4299,12 @@
4248
4299
  var root = getNearestNativeShadowComponent(vm);
4249
4300
  var isGlobal = isNull(root);
4250
4301
 
4251
- for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
4302
+ for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
4252
4303
  if (isGlobal) {
4253
- renderer.insertGlobalStylesheet(stylesheets[_i14]);
4304
+ renderer.insertGlobalStylesheet(stylesheets[_i16]);
4254
4305
  } else {
4255
4306
  // local level
4256
- renderer.insertStylesheet(stylesheets[_i14], root.cmpRoot);
4307
+ renderer.insertStylesheet(stylesheets[_i16], root.cmpRoot);
4257
4308
  }
4258
4309
  }
4259
4310
  }
@@ -4438,8 +4489,8 @@
4438
4489
  var stylesheets = template.stylesheets;
4439
4490
 
4440
4491
  if (!isUndefined$1(stylesheets)) {
4441
- for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
4442
- if (isTrue(stylesheets[_i15][KEY__SCOPED_CSS])) {
4492
+ for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
4493
+ if (isTrue(stylesheets[_i17][KEY__SCOPED_CSS])) {
4443
4494
  return true;
4444
4495
  }
4445
4496
  }
@@ -4640,8 +4691,8 @@
4640
4691
 
4641
4692
  function register(service) {
4642
4693
 
4643
- for (var _i16 = 0; _i16 < hooks.length; ++_i16) {
4644
- var hookName = hooks[_i16];
4694
+ for (var _i18 = 0; _i18 < hooks.length; ++_i18) {
4695
+ var hookName = hooks[_i18];
4645
4696
 
4646
4697
  if (hookName in service) {
4647
4698
  var l = Services[hookName];
@@ -4661,8 +4712,8 @@
4661
4712
  def = vm.def,
4662
4713
  context = vm.context;
4663
4714
 
4664
- for (var _i17 = 0, _len6 = cbs.length; _i17 < _len6; ++_i17) {
4665
- cbs[_i17].call(undefined, component, {}, def, context);
4715
+ for (var _i19 = 0, _len6 = cbs.length; _i19 < _len6; ++_i19) {
4716
+ cbs[_i19].call(undefined, component, {}, def, context);
4666
4717
  }
4667
4718
  }
4668
4719
  /*
@@ -4982,19 +5033,19 @@
4982
5033
  });
4983
5034
  rehydrateQueue = []; // reset to a new queue
4984
5035
 
4985
- for (var _i18 = 0, _len7 = vms.length; _i18 < _len7; _i18 += 1) {
4986
- var vm = vms[_i18];
5036
+ for (var _i20 = 0, _len7 = vms.length; _i20 < _len7; _i20 += 1) {
5037
+ var vm = vms[_i20];
4987
5038
 
4988
5039
  try {
4989
5040
  rehydrate(vm);
4990
5041
  } catch (error) {
4991
- if (_i18 + 1 < _len7) {
5042
+ if (_i20 + 1 < _len7) {
4992
5043
  // pieces of the queue are still pending to be rehydrated, those should have priority
4993
5044
  if (rehydrateQueue.length === 0) {
4994
5045
  addCallbackToNextTick(flushRehydrationQueue);
4995
5046
  }
4996
5047
 
4997
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i18 + 1));
5048
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i20 + 1));
4998
5049
  } // we need to end the measure before throwing.
4999
5050
 
5000
5051
 
@@ -5093,8 +5144,8 @@
5093
5144
  var vCustomElementCollection = vm.velements; // Reporting disconnection for every child in inverse order since they are
5094
5145
  // inserted in reserved order.
5095
5146
 
5096
- for (var _i19 = vCustomElementCollection.length - 1; _i19 >= 0; _i19 -= 1) {
5097
- var elm = vCustomElementCollection[_i19].elm; // There are two cases where the element could be undefined:
5147
+ for (var _i21 = vCustomElementCollection.length - 1; _i21 >= 0; _i21 -= 1) {
5148
+ var elm = vCustomElementCollection[_i21].elm; // There are two cases where the element could be undefined:
5098
5149
  // * when there is an error during the construction phase, and an error
5099
5150
  // boundary picks it, there is a possibility that the VCustomElement
5100
5151
  // is not properly initialized, and therefore is should be ignored.
@@ -5128,8 +5179,8 @@
5128
5179
 
5129
5180
 
5130
5181
  function recursivelyDisconnectChildren(vnodes) {
5131
- for (var _i20 = 0, _len8 = vnodes.length; _i20 < _len8; _i20 += 1) {
5132
- var vnode = vnodes[_i20];
5182
+ for (var _i22 = 0, _len8 = vnodes.length; _i22 < _len8; _i22 += 1) {
5183
+ var vnode = vnodes[_i22];
5133
5184
 
5134
5185
  if (!isNull(vnode) && isArray$1(vnode.children) && !isUndefined$1(vnode.elm)) {
5135
5186
  // vnode is a VElement with children
@@ -5153,8 +5204,8 @@
5153
5204
  renderer = vm.renderer;
5154
5205
  var rootNode = getRenderRoot(vm);
5155
5206
 
5156
- for (var _i21 = 0, _len9 = children.length; _i21 < _len9; _i21++) {
5157
- var child = children[_i21];
5207
+ for (var _i23 = 0, _len9 = children.length; _i23 < _len9; _i23++) {
5208
+ var child = children[_i23];
5158
5209
 
5159
5210
  if (!isNull(child) && !isUndefined$1(child.elm)) {
5160
5211
  renderer.remove(child.elm, rootNode);
@@ -5199,8 +5250,8 @@
5199
5250
  var oldSlots = vm.cmpSlots;
5200
5251
  var cmpSlots = vm.cmpSlots = create(null);
5201
5252
 
5202
- for (var _i22 = 0, _len10 = children.length; _i22 < _len10; _i22 += 1) {
5203
- var vnode = children[_i22];
5253
+ for (var _i24 = 0, _len10 = children.length; _i24 < _len10; _i24 += 1) {
5254
+ var vnode = children[_i24];
5204
5255
 
5205
5256
  if (isNull(vnode)) {
5206
5257
  continue;
@@ -5230,8 +5281,8 @@
5230
5281
  return;
5231
5282
  }
5232
5283
 
5233
- for (var _i23 = 0, _len11 = oldKeys.length; _i23 < _len11; _i23 += 1) {
5234
- var key = oldKeys[_i23];
5284
+ for (var _i25 = 0, _len11 = oldKeys.length; _i25 < _len11; _i25 += 1) {
5285
+ var key = oldKeys[_i25];
5235
5286
 
5236
5287
  if (isUndefined$1(cmpSlots[key]) || oldSlots[key].length !== cmpSlots[key].length) {
5237
5288
  markComponentAsDirty(vm);
@@ -5570,8 +5621,8 @@
5570
5621
  function connectWireAdapters(vm) {
5571
5622
  var wiredConnecting = vm.context.wiredConnecting;
5572
5623
 
5573
- for (var _i24 = 0, _len12 = wiredConnecting.length; _i24 < _len12; _i24 += 1) {
5574
- wiredConnecting[_i24]();
5624
+ for (var _i26 = 0, _len12 = wiredConnecting.length; _i26 < _len12; _i26 += 1) {
5625
+ wiredConnecting[_i26]();
5575
5626
  }
5576
5627
  }
5577
5628
 
@@ -5579,8 +5630,8 @@
5579
5630
  var wiredDisconnecting = vm.context.wiredDisconnecting;
5580
5631
  runWithBoundaryProtection(vm, vm, noop, function () {
5581
5632
  // job
5582
- for (var _i25 = 0, _len13 = wiredDisconnecting.length; _i25 < _len13; _i25 += 1) {
5583
- wiredDisconnecting[_i25]();
5633
+ for (var _i27 = 0, _len13 = wiredDisconnecting.length; _i27 < _len13; _i27 += 1) {
5634
+ wiredDisconnecting[_i27]();
5584
5635
  }
5585
5636
  }, noop);
5586
5637
  }
@@ -5649,7 +5700,35 @@
5649
5700
 
5650
5701
  return reactiveMembrane.getReadOnlyProxy(obj);
5651
5702
  }
5652
- /* version: 2.5.2 */
5703
+ /*
5704
+ * Copyright (c) 2018, salesforce.com, inc.
5705
+ * All rights reserved.
5706
+ * SPDX-License-Identifier: MIT
5707
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5708
+ */
5709
+
5710
+
5711
+ var hooksAreSet = false;
5712
+
5713
+ function overrideHooks(hooks) {
5714
+ var oldHooks = {};
5715
+
5716
+ if (!isUndefined$1(hooks.sanitizeHtmlContent)) {
5717
+ oldHooks.sanitizeHtmlContent = setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
5718
+ }
5719
+
5720
+ return oldHooks;
5721
+ }
5722
+
5723
+ function setHooks(hooks) {
5724
+ assert.isFalse(hooksAreSet, 'Hooks are already overridden, only one definition is allowed.');
5725
+ overrideHooks(hooks);
5726
+ hooksAreSet = true;
5727
+ }
5728
+
5729
+ function setHooksForTest(hooks) {
5730
+ }
5731
+ /* version: 2.5.6 */
5653
5732
 
5654
5733
  /*
5655
5734
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5661,8 +5740,11 @@
5661
5740
 
5662
5741
  var globalStylesheets = create(null);
5663
5742
 
5664
- var globalStylesheetsParentElement = document.head || document.body || document;
5665
- var supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.replaceSync);
5743
+ var globalStylesheetsParentElement = document.head || document.body || document; // This check for constructable stylesheets is similar to Fast's:
5744
+ // https://github.com/microsoft/fast/blob/d49d1ec/packages/web-components/fast-element/src/dom.ts#L51-L53
5745
+ // See also: https://github.com/whatwg/webidl/issues/1027#issuecomment-934510070
5746
+
5747
+ var supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.replaceSync) && isArray$1(document.adoptedStyleSheets);
5666
5748
  var styleElements = create(null);
5667
5749
  var styleSheets = create(null);
5668
5750
  var nodesToStyleSheets = new WeakMap();
@@ -5871,6 +5953,24 @@
5871
5953
  getElementsByClassName: function getElementsByClassName(element, names) {
5872
5954
  return element.getElementsByClassName(names);
5873
5955
  },
5956
+ getChildren: function getChildren(element) {
5957
+ return element.children;
5958
+ },
5959
+ getChildNodes: function getChildNodes(element) {
5960
+ return element.childNodes;
5961
+ },
5962
+ getFirstChild: function getFirstChild(element) {
5963
+ return element.firstChild;
5964
+ },
5965
+ getFirstElementChild: function getFirstElementChild(element) {
5966
+ return element.firstElementChild;
5967
+ },
5968
+ getLastChild: function getLastChild(element) {
5969
+ return element.lastChild;
5970
+ },
5971
+ getLastElementChild: function getLastElementChild(element) {
5972
+ return element.lastElementChild;
5973
+ },
5874
5974
  isConnected: function isConnected(node) {
5875
5975
  return node.isConnected;
5876
5976
  },
@@ -6179,7 +6279,7 @@
6179
6279
  });
6180
6280
  freeze(LightningElement);
6181
6281
  seal(LightningElement.prototype);
6182
- /* version: 2.5.2 */
6282
+ /* version: 2.5.6 */
6183
6283
 
6184
6284
  exports.LightningElement = LightningElement;
6185
6285
  exports.__unstable__ProfilerControl = profilerControl;
@@ -6199,6 +6299,8 @@
6199
6299
  exports.sanitizeAttribute = sanitizeAttribute;
6200
6300
  exports.setFeatureFlag = setFeatureFlag;
6201
6301
  exports.setFeatureFlagForTest = setFeatureFlagForTest;
6302
+ exports.setHooks = setHooks;
6303
+ exports.setHooksForTest = setHooksForTest;
6202
6304
  exports.swapComponent = swapComponent;
6203
6305
  exports.swapStyle = swapStyle;
6204
6306
  exports.swapTemplate = swapTemplate;
@@ -6208,4 +6310,4 @@
6208
6310
 
6209
6311
  Object.defineProperty(exports, '__esModule', { value: true });
6210
6312
 
6211
- })));
6313
+ }));