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
@@ -344,7 +344,7 @@
344
344
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
345
345
  return attributeName;
346
346
  }
347
- /** version: 2.5.3 */
347
+ /** version: 2.5.7 */
348
348
 
349
349
  /*
350
350
  * Copyright (c) 2018, salesforce.com, inc.
@@ -516,7 +516,7 @@
516
516
 
517
517
  function setFeatureFlagForTest(name, value) {
518
518
  }
519
- /** version: 2.5.3 */
519
+ /** version: 2.5.7 */
520
520
 
521
521
  /* proxy-compat-disable */
522
522
 
@@ -2341,34 +2341,6 @@
2341
2341
 
2342
2342
  return getBoundingClientRect(elm);
2343
2343
  },
2344
- querySelector: function querySelector(selectors) {
2345
- var vm = getAssociatedVM(this);
2346
- var elm = vm.elm,
2347
- querySelector = vm.renderer.querySelector;
2348
-
2349
- return querySelector(elm, selectors);
2350
- },
2351
- querySelectorAll: function querySelectorAll(selectors) {
2352
- var vm = getAssociatedVM(this);
2353
- var elm = vm.elm,
2354
- querySelectorAll = vm.renderer.querySelectorAll;
2355
-
2356
- return querySelectorAll(elm, selectors);
2357
- },
2358
- getElementsByTagName: function getElementsByTagName(tagNameOrWildCard) {
2359
- var vm = getAssociatedVM(this);
2360
- var elm = vm.elm,
2361
- getElementsByTagName = vm.renderer.getElementsByTagName;
2362
-
2363
- return getElementsByTagName(elm, tagNameOrWildCard);
2364
- },
2365
- getElementsByClassName: function getElementsByClassName(names) {
2366
- var vm = getAssociatedVM(this);
2367
- var elm = vm.elm,
2368
- getElementsByClassName = vm.renderer.getElementsByClassName;
2369
-
2370
- return getElementsByClassName(elm, names);
2371
- },
2372
2344
 
2373
2345
  get isConnected() {
2374
2346
  var _getAssociatedVM8 = getAssociatedVM(this),
@@ -2407,6 +2379,54 @@
2407
2379
  return "[object ".concat(vm.def.name, "]");
2408
2380
  }
2409
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
+ configurable: true,
2399
+ enumerable: true
2400
+ };
2401
+ };
2402
+
2403
+ for (var _i9 = 0, _childGetters = childGetters; _i9 < _childGetters.length; _i9++) {
2404
+ _loop();
2405
+ }
2406
+
2407
+ var queryMethods = ['getElementsByClassName', 'getElementsByTagName', 'querySelector', 'querySelectorAll']; // Generic passthrough for query APIs on HTMLElement to the relevant Renderer APIs
2408
+
2409
+ var _loop2 = function _loop2() {
2410
+ var queryMethod = _queryMethods[_i10];
2411
+ queryAndChildGetterDescriptors[queryMethod] = {
2412
+ value: function value(arg) {
2413
+ var vm = getAssociatedVM(this);
2414
+ var elm = vm.elm,
2415
+ renderer = vm.renderer;
2416
+
2417
+ return renderer[queryMethod](elm, arg);
2418
+ },
2419
+ configurable: true,
2420
+ enumerable: true,
2421
+ writable: true
2422
+ };
2423
+ };
2424
+
2425
+ for (var _i10 = 0, _queryMethods = queryMethods; _i10 < _queryMethods.length; _i10++) {
2426
+ _loop2();
2427
+ }
2428
+
2429
+ defineProperties(LightningElement.prototype, queryAndChildGetterDescriptors);
2410
2430
  var lightningBasedDescriptors = create(null);
2411
2431
 
2412
2432
  for (var _propName in HTMLElementOriginalDescriptors) {
@@ -2763,8 +2783,8 @@
2763
2783
  }
2764
2784
 
2765
2785
  if (!isUndefined$1(fields)) {
2766
- for (var _i9 = 0, n = fields.length; _i9 < n; _i9++) {
2767
- var _fieldName2 = fields[_i9];
2786
+ for (var _i11 = 0, n = fields.length; _i11 < n; _i11++) {
2787
+ var _fieldName2 = fields[_i11];
2768
2788
  descriptor = getOwnPropertyDescriptor$1(proto, _fieldName2);
2769
2789
  // tracked property. This is only here for backward compatibility purposes.
2770
2790
 
@@ -2833,15 +2853,14 @@
2833
2853
  return tpl;
2834
2854
  }
2835
2855
  /**
2836
- * EXPERIMENTAL: This function acts like a hook for Lightning Locker
2837
- * Service and other similar libraries to sanitize vulnerable attributes.
2838
- * This API is subject to change or being removed.
2856
+ * EXPERIMENTAL: This function acts like a hook for Lightning Locker Service and other similar
2857
+ * libraries to sanitize vulnerable attributes.
2839
2858
  */
2840
2859
 
2841
2860
 
2842
2861
  function sanitizeAttribute(tagName, namespaceUri, attrName, attrValue) {
2843
- // locker-service patches this function during runtime to sanitize vulnerable attributes.
2844
- // when ran off-core this function becomes a noop and returns the user authored value.
2862
+ // locker-service patches this function during runtime to sanitize vulnerable attributes. When
2863
+ // ran off-core this function becomes a noop and returns the user authored value.
2845
2864
  return attrValue;
2846
2865
  }
2847
2866
  /*
@@ -2982,8 +3001,8 @@
2982
3001
  superObservedAttributes = _SuperClass$observedA === void 0 ? [] : _SuperClass$observedA;
2983
3002
  var descriptors = create(null); // expose getters and setters for each public props on the new Element Bridge
2984
3003
 
2985
- for (var _i10 = 0, _len3 = props.length; _i10 < _len3; _i10 += 1) {
2986
- var _propName2 = props[_i10];
3004
+ for (var _i12 = 0, _len3 = props.length; _i12 < _len3; _i12 += 1) {
3005
+ var _propName2 = props[_i12];
2987
3006
  attributeToPropMap[htmlPropertyToAttribute(_propName2)] = _propName2;
2988
3007
  descriptors[_propName2] = {
2989
3008
  get: createGetter(_propName2),
@@ -2994,8 +3013,8 @@
2994
3013
  } // expose public methods as props on the new Element Bridge
2995
3014
 
2996
3015
 
2997
- for (var _i11 = 0, _len4 = methods.length; _i11 < _len4; _i11 += 1) {
2998
- var methodName = methods[_i11];
3016
+ for (var _i13 = 0, _len4 = methods.length; _i13 < _len4; _i13 += 1) {
3017
+ var methodName = methods[_i13];
2999
3018
  descriptors[methodName] = {
3000
3019
  value: createMethodCaller(methodName),
3001
3020
  writable: true,
@@ -3249,7 +3268,7 @@
3249
3268
  renderMode: 1
3250
3269
  /* Shadow */
3251
3270
  ,
3252
- shadowSupportMode: "default"
3271
+ shadowSupportMode: "reset"
3253
3272
  /* Default */
3254
3273
  ,
3255
3274
  wire: EmptyObject,
@@ -3855,7 +3874,7 @@
3855
3874
  next = iterator.next();
3856
3875
  last = next.done; // template factory logic based on the previous collected value
3857
3876
 
3858
- var vnode = factory(value, j, j === 0, last);
3877
+ var vnode = factory(value, j, j === 0, last === true);
3859
3878
 
3860
3879
  if (isArray$1(vnode)) {
3861
3880
  ArrayPush$1.apply(list, vnode);
@@ -4069,24 +4088,48 @@
4069
4088
  markAsDynamicChildren(vnodes);
4070
4089
  return vnodes;
4071
4090
  }
4091
+ /**
4092
+ * EXPERIMENTAL: This function acts like a hook for Lightning Locker Service and other similar
4093
+ * libraries to sanitize HTML content. This hook process the content passed via the template to
4094
+ * lwc:inner-html directive.
4095
+ * It is meant to be overridden with setSanitizeHtmlContentHook, it throws an error by default.
4096
+ */
4072
4097
 
4073
- var api = /*#__PURE__*/Object.freeze({
4074
- __proto__: null,
4075
- h: h,
4076
- ti: ti,
4098
+
4099
+ var sanitizeHtmlContentHook = function sanitizeHtmlContentHook() {
4100
+ // locker-service patches this function during runtime to sanitize HTML content.
4101
+ throw new Error('sanitizeHtmlContent hook must be implemented.');
4102
+ };
4103
+ /**
4104
+ * Sets the sanitizeHtmlContentHook.
4105
+ */
4106
+
4107
+
4108
+ function setSanitizeHtmlContentHook(newHookImpl) {
4109
+ sanitizeHtmlContentHook = newHookImpl;
4110
+ } // [s]anitize [h]tml [c]ontent
4111
+
4112
+
4113
+ function shc(content) {
4114
+ return sanitizeHtmlContentHook(content);
4115
+ }
4116
+
4117
+ var api = freeze({
4077
4118
  s: s,
4119
+ h: h,
4078
4120
  c: c,
4079
4121
  i: i,
4080
4122
  f: f,
4081
4123
  t: t,
4082
- co: co,
4083
4124
  d: d,
4084
4125
  b: b,
4085
4126
  k: k,
4127
+ co: co,
4128
+ dc: dc,
4129
+ ti: ti,
4086
4130
  gid: gid,
4087
4131
  fid: fid,
4088
- dc: dc,
4089
- sc: sc
4132
+ shc: shc
4090
4133
  });
4091
4134
  /*
4092
4135
  * Copyright (c) 2018, salesforce.com, inc.
@@ -4100,12 +4143,12 @@
4100
4143
  }
4101
4144
 
4102
4145
  function createInlineStyleVNode(content) {
4103
- return h('style', {
4146
+ return api.h('style', {
4104
4147
  key: 'style',
4105
4148
  attrs: {
4106
4149
  type: 'text/css'
4107
4150
  }
4108
- }, [t(content)]);
4151
+ }, [api.t(content)]);
4109
4152
  }
4110
4153
 
4111
4154
  function updateStylesheetToken(vm, template) {
@@ -4166,8 +4209,8 @@
4166
4209
  function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
4167
4210
  var content = [];
4168
4211
 
4169
- for (var _i12 = 0; _i12 < stylesheets.length; _i12++) {
4170
- var stylesheet = stylesheets[_i12];
4212
+ for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
4213
+ var stylesheet = stylesheets[_i14];
4171
4214
 
4172
4215
  if (isArray$1(stylesheet)) {
4173
4216
  ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
@@ -4237,8 +4280,8 @@
4237
4280
  && shadowMode === 1
4238
4281
  /* Synthetic */
4239
4282
  ) {
4240
- for (var _i13 = 0; _i13 < stylesheets.length; _i13++) {
4241
- renderer.insertGlobalStylesheet(stylesheets[_i13]);
4283
+ for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
4284
+ renderer.insertGlobalStylesheet(stylesheets[_i15]);
4242
4285
  }
4243
4286
  } else if (renderer.ssr) {
4244
4287
  // native shadow or light DOM, SSR
@@ -4249,12 +4292,12 @@
4249
4292
  var root = getNearestNativeShadowComponent(vm);
4250
4293
  var isGlobal = isNull(root);
4251
4294
 
4252
- for (var _i14 = 0; _i14 < stylesheets.length; _i14++) {
4295
+ for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
4253
4296
  if (isGlobal) {
4254
- renderer.insertGlobalStylesheet(stylesheets[_i14]);
4297
+ renderer.insertGlobalStylesheet(stylesheets[_i16]);
4255
4298
  } else {
4256
4299
  // local level
4257
- renderer.insertStylesheet(stylesheets[_i14], root.cmpRoot);
4300
+ renderer.insertStylesheet(stylesheets[_i16], root.cmpRoot);
4258
4301
  }
4259
4302
  }
4260
4303
  }
@@ -4439,8 +4482,8 @@
4439
4482
  var stylesheets = template.stylesheets;
4440
4483
 
4441
4484
  if (!isUndefined$1(stylesheets)) {
4442
- for (var _i15 = 0; _i15 < stylesheets.length; _i15++) {
4443
- if (isTrue(stylesheets[_i15][KEY__SCOPED_CSS])) {
4485
+ for (var _i17 = 0; _i17 < stylesheets.length; _i17++) {
4486
+ if (isTrue(stylesheets[_i17][KEY__SCOPED_CSS])) {
4444
4487
  return true;
4445
4488
  }
4446
4489
  }
@@ -4641,8 +4684,8 @@
4641
4684
 
4642
4685
  function register(service) {
4643
4686
 
4644
- for (var _i16 = 0; _i16 < hooks.length; ++_i16) {
4645
- var hookName = hooks[_i16];
4687
+ for (var _i18 = 0; _i18 < hooks.length; ++_i18) {
4688
+ var hookName = hooks[_i18];
4646
4689
 
4647
4690
  if (hookName in service) {
4648
4691
  var l = Services[hookName];
@@ -4662,8 +4705,8 @@
4662
4705
  def = vm.def,
4663
4706
  context = vm.context;
4664
4707
 
4665
- for (var _i17 = 0, _len6 = cbs.length; _i17 < _len6; ++_i17) {
4666
- cbs[_i17].call(undefined, component, {}, def, context);
4708
+ for (var _i19 = 0, _len6 = cbs.length; _i19 < _len6; ++_i19) {
4709
+ cbs[_i19].call(undefined, component, {}, def, context);
4667
4710
  }
4668
4711
  }
4669
4712
  /*
@@ -4983,19 +5026,19 @@
4983
5026
  });
4984
5027
  rehydrateQueue = []; // reset to a new queue
4985
5028
 
4986
- for (var _i18 = 0, _len7 = vms.length; _i18 < _len7; _i18 += 1) {
4987
- var vm = vms[_i18];
5029
+ for (var _i20 = 0, _len7 = vms.length; _i20 < _len7; _i20 += 1) {
5030
+ var vm = vms[_i20];
4988
5031
 
4989
5032
  try {
4990
5033
  rehydrate(vm);
4991
5034
  } catch (error) {
4992
- if (_i18 + 1 < _len7) {
5035
+ if (_i20 + 1 < _len7) {
4993
5036
  // pieces of the queue are still pending to be rehydrated, those should have priority
4994
5037
  if (rehydrateQueue.length === 0) {
4995
5038
  addCallbackToNextTick(flushRehydrationQueue);
4996
5039
  }
4997
5040
 
4998
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i18 + 1));
5041
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i20 + 1));
4999
5042
  } // we need to end the measure before throwing.
5000
5043
 
5001
5044
 
@@ -5094,8 +5137,8 @@
5094
5137
  var vCustomElementCollection = vm.velements; // Reporting disconnection for every child in inverse order since they are
5095
5138
  // inserted in reserved order.
5096
5139
 
5097
- for (var _i19 = vCustomElementCollection.length - 1; _i19 >= 0; _i19 -= 1) {
5098
- var elm = vCustomElementCollection[_i19].elm; // There are two cases where the element could be undefined:
5140
+ for (var _i21 = vCustomElementCollection.length - 1; _i21 >= 0; _i21 -= 1) {
5141
+ var elm = vCustomElementCollection[_i21].elm; // There are two cases where the element could be undefined:
5099
5142
  // * when there is an error during the construction phase, and an error
5100
5143
  // boundary picks it, there is a possibility that the VCustomElement
5101
5144
  // is not properly initialized, and therefore is should be ignored.
@@ -5129,8 +5172,8 @@
5129
5172
 
5130
5173
 
5131
5174
  function recursivelyDisconnectChildren(vnodes) {
5132
- for (var _i20 = 0, _len8 = vnodes.length; _i20 < _len8; _i20 += 1) {
5133
- var vnode = vnodes[_i20];
5175
+ for (var _i22 = 0, _len8 = vnodes.length; _i22 < _len8; _i22 += 1) {
5176
+ var vnode = vnodes[_i22];
5134
5177
 
5135
5178
  if (!isNull(vnode) && isArray$1(vnode.children) && !isUndefined$1(vnode.elm)) {
5136
5179
  // vnode is a VElement with children
@@ -5154,8 +5197,8 @@
5154
5197
  renderer = vm.renderer;
5155
5198
  var rootNode = getRenderRoot(vm);
5156
5199
 
5157
- for (var _i21 = 0, _len9 = children.length; _i21 < _len9; _i21++) {
5158
- var child = children[_i21];
5200
+ for (var _i23 = 0, _len9 = children.length; _i23 < _len9; _i23++) {
5201
+ var child = children[_i23];
5159
5202
 
5160
5203
  if (!isNull(child) && !isUndefined$1(child.elm)) {
5161
5204
  renderer.remove(child.elm, rootNode);
@@ -5200,8 +5243,8 @@
5200
5243
  var oldSlots = vm.cmpSlots;
5201
5244
  var cmpSlots = vm.cmpSlots = create(null);
5202
5245
 
5203
- for (var _i22 = 0, _len10 = children.length; _i22 < _len10; _i22 += 1) {
5204
- var vnode = children[_i22];
5246
+ for (var _i24 = 0, _len10 = children.length; _i24 < _len10; _i24 += 1) {
5247
+ var vnode = children[_i24];
5205
5248
 
5206
5249
  if (isNull(vnode)) {
5207
5250
  continue;
@@ -5231,8 +5274,8 @@
5231
5274
  return;
5232
5275
  }
5233
5276
 
5234
- for (var _i23 = 0, _len11 = oldKeys.length; _i23 < _len11; _i23 += 1) {
5235
- var key = oldKeys[_i23];
5277
+ for (var _i25 = 0, _len11 = oldKeys.length; _i25 < _len11; _i25 += 1) {
5278
+ var key = oldKeys[_i25];
5236
5279
 
5237
5280
  if (isUndefined$1(cmpSlots[key]) || oldSlots[key].length !== cmpSlots[key].length) {
5238
5281
  markComponentAsDirty(vm);
@@ -5571,8 +5614,8 @@
5571
5614
  function connectWireAdapters(vm) {
5572
5615
  var wiredConnecting = vm.context.wiredConnecting;
5573
5616
 
5574
- for (var _i24 = 0, _len12 = wiredConnecting.length; _i24 < _len12; _i24 += 1) {
5575
- wiredConnecting[_i24]();
5617
+ for (var _i26 = 0, _len12 = wiredConnecting.length; _i26 < _len12; _i26 += 1) {
5618
+ wiredConnecting[_i26]();
5576
5619
  }
5577
5620
  }
5578
5621
 
@@ -5580,8 +5623,8 @@
5580
5623
  var wiredDisconnecting = vm.context.wiredDisconnecting;
5581
5624
  runWithBoundaryProtection(vm, vm, noop, function () {
5582
5625
  // job
5583
- for (var _i25 = 0, _len13 = wiredDisconnecting.length; _i25 < _len13; _i25 += 1) {
5584
- wiredDisconnecting[_i25]();
5626
+ for (var _i27 = 0, _len13 = wiredDisconnecting.length; _i27 < _len13; _i27 += 1) {
5627
+ wiredDisconnecting[_i27]();
5585
5628
  }
5586
5629
  }, noop);
5587
5630
  }
@@ -5650,7 +5693,22 @@
5650
5693
 
5651
5694
  return reactiveMembrane.getReadOnlyProxy(obj);
5652
5695
  }
5653
- /* version: 2.5.3 */
5696
+ /*
5697
+ * Copyright (c) 2018, salesforce.com, inc.
5698
+ * All rights reserved.
5699
+ * SPDX-License-Identifier: MIT
5700
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5701
+ */
5702
+
5703
+
5704
+ var hooksAreSet = false;
5705
+
5706
+ function setHooks(hooks) {
5707
+ assert.isFalse(hooksAreSet, 'Hooks are already overridden, only one definition is allowed.');
5708
+ hooksAreSet = true;
5709
+ setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
5710
+ }
5711
+ /* version: 2.5.7 */
5654
5712
 
5655
5713
  /*
5656
5714
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5662,8 +5720,11 @@
5662
5720
 
5663
5721
  var globalStylesheets = create(null);
5664
5722
 
5665
- var globalStylesheetsParentElement = document.head || document.body || document;
5666
- var supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.replaceSync);
5723
+ var globalStylesheetsParentElement = document.head || document.body || document; // This check for constructable stylesheets is similar to Fast's:
5724
+ // https://github.com/microsoft/fast/blob/d49d1ec/packages/web-components/fast-element/src/dom.ts#L51-L53
5725
+ // See also: https://github.com/whatwg/webidl/issues/1027#issuecomment-934510070
5726
+
5727
+ var supportsConstructableStyleSheets = isFunction$1(CSSStyleSheet.prototype.replaceSync) && isArray$1(document.adoptedStyleSheets);
5667
5728
  var styleElements = create(null);
5668
5729
  var styleSheets = create(null);
5669
5730
  var nodesToStyleSheets = new WeakMap();
@@ -5872,6 +5933,24 @@
5872
5933
  getElementsByClassName: function getElementsByClassName(element, names) {
5873
5934
  return element.getElementsByClassName(names);
5874
5935
  },
5936
+ getChildren: function getChildren(element) {
5937
+ return element.children;
5938
+ },
5939
+ getChildNodes: function getChildNodes(element) {
5940
+ return element.childNodes;
5941
+ },
5942
+ getFirstChild: function getFirstChild(element) {
5943
+ return element.firstChild;
5944
+ },
5945
+ getFirstElementChild: function getFirstElementChild(element) {
5946
+ return element.firstElementChild;
5947
+ },
5948
+ getLastChild: function getLastChild(element) {
5949
+ return element.lastChild;
5950
+ },
5951
+ getLastElementChild: function getLastElementChild(element) {
5952
+ return element.lastElementChild;
5953
+ },
5875
5954
  isConnected: function isConnected(node) {
5876
5955
  return node.isConnected;
5877
5956
  },
@@ -6180,7 +6259,7 @@
6180
6259
  });
6181
6260
  freeze(LightningElement);
6182
6261
  seal(LightningElement.prototype);
6183
- /* version: 2.5.3 */
6262
+ /* version: 2.5.7 */
6184
6263
 
6185
6264
  exports.LightningElement = LightningElement;
6186
6265
  exports.__unstable__ProfilerControl = profilerControl;
@@ -6200,6 +6279,7 @@
6200
6279
  exports.sanitizeAttribute = sanitizeAttribute;
6201
6280
  exports.setFeatureFlag = setFeatureFlag;
6202
6281
  exports.setFeatureFlagForTest = setFeatureFlagForTest;
6282
+ exports.setHooks = setHooks;
6203
6283
  exports.swapComponent = swapComponent;
6204
6284
  exports.swapStyle = swapStyle;
6205
6285
  exports.swapTemplate = swapTemplate;