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