lwc 2.10.0 → 2.11.3

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 +4387 -5935
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +4387 -5935
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +3463 -4675
  5. package/dist/engine-dom/iife/es5/engine-dom.js +1121 -1077
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +432 -217
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +4387 -5935
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +3463 -4675
  11. package/dist/engine-dom/umd/es5/engine-dom.js +1121 -1077
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +432 -217
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +4055 -5391
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +4055 -5391
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +2952 -3673
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +2952 -3673
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +2825 -3532
  20. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +11 -3
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +11 -3
  22. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +2952 -3673
  23. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +2825 -3532
  24. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +11 -3
  25. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +11 -3
  26. package/dist/wire-service/esm/es2017/wire-service.js +128 -174
  27. package/dist/wire-service/iife/es2017/wire-service.js +128 -174
  28. package/dist/wire-service/iife/es2017/wire-service_debug.js +128 -174
  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 +128 -174
  32. package/dist/wire-service/umd/es2017/wire-service_debug.js +128 -174
  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
@@ -52,6 +52,8 @@
52
52
 
53
53
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
54
54
 
55
+ function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
56
+
55
57
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
56
58
 
57
59
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
@@ -348,7 +350,7 @@
348
350
  var XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
349
351
  var SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
350
352
  var XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
351
- /** version: 2.10.0 */
353
+ /** version: 2.11.3 */
352
354
 
353
355
  /*
354
356
  * Copyright (c) 2018, salesforce.com, inc.
@@ -451,12 +453,12 @@
451
453
 
452
454
 
453
455
  var features = {
454
- DISABLE_MIXED_SHADOW_MODE: null,
455
456
  ENABLE_ELEMENT_PATCH: null,
456
457
  ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST: null,
457
458
  ENABLE_HMR: null,
458
459
  ENABLE_HTML_COLLECTIONS_PATCH: null,
459
460
  ENABLE_INNER_OUTER_TEXT_PATCH: null,
461
+ ENABLE_MIXED_SHADOW_MODE: null,
460
462
  ENABLE_NODE_LIST_PATCH: null,
461
463
  ENABLE_NODE_PATCH: null,
462
464
  ENABLE_REACTIVE_SETTER: null,
@@ -518,7 +520,7 @@
518
520
 
519
521
  function setFeatureFlagForTest(name, value) {
520
522
  }
521
- /** version: 2.10.0 */
523
+ /** version: 2.11.3 */
522
524
 
523
525
  /* proxy-compat-disable */
524
526
 
@@ -561,6 +563,42 @@
561
563
 
562
564
  return s4() + s4() + '-' + s4() + '-' + s4() + '-' + s4() + '-' + s4() + s4() + s4();
563
565
  } // Borrowed from Vue template compiler.
566
+ // https://github.com/vuejs/vue/blob/531371b818b0e31a989a06df43789728f23dc4e8/src/platforms/web/util/style.js#L5-L16
567
+
568
+
569
+ var DECLARATION_DELIMITER = /;(?![^(]*\))/g;
570
+ var PROPERTY_DELIMITER = /:(.+)/;
571
+
572
+ function parseStyleText(cssText) {
573
+ var styleMap = {};
574
+ var declarations = cssText.split(DECLARATION_DELIMITER);
575
+
576
+ var _iterator = _createForOfIteratorHelper(declarations),
577
+ _step;
578
+
579
+ try {
580
+ for (_iterator.s(); !(_step = _iterator.n()).done;) {
581
+ var declaration = _step.value;
582
+
583
+ if (declaration) {
584
+ var _declaration$split = declaration.split(PROPERTY_DELIMITER),
585
+ _declaration$split2 = _slicedToArray(_declaration$split, 2),
586
+ prop = _declaration$split2[0],
587
+ value = _declaration$split2[1];
588
+
589
+ if (prop !== undefined && value !== undefined) {
590
+ styleMap[prop.trim()] = value.trim();
591
+ }
592
+ }
593
+ }
594
+ } catch (err) {
595
+ _iterator.e(err);
596
+ } finally {
597
+ _iterator.f();
598
+ }
599
+
600
+ return styleMap;
601
+ } // Make a shallow copy of an object but omit the given key
564
602
 
565
603
 
566
604
  function cloneAndOmitKey(object, keyToOmit) {
@@ -1033,8 +1071,8 @@
1033
1071
  }
1034
1072
  }
1035
1073
 
1036
- function logWarn(message, vm) {
1037
- log('warn', message, vm);
1074
+ function logError(message, vm) {
1075
+ log('error', message, vm);
1038
1076
  }
1039
1077
  /*
1040
1078
  * Copyright (c) 2018, salesforce.com, inc.
@@ -1054,6 +1092,7 @@
1054
1092
  * SPDX-License-Identifier: MIT
1055
1093
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
1056
1094
  */
1095
+ // These properties get added to LWCElement.prototype publicProps automatically
1057
1096
 
1058
1097
  var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
1059
1098
 
@@ -2593,13 +2632,6 @@
2593
2632
  var meta = signedDecoratorToMetaMap.get(Ctor);
2594
2633
  return isUndefined$1(meta) ? defaultMeta : meta;
2595
2634
  }
2596
- /*
2597
- * Copyright (c) 2018, salesforce.com, inc.
2598
- * All rights reserved.
2599
- * SPDX-License-Identifier: MIT
2600
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2601
- */
2602
-
2603
2635
 
2604
2636
  var signedTemplateSet = new Set();
2605
2637
 
@@ -2642,6 +2674,7 @@
2642
2674
  * SPDX-License-Identifier: MIT
2643
2675
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
2644
2676
  */
2677
+ // A bridge descriptor is a descriptor whose job is just to get the component instance
2645
2678
  // from the element instance, and get the value or set a new value on the component.
2646
2679
  // This means that across different elements, similar names can get the exact same
2647
2680
  // descriptor, so we can cache them:
@@ -3335,6 +3368,7 @@
3335
3368
  * SPDX-License-Identifier: MIT
3336
3369
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3337
3370
  */
3371
+ // The style property is a string when defined via an expression in the template.
3338
3372
 
3339
3373
 
3340
3374
  function patchStyleAttribute(oldVnode, vnode) {
@@ -3379,6 +3413,7 @@
3379
3413
  * SPDX-License-Identifier: MIT
3380
3414
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3381
3415
  */
3416
+ // The HTML class property becomes the vnode.data.classMap object when defined as a string in the template.
3382
3417
  // The compiler takes care of transforming the inline classnames into an object. It's faster to set the
3383
3418
  // different classnames properties individually instead of via a string.
3384
3419
 
@@ -3403,6 +3438,7 @@
3403
3438
  * SPDX-License-Identifier: MIT
3404
3439
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
3405
3440
  */
3441
+ // The HTML style property becomes the vnode.data.styleDecls object when defined as a string in the template.
3406
3442
  // The compiler takes care of transforming the inline style into an object. It's faster to set the
3407
3443
  // different style properties individually instead of via a string.
3408
3444
 
@@ -4954,12 +4990,17 @@
4954
4990
  * will prevent this function from being imported by userland code.
4955
4991
  */
4956
4992
 
4957
- function registerComponent(Ctor, _ref2) {
4993
+ function registerComponent( // We typically expect a LightningElementConstructor, but technically you can call this with anything
4994
+ Ctor, _ref2) {
4958
4995
  var tmpl = _ref2.tmpl;
4959
4996
 
4960
- signedTemplateMap.set(Ctor, tmpl); // chaining this method as a way to wrap existing assignment of component constructor easily,
4997
+ if (isFunction$1(Ctor)) {
4998
+
4999
+ signedTemplateMap.set(Ctor, tmpl);
5000
+ } // chaining this method as a way to wrap existing assignment of component constructor easily,
4961
5001
  // without too much transformation
4962
5002
 
5003
+
4963
5004
  return Ctor;
4964
5005
  }
4965
5006
 
@@ -5054,140 +5095,6 @@
5054
5095
  cbs[_i22].call(undefined, component, {}, def, context);
5055
5096
  }
5056
5097
  }
5057
- /*
5058
- * Copyright (c) 2022, salesforce.com, inc.
5059
- * All rights reserved.
5060
- * SPDX-License-Identifier: MIT
5061
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5062
- */
5063
-
5064
-
5065
- function hydrate(vnode, node) {
5066
- switch (vnode.type) {
5067
- case 0
5068
- /* Text */
5069
- :
5070
- hydrateText(vnode, node);
5071
- break;
5072
-
5073
- case 1
5074
- /* Comment */
5075
- :
5076
- hydrateComment(vnode, node);
5077
- break;
5078
-
5079
- case 2
5080
- /* Element */
5081
- :
5082
- hydrateElement(vnode, node);
5083
- break;
5084
-
5085
- case 3
5086
- /* CustomElement */
5087
- :
5088
- hydrateCustomElement(vnode, node);
5089
- break;
5090
- }
5091
- }
5092
-
5093
- function hydrateText(vnode, node) {
5094
- var _a;
5095
-
5096
-
5097
- setText$1(node, (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
5098
- vnode.elm = node;
5099
- }
5100
-
5101
- function hydrateComment(vnode, node) {
5102
- var _a;
5103
-
5104
-
5105
- setProperty$1(node, 'nodeValue', (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
5106
- vnode.elm = node;
5107
- }
5108
-
5109
- function hydrateElement(vnode, node) {
5110
-
5111
- var elm = node;
5112
- vnode.elm = elm;
5113
- var context = vnode.data.context;
5114
- var isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === "manual"
5115
- /* Manual */
5116
- );
5117
-
5118
- if (isDomManual) {
5119
- // it may be that this element has lwc:inner-html, we need to diff and in case are the same,
5120
- // remove the innerHTML from props so it reuses the existing dom elements.
5121
- var props = vnode.data.props;
5122
-
5123
- if (!isUndefined$1(props) && !isUndefined$1(props.innerHTML)) {
5124
- if (getProperty$1(elm, 'innerHTML') === props.innerHTML) {
5125
- // Do a shallow clone since VNodeData may be shared across VNodes due to hoist optimization
5126
- vnode.data = Object.assign(Object.assign({}, vnode.data), {
5127
- props: cloneAndOmitKey(props, 'innerHTML')
5128
- });
5129
- } else {
5130
- logWarn("Mismatch hydrating element <".concat(getProperty$1(elm, 'tagName').toLowerCase(), ">: innerHTML values do not match for element, will recover from the difference"), vnode.owner);
5131
- }
5132
- }
5133
- }
5134
-
5135
- patchElementPropsAndAttrs(vnode);
5136
-
5137
- if (!isDomManual) {
5138
- hydrateChildren(getChildNodes$1(vnode.elm), vnode.children, vnode.owner);
5139
- }
5140
- }
5141
-
5142
- function hydrateCustomElement(vnode, node) {
5143
-
5144
- var elm = node;
5145
- var sel = vnode.sel,
5146
- mode = vnode.mode,
5147
- ctor = vnode.ctor,
5148
- owner = vnode.owner;
5149
- var vm = createVM(elm, ctor, {
5150
- mode: mode,
5151
- owner: owner,
5152
- tagName: sel
5153
- });
5154
- vnode.elm = elm;
5155
- vnode.vm = vm;
5156
- allocateChildren(vnode, vm);
5157
- patchElementPropsAndAttrs(vnode); // Insert hook section:
5158
-
5159
- runConnectedCallback(vm);
5160
-
5161
- if (vm.renderMode !== 0
5162
- /* Light */
5163
- ) {
5164
- // VM is not rendering in Light DOM, we can proceed and hydrate the slotted content.
5165
- // Note: for Light DOM, this is handled while hydrating the VM
5166
- hydrateChildren(getChildNodes$1(vnode.elm), vnode.children);
5167
- }
5168
-
5169
- hydrateVM(vm);
5170
- }
5171
-
5172
- function hydrateChildren(elmChildren, children, vm) {
5173
-
5174
- var childNodeIndex = 0;
5175
-
5176
- for (var _i23 = 0; _i23 < children.length; _i23++) {
5177
- var childVnode = children[_i23];
5178
-
5179
- if (!isNull(childVnode)) {
5180
- var childNode = elmChildren[childNodeIndex];
5181
- hydrate(childVnode, childNode);
5182
- childNodeIndex++;
5183
- }
5184
- }
5185
- }
5186
-
5187
- function patchElementPropsAndAttrs(vnode) {
5188
- applyEventListeners(vnode);
5189
- patchProps(null, vnode);
5190
- }
5191
5098
  /*
5192
5099
  * Copyright (c) 2018, salesforce.com, inc.
5193
5100
  * All rights reserved.
@@ -5238,12 +5145,6 @@
5238
5145
  , vm);
5239
5146
  }
5240
5147
 
5241
- function hydrateRootElement(elm) {
5242
- var vm = getAssociatedVM(elm);
5243
- runConnectedCallback(vm);
5244
- hydrateVM(vm);
5245
- }
5246
-
5247
5148
  function disconnectRootElement(elm) {
5248
5149
  var vm = getAssociatedVM(elm);
5249
5150
  resetComponentStateWhenRemoved(vm);
@@ -5251,22 +5152,6 @@
5251
5152
 
5252
5153
  function appendVM(vm) {
5253
5154
  rehydrate(vm);
5254
- }
5255
-
5256
- function hydrateVM(vm) {
5257
- if (isTrue(vm.isDirty)) {
5258
- // manually diffing/patching here.
5259
- // This routine is:
5260
- // patchShadowRoot(vm, children);
5261
- // -> addVnodes.
5262
- var children = renderComponent(vm);
5263
- vm.children = children;
5264
- var vmChildren = vm.renderMode === 0
5265
- /* Light */
5266
- ? getChildNodes$1(vm.elm) : getChildNodes$1(vm.elm.shadowRoot);
5267
- hydrateChildren(vmChildren, children);
5268
- runRenderedCallback(vm);
5269
- }
5270
5155
  } // just in case the component comes back, with this we guarantee re-rendering it
5271
5156
  // while preventing any attempt to rehydration until after reinsertion.
5272
5157
 
@@ -5386,34 +5271,38 @@
5386
5271
  /* Native */
5387
5272
  ;
5388
5273
  } else if (isNativeShadowDefined$1) {
5389
- if (runtimeFlags.DISABLE_MIXED_SHADOW_MODE) {
5390
- shadowMode = 1
5391
- /* Synthetic */
5392
- ;
5393
- } else if (def.shadowSupportMode === "any"
5394
- /* Any */
5395
- ) {
5396
- shadowMode = 0
5397
- /* Native */
5398
- ;
5399
- } else {
5400
- var shadowAncestor = getNearestShadowAncestor(vm);
5401
-
5402
- if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
5403
- /* Native */
5274
+ // Not combined with above condition because @lwc/features only supports identifiers in
5275
+ // the if-condition.
5276
+ if (runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
5277
+ if (def.shadowSupportMode === "any"
5278
+ /* Any */
5404
5279
  ) {
5405
- // Transitive support for native Shadow DOM. A component in native mode
5406
- // transitively opts all of its descendants into native.
5407
5280
  shadowMode = 0
5408
5281
  /* Native */
5409
5282
  ;
5410
5283
  } else {
5411
- // Synthetic if neither this component nor any of its ancestors are configured
5412
- // to be native.
5413
- shadowMode = 1
5414
- /* Synthetic */
5415
- ;
5284
+ var shadowAncestor = getNearestShadowAncestor(vm);
5285
+
5286
+ if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
5287
+ /* Native */
5288
+ ) {
5289
+ // Transitive support for native Shadow DOM. A component in native mode
5290
+ // transitively opts all of its descendants into native.
5291
+ shadowMode = 0
5292
+ /* Native */
5293
+ ;
5294
+ } else {
5295
+ // Synthetic if neither this component nor any of its ancestors are configured
5296
+ // to be native.
5297
+ shadowMode = 1
5298
+ /* Synthetic */
5299
+ ;
5300
+ }
5416
5301
  }
5302
+ } else {
5303
+ shadowMode = 1
5304
+ /* Synthetic */
5305
+ ;
5417
5306
  }
5418
5307
  } else {
5419
5308
  // Synthetic if there is no native Shadow DOM support.
@@ -5528,19 +5417,19 @@
5528
5417
  });
5529
5418
  rehydrateQueue = []; // reset to a new queue
5530
5419
 
5531
- for (var _i26 = 0, _len8 = vms.length; _i26 < _len8; _i26 += 1) {
5532
- var vm = vms[_i26];
5420
+ for (var _i23 = 0, _len8 = vms.length; _i23 < _len8; _i23 += 1) {
5421
+ var vm = vms[_i23];
5533
5422
 
5534
5423
  try {
5535
5424
  rehydrate(vm);
5536
5425
  } catch (error) {
5537
- if (_i26 + 1 < _len8) {
5426
+ if (_i23 + 1 < _len8) {
5538
5427
  // pieces of the queue are still pending to be rehydrated, those should have priority
5539
5428
  if (rehydrateQueue.length === 0) {
5540
5429
  addCallbackToNextTick(flushRehydrationQueue);
5541
5430
  }
5542
5431
 
5543
- ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i26 + 1));
5432
+ ArrayUnshift.apply(rehydrateQueue, ArraySlice.call(vms, _i23 + 1));
5544
5433
  } // we need to end the measure before throwing.
5545
5434
 
5546
5435
 
@@ -5639,8 +5528,8 @@
5639
5528
  var vCustomElementCollection = vm.velements; // Reporting disconnection for every child in inverse order since they are
5640
5529
  // inserted in reserved order.
5641
5530
 
5642
- for (var _i27 = vCustomElementCollection.length - 1; _i27 >= 0; _i27 -= 1) {
5643
- var elm = vCustomElementCollection[_i27].elm; // There are two cases where the element could be undefined:
5531
+ for (var _i24 = vCustomElementCollection.length - 1; _i24 >= 0; _i24 -= 1) {
5532
+ var elm = vCustomElementCollection[_i24].elm; // There are two cases where the element could be undefined:
5644
5533
  // * when there is an error during the construction phase, and an error
5645
5534
  // boundary picks it, there is a possibility that the VCustomElement
5646
5535
  // is not properly initialized, and therefore is should be ignored.
@@ -5674,8 +5563,8 @@
5674
5563
 
5675
5564
 
5676
5565
  function recursivelyDisconnectChildren(vnodes) {
5677
- for (var _i28 = 0, _len9 = vnodes.length; _i28 < _len9; _i28 += 1) {
5678
- var vnode = vnodes[_i28];
5566
+ for (var _i25 = 0, _len9 = vnodes.length; _i25 < _len9; _i25 += 1) {
5567
+ var vnode = vnodes[_i25];
5679
5568
 
5680
5569
  if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
5681
5570
  switch (vnode.type) {
@@ -5706,8 +5595,8 @@
5706
5595
  var children = vm.children,
5707
5596
  renderRoot = vm.renderRoot;
5708
5597
 
5709
- for (var _i29 = 0, _len10 = children.length; _i29 < _len10; _i29++) {
5710
- var child = children[_i29];
5598
+ for (var _i26 = 0, _len10 = children.length; _i26 < _len10; _i26++) {
5599
+ var child = children[_i26];
5711
5600
 
5712
5601
  if (!isNull(child) && !isUndefined$1(child.elm)) {
5713
5602
  remove$1(child.elm, renderRoot);
@@ -6057,8 +5946,8 @@
6057
5946
  function connectWireAdapters(vm) {
6058
5947
  var wiredConnecting = vm.context.wiredConnecting;
6059
5948
 
6060
- for (var _i30 = 0, _len11 = wiredConnecting.length; _i30 < _len11; _i30 += 1) {
6061
- wiredConnecting[_i30]();
5949
+ for (var _i27 = 0, _len11 = wiredConnecting.length; _i27 < _len11; _i27 += 1) {
5950
+ wiredConnecting[_i27]();
6062
5951
  }
6063
5952
  }
6064
5953
 
@@ -6066,8 +5955,8 @@
6066
5955
  var wiredDisconnecting = vm.context.wiredDisconnecting;
6067
5956
  runWithBoundaryProtection(vm, vm, noop, function () {
6068
5957
  // job
6069
- for (var _i31 = 0, _len12 = wiredDisconnecting.length; _i31 < _len12; _i31 += 1) {
6070
- wiredDisconnecting[_i31]();
5958
+ for (var _i28 = 0, _len12 = wiredDisconnecting.length; _i28 < _len12; _i28 += 1) {
5959
+ wiredDisconnecting[_i28]();
6071
5960
  }
6072
5961
  }, noop);
6073
5962
  }
@@ -6077,6 +5966,7 @@
6077
5966
  * SPDX-License-Identifier: MIT
6078
5967
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6079
5968
  */
5969
+ // this is lwc internal implementation
6080
5970
 
6081
5971
 
6082
5972
  function createContextProvider(adapter) {
@@ -6136,6 +6026,327 @@
6136
6026
 
6137
6027
  return reactiveMembrane.getReadOnlyProxy(obj);
6138
6028
  }
6029
+ /*
6030
+ * Copyright (c) 2022, salesforce.com, inc.
6031
+ * All rights reserved.
6032
+ * SPDX-License-Identifier: MIT
6033
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6034
+ */
6035
+ // flag indicating if the hydration recovered from the DOM mismatch
6036
+
6037
+
6038
+ var hasMismatch = false;
6039
+
6040
+ function hydrateRoot(vm) {
6041
+ hasMismatch = false;
6042
+ runConnectedCallback(vm);
6043
+ hydrateVM(vm);
6044
+
6045
+ if (hasMismatch) {
6046
+ logError('Hydration completed with errors.', vm);
6047
+ }
6048
+ }
6049
+
6050
+ function hydrateVM(vm) {
6051
+ var children = renderComponent(vm);
6052
+ vm.children = children;
6053
+ var parentNode = vm.renderRoot;
6054
+ hydrateChildren(getFirstChild$1(parentNode), children, parentNode);
6055
+ runRenderedCallback(vm);
6056
+ }
6057
+
6058
+ function hydrateNode(node, vnode) {
6059
+ var hydratedNode;
6060
+
6061
+ switch (vnode.type) {
6062
+ case 0
6063
+ /* Text */
6064
+ :
6065
+ hydratedNode = hydrateText(node, vnode);
6066
+ break;
6067
+
6068
+ case 1
6069
+ /* Comment */
6070
+ :
6071
+ hydratedNode = hydrateComment(node, vnode);
6072
+ break;
6073
+
6074
+ case 2
6075
+ /* Element */
6076
+ :
6077
+ hydratedNode = hydrateElement(node, vnode);
6078
+ break;
6079
+
6080
+ case 3
6081
+ /* CustomElement */
6082
+ :
6083
+ hydratedNode = hydrateCustomElement(node, vnode);
6084
+ break;
6085
+ }
6086
+
6087
+ return nextSibling$1(hydratedNode);
6088
+ }
6089
+
6090
+ function hydrateText(node, vnode) {
6091
+ var _a;
6092
+
6093
+ if (!hasCorrectNodeType(vnode, node, 3
6094
+ /* TEXT */
6095
+ )) {
6096
+ return handleMismatch(node, vnode);
6097
+ }
6098
+
6099
+ setText$1(node, (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
6100
+ vnode.elm = node;
6101
+ return node;
6102
+ }
6103
+
6104
+ function hydrateComment(node, vnode) {
6105
+ var _a;
6106
+
6107
+ if (!hasCorrectNodeType(vnode, node, 8
6108
+ /* COMMENT */
6109
+ )) {
6110
+ return handleMismatch(node, vnode);
6111
+ }
6112
+
6113
+ setProperty$1(node, 'nodeValue', (_a = vnode.text) !== null && _a !== void 0 ? _a : null);
6114
+ vnode.elm = node;
6115
+ return node;
6116
+ }
6117
+
6118
+ function hydrateElement(elm, vnode) {
6119
+ if (!hasCorrectNodeType(vnode, elm, 1
6120
+ /* ELEMENT */
6121
+ ) || !isMatchingElement(vnode, elm)) {
6122
+ return handleMismatch(elm, vnode);
6123
+ }
6124
+
6125
+ vnode.elm = elm;
6126
+ var context = vnode.data.context;
6127
+ var isDomManual = Boolean(!isUndefined$1(context) && !isUndefined$1(context.lwc) && context.lwc.dom === "manual"
6128
+ /* Manual */
6129
+ );
6130
+
6131
+ if (isDomManual) {
6132
+ // it may be that this element has lwc:inner-html, we need to diff and in case are the same,
6133
+ // remove the innerHTML from props so it reuses the existing dom elements.
6134
+ var props = vnode.data.props;
6135
+
6136
+ if (!isUndefined$1(props) && !isUndefined$1(props.innerHTML)) {
6137
+ if (getProperty$1(elm, 'innerHTML') === props.innerHTML) {
6138
+ // Do a shallow clone since VNodeData may be shared across VNodes due to hoist optimization
6139
+ vnode.data = Object.assign(Object.assign({}, vnode.data), {
6140
+ props: cloneAndOmitKey(props, 'innerHTML')
6141
+ });
6142
+ }
6143
+ }
6144
+ }
6145
+
6146
+ patchElementPropsAndAttrs(vnode);
6147
+
6148
+ if (!isDomManual) {
6149
+ hydrateChildren(getFirstChild$1(elm), vnode.children, elm, vnode.owner);
6150
+ }
6151
+
6152
+ return elm;
6153
+ }
6154
+
6155
+ function hydrateCustomElement(elm, vnode) {
6156
+ if (!hasCorrectNodeType(vnode, elm, 1
6157
+ /* ELEMENT */
6158
+ ) || !isMatchingElement(vnode, elm)) {
6159
+ return handleMismatch(elm, vnode);
6160
+ }
6161
+
6162
+ var sel = vnode.sel,
6163
+ mode = vnode.mode,
6164
+ ctor = vnode.ctor,
6165
+ owner = vnode.owner;
6166
+ var vm = createVM(elm, ctor, {
6167
+ mode: mode,
6168
+ owner: owner,
6169
+ tagName: sel
6170
+ });
6171
+ vnode.elm = elm;
6172
+ vnode.vm = vm;
6173
+ allocateChildren(vnode, vm);
6174
+ patchElementPropsAndAttrs(vnode); // Insert hook section:
6175
+
6176
+ runConnectedCallback(vm);
6177
+
6178
+ if (vm.renderMode !== 0
6179
+ /* Light */
6180
+ ) {
6181
+ // VM is not rendering in Light DOM, we can proceed and hydrate the slotted content.
6182
+ // Note: for Light DOM, this is handled while hydrating the VM
6183
+ hydrateChildren(getFirstChild$1(elm), vnode.children, elm);
6184
+ }
6185
+
6186
+ hydrateVM(vm);
6187
+ return elm;
6188
+ }
6189
+
6190
+ function hydrateChildren(node, children, parentNode, owner) {
6191
+ var nextNode = node;
6192
+ var anchor = null;
6193
+
6194
+ for (var _i29 = 0; _i29 < children.length; _i29++) {
6195
+ var childVnode = children[_i29];
6196
+
6197
+ if (!isNull(childVnode)) {
6198
+ if (nextNode) {
6199
+ nextNode = hydrateNode(nextNode, childVnode);
6200
+ anchor = childVnode.elm;
6201
+ } else {
6202
+ hasMismatch = true;
6203
+
6204
+ mount(childVnode, parentNode, anchor);
6205
+ anchor = childVnode.elm;
6206
+ }
6207
+ }
6208
+ }
6209
+
6210
+ if (nextNode) {
6211
+ hasMismatch = true;
6212
+
6213
+ do {
6214
+ var current = nextNode;
6215
+ nextNode = nextSibling$1(nextNode);
6216
+ removeNode(current, parentNode);
6217
+ } while (nextNode);
6218
+ }
6219
+ }
6220
+
6221
+ function handleMismatch(node, vnode, msg) {
6222
+ hasMismatch = true;
6223
+
6224
+ var parentNode = getProperty$1(node, 'parentNode');
6225
+ mount(vnode, parentNode, node);
6226
+ removeNode(node, parentNode);
6227
+ return vnode.elm;
6228
+ }
6229
+
6230
+ function patchElementPropsAndAttrs(vnode) {
6231
+ applyEventListeners(vnode);
6232
+ patchProps(null, vnode);
6233
+ }
6234
+
6235
+ function hasCorrectNodeType(vnode, node, nodeType) {
6236
+ if (getProperty$1(node, 'nodeType') !== nodeType) {
6237
+
6238
+ return false;
6239
+ }
6240
+
6241
+ return true;
6242
+ }
6243
+
6244
+ function isMatchingElement(vnode, elm) {
6245
+ if (vnode.sel.toLowerCase() !== getProperty$1(elm, 'tagName').toLowerCase()) {
6246
+
6247
+ return false;
6248
+ }
6249
+
6250
+ var hasIncompatibleAttrs = validateAttrs(vnode, elm);
6251
+ var hasIncompatibleClass = validateClassAttr(vnode, elm);
6252
+ var hasIncompatibleStyle = validateStyleAttr(vnode, elm);
6253
+ return hasIncompatibleAttrs && hasIncompatibleClass && hasIncompatibleStyle;
6254
+ }
6255
+
6256
+ function validateAttrs(vnode, elm) {
6257
+ var _vnode$data$attrs = vnode.data.attrs,
6258
+ attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
6259
+ var nodesAreCompatible = true; // Validate attributes, though we could always recovery from those by running the update mods.
6260
+ // Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
6261
+
6262
+ for (var _i30 = 0, _Object$entries = Object.entries(attrs); _i30 < _Object$entries.length; _i30++) {
6263
+ var _Object$entries$_i = _slicedToArray(_Object$entries[_i30], 2),
6264
+ attrName = _Object$entries$_i[0],
6265
+ attrValue = _Object$entries$_i[1];
6266
+
6267
+ var elmAttrValue = getAttribute$1(elm, attrName);
6268
+
6269
+ if (String(attrValue) !== elmAttrValue) {
6270
+
6271
+ nodesAreCompatible = false;
6272
+ }
6273
+ }
6274
+
6275
+ return nodesAreCompatible;
6276
+ }
6277
+
6278
+ function validateClassAttr(vnode, elm) {
6279
+ var _vnode$data = vnode.data,
6280
+ className = _vnode$data.className,
6281
+ classMap = _vnode$data.classMap;
6282
+ var nodesAreCompatible = true;
6283
+
6284
+ if (!isUndefined$1(className) && String(className) !== getProperty$1(elm, 'className')) {
6285
+ // className is used when class is bound to an expr.
6286
+ nodesAreCompatible = false;
6287
+ } else if (!isUndefined$1(classMap)) {
6288
+ // classMap is used when class is set to static value.
6289
+ var classList = getClassList$1(elm);
6290
+ var computedClassName = ''; // all classes from the vnode should be in the element.classList
6291
+
6292
+ for (var name in classMap) {
6293
+ computedClassName += ' ' + name;
6294
+
6295
+ if (!classList.contains(name)) {
6296
+ nodesAreCompatible = false;
6297
+ }
6298
+ }
6299
+
6300
+ computedClassName.trim();
6301
+
6302
+ if (classList.length > keys(classMap).length) {
6303
+ nodesAreCompatible = false;
6304
+ }
6305
+ }
6306
+
6307
+ return nodesAreCompatible;
6308
+ }
6309
+
6310
+ function validateStyleAttr(vnode, elm) {
6311
+ var _vnode$data2 = vnode.data,
6312
+ style = _vnode$data2.style,
6313
+ styleDecls = _vnode$data2.styleDecls;
6314
+ var elmStyle = getAttribute$1(elm, 'style') || '';
6315
+ var nodesAreCompatible = true;
6316
+
6317
+ if (!isUndefined$1(style) && style !== elmStyle) {
6318
+ nodesAreCompatible = false;
6319
+ } else if (!isUndefined$1(styleDecls)) {
6320
+ var parsedVnodeStyle = parseStyleText(elmStyle);
6321
+ var expectedStyle = []; // styleMap is used when style is set to static value.
6322
+
6323
+ for (var _i31 = 0, n = styleDecls.length; _i31 < n; _i31++) {
6324
+ var _styleDecls$_i2 = _slicedToArray(styleDecls[_i31], 3),
6325
+ prop = _styleDecls$_i2[0],
6326
+ value = _styleDecls$_i2[1],
6327
+ important = _styleDecls$_i2[2];
6328
+
6329
+ expectedStyle.push("".concat(prop, ": ").concat(value + (important ? ' important!' : '')));
6330
+ var parsedPropValue = parsedVnodeStyle[prop];
6331
+
6332
+ if (isUndefined$1(parsedPropValue)) {
6333
+ nodesAreCompatible = false;
6334
+ } else if (!parsedPropValue.startsWith(value)) {
6335
+ nodesAreCompatible = false;
6336
+ } else if (important && !parsedPropValue.endsWith('!important')) {
6337
+ nodesAreCompatible = false;
6338
+ }
6339
+ }
6340
+
6341
+ if (keys(parsedVnodeStyle).length > styleDecls.length) {
6342
+ nodesAreCompatible = false;
6343
+ }
6344
+
6345
+ ArrayJoin.call(expectedStyle, ';');
6346
+ }
6347
+
6348
+ return nodesAreCompatible;
6349
+ }
6139
6350
  /*
6140
6351
  * Copyright (c) 2018, salesforce.com, inc.
6141
6352
  * All rights reserved.
@@ -6151,7 +6362,7 @@
6151
6362
  hooksAreSet = true;
6152
6363
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
6153
6364
  }
6154
- /* version: 2.10.0 */
6365
+ /* version: 2.11.3 */
6155
6366
 
6156
6367
  /*
6157
6368
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6171,7 +6382,7 @@
6171
6382
  var supportsMutableAdoptedStyleSheets = supportsConstructableStyleSheets && getOwnPropertyDescriptor$1(document.adoptedStyleSheets, 'length').writable;
6172
6383
  var styleElements = create(null);
6173
6384
  var styleSheets = create(null);
6174
- var nodesToStyleSheets = new WeakMap();
6385
+ var shadowRootsToStyleSheets = new WeakMap();
6175
6386
  var getCustomElement;
6176
6387
  var defineCustomElement;
6177
6388
  var HTMLElementConstructor;
@@ -6223,24 +6434,26 @@
6223
6434
  styleSheets[content] = styleSheet;
6224
6435
  }
6225
6436
 
6226
- if (!target.adoptedStyleSheets.includes(styleSheet)) {
6437
+ var adoptedStyleSheets = target.adoptedStyleSheets;
6438
+
6439
+ if (!adoptedStyleSheets.includes(styleSheet)) {
6227
6440
  if (supportsMutableAdoptedStyleSheets) {
6228
6441
  // This is only supported in later versions of Chromium:
6229
6442
  // https://chromestatus.com/feature/5638996492288000
6230
- target.adoptedStyleSheets.push(styleSheet);
6443
+ adoptedStyleSheets.push(styleSheet);
6231
6444
  } else {
6232
- target.adoptedStyleSheets = [].concat(_toConsumableArray(target.adoptedStyleSheets), [styleSheet]);
6445
+ target.adoptedStyleSheets = [].concat(_toConsumableArray(adoptedStyleSheets), [styleSheet]);
6233
6446
  }
6234
6447
  }
6235
6448
  }
6236
6449
 
6237
6450
  function insertStyleElement(content, target) {
6238
6451
  // Avoid inserting duplicate `<style>`s
6239
- var sheets = nodesToStyleSheets.get(target);
6452
+ var sheets = shadowRootsToStyleSheets.get(target);
6240
6453
 
6241
6454
  if (isUndefined$1(sheets)) {
6242
6455
  sheets = create(null);
6243
- nodesToStyleSheets.set(target, sheets);
6456
+ shadowRootsToStyleSheets.set(target, sheets);
6244
6457
  }
6245
6458
 
6246
6459
  if (sheets[content]) {
@@ -6536,7 +6749,7 @@
6536
6749
  }
6537
6750
 
6538
6751
  function createVMWithProps(element, Ctor, props) {
6539
- createVM(element, Ctor, {
6752
+ var vm = createVM(element, Ctor, {
6540
6753
  mode: 'open',
6541
6754
  owner: null,
6542
6755
  tagName: element.tagName.toLowerCase()
@@ -6549,6 +6762,8 @@
6549
6762
 
6550
6763
  element[key] = value;
6551
6764
  }
6765
+
6766
+ return vm;
6552
6767
  }
6553
6768
 
6554
6769
  function hydrateComponent(element, Ctor) {
@@ -6576,8 +6791,8 @@
6576
6791
  // Let the renderer know we are hydrating, so it does not replace the existing shadowRoot
6577
6792
  // and uses the same algo to create the stylesheets as in SSR.
6578
6793
  setIsHydrating(true);
6579
- createVMWithProps(element, Ctor, props);
6580
- hydrateRootElement(element); // set it back since now we finished hydration.
6794
+ var vm = createVMWithProps(element, Ctor, props);
6795
+ hydrateRoot(vm); // set it back since now we finished hydration.
6581
6796
 
6582
6797
  setIsHydrating(false);
6583
6798
  } catch (e) {
@@ -6892,7 +7107,7 @@
6892
7107
  });
6893
7108
  freeze(LightningElement);
6894
7109
  seal(LightningElement.prototype);
6895
- /* version: 2.10.0 */
7110
+ /* version: 2.11.3 */
6896
7111
 
6897
7112
  exports.LightningElement = LightningElement;
6898
7113
  exports.__unstable__ProfilerControl = profilerControl;