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
|
@@ -15,7 +15,7 @@ var LWC = (function (exports) {
|
|
|
15
15
|
|
|
16
16
|
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
17
|
|
|
18
|
-
function _get2(
|
|
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
|
|
|
@@ -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.
|
|
351
|
+
/** version: 2.6.1 */
|
|
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.
|
|
530
|
+
/** version: 2.6.1 */
|
|
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
|
|
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
|
|
2615
|
-
function
|
|
2616
|
-
|
|
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
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
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(
|
|
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(
|
|
2646
|
-
|
|
2647
|
-
|
|
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
|
|
2637
|
+
return this.getReactiveHandler(unwrappedValue);
|
|
2653
2638
|
}
|
|
2654
2639
|
|
|
2655
|
-
return
|
|
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(
|
|
2664
|
-
return this.getReadOnlyHandler(value
|
|
2647
|
+
if (this.valueIsObservable(value)) {
|
|
2648
|
+
return this.getReadOnlyHandler(value);
|
|
2665
2649
|
}
|
|
2666
2650
|
|
|
2667
|
-
return
|
|
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
|
|
2677
|
-
var proxy = this.reactiveObjectGraph.get(
|
|
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,
|
|
2682
|
-
proxy = new Proxy(createShadowTarget(
|
|
2665
|
+
var handler = new ReactiveProxyHandler(this, value);
|
|
2666
|
+
proxy = new Proxy(createShadowTarget(value), handler);
|
|
2683
2667
|
registerProxy(proxy, value);
|
|
2684
|
-
this.reactiveObjectGraph.set(
|
|
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
|
|
2692
|
-
var proxy = this.readOnlyObjectGraph.get(
|
|
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,
|
|
2697
|
-
proxy = new Proxy(createShadowTarget(
|
|
2680
|
+
var handler = new ReadOnlyHandler(this, value);
|
|
2681
|
+
proxy = new Proxy(createShadowTarget(value), handler);
|
|
2698
2682
|
registerProxy(proxy, value);
|
|
2699
|
-
this.readOnlyObjectGraph.set(
|
|
2683
|
+
this.readOnlyObjectGraph.set(value, proxy);
|
|
2700
2684
|
}
|
|
2701
2685
|
|
|
2702
2686
|
return proxy;
|
|
2703
2687
|
}
|
|
2704
2688
|
}]);
|
|
2705
2689
|
|
|
2706
|
-
return
|
|
2690
|
+
return ObservableMembrane;
|
|
2707
2691
|
}();
|
|
2708
|
-
/** version:
|
|
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
|
-
|
|
2737
|
-
|
|
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.
|
|
@@ -5842,6 +5813,7 @@ var LWC = (function (exports) {
|
|
|
5842
5813
|
|
|
5843
5814
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
5844
5815
|
var content = [];
|
|
5816
|
+
var root;
|
|
5845
5817
|
|
|
5846
5818
|
for (var _i16 = 0; _i16 < stylesheets.length; _i16++) {
|
|
5847
5819
|
var stylesheet = stylesheets[_i16];
|
|
@@ -5854,23 +5826,46 @@ var LWC = (function (exports) {
|
|
|
5854
5826
|
// the component instance might be attempting to use an old version of
|
|
5855
5827
|
// the stylesheet, while internally, we have a replacement for it.
|
|
5856
5828
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
5857
|
-
}
|
|
5858
|
-
|
|
5829
|
+
}
|
|
5830
|
+
|
|
5831
|
+
var isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
5859
5832
|
|
|
5833
|
+
var scopeToken = isScopedCss || vm.shadowMode === 1
|
|
5834
|
+
/* Synthetic */
|
|
5835
|
+
&& vm.renderMode === 1
|
|
5836
|
+
/* Shadow */
|
|
5837
|
+
? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
5838
|
+
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
5860
5839
|
|
|
5861
|
-
var isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
5862
5840
|
var useActualHostSelector = vm.renderMode === 0
|
|
5863
5841
|
/* Light */
|
|
5864
5842
|
? !isScopedCss : vm.shadowMode === 0
|
|
5865
5843
|
/* Native */
|
|
5866
|
-
; //
|
|
5844
|
+
; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
5845
|
+
// we use an attribute selector on the host to simulate :dir().
|
|
5867
5846
|
|
|
5868
|
-
var
|
|
5869
|
-
|
|
5870
|
-
|
|
5847
|
+
var useNativeDirPseudoclass = void 0;
|
|
5848
|
+
|
|
5849
|
+
if (vm.renderMode === 1
|
|
5871
5850
|
/* Shadow */
|
|
5872
|
-
|
|
5873
|
-
|
|
5851
|
+
) {
|
|
5852
|
+
useNativeDirPseudoclass = vm.shadowMode === 0
|
|
5853
|
+
/* Native */
|
|
5854
|
+
;
|
|
5855
|
+
} else {
|
|
5856
|
+
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
5857
|
+
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
5858
|
+
if (isUndefined$1(root)) {
|
|
5859
|
+
// Only calculate the root once as necessary
|
|
5860
|
+
root = getNearestShadowComponent(vm);
|
|
5861
|
+
}
|
|
5862
|
+
|
|
5863
|
+
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
|
|
5864
|
+
/* Native */
|
|
5865
|
+
;
|
|
5866
|
+
}
|
|
5867
|
+
|
|
5868
|
+
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
5874
5869
|
}
|
|
5875
5870
|
}
|
|
5876
5871
|
|
|
@@ -5892,14 +5887,12 @@ var LWC = (function (exports) {
|
|
|
5892
5887
|
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
5893
5888
|
|
|
5894
5889
|
|
|
5895
|
-
function
|
|
5890
|
+
function getNearestShadowComponent(vm) {
|
|
5896
5891
|
var owner = vm;
|
|
5897
5892
|
|
|
5898
5893
|
while (!isNull(owner)) {
|
|
5899
5894
|
if (owner.renderMode === 1
|
|
5900
5895
|
/* Shadow */
|
|
5901
|
-
&& owner.shadowMode === 0
|
|
5902
|
-
/* Native */
|
|
5903
5896
|
) {
|
|
5904
5897
|
return owner;
|
|
5905
5898
|
}
|
|
@@ -5910,6 +5903,20 @@ var LWC = (function (exports) {
|
|
|
5910
5903
|
return owner;
|
|
5911
5904
|
}
|
|
5912
5905
|
|
|
5906
|
+
function getNearestNativeShadowComponent(vm) {
|
|
5907
|
+
var owner = getNearestShadowComponent(vm);
|
|
5908
|
+
|
|
5909
|
+
if (!isNull(owner) && owner.shadowMode === 1
|
|
5910
|
+
/* Synthetic */
|
|
5911
|
+
) {
|
|
5912
|
+
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
5913
|
+
// synthetic, we know we won't find a native component if we go any further.
|
|
5914
|
+
return null;
|
|
5915
|
+
}
|
|
5916
|
+
|
|
5917
|
+
return owner;
|
|
5918
|
+
}
|
|
5919
|
+
|
|
5913
5920
|
function createStylesheet(vm, stylesheets) {
|
|
5914
5921
|
var renderer = vm.renderer,
|
|
5915
5922
|
renderMode = vm.renderMode,
|
|
@@ -7579,7 +7586,7 @@ var LWC = (function (exports) {
|
|
|
7579
7586
|
hooksAreSet = true;
|
|
7580
7587
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
7581
7588
|
}
|
|
7582
|
-
/* version: 2.
|
|
7589
|
+
/* version: 2.6.1 */
|
|
7583
7590
|
|
|
7584
7591
|
/*
|
|
7585
7592
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8232,7 +8239,7 @@ var LWC = (function (exports) {
|
|
|
8232
8239
|
});
|
|
8233
8240
|
freeze(LightningElement);
|
|
8234
8241
|
seal(LightningElement.prototype);
|
|
8235
|
-
/* version: 2.
|
|
8242
|
+
/* version: 2.6.1 */
|
|
8236
8243
|
|
|
8237
8244
|
exports.LightningElement = LightningElement;
|
|
8238
8245
|
exports.__unstable__ProfilerControl = profilerControl;
|