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
@@ -18,13 +18,13 @@
18
18
 
19
19
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
20
20
 
21
- 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); }
21
+ 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); }
22
22
 
23
23
  function _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf2(object); if (object === null) break; } return object; }
24
24
 
25
25
  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; }
26
26
 
27
- 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); }
27
+ 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); }
28
28
 
29
29
  function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
30
30
 
@@ -42,7 +42,7 @@
42
42
 
43
43
  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); } }
44
44
 
45
- function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
45
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
46
46
 
47
47
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
48
48
 
@@ -58,7 +58,7 @@
58
58
 
59
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; }
60
60
 
61
- 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); }
61
+ 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); }
62
62
 
63
63
  /* proxy-compat-disable */
64
64
 
@@ -351,7 +351,7 @@
351
351
  CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
352
352
  return attributeName;
353
353
  }
354
- /** version: 2.5.9 */
354
+ /** version: 2.6.2 */
355
355
 
356
356
  /*
357
357
  * Copyright (c) 2018, salesforce.com, inc.
@@ -463,7 +463,6 @@
463
463
  ENABLE_NODE_LIST_PATCH: null,
464
464
  ENABLE_HTML_COLLECTIONS_PATCH: null,
465
465
  ENABLE_NODE_PATCH: null,
466
- ENABLE_NON_COMPOSED_EVENTS_LEAKAGE: null,
467
466
  ENABLE_MIXED_SHADOW_MODE: null,
468
467
  ENABLE_WIRE_SYNC_EMIT: null
469
468
  };
@@ -531,7 +530,7 @@
531
530
  setFeatureFlag(name, value);
532
531
  }
533
532
  }
534
- /** version: 2.5.9 */
533
+ /** version: 2.6.2 */
535
534
 
536
535
  /* proxy-compat-disable */
537
536
 
@@ -1915,7 +1914,8 @@
1915
1914
  */
1916
1915
 
1917
1916
  var isArray = Array.isArray;
1918
- var _getPrototypeOf = Object.getPrototypeOf,
1917
+ var ObjectDotPrototype = Object.prototype,
1918
+ _getPrototypeOf = Object.getPrototypeOf,
1919
1919
  ObjectCreate = Object.create,
1920
1920
  ObjectDefineProperty = Object.defineProperty,
1921
1921
  _isExtensible = Object.isExtensible,
@@ -2576,8 +2576,6 @@
2576
2576
  init();
2577
2577
  }
2578
2578
 
2579
- var ObjectDotPrototype = Object.prototype;
2580
-
2581
2579
  function defaultValueIsObservable(value) {
2582
2580
  // intentionally checking for null
2583
2581
  if (value === null) {
@@ -2606,68 +2604,54 @@
2606
2604
  /* do nothing */
2607
2605
  };
2608
2606
 
2609
- var defaultValueDistortion = function defaultValueDistortion(value) {
2610
- return value;
2611
- };
2612
-
2613
2607
  function createShadowTarget(value) {
2614
2608
  return isArray(value) ? [] : {};
2615
2609
  }
2616
2610
 
2617
- var ReactiveMembrane = /*#__PURE__*/function () {
2618
- function ReactiveMembrane(options) {
2619
- _classCallCheck(this, ReactiveMembrane);
2611
+ var ObservableMembrane = /*#__PURE__*/function () {
2612
+ function ObservableMembrane() {
2613
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
2614
+
2615
+ _classCallCheck(this, ObservableMembrane);
2620
2616
 
2621
- this.valueDistortion = defaultValueDistortion;
2622
- this.valueMutated = defaultValueMutated;
2623
- this.valueObserved = defaultValueObserved;
2624
- this.valueIsObservable = defaultValueIsObservable;
2625
2617
  this.readOnlyObjectGraph = new WeakMap();
2626
2618
  this.reactiveObjectGraph = new WeakMap();
2627
-
2628
- if (!isUndefined(options)) {
2629
- var _valueDistortion = options.valueDistortion,
2630
- _valueMutated = options.valueMutated,
2631
- _valueObserved = options.valueObserved,
2632
- valueIsObservable = options.valueIsObservable,
2633
- tagPropertyKey = options.tagPropertyKey;
2634
- this.valueDistortion = isFunction(_valueDistortion) ? _valueDistortion : defaultValueDistortion;
2635
- this.valueMutated = isFunction(_valueMutated) ? _valueMutated : defaultValueMutated;
2636
- this.valueObserved = isFunction(_valueObserved) ? _valueObserved : defaultValueObserved;
2637
- this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2638
- this.tagPropertyKey = tagPropertyKey;
2639
- }
2619
+ var valueMutated = options.valueMutated,
2620
+ valueObserved = options.valueObserved,
2621
+ valueIsObservable = options.valueIsObservable,
2622
+ tagPropertyKey = options.tagPropertyKey;
2623
+ this.valueMutated = isFunction(valueMutated) ? valueMutated : defaultValueMutated;
2624
+ this.valueObserved = isFunction(valueObserved) ? valueObserved : defaultValueObserved;
2625
+ this.valueIsObservable = isFunction(valueIsObservable) ? valueIsObservable : defaultValueIsObservable;
2626
+ this.tagPropertyKey = tagPropertyKey;
2640
2627
  }
2641
2628
 
2642
- _createClass(ReactiveMembrane, [{
2629
+ _createClass(ObservableMembrane, [{
2643
2630
  key: "getProxy",
2644
2631
  value: function getProxy(value) {
2645
2632
  var unwrappedValue = unwrap$1(value);
2646
- var distorted = this.valueDistortion(unwrappedValue);
2647
2633
 
2648
- if (this.valueIsObservable(distorted)) {
2649
- if (this.readOnlyObjectGraph.get(distorted) === value) {
2650
- // when trying to extract the writable version of a readonly
2651
- // we return the readonly.
2634
+ if (this.valueIsObservable(unwrappedValue)) {
2635
+ // When trying to extract the writable version of a readonly we return the readonly.
2636
+ if (this.readOnlyObjectGraph.get(unwrappedValue) === value) {
2652
2637
  return value;
2653
2638
  }
2654
2639
 
2655
- return this.getReactiveHandler(unwrappedValue, distorted);
2640
+ return this.getReactiveHandler(unwrappedValue);
2656
2641
  }
2657
2642
 
2658
- return distorted;
2643
+ return unwrappedValue;
2659
2644
  }
2660
2645
  }, {
2661
2646
  key: "getReadOnlyProxy",
2662
2647
  value: function getReadOnlyProxy(value) {
2663
2648
  value = unwrap$1(value);
2664
- var distorted = this.valueDistortion(value);
2665
2649
 
2666
- if (this.valueIsObservable(distorted)) {
2667
- return this.getReadOnlyHandler(value, distorted);
2650
+ if (this.valueIsObservable(value)) {
2651
+ return this.getReadOnlyHandler(value);
2668
2652
  }
2669
2653
 
2670
- return distorted;
2654
+ return value;
2671
2655
  }
2672
2656
  }, {
2673
2657
  key: "unwrapProxy",
@@ -2676,39 +2660,39 @@
2676
2660
  }
2677
2661
  }, {
2678
2662
  key: "getReactiveHandler",
2679
- value: function getReactiveHandler(value, distortedValue) {
2680
- var proxy = this.reactiveObjectGraph.get(distortedValue);
2663
+ value: function getReactiveHandler(value) {
2664
+ var proxy = this.reactiveObjectGraph.get(value);
2681
2665
 
2682
2666
  if (isUndefined(proxy)) {
2683
2667
  // caching the proxy after the first time it is accessed
2684
- var handler = new ReactiveProxyHandler(this, distortedValue);
2685
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2668
+ var handler = new ReactiveProxyHandler(this, value);
2669
+ proxy = new Proxy(createShadowTarget(value), handler);
2686
2670
  registerProxy(proxy, value);
2687
- this.reactiveObjectGraph.set(distortedValue, proxy);
2671
+ this.reactiveObjectGraph.set(value, proxy);
2688
2672
  }
2689
2673
 
2690
2674
  return proxy;
2691
2675
  }
2692
2676
  }, {
2693
2677
  key: "getReadOnlyHandler",
2694
- value: function getReadOnlyHandler(value, distortedValue) {
2695
- var proxy = this.readOnlyObjectGraph.get(distortedValue);
2678
+ value: function getReadOnlyHandler(value) {
2679
+ var proxy = this.readOnlyObjectGraph.get(value);
2696
2680
 
2697
2681
  if (isUndefined(proxy)) {
2698
2682
  // caching the proxy after the first time it is accessed
2699
- var handler = new ReadOnlyHandler(this, distortedValue);
2700
- proxy = new Proxy(createShadowTarget(distortedValue), handler);
2683
+ var handler = new ReadOnlyHandler(this, value);
2684
+ proxy = new Proxy(createShadowTarget(value), handler);
2701
2685
  registerProxy(proxy, value);
2702
- this.readOnlyObjectGraph.set(distortedValue, proxy);
2686
+ this.readOnlyObjectGraph.set(value, proxy);
2703
2687
  }
2704
2688
 
2705
2689
  return proxy;
2706
2690
  }
2707
2691
  }]);
2708
2692
 
2709
- return ReactiveMembrane;
2693
+ return ObservableMembrane;
2710
2694
  }();
2711
- /** version: 1.1.5 */
2695
+ /** version: 2.0.0 */
2712
2696
 
2713
2697
  /*
2714
2698
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2719,15 +2703,9 @@
2719
2703
 
2720
2704
 
2721
2705
  var lockerLivePropertyKey = Symbol.for('@@lockerLiveValue');
2722
-
2723
- function valueDistortion(value) {
2724
- return value;
2725
- }
2726
-
2727
- var reactiveMembrane = new ReactiveMembrane({
2706
+ var reactiveMembrane = new ObservableMembrane({
2728
2707
  valueObserved: valueObserved,
2729
2708
  valueMutated: valueMutated,
2730
- valueDistortion: valueDistortion,
2731
2709
  tagPropertyKey: lockerLivePropertyKey
2732
2710
  });
2733
2711
  /**
@@ -2736,16 +2714,9 @@
2736
2714
  * change or being removed.
2737
2715
  */
2738
2716
 
2739
- var unwrap = function unwrap(value) {
2740
- var unwrapped = reactiveMembrane.unwrapProxy(value);
2741
-
2742
- if (unwrapped !== value) {
2743
- // if value is a proxy, unwrap to access original value and apply distortion
2744
- return valueDistortion(unwrapped);
2745
- }
2746
-
2747
- return value;
2748
- };
2717
+ function unwrap(value) {
2718
+ return reactiveMembrane.unwrapProxy(value);
2719
+ }
2749
2720
  /*
2750
2721
  * Copyright (c) 2018, salesforce.com, inc.
2751
2722
  * All rights reserved.
@@ -3844,7 +3815,7 @@
3844
3815
  return _super4.apply(this, arguments);
3845
3816
  }
3846
3817
 
3847
- return HTMLBridgeElement;
3818
+ return _createClass(HTMLBridgeElement);
3848
3819
  }(SuperClass);
3849
3820
  } else {
3850
3821
  HTMLBridgeElement = function HTMLBridgeElement() {
@@ -4649,12 +4620,14 @@
4649
4620
  }
4650
4621
 
4651
4622
  function updateChildrenHook(oldVnode, vnode) {
4652
- var children = vnode.children,
4653
- owner = vnode.owner;
4654
- var fn = hasDynamicChildren(children) ? updateDynamicChildren : updateStaticChildren;
4655
- runWithBoundaryProtection(owner, owner.owner, noop, function () {
4656
- fn(vnode.elm, oldVnode.children, children);
4657
- }, noop);
4623
+ var elm = vnode.elm,
4624
+ children = vnode.children;
4625
+
4626
+ if (hasDynamicChildren(children)) {
4627
+ updateDynamicChildren(elm, oldVnode.children, children);
4628
+ } else {
4629
+ updateStaticChildren(elm, oldVnode.children, children);
4630
+ }
4658
4631
  }
4659
4632
 
4660
4633
  function allocateChildrenHook(vnode, vm) {
@@ -4998,7 +4971,7 @@
4998
4971
  return _this4;
4999
4972
  }
5000
4973
 
5001
- return LWCUpgradableElement;
4974
+ return _createClass(LWCUpgradableElement);
5002
4975
  }(renderer.HTMLElement);
5003
4976
 
5004
4977
  renderer.defineCustomElement(tagName, CE);
@@ -6060,7 +6033,7 @@
6060
6033
  if (isProfilerEnabled) {
6061
6034
  currentDispatcher(opId, 0
6062
6035
  /* Start */
6063
- , vm.tagName, vm.idx);
6036
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6064
6037
  }
6065
6038
  }
6066
6039
 
@@ -6074,7 +6047,7 @@
6074
6047
  if (isProfilerEnabled) {
6075
6048
  currentDispatcher(opId, 1
6076
6049
  /* Stop */
6077
- , vm.tagName, vm.idx);
6050
+ , vm.tagName, vm.idx, vm.renderMode, vm.shadowMode);
6078
6051
  }
6079
6052
  }
6080
6053
 
@@ -6088,7 +6061,7 @@
6088
6061
  if (isProfilerEnabled) {
6089
6062
  currentDispatcher(opId, 0
6090
6063
  /* Start */
6091
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6064
+ , 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);
6092
6065
  }
6093
6066
  }
6094
6067
 
@@ -6102,7 +6075,7 @@
6102
6075
  if (isProfilerEnabled) {
6103
6076
  currentDispatcher(opId, 1
6104
6077
  /* Stop */
6105
- , vm === null || vm === void 0 ? void 0 : vm.tagName, vm === null || vm === void 0 ? void 0 : vm.idx);
6078
+ , 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);
6106
6079
  }
6107
6080
  }
6108
6081
  /*
@@ -7274,7 +7247,7 @@
7274
7247
  return _this5;
7275
7248
  }
7276
7249
 
7277
- return WireContextRegistrationEvent;
7250
+ return _createClass(WireContextRegistrationEvent);
7278
7251
  }( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
7279
7252
 
7280
7253
  function createFieldDataCallback(vm, name) {
@@ -7618,7 +7591,7 @@
7618
7591
  hooksAreSet = true;
7619
7592
  setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
7620
7593
  }
7621
- /* version: 2.5.9 */
7594
+ /* version: 2.6.2 */
7622
7595
 
7623
7596
  /*
7624
7597
  * Copyright (c) 2018, salesforce.com, inc.
@@ -7675,7 +7648,7 @@
7675
7648
  return _super7.apply(this, arguments);
7676
7649
  }
7677
7650
 
7678
- return clazz;
7651
+ return _createClass(clazz);
7679
7652
  }(HTMLElementAlias);
7680
7653
 
7681
7654
  customElements.define('lwc-test-' + Math.floor(Math.random() * 1000000), clazz);
@@ -8271,7 +8244,7 @@
8271
8244
  });
8272
8245
  freeze(LightningElement);
8273
8246
  seal(LightningElement.prototype);
8274
- /* version: 2.5.9 */
8247
+ /* version: 2.6.2 */
8275
8248
 
8276
8249
  exports.LightningElement = LightningElement;
8277
8250
  exports.__unstable__ProfilerControl = profilerControl;