lwc 2.5.9 → 2.6.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 (41) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +52 -79
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +52 -79
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +52 -79
  5. package/dist/engine-dom/iife/es5/engine-dom.js +64 -91
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -2
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +64 -91
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +52 -79
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +52 -79
  11. package/dist/engine-dom/umd/es5/engine-dom.js +64 -91
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +2 -2
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +64 -91
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +63 -87
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -2
  16. package/dist/engine-server/esm/es2017/engine-server.js +63 -87
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +23 -130
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +23 -130
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
  20. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +23 -130
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +30 -127
  22. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
  23. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +30 -127
  24. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +23 -130
  25. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
  26. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +23 -130
  27. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +30 -127
  28. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
  29. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +30 -127
  30. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  31. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/iife/es5/wire-service.js +11 -11
  34. package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
  35. package/dist/wire-service/iife/es5/wire-service_debug.js +11 -11
  36. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  37. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  38. package/dist/wire-service/umd/es5/wire-service.js +11 -11
  39. package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
  40. package/dist/wire-service/umd/es5/wire-service_debug.js +11 -11
  41. package/package.json +8 -8
@@ -15,13 +15,13 @@ var LWC = (function (exports) {
15
15
 
16
16
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
17
17
 
18
- function _get2(target, property, receiver) { if (typeof Reflect !== "undefined" && Reflect.get) { _get2 = Reflect.get; } else { _get2 = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(receiver); } return desc.value; }; } return _get2(target, property, receiver || target); }
18
+ function _get2() { if (typeof Reflect !== "undefined" && Reflect.get) { _get2 = Reflect.get; } else { _get2 = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get2.apply(this, arguments); }
19
19
 
20
20
  function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf2(object); if (object === null) break; } return object; }
21
21
 
22
22
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
23
23
 
24
- function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }
24
+ function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } Object.defineProperty(subClass, "prototype", { value: Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }), writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
25
25
 
26
26
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
27
27
 
@@ -39,7 +39,7 @@ var LWC = (function (exports) {
39
39
 
40
40
  function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
41
41
 
42
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
42
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
43
43
 
44
44
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
45
45
 
@@ -55,7 +55,7 @@ var LWC = (function (exports) {
55
55
 
56
56
  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; }
57
57
 
58
- function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
58
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
59
59
 
60
60
  /* proxy-compat-disable */
61
61
 
@@ -348,7 +348,7 @@ var LWC = (function (exports) {
348
348
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
349
349
  return attributeName;
350
350
  }
351
- /** version: 2.5.9 */
351
+ /** version: 2.6.2 */
352
352
 
353
353
  /*
354
354
  * Copyright (c) 2018, salesforce.com, inc.
@@ -460,7 +460,6 @@ var LWC = (function (exports) {
460
460
  ENABLE_NODE_LIST_PATCH: null,
461
461
  ENABLE_HTML_COLLECTIONS_PATCH: null,
462
462
  ENABLE_NODE_PATCH: null,
463
- ENABLE_NON_COMPOSED_EVENTS_LEAKAGE: null,
464
463
  ENABLE_MIXED_SHADOW_MODE: null,
465
464
  ENABLE_WIRE_SYNC_EMIT: null
466
465
  };
@@ -528,7 +527,7 @@ var LWC = (function (exports) {
528
527
  setFeatureFlag(name, value);
529
528
  }
530
529
  }
531
- /** version: 2.5.9 */
530
+ /** version: 2.6.2 */
532
531
 
533
532
  /* proxy-compat-disable */
534
533
 
@@ -1912,7 +1911,8 @@ var LWC = (function (exports) {
1912
1911
  */
1913
1912
 
1914
1913
  var isArray = Array.isArray;
1915
- var _getPrototypeOf = Object.getPrototypeOf,
1914
+ var ObjectDotPrototype = Object.prototype,
1915
+ _getPrototypeOf = Object.getPrototypeOf,
1916
1916
  ObjectCreate = Object.create,
1917
1917
  ObjectDefineProperty = Object.defineProperty,
1918
1918
  _isExtensible = Object.isExtensible,
@@ -2573,8 +2573,6 @@ var LWC = (function (exports) {
2573
2573
  init();
2574
2574
  }
2575
2575
 
2576
- var ObjectDotPrototype = Object.prototype;
2577
-
2578
2576
  function defaultValueIsObservable(value) {
2579
2577
  // intentionally checking for null
2580
2578
  if (value === null) {
@@ -2603,68 +2601,54 @@ var LWC = (function (exports) {
2603
2601
  /* do nothing */
2604
2602
  };
2605
2603
 
2606
- var defaultValueDistortion = function defaultValueDistortion(value) {
2607
- return value;
2608
- };
2609
-
2610
2604
  function createShadowTarget(value) {
2611
2605
  return isArray(value) ? [] : {};
2612
2606
  }
2613
2607
 
2614
- var ReactiveMembrane = /*#__PURE__*/function () {
2615
- function ReactiveMembrane(options) {
2616
- _classCallCheck(this, ReactiveMembrane);
2608
+ var ObservableMembrane = /*#__PURE__*/function () {
2609
+ function ObservableMembrane() {
2610
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2611
+
2612
+ _classCallCheck(this, ObservableMembrane);
2617
2613
 
2618
- this.valueDistortion = defaultValueDistortion;
2619
- this.valueMutated = defaultValueMutated;
2620
- this.valueObserved = defaultValueObserved;
2621
- this.valueIsObservable = defaultValueIsObservable;
2622
2614
  this.readOnlyObjectGraph = new WeakMap();
2623
2615
  this.reactiveObjectGraph = new WeakMap();
2624
-
2625
- if (!isUndefined(options)) {
2626
- var _valueDistortion = options.valueDistortion,
2627
- _valueMutated = options.valueMutated,
2628
- _valueObserved = options.valueObserved,
2629
- valueIsObservable = options.valueIsObservable,
2630
- tagPropertyKey = options.tagPropertyKey;
2631
- this.valueDistortion = isFunction(_valueDistortion) ? _valueDistortion : defaultValueDistortion;
2632
- this.valueMutated = isFunction(_valueMutated) ? _valueMutated : defaultValueMutated;
2633
- this.valueObserved = isFunction(_valueObserved) ? _valueObserved : defaultValueObserved;
2634
- this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2635
- this.tagPropertyKey = tagPropertyKey;
2636
- }
2616
+ var valueMutated = options.valueMutated,
2617
+ valueObserved = options.valueObserved,
2618
+ valueIsObservable = options.valueIsObservable,
2619
+ tagPropertyKey = options.tagPropertyKey;
2620
+ this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
2621
+ this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
2622
+ this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2623
+ this.tagPropertyKey = tagPropertyKey;
2637
2624
  }
2638
2625
 
2639
- _createClass(ReactiveMembrane, [{
2626
+ _createClass(ObservableMembrane, [{
2640
2627
  key: "getProxy",
2641
2628
  value: function getProxy(value) {
2642
2629
  var unwrappedValue = unwrap$1(value);
2643
- var distorted = this.valueDistortion(unwrappedValue);
2644
2630
 
2645
- if (this.valueIsObservable(distorted)) {
2646
- if (this.readOnlyObjectGraph.get(distorted) === value) {
2647
- // when trying to extract the writable version of a readonly
2648
- // we return the readonly.
2631
+ if (this.valueIsObservable(unwrappedValue)) {
2632
+ // When trying to extract the writable version of a readonly we return the readonly.
2633
+ if (this.readOnlyObjectGraph.get(unwrappedValue) === value) {
2649
2634
  return value;
2650
2635
  }
2651
2636
 
2652
- return this.getReactiveHandler(unwrappedValue, distorted);
2637
+ return this.getReactiveHandler(unwrappedValue);
2653
2638
  }
2654
2639
 
2655
- return distorted;
2640
+ return unwrappedValue;
2656
2641
  }
2657
2642
  }, {
2658
2643
  key: "getReadOnlyProxy",
2659
2644
  value: function getReadOnlyProxy(value) {
2660
2645
  value = unwrap$1(value);
2661
- var distorted = this.valueDistortion(value);
2662
2646
 
2663
- if (this.valueIsObservable(distorted)) {
2664
- return this.getReadOnlyHandler(value, distorted);
2647
+ if (this.valueIsObservable(value)) {
2648
+ return this.getReadOnlyHandler(value);
2665
2649
  }
2666
2650
 
2667
- return distorted;
2651
+ return value;
2668
2652
  }
2669
2653
  }, {
2670
2654
  key: "unwrapProxy",
@@ -2673,39 +2657,39 @@ var LWC = (function (exports) {
2673
2657
  }
2674
2658
  }, {
2675
2659
  key: "getReactiveHandler",
2676
- value: function getReactiveHandler(value, distortedValue) {
2677
- var proxy = this.reactiveObjectGraph.get(distortedValue);
2660
+ value: function getReactiveHandler(value) {
2661
+ var proxy = this.reactiveObjectGraph.get(value);
2678
2662
 
2679
2663
  if (isUndefined(proxy)) {
2680
2664
  // caching the proxy after the first time it is accessed
2681
- var handler = new ReactiveProxyHandler(this, distortedValue);
2682
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2665
+ var handler = new ReactiveProxyHandler(this, value);
2666
+ proxy = new Proxy(createShadowTarget(value), handler);
2683
2667
  registerProxy(proxy, value);
2684
- this.reactiveObjectGraph.set(distortedValue, proxy);
2668
+ this.reactiveObjectGraph.set(value, proxy);
2685
2669
  }
2686
2670
 
2687
2671
  return proxy;
2688
2672
  }
2689
2673
  }, {
2690
2674
  key: "getReadOnlyHandler",
2691
- value: function getReadOnlyHandler(value, distortedValue) {
2692
- var proxy = this.readOnlyObjectGraph.get(distortedValue);
2675
+ value: function getReadOnlyHandler(value) {
2676
+ var proxy = this.readOnlyObjectGraph.get(value);
2693
2677
 
2694
2678
  if (isUndefined(proxy)) {
2695
2679
  // caching the proxy after the first time it is accessed
2696
- var handler = new ReadOnlyHandler(this, distortedValue);
2697
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2680
+ var handler = new ReadOnlyHandler(this, value);
2681
+ proxy = new Proxy(createShadowTarget(value), handler);
2698
2682
  registerProxy(proxy, value);
2699
- this.readOnlyObjectGraph.set(distortedValue, proxy);
2683
+ this.readOnlyObjectGraph.set(value, proxy);
2700
2684
  }
2701
2685
 
2702
2686
  return proxy;
2703
2687
  }
2704
2688
  }]);
2705
2689
 
2706
- return ReactiveMembrane;
2690
+ return ObservableMembrane;
2707
2691
  }();
2708
- /** version: 1.1.5 */
2692
+ /** version: 2.0.0 */
2709
2693
 
2710
2694
  /*
2711
2695
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2716,15 +2700,9 @@ var LWC = (function (exports) {
2716
2700
 
2717
2701
 
2718
2702
  var lockerLivePropertyKey = Symbol.for('@@lockerLiveValue');
2719
-
2720
- function valueDistortion(value) {
2721
- return value;
2722
- }
2723
-
2724
- var reactiveMembrane = new ReactiveMembrane({
2703
+ var reactiveMembrane = new ObservableMembrane({
2725
2704
  valueObserved: valueObserved,
2726
2705
  valueMutated: valueMutated,
2727
- valueDistortion: valueDistortion,
2728
2706
  tagPropertyKey: lockerLivePropertyKey
2729
2707
  });
2730
2708
  /**
@@ -2733,16 +2711,9 @@ var LWC = (function (exports) {
2733
2711
  * change or being removed.
2734
2712
  */
2735
2713
 
2736
- var unwrap = function unwrap(value) {
2737
- var unwrapped = reactiveMembrane.unwrapProxy(value);
2738
-
2739
- if (unwrapped !== value) {
2740
- // if value is a proxy, unwrap to access original value and apply distortion
2741
- return valueDistortion(unwrapped);
2742
- }
2743
-
2744
- return value;
2745
- };
2714
+ function unwrap(value) {
2715
+ return reactiveMembrane.unwrapProxy(value);
2716
+ }
2746
2717
  /*
2747
2718
  * Copyright (c) 2018, salesforce.com, inc.
2748
2719
  * All rights reserved.
@@ -3841,7 +3812,7 @@ var LWC = (function (exports) {
3841
3812
  return _super4.apply(this, arguments);
3842
3813
  }
3843
3814
 
3844
- return HTMLBridgeElement;
3815
+ return _createClass(HTMLBridgeElement);
3845
3816
  }(SuperClass);
3846
3817
  } else {
3847
3818
  HTMLBridgeElement = function HTMLBridgeElement() {
@@ -4646,12 +4617,14 @@ var LWC = (function (exports) {
4646
4617
  }
4647
4618
 
4648
4619
  function updateChildrenHook(oldVnode, vnode) {
4649
- var children = vnode.children,
4650
- owner = vnode.owner;
4651
- var fn = hasDynamicChildren(children) ? updateDynamicChildren : updateStaticChildren;
4652
- runWithBoundaryProtection(owner, owner.owner, noop, function () {
4653
- fn(vnode.elm, oldVnode.children, children);
4654
- }, noop);
4620
+ var elm = vnode.elm,
4621
+ children = vnode.children;
4622
+
4623
+ if (hasDynamicChildren(children)) {
4624
+ updateDynamicChildren(elm, oldVnode.children, children);
4625
+ } else {
4626
+ updateStaticChildren(elm, oldVnode.children, children);
4627
+ }
4655
4628
  }
4656
4629
 
4657
4630
  function allocateChildrenHook(vnode, vm) {
@@ -4995,7 +4968,7 @@ var LWC = (function (exports) {
4995
4968
  return _this4;
4996
4969
  }
4997
4970
 
4998
- return LWCUpgradableElement;
4971
+ return _createClass(LWCUpgradableElement);
4999
4972
  }(renderer.HTMLElement);
5000
4973
 
5001
4974
  renderer.defineCustomElement(tagName, CE);
@@ -6057,7 +6030,7 @@ var LWC = (function (exports) {
6057
6030
  if (isProfilerEnabled) {
6058
6031
  currentDispatcher(opId, 0
6059
6032
  /* Start */
6060
- , vm.tagName, vm.idx);
6033
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6061
6034
  }
6062
6035
  }
6063
6036
 
@@ -6071,7 +6044,7 @@ var LWC = (function (exports) {
6071
6044
  if (isProfilerEnabled) {
6072
6045
  currentDispatcher(opId, 1
6073
6046
  /* Stop */
6074
- , vm.tagName, vm.idx);
6047
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6075
6048
  }
6076
6049
  }
6077
6050
 
@@ -6085,7 +6058,7 @@ var LWC = (function (exports) {
6085
6058
  if (isProfilerEnabled) {
6086
6059
  currentDispatcher(opId, 0
6087
6060
  /* Start */
6088
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6061
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
6089
6062
  }
6090
6063
  }
6091
6064
 
@@ -6099,7 +6072,7 @@ var LWC = (function (exports) {
6099
6072
  if (isProfilerEnabled) {
6100
6073
  currentDispatcher(opId, 1
6101
6074
  /* Stop */
6102
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6075
+ , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx, vm === null || vm === void 0 ? void 0 : vm.renderMode, vm === null || vm === void 0 ? void 0 : vm.shadowMode);
6103
6076
  }
6104
6077
  }
6105
6078
  /*
@@ -7271,7 +7244,7 @@ var LWC = (function (exports) {
7271
7244
  return _this5;
7272
7245
  }
7273
7246
 
7274
- return WireContextRegistrationEvent;
7247
+ return _createClass(WireContextRegistrationEvent);
7275
7248
  }( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
7276
7249
 
7277
7250
  function createFieldDataCallback(vm, name) {
@@ -7615,7 +7588,7 @@ var LWC = (function (exports) {
7615
7588
  hooksAreSet = true;
7616
7589
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
7617
7590
  }
7618
- /* version: 2.5.9 */
7591
+ /* version: 2.6.2 */
7619
7592
 
7620
7593
  /*
7621
7594
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7672,7 +7645,7 @@ var LWC = (function (exports) {
7672
7645
  return _super7.apply(this, arguments);
7673
7646
  }
7674
7647
 
7675
- return clazz;
7648
+ return _createClass(clazz);
7676
7649
  }(HTMLElementAlias);
7677
7650
 
7678
7651
  customElements.define('lwc-test-' + Math.floor(Math.random() * 1000000), clazz);
@@ -8268,7 +8241,7 @@ var LWC = (function (exports) {
8268
8241
  });
8269
8242
  freeze(LightningElement);
8270
8243
  seal(LightningElement.prototype);
8271
- /* version: 2.5.9 */
8244
+ /* version: 2.6.2 */
8272
8245
 
8273
8246
  exports.LightningElement = LightningElement;
8274
8247
  exports.__unstable__ProfilerControl = profilerControl;