lwc 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-dom/esm/es2017/engine-dom.js +104 -98
- package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom.js +103 -98
- package/dist/engine-dom/iife/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +16 -29
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/iife/es5/engine-dom.js +100 -96
- package/dist/engine-dom/iife/es5/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +17 -29
- package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom.js +103 -98
- package/dist/engine-dom/umd/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +16 -29
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es5/engine-dom.js +100 -96
- package/dist/engine-dom/umd/es5/engine-dom.js.map +1 -1
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +17 -29
- package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-server/commonjs/es2017/engine-server.js +101 -103
- package/dist/engine-server/commonjs/es2017/engine-server.js.map +1 -1
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +102 -103
- package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -1
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js.map +1 -1
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -1
- package/dist/wire-service/iife/es5/wire-service.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js.map +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -1
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service.js.map +1 -1
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -1
- package/dist/wire-service/umd/es5/wire-service.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js.map +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
- package/package.json +7 -7
|
@@ -466,9 +466,9 @@ function htmlEscape(str, attrMode = false) {
|
|
|
466
466
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
467
467
|
*/
|
|
468
468
|
// Increment whenever the LWC template compiler changes
|
|
469
|
-
const LWC_VERSION = "2.
|
|
469
|
+
const LWC_VERSION = "2.45.1";
|
|
470
470
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
471
|
-
/** version: 2.
|
|
471
|
+
/** version: 2.45.1 */
|
|
472
472
|
|
|
473
473
|
/**
|
|
474
474
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -546,7 +546,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
546
546
|
setFeatureFlag(name, value);
|
|
547
547
|
}
|
|
548
548
|
}
|
|
549
|
-
/** version: 2.
|
|
549
|
+
/** version: 2.45.1 */
|
|
550
550
|
|
|
551
551
|
/*
|
|
552
552
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -642,16 +642,9 @@ function applyAriaReflection(prototype = Element.prototype) {
|
|
|
642
642
|
}
|
|
643
643
|
}
|
|
644
644
|
}
|
|
645
|
-
/** version: 2.
|
|
645
|
+
/** version: 2.45.1 */
|
|
646
646
|
|
|
647
647
|
/* proxy-compat-disable */
|
|
648
|
-
/**
|
|
649
|
-
* Report to the current dispatcher, if there is one.
|
|
650
|
-
* @param reportingEventId
|
|
651
|
-
* @param payload - data to report
|
|
652
|
-
*/
|
|
653
|
-
function report(reportingEventId, payload) {
|
|
654
|
-
}
|
|
655
648
|
|
|
656
649
|
/*
|
|
657
650
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -962,8 +955,9 @@ function patchElementWithRestrictions(elm, options) {
|
|
|
962
955
|
get() {
|
|
963
956
|
return originalOuterHTMLDescriptor.get.call(this);
|
|
964
957
|
},
|
|
965
|
-
set(
|
|
966
|
-
|
|
958
|
+
set(value) {
|
|
959
|
+
logError(`Invalid attempt to set outerHTML on Element.`);
|
|
960
|
+
return originalOuterHTMLDescriptor.set.call(this, value);
|
|
967
961
|
},
|
|
968
962
|
}),
|
|
969
963
|
};
|
|
@@ -1048,16 +1042,18 @@ function getShadowRootRestrictionsDescriptors(sr) {
|
|
|
1048
1042
|
get() {
|
|
1049
1043
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
1050
1044
|
},
|
|
1051
|
-
set(
|
|
1052
|
-
|
|
1045
|
+
set(value) {
|
|
1046
|
+
logError(`Invalid attempt to set innerHTML on ShadowRoot.`);
|
|
1047
|
+
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
1053
1048
|
},
|
|
1054
1049
|
}),
|
|
1055
1050
|
textContent: generateAccessorDescriptor({
|
|
1056
1051
|
get() {
|
|
1057
1052
|
return originalTextContentDescriptor.get.call(this);
|
|
1058
1053
|
},
|
|
1059
|
-
set(
|
|
1060
|
-
|
|
1054
|
+
set(value) {
|
|
1055
|
+
logError(`Invalid attempt to set textContent on ShadowRoot.`);
|
|
1056
|
+
return originalTextContentDescriptor.set.call(this, value);
|
|
1061
1057
|
},
|
|
1062
1058
|
}),
|
|
1063
1059
|
addEventListener: generateDataDescriptor({
|
|
@@ -1086,24 +1082,27 @@ function getCustomElementRestrictionsDescriptors(elm) {
|
|
|
1086
1082
|
get() {
|
|
1087
1083
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
1088
1084
|
},
|
|
1089
|
-
set(
|
|
1090
|
-
|
|
1085
|
+
set(value) {
|
|
1086
|
+
logError(`Invalid attempt to set innerHTML on HTMLElement.`);
|
|
1087
|
+
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
1091
1088
|
},
|
|
1092
1089
|
}),
|
|
1093
1090
|
outerHTML: generateAccessorDescriptor({
|
|
1094
1091
|
get() {
|
|
1095
1092
|
return originalOuterHTMLDescriptor.get.call(this);
|
|
1096
1093
|
},
|
|
1097
|
-
set(
|
|
1098
|
-
|
|
1094
|
+
set(value) {
|
|
1095
|
+
logError(`Invalid attempt to set outerHTML on HTMLElement.`);
|
|
1096
|
+
return originalOuterHTMLDescriptor.set.call(this, value);
|
|
1099
1097
|
},
|
|
1100
1098
|
}),
|
|
1101
1099
|
textContent: generateAccessorDescriptor({
|
|
1102
1100
|
get() {
|
|
1103
1101
|
return originalTextContentDescriptor.get.call(this);
|
|
1104
1102
|
},
|
|
1105
|
-
set(
|
|
1106
|
-
|
|
1103
|
+
set(value) {
|
|
1104
|
+
logError(`Invalid attempt to set textContent on HTMLElement.`);
|
|
1105
|
+
return originalTextContentDescriptor.set.call(this, value);
|
|
1107
1106
|
},
|
|
1108
1107
|
}),
|
|
1109
1108
|
addEventListener: generateDataDescriptor({
|
|
@@ -1119,20 +1118,6 @@ function getCustomElementRestrictionsDescriptors(elm) {
|
|
|
1119
1118
|
}),
|
|
1120
1119
|
};
|
|
1121
1120
|
}
|
|
1122
|
-
function getComponentRestrictionsDescriptors() {
|
|
1123
|
-
assertNotProd(); // this method should never leak to prod
|
|
1124
|
-
return {
|
|
1125
|
-
tagName: generateAccessorDescriptor({
|
|
1126
|
-
get() {
|
|
1127
|
-
throw new Error(`Usage of property \`tagName\` is disallowed because the component itself does` +
|
|
1128
|
-
` not know which tagName will be used to create the element, therefore writing` +
|
|
1129
|
-
` code that check for that value is error prone.`);
|
|
1130
|
-
},
|
|
1131
|
-
configurable: true,
|
|
1132
|
-
enumerable: false, // no enumerable properties on component
|
|
1133
|
-
}),
|
|
1134
|
-
};
|
|
1135
|
-
}
|
|
1136
1121
|
function getLightningElementPrototypeRestrictionsDescriptors(proto) {
|
|
1137
1122
|
assertNotProd(); // this method should never leak to prod
|
|
1138
1123
|
const originalDispatchEvent = proto.dispatchEvent;
|
|
@@ -1165,9 +1150,6 @@ function patchCustomElementWithRestrictions(elm) {
|
|
|
1165
1150
|
const elmProto = getPrototypeOf$1(elm);
|
|
1166
1151
|
setPrototypeOf(elm, create(elmProto, restrictionsDescriptors));
|
|
1167
1152
|
}
|
|
1168
|
-
function patchComponentWithRestrictions(cmp) {
|
|
1169
|
-
defineProperties(cmp, getComponentRestrictionsDescriptors());
|
|
1170
|
-
}
|
|
1171
1153
|
function patchLightningElementPrototypeWithRestrictions(proto) {
|
|
1172
1154
|
defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
|
|
1173
1155
|
}
|
|
@@ -1770,16 +1752,10 @@ function getReactiveProxy(value) {
|
|
|
1770
1752
|
function createBridgeToElementDescriptor(propName, descriptor) {
|
|
1771
1753
|
const { get, set, enumerable, configurable } = descriptor;
|
|
1772
1754
|
if (!isFunction$1(get)) {
|
|
1773
|
-
|
|
1774
|
-
assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
|
|
1775
|
-
}
|
|
1776
|
-
throw new TypeError();
|
|
1755
|
+
throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
|
|
1777
1756
|
}
|
|
1778
1757
|
if (!isFunction$1(set)) {
|
|
1779
|
-
|
|
1780
|
-
assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
|
|
1781
|
-
}
|
|
1782
|
-
throw new TypeError();
|
|
1758
|
+
throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
|
|
1783
1759
|
}
|
|
1784
1760
|
return {
|
|
1785
1761
|
enumerable,
|
|
@@ -1798,10 +1774,18 @@ function createBridgeToElementDescriptor(propName, descriptor) {
|
|
|
1798
1774
|
const vm = getAssociatedVM(this);
|
|
1799
1775
|
if (process.env.NODE_ENV !== 'production') {
|
|
1800
1776
|
const vmBeingRendered = getVMBeingRendered();
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1777
|
+
if (isInvokingRender) {
|
|
1778
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${propName}`);
|
|
1779
|
+
}
|
|
1780
|
+
if (isUpdatingTemplate) {
|
|
1781
|
+
logError(`When updating the template of ${vmBeingRendered}, one of the accessors used by the template has side effects on the state of ${vm}.${propName}`);
|
|
1782
|
+
}
|
|
1783
|
+
if (isBeingConstructed(vm)) {
|
|
1784
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1785
|
+
}
|
|
1786
|
+
if (isObject(newValue) && !isNull(newValue)) {
|
|
1787
|
+
logError(`Invalid value "${newValue}" for "${propName}" of ${vm}. Value cannot be an object, must be a primitive value.`);
|
|
1788
|
+
}
|
|
1805
1789
|
}
|
|
1806
1790
|
updateComponentValue(vm, propName, newValue);
|
|
1807
1791
|
return set.call(vm.elm, newValue);
|
|
@@ -1853,7 +1837,6 @@ const LightningElement = function () {
|
|
|
1853
1837
|
// Adding extra guard rails in DEV mode.
|
|
1854
1838
|
if (process.env.NODE_ENV !== 'production') {
|
|
1855
1839
|
patchCustomElementWithRestrictions(elm);
|
|
1856
|
-
patchComponentWithRestrictions(component);
|
|
1857
1840
|
}
|
|
1858
1841
|
return this;
|
|
1859
1842
|
};
|
|
@@ -1889,9 +1872,15 @@ LightningElement.prototype = {
|
|
|
1889
1872
|
const { elm, renderer: { addEventListener }, } = vm;
|
|
1890
1873
|
if (process.env.NODE_ENV !== 'production') {
|
|
1891
1874
|
const vmBeingRendered = getVMBeingRendered();
|
|
1892
|
-
|
|
1893
|
-
|
|
1894
|
-
|
|
1875
|
+
if (isInvokingRender) {
|
|
1876
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm} by adding an event listener for "${type}".`);
|
|
1877
|
+
}
|
|
1878
|
+
if (isUpdatingTemplate) {
|
|
1879
|
+
logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm} by adding an event listener for "${type}".`);
|
|
1880
|
+
}
|
|
1881
|
+
if (!isFunction$1(listener)) {
|
|
1882
|
+
logError(`Invalid second argument for this.addEventListener() in ${vm} for event "${type}". Expected an EventListener but received ${listener}.`);
|
|
1883
|
+
}
|
|
1895
1884
|
}
|
|
1896
1885
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
1897
1886
|
addEventListener(elm, type, wrappedListener, options);
|
|
@@ -1941,7 +1930,9 @@ LightningElement.prototype = {
|
|
|
1941
1930
|
const vm = getAssociatedVM(this);
|
|
1942
1931
|
const { elm, renderer: { setAttribute }, } = vm;
|
|
1943
1932
|
if (process.env.NODE_ENV !== 'production') {
|
|
1944
|
-
|
|
1933
|
+
if (isBeingConstructed(vm)) {
|
|
1934
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1935
|
+
}
|
|
1945
1936
|
}
|
|
1946
1937
|
unlockAttribute(elm, name);
|
|
1947
1938
|
setAttribute(elm, name, value);
|
|
@@ -1951,7 +1942,9 @@ LightningElement.prototype = {
|
|
|
1951
1942
|
const vm = getAssociatedVM(this);
|
|
1952
1943
|
const { elm, renderer: { setAttribute }, } = vm;
|
|
1953
1944
|
if (process.env.NODE_ENV !== 'production') {
|
|
1954
|
-
|
|
1945
|
+
if (isBeingConstructed(vm)) {
|
|
1946
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1947
|
+
}
|
|
1955
1948
|
}
|
|
1956
1949
|
unlockAttribute(elm, name);
|
|
1957
1950
|
setAttribute(elm, name, value, namespace);
|
|
@@ -1974,9 +1967,9 @@ LightningElement.prototype = {
|
|
|
1974
1967
|
const vm = getAssociatedVM(this);
|
|
1975
1968
|
const { elm, renderer: { getClassList }, } = vm;
|
|
1976
1969
|
if (process.env.NODE_ENV !== 'production') {
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1970
|
+
if (isBeingConstructed(vm)) {
|
|
1971
|
+
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.`);
|
|
1972
|
+
}
|
|
1980
1973
|
}
|
|
1981
1974
|
return getClassList(elm);
|
|
1982
1975
|
},
|
|
@@ -2467,8 +2460,12 @@ function createPublicPropertyDescriptor(key) {
|
|
|
2467
2460
|
const vm = getAssociatedVM(this);
|
|
2468
2461
|
if (process.env.NODE_ENV !== 'production') {
|
|
2469
2462
|
const vmBeingRendered = getVMBeingRendered();
|
|
2470
|
-
|
|
2471
|
-
|
|
2463
|
+
if (isInvokingRender) {
|
|
2464
|
+
logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2465
|
+
}
|
|
2466
|
+
if (isUpdatingTemplate) {
|
|
2467
|
+
logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2468
|
+
}
|
|
2472
2469
|
}
|
|
2473
2470
|
vm.cmpProps[key] = newValue;
|
|
2474
2471
|
},
|
|
@@ -2491,14 +2488,18 @@ function createPublicAccessorDescriptor(key, descriptor) {
|
|
|
2491
2488
|
const vm = getAssociatedVM(this);
|
|
2492
2489
|
if (process.env.NODE_ENV !== 'production') {
|
|
2493
2490
|
const vmBeingRendered = getVMBeingRendered();
|
|
2494
|
-
|
|
2495
|
-
|
|
2491
|
+
if (isInvokingRender) {
|
|
2492
|
+
logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2493
|
+
}
|
|
2494
|
+
if (isUpdatingTemplate) {
|
|
2495
|
+
logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2496
|
+
}
|
|
2496
2497
|
}
|
|
2497
2498
|
if (set) {
|
|
2498
2499
|
set.call(this, newValue);
|
|
2499
2500
|
}
|
|
2500
2501
|
else if (process.env.NODE_ENV !== 'production') {
|
|
2501
|
-
|
|
2502
|
+
logError(`Invalid attempt to set a new value for property "${toString$1(key)}" that does not has a setter decorated with @api.`, vm);
|
|
2502
2503
|
}
|
|
2503
2504
|
},
|
|
2504
2505
|
enumerable,
|
|
@@ -2531,8 +2532,12 @@ function internalTrackDecorator(key) {
|
|
|
2531
2532
|
const vm = getAssociatedVM(this);
|
|
2532
2533
|
if (process.env.NODE_ENV !== 'production') {
|
|
2533
2534
|
const vmBeingRendered = getVMBeingRendered();
|
|
2534
|
-
|
|
2535
|
-
|
|
2535
|
+
if (isInvokingRender) {
|
|
2536
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2537
|
+
}
|
|
2538
|
+
if (isUpdatingTemplate) {
|
|
2539
|
+
logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2540
|
+
}
|
|
2536
2541
|
}
|
|
2537
2542
|
const reactiveOrAnyValue = getReactiveProxy(newValue);
|
|
2538
2543
|
updateComponentValue(vm, key, reactiveOrAnyValue);
|
|
@@ -3206,13 +3211,20 @@ function createComponentDef(Ctor) {
|
|
|
3206
3211
|
const ctorName = Ctor.name;
|
|
3207
3212
|
// Removing the following assert until https://bugs.webkit.org/show_bug.cgi?id=190140 is fixed.
|
|
3208
3213
|
// assert.isTrue(ctorName && isString(ctorName), `${toString(Ctor)} should have a "name" property with string value, but found ${ctorName}.`);
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3214
|
+
if (!Ctor.constructor) {
|
|
3215
|
+
// This error seems impossible to hit, due to an earlier check in `isComponentConstructor()`.
|
|
3216
|
+
// But we keep it here just in case.
|
|
3217
|
+
logError(`Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
|
|
3213
3218
|
}
|
|
3214
|
-
if (!isUndefined$1(
|
|
3215
|
-
|
|
3219
|
+
if (!isUndefined$1(ctorShadowSupportMode) &&
|
|
3220
|
+
ctorShadowSupportMode !== "any" /* ShadowSupportMode.Any */ &&
|
|
3221
|
+
ctorShadowSupportMode !== "reset" /* ShadowSupportMode.Default */) {
|
|
3222
|
+
logError(`Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
|
|
3223
|
+
}
|
|
3224
|
+
if (!isUndefined$1(ctorRenderMode) &&
|
|
3225
|
+
ctorRenderMode !== 'light' &&
|
|
3226
|
+
ctorRenderMode !== 'shadow') {
|
|
3227
|
+
logError(`Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
|
|
3216
3228
|
}
|
|
3217
3229
|
}
|
|
3218
3230
|
const decoratorsMeta = getDecoratorsMeta(Ctor);
|
|
@@ -3442,15 +3454,6 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
|
3442
3454
|
// the stylesheet, while internally, we have a replacement for it.
|
|
3443
3455
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
3444
3456
|
}
|
|
3445
|
-
// Check that this stylesheet was generated by our compiler
|
|
3446
|
-
if (!isStylesheetRegistered(stylesheet)) {
|
|
3447
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3448
|
-
logWarnOnce(`TypeError: Unexpected LWC stylesheet content found for component <${vm.tagName.toLowerCase()}>.`);
|
|
3449
|
-
}
|
|
3450
|
-
report("UnexpectedStylesheetContent" /* ReportingEventId.UnexpectedStylesheetContent */, {
|
|
3451
|
-
tagName: vm.tagName.toLowerCase(),
|
|
3452
|
-
});
|
|
3453
|
-
}
|
|
3454
3457
|
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
3455
3458
|
if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS &&
|
|
3456
3459
|
!isScopedCss &&
|
|
@@ -3539,18 +3542,6 @@ function createStylesheet(vm, stylesheets) {
|
|
|
3539
3542
|
}
|
|
3540
3543
|
return null;
|
|
3541
3544
|
}
|
|
3542
|
-
const signedStylesheetSet = new Set();
|
|
3543
|
-
/**
|
|
3544
|
-
* INTERNAL: This function can only be invoked by compiled code. The compiler
|
|
3545
|
-
* will prevent this function from being imported by userland code.
|
|
3546
|
-
*/
|
|
3547
|
-
function registerStylesheet(stylesheet) {
|
|
3548
|
-
signedStylesheetSet.add(stylesheet);
|
|
3549
|
-
return stylesheet;
|
|
3550
|
-
}
|
|
3551
|
-
function isStylesheetRegistered(stylesheet) {
|
|
3552
|
-
return signedStylesheetSet.has(stylesheet);
|
|
3553
|
-
}
|
|
3554
3545
|
|
|
3555
3546
|
/*
|
|
3556
3547
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -4961,7 +4952,7 @@ function k(compilerKey, obj) {
|
|
|
4961
4952
|
return compilerKey + ':' + obj;
|
|
4962
4953
|
case 'object':
|
|
4963
4954
|
if (process.env.NODE_ENV !== 'production') {
|
|
4964
|
-
|
|
4955
|
+
logError(`Invalid key value "${obj}" in ${getVMBeingRendered()}. Key must be a string or number.`);
|
|
4965
4956
|
}
|
|
4966
4957
|
}
|
|
4967
4958
|
}
|
|
@@ -5217,13 +5208,19 @@ function validateSlots(vm) {
|
|
|
5217
5208
|
}
|
|
5218
5209
|
}
|
|
5219
5210
|
function validateLightDomTemplate(template, vm) {
|
|
5220
|
-
|
|
5211
|
+
assertNotProd(); // should never leak to prod mode
|
|
5212
|
+
if (template === defaultEmptyTemplate) {
|
|
5221
5213
|
return;
|
|
5214
|
+
}
|
|
5222
5215
|
if (vm.renderMode === 0 /* RenderMode.Light */) {
|
|
5223
|
-
|
|
5216
|
+
if (template.renderMode !== 'light') {
|
|
5217
|
+
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)}.`);
|
|
5218
|
+
}
|
|
5224
5219
|
}
|
|
5225
5220
|
else {
|
|
5226
|
-
|
|
5221
|
+
if (!isUndefined$1(template.renderMode)) {
|
|
5222
|
+
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"`);
|
|
5223
|
+
}
|
|
5227
5224
|
}
|
|
5228
5225
|
}
|
|
5229
5226
|
function buildParseFragmentFn(createFragmentFn) {
|
|
@@ -5351,7 +5348,9 @@ function evaluateTemplate(vm, html) {
|
|
|
5351
5348
|
logOperationEnd(1 /* OperationId.Render */, vm);
|
|
5352
5349
|
});
|
|
5353
5350
|
if (process.env.NODE_ENV !== 'production') {
|
|
5354
|
-
|
|
5351
|
+
if (!isArray$1(vnodes)) {
|
|
5352
|
+
logError(`Compiler should produce html functions that always return an array.`);
|
|
5353
|
+
}
|
|
5355
5354
|
}
|
|
5356
5355
|
return vnodes;
|
|
5357
5356
|
}
|
|
@@ -6268,7 +6267,7 @@ function readonly(obj) {
|
|
|
6268
6267
|
}
|
|
6269
6268
|
return getReadOnlyProxy(obj);
|
|
6270
6269
|
}
|
|
6271
|
-
/* version: 2.
|
|
6270
|
+
/* version: 2.45.1 */
|
|
6272
6271
|
|
|
6273
6272
|
/*
|
|
6274
6273
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -6849,7 +6848,7 @@ seal(LightningElement.prototype);
|
|
|
6849
6848
|
function createElement() {
|
|
6850
6849
|
throw new Error('createElement is not supported in @lwc/engine-server, only @lwc/engine-dom.');
|
|
6851
6850
|
}
|
|
6852
|
-
/* version: 2.
|
|
6851
|
+
/* version: 2.45.1 */
|
|
6853
6852
|
|
|
6854
6853
|
exports.LightningElement = LightningElement;
|
|
6855
6854
|
exports.api = api$1;
|
|
@@ -6864,7 +6863,6 @@ exports.readonly = readonly;
|
|
|
6864
6863
|
exports.register = register;
|
|
6865
6864
|
exports.registerComponent = registerComponent;
|
|
6866
6865
|
exports.registerDecorators = registerDecorators;
|
|
6867
|
-
exports.registerStylesheet = registerStylesheet;
|
|
6868
6866
|
exports.registerTemplate = registerTemplate;
|
|
6869
6867
|
exports.renderComponent = renderComponent;
|
|
6870
6868
|
exports.renderer = renderer;
|