lwc 2.5.8 → 2.5.9
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 +141 -80
- package/dist/engine-dom/iife/es2017/engine-dom.js +141 -80
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +124 -76
- package/dist/engine-dom/iife/es5/engine-dom.js +150 -85
- package/dist/engine-dom/iife/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +133 -81
- package/dist/engine-dom/umd/es2017/engine-dom.js +141 -80
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +124 -76
- package/dist/engine-dom/umd/es5/engine-dom.js +150 -85
- package/dist/engine-dom/umd/es5/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +133 -81
- package/dist/engine-server/commonjs/es2017/engine-server.js +141 -80
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +2 -2
- package/dist/engine-server/esm/es2017/engine-server.js +141 -80
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
- 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
|
@@ -72,7 +72,7 @@ var LWC = (function (exports) {
|
|
|
72
72
|
find: ArrayFind,
|
|
73
73
|
indexOf: ArrayIndexOf,
|
|
74
74
|
join: ArrayJoin,
|
|
75
|
-
map: ArrayMap
|
|
75
|
+
map: ArrayMap,
|
|
76
76
|
push: ArrayPush$1,
|
|
77
77
|
reduce: ArrayReduce,
|
|
78
78
|
reverse: ArrayReverse,
|
|
@@ -135,7 +135,7 @@ var LWC = (function (exports) {
|
|
|
135
135
|
// Array.prototype.toString directly will cause an error Iterate through
|
|
136
136
|
// all the items and handle individually.
|
|
137
137
|
if (isArray$1(obj)) {
|
|
138
|
-
return ArrayJoin.call(ArrayMap
|
|
138
|
+
return ArrayJoin.call(ArrayMap.call(obj, toString$1), ',');
|
|
139
139
|
}
|
|
140
140
|
|
|
141
141
|
return obj.toString();
|
|
@@ -298,7 +298,7 @@ var LWC = (function (exports) {
|
|
|
298
298
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
299
299
|
return attributeName;
|
|
300
300
|
}
|
|
301
|
-
/** version: 2.5.
|
|
301
|
+
/** version: 2.5.9 */
|
|
302
302
|
|
|
303
303
|
/*
|
|
304
304
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -470,7 +470,7 @@ var LWC = (function (exports) {
|
|
|
470
470
|
|
|
471
471
|
function setFeatureFlagForTest(name, value) {
|
|
472
472
|
}
|
|
473
|
-
/** version: 2.5.
|
|
473
|
+
/** version: 2.5.9 */
|
|
474
474
|
|
|
475
475
|
/* proxy-compat-disable */
|
|
476
476
|
|
|
@@ -1496,7 +1496,6 @@ var LWC = (function (exports) {
|
|
|
1496
1496
|
getPrototypeOf,
|
|
1497
1497
|
create: ObjectCreate,
|
|
1498
1498
|
defineProperty: ObjectDefineProperty,
|
|
1499
|
-
defineProperties: ObjectDefineProperties,
|
|
1500
1499
|
isExtensible,
|
|
1501
1500
|
getOwnPropertyDescriptor,
|
|
1502
1501
|
getOwnPropertyNames,
|
|
@@ -1506,8 +1505,7 @@ var LWC = (function (exports) {
|
|
|
1506
1505
|
} = Object;
|
|
1507
1506
|
const {
|
|
1508
1507
|
push: ArrayPush,
|
|
1509
|
-
concat: ArrayConcat
|
|
1510
|
-
map: ArrayMap
|
|
1508
|
+
concat: ArrayConcat
|
|
1511
1509
|
} = Array.prototype;
|
|
1512
1510
|
|
|
1513
1511
|
function isUndefined(obj) {
|
|
@@ -1561,7 +1559,9 @@ var LWC = (function (exports) {
|
|
|
1561
1559
|
// but it will always be compatible with the previous descriptor
|
|
1562
1560
|
// to preserve the object invariants, which makes these lines safe.
|
|
1563
1561
|
|
|
1564
|
-
const originalDescriptor = getOwnPropertyDescriptor(originalTarget, key);
|
|
1562
|
+
const originalDescriptor = getOwnPropertyDescriptor(originalTarget, key); // TODO: it should be impossible for the originalDescriptor to ever be undefined, this `if` can be removed
|
|
1563
|
+
|
|
1564
|
+
/* istanbul ignore else */
|
|
1565
1565
|
|
|
1566
1566
|
if (!isUndefined(originalDescriptor)) {
|
|
1567
1567
|
const wrappedDesc = this.wrapDescriptor(originalDescriptor);
|
|
@@ -1589,11 +1589,17 @@ var LWC = (function (exports) {
|
|
|
1589
1589
|
|
|
1590
1590
|
preventExtensions(shadowTarget);
|
|
1591
1591
|
} // Shared Traps
|
|
1592
|
+
// TODO: apply() is never called
|
|
1593
|
+
|
|
1594
|
+
/* istanbul ignore next */
|
|
1592
1595
|
|
|
1593
1596
|
|
|
1594
1597
|
apply(shadowTarget, thisArg, argArray) {
|
|
1595
1598
|
/* No op */
|
|
1596
|
-
}
|
|
1599
|
+
} // TODO: construct() is never called
|
|
1600
|
+
|
|
1601
|
+
/* istanbul ignore next */
|
|
1602
|
+
|
|
1597
1603
|
|
|
1598
1604
|
construct(shadowTarget, argArray, newTarget) {
|
|
1599
1605
|
/* No op */
|
|
@@ -1706,8 +1712,8 @@ var LWC = (function (exports) {
|
|
|
1706
1712
|
|
|
1707
1713
|
}
|
|
1708
1714
|
|
|
1709
|
-
const getterMap = new WeakMap();
|
|
1710
|
-
const setterMap = new WeakMap();
|
|
1715
|
+
const getterMap$1 = new WeakMap();
|
|
1716
|
+
const setterMap$1 = new WeakMap();
|
|
1711
1717
|
const reverseGetterMap = new WeakMap();
|
|
1712
1718
|
const reverseSetterMap = new WeakMap();
|
|
1713
1719
|
|
|
@@ -1717,7 +1723,7 @@ var LWC = (function (exports) {
|
|
|
1717
1723
|
}
|
|
1718
1724
|
|
|
1719
1725
|
wrapGetter(originalGet) {
|
|
1720
|
-
const wrappedGetter = getterMap.get(originalGet);
|
|
1726
|
+
const wrappedGetter = getterMap$1.get(originalGet);
|
|
1721
1727
|
|
|
1722
1728
|
if (!isUndefined(wrappedGetter)) {
|
|
1723
1729
|
return wrappedGetter;
|
|
@@ -1730,13 +1736,13 @@ var LWC = (function (exports) {
|
|
|
1730
1736
|
return handler.wrapValue(originalGet.call(unwrap$1(this)));
|
|
1731
1737
|
};
|
|
1732
1738
|
|
|
1733
|
-
getterMap.set(originalGet, get);
|
|
1739
|
+
getterMap$1.set(originalGet, get);
|
|
1734
1740
|
reverseGetterMap.set(get, originalGet);
|
|
1735
1741
|
return get;
|
|
1736
1742
|
}
|
|
1737
1743
|
|
|
1738
1744
|
wrapSetter(originalSet) {
|
|
1739
|
-
const wrappedSetter = setterMap.get(originalSet);
|
|
1745
|
+
const wrappedSetter = setterMap$1.get(originalSet);
|
|
1740
1746
|
|
|
1741
1747
|
if (!isUndefined(wrappedSetter)) {
|
|
1742
1748
|
return wrappedSetter;
|
|
@@ -1747,7 +1753,7 @@ var LWC = (function (exports) {
|
|
|
1747
1753
|
originalSet.call(unwrap$1(this), unwrap$1(v));
|
|
1748
1754
|
};
|
|
1749
1755
|
|
|
1750
|
-
setterMap.set(originalSet, set);
|
|
1756
|
+
setterMap$1.set(originalSet, set);
|
|
1751
1757
|
reverseSetterMap.set(set, originalSet);
|
|
1752
1758
|
return set;
|
|
1753
1759
|
}
|
|
@@ -1788,7 +1794,7 @@ var LWC = (function (exports) {
|
|
|
1788
1794
|
return unwrap$1(redGet.call(handler.wrapValue(this)));
|
|
1789
1795
|
};
|
|
1790
1796
|
|
|
1791
|
-
getterMap.set(get, redGet);
|
|
1797
|
+
getterMap$1.set(get, redGet);
|
|
1792
1798
|
reverseGetterMap.set(redGet, get);
|
|
1793
1799
|
return get;
|
|
1794
1800
|
}
|
|
@@ -1807,7 +1813,7 @@ var LWC = (function (exports) {
|
|
|
1807
1813
|
redSet.call(handler.wrapValue(this), handler.wrapValue(v));
|
|
1808
1814
|
};
|
|
1809
1815
|
|
|
1810
|
-
setterMap.set(set, redSet);
|
|
1816
|
+
setterMap$1.set(set, redSet);
|
|
1811
1817
|
reverseSetterMap.set(redSet, set);
|
|
1812
1818
|
return set;
|
|
1813
1819
|
}
|
|
@@ -1858,6 +1864,11 @@ var LWC = (function (exports) {
|
|
|
1858
1864
|
preventExtensions(originalTarget); // if the originalTarget is a proxy itself, it might reject
|
|
1859
1865
|
// the preventExtension call, in which case we should not attempt to lock down
|
|
1860
1866
|
// the shadow target.
|
|
1867
|
+
// TODO: It should not actually be possible to reach this `if` statement.
|
|
1868
|
+
// If a proxy rejects extensions, then calling preventExtensions will throw an error:
|
|
1869
|
+
// https://codepen.io/nolanlawson-the-selector/pen/QWMOjbY
|
|
1870
|
+
|
|
1871
|
+
/* istanbul ignore if */
|
|
1861
1872
|
|
|
1862
1873
|
if (isExtensible(originalTarget)) {
|
|
1863
1874
|
return false;
|
|
@@ -1899,8 +1910,8 @@ var LWC = (function (exports) {
|
|
|
1899
1910
|
|
|
1900
1911
|
}
|
|
1901
1912
|
|
|
1902
|
-
const getterMap
|
|
1903
|
-
const setterMap
|
|
1913
|
+
const getterMap = new WeakMap();
|
|
1914
|
+
const setterMap = new WeakMap();
|
|
1904
1915
|
|
|
1905
1916
|
class ReadOnlyHandler extends BaseProxyHandler {
|
|
1906
1917
|
wrapValue(value) {
|
|
@@ -1908,7 +1919,7 @@ var LWC = (function (exports) {
|
|
|
1908
1919
|
}
|
|
1909
1920
|
|
|
1910
1921
|
wrapGetter(originalGet) {
|
|
1911
|
-
const wrappedGetter = getterMap
|
|
1922
|
+
const wrappedGetter = getterMap.get(originalGet);
|
|
1912
1923
|
|
|
1913
1924
|
if (!isUndefined(wrappedGetter)) {
|
|
1914
1925
|
return wrappedGetter;
|
|
@@ -1921,12 +1932,12 @@ var LWC = (function (exports) {
|
|
|
1921
1932
|
return handler.wrapValue(originalGet.call(unwrap$1(this)));
|
|
1922
1933
|
};
|
|
1923
1934
|
|
|
1924
|
-
getterMap
|
|
1935
|
+
getterMap.set(originalGet, get);
|
|
1925
1936
|
return get;
|
|
1926
1937
|
}
|
|
1927
1938
|
|
|
1928
1939
|
wrapSetter(originalSet) {
|
|
1929
|
-
const wrappedSetter = setterMap
|
|
1940
|
+
const wrappedSetter = setterMap.get(originalSet);
|
|
1930
1941
|
|
|
1931
1942
|
if (!isUndefined(wrappedSetter)) {
|
|
1932
1943
|
return wrappedSetter;
|
|
@@ -1935,16 +1946,20 @@ var LWC = (function (exports) {
|
|
|
1935
1946
|
const set = function (v) {
|
|
1936
1947
|
};
|
|
1937
1948
|
|
|
1938
|
-
setterMap
|
|
1949
|
+
setterMap.set(originalSet, set);
|
|
1939
1950
|
return set;
|
|
1940
1951
|
}
|
|
1941
1952
|
|
|
1942
1953
|
set(shadowTarget, key, value) {
|
|
1954
|
+
/* istanbul ignore next */
|
|
1955
|
+
|
|
1943
1956
|
|
|
1944
1957
|
return false;
|
|
1945
1958
|
}
|
|
1946
1959
|
|
|
1947
1960
|
deleteProperty(shadowTarget, key) {
|
|
1961
|
+
/* istanbul ignore next */
|
|
1962
|
+
|
|
1948
1963
|
|
|
1949
1964
|
return false;
|
|
1950
1965
|
}
|
|
@@ -1953,11 +1968,15 @@ var LWC = (function (exports) {
|
|
|
1953
1968
|
}
|
|
1954
1969
|
|
|
1955
1970
|
preventExtensions(shadowTarget) {
|
|
1971
|
+
/* istanbul ignore next */
|
|
1972
|
+
|
|
1956
1973
|
|
|
1957
1974
|
return false;
|
|
1958
1975
|
}
|
|
1959
1976
|
|
|
1960
1977
|
defineProperty(shadowTarget, key, descriptor) {
|
|
1978
|
+
/* istanbul ignore next */
|
|
1979
|
+
|
|
1961
1980
|
|
|
1962
1981
|
return false;
|
|
1963
1982
|
}
|
|
@@ -2005,7 +2024,8 @@ var LWC = (function (exports) {
|
|
|
2005
2024
|
this.valueMutated = defaultValueMutated;
|
|
2006
2025
|
this.valueObserved = defaultValueObserved;
|
|
2007
2026
|
this.valueIsObservable = defaultValueIsObservable;
|
|
2008
|
-
this.
|
|
2027
|
+
this.readOnlyObjectGraph = new WeakMap();
|
|
2028
|
+
this.reactiveObjectGraph = new WeakMap();
|
|
2009
2029
|
|
|
2010
2030
|
if (!isUndefined(options)) {
|
|
2011
2031
|
const {
|
|
@@ -2028,10 +2048,13 @@ var LWC = (function (exports) {
|
|
|
2028
2048
|
const distorted = this.valueDistortion(unwrappedValue);
|
|
2029
2049
|
|
|
2030
2050
|
if (this.valueIsObservable(distorted)) {
|
|
2031
|
-
|
|
2032
|
-
|
|
2051
|
+
if (this.readOnlyObjectGraph.get(distorted) === value) {
|
|
2052
|
+
// when trying to extract the writable version of a readonly
|
|
2053
|
+
// we return the readonly.
|
|
2054
|
+
return value;
|
|
2055
|
+
}
|
|
2033
2056
|
|
|
2034
|
-
return
|
|
2057
|
+
return this.getReactiveHandler(unwrappedValue, distorted);
|
|
2035
2058
|
}
|
|
2036
2059
|
|
|
2037
2060
|
return distorted;
|
|
@@ -2042,7 +2065,7 @@ var LWC = (function (exports) {
|
|
|
2042
2065
|
const distorted = this.valueDistortion(value);
|
|
2043
2066
|
|
|
2044
2067
|
if (this.valueIsObservable(distorted)) {
|
|
2045
|
-
return this.
|
|
2068
|
+
return this.getReadOnlyHandler(value, distorted);
|
|
2046
2069
|
}
|
|
2047
2070
|
|
|
2048
2071
|
return distorted;
|
|
@@ -2052,47 +2075,36 @@ var LWC = (function (exports) {
|
|
|
2052
2075
|
return unwrap$1(p);
|
|
2053
2076
|
}
|
|
2054
2077
|
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
objectGraph
|
|
2058
|
-
} = this;
|
|
2059
|
-
let reactiveState = objectGraph.get(distortedValue);
|
|
2078
|
+
getReactiveHandler(value, distortedValue) {
|
|
2079
|
+
let proxy = this.reactiveObjectGraph.get(distortedValue);
|
|
2060
2080
|
|
|
2061
|
-
if (
|
|
2062
|
-
|
|
2081
|
+
if (isUndefined(proxy)) {
|
|
2082
|
+
// caching the proxy after the first time it is accessed
|
|
2083
|
+
const handler = new ReactiveProxyHandler(this, distortedValue);
|
|
2084
|
+
proxy = new Proxy(createShadowTarget(distortedValue), handler);
|
|
2085
|
+
registerProxy(proxy, value);
|
|
2086
|
+
this.reactiveObjectGraph.set(distortedValue, proxy);
|
|
2063
2087
|
}
|
|
2064
2088
|
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
get reactive() {
|
|
2068
|
-
const reactiveHandler = new ReactiveProxyHandler(membrane, distortedValue); // caching the reactive proxy after the first time it is accessed
|
|
2069
|
-
|
|
2070
|
-
const proxy = new Proxy(createShadowTarget(distortedValue), reactiveHandler);
|
|
2071
|
-
registerProxy(proxy, value);
|
|
2072
|
-
ObjectDefineProperty(this, 'reactive', {
|
|
2073
|
-
value: proxy
|
|
2074
|
-
});
|
|
2075
|
-
return proxy;
|
|
2076
|
-
},
|
|
2089
|
+
return proxy;
|
|
2090
|
+
}
|
|
2077
2091
|
|
|
2078
|
-
|
|
2079
|
-
|
|
2092
|
+
getReadOnlyHandler(value, distortedValue) {
|
|
2093
|
+
let proxy = this.readOnlyObjectGraph.get(distortedValue);
|
|
2080
2094
|
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2095
|
+
if (isUndefined(proxy)) {
|
|
2096
|
+
// caching the proxy after the first time it is accessed
|
|
2097
|
+
const handler = new ReadOnlyHandler(this, distortedValue);
|
|
2098
|
+
proxy = new Proxy(createShadowTarget(distortedValue), handler);
|
|
2099
|
+
registerProxy(proxy, value);
|
|
2100
|
+
this.readOnlyObjectGraph.set(distortedValue, proxy);
|
|
2101
|
+
}
|
|
2088
2102
|
|
|
2089
|
-
|
|
2090
|
-
objectGraph.set(distortedValue, reactiveState);
|
|
2091
|
-
return reactiveState;
|
|
2103
|
+
return proxy;
|
|
2092
2104
|
}
|
|
2093
2105
|
|
|
2094
2106
|
}
|
|
2095
|
-
/** version: 1.
|
|
2107
|
+
/** version: 1.1.5 */
|
|
2096
2108
|
|
|
2097
2109
|
/*
|
|
2098
2110
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -4176,7 +4188,7 @@ var LWC = (function (exports) {
|
|
|
4176
4188
|
|
|
4177
4189
|
|
|
4178
4190
|
function d(value) {
|
|
4179
|
-
return value == null ? '' : value;
|
|
4191
|
+
return value == null ? '' : String(value);
|
|
4180
4192
|
} // [b]ind function
|
|
4181
4193
|
|
|
4182
4194
|
|
|
@@ -4446,6 +4458,7 @@ var LWC = (function (exports) {
|
|
|
4446
4458
|
|
|
4447
4459
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
4448
4460
|
const content = [];
|
|
4461
|
+
let root;
|
|
4449
4462
|
|
|
4450
4463
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
4451
4464
|
let stylesheet = stylesheets[i];
|
|
@@ -4453,22 +4466,45 @@ var LWC = (function (exports) {
|
|
|
4453
4466
|
if (isArray$1(stylesheet)) {
|
|
4454
4467
|
ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
|
|
4455
4468
|
} else {
|
|
4456
|
-
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
4457
4469
|
|
|
4470
|
+
const isScopedCss = stylesheet[KEY__SCOPED_CSS]; // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
4471
|
+
|
|
4472
|
+
const scopeToken = isScopedCss || vm.shadowMode === 1
|
|
4473
|
+
/* Synthetic */
|
|
4474
|
+
&& vm.renderMode === 1
|
|
4475
|
+
/* Shadow */
|
|
4476
|
+
? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
4477
|
+
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
4458
4478
|
|
|
4459
|
-
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
4460
4479
|
const useActualHostSelector = vm.renderMode === 0
|
|
4461
4480
|
/* Light */
|
|
4462
4481
|
? !isScopedCss : vm.shadowMode === 0
|
|
4463
4482
|
/* Native */
|
|
4464
|
-
; //
|
|
4483
|
+
; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
4484
|
+
// we use an attribute selector on the host to simulate :dir().
|
|
4465
4485
|
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4486
|
+
let useNativeDirPseudoclass;
|
|
4487
|
+
|
|
4488
|
+
if (vm.renderMode === 1
|
|
4469
4489
|
/* Shadow */
|
|
4470
|
-
|
|
4471
|
-
|
|
4490
|
+
) {
|
|
4491
|
+
useNativeDirPseudoclass = vm.shadowMode === 0
|
|
4492
|
+
/* Native */
|
|
4493
|
+
;
|
|
4494
|
+
} else {
|
|
4495
|
+
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
4496
|
+
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
4497
|
+
if (isUndefined$1(root)) {
|
|
4498
|
+
// Only calculate the root once as necessary
|
|
4499
|
+
root = getNearestShadowComponent(vm);
|
|
4500
|
+
}
|
|
4501
|
+
|
|
4502
|
+
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
|
|
4503
|
+
/* Native */
|
|
4504
|
+
;
|
|
4505
|
+
}
|
|
4506
|
+
|
|
4507
|
+
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
4472
4508
|
}
|
|
4473
4509
|
}
|
|
4474
4510
|
|
|
@@ -4492,14 +4528,12 @@ var LWC = (function (exports) {
|
|
|
4492
4528
|
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
4493
4529
|
|
|
4494
4530
|
|
|
4495
|
-
function
|
|
4531
|
+
function getNearestShadowComponent(vm) {
|
|
4496
4532
|
let owner = vm;
|
|
4497
4533
|
|
|
4498
4534
|
while (!isNull(owner)) {
|
|
4499
4535
|
if (owner.renderMode === 1
|
|
4500
4536
|
/* Shadow */
|
|
4501
|
-
&& owner.shadowMode === 0
|
|
4502
|
-
/* Native */
|
|
4503
4537
|
) {
|
|
4504
4538
|
return owner;
|
|
4505
4539
|
}
|
|
@@ -4510,6 +4544,20 @@ var LWC = (function (exports) {
|
|
|
4510
4544
|
return owner;
|
|
4511
4545
|
}
|
|
4512
4546
|
|
|
4547
|
+
function getNearestNativeShadowComponent(vm) {
|
|
4548
|
+
const owner = getNearestShadowComponent(vm);
|
|
4549
|
+
|
|
4550
|
+
if (!isNull(owner) && owner.shadowMode === 1
|
|
4551
|
+
/* Synthetic */
|
|
4552
|
+
) {
|
|
4553
|
+
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
4554
|
+
// synthetic, we know we won't find a native component if we go any further.
|
|
4555
|
+
return null;
|
|
4556
|
+
}
|
|
4557
|
+
|
|
4558
|
+
return owner;
|
|
4559
|
+
}
|
|
4560
|
+
|
|
4513
4561
|
function createStylesheet(vm, stylesheets) {
|
|
4514
4562
|
const {
|
|
4515
4563
|
renderer,
|
|
@@ -4525,7 +4573,7 @@ var LWC = (function (exports) {
|
|
|
4525
4573
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
4526
4574
|
renderer.insertGlobalStylesheet(stylesheets[i]);
|
|
4527
4575
|
}
|
|
4528
|
-
} else if (renderer.ssr || renderer.isHydrating) {
|
|
4576
|
+
} else if (renderer.ssr || renderer.isHydrating()) {
|
|
4529
4577
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
4530
4578
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
4531
4579
|
// the first time the VM renders.
|
|
@@ -6048,7 +6096,7 @@ var LWC = (function (exports) {
|
|
|
6048
6096
|
hooksAreSet = true;
|
|
6049
6097
|
setSanitizeHtmlContentHook(hooks.sanitizeHtmlContent);
|
|
6050
6098
|
}
|
|
6051
|
-
/* version: 2.5.
|
|
6099
|
+
/* version: 2.5.9 */
|
|
6052
6100
|
|
|
6053
6101
|
/*
|
|
6054
6102
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6192,7 +6240,7 @@ var LWC = (function (exports) {
|
|
|
6192
6240
|
const renderer = {
|
|
6193
6241
|
ssr: false,
|
|
6194
6242
|
|
|
6195
|
-
|
|
6243
|
+
isHydrating() {
|
|
6196
6244
|
return isHydrating;
|
|
6197
6245
|
},
|
|
6198
6246
|
|
|
@@ -6682,7 +6730,7 @@ var LWC = (function (exports) {
|
|
|
6682
6730
|
});
|
|
6683
6731
|
freeze(LightningElement);
|
|
6684
6732
|
seal(LightningElement.prototype);
|
|
6685
|
-
/* version: 2.5.
|
|
6733
|
+
/* version: 2.5.9 */
|
|
6686
6734
|
|
|
6687
6735
|
exports.LightningElement = LightningElement;
|
|
6688
6736
|
exports.__unstable__ProfilerControl = profilerControl;
|