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