lwc 2.11.1 → 2.11.5

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 +331 -259
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +331 -259
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +288 -124
  5. package/dist/engine-dom/iife/es5/engine-dom.js +1132 -1046
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +418 -180
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +331 -259
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +288 -124
  11. package/dist/engine-dom/umd/es5/engine-dom.js +1132 -1046
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +418 -180
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +36 -7
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +36 -7
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  20. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  22. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  23. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  24. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  25. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  26. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  27. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  28. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  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 +2 -2
  32. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  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 +8 -9
@@ -293,7 +293,7 @@
293
293
  const XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
294
294
  const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
295
295
  const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
296
- /** version: 2.11.1 */
296
+ /** version: 2.11.5 */
297
297
 
298
298
  /*
299
299
  * Copyright (c) 2018, salesforce.com, inc.
@@ -436,7 +436,7 @@
436
436
  */
437
437
  function setFeatureFlagForTest(name, value) {
438
438
  }
439
- /** version: 2.11.1 */
439
+ /** version: 2.11.5 */
440
440
 
441
441
  /* proxy-compat-disable */
442
442
 
@@ -471,6 +471,23 @@
471
471
  }
472
472
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
473
473
  }
474
+ // Borrowed from Vue template compiler.
475
+ // https://github.com/vuejs/vue/blob/531371b818b0e31a989a06df43789728f23dc4e8/src/platforms/web/util/style.js#L5-L16
476
+ const DECLARATION_DELIMITER = /;(?![^(]*\))/g;
477
+ const PROPERTY_DELIMITER = /:(.+)/;
478
+ function parseStyleText(cssText) {
479
+ const styleMap = {};
480
+ const declarations = cssText.split(DECLARATION_DELIMITER);
481
+ for (const declaration of declarations) {
482
+ if (declaration) {
483
+ const [prop, value] = declaration.split(PROPERTY_DELIMITER);
484
+ if (prop !== undefined && value !== undefined) {
485
+ styleMap[prop.trim()] = value.trim();
486
+ }
487
+ }
488
+ }
489
+ return styleMap;
490
+ }
474
491
  // Make a shallow copy of an object but omit the given key
475
492
  function cloneAndOmitKey(object, keyToOmit) {
476
493
  const result = {};
@@ -819,8 +836,8 @@
819
836
  console[method](e);
820
837
  }
821
838
  }
822
- function logWarn(message, vm) {
823
- log('warn', message, vm);
839
+ function logError(message, vm) {
840
+ log('error', message, vm);
824
841
  }
825
842
 
826
843
  /*
@@ -2023,6 +2040,12 @@
2023
2040
  return isUndefined$1(meta) ? defaultMeta : meta;
2024
2041
  }
2025
2042
 
2043
+ /*
2044
+ * Copyright (c) 2018, salesforce.com, inc.
2045
+ * All rights reserved.
2046
+ * SPDX-License-Identifier: MIT
2047
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2048
+ */
2026
2049
  const signedTemplateSet = new Set();
2027
2050
  function defaultEmptyTemplate() {
2028
2051
  return [];
@@ -2037,6 +2060,30 @@
2037
2060
  */
2038
2061
  function registerTemplate(tpl) {
2039
2062
  signedTemplateSet.add(tpl);
2063
+ // FIXME[@W-10950976]: the template object should be frozen, and it should not be possible to set
2064
+ // the stylesheets or stylesheetToken(s). For backwards compat, though, we shim stylesheetTokens
2065
+ // on top of stylesheetToken for anyone who is accessing the old internal API.
2066
+ // Details: https://salesforce.quip.com/v1rmAFu2cKAr
2067
+ defineProperty(tpl, 'stylesheetTokens', {
2068
+ get() {
2069
+ const { stylesheetToken } = this;
2070
+ if (isUndefined$1(stylesheetToken)) {
2071
+ return stylesheetToken;
2072
+ }
2073
+ // Shim for the old `stylesheetTokens` property
2074
+ // See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
2075
+ return {
2076
+ hostAttribute: `${stylesheetToken}-host`,
2077
+ shadowAttribute: stylesheetToken,
2078
+ };
2079
+ },
2080
+ set(value) {
2081
+ // If the value is null or some other exotic object, you would be broken anyway in the past
2082
+ // because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
2083
+ // However it may be undefined in newer versions of LWC, so we need to guard against that case.
2084
+ this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
2085
+ },
2086
+ });
2040
2087
  // chaining this method as a way to wrap existing
2041
2088
  // assignment of templates easily, without too much transformation
2042
2089
  return tpl;
@@ -3942,100 +3989,6 @@
3942
3989
  }
3943
3990
  }
3944
3991
 
3945
- /*
3946
- * Copyright (c) 2022, salesforce.com, inc.
3947
- * All rights reserved.
3948
- * SPDX-License-Identifier: MIT
3949
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3950
- */
3951
- function hydrate(vnode, node) {
3952
- switch (vnode.type) {
3953
- case 0 /* Text */:
3954
- hydrateText(vnode, node);
3955
- break;
3956
- case 1 /* Comment */:
3957
- hydrateComment(vnode, node);
3958
- break;
3959
- case 2 /* Element */:
3960
- hydrateElement(vnode, node);
3961
- break;
3962
- case 3 /* CustomElement */:
3963
- hydrateCustomElement(vnode, node);
3964
- break;
3965
- }
3966
- }
3967
- function hydrateText(vnode, node) {
3968
- var _a;
3969
- // always set the text value to the one from the vnode.
3970
- setText$1(node, (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
3971
- vnode.elm = node;
3972
- }
3973
- function hydrateComment(vnode, node) {
3974
- var _a;
3975
- // always set the text value to the one from the vnode.
3976
- setProperty$1(node, 'nodeValue', (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
3977
- vnode.elm = node;
3978
- }
3979
- function hydrateElement(vnode, node) {
3980
- const elm = node;
3981
- vnode.elm = elm;
3982
- const { context } = vnode.data;
3983
- const isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === "manual" /* Manual */);
3984
- if (isDomManual) {
3985
- // it may be that this element has lwc:inner-html, we need to diff and in case are the same,
3986
- // remove the innerHTML from props so it reuses the existing dom elements.
3987
- const { props } = vnode.data;
3988
- if (!isUndefined$1(props) && !isUndefined$1(props.innerHTML)) {
3989
- if (getProperty$1(elm, 'innerHTML') === props.innerHTML) {
3990
- // Do a shallow clone since VNodeData may be shared across VNodes due to hoist optimization
3991
- vnode.data = Object.assign(Object.assign({}, vnode.data), { props: cloneAndOmitKey(props, 'innerHTML') });
3992
- }
3993
- else {
3994
- logWarn(`Mismatch hydrating element <${getProperty$1(elm, 'tagName').toLowerCase()}>: innerHTML values do not match for element, will recover from the difference`, vnode.owner);
3995
- }
3996
- }
3997
- }
3998
- patchElementPropsAndAttrs(vnode);
3999
- if (!isDomManual) {
4000
- hydrateChildren(getChildNodes$1(vnode.elm), vnode.children, vnode.owner);
4001
- }
4002
- }
4003
- function hydrateCustomElement(vnode, node) {
4004
- const elm = node;
4005
- const { sel, mode, ctor, owner } = vnode;
4006
- const vm = createVM(elm, ctor, {
4007
- mode,
4008
- owner,
4009
- tagName: sel,
4010
- });
4011
- vnode.elm = elm;
4012
- vnode.vm = vm;
4013
- allocateChildren(vnode, vm);
4014
- patchElementPropsAndAttrs(vnode);
4015
- runConnectedCallback(vm);
4016
- if (vm.renderMode !== 0 /* Light */) {
4017
- // VM is not rendering in Light DOM, we can proceed and hydrate the slotted content.
4018
- // Note: for Light DOM, this is handled while hydrating the VM
4019
- hydrateChildren(getChildNodes$1(vnode.elm), vnode.children);
4020
- }
4021
- hydrateVM(vm);
4022
- }
4023
- function hydrateChildren(elmChildren, children, vm) {
4024
- let childNodeIndex = 0;
4025
- for (let i = 0; i < children.length; i++) {
4026
- const childVnode = children[i];
4027
- if (!isNull(childVnode)) {
4028
- const childNode = elmChildren[childNodeIndex];
4029
- hydrate(childVnode, childNode);
4030
- childNodeIndex++;
4031
- }
4032
- }
4033
- }
4034
- function patchElementPropsAndAttrs(vnode) {
4035
- applyEventListeners(vnode);
4036
- patchProps(null, vnode);
4037
- }
4038
-
4039
3992
  /*
4040
3993
  * Copyright (c) 2018, salesforce.com, inc.
4041
3994
  * All rights reserved.
@@ -4081,32 +4034,12 @@
4081
4034
  /* GlobalHydrate */
4082
4035
  , vm);
4083
4036
  }
4084
- function hydrateRootElement(elm) {
4085
- const vm = getAssociatedVM(elm);
4086
- runConnectedCallback(vm);
4087
- hydrateVM(vm);
4088
- }
4089
4037
  function disconnectRootElement(elm) {
4090
4038
  const vm = getAssociatedVM(elm);
4091
4039
  resetComponentStateWhenRemoved(vm);
4092
4040
  }
4093
4041
  function appendVM(vm) {
4094
4042
  rehydrate(vm);
4095
- }
4096
- function hydrateVM(vm) {
4097
- if (isTrue(vm.isDirty)) {
4098
- // manually diffing/patching here.
4099
- // This routine is:
4100
- // patchShadowRoot(vm, children);
4101
- // -> addVnodes.
4102
- const children = renderComponent(vm);
4103
- vm.children = children;
4104
- const vmChildren = vm.renderMode === 0
4105
- /* Light */
4106
- ? getChildNodes$1(vm.elm) : getChildNodes$1(vm.elm.shadowRoot);
4107
- hydrateChildren(vmChildren, children);
4108
- runRenderedCallback(vm);
4109
- }
4110
4043
  } // just in case the component comes back, with this we guarantee re-rendering it
4111
4044
  // while preventing any attempt to rehydration until after reinsertion.
4112
4045
 
@@ -4372,7 +4305,6 @@
4372
4305
  , vm);
4373
4306
  }
4374
4307
  }
4375
-
4376
4308
  let rehydrateQueue = [];
4377
4309
 
4378
4310
  function flushRehydrationQueue() {
@@ -4993,6 +4925,237 @@
4993
4925
  return reactiveMembrane.getReadOnlyProxy(obj);
4994
4926
  }
4995
4927
 
4928
+ /*
4929
+ * Copyright (c) 2022, salesforce.com, inc.
4930
+ * All rights reserved.
4931
+ * SPDX-License-Identifier: MIT
4932
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
4933
+ */
4934
+ // flag indicating if the hydration recovered from the DOM mismatch
4935
+ let hasMismatch = false;
4936
+ function hydrateRoot(vm) {
4937
+ hasMismatch = false;
4938
+ runConnectedCallback(vm);
4939
+ hydrateVM(vm);
4940
+ if (hasMismatch) {
4941
+ logError('Hydration completed with errors.', vm);
4942
+ }
4943
+ }
4944
+ function hydrateVM(vm) {
4945
+ const children = renderComponent(vm);
4946
+ vm.children = children;
4947
+ const parentNode = vm.renderRoot;
4948
+ hydrateChildren(getFirstChild$1(parentNode), children, parentNode);
4949
+ runRenderedCallback(vm);
4950
+ }
4951
+ function hydrateNode(node, vnode) {
4952
+ let hydratedNode;
4953
+ switch (vnode.type) {
4954
+ case 0 /* Text */:
4955
+ hydratedNode = hydrateText(node, vnode);
4956
+ break;
4957
+ case 1 /* Comment */:
4958
+ hydratedNode = hydrateComment(node, vnode);
4959
+ break;
4960
+ case 2 /* Element */:
4961
+ hydratedNode = hydrateElement(node, vnode);
4962
+ break;
4963
+ case 3 /* CustomElement */:
4964
+ hydratedNode = hydrateCustomElement(node, vnode);
4965
+ break;
4966
+ }
4967
+ return nextSibling$1(hydratedNode);
4968
+ }
4969
+ function hydrateText(node, vnode) {
4970
+ var _a;
4971
+ if (!hasCorrectNodeType(vnode, node, 3 /* TEXT */)) {
4972
+ return handleMismatch(node, vnode);
4973
+ }
4974
+ setText$1(node, (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
4975
+ vnode.elm = node;
4976
+ return node;
4977
+ }
4978
+ function hydrateComment(node, vnode) {
4979
+ var _a;
4980
+ if (!hasCorrectNodeType(vnode, node, 8 /* COMMENT */)) {
4981
+ return handleMismatch(node, vnode);
4982
+ }
4983
+ setProperty$1(node, 'nodeValue', (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
4984
+ vnode.elm = node;
4985
+ return node;
4986
+ }
4987
+ function hydrateElement(elm, vnode) {
4988
+ if (!hasCorrectNodeType(vnode, elm, 1 /* ELEMENT */) ||
4989
+ !isMatchingElement(vnode, elm)) {
4990
+ return handleMismatch(elm, vnode);
4991
+ }
4992
+ vnode.elm = elm;
4993
+ const { context } = vnode.data;
4994
+ const isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === "manual" /* Manual */);
4995
+ if (isDomManual) {
4996
+ // it may be that this element has lwc:inner-html, we need to diff and in case are the same,
4997
+ // remove the innerHTML from props so it reuses the existing dom elements.
4998
+ const { props } = vnode.data;
4999
+ if (!isUndefined$1(props) && !isUndefined$1(props.innerHTML)) {
5000
+ if (getProperty$1(elm, 'innerHTML') === props.innerHTML) {
5001
+ // Do a shallow clone since VNodeData may be shared across VNodes due to hoist optimization
5002
+ vnode.data = Object.assign(Object.assign({}, vnode.data), { props: cloneAndOmitKey(props, 'innerHTML') });
5003
+ }
5004
+ }
5005
+ }
5006
+ patchElementPropsAndAttrs(vnode);
5007
+ if (!isDomManual) {
5008
+ hydrateChildren(getFirstChild$1(elm), vnode.children, elm, vnode.owner);
5009
+ }
5010
+ return elm;
5011
+ }
5012
+ function hydrateCustomElement(elm, vnode) {
5013
+ if (!hasCorrectNodeType(vnode, elm, 1 /* ELEMENT */) ||
5014
+ !isMatchingElement(vnode, elm)) {
5015
+ return handleMismatch(elm, vnode);
5016
+ }
5017
+ const { sel, mode, ctor, owner } = vnode;
5018
+ const vm = createVM(elm, ctor, {
5019
+ mode,
5020
+ owner,
5021
+ tagName: sel,
5022
+ });
5023
+ vnode.elm = elm;
5024
+ vnode.vm = vm;
5025
+ allocateChildren(vnode, vm);
5026
+ patchElementPropsAndAttrs(vnode);
5027
+ runConnectedCallback(vm);
5028
+ if (vm.renderMode !== 0 /* Light */) {
5029
+ // VM is not rendering in Light DOM, we can proceed and hydrate the slotted content.
5030
+ // Note: for Light DOM, this is handled while hydrating the VM
5031
+ hydrateChildren(getFirstChild$1(elm), vnode.children, elm);
5032
+ }
5033
+ hydrateVM(vm);
5034
+ return elm;
5035
+ }
5036
+ function hydrateChildren(node, children, parentNode, owner) {
5037
+ let nextNode = node;
5038
+ let anchor = null;
5039
+ for (let i = 0; i < children.length; i++) {
5040
+ const childVnode = children[i];
5041
+ if (!isNull(childVnode)) {
5042
+ if (nextNode) {
5043
+ nextNode = hydrateNode(nextNode, childVnode);
5044
+ anchor = childVnode.elm;
5045
+ }
5046
+ else {
5047
+ hasMismatch = true;
5048
+ mount(childVnode, parentNode, anchor);
5049
+ anchor = childVnode.elm;
5050
+ }
5051
+ }
5052
+ }
5053
+ if (nextNode) {
5054
+ hasMismatch = true;
5055
+ do {
5056
+ const current = nextNode;
5057
+ nextNode = nextSibling$1(nextNode);
5058
+ removeNode(current, parentNode);
5059
+ } while (nextNode);
5060
+ }
5061
+ }
5062
+ function handleMismatch(node, vnode, msg) {
5063
+ hasMismatch = true;
5064
+ const parentNode = getProperty$1(node, 'parentNode');
5065
+ mount(vnode, parentNode, node);
5066
+ removeNode(node, parentNode);
5067
+ return vnode.elm;
5068
+ }
5069
+ function patchElementPropsAndAttrs(vnode) {
5070
+ applyEventListeners(vnode);
5071
+ patchProps(null, vnode);
5072
+ }
5073
+ function hasCorrectNodeType(vnode, node, nodeType) {
5074
+ if (getProperty$1(node, 'nodeType') !== nodeType) {
5075
+ return false;
5076
+ }
5077
+ return true;
5078
+ }
5079
+ function isMatchingElement(vnode, elm) {
5080
+ if (vnode.sel.toLowerCase() !== getProperty$1(elm, 'tagName').toLowerCase()) {
5081
+ return false;
5082
+ }
5083
+ const hasIncompatibleAttrs = validateAttrs(vnode, elm);
5084
+ const hasIncompatibleClass = validateClassAttr(vnode, elm);
5085
+ const hasIncompatibleStyle = validateStyleAttr(vnode, elm);
5086
+ return hasIncompatibleAttrs && hasIncompatibleClass && hasIncompatibleStyle;
5087
+ }
5088
+ function validateAttrs(vnode, elm) {
5089
+ const { data: { attrs = {} }, } = vnode;
5090
+ let nodesAreCompatible = true;
5091
+ // Validate attributes, though we could always recovery from those by running the update mods.
5092
+ // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
5093
+ for (const [attrName, attrValue] of Object.entries(attrs)) {
5094
+ const elmAttrValue = getAttribute$1(elm, attrName);
5095
+ if (String(attrValue) !== elmAttrValue) {
5096
+ nodesAreCompatible = false;
5097
+ }
5098
+ }
5099
+ return nodesAreCompatible;
5100
+ }
5101
+ function validateClassAttr(vnode, elm) {
5102
+ const { data: { className, classMap }, } = vnode;
5103
+ let nodesAreCompatible = true;
5104
+ if (!isUndefined$1(className) && String(className) !== getProperty$1(elm, 'className')) {
5105
+ // className is used when class is bound to an expr.
5106
+ nodesAreCompatible = false;
5107
+ }
5108
+ else if (!isUndefined$1(classMap)) {
5109
+ // classMap is used when class is set to static value.
5110
+ const classList = getClassList$1(elm);
5111
+ let computedClassName = '';
5112
+ // all classes from the vnode should be in the element.classList
5113
+ for (const name in classMap) {
5114
+ computedClassName += ' ' + name;
5115
+ if (!classList.contains(name)) {
5116
+ nodesAreCompatible = false;
5117
+ }
5118
+ }
5119
+ computedClassName.trim();
5120
+ if (classList.length > keys(classMap).length) {
5121
+ nodesAreCompatible = false;
5122
+ }
5123
+ }
5124
+ return nodesAreCompatible;
5125
+ }
5126
+ function validateStyleAttr(vnode, elm) {
5127
+ const { data: { style, styleDecls }, } = vnode;
5128
+ const elmStyle = getAttribute$1(elm, 'style') || '';
5129
+ let nodesAreCompatible = true;
5130
+ if (!isUndefined$1(style) && style !== elmStyle) {
5131
+ nodesAreCompatible = false;
5132
+ }
5133
+ else if (!isUndefined$1(styleDecls)) {
5134
+ const parsedVnodeStyle = parseStyleText(elmStyle);
5135
+ const expectedStyle = [];
5136
+ // styleMap is used when style is set to static value.
5137
+ for (let i = 0, n = styleDecls.length; i < n; i++) {
5138
+ const [prop, value, important] = styleDecls[i];
5139
+ expectedStyle.push(`${prop}: ${value + (important ? ' important!' : '')}`);
5140
+ const parsedPropValue = parsedVnodeStyle[prop];
5141
+ if (isUndefined$1(parsedPropValue)) {
5142
+ nodesAreCompatible = false;
5143
+ }
5144
+ else if (!parsedPropValue.startsWith(value)) {
5145
+ nodesAreCompatible = false;
5146
+ }
5147
+ else if (important && !parsedPropValue.endsWith('!important')) {
5148
+ nodesAreCompatible = false;
5149
+ }
5150
+ }
5151
+ if (keys(parsedVnodeStyle).length > styleDecls.length) {
5152
+ nodesAreCompatible = false;
5153
+ }
5154
+ ArrayJoin.call(expectedStyle, ';');
5155
+ }
5156
+ return nodesAreCompatible;
5157
+ }
5158
+
4996
5159
  /*
4997
5160
  * Copyright (c) 2018, salesforce.com, inc.
4998
5161
  * All rights reserved.
@@ -5005,7 +5168,7 @@
5005
5168
  hooksAreSet = true;
5006
5169
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
5007
5170
  }
5008
- /* version: 2.11.1 */
5171
+ /* version: 2.11.5 */
5009
5172
 
5010
5173
  /*
5011
5174
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5325,7 +5488,7 @@
5325
5488
  }
5326
5489
  }
5327
5490
  function createVMWithProps(element, Ctor, props) {
5328
- createVM(element, Ctor, {
5491
+ const vm = createVM(element, Ctor, {
5329
5492
  mode: 'open',
5330
5493
  owner: null,
5331
5494
  tagName: element.tagName.toLowerCase(),
@@ -5333,6 +5496,7 @@
5333
5496
  for (const [key, value] of Object.entries(props)) {
5334
5497
  element[key] = value;
5335
5498
  }
5499
+ return vm;
5336
5500
  }
5337
5501
  function hydrateComponent(element, Ctor, props = {}) {
5338
5502
  if (!(element instanceof Element)) {
@@ -5353,8 +5517,8 @@
5353
5517
  // Let the renderer know we are hydrating, so it does not replace the existing shadowRoot
5354
5518
  // and uses the same algo to create the stylesheets as in SSR.
5355
5519
  setIsHydrating(true);
5356
- createVMWithProps(element, Ctor, props);
5357
- hydrateRootElement(element);
5520
+ const vm = createVMWithProps(element, Ctor, props);
5521
+ hydrateRoot(vm);
5358
5522
  // set it back since now we finished hydration.
5359
5523
  setIsHydrating(false);
5360
5524
  }
@@ -5611,7 +5775,7 @@
5611
5775
  });
5612
5776
  freeze(LightningElement);
5613
5777
  seal(LightningElement.prototype);
5614
- /* version: 2.11.1 */
5778
+ /* version: 2.11.5 */
5615
5779
 
5616
5780
  exports.LightningElement = LightningElement;
5617
5781
  exports.__unstable__ProfilerControl = profilerControl;