lwc 2.43.0 → 2.45.0
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 +53 -231
- package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom.js +52 -231
- 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 +8 -28
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/iife/es5/engine-dom.js +51 -232
- 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 +7 -27
- package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom.js +52 -231
- 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 +8 -28
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es5/engine-dom.js +51 -232
- 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 +7 -27
- package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-server/commonjs/es2017/engine-server.js +121 -203
- 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 +103 -203
- package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +89 -74
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +89 -74
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +85 -70
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +88 -71
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +84 -67
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +89 -74
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +85 -70
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +88 -71
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +84 -67
- 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
|
@@ -323,27 +323,6 @@
|
|
|
323
323
|
return propertyName;
|
|
324
324
|
}
|
|
325
325
|
|
|
326
|
-
/*
|
|
327
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
328
|
-
* All rights reserved.
|
|
329
|
-
* SPDX-License-Identifier: MIT
|
|
330
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
331
|
-
*/
|
|
332
|
-
var ESCAPED_CHARS = {
|
|
333
|
-
'"': '"',
|
|
334
|
-
"'": ''',
|
|
335
|
-
'<': '<',
|
|
336
|
-
'>': '>',
|
|
337
|
-
'&': '&'
|
|
338
|
-
};
|
|
339
|
-
function htmlEscape(str) {
|
|
340
|
-
var attrMode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
341
|
-
var searchValue = attrMode ? /["&]/g : /["'<>&]/g;
|
|
342
|
-
return str.replace(searchValue, function (char) {
|
|
343
|
-
return ESCAPED_CHARS[char];
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
|
|
347
326
|
/*
|
|
348
327
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
349
328
|
* All rights reserved.
|
|
@@ -351,9 +330,9 @@
|
|
|
351
330
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
352
331
|
*/
|
|
353
332
|
// Increment whenever the LWC template compiler changes
|
|
354
|
-
var LWC_VERSION = "2.
|
|
333
|
+
var LWC_VERSION = "2.45.0";
|
|
355
334
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
356
|
-
/** version: 2.
|
|
335
|
+
/** version: 2.45.0 */
|
|
357
336
|
|
|
358
337
|
/**
|
|
359
338
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -433,7 +412,7 @@
|
|
|
433
412
|
setFeatureFlag(name, value);
|
|
434
413
|
}
|
|
435
414
|
}
|
|
436
|
-
/** version: 2.
|
|
415
|
+
/** version: 2.45.0 */
|
|
437
416
|
|
|
438
417
|
/**
|
|
439
418
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -497,7 +476,7 @@
|
|
|
497
476
|
}
|
|
498
477
|
}
|
|
499
478
|
}
|
|
500
|
-
/** version: 2.
|
|
479
|
+
/** version: 2.45.0 */
|
|
501
480
|
|
|
502
481
|
/*
|
|
503
482
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -964,101 +943,6 @@
|
|
|
964
943
|
*/
|
|
965
944
|
// These properties get added to LWCElement.prototype publicProps automatically
|
|
966
945
|
var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
|
|
967
|
-
function offsetPropertyErrorMessage(name) {
|
|
968
|
-
return "Using the `".concat(name, "` property is an anti-pattern because it rounds the value to an integer. Instead, use the `getBoundingClientRect` method to obtain fractional values for the size of an element and its position relative to the viewport.");
|
|
969
|
-
}
|
|
970
|
-
// Global HTML Attributes & Properties
|
|
971
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
|
|
972
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
|
|
973
|
-
//
|
|
974
|
-
// If you update this list, check for test files that recapitulate the same list. Searching the codebase
|
|
975
|
-
// for e.g. "dropzone" should suffice.
|
|
976
|
-
var globalHTMLProperties = {
|
|
977
|
-
accessKey: {
|
|
978
|
-
attribute: 'accesskey'
|
|
979
|
-
},
|
|
980
|
-
accessKeyLabel: {
|
|
981
|
-
readOnly: true
|
|
982
|
-
},
|
|
983
|
-
className: {
|
|
984
|
-
attribute: 'class',
|
|
985
|
-
error: 'Using the `className` property is an anti-pattern because of slow runtime behavior and potential conflicts with classes provided by the owner element. Use the `classList` API instead.'
|
|
986
|
-
},
|
|
987
|
-
contentEditable: {
|
|
988
|
-
attribute: 'contenteditable'
|
|
989
|
-
},
|
|
990
|
-
dataset: {
|
|
991
|
-
readOnly: true,
|
|
992
|
-
error: "Using the `dataset` property is an anti-pattern because it can't be statically analyzed. Expose each property individually using the `@api` decorator instead."
|
|
993
|
-
},
|
|
994
|
-
dir: {
|
|
995
|
-
attribute: 'dir'
|
|
996
|
-
},
|
|
997
|
-
draggable: {
|
|
998
|
-
attribute: 'draggable'
|
|
999
|
-
},
|
|
1000
|
-
dropzone: {
|
|
1001
|
-
attribute: 'dropzone',
|
|
1002
|
-
readOnly: true
|
|
1003
|
-
},
|
|
1004
|
-
hidden: {
|
|
1005
|
-
attribute: 'hidden'
|
|
1006
|
-
},
|
|
1007
|
-
id: {
|
|
1008
|
-
attribute: 'id'
|
|
1009
|
-
},
|
|
1010
|
-
inputMode: {
|
|
1011
|
-
attribute: 'inputmode'
|
|
1012
|
-
},
|
|
1013
|
-
lang: {
|
|
1014
|
-
attribute: 'lang'
|
|
1015
|
-
},
|
|
1016
|
-
slot: {
|
|
1017
|
-
attribute: 'slot',
|
|
1018
|
-
error: 'Using the `slot` property is an anti-pattern.'
|
|
1019
|
-
},
|
|
1020
|
-
spellcheck: {
|
|
1021
|
-
attribute: 'spellcheck'
|
|
1022
|
-
},
|
|
1023
|
-
style: {
|
|
1024
|
-
attribute: 'style'
|
|
1025
|
-
},
|
|
1026
|
-
tabIndex: {
|
|
1027
|
-
attribute: 'tabindex'
|
|
1028
|
-
},
|
|
1029
|
-
title: {
|
|
1030
|
-
attribute: 'title'
|
|
1031
|
-
},
|
|
1032
|
-
translate: {
|
|
1033
|
-
attribute: 'translate'
|
|
1034
|
-
},
|
|
1035
|
-
// additional "global attributes" that are not present in the link above.
|
|
1036
|
-
isContentEditable: {
|
|
1037
|
-
readOnly: true
|
|
1038
|
-
},
|
|
1039
|
-
offsetHeight: {
|
|
1040
|
-
readOnly: true,
|
|
1041
|
-
error: offsetPropertyErrorMessage('offsetHeight')
|
|
1042
|
-
},
|
|
1043
|
-
offsetLeft: {
|
|
1044
|
-
readOnly: true,
|
|
1045
|
-
error: offsetPropertyErrorMessage('offsetLeft')
|
|
1046
|
-
},
|
|
1047
|
-
offsetParent: {
|
|
1048
|
-
readOnly: true
|
|
1049
|
-
},
|
|
1050
|
-
offsetTop: {
|
|
1051
|
-
readOnly: true,
|
|
1052
|
-
error: offsetPropertyErrorMessage('offsetTop')
|
|
1053
|
-
},
|
|
1054
|
-
offsetWidth: {
|
|
1055
|
-
readOnly: true,
|
|
1056
|
-
error: offsetPropertyErrorMessage('offsetWidth')
|
|
1057
|
-
},
|
|
1058
|
-
role: {
|
|
1059
|
-
attribute: 'role'
|
|
1060
|
-
}
|
|
1061
|
-
};
|
|
1062
946
|
var controlledElement = null;
|
|
1063
947
|
var controlledAttributeName;
|
|
1064
948
|
function isAttributeLocked(elm, attrName) {
|
|
@@ -1246,8 +1130,7 @@
|
|
|
1246
1130
|
}),
|
|
1247
1131
|
addEventListener: generateDataDescriptor({
|
|
1248
1132
|
value: function value(type, listener, options) {
|
|
1249
|
-
// TODO [#
|
|
1250
|
-
// programmatically into its Component's shadow root
|
|
1133
|
+
// TODO [#1824]: Potentially relax this restriction
|
|
1251
1134
|
if (!isUndefined$1(options)) {
|
|
1252
1135
|
logError('The `addEventListener` method on ShadowRoot does not support any options.', getAssociatedVMIfPresent(this));
|
|
1253
1136
|
}
|
|
@@ -1293,8 +1176,7 @@
|
|
|
1293
1176
|
}),
|
|
1294
1177
|
addEventListener: generateDataDescriptor({
|
|
1295
1178
|
value: function value(type, listener, options) {
|
|
1296
|
-
// TODO [#
|
|
1297
|
-
// programmatically into a lighting element node
|
|
1179
|
+
// TODO [#1824]: Potentially relax this restriction
|
|
1298
1180
|
if (!isUndefined$1(options)) {
|
|
1299
1181
|
logError('The `addEventListener` method in `LightningElement` does not support any options.', getAssociatedVMIfPresent(this));
|
|
1300
1182
|
}
|
|
@@ -1321,7 +1203,7 @@
|
|
|
1321
1203
|
function getLightningElementPrototypeRestrictionsDescriptors(proto) {
|
|
1322
1204
|
assertNotProd(); // this method should never leak to prod
|
|
1323
1205
|
var originalDispatchEvent = proto.dispatchEvent;
|
|
1324
|
-
|
|
1206
|
+
return {
|
|
1325
1207
|
dispatchEvent: generateDataDescriptor({
|
|
1326
1208
|
value: function value(event) {
|
|
1327
1209
|
var vm = getAssociatedVM(this);
|
|
@@ -1337,34 +1219,6 @@
|
|
|
1337
1219
|
}
|
|
1338
1220
|
})
|
|
1339
1221
|
};
|
|
1340
|
-
forEach.call(getOwnPropertyNames$1(globalHTMLProperties), function (propName) {
|
|
1341
|
-
if (propName in proto) {
|
|
1342
|
-
return; // no need to redefine something that we are already exposing
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
descriptors[propName] = generateAccessorDescriptor({
|
|
1346
|
-
get: function get() {
|
|
1347
|
-
var _globalHTMLProperties = globalHTMLProperties[propName],
|
|
1348
|
-
error = _globalHTMLProperties.error,
|
|
1349
|
-
attribute = _globalHTMLProperties.attribute;
|
|
1350
|
-
var msg = [];
|
|
1351
|
-
msg.push("Accessing the global HTML property \"".concat(propName, "\" is disabled."));
|
|
1352
|
-
if (error) {
|
|
1353
|
-
msg.push(error);
|
|
1354
|
-
} else if (attribute) {
|
|
1355
|
-
msg.push("Instead access it via `this.getAttribute(\"".concat(attribute, "\")`."));
|
|
1356
|
-
}
|
|
1357
|
-
logError(msg.join('\n'), getAssociatedVM(this));
|
|
1358
|
-
},
|
|
1359
|
-
set: function set() {
|
|
1360
|
-
var readOnly = globalHTMLProperties[propName].readOnly;
|
|
1361
|
-
if (readOnly) {
|
|
1362
|
-
logError("The global HTML property `".concat(propName, "` is read-only."), getAssociatedVM(this));
|
|
1363
|
-
}
|
|
1364
|
-
}
|
|
1365
|
-
});
|
|
1366
|
-
});
|
|
1367
|
-
return descriptors;
|
|
1368
1222
|
}
|
|
1369
1223
|
// This routine will prevent access to certain properties on a shadow root instance to guarantee
|
|
1370
1224
|
// that all components will work fine in IE11 and other browsers without shadow dom support.
|
|
@@ -2879,12 +2733,7 @@
|
|
|
2879
2733
|
_set2 = descriptor.set,
|
|
2880
2734
|
enumerable = descriptor.enumerable,
|
|
2881
2735
|
configurable = descriptor.configurable;
|
|
2882
|
-
|
|
2883
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2884
|
-
assert.invariant(isFunction$1(_get2), "Invalid compiler output for public accessor ".concat(toString$1(key), " decorated with @api"));
|
|
2885
|
-
}
|
|
2886
|
-
throw new Error();
|
|
2887
|
-
}
|
|
2736
|
+
assert.invariant(isFunction$1(_get2), "Invalid public accessor ".concat(toString$1(key), " decorated with @api. The property is missing a getter."));
|
|
2888
2737
|
return {
|
|
2889
2738
|
get: function get() {
|
|
2890
2739
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -3004,60 +2853,63 @@
|
|
|
3004
2853
|
}
|
|
3005
2854
|
|
|
3006
2855
|
function validateObservedField(Ctor, fieldName, descriptor) {
|
|
2856
|
+
assertNotProd(); // this method should never leak to prod
|
|
3007
2857
|
if (!isUndefined$1(descriptor)) {
|
|
3008
2858
|
var type = getClassDescriptorType(descriptor);
|
|
3009
2859
|
var message = "Invalid observed ".concat(fieldName, " field. Found a duplicate ").concat(type, " with the same name.");
|
|
3010
|
-
// [
|
|
3011
|
-
|
|
3012
|
-
if (type === "accessor" /* DescriptorType.Accessor */) {
|
|
3013
|
-
logError(message);
|
|
3014
|
-
} else {
|
|
3015
|
-
assert.fail(message);
|
|
3016
|
-
}
|
|
2860
|
+
// TODO [#3408]: this should throw, not log
|
|
2861
|
+
logError(message);
|
|
3017
2862
|
}
|
|
3018
2863
|
}
|
|
3019
2864
|
function validateFieldDecoratedWithTrack(Ctor, fieldName, descriptor) {
|
|
2865
|
+
assertNotProd(); // this method should never leak to prod
|
|
3020
2866
|
if (!isUndefined$1(descriptor)) {
|
|
3021
2867
|
var type = getClassDescriptorType(descriptor);
|
|
3022
|
-
|
|
2868
|
+
// TODO [#3408]: this should throw, not log
|
|
2869
|
+
logError("Invalid @track ".concat(fieldName, " field. Found a duplicate ").concat(type, " with the same name."));
|
|
3023
2870
|
}
|
|
3024
2871
|
}
|
|
3025
2872
|
function validateFieldDecoratedWithWire(Ctor, fieldName, descriptor) {
|
|
2873
|
+
assertNotProd(); // this method should never leak to prod
|
|
3026
2874
|
if (!isUndefined$1(descriptor)) {
|
|
3027
2875
|
var type = getClassDescriptorType(descriptor);
|
|
3028
|
-
|
|
2876
|
+
// TODO [#3408]: this should throw, not log
|
|
2877
|
+
logError("Invalid @wire ".concat(fieldName, " field. Found a duplicate ").concat(type, " with the same name."));
|
|
3029
2878
|
}
|
|
3030
2879
|
}
|
|
3031
2880
|
function validateMethodDecoratedWithWire(Ctor, methodName, descriptor) {
|
|
2881
|
+
assertNotProd(); // this method should never leak to prod
|
|
3032
2882
|
if (isUndefined$1(descriptor) || !isFunction$1(descriptor.value) || isFalse(descriptor.writable)) {
|
|
3033
|
-
|
|
2883
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2884
|
+
logError("Invalid @wire ".concat(methodName, " field. The field should have a valid writable descriptor."));
|
|
3034
2885
|
}
|
|
3035
2886
|
}
|
|
3036
2887
|
function validateFieldDecoratedWithApi(Ctor, fieldName, descriptor) {
|
|
2888
|
+
assertNotProd(); // this method should never leak to prod
|
|
3037
2889
|
if (!isUndefined$1(descriptor)) {
|
|
3038
2890
|
var type = getClassDescriptorType(descriptor);
|
|
3039
2891
|
var message = "Invalid @api ".concat(fieldName, " field. Found a duplicate ").concat(type, " with the same name.");
|
|
3040
|
-
// [
|
|
3041
|
-
|
|
3042
|
-
if (type === "accessor" /* DescriptorType.Accessor */) {
|
|
3043
|
-
logError(message);
|
|
3044
|
-
} else {
|
|
3045
|
-
assert.fail(message);
|
|
3046
|
-
}
|
|
2892
|
+
// TODO [#3408]: this should throw, not log
|
|
2893
|
+
logError(message);
|
|
3047
2894
|
}
|
|
3048
2895
|
}
|
|
3049
2896
|
function validateAccessorDecoratedWithApi(Ctor, fieldName, descriptor) {
|
|
3050
|
-
|
|
3051
|
-
|
|
3052
|
-
|
|
3053
|
-
|
|
2897
|
+
assertNotProd(); // this method should never leak to prod
|
|
2898
|
+
if (isFunction$1(descriptor.set)) {
|
|
2899
|
+
if (!isFunction$1(descriptor.get)) {
|
|
2900
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2901
|
+
logError("Missing getter for property ".concat(fieldName, " decorated with @api in ").concat(Ctor, ". You cannot have a setter without the corresponding getter."));
|
|
2902
|
+
}
|
|
3054
2903
|
} else if (!isFunction$1(descriptor.get)) {
|
|
3055
|
-
|
|
2904
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2905
|
+
logError("Missing @api get ".concat(fieldName, " accessor."));
|
|
3056
2906
|
}
|
|
3057
2907
|
}
|
|
3058
2908
|
function validateMethodDecoratedWithApi(Ctor, methodName, descriptor) {
|
|
2909
|
+
assertNotProd(); // this method should never leak to prod
|
|
3059
2910
|
if (isUndefined$1(descriptor) || !isFunction$1(descriptor.value) || isFalse(descriptor.writable)) {
|
|
3060
|
-
|
|
2911
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2912
|
+
logError("Invalid @api ".concat(methodName, " method."));
|
|
3061
2913
|
}
|
|
3062
2914
|
}
|
|
3063
2915
|
/**
|
|
@@ -3084,13 +2936,14 @@
|
|
|
3084
2936
|
apiFieldsConfig[fieldName] = propConfig.config;
|
|
3085
2937
|
descriptor = getOwnPropertyDescriptor$1(proto, fieldName);
|
|
3086
2938
|
if (propConfig.config > 0) {
|
|
2939
|
+
if (isUndefined$1(descriptor)) {
|
|
2940
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2941
|
+
throw new Error();
|
|
2942
|
+
}
|
|
3087
2943
|
// accessor declaration
|
|
3088
2944
|
if (process.env.NODE_ENV !== 'production') {
|
|
3089
2945
|
validateAccessorDecoratedWithApi(Ctor, fieldName, descriptor);
|
|
3090
2946
|
}
|
|
3091
|
-
if (isUndefined$1(descriptor)) {
|
|
3092
|
-
throw new Error();
|
|
3093
|
-
}
|
|
3094
2947
|
descriptor = createPublicAccessorDescriptor(fieldName, descriptor);
|
|
3095
2948
|
} else {
|
|
3096
2949
|
// field declaration
|
|
@@ -3133,7 +2986,10 @@
|
|
|
3133
2986
|
descriptor = getOwnPropertyDescriptor$1(proto, fieldOrMethodName);
|
|
3134
2987
|
if (method === 1) {
|
|
3135
2988
|
if (process.env.NODE_ENV !== 'production') {
|
|
3136
|
-
|
|
2989
|
+
if (!adapter) {
|
|
2990
|
+
// TODO [#3408]: this should throw, not log
|
|
2991
|
+
logError("@wire on method \"".concat(fieldOrMethodName, "\": adapter id must be truthy."));
|
|
2992
|
+
}
|
|
3137
2993
|
validateMethodDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
|
|
3138
2994
|
}
|
|
3139
2995
|
if (isUndefined$1(descriptor)) {
|
|
@@ -3143,7 +2999,10 @@
|
|
|
3143
2999
|
storeWiredMethodMeta(descriptor, adapter, configCallback, dynamic);
|
|
3144
3000
|
} else {
|
|
3145
3001
|
if (process.env.NODE_ENV !== 'production') {
|
|
3146
|
-
|
|
3002
|
+
if (!adapter) {
|
|
3003
|
+
// TODO [#3408]: this should throw, not log
|
|
3004
|
+
logError("@wire on field \"".concat(fieldOrMethodName, "\": adapter id must be truthy."));
|
|
3005
|
+
}
|
|
3147
3006
|
validateFieldDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
|
|
3148
3007
|
}
|
|
3149
3008
|
descriptor = internalWireFieldDecorator(fieldOrMethodName);
|
|
@@ -4048,15 +3907,6 @@
|
|
|
4048
3907
|
// the stylesheet, while internally, we have a replacement for it.
|
|
4049
3908
|
stylesheet = getStyleOrSwappedStyle(stylesheet);
|
|
4050
3909
|
}
|
|
4051
|
-
// Check that this stylesheet was generated by our compiler
|
|
4052
|
-
if (!isStylesheetRegistered(stylesheet)) {
|
|
4053
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
4054
|
-
logWarnOnce("TypeError: Unexpected LWC stylesheet content found for component <".concat(vm.tagName.toLowerCase(), ">."));
|
|
4055
|
-
}
|
|
4056
|
-
report("UnexpectedStylesheetContent" /* ReportingEventId.UnexpectedStylesheetContent */, {
|
|
4057
|
-
tagName: vm.tagName.toLowerCase()
|
|
4058
|
-
});
|
|
4059
|
-
}
|
|
4060
3910
|
var isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
4061
3911
|
if (lwcRuntimeFlags.DISABLE_LIGHT_DOM_UNSCOPED_CSS && !isScopedCss && vm.renderMode === 0 /* RenderMode.Light */) {
|
|
4062
3912
|
logError('Unscoped CSS is not supported in Light DOM. Please use scoped CSS (*.scoped.css) instead of unscoped CSS (*.css).');
|
|
@@ -4171,18 +4021,6 @@
|
|
|
4171
4021
|
}
|
|
4172
4022
|
return null;
|
|
4173
4023
|
}
|
|
4174
|
-
var signedStylesheetSet = new Set();
|
|
4175
|
-
/**
|
|
4176
|
-
* INTERNAL: This function can only be invoked by compiled code. The compiler
|
|
4177
|
-
* will prevent this function from being imported by userland code.
|
|
4178
|
-
*/
|
|
4179
|
-
function registerStylesheet(stylesheet) {
|
|
4180
|
-
signedStylesheetSet.add(stylesheet);
|
|
4181
|
-
return stylesheet;
|
|
4182
|
-
}
|
|
4183
|
-
function isStylesheetRegistered(stylesheet) {
|
|
4184
|
-
return signedStylesheetSet.has(stylesheet);
|
|
4185
|
-
}
|
|
4186
4024
|
|
|
4187
4025
|
/*
|
|
4188
4026
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7022,7 +6860,7 @@
|
|
|
7022
6860
|
if (!isLightningElement(elm)) {
|
|
7023
6861
|
var vm = findVM(elm);
|
|
7024
6862
|
if (process.env.NODE_ENV !== 'production') {
|
|
7025
|
-
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");
|
|
6863
|
+
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");
|
|
7026
6864
|
}
|
|
7027
6865
|
var setValueType;
|
|
7028
6866
|
if (isSetter) {
|
|
@@ -7149,8 +6987,6 @@
|
|
|
7149
6987
|
return renderer.nextSibling(hydratedNode);
|
|
7150
6988
|
}
|
|
7151
6989
|
var NODE_VALUE_PROP = 'nodeValue';
|
|
7152
|
-
var PARENT_NODE_PROP = 'parentNode';
|
|
7153
|
-
var TAG_NAME_PROP = 'tagName';
|
|
7154
6990
|
function textNodeContentsAreEqual(node, vnode, renderer) {
|
|
7155
6991
|
var getProperty = renderer.getProperty;
|
|
7156
6992
|
var nodeValue = getProperty(node, NODE_VALUE_PROP);
|
|
@@ -7162,22 +6998,6 @@
|
|
|
7162
6998
|
if (nodeValue === "\u200D" && vnode.text === '') {
|
|
7163
6999
|
return true;
|
|
7164
7000
|
}
|
|
7165
|
-
// Special case for text nodes inside `<style>` tags – these are escaped when rendered server-size,
|
|
7166
|
-
// but not when generated by the engine client-side.
|
|
7167
|
-
var parentNode = getProperty(node, PARENT_NODE_PROP);
|
|
7168
|
-
// Should never be null, but just to be safe, we check.
|
|
7169
|
-
/* istanbul ignore else */
|
|
7170
|
-
if (!isNull(parentNode)) {
|
|
7171
|
-
var tagName = getProperty(parentNode, TAG_NAME_PROP);
|
|
7172
|
-
// If the tagName is STYLE, then the following condition should always be true.
|
|
7173
|
-
// The LWC compiler blocks using `<style>`s inside of templates, so it should be impossible
|
|
7174
|
-
// for component authors to render different `<style>` text content on the client and server.
|
|
7175
|
-
// But just to be safe, we check.
|
|
7176
|
-
/* istanbul ignore next */
|
|
7177
|
-
if (tagName === 'STYLE' && htmlEscape(vnode.text) === nodeValue) {
|
|
7178
|
-
return true;
|
|
7179
|
-
}
|
|
7180
|
-
}
|
|
7181
7001
|
return false;
|
|
7182
7002
|
}
|
|
7183
7003
|
function hydrateText(node, vnode, renderer) {
|
|
@@ -7837,12 +7657,12 @@
|
|
|
7837
7657
|
if (process.env.NODE_ENV !== 'production') {
|
|
7838
7658
|
// TODO [#1292]: Remove the readonly decorator
|
|
7839
7659
|
if (arguments.length !== 1) {
|
|
7840
|
-
|
|
7660
|
+
logError('@readonly cannot be used as a decorator just yet, use it as a function with one argument to produce a readonly version of the provided value.');
|
|
7841
7661
|
}
|
|
7842
7662
|
}
|
|
7843
7663
|
return getReadOnlyProxy(obj);
|
|
7844
7664
|
}
|
|
7845
|
-
/* version: 2.
|
|
7665
|
+
/* version: 2.45.0 */
|
|
7846
7666
|
|
|
7847
7667
|
/*
|
|
7848
7668
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8268,7 +8088,7 @@
|
|
|
8268
8088
|
function isNull(obj) {
|
|
8269
8089
|
return obj === null;
|
|
8270
8090
|
}
|
|
8271
|
-
/** version: 2.
|
|
8091
|
+
/** version: 2.45.0 */
|
|
8272
8092
|
|
|
8273
8093
|
/*
|
|
8274
8094
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8910,7 +8730,7 @@
|
|
|
8910
8730
|
});
|
|
8911
8731
|
});
|
|
8912
8732
|
}
|
|
8913
|
-
/* version: 2.
|
|
8733
|
+
/* version: 2.45.0 */
|
|
8914
8734
|
|
|
8915
8735
|
exports.LightningElement = LightningElement;
|
|
8916
8736
|
exports.__unstable__ProfilerControl = profilerControl;
|
|
@@ -8931,7 +8751,6 @@
|
|
|
8931
8751
|
exports.register = register;
|
|
8932
8752
|
exports.registerComponent = registerComponent;
|
|
8933
8753
|
exports.registerDecorators = registerDecorators;
|
|
8934
|
-
exports.registerStylesheet = registerStylesheet;
|
|
8935
8754
|
exports.registerTemplate = registerTemplate;
|
|
8936
8755
|
exports.renderer = renderer;
|
|
8937
8756
|
exports.rendererFactory = rendererFactory;
|