lwc 2.13.0 → 2.13.3
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 +155 -145
- package/dist/engine-dom/iife/es2017/engine-dom.js +155 -145
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +143 -133
- package/dist/engine-dom/iife/es5/engine-dom.js +162 -142
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +144 -124
- package/dist/engine-dom/umd/es2017/engine-dom.js +155 -145
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +2 -2
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +143 -133
- package/dist/engine-dom/umd/es5/engine-dom.js +162 -142
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +144 -124
- package/dist/engine-server/commonjs/es2017/engine-server.js +132 -124
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +132 -124
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +693 -693
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +693 -693
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +681 -681
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +686 -686
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +1 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +697 -697
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +693 -693
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +681 -681
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +686 -686
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +1 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +697 -697
- 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.min.js +1 -1
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +5 -5
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +5 -5
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +5 -5
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +5 -5
- package/package.json +7 -7
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
return false;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
|
-
function _construct(
|
|
40
|
+
function _construct(Parent1, args1, Class1) {
|
|
41
41
|
if (isNativeReflectConstruct()) {
|
|
42
42
|
_construct = Reflect.construct;
|
|
43
43
|
} else {
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
return _construct.apply(null, arguments);
|
|
56
56
|
}
|
|
57
57
|
function _defineProperties(target, props) {
|
|
58
|
-
for(var
|
|
59
|
-
var descriptor = props[
|
|
58
|
+
for(var i2 = 0; i2 < props.length; i2++){
|
|
59
|
+
var descriptor = props[i2];
|
|
60
60
|
descriptor.enumerable = descriptor.enumerable || false;
|
|
61
61
|
descriptor.configurable = true;
|
|
62
62
|
if ("value" in descriptor) descriptor.writable = true;
|
|
@@ -81,7 +81,7 @@
|
|
|
81
81
|
}
|
|
82
82
|
return obj;
|
|
83
83
|
}
|
|
84
|
-
function _get(
|
|
84
|
+
function _get(target1, property1, receiver1) {
|
|
85
85
|
if (typeof Reflect !== "undefined" && Reflect.get) {
|
|
86
86
|
_get = Reflect.get;
|
|
87
87
|
} else {
|
|
@@ -95,13 +95,13 @@
|
|
|
95
95
|
return desc.value;
|
|
96
96
|
};
|
|
97
97
|
}
|
|
98
|
-
return _get(
|
|
98
|
+
return _get(target1, property1, receiver1 || target1);
|
|
99
99
|
}
|
|
100
|
-
function _getPrototypeOf(
|
|
100
|
+
function _getPrototypeOf(o1) {
|
|
101
101
|
_getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) {
|
|
102
102
|
return o.__proto__ || Object.getPrototypeOf(o);
|
|
103
103
|
};
|
|
104
|
-
return _getPrototypeOf(
|
|
104
|
+
return _getPrototypeOf(o1);
|
|
105
105
|
}
|
|
106
106
|
function _inherits(subClass, superClass) {
|
|
107
107
|
if (typeof superClass !== "function" && superClass !== null) {
|
|
@@ -129,7 +129,7 @@
|
|
|
129
129
|
function _iterableToArray(iter) {
|
|
130
130
|
if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
|
|
131
131
|
}
|
|
132
|
-
function _iterableToArrayLimit(arr,
|
|
132
|
+
function _iterableToArrayLimit(arr, i3) {
|
|
133
133
|
var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
|
|
134
134
|
if (_i == null) return;
|
|
135
135
|
var _arr = [];
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
try {
|
|
140
140
|
for(_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true){
|
|
141
141
|
_arr.push(_s.value);
|
|
142
|
-
if (
|
|
142
|
+
if (i3 && _arr.length === i3) break;
|
|
143
143
|
}
|
|
144
144
|
} catch (err) {
|
|
145
145
|
_d = true;
|
|
@@ -165,15 +165,15 @@
|
|
|
165
165
|
}
|
|
166
166
|
return _assertThisInitialized(self);
|
|
167
167
|
}
|
|
168
|
-
function _setPrototypeOf(
|
|
168
|
+
function _setPrototypeOf(o2, p1) {
|
|
169
169
|
_setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {
|
|
170
170
|
o.__proto__ = p;
|
|
171
171
|
return o;
|
|
172
172
|
};
|
|
173
|
-
return _setPrototypeOf(
|
|
173
|
+
return _setPrototypeOf(o2, p1);
|
|
174
174
|
}
|
|
175
|
-
function _slicedToArray(arr,
|
|
176
|
-
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr,
|
|
175
|
+
function _slicedToArray(arr, i4) {
|
|
176
|
+
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i4) || _unsupportedIterableToArray(arr, i4) || _nonIterableRest();
|
|
177
177
|
}
|
|
178
178
|
function _superPropBase(object, property) {
|
|
179
179
|
while(!Object.prototype.hasOwnProperty.call(object, property)){
|
|
@@ -197,7 +197,7 @@
|
|
|
197
197
|
if (n === "Map" || n === "Set") return Array.from(n);
|
|
198
198
|
if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
|
|
199
199
|
}
|
|
200
|
-
function _wrapNativeSuper(
|
|
200
|
+
function _wrapNativeSuper(Class2) {
|
|
201
201
|
var _cache = typeof Map === "function" ? new Map() : undefined;
|
|
202
202
|
_wrapNativeSuper = function _wrapNativeSuper(Class) {
|
|
203
203
|
if (Class === null || !_isNativeFunction(Class)) return Class;
|
|
@@ -221,7 +221,7 @@
|
|
|
221
221
|
});
|
|
222
222
|
return _setPrototypeOf(Wrapper, Class);
|
|
223
223
|
};
|
|
224
|
-
return _wrapNativeSuper(
|
|
224
|
+
return _wrapNativeSuper(Class2);
|
|
225
225
|
}
|
|
226
226
|
function _isNativeReflectConstruct() {
|
|
227
227
|
if (typeof Reflect === "undefined" || !Reflect.construct) return false;
|
|
@@ -567,7 +567,7 @@
|
|
|
567
567
|
var XML_NAMESPACE = "http://www.w3.org/XML/1998/namespace";
|
|
568
568
|
var SVG_NAMESPACE = "http://www.w3.org/2000/svg";
|
|
569
569
|
var XLINK_NAMESPACE = "http://www.w3.org/1999/xlink";
|
|
570
|
-
/** version: 2.13.
|
|
570
|
+
/** version: 2.13.3 */ /*
|
|
571
571
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
572
572
|
* All rights reserved.
|
|
573
573
|
* SPDX-License-Identifier: MIT
|
|
@@ -700,7 +700,7 @@
|
|
|
700
700
|
* purposes. It is a no-op when invoked in production mode.
|
|
701
701
|
*/ function setFeatureFlagForTest(name, value) {
|
|
702
702
|
}
|
|
703
|
-
/** version: 2.13.
|
|
703
|
+
/** version: 2.13.3 */ /* proxy-compat-disable */ /*
|
|
704
704
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
705
705
|
* All rights reserved.
|
|
706
706
|
* SPDX-License-Identifier: MIT
|
|
@@ -724,7 +724,7 @@
|
|
|
724
724
|
}
|
|
725
725
|
function guid() {
|
|
726
726
|
var s4 = function s4() {
|
|
727
|
-
return Math.floor((1 + Math.random()) *
|
|
727
|
+
return Math.floor((1 + Math.random()) * 0x10000).toString(16).substring(1);
|
|
728
728
|
};
|
|
729
729
|
return s4() + s4() + "-" + s4() + "-" + s4() + "-" + s4() + "-" + s4() + s4() + s4();
|
|
730
730
|
}
|
|
@@ -1129,6 +1129,18 @@
|
|
|
1129
1129
|
function logError(message, vm9) {
|
|
1130
1130
|
log("error", message, vm9);
|
|
1131
1131
|
}
|
|
1132
|
+
/*
|
|
1133
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
1134
|
+
* All rights reserved.
|
|
1135
|
+
* SPDX-License-Identifier: MIT
|
|
1136
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1137
|
+
*/ function resolveCircularModuleDependency(fn) {
|
|
1138
|
+
var module = fn();
|
|
1139
|
+
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
1140
|
+
}
|
|
1141
|
+
function isCircularModuleDependency(obj) {
|
|
1142
|
+
return isFunction$1(obj) && hasOwnProperty$1.call(obj, "__circular__");
|
|
1143
|
+
}
|
|
1132
1144
|
/*
|
|
1133
1145
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
1134
1146
|
* All rights reserved.
|
|
@@ -2139,53 +2151,7 @@
|
|
|
2139
2151
|
},
|
|
2140
2152
|
configurable: true
|
|
2141
2153
|
});
|
|
2142
|
-
|
|
2143
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2144
|
-
* All rights reserved.
|
|
2145
|
-
* SPDX-License-Identifier: MIT
|
|
2146
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2147
|
-
*/ /**
|
|
2148
|
-
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2149
|
-
* LWC Components. This function implements the internals of this
|
|
2150
|
-
* decorator.
|
|
2151
|
-
*/ function wire(_adapter, _config) {
|
|
2152
|
-
throw new Error();
|
|
2153
|
-
}
|
|
2154
|
-
function internalWireFieldDecorator(key) {
|
|
2155
|
-
return {
|
|
2156
|
-
get: function get1() {
|
|
2157
|
-
var vm = getAssociatedVM(this);
|
|
2158
|
-
componentValueObserved(vm, key);
|
|
2159
|
-
return vm.cmpFields[key];
|
|
2160
|
-
},
|
|
2161
|
-
set: function set1(value) {
|
|
2162
|
-
var vm = getAssociatedVM(this);
|
|
2163
|
-
/**
|
|
2164
|
-
* Reactivity for wired fields is provided in wiring.
|
|
2165
|
-
* We intentionally add reactivity here since this is just
|
|
2166
|
-
* letting the author to do the wrong thing, but it will keep our
|
|
2167
|
-
* system to be backward compatible.
|
|
2168
|
-
*/ if (value !== vm.cmpFields[key]) {
|
|
2169
|
-
vm.cmpFields[key] = value;
|
|
2170
|
-
componentValueMutated(vm, key);
|
|
2171
|
-
}
|
|
2172
|
-
},
|
|
2173
|
-
enumerable: true,
|
|
2174
|
-
configurable: true
|
|
2175
|
-
};
|
|
2176
|
-
}
|
|
2177
|
-
/*
|
|
2178
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2179
|
-
* All rights reserved.
|
|
2180
|
-
* SPDX-License-Identifier: MIT
|
|
2181
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2182
|
-
*/ function track(target) {
|
|
2183
|
-
if (arguments.length === 1) {
|
|
2184
|
-
return reactiveMembrane.getProxy(target);
|
|
2185
|
-
}
|
|
2186
|
-
throw new Error();
|
|
2187
|
-
}
|
|
2188
|
-
function internalTrackDecorator(key) {
|
|
2154
|
+
function createObservedFieldPropertyDescriptor(key) {
|
|
2189
2155
|
return {
|
|
2190
2156
|
get: function get1() {
|
|
2191
2157
|
var vm = getAssociatedVM(this);
|
|
@@ -2194,9 +2160,8 @@
|
|
|
2194
2160
|
},
|
|
2195
2161
|
set: function set1(newValue) {
|
|
2196
2162
|
var vm = getAssociatedVM(this);
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2163
|
+
if (newValue !== vm.cmpFields[key]) {
|
|
2164
|
+
vm.cmpFields[key] = newValue;
|
|
2200
2165
|
componentValueMutated(vm, key);
|
|
2201
2166
|
}
|
|
2202
2167
|
},
|
|
@@ -2309,7 +2274,18 @@
|
|
|
2309
2274
|
configurable: configurable
|
|
2310
2275
|
};
|
|
2311
2276
|
}
|
|
2312
|
-
|
|
2277
|
+
/*
|
|
2278
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2279
|
+
* All rights reserved.
|
|
2280
|
+
* SPDX-License-Identifier: MIT
|
|
2281
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2282
|
+
*/ function track(target) {
|
|
2283
|
+
if (arguments.length === 1) {
|
|
2284
|
+
return reactiveMembrane.getProxy(target);
|
|
2285
|
+
}
|
|
2286
|
+
throw new Error();
|
|
2287
|
+
}
|
|
2288
|
+
function internalTrackDecorator(key) {
|
|
2313
2289
|
return {
|
|
2314
2290
|
get: function get1() {
|
|
2315
2291
|
var vm = getAssociatedVM(this);
|
|
@@ -2318,8 +2294,44 @@
|
|
|
2318
2294
|
},
|
|
2319
2295
|
set: function set1(newValue) {
|
|
2320
2296
|
var vm = getAssociatedVM(this);
|
|
2321
|
-
|
|
2322
|
-
|
|
2297
|
+
var reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
|
|
2298
|
+
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2299
|
+
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2300
|
+
componentValueMutated(vm, key);
|
|
2301
|
+
}
|
|
2302
|
+
},
|
|
2303
|
+
enumerable: true,
|
|
2304
|
+
configurable: true
|
|
2305
|
+
};
|
|
2306
|
+
}
|
|
2307
|
+
/*
|
|
2308
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2309
|
+
* All rights reserved.
|
|
2310
|
+
* SPDX-License-Identifier: MIT
|
|
2311
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2312
|
+
*/ /**
|
|
2313
|
+
* @wire decorator to wire fields and methods to a wire adapter in
|
|
2314
|
+
* LWC Components. This function implements the internals of this
|
|
2315
|
+
* decorator.
|
|
2316
|
+
*/ function wire(_adapter, _config) {
|
|
2317
|
+
throw new Error();
|
|
2318
|
+
}
|
|
2319
|
+
function internalWireFieldDecorator(key) {
|
|
2320
|
+
return {
|
|
2321
|
+
get: function get1() {
|
|
2322
|
+
var vm = getAssociatedVM(this);
|
|
2323
|
+
componentValueObserved(vm, key);
|
|
2324
|
+
return vm.cmpFields[key];
|
|
2325
|
+
},
|
|
2326
|
+
set: function set1(value) {
|
|
2327
|
+
var vm = getAssociatedVM(this);
|
|
2328
|
+
/**
|
|
2329
|
+
* Reactivity for wired fields is provided in wiring.
|
|
2330
|
+
* We intentionally add reactivity here since this is just
|
|
2331
|
+
* letting the author to do the wrong thing, but it will keep our
|
|
2332
|
+
* system to be backward compatible.
|
|
2333
|
+
*/ if (value !== vm.cmpFields[key]) {
|
|
2334
|
+
vm.cmpFields[key] = value;
|
|
2323
2335
|
componentValueMutated(vm, key);
|
|
2324
2336
|
}
|
|
2325
2337
|
},
|
|
@@ -2437,7 +2449,12 @@
|
|
|
2437
2449
|
var meta = signedDecoratorToMetaMap.get(Ctor);
|
|
2438
2450
|
return isUndefined$1(meta) ? defaultMeta : meta;
|
|
2439
2451
|
}
|
|
2440
|
-
|
|
2452
|
+
/*
|
|
2453
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2454
|
+
* All rights reserved.
|
|
2455
|
+
* SPDX-License-Identifier: MIT
|
|
2456
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2457
|
+
*/ var signedTemplateSet = new Set();
|
|
2441
2458
|
function defaultEmptyTemplate() {
|
|
2442
2459
|
return [];
|
|
2443
2460
|
}
|
|
@@ -2450,6 +2467,30 @@
|
|
|
2450
2467
|
* will prevent this function from being imported by userland code.
|
|
2451
2468
|
*/ function registerTemplate(tpl) {
|
|
2452
2469
|
signedTemplateSet.add(tpl);
|
|
2470
|
+
// FIXME[@W-10950976]: the template object should be frozen, and it should not be possible to set
|
|
2471
|
+
// the stylesheets or stylesheetToken(s). For backwards compat, though, we shim stylesheetTokens
|
|
2472
|
+
// on top of stylesheetToken for anyone who is accessing the old internal API.
|
|
2473
|
+
// Details: https://salesforce.quip.com/v1rmAFu2cKAr
|
|
2474
|
+
defineProperty(tpl, "stylesheetTokens", {
|
|
2475
|
+
get: function get1() {
|
|
2476
|
+
var stylesheetToken = this.stylesheetToken;
|
|
2477
|
+
if (isUndefined$1(stylesheetToken)) {
|
|
2478
|
+
return stylesheetToken;
|
|
2479
|
+
}
|
|
2480
|
+
// Shim for the old `stylesheetTokens` property
|
|
2481
|
+
// See https://github.com/salesforce/lwc/pull/2332/files#diff-7901555acef29969adaa6583185b3e9bce475cdc6f23e799a54e0018cb18abaa
|
|
2482
|
+
return {
|
|
2483
|
+
hostAttribute: "".concat(stylesheetToken, "-host"),
|
|
2484
|
+
shadowAttribute: stylesheetToken
|
|
2485
|
+
};
|
|
2486
|
+
},
|
|
2487
|
+
set: function set1(value) {
|
|
2488
|
+
// If the value is null or some other exotic object, you would be broken anyway in the past
|
|
2489
|
+
// because the engine would try to access hostAttribute/shadowAttribute, which would throw an error.
|
|
2490
|
+
// However it may be undefined in newer versions of LWC, so we need to guard against that case.
|
|
2491
|
+
this.stylesheetToken = isUndefined$1(value) ? undefined : value.shadowAttribute;
|
|
2492
|
+
}
|
|
2493
|
+
});
|
|
2453
2494
|
// chaining this method as a way to wrap existing
|
|
2454
2495
|
// assignment of templates easily, without too much transformation
|
|
2455
2496
|
return tpl;
|
|
@@ -2613,18 +2654,6 @@
|
|
|
2613
2654
|
var BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor$1, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), []);
|
|
2614
2655
|
freeze(BaseBridgeElement);
|
|
2615
2656
|
seal(BaseBridgeElement.prototype);
|
|
2616
|
-
/*
|
|
2617
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
2618
|
-
* All rights reserved.
|
|
2619
|
-
* SPDX-License-Identifier: MIT
|
|
2620
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2621
|
-
*/ function resolveCircularModuleDependency(fn) {
|
|
2622
|
-
var module = fn();
|
|
2623
|
-
return (module === null || module === void 0 ? void 0 : module.__esModule) ? module.default : module;
|
|
2624
|
-
}
|
|
2625
|
-
function isCircularModuleDependency(obj) {
|
|
2626
|
-
return isFunction$1(obj) && hasOwnProperty$1.call(obj, "__circular__");
|
|
2627
|
-
}
|
|
2628
2657
|
function setActiveVM(vm) {
|
|
2629
2658
|
{
|
|
2630
2659
|
// this method should never leak to prod
|
|
@@ -4332,14 +4361,8 @@
|
|
|
4332
4361
|
function removeVM(vm) {
|
|
4333
4362
|
resetComponentStateWhenRemoved(vm);
|
|
4334
4363
|
}
|
|
4335
|
-
function getNearestShadowAncestor(vm) {
|
|
4336
|
-
var ancestor = vm.owner;
|
|
4337
|
-
while(!isNull(ancestor) && ancestor.renderMode === 0){
|
|
4338
|
-
ancestor = ancestor.owner;
|
|
4339
|
-
}
|
|
4340
|
-
return ancestor;
|
|
4341
|
-
}
|
|
4342
4364
|
function createVM(elm, ctor, options) {
|
|
4365
|
+
var _a;
|
|
4343
4366
|
var mode = options.mode, owner = options.owner, tagName = options.tagName;
|
|
4344
4367
|
var def = getComponentInternalDef(ctor);
|
|
4345
4368
|
var vm = {
|
|
@@ -4361,6 +4384,8 @@
|
|
|
4361
4384
|
oar: create(null),
|
|
4362
4385
|
cmpTemplate: null,
|
|
4363
4386
|
renderMode: def.renderMode,
|
|
4387
|
+
shadowMode: computeShadowMode(def, owner),
|
|
4388
|
+
nearestShadowMode: (owner === null || owner === void 0 ? void 0 : owner.shadowRoot) ? owner.shadowMode : (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : null,
|
|
4364
4389
|
context: {
|
|
4365
4390
|
stylesheetToken: undefined,
|
|
4366
4391
|
hasTokenInClass: undefined,
|
|
@@ -4373,7 +4398,6 @@
|
|
|
4373
4398
|
},
|
|
4374
4399
|
// Properties set right after VM creation.
|
|
4375
4400
|
tro: null,
|
|
4376
|
-
shadowMode: null,
|
|
4377
4401
|
// Properties set by the LightningElement constructor.
|
|
4378
4402
|
component: null,
|
|
4379
4403
|
shadowRoot: null,
|
|
@@ -4382,7 +4406,6 @@
|
|
|
4382
4406
|
setHook: setHook,
|
|
4383
4407
|
getHook: getHook
|
|
4384
4408
|
};
|
|
4385
|
-
vm.shadowMode = computeShadowMode(vm);
|
|
4386
4409
|
vm.tro = getTemplateReactiveObserver(vm);
|
|
4387
4410
|
invokeComponentConstructor(vm, def.ctor); // Initializing the wire decorator per instance only when really needed
|
|
4388
4411
|
if (hasWireAdapters(vm)) {
|
|
@@ -4390,8 +4413,8 @@
|
|
|
4390
4413
|
}
|
|
4391
4414
|
return vm;
|
|
4392
4415
|
}
|
|
4393
|
-
function computeShadowMode(
|
|
4394
|
-
var
|
|
4416
|
+
function computeShadowMode(def, owner) {
|
|
4417
|
+
var _a;
|
|
4395
4418
|
var shadowMode;
|
|
4396
4419
|
if (isSyntheticShadowDefined$1) {
|
|
4397
4420
|
if (def.renderMode === 0) {
|
|
@@ -4405,16 +4428,11 @@
|
|
|
4405
4428
|
if (def.shadowSupportMode === "any") {
|
|
4406
4429
|
shadowMode = 0 /* Native */ ;
|
|
4407
4430
|
} else {
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
} else {
|
|
4414
|
-
// Synthetic if neither this component nor any of its ancestors are configured
|
|
4415
|
-
// to be native.
|
|
4416
|
-
shadowMode = 1 /* Synthetic */ ;
|
|
4417
|
-
}
|
|
4431
|
+
// Transitive support for native Shadow DOM. A component in native mode
|
|
4432
|
+
// transitively opts all of its descendants into native.
|
|
4433
|
+
// Synthetic if neither this component nor any of its ancestors are configured
|
|
4434
|
+
// to be native.
|
|
4435
|
+
shadowMode = (_a = owner === null || owner === void 0 ? void 0 : owner.nearestShadowMode) !== null && _a !== void 0 ? _a : 1 /* Synthetic */ ;
|
|
4418
4436
|
}
|
|
4419
4437
|
} else {
|
|
4420
4438
|
shadowMode = 1 /* Synthetic */ ;
|
|
@@ -5200,7 +5218,27 @@
|
|
|
5200
5218
|
hooksAreSet = true;
|
|
5201
5219
|
setSanitizeHtmlContentHook(hooks1.sanitizeHtmlContent);
|
|
5202
5220
|
}
|
|
5203
|
-
/*
|
|
5221
|
+
/*
|
|
5222
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
5223
|
+
* All rights reserved.
|
|
5224
|
+
* SPDX-License-Identifier: MIT
|
|
5225
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
5226
|
+
*/ /**
|
|
5227
|
+
* EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
|
|
5228
|
+
* This API is subject to change or being removed.
|
|
5229
|
+
*/ function getComponentConstructor(elm) {
|
|
5230
|
+
var ctor = null;
|
|
5231
|
+
// intentionally checking for undefined due to some funky libraries patching weakmap.get
|
|
5232
|
+
// to throw when undefined.
|
|
5233
|
+
if (!isUndefined$1(elm)) {
|
|
5234
|
+
var vm = getAssociatedVMIfPresent(elm);
|
|
5235
|
+
if (!isUndefined$1(vm)) {
|
|
5236
|
+
ctor = vm.def.ctor;
|
|
5237
|
+
}
|
|
5238
|
+
}
|
|
5239
|
+
return ctor;
|
|
5240
|
+
}
|
|
5241
|
+
/* version: 2.13.3 */ /*
|
|
5204
5242
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
5205
5243
|
* All rights reserved.
|
|
5206
5244
|
* SPDX-License-Identifier: MIT
|
|
@@ -5727,24 +5765,6 @@
|
|
|
5727
5765
|
}
|
|
5728
5766
|
return element;
|
|
5729
5767
|
}
|
|
5730
|
-
/*
|
|
5731
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
5732
|
-
* All rights reserved.
|
|
5733
|
-
* SPDX-License-Identifier: MIT
|
|
5734
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
5735
|
-
*/ /**
|
|
5736
|
-
* EXPERIMENTAL: This function provides access to the component constructor, given an HTMLElement.
|
|
5737
|
-
* This API is subject to change or being removed.
|
|
5738
|
-
*/ function getComponentConstructor(elm) {
|
|
5739
|
-
var ctor = null;
|
|
5740
|
-
if (_instanceof(elm, HTMLElement)) {
|
|
5741
|
-
var vm = getAssociatedVMIfPresent(elm);
|
|
5742
|
-
if (!isUndefined$1(vm)) {
|
|
5743
|
-
ctor = vm.def.ctor;
|
|
5744
|
-
}
|
|
5745
|
-
}
|
|
5746
|
-
return ctor;
|
|
5747
|
-
}
|
|
5748
5768
|
/*
|
|
5749
5769
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
5750
5770
|
* All rights reserved.
|