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
|
@@ -329,9 +329,9 @@ function htmlAttributeToProperty(attrName) {
|
|
|
329
329
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
330
330
|
*/
|
|
331
331
|
// Increment whenever the LWC template compiler changes
|
|
332
|
-
const LWC_VERSION = "2.
|
|
332
|
+
const LWC_VERSION = "2.45.1";
|
|
333
333
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
334
|
-
/** version: 2.
|
|
334
|
+
/** version: 2.45.1 */
|
|
335
335
|
|
|
336
336
|
/**
|
|
337
337
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -409,7 +409,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
409
409
|
setFeatureFlag(name, value);
|
|
410
410
|
}
|
|
411
411
|
}
|
|
412
|
-
/** version: 2.
|
|
412
|
+
/** version: 2.45.1 */
|
|
413
413
|
|
|
414
414
|
/**
|
|
415
415
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -473,7 +473,7 @@ function applyAriaReflection(prototype = Element.prototype) {
|
|
|
473
473
|
}
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
/** version: 2.
|
|
476
|
+
/** version: 2.45.1 */
|
|
477
477
|
|
|
478
478
|
/*
|
|
479
479
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1000,8 +1000,9 @@ function patchElementWithRestrictions(elm, options) {
|
|
|
1000
1000
|
get() {
|
|
1001
1001
|
return originalOuterHTMLDescriptor.get.call(this);
|
|
1002
1002
|
},
|
|
1003
|
-
set(
|
|
1004
|
-
|
|
1003
|
+
set(value) {
|
|
1004
|
+
logError(`Invalid attempt to set outerHTML on Element.`);
|
|
1005
|
+
return originalOuterHTMLDescriptor.set.call(this, value);
|
|
1005
1006
|
},
|
|
1006
1007
|
}),
|
|
1007
1008
|
};
|
|
@@ -1086,16 +1087,18 @@ function getShadowRootRestrictionsDescriptors(sr) {
|
|
|
1086
1087
|
get() {
|
|
1087
1088
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
1088
1089
|
},
|
|
1089
|
-
set(
|
|
1090
|
-
|
|
1090
|
+
set(value) {
|
|
1091
|
+
logError(`Invalid attempt to set innerHTML on ShadowRoot.`);
|
|
1092
|
+
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
1091
1093
|
},
|
|
1092
1094
|
}),
|
|
1093
1095
|
textContent: generateAccessorDescriptor({
|
|
1094
1096
|
get() {
|
|
1095
1097
|
return originalTextContentDescriptor.get.call(this);
|
|
1096
1098
|
},
|
|
1097
|
-
set(
|
|
1098
|
-
|
|
1099
|
+
set(value) {
|
|
1100
|
+
logError(`Invalid attempt to set textContent on ShadowRoot.`);
|
|
1101
|
+
return originalTextContentDescriptor.set.call(this, value);
|
|
1099
1102
|
},
|
|
1100
1103
|
}),
|
|
1101
1104
|
addEventListener: generateDataDescriptor({
|
|
@@ -1124,24 +1127,27 @@ function getCustomElementRestrictionsDescriptors(elm) {
|
|
|
1124
1127
|
get() {
|
|
1125
1128
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
1126
1129
|
},
|
|
1127
|
-
set(
|
|
1128
|
-
|
|
1130
|
+
set(value) {
|
|
1131
|
+
logError(`Invalid attempt to set innerHTML on HTMLElement.`);
|
|
1132
|
+
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
1129
1133
|
},
|
|
1130
1134
|
}),
|
|
1131
1135
|
outerHTML: generateAccessorDescriptor({
|
|
1132
1136
|
get() {
|
|
1133
1137
|
return originalOuterHTMLDescriptor.get.call(this);
|
|
1134
1138
|
},
|
|
1135
|
-
set(
|
|
1136
|
-
|
|
1139
|
+
set(value) {
|
|
1140
|
+
logError(`Invalid attempt to set outerHTML on HTMLElement.`);
|
|
1141
|
+
return originalOuterHTMLDescriptor.set.call(this, value);
|
|
1137
1142
|
},
|
|
1138
1143
|
}),
|
|
1139
1144
|
textContent: generateAccessorDescriptor({
|
|
1140
1145
|
get() {
|
|
1141
1146
|
return originalTextContentDescriptor.get.call(this);
|
|
1142
1147
|
},
|
|
1143
|
-
set(
|
|
1144
|
-
|
|
1148
|
+
set(value) {
|
|
1149
|
+
logError(`Invalid attempt to set textContent on HTMLElement.`);
|
|
1150
|
+
return originalTextContentDescriptor.set.call(this, value);
|
|
1145
1151
|
},
|
|
1146
1152
|
}),
|
|
1147
1153
|
addEventListener: generateDataDescriptor({
|
|
@@ -1157,20 +1163,6 @@ function getCustomElementRestrictionsDescriptors(elm) {
|
|
|
1157
1163
|
}),
|
|
1158
1164
|
};
|
|
1159
1165
|
}
|
|
1160
|
-
function getComponentRestrictionsDescriptors() {
|
|
1161
|
-
assertNotProd(); // this method should never leak to prod
|
|
1162
|
-
return {
|
|
1163
|
-
tagName: generateAccessorDescriptor({
|
|
1164
|
-
get() {
|
|
1165
|
-
throw new Error(`Usage of property \`tagName\` is disallowed because the component itself does` +
|
|
1166
|
-
` not know which tagName will be used to create the element, therefore writing` +
|
|
1167
|
-
` code that check for that value is error prone.`);
|
|
1168
|
-
},
|
|
1169
|
-
configurable: true,
|
|
1170
|
-
enumerable: false, // no enumerable properties on component
|
|
1171
|
-
}),
|
|
1172
|
-
};
|
|
1173
|
-
}
|
|
1174
1166
|
function getLightningElementPrototypeRestrictionsDescriptors(proto) {
|
|
1175
1167
|
assertNotProd(); // this method should never leak to prod
|
|
1176
1168
|
const originalDispatchEvent = proto.dispatchEvent;
|
|
@@ -1203,9 +1195,6 @@ function patchCustomElementWithRestrictions(elm) {
|
|
|
1203
1195
|
const elmProto = getPrototypeOf$1(elm);
|
|
1204
1196
|
setPrototypeOf(elm, create(elmProto, restrictionsDescriptors));
|
|
1205
1197
|
}
|
|
1206
|
-
function patchComponentWithRestrictions(cmp) {
|
|
1207
|
-
defineProperties(cmp, getComponentRestrictionsDescriptors());
|
|
1208
|
-
}
|
|
1209
1198
|
function patchLightningElementPrototypeWithRestrictions(proto) {
|
|
1210
1199
|
defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
|
|
1211
1200
|
}
|
|
@@ -1816,16 +1805,10 @@ function markLockerLiveObject(obj) {
|
|
|
1816
1805
|
function createBridgeToElementDescriptor(propName, descriptor) {
|
|
1817
1806
|
const { get, set, enumerable, configurable } = descriptor;
|
|
1818
1807
|
if (!isFunction$1(get)) {
|
|
1819
|
-
|
|
1820
|
-
assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
|
|
1821
|
-
}
|
|
1822
|
-
throw new TypeError();
|
|
1808
|
+
throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard getter.`);
|
|
1823
1809
|
}
|
|
1824
1810
|
if (!isFunction$1(set)) {
|
|
1825
|
-
|
|
1826
|
-
assert.fail(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
|
|
1827
|
-
}
|
|
1828
|
-
throw new TypeError();
|
|
1811
|
+
throw new TypeError(`Detected invalid public property descriptor for HTMLElement.prototype.${propName} definition. Missing the standard setter.`);
|
|
1829
1812
|
}
|
|
1830
1813
|
return {
|
|
1831
1814
|
enumerable,
|
|
@@ -1845,10 +1828,18 @@ function createBridgeToElementDescriptor(propName, descriptor) {
|
|
|
1845
1828
|
const vm = getAssociatedVM(this);
|
|
1846
1829
|
if (process.env.NODE_ENV !== 'production') {
|
|
1847
1830
|
const vmBeingRendered = getVMBeingRendered();
|
|
1848
|
-
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1831
|
+
if (isInvokingRender) {
|
|
1832
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${propName}`);
|
|
1833
|
+
}
|
|
1834
|
+
if (isUpdatingTemplate) {
|
|
1835
|
+
logError(`When updating the template of ${vmBeingRendered}, one of the accessors used by the template has side effects on the state of ${vm}.${propName}`);
|
|
1836
|
+
}
|
|
1837
|
+
if (isBeingConstructed(vm)) {
|
|
1838
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1839
|
+
}
|
|
1840
|
+
if (isObject(newValue) && !isNull(newValue)) {
|
|
1841
|
+
logError(`Invalid value "${newValue}" for "${propName}" of ${vm}. Value cannot be an object, must be a primitive value.`);
|
|
1842
|
+
}
|
|
1852
1843
|
}
|
|
1853
1844
|
updateComponentValue(vm, propName, newValue);
|
|
1854
1845
|
return set.call(vm.elm, newValue);
|
|
@@ -1901,7 +1892,6 @@ const LightningElement = function () {
|
|
|
1901
1892
|
// Adding extra guard rails in DEV mode.
|
|
1902
1893
|
if (process.env.NODE_ENV !== 'production') {
|
|
1903
1894
|
patchCustomElementWithRestrictions(elm);
|
|
1904
|
-
patchComponentWithRestrictions(component);
|
|
1905
1895
|
}
|
|
1906
1896
|
return this;
|
|
1907
1897
|
};
|
|
@@ -1937,9 +1927,15 @@ LightningElement.prototype = {
|
|
|
1937
1927
|
const { elm, renderer: { addEventListener }, } = vm;
|
|
1938
1928
|
if (process.env.NODE_ENV !== 'production') {
|
|
1939
1929
|
const vmBeingRendered = getVMBeingRendered();
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1930
|
+
if (isInvokingRender) {
|
|
1931
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm} by adding an event listener for "${type}".`);
|
|
1932
|
+
}
|
|
1933
|
+
if (isUpdatingTemplate) {
|
|
1934
|
+
logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm} by adding an event listener for "${type}".`);
|
|
1935
|
+
}
|
|
1936
|
+
if (!isFunction$1(listener)) {
|
|
1937
|
+
logError(`Invalid second argument for this.addEventListener() in ${vm} for event "${type}". Expected an EventListener but received ${listener}.`);
|
|
1938
|
+
}
|
|
1943
1939
|
}
|
|
1944
1940
|
const wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
1945
1941
|
addEventListener(elm, type, wrappedListener, options);
|
|
@@ -1989,7 +1985,9 @@ LightningElement.prototype = {
|
|
|
1989
1985
|
const vm = getAssociatedVM(this);
|
|
1990
1986
|
const { elm, renderer: { setAttribute }, } = vm;
|
|
1991
1987
|
if (process.env.NODE_ENV !== 'production') {
|
|
1992
|
-
|
|
1988
|
+
if (isBeingConstructed(vm)) {
|
|
1989
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1990
|
+
}
|
|
1993
1991
|
}
|
|
1994
1992
|
unlockAttribute(elm, name);
|
|
1995
1993
|
setAttribute(elm, name, value);
|
|
@@ -1999,7 +1997,9 @@ LightningElement.prototype = {
|
|
|
1999
1997
|
const vm = getAssociatedVM(this);
|
|
2000
1998
|
const { elm, renderer: { setAttribute }, } = vm;
|
|
2001
1999
|
if (process.env.NODE_ENV !== 'production') {
|
|
2002
|
-
|
|
2000
|
+
if (isBeingConstructed(vm)) {
|
|
2001
|
+
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
2002
|
+
}
|
|
2003
2003
|
}
|
|
2004
2004
|
unlockAttribute(elm, name);
|
|
2005
2005
|
setAttribute(elm, name, value, namespace);
|
|
@@ -2022,9 +2022,9 @@ LightningElement.prototype = {
|
|
|
2022
2022
|
const vm = getAssociatedVM(this);
|
|
2023
2023
|
const { elm, renderer: { getClassList }, } = vm;
|
|
2024
2024
|
if (process.env.NODE_ENV !== 'production') {
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2025
|
+
if (isBeingConstructed(vm)) {
|
|
2026
|
+
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.`);
|
|
2027
|
+
}
|
|
2028
2028
|
}
|
|
2029
2029
|
return getClassList(elm);
|
|
2030
2030
|
},
|
|
@@ -2530,8 +2530,12 @@ function createPublicPropertyDescriptor(key) {
|
|
|
2530
2530
|
const vm = getAssociatedVM(this);
|
|
2531
2531
|
if (process.env.NODE_ENV !== 'production') {
|
|
2532
2532
|
const vmBeingRendered = getVMBeingRendered();
|
|
2533
|
-
|
|
2534
|
-
|
|
2533
|
+
if (isInvokingRender) {
|
|
2534
|
+
logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2535
|
+
}
|
|
2536
|
+
if (isUpdatingTemplate) {
|
|
2537
|
+
logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2538
|
+
}
|
|
2535
2539
|
}
|
|
2536
2540
|
vm.cmpProps[key] = newValue;
|
|
2537
2541
|
componentValueMutated(vm, key);
|
|
@@ -2555,14 +2559,18 @@ function createPublicAccessorDescriptor(key, descriptor) {
|
|
|
2555
2559
|
const vm = getAssociatedVM(this);
|
|
2556
2560
|
if (process.env.NODE_ENV !== 'production') {
|
|
2557
2561
|
const vmBeingRendered = getVMBeingRendered();
|
|
2558
|
-
|
|
2559
|
-
|
|
2562
|
+
if (isInvokingRender) {
|
|
2563
|
+
logError(`render() method has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2564
|
+
}
|
|
2565
|
+
if (isUpdatingTemplate) {
|
|
2566
|
+
logError(`Updating the template has side effects on the state of property "${toString$1(key)}"`, isNull(vmBeingRendered) ? vm : vmBeingRendered);
|
|
2567
|
+
}
|
|
2560
2568
|
}
|
|
2561
2569
|
if (set) {
|
|
2562
2570
|
set.call(this, newValue);
|
|
2563
2571
|
}
|
|
2564
2572
|
else if (process.env.NODE_ENV !== 'production') {
|
|
2565
|
-
|
|
2573
|
+
logError(`Invalid attempt to set a new value for property "${toString$1(key)}" that does not has a setter decorated with @api.`, vm);
|
|
2566
2574
|
}
|
|
2567
2575
|
},
|
|
2568
2576
|
enumerable,
|
|
@@ -2596,8 +2604,12 @@ function internalTrackDecorator(key) {
|
|
|
2596
2604
|
const vm = getAssociatedVM(this);
|
|
2597
2605
|
if (process.env.NODE_ENV !== 'production') {
|
|
2598
2606
|
const vmBeingRendered = getVMBeingRendered();
|
|
2599
|
-
|
|
2600
|
-
|
|
2607
|
+
if (isInvokingRender) {
|
|
2608
|
+
logError(`${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2609
|
+
}
|
|
2610
|
+
if (isUpdatingTemplate) {
|
|
2611
|
+
logError(`Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
|
|
2612
|
+
}
|
|
2601
2613
|
}
|
|
2602
2614
|
const reactiveOrAnyValue = getReactiveProxy(newValue);
|
|
2603
2615
|
updateComponentValue(vm, key, reactiveOrAnyValue);
|
|
@@ -3374,13 +3386,20 @@ function createComponentDef(Ctor) {
|
|
|
3374
3386
|
const ctorName = Ctor.name;
|
|
3375
3387
|
// Removing the following assert until https://bugs.webkit.org/show_bug.cgi?id=190140 is fixed.
|
|
3376
3388
|
// assert.isTrue(ctorName && isString(ctorName), `${toString(Ctor)} should have a "name" property with string value, but found ${ctorName}.`);
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
|
|
3389
|
+
if (!Ctor.constructor) {
|
|
3390
|
+
// This error seems impossible to hit, due to an earlier check in `isComponentConstructor()`.
|
|
3391
|
+
// But we keep it here just in case.
|
|
3392
|
+
logError(`Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
|
|
3393
|
+
}
|
|
3394
|
+
if (!isUndefined$1(ctorShadowSupportMode) &&
|
|
3395
|
+
ctorShadowSupportMode !== "any" /* ShadowSupportMode.Any */ &&
|
|
3396
|
+
ctorShadowSupportMode !== "reset" /* ShadowSupportMode.Default */) {
|
|
3397
|
+
logError(`Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
|
|
3381
3398
|
}
|
|
3382
|
-
if (!isUndefined$1(ctorRenderMode)
|
|
3383
|
-
|
|
3399
|
+
if (!isUndefined$1(ctorRenderMode) &&
|
|
3400
|
+
ctorRenderMode !== 'light' &&
|
|
3401
|
+
ctorRenderMode !== 'shadow') {
|
|
3402
|
+
logError(`Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
|
|
3384
3403
|
}
|
|
3385
3404
|
}
|
|
3386
3405
|
const decoratorsMeta = getDecoratorsMeta(Ctor);
|
|
@@ -3614,15 +3633,6 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
|
3614
3633
|
// the stylesheet, while internally, we have a replacement for it.
|
|
3615
3634
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
3616
3635
|
}
|
|
3617
|
-
// Check that this stylesheet was generated by our compiler
|
|
3618
|
-
if (!isStylesheetRegistered(stylesheet)) {
|
|
3619
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3620
|
-
logWarnOnce(`TypeError: Unexpected LWC stylesheet content found for component <${vm.tagName.toLowerCase()}>.`);
|
|
3621
|
-
}
|
|
3622
|
-
report("UnexpectedStylesheetContent" /* ReportingEventId.UnexpectedStylesheetContent */, {
|
|
3623
|
-
tagName: vm.tagName.toLowerCase(),
|
|
3624
|
-
});
|
|
3625
|
-
}
|
|
3626
3636
|
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
3627
3637
|
if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS &&
|
|
3628
3638
|
!isScopedCss &&
|
|
@@ -3743,18 +3753,6 @@ function createStylesheet(vm, stylesheets) {
|
|
|
3743
3753
|
}
|
|
3744
3754
|
return null;
|
|
3745
3755
|
}
|
|
3746
|
-
const signedStylesheetSet = new Set();
|
|
3747
|
-
/**
|
|
3748
|
-
* INTERNAL: This function can only be invoked by compiled code. The compiler
|
|
3749
|
-
* will prevent this function from being imported by userland code.
|
|
3750
|
-
*/
|
|
3751
|
-
function registerStylesheet(stylesheet) {
|
|
3752
|
-
signedStylesheetSet.add(stylesheet);
|
|
3753
|
-
return stylesheet;
|
|
3754
|
-
}
|
|
3755
|
-
function isStylesheetRegistered(stylesheet) {
|
|
3756
|
-
return signedStylesheetSet.has(stylesheet);
|
|
3757
|
-
}
|
|
3758
3756
|
|
|
3759
3757
|
/*
|
|
3760
3758
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5178,7 +5176,7 @@ function k(compilerKey, obj) {
|
|
|
5178
5176
|
return compilerKey + ':' + obj;
|
|
5179
5177
|
case 'object':
|
|
5180
5178
|
if (process.env.NODE_ENV !== 'production') {
|
|
5181
|
-
|
|
5179
|
+
logError(`Invalid key value "${obj}" in ${getVMBeingRendered()}. Key must be a string or number.`);
|
|
5182
5180
|
}
|
|
5183
5181
|
}
|
|
5184
5182
|
}
|
|
@@ -5468,13 +5466,19 @@ function validateSlots(vm) {
|
|
|
5468
5466
|
}
|
|
5469
5467
|
}
|
|
5470
5468
|
function validateLightDomTemplate(template, vm) {
|
|
5471
|
-
|
|
5469
|
+
assertNotProd(); // should never leak to prod mode
|
|
5470
|
+
if (template === defaultEmptyTemplate) {
|
|
5472
5471
|
return;
|
|
5472
|
+
}
|
|
5473
5473
|
if (vm.renderMode === 0 /* RenderMode.Light */) {
|
|
5474
|
-
|
|
5474
|
+
if (template.renderMode !== 'light') {
|
|
5475
|
+
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)}.`);
|
|
5476
|
+
}
|
|
5475
5477
|
}
|
|
5476
5478
|
else {
|
|
5477
|
-
|
|
5479
|
+
if (!isUndefined$1(template.renderMode)) {
|
|
5480
|
+
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"`);
|
|
5481
|
+
}
|
|
5478
5482
|
}
|
|
5479
5483
|
}
|
|
5480
5484
|
function buildParseFragmentFn(createFragmentFn) {
|
|
@@ -5607,7 +5611,9 @@ function evaluateTemplate(vm, html) {
|
|
|
5607
5611
|
logOperationEnd(1 /* OperationId.Render */, vm);
|
|
5608
5612
|
});
|
|
5609
5613
|
if (process.env.NODE_ENV !== 'production') {
|
|
5610
|
-
|
|
5614
|
+
if (!isArray$1(vnodes)) {
|
|
5615
|
+
logError(`Compiler should produce html functions that always return an array.`);
|
|
5616
|
+
}
|
|
5611
5617
|
}
|
|
5612
5618
|
return vnodes;
|
|
5613
5619
|
}
|
|
@@ -6566,7 +6572,7 @@ function checkAndReportViolation(elm, prop, isSetter, setValue) {
|
|
|
6566
6572
|
const vm = findVM(elm);
|
|
6567
6573
|
if (process.env.NODE_ENV !== 'production') {
|
|
6568
6574
|
logWarnOnce(`Element <${elm.tagName.toLowerCase()}> ` +
|
|
6569
|
-
(isUndefined$1(vm) ? '' : `owned by <${vm.tagName.toLowerCase()}> `) +
|
|
6575
|
+
(isUndefined$1(vm) ? '' : `owned by <${vm.elm.tagName.toLowerCase()}> `) +
|
|
6570
6576
|
`uses non-standard property "${prop}". This will be removed in a future version of LWC. ` +
|
|
6571
6577
|
`See https://sfdc.co/deprecated-aria`);
|
|
6572
6578
|
}
|
|
@@ -7324,7 +7330,7 @@ function readonly(obj) {
|
|
|
7324
7330
|
}
|
|
7325
7331
|
return getReadOnlyProxy(obj);
|
|
7326
7332
|
}
|
|
7327
|
-
/* version: 2.
|
|
7333
|
+
/* version: 2.45.1 */
|
|
7328
7334
|
|
|
7329
7335
|
/*
|
|
7330
7336
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7752,7 +7758,7 @@ function rendererFactory(baseRenderer) {
|
|
|
7752
7758
|
function isNull(obj) {
|
|
7753
7759
|
return obj === null;
|
|
7754
7760
|
}
|
|
7755
|
-
/** version: 2.
|
|
7761
|
+
/** version: 2.45.1 */
|
|
7756
7762
|
|
|
7757
7763
|
/*
|
|
7758
7764
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8371,7 +8377,7 @@ function registerContextProvider(elm, adapterContextToken, onContextSubscription
|
|
|
8371
8377
|
});
|
|
8372
8378
|
}));
|
|
8373
8379
|
}
|
|
8374
|
-
/* version: 2.
|
|
8380
|
+
/* version: 2.45.1 */
|
|
8375
8381
|
|
|
8376
|
-
export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, freezeTemplate, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeShadowed as isNodeFromTemplate, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators,
|
|
8382
|
+
export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, freezeTemplate, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeShadowed as isNodeFromTemplate, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderer, rendererFactory, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
8377
8383
|
//# sourceMappingURL=engine-dom.js.map
|