lwc 2.5.10 → 2.6.1
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.
- package/dist/engine-dom/esm/es2017/engine-dom.js +88 -81
- package/dist/engine-dom/iife/es2017/engine-dom.js +88 -81
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +87 -80
- package/dist/engine-dom/iife/es5/engine-dom.js +93 -86
- package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +92 -85
- package/dist/engine-dom/umd/es2017/engine-dom.js +88 -81
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +87 -80
- package/dist/engine-dom/umd/es5/engine-dom.js +93 -86
- package/dist/engine-dom/umd/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +92 -85
- package/dist/engine-server/commonjs/es2017/engine-server.js +88 -81
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -2
- package/dist/engine-server/esm/es2017/engine-server.js +88 -81
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +23 -130
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +23 -130
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +23 -130
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +23 -124
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +23 -124
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +23 -130
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +23 -130
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +23 -124
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +23 -124
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +2 -2
- package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +2 -2
- package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
- package/package.json +8 -8
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
20
20
|
|
|
21
|
-
function _get2(
|
|
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
|
|
|
@@ -351,7 +351,7 @@
|
|
|
351
351
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
352
352
|
return attributeName;
|
|
353
353
|
}
|
|
354
|
-
/** version: 2.
|
|
354
|
+
/** version: 2.6.1 */
|
|
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.
|
|
533
|
+
/** version: 2.6.1 */
|
|
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
|
|
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
|
|
2618
|
-
function
|
|
2619
|
-
|
|
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
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
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(
|
|
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(
|
|
2649
|
-
|
|
2650
|
-
|
|
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
|
|
2640
|
+
return this.getReactiveHandler(unwrappedValue);
|
|
2656
2641
|
}
|
|
2657
2642
|
|
|
2658
|
-
return
|
|
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(
|
|
2667
|
-
return this.getReadOnlyHandler(value
|
|
2650
|
+
if (this.valueIsObservable(value)) {
|
|
2651
|
+
return this.getReadOnlyHandler(value);
|
|
2668
2652
|
}
|
|
2669
2653
|
|
|
2670
|
-
return
|
|
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
|
|
2680
|
-
var proxy = this.reactiveObjectGraph.get(
|
|
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,
|
|
2685
|
-
proxy = new Proxy(createShadowTarget(
|
|
2668
|
+
var handler = new ReactiveProxyHandler(this, value);
|
|
2669
|
+
proxy = new Proxy(createShadowTarget(value), handler);
|
|
2686
2670
|
registerProxy(proxy, value);
|
|
2687
|
-
this.reactiveObjectGraph.set(
|
|
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
|
|
2695
|
-
var proxy = this.readOnlyObjectGraph.get(
|
|
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,
|
|
2700
|
-
proxy = new Proxy(createShadowTarget(
|
|
2683
|
+
var handler = new ReadOnlyHandler(this, value);
|
|
2684
|
+
proxy = new Proxy(createShadowTarget(value), handler);
|
|
2701
2685
|
registerProxy(proxy, value);
|
|
2702
|
-
this.readOnlyObjectGraph.set(
|
|
2686
|
+
this.readOnlyObjectGraph.set(value, proxy);
|
|
2703
2687
|
}
|
|
2704
2688
|
|
|
2705
2689
|
return proxy;
|
|
2706
2690
|
}
|
|
2707
2691
|
}]);
|
|
2708
2692
|
|
|
2709
|
-
return
|
|
2693
|
+
return ObservableMembrane;
|
|
2710
2694
|
}();
|
|
2711
|
-
/** version:
|
|
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
|
-
|
|
2740
|
-
|
|
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.
|
|
@@ -5845,6 +5816,7 @@
|
|
|
5845
5816
|
|
|
5846
5817
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
5847
5818
|
var content = [];
|
|
5819
|
+
var root;
|
|
5848
5820
|
|
|
5849
5821
|
for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
|
|
5850
5822
|
var stylesheet = stylesheets[_i16];
|
|
@@ -5857,23 +5829,46 @@
|
|
|
5857
5829
|
// the component instance might be attempting to use an old version of
|
|
5858
5830
|
// the stylesheet, while internally, we have a replacement for it.
|
|
5859
5831
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
5860
|
-
}
|
|
5861
|
-
|
|
5832
|
+
}
|
|
5833
|
+
|
|
5834
|
+
var isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
5862
5835
|
|
|
5836
|
+
var scopeToken = isScopedCss || vm.shadowMode === 1
|
|
5837
|
+
/* Synthetic */
|
|
5838
|
+
&& vm.renderMode === 1
|
|
5839
|
+
/* Shadow */
|
|
5840
|
+
? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
5841
|
+
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
5863
5842
|
|
|
5864
|
-
var isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
5865
5843
|
var useActualHostSelector = vm.renderMode === 0
|
|
5866
5844
|
/* Light */
|
|
5867
5845
|
? !isScopedCss : vm.shadowMode === 0
|
|
5868
5846
|
/* Native */
|
|
5869
|
-
; //
|
|
5847
|
+
; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
5848
|
+
// we use an attribute selector on the host to simulate :dir().
|
|
5870
5849
|
|
|
5871
|
-
var
|
|
5872
|
-
|
|
5873
|
-
|
|
5850
|
+
var useNativeDirPseudoclass = void 0;
|
|
5851
|
+
|
|
5852
|
+
if (vm.renderMode === 1
|
|
5874
5853
|
/* Shadow */
|
|
5875
|
-
|
|
5876
|
-
|
|
5854
|
+
) {
|
|
5855
|
+
useNativeDirPseudoclass = vm.shadowMode === 0
|
|
5856
|
+
/* Native */
|
|
5857
|
+
;
|
|
5858
|
+
} else {
|
|
5859
|
+
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
5860
|
+
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
5861
|
+
if (isUndefined$1(root)) {
|
|
5862
|
+
// Only calculate the root once as necessary
|
|
5863
|
+
root = getNearestShadowComponent(vm);
|
|
5864
|
+
}
|
|
5865
|
+
|
|
5866
|
+
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
|
|
5867
|
+
/* Native */
|
|
5868
|
+
;
|
|
5869
|
+
}
|
|
5870
|
+
|
|
5871
|
+
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
5877
5872
|
}
|
|
5878
5873
|
}
|
|
5879
5874
|
|
|
@@ -5895,14 +5890,12 @@
|
|
|
5895
5890
|
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
5896
5891
|
|
|
5897
5892
|
|
|
5898
|
-
function
|
|
5893
|
+
function getNearestShadowComponent(vm) {
|
|
5899
5894
|
var owner = vm;
|
|
5900
5895
|
|
|
5901
5896
|
while (!isNull(owner)) {
|
|
5902
5897
|
if (owner.renderMode === 1
|
|
5903
5898
|
/* Shadow */
|
|
5904
|
-
&& owner.shadowMode === 0
|
|
5905
|
-
/* Native */
|
|
5906
5899
|
) {
|
|
5907
5900
|
return owner;
|
|
5908
5901
|
}
|
|
@@ -5913,6 +5906,20 @@
|
|
|
5913
5906
|
return owner;
|
|
5914
5907
|
}
|
|
5915
5908
|
|
|
5909
|
+
function getNearestNativeShadowComponent(vm) {
|
|
5910
|
+
var owner = getNearestShadowComponent(vm);
|
|
5911
|
+
|
|
5912
|
+
if (!isNull(owner) && owner.shadowMode === 1
|
|
5913
|
+
/* Synthetic */
|
|
5914
|
+
) {
|
|
5915
|
+
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
5916
|
+
// synthetic, we know we won't find a native component if we go any further.
|
|
5917
|
+
return null;
|
|
5918
|
+
}
|
|
5919
|
+
|
|
5920
|
+
return owner;
|
|
5921
|
+
}
|
|
5922
|
+
|
|
5916
5923
|
function createStylesheet(vm, stylesheets) {
|
|
5917
5924
|
var renderer = vm.renderer,
|
|
5918
5925
|
renderMode = vm.renderMode,
|
|
@@ -7582,7 +7589,7 @@
|
|
|
7582
7589
|
hooksAreSet = true;
|
|
7583
7590
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
7584
7591
|
}
|
|
7585
|
-
/* version: 2.
|
|
7592
|
+
/* version: 2.6.1 */
|
|
7586
7593
|
|
|
7587
7594
|
/*
|
|
7588
7595
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8235,7 +8242,7 @@
|
|
|
8235
8242
|
});
|
|
8236
8243
|
freeze(LightningElement);
|
|
8237
8244
|
seal(LightningElement.prototype);
|
|
8238
|
-
/* version: 2.
|
|
8245
|
+
/* version: 2.6.1 */
|
|
8239
8246
|
|
|
8240
8247
|
exports.LightningElement = LightningElement;
|
|
8241
8248
|
exports.__unstable__ProfilerControl = profilerControl;
|