lwc 2.24.0 → 2.25.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 +256 -141
- package/dist/engine-dom/iife/es2017/engine-dom.js +256 -141
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +243 -128
- package/dist/engine-dom/iife/es5/engine-dom.js +44 -12
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +42 -10
- package/dist/engine-dom/umd/es2017/engine-dom.js +256 -141
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +243 -128
- package/dist/engine-dom/umd/es5/engine-dom.js +44 -12
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +42 -10
- package/dist/engine-server/commonjs/es2017/engine-server.js +208 -122
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +208 -122
- 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
|
@@ -305,9 +305,9 @@
|
|
|
305
305
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
306
306
|
*/
|
|
307
307
|
// Increment whenever the LWC template compiler changes
|
|
308
|
-
const LWC_VERSION = "2.
|
|
308
|
+
const LWC_VERSION = "2.25.1";
|
|
309
309
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
310
|
-
/** version: 2.
|
|
310
|
+
/** version: 2.25.1 */
|
|
311
311
|
|
|
312
312
|
/**
|
|
313
313
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -389,7 +389,7 @@
|
|
|
389
389
|
patch$1(propName);
|
|
390
390
|
}
|
|
391
391
|
}
|
|
392
|
-
/** version: 2.
|
|
392
|
+
/** version: 2.25.1 */
|
|
393
393
|
|
|
394
394
|
/**
|
|
395
395
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -415,6 +415,7 @@
|
|
|
415
415
|
ENABLE_REACTIVE_SETTER: null,
|
|
416
416
|
ENABLE_WIRE_SYNC_EMIT: null,
|
|
417
417
|
ENABLE_LIGHT_GET_ROOT_NODE_PATCH: null,
|
|
418
|
+
DISABLE_LIGHT_DOM_UNSCOPED_CSS: null,
|
|
418
419
|
};
|
|
419
420
|
if (!_globalThis.lwcRuntimeFlags) {
|
|
420
421
|
Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
|
|
@@ -468,7 +469,7 @@
|
|
|
468
469
|
setFeatureFlag(name, value);
|
|
469
470
|
}
|
|
470
471
|
}
|
|
471
|
-
/** version: 2.
|
|
472
|
+
/** version: 2.25.1 */
|
|
472
473
|
|
|
473
474
|
/*
|
|
474
475
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -3465,167 +3466,270 @@
|
|
|
3465
3466
|
* SPDX-License-Identifier: MIT
|
|
3466
3467
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3467
3468
|
*/
|
|
3469
|
+
|
|
3468
3470
|
function makeHostToken(token) {
|
|
3469
|
-
|
|
3471
|
+
return `${token}-host`;
|
|
3470
3472
|
}
|
|
3473
|
+
|
|
3471
3474
|
function createInlineStyleVNode(content) {
|
|
3472
|
-
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
|
|
3477
|
-
|
|
3475
|
+
return api.h('style', {
|
|
3476
|
+
key: 'style',
|
|
3477
|
+
attrs: {
|
|
3478
|
+
type: 'text/css'
|
|
3479
|
+
}
|
|
3480
|
+
}, [api.t(content)]);
|
|
3478
3481
|
}
|
|
3482
|
+
|
|
3479
3483
|
function updateStylesheetToken(vm, template) {
|
|
3480
|
-
|
|
3481
|
-
|
|
3482
|
-
|
|
3483
|
-
|
|
3484
|
-
|
|
3485
|
-
|
|
3486
|
-
|
|
3487
|
-
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
|
|
3504
|
-
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
|
|
3509
|
-
|
|
3510
|
-
|
|
3511
|
-
|
|
3512
|
-
|
|
3513
|
-
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3484
|
+
const {
|
|
3485
|
+
elm,
|
|
3486
|
+
context,
|
|
3487
|
+
renderMode,
|
|
3488
|
+
shadowMode,
|
|
3489
|
+
renderer: {
|
|
3490
|
+
getClassList,
|
|
3491
|
+
removeAttribute,
|
|
3492
|
+
setAttribute
|
|
3493
|
+
}
|
|
3494
|
+
} = vm;
|
|
3495
|
+
const {
|
|
3496
|
+
stylesheets: newStylesheets,
|
|
3497
|
+
stylesheetToken: newStylesheetToken
|
|
3498
|
+
} = template;
|
|
3499
|
+
const isSyntheticShadow = renderMode === 1
|
|
3500
|
+
/* RenderMode.Shadow */
|
|
3501
|
+
&& shadowMode === 1
|
|
3502
|
+
/* ShadowMode.Synthetic */
|
|
3503
|
+
;
|
|
3504
|
+
const {
|
|
3505
|
+
hasScopedStyles
|
|
3506
|
+
} = context;
|
|
3507
|
+
let newToken;
|
|
3508
|
+
let newHasTokenInClass;
|
|
3509
|
+
let newHasTokenInAttribute; // Reset the styling token applied to the host element.
|
|
3510
|
+
|
|
3511
|
+
const {
|
|
3512
|
+
stylesheetToken: oldToken,
|
|
3513
|
+
hasTokenInClass: oldHasTokenInClass,
|
|
3514
|
+
hasTokenInAttribute: oldHasTokenInAttribute
|
|
3515
|
+
} = context;
|
|
3516
|
+
|
|
3517
|
+
if (!isUndefined$1(oldToken)) {
|
|
3518
|
+
if (oldHasTokenInClass) {
|
|
3519
|
+
getClassList(elm).remove(makeHostToken(oldToken));
|
|
3520
|
+
}
|
|
3521
|
+
|
|
3522
|
+
if (oldHasTokenInAttribute) {
|
|
3523
|
+
removeAttribute(elm, makeHostToken(oldToken));
|
|
3524
|
+
}
|
|
3525
|
+
} // Apply the new template styling token to the host element, if the new template has any
|
|
3526
|
+
// associated stylesheets. In the case of light DOM, also ensure there is at least one scoped stylesheet.
|
|
3527
|
+
|
|
3528
|
+
|
|
3529
|
+
if (!isUndefined$1(newStylesheets) && newStylesheets.length !== 0) {
|
|
3530
|
+
newToken = newStylesheetToken;
|
|
3531
|
+
} // Set the new styling token on the host element
|
|
3532
|
+
|
|
3533
|
+
|
|
3534
|
+
if (!isUndefined$1(newToken)) {
|
|
3535
|
+
if (hasScopedStyles) {
|
|
3536
|
+
getClassList(elm).add(makeHostToken(newToken));
|
|
3537
|
+
newHasTokenInClass = true;
|
|
3538
|
+
}
|
|
3539
|
+
|
|
3540
|
+
if (isSyntheticShadow) {
|
|
3541
|
+
setAttribute(elm, makeHostToken(newToken), '');
|
|
3542
|
+
newHasTokenInAttribute = true;
|
|
3543
|
+
}
|
|
3544
|
+
} // Update the styling tokens present on the context object.
|
|
3545
|
+
|
|
3546
|
+
|
|
3547
|
+
context.stylesheetToken = newToken;
|
|
3548
|
+
context.hasTokenInClass = newHasTokenInClass;
|
|
3549
|
+
context.hasTokenInAttribute = newHasTokenInAttribute;
|
|
3517
3550
|
}
|
|
3551
|
+
|
|
3518
3552
|
function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3553
|
+
const content = [];
|
|
3554
|
+
let root;
|
|
3555
|
+
|
|
3556
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3557
|
+
let stylesheet = stylesheets[i];
|
|
3558
|
+
|
|
3559
|
+
if (isArray$1(stylesheet)) {
|
|
3560
|
+
ArrayPush$1.apply(content, evaluateStylesheetsContent(stylesheet, stylesheetToken, vm));
|
|
3561
|
+
} else {
|
|
3562
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
3563
|
+
// Check for compiler version mismatch in dev mode only
|
|
3564
|
+
checkVersionMismatch(stylesheet, 'stylesheet'); // in dev-mode, we support hot swapping of stylesheet, which means that
|
|
3565
|
+
// the component instance might be attempting to use an old version of
|
|
3566
|
+
// the stylesheet, while internally, we have a replacement for it.
|
|
3567
|
+
|
|
3568
|
+
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
3569
|
+
}
|
|
3570
|
+
|
|
3571
|
+
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
3572
|
+
|
|
3573
|
+
if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS) {
|
|
3574
|
+
if (!isScopedCss && vm.renderMode === 0
|
|
3575
|
+
/* RenderMode.Light */
|
|
3576
|
+
) {
|
|
3577
|
+
logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
|
|
3578
|
+
continue;
|
|
3525
3579
|
}
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
3530
|
-
|
|
3531
|
-
|
|
3532
|
-
|
|
3533
|
-
|
|
3534
|
-
|
|
3535
|
-
|
|
3536
|
-
|
|
3537
|
-
|
|
3538
|
-
|
|
3539
|
-
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
|
|
3548
|
-
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
|
|
3555
|
-
|
|
3556
|
-
|
|
3557
|
-
root = getNearestShadowComponent(vm);
|
|
3558
|
-
}
|
|
3559
|
-
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
|
|
3560
|
-
}
|
|
3561
|
-
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
3580
|
+
} // Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
3581
|
+
|
|
3582
|
+
|
|
3583
|
+
const scopeToken = isScopedCss || vm.shadowMode === 1
|
|
3584
|
+
/* ShadowMode.Synthetic */
|
|
3585
|
+
&& vm.renderMode === 1
|
|
3586
|
+
/* RenderMode.Shadow */
|
|
3587
|
+
? stylesheetToken : undefined; // Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
3588
|
+
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
3589
|
+
|
|
3590
|
+
const useActualHostSelector = vm.renderMode === 0
|
|
3591
|
+
/* RenderMode.Light */
|
|
3592
|
+
? !isScopedCss : vm.shadowMode === 0
|
|
3593
|
+
/* ShadowMode.Native */
|
|
3594
|
+
; // Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
3595
|
+
// we use an attribute selector on the host to simulate :dir().
|
|
3596
|
+
|
|
3597
|
+
let useNativeDirPseudoclass;
|
|
3598
|
+
|
|
3599
|
+
if (vm.renderMode === 1
|
|
3600
|
+
/* RenderMode.Shadow */
|
|
3601
|
+
) {
|
|
3602
|
+
useNativeDirPseudoclass = vm.shadowMode === 0
|
|
3603
|
+
/* ShadowMode.Native */
|
|
3604
|
+
;
|
|
3605
|
+
} else {
|
|
3606
|
+
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
3607
|
+
// At the top level (root is null) or inside of a native shadow root, they should use `:dir()`.
|
|
3608
|
+
if (isUndefined$1(root)) {
|
|
3609
|
+
// Only calculate the root once as necessary
|
|
3610
|
+
root = getNearestShadowComponent(vm);
|
|
3562
3611
|
}
|
|
3612
|
+
|
|
3613
|
+
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0
|
|
3614
|
+
/* ShadowMode.Native */
|
|
3615
|
+
;
|
|
3616
|
+
}
|
|
3617
|
+
|
|
3618
|
+
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
3563
3619
|
}
|
|
3564
|
-
|
|
3620
|
+
}
|
|
3621
|
+
|
|
3622
|
+
return content;
|
|
3565
3623
|
}
|
|
3624
|
+
|
|
3566
3625
|
function getStylesheetsContent(vm, template) {
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3626
|
+
const {
|
|
3627
|
+
stylesheets,
|
|
3628
|
+
stylesheetToken
|
|
3629
|
+
} = template;
|
|
3630
|
+
let content = [];
|
|
3631
|
+
|
|
3632
|
+
if (!isUndefined$1(stylesheets) && stylesheets.length !== 0) {
|
|
3633
|
+
content = evaluateStylesheetsContent(stylesheets, stylesheetToken, vm);
|
|
3634
|
+
}
|
|
3635
|
+
|
|
3636
|
+
return content;
|
|
3637
|
+
} // It might be worth caching this to avoid doing the lookup repeatedly, but
|
|
3575
3638
|
// perf testing has not shown it to be a huge improvement yet:
|
|
3576
3639
|
// https://github.com/salesforce/lwc/pull/2460#discussion_r691208892
|
|
3640
|
+
|
|
3577
3641
|
function getNearestShadowComponent(vm) {
|
|
3578
|
-
|
|
3579
|
-
|
|
3580
|
-
|
|
3581
|
-
|
|
3582
|
-
|
|
3583
|
-
|
|
3642
|
+
let owner = vm;
|
|
3643
|
+
|
|
3644
|
+
while (!isNull(owner)) {
|
|
3645
|
+
if (owner.renderMode === 1
|
|
3646
|
+
/* RenderMode.Shadow */
|
|
3647
|
+
) {
|
|
3648
|
+
return owner;
|
|
3584
3649
|
}
|
|
3585
|
-
|
|
3650
|
+
|
|
3651
|
+
owner = owner.owner;
|
|
3652
|
+
}
|
|
3653
|
+
|
|
3654
|
+
return owner;
|
|
3586
3655
|
}
|
|
3587
3656
|
/**
|
|
3588
3657
|
* If the component that is currently being rendered uses scoped styles,
|
|
3589
3658
|
* this returns the unique token for that scoped stylesheet. Otherwise
|
|
3590
3659
|
* it returns null.
|
|
3591
3660
|
*/
|
|
3661
|
+
|
|
3662
|
+
|
|
3592
3663
|
function getScopeTokenClass(owner) {
|
|
3593
|
-
|
|
3594
|
-
|
|
3664
|
+
const {
|
|
3665
|
+
cmpTemplate,
|
|
3666
|
+
context
|
|
3667
|
+
} = owner;
|
|
3668
|
+
return context.hasScopedStyles && (cmpTemplate === null || cmpTemplate === void 0 ? void 0 : cmpTemplate.stylesheetToken) || null;
|
|
3595
3669
|
}
|
|
3596
|
-
|
|
3597
|
-
|
|
3598
|
-
|
|
3599
|
-
|
|
3600
|
-
|
|
3601
|
-
|
|
3670
|
+
/**
|
|
3671
|
+
* This function returns the host style token for a custom element if it
|
|
3672
|
+
* exists. Otherwise it returns null.
|
|
3673
|
+
*/
|
|
3674
|
+
|
|
3675
|
+
function getStylesheetTokenHost(vnode) {
|
|
3676
|
+
const {
|
|
3677
|
+
template: {
|
|
3678
|
+
stylesheetToken
|
|
3602
3679
|
}
|
|
3603
|
-
|
|
3680
|
+
} = getComponentInternalDef(vnode.ctor);
|
|
3681
|
+
return !isUndefined$1(stylesheetToken) ? makeHostToken(stylesheetToken) : null;
|
|
3682
|
+
}
|
|
3683
|
+
|
|
3684
|
+
function getNearestNativeShadowComponent(vm) {
|
|
3685
|
+
const owner = getNearestShadowComponent(vm);
|
|
3686
|
+
|
|
3687
|
+
if (!isNull(owner) && owner.shadowMode === 1
|
|
3688
|
+
/* ShadowMode.Synthetic */
|
|
3689
|
+
) {
|
|
3690
|
+
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
3691
|
+
// synthetic, we know we won't find a native component if we go any further.
|
|
3692
|
+
return null;
|
|
3693
|
+
}
|
|
3694
|
+
|
|
3695
|
+
return owner;
|
|
3604
3696
|
}
|
|
3697
|
+
|
|
3605
3698
|
function createStylesheet(vm, stylesheets) {
|
|
3606
|
-
|
|
3607
|
-
|
|
3608
|
-
|
|
3609
|
-
|
|
3610
|
-
|
|
3611
|
-
}
|
|
3612
|
-
else if (vm.hydrated) {
|
|
3613
|
-
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
3614
|
-
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
3615
|
-
// the first time the VM renders.
|
|
3616
|
-
// native shadow or light DOM, SSR
|
|
3617
|
-
return ArrayMap.call(stylesheets, createInlineStyleVNode);
|
|
3699
|
+
const {
|
|
3700
|
+
renderMode,
|
|
3701
|
+
shadowMode,
|
|
3702
|
+
renderer: {
|
|
3703
|
+
insertStylesheet
|
|
3618
3704
|
}
|
|
3619
|
-
|
|
3620
|
-
|
|
3621
|
-
|
|
3622
|
-
|
|
3623
|
-
|
|
3624
|
-
|
|
3625
|
-
|
|
3626
|
-
|
|
3705
|
+
} = vm;
|
|
3706
|
+
|
|
3707
|
+
if (renderMode === 1
|
|
3708
|
+
/* RenderMode.Shadow */
|
|
3709
|
+
&& shadowMode === 1
|
|
3710
|
+
/* ShadowMode.Synthetic */
|
|
3711
|
+
) {
|
|
3712
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3713
|
+
insertStylesheet(stylesheets[i]);
|
|
3714
|
+
}
|
|
3715
|
+
} else if (vm.hydrated) {
|
|
3716
|
+
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
3717
|
+
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
3718
|
+
// the first time the VM renders.
|
|
3719
|
+
// native shadow or light DOM, SSR
|
|
3720
|
+
return ArrayMap.call(stylesheets, createInlineStyleVNode);
|
|
3721
|
+
} else {
|
|
3722
|
+
// native shadow or light DOM, DOM renderer
|
|
3723
|
+
const root = getNearestNativeShadowComponent(vm); // null root means a global style
|
|
3724
|
+
|
|
3725
|
+
const target = isNull(root) ? undefined : root.shadowRoot;
|
|
3726
|
+
|
|
3727
|
+
for (let i = 0; i < stylesheets.length; i++) {
|
|
3728
|
+
insertStylesheet(stylesheets[i], target);
|
|
3627
3729
|
}
|
|
3628
|
-
|
|
3730
|
+
}
|
|
3731
|
+
|
|
3732
|
+
return null;
|
|
3629
3733
|
}
|
|
3630
3734
|
|
|
3631
3735
|
/*
|
|
@@ -3710,6 +3814,9 @@
|
|
|
3710
3814
|
function isSameVnode(vnode1, vnode2) {
|
|
3711
3815
|
return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
|
|
3712
3816
|
}
|
|
3817
|
+
function isVCustomElement(vnode) {
|
|
3818
|
+
return vnode.type === 3 /* VNodeType.CustomElement */;
|
|
3819
|
+
}
|
|
3713
3820
|
|
|
3714
3821
|
/*
|
|
3715
3822
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6995,6 +7102,7 @@
|
|
|
6995
7102
|
let { className, classMap } = data;
|
|
6996
7103
|
const { getProperty, getClassList } = renderer;
|
|
6997
7104
|
const scopedToken = getScopeTokenClass(owner);
|
|
7105
|
+
const stylesheetTokenHost = isVCustomElement(vnode) ? getStylesheetTokenHost(vnode) : null;
|
|
6998
7106
|
// Classnames for scoped CSS are added directly to the DOM during rendering,
|
|
6999
7107
|
// or to the VDOM on the server in the case of SSR. As such, these classnames
|
|
7000
7108
|
// are never present in VDOM nodes in the browser.
|
|
@@ -7003,10 +7111,17 @@
|
|
|
7003
7111
|
// are rendered during SSR. This needs to be accounted for when validating.
|
|
7004
7112
|
if (scopedToken) {
|
|
7005
7113
|
if (!isUndefined$1(className)) {
|
|
7006
|
-
className =
|
|
7114
|
+
className = isNull(stylesheetTokenHost)
|
|
7115
|
+
? `${scopedToken} ${className}`
|
|
7116
|
+
: `${scopedToken} ${className} ${stylesheetTokenHost}`;
|
|
7007
7117
|
}
|
|
7008
7118
|
else if (!isUndefined$1(classMap)) {
|
|
7009
|
-
classMap = Object.assign(Object.assign({}, classMap), { [scopedToken]: true });
|
|
7119
|
+
classMap = Object.assign(Object.assign(Object.assign({}, classMap), { [scopedToken]: true }), (isNull(stylesheetTokenHost) ? {} : { [stylesheetTokenHost]: true }));
|
|
7120
|
+
}
|
|
7121
|
+
else {
|
|
7122
|
+
className = isNull(stylesheetTokenHost)
|
|
7123
|
+
? `${scopedToken}`
|
|
7124
|
+
: `${scopedToken} ${stylesheetTokenHost}`;
|
|
7010
7125
|
}
|
|
7011
7126
|
}
|
|
7012
7127
|
let nodesAreCompatible = true;
|
|
@@ -7248,7 +7363,7 @@
|
|
|
7248
7363
|
}
|
|
7249
7364
|
return ctor;
|
|
7250
7365
|
}
|
|
7251
|
-
/* version: 2.
|
|
7366
|
+
/* version: 2.25.1 */
|
|
7252
7367
|
|
|
7253
7368
|
/*
|
|
7254
7369
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7452,7 +7567,7 @@
|
|
|
7452
7567
|
function isNull(obj) {
|
|
7453
7568
|
return obj === null;
|
|
7454
7569
|
}
|
|
7455
|
-
/** version: 2.
|
|
7570
|
+
/** version: 2.25.1 */
|
|
7456
7571
|
|
|
7457
7572
|
/*
|
|
7458
7573
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8071,7 +8186,7 @@
|
|
|
8071
8186
|
});
|
|
8072
8187
|
freeze(LightningElement);
|
|
8073
8188
|
seal(LightningElement.prototype);
|
|
8074
|
-
/* version: 2.
|
|
8189
|
+
/* version: 2.25.1 */
|
|
8075
8190
|
|
|
8076
8191
|
exports.LightningElement = LightningElement;
|
|
8077
8192
|
exports.__unstable__ProfilerControl = profilerControl;
|