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
|
@@ -330,9 +330,9 @@
|
|
|
330
330
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
331
331
|
*/
|
|
332
332
|
// Increment whenever the LWC template compiler changes
|
|
333
|
-
var LWC_VERSION = "2.
|
|
333
|
+
var LWC_VERSION = "2.45.1";
|
|
334
334
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
335
|
-
/** version: 2.
|
|
335
|
+
/** version: 2.45.1 */
|
|
336
336
|
|
|
337
337
|
/**
|
|
338
338
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
setFeatureFlag(name, value);
|
|
413
413
|
}
|
|
414
414
|
}
|
|
415
|
-
/** version: 2.
|
|
415
|
+
/** version: 2.45.1 */
|
|
416
416
|
|
|
417
417
|
/**
|
|
418
418
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -476,7 +476,7 @@
|
|
|
476
476
|
}
|
|
477
477
|
}
|
|
478
478
|
}
|
|
479
|
-
/** version: 2.
|
|
479
|
+
/** version: 2.45.1 */
|
|
480
480
|
|
|
481
481
|
/*
|
|
482
482
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1027,8 +1027,9 @@
|
|
|
1027
1027
|
get: function get() {
|
|
1028
1028
|
return originalOuterHTMLDescriptor.get.call(this);
|
|
1029
1029
|
},
|
|
1030
|
-
set: function set(
|
|
1031
|
-
|
|
1030
|
+
set: function set(value) {
|
|
1031
|
+
logError("Invalid attempt to set outerHTML on Element.");
|
|
1032
|
+
return originalOuterHTMLDescriptor.set.call(this, value);
|
|
1032
1033
|
}
|
|
1033
1034
|
})
|
|
1034
1035
|
};
|
|
@@ -1116,16 +1117,18 @@
|
|
|
1116
1117
|
get: function get() {
|
|
1117
1118
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
1118
1119
|
},
|
|
1119
|
-
set: function set(
|
|
1120
|
-
|
|
1120
|
+
set: function set(value) {
|
|
1121
|
+
logError("Invalid attempt to set innerHTML on ShadowRoot.");
|
|
1122
|
+
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
1121
1123
|
}
|
|
1122
1124
|
}),
|
|
1123
1125
|
textContent: generateAccessorDescriptor({
|
|
1124
1126
|
get: function get() {
|
|
1125
1127
|
return originalTextContentDescriptor.get.call(this);
|
|
1126
1128
|
},
|
|
1127
|
-
set: function set(
|
|
1128
|
-
|
|
1129
|
+
set: function set(value) {
|
|
1130
|
+
logError("Invalid attempt to set textContent on ShadowRoot.");
|
|
1131
|
+
return originalTextContentDescriptor.set.call(this, value);
|
|
1129
1132
|
}
|
|
1130
1133
|
}),
|
|
1131
1134
|
addEventListener: generateDataDescriptor({
|
|
@@ -1154,24 +1157,27 @@
|
|
|
1154
1157
|
get: function get() {
|
|
1155
1158
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
1156
1159
|
},
|
|
1157
|
-
set: function set(
|
|
1158
|
-
|
|
1160
|
+
set: function set(value) {
|
|
1161
|
+
logError("Invalid attempt to set innerHTML on HTMLElement.");
|
|
1162
|
+
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
1159
1163
|
}
|
|
1160
1164
|
}),
|
|
1161
1165
|
outerHTML: generateAccessorDescriptor({
|
|
1162
1166
|
get: function get() {
|
|
1163
1167
|
return originalOuterHTMLDescriptor.get.call(this);
|
|
1164
1168
|
},
|
|
1165
|
-
set: function set(
|
|
1166
|
-
|
|
1169
|
+
set: function set(value) {
|
|
1170
|
+
logError("Invalid attempt to set outerHTML on HTMLElement.");
|
|
1171
|
+
return originalOuterHTMLDescriptor.set.call(this, value);
|
|
1167
1172
|
}
|
|
1168
1173
|
}),
|
|
1169
1174
|
textContent: generateAccessorDescriptor({
|
|
1170
1175
|
get: function get() {
|
|
1171
1176
|
return originalTextContentDescriptor.get.call(this);
|
|
1172
1177
|
},
|
|
1173
|
-
set: function set(
|
|
1174
|
-
|
|
1178
|
+
set: function set(value) {
|
|
1179
|
+
logError("Invalid attempt to set textContent on HTMLElement.");
|
|
1180
|
+
return originalTextContentDescriptor.set.call(this, value);
|
|
1175
1181
|
}
|
|
1176
1182
|
}),
|
|
1177
1183
|
addEventListener: generateDataDescriptor({
|
|
@@ -1187,19 +1193,6 @@
|
|
|
1187
1193
|
})
|
|
1188
1194
|
};
|
|
1189
1195
|
}
|
|
1190
|
-
function getComponentRestrictionsDescriptors() {
|
|
1191
|
-
assertNotProd(); // this method should never leak to prod
|
|
1192
|
-
return {
|
|
1193
|
-
tagName: generateAccessorDescriptor({
|
|
1194
|
-
get: function get() {
|
|
1195
|
-
throw new Error("Usage of property `tagName` is disallowed because the component itself does" + " not know which tagName will be used to create the element, therefore writing" + " code that check for that value is error prone.");
|
|
1196
|
-
},
|
|
1197
|
-
configurable: true,
|
|
1198
|
-
enumerable: false // no enumerable properties on component
|
|
1199
|
-
})
|
|
1200
|
-
};
|
|
1201
|
-
}
|
|
1202
|
-
|
|
1203
1196
|
function getLightningElementPrototypeRestrictionsDescriptors(proto) {
|
|
1204
1197
|
assertNotProd(); // this method should never leak to prod
|
|
1205
1198
|
var originalDispatchEvent = proto.dispatchEvent;
|
|
@@ -1230,9 +1223,6 @@
|
|
|
1230
1223
|
var elmProto = getPrototypeOf$1(elm);
|
|
1231
1224
|
setPrototypeOf(elm, create(elmProto, restrictionsDescriptors));
|
|
1232
1225
|
}
|
|
1233
|
-
function patchComponentWithRestrictions(cmp) {
|
|
1234
|
-
defineProperties(cmp, getComponentRestrictionsDescriptors());
|
|
1235
|
-
}
|
|
1236
1226
|
function patchLightningElementPrototypeWithRestrictions(proto) {
|
|
1237
1227
|
defineProperties(proto, getLightningElementPrototypeRestrictionsDescriptors(proto));
|
|
1238
1228
|
}
|
|
@@ -1961,16 +1951,10 @@
|
|
|
1961
1951
|
enumerable = descriptor.enumerable,
|
|
1962
1952
|
configurable = descriptor.configurable;
|
|
1963
1953
|
if (!isFunction$1(_get)) {
|
|
1964
|
-
|
|
1965
|
-
assert.fail("Detected invalid public property descriptor for HTMLElement.prototype.".concat(propName, " definition. Missing the standard getter."));
|
|
1966
|
-
}
|
|
1967
|
-
throw new TypeError();
|
|
1954
|
+
throw new TypeError("Detected invalid public property descriptor for HTMLElement.prototype.".concat(propName, " definition. Missing the standard getter."));
|
|
1968
1955
|
}
|
|
1969
1956
|
if (!isFunction$1(_set)) {
|
|
1970
|
-
|
|
1971
|
-
assert.fail("Detected invalid public property descriptor for HTMLElement.prototype.".concat(propName, " definition. Missing the standard setter."));
|
|
1972
|
-
}
|
|
1973
|
-
throw new TypeError();
|
|
1957
|
+
throw new TypeError("Detected invalid public property descriptor for HTMLElement.prototype.".concat(propName, " definition. Missing the standard setter."));
|
|
1974
1958
|
}
|
|
1975
1959
|
return {
|
|
1976
1960
|
enumerable: enumerable,
|
|
@@ -1990,10 +1974,18 @@
|
|
|
1990
1974
|
var vm = getAssociatedVM(this);
|
|
1991
1975
|
if (process.env.NODE_ENV !== 'production') {
|
|
1992
1976
|
var _vmBeingRendered = getVMBeingRendered();
|
|
1993
|
-
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1977
|
+
if (isInvokingRender) {
|
|
1978
|
+
logError("".concat(_vmBeingRendered, ".render() method has side effects on the state of ").concat(vm, ".").concat(propName));
|
|
1979
|
+
}
|
|
1980
|
+
if (isUpdatingTemplate) {
|
|
1981
|
+
logError("When updating the template of ".concat(_vmBeingRendered, ", one of the accessors used by the template has side effects on the state of ").concat(vm, ".").concat(propName));
|
|
1982
|
+
}
|
|
1983
|
+
if (isBeingConstructed(vm)) {
|
|
1984
|
+
logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
1985
|
+
}
|
|
1986
|
+
if (isObject(newValue) && !isNull(newValue)) {
|
|
1987
|
+
logError("Invalid value \"".concat(newValue, "\" for \"").concat(propName, "\" of ").concat(vm, ". Value cannot be an object, must be a primitive value."));
|
|
1988
|
+
}
|
|
1997
1989
|
}
|
|
1998
1990
|
updateComponentValue(vm, propName, newValue);
|
|
1999
1991
|
return _set.call(vm.elm, newValue);
|
|
@@ -2049,7 +2041,6 @@
|
|
|
2049
2041
|
// Adding extra guard rails in DEV mode.
|
|
2050
2042
|
if (process.env.NODE_ENV !== 'production') {
|
|
2051
2043
|
patchCustomElementWithRestrictions(elm);
|
|
2052
|
-
patchComponentWithRestrictions(component);
|
|
2053
2044
|
}
|
|
2054
2045
|
return this;
|
|
2055
2046
|
};
|
|
@@ -2088,9 +2079,15 @@
|
|
|
2088
2079
|
addEventListener = vm.renderer.addEventListener;
|
|
2089
2080
|
if (process.env.NODE_ENV !== 'production') {
|
|
2090
2081
|
var _vmBeingRendered2 = getVMBeingRendered();
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2082
|
+
if (isInvokingRender) {
|
|
2083
|
+
logError("".concat(_vmBeingRendered2, ".render() method has side effects on the state of ").concat(vm, " by adding an event listener for \"").concat(type, "\"."));
|
|
2084
|
+
}
|
|
2085
|
+
if (isUpdatingTemplate) {
|
|
2086
|
+
logError("Updating the template of ".concat(_vmBeingRendered2, " has side effects on the state of ").concat(vm, " by adding an event listener for \"").concat(type, "\"."));
|
|
2087
|
+
}
|
|
2088
|
+
if (!isFunction$1(listener)) {
|
|
2089
|
+
logError("Invalid second argument for this.addEventListener() in ".concat(vm, " for event \"").concat(type, "\". Expected an EventListener but received ").concat(listener, "."));
|
|
2090
|
+
}
|
|
2094
2091
|
}
|
|
2095
2092
|
var wrappedListener = getWrappedComponentsListener(vm, listener);
|
|
2096
2093
|
addEventListener(elm, type, wrappedListener, options);
|
|
@@ -2147,7 +2144,9 @@
|
|
|
2147
2144
|
var elm = vm.elm,
|
|
2148
2145
|
setAttribute = vm.renderer.setAttribute;
|
|
2149
2146
|
if (process.env.NODE_ENV !== 'production') {
|
|
2150
|
-
|
|
2147
|
+
if (isBeingConstructed(vm)) {
|
|
2148
|
+
logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
2149
|
+
}
|
|
2151
2150
|
}
|
|
2152
2151
|
unlockAttribute(elm, name);
|
|
2153
2152
|
setAttribute(elm, name, value);
|
|
@@ -2158,7 +2157,9 @@
|
|
|
2158
2157
|
var elm = vm.elm,
|
|
2159
2158
|
setAttribute = vm.renderer.setAttribute;
|
|
2160
2159
|
if (process.env.NODE_ENV !== 'production') {
|
|
2161
|
-
|
|
2160
|
+
if (isBeingConstructed(vm)) {
|
|
2161
|
+
logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
2162
|
+
}
|
|
2162
2163
|
}
|
|
2163
2164
|
unlockAttribute(elm, name);
|
|
2164
2165
|
setAttribute(elm, name, value, namespace);
|
|
@@ -2184,9 +2185,9 @@
|
|
|
2184
2185
|
var elm = vm.elm,
|
|
2185
2186
|
getClassList = vm.renderer.getClassList;
|
|
2186
2187
|
if (process.env.NODE_ENV !== 'production') {
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2188
|
+
if (isBeingConstructed(vm)) {
|
|
2189
|
+
logError("Failed to construct ".concat(vm, ": The result must not have attributes. Adding or tampering with classname in constructor is not allowed in a web component, use connectedCallback() instead."));
|
|
2190
|
+
}
|
|
2190
2191
|
}
|
|
2191
2192
|
return getClassList(elm);
|
|
2192
2193
|
},
|
|
@@ -2718,8 +2719,12 @@
|
|
|
2718
2719
|
var vm = getAssociatedVM(this);
|
|
2719
2720
|
if (process.env.NODE_ENV !== 'production') {
|
|
2720
2721
|
var _vmBeingRendered3 = getVMBeingRendered();
|
|
2721
|
-
|
|
2722
|
-
|
|
2722
|
+
if (isInvokingRender) {
|
|
2723
|
+
logError("render() method has side effects on the state of property \"".concat(toString$1(key), "\""), isNull(_vmBeingRendered3) ? vm : _vmBeingRendered3);
|
|
2724
|
+
}
|
|
2725
|
+
if (isUpdatingTemplate) {
|
|
2726
|
+
logError("Updating the template has side effects on the state of property \"".concat(toString$1(key), "\""), isNull(_vmBeingRendered3) ? vm : _vmBeingRendered3);
|
|
2727
|
+
}
|
|
2723
2728
|
}
|
|
2724
2729
|
vm.cmpProps[key] = newValue;
|
|
2725
2730
|
componentValueMutated(vm, key);
|
|
@@ -2746,13 +2751,17 @@
|
|
|
2746
2751
|
var vm = getAssociatedVM(this);
|
|
2747
2752
|
if (process.env.NODE_ENV !== 'production') {
|
|
2748
2753
|
var _vmBeingRendered4 = getVMBeingRendered();
|
|
2749
|
-
|
|
2750
|
-
|
|
2754
|
+
if (isInvokingRender) {
|
|
2755
|
+
logError("render() method has side effects on the state of property \"".concat(toString$1(key), "\""), isNull(_vmBeingRendered4) ? vm : _vmBeingRendered4);
|
|
2756
|
+
}
|
|
2757
|
+
if (isUpdatingTemplate) {
|
|
2758
|
+
logError("Updating the template has side effects on the state of property \"".concat(toString$1(key), "\""), isNull(_vmBeingRendered4) ? vm : _vmBeingRendered4);
|
|
2759
|
+
}
|
|
2751
2760
|
}
|
|
2752
2761
|
if (_set2) {
|
|
2753
2762
|
_set2.call(this, newValue);
|
|
2754
2763
|
} else if (process.env.NODE_ENV !== 'production') {
|
|
2755
|
-
|
|
2764
|
+
logError("Invalid attempt to set a new value for property \"".concat(toString$1(key), "\" that does not has a setter decorated with @api."), vm);
|
|
2756
2765
|
}
|
|
2757
2766
|
},
|
|
2758
2767
|
enumerable: enumerable,
|
|
@@ -2786,8 +2795,12 @@
|
|
|
2786
2795
|
var vm = getAssociatedVM(this);
|
|
2787
2796
|
if (process.env.NODE_ENV !== 'production') {
|
|
2788
2797
|
var _vmBeingRendered5 = getVMBeingRendered();
|
|
2789
|
-
|
|
2790
|
-
|
|
2798
|
+
if (isInvokingRender) {
|
|
2799
|
+
logError("".concat(_vmBeingRendered5, ".render() method has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2800
|
+
}
|
|
2801
|
+
if (isUpdatingTemplate) {
|
|
2802
|
+
logError("Updating the template of ".concat(_vmBeingRendered5, " has side effects on the state of ").concat(vm, ".").concat(toString$1(key)));
|
|
2803
|
+
}
|
|
2791
2804
|
}
|
|
2792
2805
|
var reactiveOrAnyValue = getReactiveProxy(newValue);
|
|
2793
2806
|
updateComponentValue(vm, key, reactiveOrAnyValue);
|
|
@@ -3645,12 +3658,16 @@
|
|
|
3645
3658
|
var ctorName = Ctor.name;
|
|
3646
3659
|
// Removing the following assert until https://bugs.webkit.org/show_bug.cgi?id=190140 is fixed.
|
|
3647
3660
|
// assert.isTrue(ctorName && isString(ctorName), `${toString(Ctor)} should have a "name" property with string value, but found ${ctorName}.`);
|
|
3648
|
-
|
|
3649
|
-
|
|
3650
|
-
|
|
3661
|
+
if (!Ctor.constructor) {
|
|
3662
|
+
// This error seems impossible to hit, due to an earlier check in `isComponentConstructor()`.
|
|
3663
|
+
// But we keep it here just in case.
|
|
3664
|
+
logError("Missing ".concat(ctorName, ".constructor, ").concat(ctorName, " should have a \"constructor\" property."));
|
|
3665
|
+
}
|
|
3666
|
+
if (!isUndefined$1(ctorShadowSupportMode) && ctorShadowSupportMode !== "any" /* ShadowSupportMode.Any */ && ctorShadowSupportMode !== "reset" /* ShadowSupportMode.Default */) {
|
|
3667
|
+
logError("Invalid value for static property shadowSupportMode: '".concat(ctorShadowSupportMode, "'"));
|
|
3651
3668
|
}
|
|
3652
|
-
if (!isUndefined$1(ctorRenderMode)) {
|
|
3653
|
-
|
|
3669
|
+
if (!isUndefined$1(ctorRenderMode) && ctorRenderMode !== 'light' && ctorRenderMode !== 'shadow') {
|
|
3670
|
+
logError("Invalid value for static property renderMode: '".concat(ctorRenderMode, "'. renderMode must be either 'light' or 'shadow'."));
|
|
3654
3671
|
}
|
|
3655
3672
|
}
|
|
3656
3673
|
var decoratorsMeta = getDecoratorsMeta(Ctor);
|
|
@@ -3907,15 +3924,6 @@
|
|
|
3907
3924
|
// the stylesheet, while internally, we have a replacement for it.
|
|
3908
3925
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
3909
3926
|
}
|
|
3910
|
-
// Check that this stylesheet was generated by our compiler
|
|
3911
|
-
if (!isStylesheetRegistered(stylesheet)) {
|
|
3912
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
3913
|
-
logWarnOnce("TypeError: Unexpected LWC stylesheet content found for component <".concat(vm.tagName.toLowerCase(), ">."));
|
|
3914
|
-
}
|
|
3915
|
-
report("UnexpectedStylesheetContent" /* ReportingEventId.UnexpectedStylesheetContent */, {
|
|
3916
|
-
tagName: vm.tagName.toLowerCase()
|
|
3917
|
-
});
|
|
3918
|
-
}
|
|
3919
3927
|
var isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
3920
3928
|
if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS && !isScopedCss && vm.renderMode === 0 /* RenderMode.Light */) {
|
|
3921
3929
|
logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
|
|
@@ -4030,18 +4038,6 @@
|
|
|
4030
4038
|
}
|
|
4031
4039
|
return null;
|
|
4032
4040
|
}
|
|
4033
|
-
var signedStylesheetSet = new Set();
|
|
4034
|
-
/**
|
|
4035
|
-
* INTERNAL: This function can only be invoked by compiled code. The compiler
|
|
4036
|
-
* will prevent this function from being imported by userland code.
|
|
4037
|
-
*/
|
|
4038
|
-
function registerStylesheet(stylesheet) {
|
|
4039
|
-
signedStylesheetSet.add(stylesheet);
|
|
4040
|
-
return stylesheet;
|
|
4041
|
-
}
|
|
4042
|
-
function isStylesheetRegistered(stylesheet) {
|
|
4043
|
-
return signedStylesheetSet.has(stylesheet);
|
|
4044
|
-
}
|
|
4045
4041
|
|
|
4046
4042
|
/*
|
|
4047
4043
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -5471,7 +5467,7 @@
|
|
|
5471
5467
|
return compilerKey + ':' + obj;
|
|
5472
5468
|
case 'object':
|
|
5473
5469
|
if (process.env.NODE_ENV !== 'production') {
|
|
5474
|
-
|
|
5470
|
+
logError("Invalid key value \"".concat(obj, "\" in ").concat(getVMBeingRendered(), ". Key must be a string or number."));
|
|
5475
5471
|
}
|
|
5476
5472
|
}
|
|
5477
5473
|
}
|
|
@@ -5749,11 +5745,18 @@
|
|
|
5749
5745
|
}
|
|
5750
5746
|
}
|
|
5751
5747
|
function validateLightDomTemplate(template, vm) {
|
|
5752
|
-
|
|
5748
|
+
assertNotProd(); // should never leak to prod mode
|
|
5749
|
+
if (template === defaultEmptyTemplate) {
|
|
5750
|
+
return;
|
|
5751
|
+
}
|
|
5753
5752
|
if (vm.renderMode === 0 /* RenderMode.Light */) {
|
|
5754
|
-
|
|
5753
|
+
if (template.renderMode !== 'light') {
|
|
5754
|
+
logError("Light DOM components can't render shadow DOM templates. Add an 'lwc:render-mode=\"light\"' directive to the root template tag of ".concat(getComponentTag(vm), "."));
|
|
5755
|
+
}
|
|
5755
5756
|
} else {
|
|
5756
|
-
|
|
5757
|
+
if (!isUndefined$1(template.renderMode)) {
|
|
5758
|
+
logError("Shadow DOM components template can't render light DOM templates. Either remove the 'lwc:render-mode' directive from ".concat(getComponentTag(vm), " or set it to 'lwc:render-mode=\"shadow\""));
|
|
5759
|
+
}
|
|
5757
5760
|
}
|
|
5758
5761
|
}
|
|
5759
5762
|
function buildParseFragmentFn(createFragmentFn) {
|
|
@@ -5902,7 +5905,9 @@
|
|
|
5902
5905
|
logOperationEnd(1 /* OperationId.Render */, vm);
|
|
5903
5906
|
});
|
|
5904
5907
|
if (process.env.NODE_ENV !== 'production') {
|
|
5905
|
-
|
|
5908
|
+
if (!isArray$1(vnodes)) {
|
|
5909
|
+
logError("Compiler should produce html functions that always return an array.");
|
|
5910
|
+
}
|
|
5906
5911
|
}
|
|
5907
5912
|
return vnodes;
|
|
5908
5913
|
}
|
|
@@ -6881,7 +6886,7 @@
|
|
|
6881
6886
|
if (!isLightningElement(elm)) {
|
|
6882
6887
|
var vm = findVM(elm);
|
|
6883
6888
|
if (process.env.NODE_ENV !== 'production') {
|
|
6884
|
-
logWarnOnce("Element <".concat(elm.tagName.toLowerCase(), "> ") + (isUndefined$1(vm) ? '' : "owned by <".concat(vm.tagName.toLowerCase(), "> ")) + "uses non-standard property \"".concat(prop, "\". This will be removed in a future version of LWC. ") + "See https://sfdc.co/deprecated-aria");
|
|
6889
|
+
logWarnOnce("Element <".concat(elm.tagName.toLowerCase(), "> ") + (isUndefined$1(vm) ? '' : "owned by <".concat(vm.elm.tagName.toLowerCase(), "> ")) + "uses non-standard property \"".concat(prop, "\". This will be removed in a future version of LWC. ") + "See https://sfdc.co/deprecated-aria");
|
|
6885
6890
|
}
|
|
6886
6891
|
var setValueType;
|
|
6887
6892
|
if (isSetter) {
|
|
@@ -7683,7 +7688,7 @@
|
|
|
7683
7688
|
}
|
|
7684
7689
|
return getReadOnlyProxy(obj);
|
|
7685
7690
|
}
|
|
7686
|
-
/* version: 2.
|
|
7691
|
+
/* version: 2.45.1 */
|
|
7687
7692
|
|
|
7688
7693
|
/*
|
|
7689
7694
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8109,7 +8114,7 @@
|
|
|
8109
8114
|
function isNull(obj) {
|
|
8110
8115
|
return obj === null;
|
|
8111
8116
|
}
|
|
8112
|
-
/** version: 2.
|
|
8117
|
+
/** version: 2.45.1 */
|
|
8113
8118
|
|
|
8114
8119
|
/*
|
|
8115
8120
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8751,7 +8756,7 @@
|
|
|
8751
8756
|
});
|
|
8752
8757
|
});
|
|
8753
8758
|
}
|
|
8754
|
-
/* version: 2.
|
|
8759
|
+
/* version: 2.45.1 */
|
|
8755
8760
|
|
|
8756
8761
|
exports.LightningElement = LightningElement;
|
|
8757
8762
|
exports.__unstable__ProfilerControl = profilerControl;
|
|
@@ -8772,7 +8777,6 @@
|
|
|
8772
8777
|
exports.register = register;
|
|
8773
8778
|
exports.registerComponent = registerComponent;
|
|
8774
8779
|
exports.registerDecorators = registerDecorators;
|
|
8775
|
-
exports.registerStylesheet = registerStylesheet;
|
|
8776
8780
|
exports.registerTemplate = registerTemplate;
|
|
8777
8781
|
exports.renderer = renderer;
|
|
8778
8782
|
exports.rendererFactory = rendererFactory;
|