@lwc/engine-core 2.44.0 → 2.45.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-core.cjs.js +97 -92
- package/dist/engine-core.cjs.js.map +1 -1
- package/dist/engine-core.js +99 -93
- package/dist/engine-core.js.map +1 -1
- package/package.json +4 -4
- package/types/framework/main.d.ts +0 -1
- package/types/framework/reporting.d.ts +1 -3
- package/types/framework/restrictions.d.ts +0 -1
- package/types/framework/stylesheet.d.ts +0 -5
package/dist/engine-core.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* proxy-compat-disable */
|
|
2
|
-
import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, ArrayIndexOf, ArraySplice, create, seal, isArray as isArray$1, isFunction as isFunction$1, keys, hasOwnProperty as hasOwnProperty$1, forEach, AriaPropNameToAttrNameMap, getPropertyDescriptor, defineProperties, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, assign, isObject,
|
|
2
|
+
import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, ArrayIndexOf, ArraySplice, create, seal, isArray as isArray$1, isFunction as isFunction$1, keys, hasOwnProperty as hasOwnProperty$1, forEach, AriaPropNameToAttrNameMap, getPropertyDescriptor, defineProperties, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, assign, isObject, freeze, KEY__SYNTHETIC_MODE, assert, toString as toString$1, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, isFalse, LWC_VERSION_COMMENT_REGEX, LWC_VERSION, getOwnPropertyNames as getOwnPropertyNames$1, htmlPropertyToAttribute, ArraySlice, ArrayMap, KEY__SCOPED_CSS, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, htmlAttributeToProperty, isString, StringSlice, isTrue, SVG_NAMESPACE, KEY__SHADOW_STATIC, KEY__SHADOW_RESOLVER, ArraySome, ArrayPop, isNumber, StringReplace, ArrayUnshift, globalThis as globalThis$1, KEY__NATIVE_GET_ELEMENT_BY_ID, KEY__NATIVE_QUERY_SELECTOR_ALL, ID_REFERENCING_ATTRIBUTES_SET, KEY__SHADOW_TOKEN, ArrayFilter, StringSplit, ArrayCopyWithin, ArrayFill, ArraySort, ArrayReverse, ArrayShift } from '@lwc/shared';
|
|
3
3
|
import { applyAriaReflection } from '@lwc/aria-reflection';
|
|
4
4
|
export { setFeatureFlag, setFeatureFlagForTest } from '@lwc/features';
|
|
5
5
|
|
|
@@ -528,8 +528,9 @@ function patchElementWithRestrictions(elm, options) {
|
|
|
528
528
|
get() {
|
|
529
529
|
return originalOuterHTMLDescriptor.get.call(this);
|
|
530
530
|
},
|
|
531
|
-
set(
|
|
532
|
-
|
|
531
|
+
set(value) {
|
|
532
|
+
logError(`Invalid attempt to set outerHTML on Element.`);
|
|
533
|
+
return originalOuterHTMLDescriptor.set.call(this, value);
|
|
533
534
|
},
|
|
534
535
|
}),
|
|
535
536
|
};
|
|
@@ -614,16 +615,18 @@ function getShadowRootRestrictionsDescriptors(sr) {
|
|
|
614
615
|
get() {
|
|
615
616
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
616
617
|
},
|
|
617
|
-
set(
|
|
618
|
-
|
|
618
|
+
set(value) {
|
|
619
|
+
logError(`Invalid attempt to set innerHTML on ShadowRoot.`);
|
|
620
|
+
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
619
621
|
},
|
|
620
622
|
}),
|
|
621
623
|
textContent: generateAccessorDescriptor({
|
|
622
624
|
get() {
|
|
623
625
|
return originalTextContentDescriptor.get.call(this);
|
|
624
626
|
},
|
|
625
|
-
set(
|
|
626
|
-
|
|
627
|
+
set(value) {
|
|
628
|
+
logError(`Invalid attempt to set textContent on ShadowRoot.`);
|
|
629
|
+
return originalTextContentDescriptor.set.call(this, value);
|
|
627
630
|
},
|
|
628
631
|
}),
|
|
629
632
|
addEventListener: generateDataDescriptor({
|
|
@@ -652,24 +655,27 @@ function getCustomElementRestrictionsDescriptors(elm) {
|
|
|
652
655
|
get() {
|
|
653
656
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
654
657
|
},
|
|
655
|
-
set(
|
|
656
|
-
|
|
658
|
+
set(value) {
|
|
659
|
+
logError(`Invalid attempt to set innerHTML on HTMLElement.`);
|
|
660
|
+
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
657
661
|
},
|
|
658
662
|
}),
|
|
659
663
|
outerHTML: generateAccessorDescriptor({
|
|
660
664
|
get() {
|
|
661
665
|
return originalOuterHTMLDescriptor.get.call(this);
|
|
662
666
|
},
|
|
663
|
-
set(
|
|
664
|
-
|
|
667
|
+
set(value) {
|
|
668
|
+
logError(`Invalid attempt to set outerHTML on HTMLElement.`);
|
|
669
|
+
return originalOuterHTMLDescriptor.set.call(this, value);
|
|
665
670
|
},
|
|
666
671
|
}),
|
|
667
672
|
textContent: generateAccessorDescriptor({
|
|
668
673
|
get() {
|
|
669
674
|
return originalTextContentDescriptor.get.call(this);
|
|
670
675
|
},
|
|
671
|
-
set(
|
|
672
|
-
|
|
676
|
+
set(value) {
|
|
677
|
+
logError(`Invalid attempt to set textContent on HTMLElement.`);
|
|
678
|
+
return originalTextContentDescriptor.set.call(this, value);
|
|
673
679
|
},
|
|
674
680
|
}),
|
|
675
681
|
addEventListener: generateDataDescriptor({
|
|
@@ -685,20 +691,6 @@ function getCustomElementRestrictionsDescriptors(elm) {
|
|
|
685
691
|
}),
|
|
686
692
|
};
|
|
687
693
|
}
|
|
688
|
-
function getComponentRestrictionsDescriptors() {
|
|
689
|
-
assertNotProd(); // this method should never leak to prod
|
|
690
|
-
return {
|
|
691
|
-
tagName: generateAccessorDescriptor({
|
|
692
|
-
get() {
|
|
693
|
-
throw new Error(`Usage of property \`tagName\` is disallowed because the component itself does` +
|
|
694
|
-
` not know which tagName will be used to create the element, therefore writing` +
|
|
695
|
-
` code that check for that value is error prone.`);
|
|
696
|
-
},
|
|
697
|
-
configurable: true,
|
|
698
|
-
enumerable: false, // no enumerable properties on component
|
|
699
|
-
}),
|
|
700
|
-
};
|
|
701
|
-
}
|
|
702
694
|
function getLightningElementPrototypeRestrictionsDescriptors(proto) {
|
|
703
695
|
assertNotProd(); // this method should never leak to prod
|
|
704
696
|
const originalDispatchEvent = proto.dispatchEvent;
|
|
@@ -731,9 +723,6 @@ function patchCustomElementWithRestrictions(elm) {
|
|
|
731
723
|
const elmProto = getPrototypeOf$1(elm);
|
|
732
724
|
setPrototypeOf(elm, create(elmProto, restrictionsDescriptors));
|
|
733
725
|
}
|
|
734
|
-
function patchComponentWithRestrictions(cmp) {
|
|
735
|
-
defineProperties(cmp, getComponentRestrictionsDescriptors());
|
|
736
|
-
}
|
|
737
726
|
function patchLightningElementPrototypeWithRestrictions(proto) {
|
|
738
727
|
defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
|
|
739
728
|
}
|
|
@@ -1344,16 +1333,10 @@ function markLockerLiveObject(obj) {
|
|
|
1344
1333
|
function createBridgeToElementDescriptor(propName, descriptor) {
|
|
1345
1334
|
const { get, set, enumerable, configurable } = descriptor;
|
|
1346
1335
|
if (!isFunction$1(get)) {
|
|
1347
|
-
|
|
1348
|
-
assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
|
|
1349
|
-
}
|
|
1350
|
-
throw new TypeError();
|
|
1336
|
+
throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
|
|
1351
1337
|
}
|
|
1352
1338
|
if (!isFunction$1(set)) {
|
|
1353
|
-
|
|
1354
|
-
assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
|
|
1355
|
-
}
|
|
1356
|
-
throw new TypeError();
|
|
1339
|
+
throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
|
|
1357
1340
|
}
|
|
1358
1341
|
return {
|
|
1359
1342
|
enumerable,
|
|
@@ -1373,10 +1356,18 @@ function createBridgeToElementDescriptor(propName, descriptor) {
|
|
|
1373
1356
|
const vm = getAssociatedVM(this);
|
|
1374
1357
|
if (process.env.NODE_ENV !== 'production') {
|
|
1375
1358
|
const vmBeingRendered = getVMBeingRendered();
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1359
|
+
if (isInvokingRender) {
|
|
1360
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${propName}`);
|
|
1361
|
+
}
|
|
1362
|
+
if (isUpdatingTemplate) {
|
|
1363
|
+
logError(`When updating the template of ${vmBeingRendered}, one of the accessors used by the template has side effects on the state of ${vm}.${propName}`);
|
|
1364
|
+
}
|
|
1365
|
+
if (isBeingConstructed(vm)) {
|
|
1366
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1367
|
+
}
|
|
1368
|
+
if (isObject(newValue) && !isNull(newValue)) {
|
|
1369
|
+
logError(`Invalid value "${newValue}" for "${propName}" of ${vm}. Value cannot be an object, must be a primitive value.`);
|
|
1370
|
+
}
|
|
1380
1371
|
}
|
|
1381
1372
|
updateComponentValue(vm, propName, newValue);
|
|
1382
1373
|
return set.call(vm.elm, newValue);
|
|
@@ -1429,7 +1420,6 @@ const LightningElement = function () {
|
|
|
1429
1420
|
// Adding extra guard rails in DEV mode.
|
|
1430
1421
|
if (process.env.NODE_ENV !== 'production') {
|
|
1431
1422
|
patchCustomElementWithRestrictions(elm);
|
|
1432
|
-
patchComponentWithRestrictions(component);
|
|
1433
1423
|
}
|
|
1434
1424
|
return this;
|
|
1435
1425
|
};
|
|
@@ -1465,9 +1455,15 @@ LightningElement.prototype = {
|
|
|
1465
1455
|
const { elm, renderer: { addEventListener }, } = vm;
|
|
1466
1456
|
if (process.env.NODE_ENV !== 'production') {
|
|
1467
1457
|
const vmBeingRendered = getVMBeingRendered();
|
|
1468
|
-
|
|
1469
|
-
|
|
1470
|
-
|
|
1458
|
+
if (isInvokingRender) {
|
|
1459
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm} by adding an event listener for "${type}".`);
|
|
1460
|
+
}
|
|
1461
|
+
if (isUpdatingTemplate) {
|
|
1462
|
+
logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm} by adding an event listener for "${type}".`);
|
|
1463
|
+
}
|
|
1464
|
+
if (!isFunction$1(listener)) {
|
|
1465
|
+
logError(`Invalid second argument for this.addEventListener() in ${vm} for event "${type}". Expected an EventListener but received ${listener}.`);
|
|
1466
|
+
}
|
|
1471
1467
|
}
|
|
1472
1468
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
1473
1469
|
addEventListener(elm, type, wrappedListener, options);
|
|
@@ -1517,7 +1513,9 @@ LightningElement.prototype = {
|
|
|
1517
1513
|
const vm = getAssociatedVM(this);
|
|
1518
1514
|
const { elm, renderer: { setAttribute }, } = vm;
|
|
1519
1515
|
if (process.env.NODE_ENV !== 'production') {
|
|
1520
|
-
|
|
1516
|
+
if (isBeingConstructed(vm)) {
|
|
1517
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1518
|
+
}
|
|
1521
1519
|
}
|
|
1522
1520
|
unlockAttribute(elm, name);
|
|
1523
1521
|
setAttribute(elm, name, value);
|
|
@@ -1527,7 +1525,9 @@ LightningElement.prototype = {
|
|
|
1527
1525
|
const vm = getAssociatedVM(this);
|
|
1528
1526
|
const { elm, renderer: { setAttribute }, } = vm;
|
|
1529
1527
|
if (process.env.NODE_ENV !== 'production') {
|
|
1530
|
-
|
|
1528
|
+
if (isBeingConstructed(vm)) {
|
|
1529
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1530
|
+
}
|
|
1531
1531
|
}
|
|
1532
1532
|
unlockAttribute(elm, name);
|
|
1533
1533
|
setAttribute(elm, name, value, namespace);
|
|
@@ -1550,9 +1550,9 @@ LightningElement.prototype = {
|
|
|
1550
1550
|
const vm = getAssociatedVM(this);
|
|
1551
1551
|
const { elm, renderer: { getClassList }, } = vm;
|
|
1552
1552
|
if (process.env.NODE_ENV !== 'production') {
|
|
1553
|
-
|
|
1554
|
-
|
|
1555
|
-
|
|
1553
|
+
if (isBeingConstructed(vm)) {
|
|
1554
|
+
logError(`Failed to construct ${vm}: The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead.`);
|
|
1555
|
+
}
|
|
1556
1556
|
}
|
|
1557
1557
|
return getClassList(elm);
|
|
1558
1558
|
},
|
|
@@ -2058,8 +2058,12 @@ function createPublicPropertyDescriptor(key) {
|
|
|
2058
2058
|
const vm = getAssociatedVM(this);
|
|
2059
2059
|
if (process.env.NODE_ENV !== 'production') {
|
|
2060
2060
|
const vmBeingRendered = getVMBeingRendered();
|
|
2061
|
-
|
|
2062
|
-
|
|
2061
|
+
if (isInvokingRender) {
|
|
2062
|
+
logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2063
|
+
}
|
|
2064
|
+
if (isUpdatingTemplate) {
|
|
2065
|
+
logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2066
|
+
}
|
|
2063
2067
|
}
|
|
2064
2068
|
vm.cmpProps[key] = newValue;
|
|
2065
2069
|
componentValueMutated(vm, key);
|
|
@@ -2083,14 +2087,18 @@ function createPublicAccessorDescriptor(key, descriptor) {
|
|
|
2083
2087
|
const vm = getAssociatedVM(this);
|
|
2084
2088
|
if (process.env.NODE_ENV !== 'production') {
|
|
2085
2089
|
const vmBeingRendered = getVMBeingRendered();
|
|
2086
|
-
|
|
2087
|
-
|
|
2090
|
+
if (isInvokingRender) {
|
|
2091
|
+
logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2092
|
+
}
|
|
2093
|
+
if (isUpdatingTemplate) {
|
|
2094
|
+
logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2095
|
+
}
|
|
2088
2096
|
}
|
|
2089
2097
|
if (set) {
|
|
2090
2098
|
set.call(this, newValue);
|
|
2091
2099
|
}
|
|
2092
2100
|
else if (process.env.NODE_ENV !== 'production') {
|
|
2093
|
-
|
|
2101
|
+
logError(`Invalid attempt to set a new value for property "${toString$1(key)}" that does not has a setter decorated with @api.`, vm);
|
|
2094
2102
|
}
|
|
2095
2103
|
},
|
|
2096
2104
|
enumerable,
|
|
@@ -2124,8 +2132,12 @@ function internalTrackDecorator(key) {
|
|
|
2124
2132
|
const vm = getAssociatedVM(this);
|
|
2125
2133
|
if (process.env.NODE_ENV !== 'production') {
|
|
2126
2134
|
const vmBeingRendered = getVMBeingRendered();
|
|
2127
|
-
|
|
2128
|
-
|
|
2135
|
+
if (isInvokingRender) {
|
|
2136
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2137
|
+
}
|
|
2138
|
+
if (isUpdatingTemplate) {
|
|
2139
|
+
logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2140
|
+
}
|
|
2129
2141
|
}
|
|
2130
2142
|
const reactiveOrAnyValue = getReactiveProxy(newValue);
|
|
2131
2143
|
updateComponentValue(vm, key, reactiveOrAnyValue);
|
|
@@ -2902,13 +2914,20 @@ function createComponentDef(Ctor) {
|
|
|
2902
2914
|
const ctorName = Ctor.name;
|
|
2903
2915
|
// Removing the following assert until https://bugs.webkit.org/show_bug.cgi?id=190140 is fixed.
|
|
2904
2916
|
// assert.isTrue(ctorName && isString(ctorName), `${toString(Ctor)} should have a "name" property with string value, but found ${ctorName}.`);
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2917
|
+
if (!Ctor.constructor) {
|
|
2918
|
+
// This error seems impossible to hit, due to an earlier check in `isComponentConstructor()`.
|
|
2919
|
+
// But we keep it here just in case.
|
|
2920
|
+
logError(`Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
|
|
2909
2921
|
}
|
|
2910
|
-
if (!isUndefined$1(
|
|
2911
|
-
|
|
2922
|
+
if (!isUndefined$1(ctorShadowSupportMode) &&
|
|
2923
|
+
ctorShadowSupportMode !== "any" /* ShadowSupportMode.Any */ &&
|
|
2924
|
+
ctorShadowSupportMode !== "reset" /* ShadowSupportMode.Default */) {
|
|
2925
|
+
logError(`Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
|
|
2926
|
+
}
|
|
2927
|
+
if (!isUndefined$1(ctorRenderMode) &&
|
|
2928
|
+
ctorRenderMode !== 'light' &&
|
|
2929
|
+
ctorRenderMode !== 'shadow') {
|
|
2930
|
+
logError(`Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
|
|
2912
2931
|
}
|
|
2913
2932
|
}
|
|
2914
2933
|
const decoratorsMeta = getDecoratorsMeta(Ctor);
|
|
@@ -3142,15 +3161,6 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
|
3142
3161
|
// the stylesheet, while internally, we have a replacement for it.
|
|
3143
3162
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
3144
3163
|
}
|
|
3145
|
-
// Check that this stylesheet was generated by our compiler
|
|
3146
|
-
if (!isStylesheetRegistered(stylesheet)) {
|
|
3147
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3148
|
-
logWarnOnce(`TypeError: Unexpected LWC stylesheet content found for component <${vm.tagName.toLowerCase()}>.`);
|
|
3149
|
-
}
|
|
3150
|
-
report("UnexpectedStylesheetContent" /* ReportingEventId.UnexpectedStylesheetContent */, {
|
|
3151
|
-
tagName: vm.tagName.toLowerCase(),
|
|
3152
|
-
});
|
|
3153
|
-
}
|
|
3154
3164
|
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
3155
3165
|
if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS &&
|
|
3156
3166
|
!isScopedCss &&
|
|
@@ -3271,18 +3281,6 @@ function createStylesheet(vm, stylesheets) {
|
|
|
3271
3281
|
}
|
|
3272
3282
|
return null;
|
|
3273
3283
|
}
|
|
3274
|
-
const signedStylesheetSet = new Set();
|
|
3275
|
-
/**
|
|
3276
|
-
* INTERNAL: This function can only be invoked by compiled code. The compiler
|
|
3277
|
-
* will prevent this function from being imported by userland code.
|
|
3278
|
-
*/
|
|
3279
|
-
function registerStylesheet(stylesheet) {
|
|
3280
|
-
signedStylesheetSet.add(stylesheet);
|
|
3281
|
-
return stylesheet;
|
|
3282
|
-
}
|
|
3283
|
-
function isStylesheetRegistered(stylesheet) {
|
|
3284
|
-
return signedStylesheetSet.has(stylesheet);
|
|
3285
|
-
}
|
|
3286
3284
|
|
|
3287
3285
|
/*
|
|
3288
3286
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -4711,7 +4709,7 @@ function k(compilerKey, obj) {
|
|
|
4711
4709
|
return compilerKey + ':' + obj;
|
|
4712
4710
|
case 'object':
|
|
4713
4711
|
if (process.env.NODE_ENV !== 'production') {
|
|
4714
|
-
|
|
4712
|
+
logError(`Invalid key value "${obj}" in ${getVMBeingRendered()}. Key must be a string or number.`);
|
|
4715
4713
|
}
|
|
4716
4714
|
}
|
|
4717
4715
|
}
|
|
@@ -5001,13 +4999,19 @@ function validateSlots(vm) {
|
|
|
5001
4999
|
}
|
|
5002
5000
|
}
|
|
5003
5001
|
function validateLightDomTemplate(template, vm) {
|
|
5004
|
-
|
|
5002
|
+
assertNotProd(); // should never leak to prod mode
|
|
5003
|
+
if (template === defaultEmptyTemplate) {
|
|
5005
5004
|
return;
|
|
5005
|
+
}
|
|
5006
5006
|
if (vm.renderMode === 0 /* RenderMode.Light */) {
|
|
5007
|
-
|
|
5007
|
+
if (template.renderMode !== 'light') {
|
|
5008
|
+
logError(`Light DOM components can't render shadow DOM templates. Add an 'lwc:render-mode="light"' directive to the root template tag of ${getComponentTag(vm)}.`);
|
|
5009
|
+
}
|
|
5008
5010
|
}
|
|
5009
5011
|
else {
|
|
5010
|
-
|
|
5012
|
+
if (!isUndefined$1(template.renderMode)) {
|
|
5013
|
+
logError(`Shadow DOM components template can't render light DOM templates. Either remove the 'lwc:render-mode' directive from ${getComponentTag(vm)} or set it to 'lwc:render-mode="shadow"`);
|
|
5014
|
+
}
|
|
5011
5015
|
}
|
|
5012
5016
|
}
|
|
5013
5017
|
function buildParseFragmentFn(createFragmentFn) {
|
|
@@ -5140,7 +5144,9 @@ function evaluateTemplate(vm, html) {
|
|
|
5140
5144
|
logOperationEnd(1 /* OperationId.Render */, vm);
|
|
5141
5145
|
});
|
|
5142
5146
|
if (process.env.NODE_ENV !== 'production') {
|
|
5143
|
-
|
|
5147
|
+
if (!isArray$1(vnodes)) {
|
|
5148
|
+
logError(`Compiler should produce html functions that always return an array.`);
|
|
5149
|
+
}
|
|
5144
5150
|
}
|
|
5145
5151
|
return vnodes;
|
|
5146
5152
|
}
|
|
@@ -6102,7 +6108,7 @@ function checkAndReportViolation(elm, prop, isSetter, setValue) {
|
|
|
6102
6108
|
const vm = findVM(elm);
|
|
6103
6109
|
if (process.env.NODE_ENV !== 'production') {
|
|
6104
6110
|
logWarnOnce(`Element <${elm.tagName.toLowerCase()}> ` +
|
|
6105
|
-
(isUndefined$1(vm) ? '' : `owned by <${vm.tagName.toLowerCase()}> `) +
|
|
6111
|
+
(isUndefined$1(vm) ? '' : `owned by <${vm.elm.tagName.toLowerCase()}> `) +
|
|
6106
6112
|
`uses non-standard property "${prop}". This will be removed in a future version of LWC. ` +
|
|
6107
6113
|
`See https://sfdc.co/deprecated-aria`);
|
|
6108
6114
|
}
|
|
@@ -6861,6 +6867,6 @@ function readonly(obj) {
|
|
|
6861
6867
|
return getReadOnlyProxy(obj);
|
|
6862
6868
|
}
|
|
6863
6869
|
|
|
6864
|
-
export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators,
|
|
6865
|
-
/* version: 2.
|
|
6870
|
+
export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
6871
|
+
/* version: 2.45.1 */
|
|
6866
6872
|
//# sourceMappingURL=engine-core.js.map
|