lwc 2.13.1 → 2.13.2

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 (43) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +42 -62
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +42 -62
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +41 -61
  5. package/dist/engine-dom/iife/es5/engine-dom.js +49 -58
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +48 -57
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +42 -62
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +41 -61
  11. package/dist/engine-dom/umd/es5/engine-dom.js +49 -58
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +48 -57
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +19 -41
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +19 -41
  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.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +1 -1
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +1 -1
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  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.min.js +1 -1
  33. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  34. package/dist/wire-service/iife/es5/wire-service.js +5 -5
  35. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  36. package/dist/wire-service/iife/es5/wire-service_debug.js +5 -5
  37. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  38. package/dist/wire-service/umd/es2017/wire-service.min.js +1 -1
  39. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  40. package/dist/wire-service/umd/es5/wire-service.js +5 -5
  41. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  42. package/dist/wire-service/umd/es5/wire-service_debug.js +5 -5
  43. package/package.json +7 -7
@@ -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.13.1 */
293
+ /** version: 2.13.2 */
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.13.1 */
436
+ /** version: 2.13.2 */
437
437
 
438
438
  /* proxy-compat-disable */
439
439
 
@@ -4035,20 +4035,9 @@ var LWC = (function (exports) {
4035
4035
 
4036
4036
  resetComponentStateWhenRemoved(vm);
4037
4037
  }
4038
-
4039
- function getNearestShadowAncestor(vm) {
4040
- let ancestor = vm.owner;
4041
-
4042
- while (!isNull(ancestor) && ancestor.renderMode === 0
4043
- /* Light */
4044
- ) {
4045
- ancestor = ancestor.owner;
4046
- }
4047
-
4048
- return ancestor;
4049
- }
4050
-
4051
4038
  function createVM(elm, ctor, options) {
4039
+ var _a;
4040
+
4052
4041
  const {
4053
4042
  mode,
4054
4043
  owner,
@@ -4076,6 +4065,8 @@ var LWC = (function (exports) {
4076
4065
  oar: create(null),
4077
4066
  cmpTemplate: null,
4078
4067
  renderMode: def.renderMode,
4068
+ shadowMode: computeShadowMode(def, owner),
4069
+ nearestShadowMode: (owner === null || owner === void 0 ? void 0 : owner.shadowRoot) ? owner.shadowMode : (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : null,
4079
4070
  context: {
4080
4071
  stylesheetToken: undefined,
4081
4072
  hasTokenInClass: undefined,
@@ -4088,7 +4079,6 @@ var LWC = (function (exports) {
4088
4079
  },
4089
4080
  // Properties set right after VM creation.
4090
4081
  tro: null,
4091
- shadowMode: null,
4092
4082
  // Properties set by the LightningElement constructor.
4093
4083
  component: null,
4094
4084
  shadowRoot: null,
@@ -4097,7 +4087,6 @@ var LWC = (function (exports) {
4097
4087
  setHook,
4098
4088
  getHook
4099
4089
  };
4100
- vm.shadowMode = computeShadowMode(vm);
4101
4090
  vm.tro = getTemplateReactiveObserver(vm);
4102
4091
 
4103
4092
 
@@ -4110,10 +4099,9 @@ var LWC = (function (exports) {
4110
4099
  return vm;
4111
4100
  }
4112
4101
 
4113
- function computeShadowMode(vm) {
4114
- const {
4115
- def
4116
- } = vm;
4102
+ function computeShadowMode(def, owner) {
4103
+ var _a;
4104
+
4117
4105
  let shadowMode;
4118
4106
 
4119
4107
  if (isSyntheticShadowDefined$1) {
@@ -4136,23 +4124,13 @@ var LWC = (function (exports) {
4136
4124
  /* Native */
4137
4125
  ;
4138
4126
  } else {
4139
- const shadowAncestor = getNearestShadowAncestor(vm);
4140
-
4141
- if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
4142
- /* Native */
4143
- ) {
4144
- // Transitive support for native Shadow DOM. A component in native mode
4145
- // transitively opts all of its descendants into native.
4146
- shadowMode = 0
4147
- /* Native */
4148
- ;
4149
- } else {
4150
- // Synthetic if neither this component nor any of its ancestors are configured
4151
- // to be native.
4152
- shadowMode = 1
4153
- /* Synthetic */
4154
- ;
4155
- }
4127
+ // Transitive support for native Shadow DOM. A component in native mode
4128
+ // transitively opts all of its descendants into native.
4129
+ // Synthetic if neither this component nor any of its ancestors are configured
4130
+ // to be native.
4131
+ shadowMode = (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : 1
4132
+ /* Synthetic */
4133
+ ;
4156
4134
  }
4157
4135
  } else {
4158
4136
  shadowMode = 1
@@ -5128,7 +5106,30 @@ var LWC = (function (exports) {
5128
5106
  hooksAreSet = true;
5129
5107
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
5130
5108
  }
5131
- /* version: 2.13.1 */
5109
+
5110
+ /*
5111
+ * Copyright (c) 2018, salesforce.com, inc.
5112
+ * All rights reserved.
5113
+ * SPDX-License-Identifier: MIT
5114
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5115
+ */
5116
+ /**
5117
+ * EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
5118
+ * This API is subject to change or being removed.
5119
+ */
5120
+ function getComponentConstructor(elm) {
5121
+ let ctor = null;
5122
+ // intentionally checking for undefined due to some funky libraries patching weakmap.get
5123
+ // to throw when undefined.
5124
+ if (!isUndefined$1(elm)) {
5125
+ const vm = getAssociatedVMIfPresent(elm);
5126
+ if (!isUndefined$1(vm)) {
5127
+ ctor = vm.def.ctor;
5128
+ }
5129
+ }
5130
+ return ctor;
5131
+ }
5132
+ /* version: 2.13.2 */
5132
5133
 
5133
5134
  /*
5134
5135
  * Copyright (c) 2018, salesforce.com, inc.
@@ -5646,27 +5647,6 @@ var LWC = (function (exports) {
5646
5647
  return element;
5647
5648
  }
5648
5649
 
5649
- /*
5650
- * Copyright (c) 2018, salesforce.com, inc.
5651
- * All rights reserved.
5652
- * SPDX-License-Identifier: MIT
5653
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
5654
- */
5655
- /**
5656
- * EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
5657
- * This API is subject to change or being removed.
5658
- */
5659
- function getComponentConstructor(elm) {
5660
- let ctor = null;
5661
- if (elm instanceof HTMLElement) {
5662
- const vm = getAssociatedVMIfPresent(elm);
5663
- if (!isUndefined$1(vm)) {
5664
- ctor = vm.def.ctor;
5665
- }
5666
- }
5667
- return ctor;
5668
- }
5669
-
5670
5650
  /*
5671
5651
  * Copyright (c) 2018, salesforce.com, inc.
5672
5652
  * All rights reserved.
@@ -5735,7 +5715,7 @@ var LWC = (function (exports) {
5735
5715
  });
5736
5716
  freeze(LightningElement);
5737
5717
  seal(LightningElement.prototype);
5738
- /* version: 2.13.1 */
5718
+ /* version: 2.13.2 */
5739
5719
 
5740
5720
  exports.LightningElement = LightningElement;
5741
5721
  exports.__unstable__ProfilerControl = profilerControl;
@@ -34,7 +34,7 @@ var LWC = (function (exports) {
34
34
  return false;
35
35
  }
36
36
  }
37
- function _construct(Parent, args, Class) {
37
+ function _construct(Parent1, args1, Class1) {
38
38
  if (isNativeReflectConstruct()) {
39
39
  _construct = Reflect.construct;
40
40
  } else {
@@ -52,8 +52,8 @@ var LWC = (function (exports) {
52
52
  return _construct.apply(null, arguments);
53
53
  }
54
54
  function _defineProperties(target, props) {
55
- for(var i1 = 0; i1 < props.length; i1++){
56
- var descriptor = props[i1];
55
+ for(var i2 = 0; i2 < props.length; i2++){
56
+ var descriptor = props[i2];
57
57
  descriptor.enumerable = descriptor.enumerable || false;
58
58
  descriptor.configurable = true;
59
59
  if ("value" in descriptor) descriptor.writable = true;
@@ -78,7 +78,7 @@ var LWC = (function (exports) {
78
78
  }
79
79
  return obj;
80
80
  }
81
- function _get(target, property, receiver) {
81
+ function _get(target1, property1, receiver1) {
82
82
  if (typeof Reflect !== "undefined" && Reflect.get) {
83
83
  _get = Reflect.get;
84
84
  } else {
@@ -92,13 +92,13 @@ var LWC = (function (exports) {
92
92
  return desc.value;
93
93
  };
94
94
  }
95
- return _get(target, property, receiver || target);
95
+ return _get(target1, property1, receiver1 || target1);
96
96
  }
97
- function _getPrototypeOf(o) {
97
+ function _getPrototypeOf(o1) {
98
98
  _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
99
99
  return o.__proto__ || Object.getPrototypeOf(o);
100
100
  };
101
- return _getPrototypeOf(o);
101
+ return _getPrototypeOf(o1);
102
102
  }
103
103
  function _inherits(subClass, superClass) {
104
104
  if (typeof superClass !== "function" && superClass !== null) {
@@ -126,7 +126,7 @@ var LWC = (function (exports) {
126
126
  function _iterableToArray(iter) {
127
127
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
128
128
  }
129
- function _iterableToArrayLimit(arr, i1) {
129
+ function _iterableToArrayLimit(arr, i3) {
130
130
  var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
131
131
  if (_i == null) return;
132
132
  var _arr = [];
@@ -136,7 +136,7 @@ var LWC = (function (exports) {
136
136
  try {
137
137
  for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
138
138
  _arr.push(_s.value);
139
- if (i1 && _arr.length === i1) break;
139
+ if (i3 && _arr.length === i3) break;
140
140
  }
141
141
  } catch (err) {
142
142
  _d = true;
@@ -162,15 +162,15 @@ var LWC = (function (exports) {
162
162
  }
163
163
  return _assertThisInitialized(self);
164
164
  }
165
- function _setPrototypeOf(o, p) {
165
+ function _setPrototypeOf(o2, p1) {
166
166
  _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
167
167
  o.__proto__ = p;
168
168
  return o;
169
169
  };
170
- return _setPrototypeOf(o, p);
170
+ return _setPrototypeOf(o2, p1);
171
171
  }
172
- function _slicedToArray(arr, i1) {
173
- return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i1) || _unsupportedIterableToArray(arr, i1) || _nonIterableRest();
172
+ function _slicedToArray(arr, i4) {
173
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i4) || _unsupportedIterableToArray(arr, i4) || _nonIterableRest();
174
174
  }
175
175
  function _superPropBase(object, property) {
176
176
  while(!Object.prototype.hasOwnProperty.call(object, property)){
@@ -194,7 +194,7 @@ var LWC = (function (exports) {
194
194
  if (n === "Map" || n === "Set") return Array.from(n);
195
195
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
196
196
  }
197
- function _wrapNativeSuper(Class) {
197
+ function _wrapNativeSuper(Class2) {
198
198
  var _cache = typeof Map === "function" ? new Map() : undefined;
199
199
  _wrapNativeSuper = function _wrapNativeSuper(Class) {
200
200
  if (Class === null || !_isNativeFunction(Class)) return Class;
@@ -218,7 +218,7 @@ var LWC = (function (exports) {
218
218
  });
219
219
  return _setPrototypeOf(Wrapper, Class);
220
220
  };
221
- return _wrapNativeSuper(Class);
221
+ return _wrapNativeSuper(Class2);
222
222
  }
223
223
  function _isNativeReflectConstruct() {
224
224
  if (typeof Reflect === "undefined" || !Reflect.construct) return false;
@@ -573,9 +573,9 @@ var LWC = (function (exports) {
573
573
  * SPDX-License-Identifier: MIT
574
574
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
575
575
  */ // Increment whenever the LWC template compiler changes
576
- var LWC_VERSION = "2.13.1";
576
+ var LWC_VERSION = "2.13.2";
577
577
  var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
578
- /** version: 2.13.1 */ /*
578
+ /** version: 2.13.2 */ /*
579
579
  * Copyright (c) 2018, salesforce.com, inc.
580
580
  * All rights reserved.
581
581
  * SPDX-License-Identifier: MIT
@@ -716,7 +716,7 @@ var LWC = (function (exports) {
716
716
  setFeatureFlag(name, value);
717
717
  }
718
718
  }
719
- /** version: 2.13.1 */ /* proxy-compat-disable */ /*
719
+ /** version: 2.13.2 */ /* proxy-compat-disable */ /*
720
720
  * Copyright (c) 2018, salesforce.com, inc.
721
721
  * All rights reserved.
722
722
  * SPDX-License-Identifier: MIT
@@ -5543,14 +5543,8 @@ var LWC = (function (exports) {
5543
5543
  }
5544
5544
  resetComponentStateWhenRemoved(vm);
5545
5545
  }
5546
- function getNearestShadowAncestor(vm) {
5547
- var ancestor = vm.owner;
5548
- while(!isNull(ancestor) && ancestor.renderMode === 0){
5549
- ancestor = ancestor.owner;
5550
- }
5551
- return ancestor;
5552
- }
5553
5546
  function createVM(elm, ctor, options) {
5547
+ var _a;
5554
5548
  var mode = options.mode, owner = options.owner, tagName = options.tagName;
5555
5549
  var def = getComponentInternalDef(ctor);
5556
5550
  var vm = {
@@ -5572,6 +5566,8 @@ var LWC = (function (exports) {
5572
5566
  oar: create(null),
5573
5567
  cmpTemplate: null,
5574
5568
  renderMode: def.renderMode,
5569
+ shadowMode: computeShadowMode(def, owner),
5570
+ nearestShadowMode: (owner === null || owner === void 0 ? void 0 : owner.shadowRoot) ? owner.shadowMode : (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : null,
5575
5571
  context: {
5576
5572
  stylesheetToken: undefined,
5577
5573
  hasTokenInClass: undefined,
@@ -5584,7 +5580,6 @@ var LWC = (function (exports) {
5584
5580
  },
5585
5581
  // Properties set right after VM creation.
5586
5582
  tro: null,
5587
- shadowMode: null,
5588
5583
  // Properties set by the LightningElement constructor.
5589
5584
  component: null,
5590
5585
  shadowRoot: null,
@@ -5593,7 +5588,6 @@ var LWC = (function (exports) {
5593
5588
  setHook: setHook,
5594
5589
  getHook: getHook
5595
5590
  };
5596
- vm.shadowMode = computeShadowMode(vm);
5597
5591
  vm.tro = getTemplateReactiveObserver(vm);
5598
5592
  if (process.env.NODE_ENV !== "production") {
5599
5593
  vm.toString = function() {
@@ -5609,8 +5603,8 @@ var LWC = (function (exports) {
5609
5603
  }
5610
5604
  return vm;
5611
5605
  }
5612
- function computeShadowMode(vm) {
5613
- var def = vm.def;
5606
+ function computeShadowMode(def, owner) {
5607
+ var _a;
5614
5608
  var shadowMode;
5615
5609
  if (isSyntheticShadowDefined$1) {
5616
5610
  if (def.renderMode === 0) {
@@ -5624,16 +5618,11 @@ var LWC = (function (exports) {
5624
5618
  if (def.shadowSupportMode === "any") {
5625
5619
  shadowMode = 0 /* Native */ ;
5626
5620
  } else {
5627
- var shadowAncestor = getNearestShadowAncestor(vm);
5628
- if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0) {
5629
- // Transitive support for native Shadow DOM. A component in native mode
5630
- // transitively opts all of its descendants into native.
5631
- shadowMode = 0 /* Native */ ;
5632
- } else {
5633
- // Synthetic if neither this component nor any of its ancestors are configured
5634
- // to be native.
5635
- shadowMode = 1 /* Synthetic */ ;
5636
- }
5621
+ // Transitive support for native Shadow DOM. A component in native mode
5622
+ // transitively opts all of its descendants into native.
5623
+ // Synthetic if neither this component nor any of its ancestors are configured
5624
+ // to be native.
5625
+ shadowMode = (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : 1 /* Synthetic */ ;
5637
5626
  }
5638
5627
  } else {
5639
5628
  shadowMode = 1 /* Synthetic */ ;
@@ -6524,7 +6513,27 @@ var LWC = (function (exports) {
6524
6513
  hooksAreSet = true;
6525
6514
  setSanitizeHtmlContentHook(hooks1.sanitizeHtmlContent);
6526
6515
  }
6527
- /* version: 2.13.1 */ /*
6516
+ /*
6517
+ * Copyright (c) 2018, salesforce.com, inc.
6518
+ * All rights reserved.
6519
+ * SPDX-License-Identifier: MIT
6520
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6521
+ */ /**
6522
+ * EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
6523
+ * This API is subject to change or being removed.
6524
+ */ function getComponentConstructor(elm) {
6525
+ var ctor = null;
6526
+ // intentionally checking for undefined due to some funky libraries patching weakmap.get
6527
+ // to throw when undefined.
6528
+ if (!isUndefined$1(elm)) {
6529
+ var vm = getAssociatedVMIfPresent(elm);
6530
+ if (!isUndefined$1(vm)) {
6531
+ ctor = vm.def.ctor;
6532
+ }
6533
+ }
6534
+ return ctor;
6535
+ }
6536
+ /* version: 2.13.2 */ /*
6528
6537
  * Copyright (c) 2018, salesforce.com, inc.
6529
6538
  * All rights reserved.
6530
6539
  * SPDX-License-Identifier: MIT
@@ -7097,24 +7106,6 @@ var LWC = (function (exports) {
7097
7106
  }
7098
7107
  return element;
7099
7108
  }
7100
- /*
7101
- * Copyright (c) 2018, salesforce.com, inc.
7102
- * All rights reserved.
7103
- * SPDX-License-Identifier: MIT
7104
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
7105
- */ /**
7106
- * EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
7107
- * This API is subject to change or being removed.
7108
- */ function getComponentConstructor(elm) {
7109
- var ctor = null;
7110
- if (_instanceof(elm, HTMLElement)) {
7111
- var vm = getAssociatedVMIfPresent(elm);
7112
- if (!isUndefined$1(vm)) {
7113
- ctor = vm.def.ctor;
7114
- }
7115
- }
7116
- return ctor;
7117
- }
7118
7109
  /*
7119
7110
  * Copyright (c) 2018, salesforce.com, inc.
7120
7111
  * All rights reserved.