lwc 2.20.0 → 2.20.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 +235 -202
- package/dist/engine-dom/iife/es2017/engine-dom.js +235 -202
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +225 -192
- package/dist/engine-dom/iife/es5/engine-dom.js +320 -285
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +310 -274
- package/dist/engine-dom/umd/es2017/engine-dom.js +235 -202
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +225 -192
- package/dist/engine-dom/umd/es5/engine-dom.js +320 -285
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +310 -274
- package/dist/engine-server/commonjs/es2017/engine-server.js +177 -169
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +177 -169
- 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 +7 -7
|
@@ -415,9 +415,9 @@ function htmlEscape(str, attrMode = false) {
|
|
|
415
415
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
416
416
|
*/
|
|
417
417
|
// Increment whenever the LWC template compiler changes
|
|
418
|
-
const LWC_VERSION = "2.20.
|
|
418
|
+
const LWC_VERSION = "2.20.3";
|
|
419
419
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
420
|
-
/** version: 2.20.
|
|
420
|
+
/** version: 2.20.3 */
|
|
421
421
|
|
|
422
422
|
/*
|
|
423
423
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -526,7 +526,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
526
526
|
setFeatureFlag(name, value);
|
|
527
527
|
}
|
|
528
528
|
}
|
|
529
|
-
/** version: 2.20.
|
|
529
|
+
/** version: 2.20.3 */
|
|
530
530
|
|
|
531
531
|
/* proxy-compat-disable */
|
|
532
532
|
|
|
@@ -3251,6 +3251,175 @@ function getComponentDef(Ctor) {
|
|
|
3251
3251
|
};
|
|
3252
3252
|
}
|
|
3253
3253
|
|
|
3254
|
+
/*
|
|
3255
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
3256
|
+
* All rights reserved.
|
|
3257
|
+
* SPDX-License-Identifier: MIT
|
|
3258
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3259
|
+
*/
|
|
3260
|
+
function makeHostToken(token) {
|
|
3261
|
+
return `${token}-host`;
|
|
3262
|
+
}
|
|
3263
|
+
function createInlineStyleVNode(content) {
|
|
3264
|
+
return api.h('style', {
|
|
3265
|
+
key: 'style',
|
|
3266
|
+
attrs: {
|
|
3267
|
+
type: 'text/css',
|
|
3268
|
+
},
|
|
3269
|
+
}, [api.t(content)]);
|
|
3270
|
+
}
|
|
3271
|
+
function updateStylesheetToken(vm, template) {
|
|
3272
|
+
const { elm, context, renderMode, shadowMode, renderer: { getClassList, removeAttribute, setAttribute }, } = vm;
|
|
3273
|
+
const { stylesheets: newStylesheets, stylesheetToken: newStylesheetToken } = template;
|
|
3274
|
+
const isSyntheticShadow = renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */;
|
|
3275
|
+
const { hasScopedStyles } = context;
|
|
3276
|
+
let newToken;
|
|
3277
|
+
let newHasTokenInClass;
|
|
3278
|
+
let newHasTokenInAttribute;
|
|
3279
|
+
// Reset the styling token applied to the host element.
|
|
3280
|
+
const { stylesheetToken: oldToken, hasTokenInClass: oldHasTokenInClass, hasTokenInAttribute: oldHasTokenInAttribute, } = context;
|
|
3281
|
+
if (!isUndefined$1(oldToken)) {
|
|
3282
|
+
if (oldHasTokenInClass) {
|
|
3283
|
+
getClassList(elm).remove(makeHostToken(oldToken));
|
|
3284
|
+
}
|
|
3285
|
+
if (oldHasTokenInAttribute) {
|
|
3286
|
+
removeAttribute(elm, makeHostToken(oldToken));
|
|
3287
|
+
}
|
|
3288
|
+
}
|
|
3289
|
+
// Apply the new template styling token to the host element, if the new template has any
|
|
3290
|
+
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
3291
|
+
if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
|
|
3292
|
+
newToken = newStylesheetToken;
|
|
3293
|
+
}
|
|
3294
|
+
// Set the new styling token on the host element
|
|
3295
|
+
if (!isUndefined$1(newToken)) {
|
|
3296
|
+
if (hasScopedStyles) {
|
|
3297
|
+
getClassList(elm).add(makeHostToken(newToken));
|
|
3298
|
+
newHasTokenInClass = true;
|
|
3299
|
+
}
|
|
3300
|
+
if (isSyntheticShadow) {
|
|
3301
|
+
setAttribute(elm, makeHostToken(newToken), '');
|
|
3302
|
+
newHasTokenInAttribute = true;
|
|
3303
|
+
}
|
|
3304
|
+
}
|
|
3305
|
+
// Update the styling tokens present on the context object.
|
|
3306
|
+
context.stylesheetToken = newToken;
|
|
3307
|
+
context.hasTokenInClass = newHasTokenInClass;
|
|
3308
|
+
context.hasTokenInAttribute = newHasTokenInAttribute;
|
|
3309
|
+
}
|
|
3310
|
+
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
3311
|
+
const content = [];
|
|
3312
|
+
let root;
|
|
3313
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3314
|
+
let stylesheet = stylesheets[i];
|
|
3315
|
+
if (isArray$1(stylesheet)) {
|
|
3316
|
+
ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
|
|
3317
|
+
}
|
|
3318
|
+
else {
|
|
3319
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3320
|
+
// Check for compiler version mismatch in dev mode only
|
|
3321
|
+
checkVersionMismatch(stylesheet, 'stylesheet');
|
|
3322
|
+
// in dev-mode, we support hot swapping of stylesheet, which means that
|
|
3323
|
+
// the component instance might be attempting to use an old version of
|
|
3324
|
+
// the stylesheet, while internally, we have a replacement for it.
|
|
3325
|
+
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
3326
|
+
}
|
|
3327
|
+
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
3328
|
+
// Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
3329
|
+
const scopeToken = isScopedCss ||
|
|
3330
|
+
(vm.shadowMode === 1 /* ShadowMode.Synthetic */ && vm.renderMode === 1 /* RenderMode.Shadow */)
|
|
3331
|
+
? stylesheetToken
|
|
3332
|
+
: undefined;
|
|
3333
|
+
// Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
3334
|
+
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
3335
|
+
const useActualHostSelector = vm.renderMode === 0 /* RenderMode.Light */
|
|
3336
|
+
? !isScopedCss
|
|
3337
|
+
: vm.shadowMode === 0 /* ShadowMode.Native */;
|
|
3338
|
+
// Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
3339
|
+
// we use an attribute selector on the host to simulate :dir().
|
|
3340
|
+
let useNativeDirPseudoclass;
|
|
3341
|
+
if (vm.renderMode === 1 /* RenderMode.Shadow */) {
|
|
3342
|
+
useNativeDirPseudoclass = vm.shadowMode === 0 /* ShadowMode.Native */;
|
|
3343
|
+
}
|
|
3344
|
+
else {
|
|
3345
|
+
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
3346
|
+
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
3347
|
+
if (isUndefined$1(root)) {
|
|
3348
|
+
// Only calculate the root once as necessary
|
|
3349
|
+
root = getNearestShadowComponent(vm);
|
|
3350
|
+
}
|
|
3351
|
+
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
|
|
3352
|
+
}
|
|
3353
|
+
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
3354
|
+
}
|
|
3355
|
+
}
|
|
3356
|
+
return content;
|
|
3357
|
+
}
|
|
3358
|
+
function getStylesheetsContent(vm, template) {
|
|
3359
|
+
const { stylesheets, stylesheetToken } = template;
|
|
3360
|
+
let content = [];
|
|
3361
|
+
if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
|
|
3362
|
+
content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
|
|
3363
|
+
}
|
|
3364
|
+
return content;
|
|
3365
|
+
}
|
|
3366
|
+
// It might be worth caching this to avoid doing the lookup repeatedly, but
|
|
3367
|
+
// perf testing has not shown it to be a huge improvement yet:
|
|
3368
|
+
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
3369
|
+
function getNearestShadowComponent(vm) {
|
|
3370
|
+
let owner = vm;
|
|
3371
|
+
while (!isNull(owner)) {
|
|
3372
|
+
if (owner.renderMode === 1 /* RenderMode.Shadow */) {
|
|
3373
|
+
return owner;
|
|
3374
|
+
}
|
|
3375
|
+
owner = owner.owner;
|
|
3376
|
+
}
|
|
3377
|
+
return owner;
|
|
3378
|
+
}
|
|
3379
|
+
/**
|
|
3380
|
+
* If the component that is currently being rendered uses scoped styles,
|
|
3381
|
+
* this returns the unique token for that scoped stylesheet. Otherwise
|
|
3382
|
+
* it returns null.
|
|
3383
|
+
*/
|
|
3384
|
+
function getScopeTokenClass(owner) {
|
|
3385
|
+
const { cmpTemplate, context } = owner;
|
|
3386
|
+
return (context.hasScopedStyles && (cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken)) || null;
|
|
3387
|
+
}
|
|
3388
|
+
function getNearestNativeShadowComponent(vm) {
|
|
3389
|
+
const owner = getNearestShadowComponent(vm);
|
|
3390
|
+
if (!isNull(owner) && owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
3391
|
+
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
3392
|
+
// synthetic, we know we won't find a native component if we go any further.
|
|
3393
|
+
return null;
|
|
3394
|
+
}
|
|
3395
|
+
return owner;
|
|
3396
|
+
}
|
|
3397
|
+
function createStylesheet(vm, stylesheets) {
|
|
3398
|
+
const { renderMode, shadowMode, renderer: { ssr, insertStylesheet }, } = vm;
|
|
3399
|
+
if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
3400
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3401
|
+
insertStylesheet(stylesheets[i]);
|
|
3402
|
+
}
|
|
3403
|
+
}
|
|
3404
|
+
else if (ssr || vm.hydrated) {
|
|
3405
|
+
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
3406
|
+
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
3407
|
+
// the first time the VM renders.
|
|
3408
|
+
// native shadow or light DOM, SSR
|
|
3409
|
+
return ArrayMap.call(stylesheets, createInlineStyleVNode);
|
|
3410
|
+
}
|
|
3411
|
+
else {
|
|
3412
|
+
// native shadow or light DOM, DOM renderer
|
|
3413
|
+
const root = getNearestNativeShadowComponent(vm);
|
|
3414
|
+
// null root means a global style
|
|
3415
|
+
const target = isNull(root) ? undefined : root.shadowRoot;
|
|
3416
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3417
|
+
insertStylesheet(stylesheets[i], target);
|
|
3418
|
+
}
|
|
3419
|
+
}
|
|
3420
|
+
return null;
|
|
3421
|
+
}
|
|
3422
|
+
|
|
3254
3423
|
/*
|
|
3255
3424
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
3256
3425
|
* All rights reserved.
|
|
@@ -3762,10 +3931,9 @@ function setElementShadowToken(elm, token) {
|
|
|
3762
3931
|
}
|
|
3763
3932
|
// Set the scope token class for *.scoped.css styles
|
|
3764
3933
|
function setScopeTokenClassIfNecessary(elm, owner, renderer) {
|
|
3765
|
-
const
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
if (!isUndefined$1(token) && context.hasScopedStyles) {
|
|
3934
|
+
const token = getScopeTokenClass(owner);
|
|
3935
|
+
if (!isNull(token)) {
|
|
3936
|
+
const { getClassList } = renderer;
|
|
3769
3937
|
// TODO [#2762]: this dot notation with add is probably problematic
|
|
3770
3938
|
// probably we should have a renderer api for just the add operation
|
|
3771
3939
|
getClassList(elm).add(token);
|
|
@@ -4528,166 +4696,6 @@ const api = freeze({
|
|
|
4528
4696
|
shc,
|
|
4529
4697
|
});
|
|
4530
4698
|
|
|
4531
|
-
/*
|
|
4532
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
4533
|
-
* All rights reserved.
|
|
4534
|
-
* SPDX-License-Identifier: MIT
|
|
4535
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
4536
|
-
*/
|
|
4537
|
-
function makeHostToken(token) {
|
|
4538
|
-
return `${token}-host`;
|
|
4539
|
-
}
|
|
4540
|
-
function createInlineStyleVNode(content) {
|
|
4541
|
-
return api.h('style', {
|
|
4542
|
-
key: 'style',
|
|
4543
|
-
attrs: {
|
|
4544
|
-
type: 'text/css',
|
|
4545
|
-
},
|
|
4546
|
-
}, [api.t(content)]);
|
|
4547
|
-
}
|
|
4548
|
-
function updateStylesheetToken(vm, template) {
|
|
4549
|
-
const { elm, context, renderMode, shadowMode, renderer: { getClassList, removeAttribute, setAttribute }, } = vm;
|
|
4550
|
-
const { stylesheets: newStylesheets, stylesheetToken: newStylesheetToken } = template;
|
|
4551
|
-
const isSyntheticShadow = renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */;
|
|
4552
|
-
const { hasScopedStyles } = context;
|
|
4553
|
-
let newToken;
|
|
4554
|
-
let newHasTokenInClass;
|
|
4555
|
-
let newHasTokenInAttribute;
|
|
4556
|
-
// Reset the styling token applied to the host element.
|
|
4557
|
-
const { stylesheetToken: oldToken, hasTokenInClass: oldHasTokenInClass, hasTokenInAttribute: oldHasTokenInAttribute, } = context;
|
|
4558
|
-
if (!isUndefined$1(oldToken)) {
|
|
4559
|
-
if (oldHasTokenInClass) {
|
|
4560
|
-
getClassList(elm).remove(makeHostToken(oldToken));
|
|
4561
|
-
}
|
|
4562
|
-
if (oldHasTokenInAttribute) {
|
|
4563
|
-
removeAttribute(elm, makeHostToken(oldToken));
|
|
4564
|
-
}
|
|
4565
|
-
}
|
|
4566
|
-
// Apply the new template styling token to the host element, if the new template has any
|
|
4567
|
-
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
4568
|
-
if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
|
|
4569
|
-
newToken = newStylesheetToken;
|
|
4570
|
-
}
|
|
4571
|
-
// Set the new styling token on the host element
|
|
4572
|
-
if (!isUndefined$1(newToken)) {
|
|
4573
|
-
if (hasScopedStyles) {
|
|
4574
|
-
getClassList(elm).add(makeHostToken(newToken));
|
|
4575
|
-
newHasTokenInClass = true;
|
|
4576
|
-
}
|
|
4577
|
-
if (isSyntheticShadow) {
|
|
4578
|
-
setAttribute(elm, makeHostToken(newToken), '');
|
|
4579
|
-
newHasTokenInAttribute = true;
|
|
4580
|
-
}
|
|
4581
|
-
}
|
|
4582
|
-
// Update the styling tokens present on the context object.
|
|
4583
|
-
context.stylesheetToken = newToken;
|
|
4584
|
-
context.hasTokenInClass = newHasTokenInClass;
|
|
4585
|
-
context.hasTokenInAttribute = newHasTokenInAttribute;
|
|
4586
|
-
}
|
|
4587
|
-
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
4588
|
-
const content = [];
|
|
4589
|
-
let root;
|
|
4590
|
-
for (let i = 0; i < stylesheets.length; i++) {
|
|
4591
|
-
let stylesheet = stylesheets[i];
|
|
4592
|
-
if (isArray$1(stylesheet)) {
|
|
4593
|
-
ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
|
|
4594
|
-
}
|
|
4595
|
-
else {
|
|
4596
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4597
|
-
// Check for compiler version mismatch in dev mode only
|
|
4598
|
-
checkVersionMismatch(stylesheet, 'stylesheet');
|
|
4599
|
-
// in dev-mode, we support hot swapping of stylesheet, which means that
|
|
4600
|
-
// the component instance might be attempting to use an old version of
|
|
4601
|
-
// the stylesheet, while internally, we have a replacement for it.
|
|
4602
|
-
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
4603
|
-
}
|
|
4604
|
-
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
4605
|
-
// Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
4606
|
-
const scopeToken = isScopedCss ||
|
|
4607
|
-
(vm.shadowMode === 1 /* ShadowMode.Synthetic */ && vm.renderMode === 1 /* RenderMode.Shadow */)
|
|
4608
|
-
? stylesheetToken
|
|
4609
|
-
: undefined;
|
|
4610
|
-
// Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
4611
|
-
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
4612
|
-
const useActualHostSelector = vm.renderMode === 0 /* RenderMode.Light */
|
|
4613
|
-
? !isScopedCss
|
|
4614
|
-
: vm.shadowMode === 0 /* ShadowMode.Native */;
|
|
4615
|
-
// Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
4616
|
-
// we use an attribute selector on the host to simulate :dir().
|
|
4617
|
-
let useNativeDirPseudoclass;
|
|
4618
|
-
if (vm.renderMode === 1 /* RenderMode.Shadow */) {
|
|
4619
|
-
useNativeDirPseudoclass = vm.shadowMode === 0 /* ShadowMode.Native */;
|
|
4620
|
-
}
|
|
4621
|
-
else {
|
|
4622
|
-
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
4623
|
-
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
4624
|
-
if (isUndefined$1(root)) {
|
|
4625
|
-
// Only calculate the root once as necessary
|
|
4626
|
-
root = getNearestShadowComponent(vm);
|
|
4627
|
-
}
|
|
4628
|
-
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
|
|
4629
|
-
}
|
|
4630
|
-
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
4631
|
-
}
|
|
4632
|
-
}
|
|
4633
|
-
return content;
|
|
4634
|
-
}
|
|
4635
|
-
function getStylesheetsContent(vm, template) {
|
|
4636
|
-
const { stylesheets, stylesheetToken } = template;
|
|
4637
|
-
let content = [];
|
|
4638
|
-
if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
|
|
4639
|
-
content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
|
|
4640
|
-
}
|
|
4641
|
-
return content;
|
|
4642
|
-
}
|
|
4643
|
-
// It might be worth caching this to avoid doing the lookup repeatedly, but
|
|
4644
|
-
// perf testing has not shown it to be a huge improvement yet:
|
|
4645
|
-
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
4646
|
-
function getNearestShadowComponent(vm) {
|
|
4647
|
-
let owner = vm;
|
|
4648
|
-
while (!isNull(owner)) {
|
|
4649
|
-
if (owner.renderMode === 1 /* RenderMode.Shadow */) {
|
|
4650
|
-
return owner;
|
|
4651
|
-
}
|
|
4652
|
-
owner = owner.owner;
|
|
4653
|
-
}
|
|
4654
|
-
return owner;
|
|
4655
|
-
}
|
|
4656
|
-
function getNearestNativeShadowComponent(vm) {
|
|
4657
|
-
const owner = getNearestShadowComponent(vm);
|
|
4658
|
-
if (!isNull(owner) && owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
4659
|
-
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
4660
|
-
// synthetic, we know we won't find a native component if we go any further.
|
|
4661
|
-
return null;
|
|
4662
|
-
}
|
|
4663
|
-
return owner;
|
|
4664
|
-
}
|
|
4665
|
-
function createStylesheet(vm, stylesheets) {
|
|
4666
|
-
const { renderMode, shadowMode, renderer: { ssr, insertStylesheet }, } = vm;
|
|
4667
|
-
if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
4668
|
-
for (let i = 0; i < stylesheets.length; i++) {
|
|
4669
|
-
insertStylesheet(stylesheets[i]);
|
|
4670
|
-
}
|
|
4671
|
-
}
|
|
4672
|
-
else if (ssr || vm.hydrated) {
|
|
4673
|
-
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
4674
|
-
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
4675
|
-
// the first time the VM renders.
|
|
4676
|
-
// native shadow or light DOM, SSR
|
|
4677
|
-
return ArrayMap.call(stylesheets, createInlineStyleVNode);
|
|
4678
|
-
}
|
|
4679
|
-
else {
|
|
4680
|
-
// native shadow or light DOM, DOM renderer
|
|
4681
|
-
const root = getNearestNativeShadowComponent(vm);
|
|
4682
|
-
// null root means a global style
|
|
4683
|
-
const target = isNull(root) ? undefined : root.shadowRoot;
|
|
4684
|
-
for (let i = 0; i < stylesheets.length; i++) {
|
|
4685
|
-
insertStylesheet(stylesheets[i], target);
|
|
4686
|
-
}
|
|
4687
|
-
}
|
|
4688
|
-
return null;
|
|
4689
|
-
}
|
|
4690
|
-
|
|
4691
4699
|
/*
|
|
4692
4700
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
4693
4701
|
* All rights reserved.
|
|
@@ -6269,7 +6277,7 @@ function freezeTemplate(tmpl) {
|
|
|
6269
6277
|
});
|
|
6270
6278
|
}
|
|
6271
6279
|
}
|
|
6272
|
-
/* version: 2.20.
|
|
6280
|
+
/* version: 2.20.3 */
|
|
6273
6281
|
|
|
6274
6282
|
/*
|
|
6275
6283
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -6731,6 +6739,6 @@ function renderComponent(tagName, Ctor, props = {}) {
|
|
|
6731
6739
|
*/
|
|
6732
6740
|
freeze(LightningElement);
|
|
6733
6741
|
seal(LightningElement.prototype);
|
|
6734
|
-
/* version: 2.20.
|
|
6742
|
+
/* version: 2.20.3 */
|
|
6735
6743
|
|
|
6736
6744
|
export { LightningElement, api$1 as api, createContextProvider, freezeTemplate, getComponentDef, isComponentConstructor, parseFragment, parseFragment as parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderComponent, renderer, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, track, unwrap, wire };
|
|
@@ -148,7 +148,7 @@ const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
|
148
148
|
// We use this to detect symbol support in order to avoid the expensive symbol polyfill. Note that
|
|
149
149
|
// we can't use typeof since it will fail when transpiling.
|
|
150
150
|
const hasNativeSymbolSupport = /*@__PURE__*/ (() => Symbol('x').toString() === 'Symbol(x)')();
|
|
151
|
-
/** version: 2.20.
|
|
151
|
+
/** version: 2.20.3 */
|
|
152
152
|
|
|
153
153
|
/*
|
|
154
154
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1124,7 +1124,7 @@ if (!_globalThis.lwcRuntimeFlags) {
|
|
|
1124
1124
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
1125
1125
|
}
|
|
1126
1126
|
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1127
|
-
/** version: 2.20.
|
|
1127
|
+
/** version: 2.20.3 */
|
|
1128
1128
|
|
|
1129
1129
|
/*
|
|
1130
1130
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5111,4 +5111,4 @@ if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
|
|
|
5111
5111
|
}));
|
|
5112
5112
|
});
|
|
5113
5113
|
}
|
|
5114
|
-
/** version: 2.20.
|
|
5114
|
+
/** version: 2.20.3 */
|
|
@@ -151,7 +151,7 @@
|
|
|
151
151
|
// We use this to detect symbol support in order to avoid the expensive symbol polyfill. Note that
|
|
152
152
|
// we can't use typeof since it will fail when transpiling.
|
|
153
153
|
const hasNativeSymbolSupport = /*@__PURE__*/ (() => Symbol('x').toString() === 'Symbol(x)')();
|
|
154
|
-
/** version: 2.20.
|
|
154
|
+
/** version: 2.20.3 */
|
|
155
155
|
|
|
156
156
|
/*
|
|
157
157
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1127,7 +1127,7 @@
|
|
|
1127
1127
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
1128
1128
|
}
|
|
1129
1129
|
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1130
|
-
/** version: 2.20.
|
|
1130
|
+
/** version: 2.20.3 */
|
|
1131
1131
|
|
|
1132
1132
|
/*
|
|
1133
1133
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5114,6 +5114,6 @@
|
|
|
5114
5114
|
}));
|
|
5115
5115
|
});
|
|
5116
5116
|
}
|
|
5117
|
-
/** version: 2.20.
|
|
5117
|
+
/** version: 2.20.3 */
|
|
5118
5118
|
|
|
5119
5119
|
})();
|
|
@@ -87,7 +87,7 @@
|
|
|
87
87
|
const KEY__SHADOW_TOKEN = '$shadowToken$';
|
|
88
88
|
const KEY__SHADOW_TOKEN_PRIVATE = '$$ShadowTokenKey$$';
|
|
89
89
|
const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
90
|
-
/** version: 2.20.
|
|
90
|
+
/** version: 2.20.3 */
|
|
91
91
|
|
|
92
92
|
/*
|
|
93
93
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1049,7 +1049,7 @@
|
|
|
1049
1049
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
1050
1050
|
}
|
|
1051
1051
|
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1052
|
-
/** version: 2.20.
|
|
1052
|
+
/** version: 2.20.3 */
|
|
1053
1053
|
|
|
1054
1054
|
/*
|
|
1055
1055
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -4911,6 +4911,6 @@
|
|
|
4911
4911
|
},
|
|
4912
4912
|
configurable: true,
|
|
4913
4913
|
});
|
|
4914
|
-
/** version: 2.20.
|
|
4914
|
+
/** version: 2.20.3 */
|
|
4915
4915
|
|
|
4916
4916
|
})();
|
|
@@ -199,7 +199,7 @@
|
|
|
199
199
|
var hasNativeSymbolSupport = /*@__PURE__*/function () {
|
|
200
200
|
return Symbol('x').toString() === 'Symbol(x)';
|
|
201
201
|
}();
|
|
202
|
-
/** version: 2.20.
|
|
202
|
+
/** version: 2.20.3 */
|
|
203
203
|
|
|
204
204
|
/*
|
|
205
205
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1300,7 +1300,7 @@
|
|
|
1300
1300
|
}
|
|
1301
1301
|
|
|
1302
1302
|
var runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1303
|
-
/** version: 2.20.
|
|
1303
|
+
/** version: 2.20.3 */
|
|
1304
1304
|
|
|
1305
1305
|
/*
|
|
1306
1306
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5661,6 +5661,6 @@
|
|
|
5661
5661
|
}));
|
|
5662
5662
|
});
|
|
5663
5663
|
}
|
|
5664
|
-
/** version: 2.20.
|
|
5664
|
+
/** version: 2.20.3 */
|
|
5665
5665
|
|
|
5666
5666
|
})();
|
|
@@ -123,7 +123,7 @@
|
|
|
123
123
|
var KEY__SHADOW_TOKEN = '$shadowToken$';
|
|
124
124
|
var KEY__SHADOW_TOKEN_PRIVATE = '$$ShadowTokenKey$$';
|
|
125
125
|
var KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
126
|
-
/** version: 2.20.
|
|
126
|
+
/** version: 2.20.3 */
|
|
127
127
|
|
|
128
128
|
/*
|
|
129
129
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1209,7 +1209,7 @@
|
|
|
1209
1209
|
}
|
|
1210
1210
|
|
|
1211
1211
|
var runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1212
|
-
/** version: 2.20.
|
|
1212
|
+
/** version: 2.20.3 */
|
|
1213
1213
|
|
|
1214
1214
|
/*
|
|
1215
1215
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5441,6 +5441,6 @@
|
|
|
5441
5441
|
},
|
|
5442
5442
|
configurable: true
|
|
5443
5443
|
});
|
|
5444
|
-
/** version: 2.20.
|
|
5444
|
+
/** version: 2.20.3 */
|
|
5445
5445
|
|
|
5446
5446
|
})();
|
|
@@ -153,7 +153,7 @@
|
|
|
153
153
|
// We use this to detect symbol support in order to avoid the expensive symbol polyfill. Note that
|
|
154
154
|
// we can't use typeof since it will fail when transpiling.
|
|
155
155
|
const hasNativeSymbolSupport = /*@__PURE__*/ (() => Symbol('x').toString() === 'Symbol(x)')();
|
|
156
|
-
/** version: 2.20.
|
|
156
|
+
/** version: 2.20.3 */
|
|
157
157
|
|
|
158
158
|
/*
|
|
159
159
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1129,7 +1129,7 @@
|
|
|
1129
1129
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
1130
1130
|
}
|
|
1131
1131
|
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1132
|
-
/** version: 2.20.
|
|
1132
|
+
/** version: 2.20.3 */
|
|
1133
1133
|
|
|
1134
1134
|
/*
|
|
1135
1135
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5116,6 +5116,6 @@
|
|
|
5116
5116
|
}));
|
|
5117
5117
|
});
|
|
5118
5118
|
}
|
|
5119
|
-
/** version: 2.20.
|
|
5119
|
+
/** version: 2.20.3 */
|
|
5120
5120
|
|
|
5121
5121
|
}));
|
|
@@ -89,7 +89,7 @@
|
|
|
89
89
|
const KEY__SHADOW_TOKEN = '$shadowToken$';
|
|
90
90
|
const KEY__SHADOW_TOKEN_PRIVATE = '$$ShadowTokenKey$$';
|
|
91
91
|
const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
92
|
-
/** version: 2.20.
|
|
92
|
+
/** version: 2.20.3 */
|
|
93
93
|
|
|
94
94
|
/*
|
|
95
95
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1051,7 +1051,7 @@
|
|
|
1051
1051
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
1052
1052
|
}
|
|
1053
1053
|
const runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1054
|
-
/** version: 2.20.
|
|
1054
|
+
/** version: 2.20.3 */
|
|
1055
1055
|
|
|
1056
1056
|
/*
|
|
1057
1057
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -4913,6 +4913,6 @@
|
|
|
4913
4913
|
},
|
|
4914
4914
|
configurable: true,
|
|
4915
4915
|
});
|
|
4916
|
-
/** version: 2.20.
|
|
4916
|
+
/** version: 2.20.3 */
|
|
4917
4917
|
|
|
4918
4918
|
}));
|
|
@@ -201,7 +201,7 @@
|
|
|
201
201
|
var hasNativeSymbolSupport = /*@__PURE__*/function () {
|
|
202
202
|
return Symbol('x').toString() === 'Symbol(x)';
|
|
203
203
|
}();
|
|
204
|
-
/** version: 2.20.
|
|
204
|
+
/** version: 2.20.3 */
|
|
205
205
|
|
|
206
206
|
/*
|
|
207
207
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1302,7 +1302,7 @@
|
|
|
1302
1302
|
}
|
|
1303
1303
|
|
|
1304
1304
|
var runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1305
|
-
/** version: 2.20.
|
|
1305
|
+
/** version: 2.20.3 */
|
|
1306
1306
|
|
|
1307
1307
|
/*
|
|
1308
1308
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5663,6 +5663,6 @@
|
|
|
5663
5663
|
}));
|
|
5664
5664
|
});
|
|
5665
5665
|
}
|
|
5666
|
-
/** version: 2.20.
|
|
5666
|
+
/** version: 2.20.3 */
|
|
5667
5667
|
|
|
5668
5668
|
}));
|
|
@@ -125,7 +125,7 @@
|
|
|
125
125
|
var KEY__SHADOW_TOKEN = '$shadowToken$';
|
|
126
126
|
var KEY__SHADOW_TOKEN_PRIVATE = '$$ShadowTokenKey$$';
|
|
127
127
|
var KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
|
|
128
|
-
/** version: 2.20.
|
|
128
|
+
/** version: 2.20.3 */
|
|
129
129
|
|
|
130
130
|
/*
|
|
131
131
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1211,7 +1211,7 @@
|
|
|
1211
1211
|
}
|
|
1212
1212
|
|
|
1213
1213
|
var runtimeFlags = _globalThis.lwcRuntimeFlags;
|
|
1214
|
-
/** version: 2.20.
|
|
1214
|
+
/** version: 2.20.3 */
|
|
1215
1215
|
|
|
1216
1216
|
/*
|
|
1217
1217
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5443,6 +5443,6 @@
|
|
|
5443
5443
|
},
|
|
5444
5444
|
configurable: true
|
|
5445
5445
|
});
|
|
5446
|
-
/** version: 2.20.
|
|
5446
|
+
/** version: 2.20.3 */
|
|
5447
5447
|
|
|
5448
5448
|
}));
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
function isUndefined(obj) {
|
|
8
8
|
return obj === undefined;
|
|
9
9
|
}
|
|
10
|
-
/** version: 2.20.
|
|
10
|
+
/** version: 2.20.3 */
|
|
11
11
|
|
|
12
12
|
/*
|
|
13
13
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -181,6 +181,6 @@ class LegacyWireAdapterBridge {
|
|
|
181
181
|
forEach.call(this.disconnecting, (listener) => listener.call(undefined));
|
|
182
182
|
}
|
|
183
183
|
}
|
|
184
|
-
/** version: 2.20.
|
|
184
|
+
/** version: 2.20.3 */
|
|
185
185
|
|
|
186
186
|
export { ValueChangedEvent, register, registerWireService };
|
|
@@ -10,7 +10,7 @@ var WireService = (function (exports) {
|
|
|
10
10
|
function isUndefined(obj) {
|
|
11
11
|
return obj === undefined;
|
|
12
12
|
}
|
|
13
|
-
/** version: 2.20.
|
|
13
|
+
/** version: 2.20.3 */
|
|
14
14
|
|
|
15
15
|
/*
|
|
16
16
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -184,7 +184,7 @@ var WireService = (function (exports) {
|
|
|
184
184
|
forEach.call(this.disconnecting, (listener) => listener.call(undefined));
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
/** version: 2.20.
|
|
187
|
+
/** version: 2.20.3 */
|
|
188
188
|
|
|
189
189
|
exports.ValueChangedEvent = ValueChangedEvent;
|
|
190
190
|
exports.register = register;
|
|
@@ -10,7 +10,7 @@ var WireService = (function (exports) {
|
|
|
10
10
|
function isUndefined(obj) {
|
|
11
11
|
return obj === undefined;
|
|
12
12
|
}
|
|
13
|
-
/** version: 2.20.
|
|
13
|
+
/** version: 2.20.3 */
|
|
14
14
|
|
|
15
15
|
/*
|
|
16
16
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -184,7 +184,7 @@ var WireService = (function (exports) {
|
|
|
184
184
|
forEach.call(this.disconnecting, (listener) => listener.call(undefined));
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
|
-
/** version: 2.20.
|
|
187
|
+
/** version: 2.20.3 */
|
|
188
188
|
|
|
189
189
|
exports.ValueChangedEvent = ValueChangedEvent;
|
|
190
190
|
exports.register = register;
|