lwc 2.43.0 → 2.44.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 +51 -208
- package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom.js +51 -208
- 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 -9
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/iife/es5/engine-dom.js +50 -209
- 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 -8
- package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom.js +51 -208
- 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 -9
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es5/engine-dom.js +50 -209
- 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 -8
- package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-server/commonjs/es2017/engine-server.js +121 -174
- 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 -174
- 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
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
*/
|
|
50
50
|
const { assign, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor: getOwnPropertyDescriptor$1, getOwnPropertyNames: getOwnPropertyNames$1, getPrototypeOf: getPrototypeOf$1, hasOwnProperty: hasOwnProperty$1, isFrozen, keys, seal, setPrototypeOf, } = Object;
|
|
51
51
|
const { isArray: isArray$1 } = Array;
|
|
52
|
-
const { concat: ArrayConcat$1, copyWithin: ArrayCopyWithin, fill: ArrayFill, filter: ArrayFilter, find: ArrayFind, indexOf: ArrayIndexOf, join: ArrayJoin, map: ArrayMap, pop: ArrayPop, push: ArrayPush$1, reduce: ArrayReduce, reverse: ArrayReverse, shift: ArrayShift, slice: ArraySlice, some: ArraySome, sort: ArraySort, splice: ArraySplice, unshift: ArrayUnshift, forEach, } = Array.prototype;
|
|
52
|
+
const { concat: ArrayConcat$1, copyWithin: ArrayCopyWithin, fill: ArrayFill, filter: ArrayFilter, find: ArrayFind, findIndex: ArrayFindIndex, indexOf: ArrayIndexOf, join: ArrayJoin, map: ArrayMap, pop: ArrayPop, push: ArrayPush$1, reduce: ArrayReduce, reverse: ArrayReverse, shift: ArrayShift, slice: ArraySlice, some: ArraySome, sort: ArraySort, splice: ArraySplice, unshift: ArrayUnshift, forEach, } = Array.prototype;
|
|
53
53
|
const { fromCharCode: StringFromCharCode } = String;
|
|
54
54
|
const { charCodeAt: StringCharCodeAt, replace: StringReplace, split: StringSplit, slice: StringSlice, toLowerCase: StringToLowerCase, } = String.prototype;
|
|
55
55
|
function isUndefined$1(obj) {
|
|
@@ -328,24 +328,6 @@
|
|
|
328
328
|
return propertyName;
|
|
329
329
|
}
|
|
330
330
|
|
|
331
|
-
/*
|
|
332
|
-
* Copyright (c) 2020, salesforce.com, inc.
|
|
333
|
-
* All rights reserved.
|
|
334
|
-
* SPDX-License-Identifier: MIT
|
|
335
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
336
|
-
*/
|
|
337
|
-
const ESCAPED_CHARS = {
|
|
338
|
-
'"': '"',
|
|
339
|
-
"'": ''',
|
|
340
|
-
'<': '<',
|
|
341
|
-
'>': '>',
|
|
342
|
-
'&': '&',
|
|
343
|
-
};
|
|
344
|
-
function htmlEscape(str, attrMode = false) {
|
|
345
|
-
const searchValue = attrMode ? /["&]/g : /["'<>&]/g;
|
|
346
|
-
return str.replace(searchValue, (char) => ESCAPED_CHARS[char]);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
331
|
/*
|
|
350
332
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
351
333
|
* All rights reserved.
|
|
@@ -353,9 +335,9 @@
|
|
|
353
335
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
354
336
|
*/
|
|
355
337
|
// Increment whenever the LWC template compiler changes
|
|
356
|
-
const LWC_VERSION = "2.
|
|
338
|
+
const LWC_VERSION = "2.44.0";
|
|
357
339
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
358
|
-
/** version: 2.
|
|
340
|
+
/** version: 2.44.0 */
|
|
359
341
|
|
|
360
342
|
/**
|
|
361
343
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -433,7 +415,7 @@
|
|
|
433
415
|
setFeatureFlag(name, value);
|
|
434
416
|
}
|
|
435
417
|
}
|
|
436
|
-
/** version: 2.
|
|
418
|
+
/** version: 2.44.0 */
|
|
437
419
|
|
|
438
420
|
/**
|
|
439
421
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -497,7 +479,7 @@
|
|
|
497
479
|
}
|
|
498
480
|
}
|
|
499
481
|
}
|
|
500
|
-
/** version: 2.
|
|
482
|
+
/** version: 2.44.0 */
|
|
501
483
|
|
|
502
484
|
/*
|
|
503
485
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -940,101 +922,6 @@
|
|
|
940
922
|
'tabIndex',
|
|
941
923
|
'title',
|
|
942
924
|
];
|
|
943
|
-
function offsetPropertyErrorMessage(name) {
|
|
944
|
-
return `Using the \`${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.`;
|
|
945
|
-
}
|
|
946
|
-
// Global HTML Attributes & Properties
|
|
947
|
-
// https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes
|
|
948
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement
|
|
949
|
-
//
|
|
950
|
-
// If you update this list, check for test files that recapitulate the same list. Searching the codebase
|
|
951
|
-
// for e.g. "dropzone" should suffice.
|
|
952
|
-
const globalHTMLProperties = {
|
|
953
|
-
accessKey: {
|
|
954
|
-
attribute: 'accesskey',
|
|
955
|
-
},
|
|
956
|
-
accessKeyLabel: {
|
|
957
|
-
readOnly: true,
|
|
958
|
-
},
|
|
959
|
-
className: {
|
|
960
|
-
attribute: 'class',
|
|
961
|
-
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.',
|
|
962
|
-
},
|
|
963
|
-
contentEditable: {
|
|
964
|
-
attribute: 'contenteditable',
|
|
965
|
-
},
|
|
966
|
-
dataset: {
|
|
967
|
-
readOnly: true,
|
|
968
|
-
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.",
|
|
969
|
-
},
|
|
970
|
-
dir: {
|
|
971
|
-
attribute: 'dir',
|
|
972
|
-
},
|
|
973
|
-
draggable: {
|
|
974
|
-
attribute: 'draggable',
|
|
975
|
-
},
|
|
976
|
-
dropzone: {
|
|
977
|
-
attribute: 'dropzone',
|
|
978
|
-
readOnly: true,
|
|
979
|
-
},
|
|
980
|
-
hidden: {
|
|
981
|
-
attribute: 'hidden',
|
|
982
|
-
},
|
|
983
|
-
id: {
|
|
984
|
-
attribute: 'id',
|
|
985
|
-
},
|
|
986
|
-
inputMode: {
|
|
987
|
-
attribute: 'inputmode',
|
|
988
|
-
},
|
|
989
|
-
lang: {
|
|
990
|
-
attribute: 'lang',
|
|
991
|
-
},
|
|
992
|
-
slot: {
|
|
993
|
-
attribute: 'slot',
|
|
994
|
-
error: 'Using the `slot` property is an anti-pattern.',
|
|
995
|
-
},
|
|
996
|
-
spellcheck: {
|
|
997
|
-
attribute: 'spellcheck',
|
|
998
|
-
},
|
|
999
|
-
style: {
|
|
1000
|
-
attribute: 'style',
|
|
1001
|
-
},
|
|
1002
|
-
tabIndex: {
|
|
1003
|
-
attribute: 'tabindex',
|
|
1004
|
-
},
|
|
1005
|
-
title: {
|
|
1006
|
-
attribute: 'title',
|
|
1007
|
-
},
|
|
1008
|
-
translate: {
|
|
1009
|
-
attribute: 'translate',
|
|
1010
|
-
},
|
|
1011
|
-
// additional "global attributes" that are not present in the link above.
|
|
1012
|
-
isContentEditable: {
|
|
1013
|
-
readOnly: true,
|
|
1014
|
-
},
|
|
1015
|
-
offsetHeight: {
|
|
1016
|
-
readOnly: true,
|
|
1017
|
-
error: offsetPropertyErrorMessage('offsetHeight'),
|
|
1018
|
-
},
|
|
1019
|
-
offsetLeft: {
|
|
1020
|
-
readOnly: true,
|
|
1021
|
-
error: offsetPropertyErrorMessage('offsetLeft'),
|
|
1022
|
-
},
|
|
1023
|
-
offsetParent: {
|
|
1024
|
-
readOnly: true,
|
|
1025
|
-
},
|
|
1026
|
-
offsetTop: {
|
|
1027
|
-
readOnly: true,
|
|
1028
|
-
error: offsetPropertyErrorMessage('offsetTop'),
|
|
1029
|
-
},
|
|
1030
|
-
offsetWidth: {
|
|
1031
|
-
readOnly: true,
|
|
1032
|
-
error: offsetPropertyErrorMessage('offsetWidth'),
|
|
1033
|
-
},
|
|
1034
|
-
role: {
|
|
1035
|
-
attribute: 'role',
|
|
1036
|
-
},
|
|
1037
|
-
};
|
|
1038
925
|
let controlledElement = null;
|
|
1039
926
|
let controlledAttributeName;
|
|
1040
927
|
function isAttributeLocked(elm, attrName) {
|
|
@@ -1219,8 +1106,7 @@
|
|
|
1219
1106
|
}),
|
|
1220
1107
|
addEventListener: generateDataDescriptor({
|
|
1221
1108
|
value(type, listener, options) {
|
|
1222
|
-
// TODO [#
|
|
1223
|
-
// programmatically into its Component's shadow root
|
|
1109
|
+
// TODO [#1824]: Potentially relax this restriction
|
|
1224
1110
|
if (!isUndefined$1(options)) {
|
|
1225
1111
|
logError('The `addEventListener` method on ShadowRoot does not support any options.', getAssociatedVMIfPresent(this));
|
|
1226
1112
|
}
|
|
@@ -1266,8 +1152,7 @@
|
|
|
1266
1152
|
}),
|
|
1267
1153
|
addEventListener: generateDataDescriptor({
|
|
1268
1154
|
value(type, listener, options) {
|
|
1269
|
-
// TODO [#
|
|
1270
|
-
// programmatically into a lighting element node
|
|
1155
|
+
// TODO [#1824]: Potentially relax this restriction
|
|
1271
1156
|
if (!isUndefined$1(options)) {
|
|
1272
1157
|
logError('The `addEventListener` method in `LightningElement` does not support any options.', getAssociatedVMIfPresent(this));
|
|
1273
1158
|
}
|
|
@@ -1295,7 +1180,7 @@
|
|
|
1295
1180
|
function getLightningElementPrototypeRestrictionsDescriptors(proto) {
|
|
1296
1181
|
assertNotProd(); // this method should never leak to prod
|
|
1297
1182
|
const originalDispatchEvent = proto.dispatchEvent;
|
|
1298
|
-
|
|
1183
|
+
return {
|
|
1299
1184
|
dispatchEvent: generateDataDescriptor({
|
|
1300
1185
|
value(event) {
|
|
1301
1186
|
const vm = getAssociatedVM(this);
|
|
@@ -1313,32 +1198,6 @@
|
|
|
1313
1198
|
},
|
|
1314
1199
|
}),
|
|
1315
1200
|
};
|
|
1316
|
-
forEach.call(getOwnPropertyNames$1(globalHTMLProperties), (propName) => {
|
|
1317
|
-
if (propName in proto) {
|
|
1318
|
-
return; // no need to redefine something that we are already exposing
|
|
1319
|
-
}
|
|
1320
|
-
descriptors[propName] = generateAccessorDescriptor({
|
|
1321
|
-
get() {
|
|
1322
|
-
const { error, attribute } = globalHTMLProperties[propName];
|
|
1323
|
-
const msg = [];
|
|
1324
|
-
msg.push(`Accessing the global HTML property "${propName}" is disabled.`);
|
|
1325
|
-
if (error) {
|
|
1326
|
-
msg.push(error);
|
|
1327
|
-
}
|
|
1328
|
-
else if (attribute) {
|
|
1329
|
-
msg.push(`Instead access it via \`this.getAttribute("${attribute}")\`.`);
|
|
1330
|
-
}
|
|
1331
|
-
logError(msg.join('\n'), getAssociatedVM(this));
|
|
1332
|
-
},
|
|
1333
|
-
set() {
|
|
1334
|
-
const { readOnly } = globalHTMLProperties[propName];
|
|
1335
|
-
if (readOnly) {
|
|
1336
|
-
logError(`The global HTML property \`${propName}\` is read-only.`, getAssociatedVM(this));
|
|
1337
|
-
}
|
|
1338
|
-
},
|
|
1339
|
-
});
|
|
1340
|
-
});
|
|
1341
|
-
return descriptors;
|
|
1342
1201
|
}
|
|
1343
1202
|
// This routine will prevent access to certain properties on a shadow root instance to guarantee
|
|
1344
1203
|
// that all components will work fine in IE11 and other browsers without shadow dom support.
|
|
@@ -2689,12 +2548,7 @@
|
|
|
2689
2548
|
}
|
|
2690
2549
|
function createPublicAccessorDescriptor(key, descriptor) {
|
|
2691
2550
|
const { get, set, enumerable, configurable } = descriptor;
|
|
2692
|
-
|
|
2693
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
2694
|
-
assert.invariant(isFunction$1(get), `Invalid compiler output for public accessor ${toString$1(key)} decorated with @api`);
|
|
2695
|
-
}
|
|
2696
|
-
throw new Error();
|
|
2697
|
-
}
|
|
2551
|
+
assert.invariant(isFunction$1(get), `Invalid public accessor ${toString$1(key)} decorated with @api. The property is missing a getter.`);
|
|
2698
2552
|
return {
|
|
2699
2553
|
get() {
|
|
2700
2554
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -2816,64 +2670,64 @@
|
|
|
2816
2670
|
}
|
|
2817
2671
|
}
|
|
2818
2672
|
function validateObservedField(Ctor, fieldName, descriptor) {
|
|
2673
|
+
assertNotProd(); // this method should never leak to prod
|
|
2819
2674
|
if (!isUndefined$1(descriptor)) {
|
|
2820
2675
|
const type = getClassDescriptorType(descriptor);
|
|
2821
2676
|
const message = `Invalid observed ${fieldName} field. Found a duplicate ${type} with the same name.`;
|
|
2822
|
-
// [
|
|
2823
|
-
|
|
2824
|
-
if (type === "accessor" /* DescriptorType.Accessor */) {
|
|
2825
|
-
logError(message);
|
|
2826
|
-
}
|
|
2827
|
-
else {
|
|
2828
|
-
assert.fail(message);
|
|
2829
|
-
}
|
|
2677
|
+
// TODO [#3408]: this should throw, not log
|
|
2678
|
+
logError(message);
|
|
2830
2679
|
}
|
|
2831
2680
|
}
|
|
2832
2681
|
function validateFieldDecoratedWithTrack(Ctor, fieldName, descriptor) {
|
|
2682
|
+
assertNotProd(); // this method should never leak to prod
|
|
2833
2683
|
if (!isUndefined$1(descriptor)) {
|
|
2834
2684
|
const type = getClassDescriptorType(descriptor);
|
|
2835
|
-
|
|
2685
|
+
// TODO [#3408]: this should throw, not log
|
|
2686
|
+
logError(`Invalid @track ${fieldName} field. Found a duplicate ${type} with the same name.`);
|
|
2836
2687
|
}
|
|
2837
2688
|
}
|
|
2838
2689
|
function validateFieldDecoratedWithWire(Ctor, fieldName, descriptor) {
|
|
2690
|
+
assertNotProd(); // this method should never leak to prod
|
|
2839
2691
|
if (!isUndefined$1(descriptor)) {
|
|
2840
2692
|
const type = getClassDescriptorType(descriptor);
|
|
2841
|
-
|
|
2693
|
+
// TODO [#3408]: this should throw, not log
|
|
2694
|
+
logError(`Invalid @wire ${fieldName} field. Found a duplicate ${type} with the same name.`);
|
|
2842
2695
|
}
|
|
2843
2696
|
}
|
|
2844
2697
|
function validateMethodDecoratedWithWire(Ctor, methodName, descriptor) {
|
|
2698
|
+
assertNotProd(); // this method should never leak to prod
|
|
2845
2699
|
if (isUndefined$1(descriptor) || !isFunction$1(descriptor.value) || isFalse(descriptor.writable)) {
|
|
2846
|
-
|
|
2700
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2701
|
+
logError(`Invalid @wire ${methodName} field. The field should have a valid writable descriptor.`);
|
|
2847
2702
|
}
|
|
2848
2703
|
}
|
|
2849
2704
|
function validateFieldDecoratedWithApi(Ctor, fieldName, descriptor) {
|
|
2705
|
+
assertNotProd(); // this method should never leak to prod
|
|
2850
2706
|
if (!isUndefined$1(descriptor)) {
|
|
2851
2707
|
const type = getClassDescriptorType(descriptor);
|
|
2852
2708
|
const message = `Invalid @api ${fieldName} field. Found a duplicate ${type} with the same name.`;
|
|
2853
|
-
// [
|
|
2854
|
-
|
|
2855
|
-
if (type === "accessor" /* DescriptorType.Accessor */) {
|
|
2856
|
-
logError(message);
|
|
2857
|
-
}
|
|
2858
|
-
else {
|
|
2859
|
-
assert.fail(message);
|
|
2860
|
-
}
|
|
2709
|
+
// TODO [#3408]: this should throw, not log
|
|
2710
|
+
logError(message);
|
|
2861
2711
|
}
|
|
2862
2712
|
}
|
|
2863
2713
|
function validateAccessorDecoratedWithApi(Ctor, fieldName, descriptor) {
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2714
|
+
assertNotProd(); // this method should never leak to prod
|
|
2715
|
+
if (isFunction$1(descriptor.set)) {
|
|
2716
|
+
if (!isFunction$1(descriptor.get)) {
|
|
2717
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2718
|
+
logError(`Missing getter for property ${fieldName} decorated with @api in ${Ctor}. You cannot have a setter without the corresponding getter.`);
|
|
2719
|
+
}
|
|
2869
2720
|
}
|
|
2870
2721
|
else if (!isFunction$1(descriptor.get)) {
|
|
2871
|
-
|
|
2722
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2723
|
+
logError(`Missing @api get ${fieldName} accessor.`);
|
|
2872
2724
|
}
|
|
2873
2725
|
}
|
|
2874
2726
|
function validateMethodDecoratedWithApi(Ctor, methodName, descriptor) {
|
|
2727
|
+
assertNotProd(); // this method should never leak to prod
|
|
2875
2728
|
if (isUndefined$1(descriptor) || !isFunction$1(descriptor.value) || isFalse(descriptor.writable)) {
|
|
2876
|
-
|
|
2729
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2730
|
+
logError(`Invalid @api ${methodName} method.`);
|
|
2877
2731
|
}
|
|
2878
2732
|
}
|
|
2879
2733
|
/**
|
|
@@ -2896,13 +2750,14 @@
|
|
|
2896
2750
|
apiFieldsConfig[fieldName] = propConfig.config;
|
|
2897
2751
|
descriptor = getOwnPropertyDescriptor$1(proto, fieldName);
|
|
2898
2752
|
if (propConfig.config > 0) {
|
|
2753
|
+
if (isUndefined$1(descriptor)) {
|
|
2754
|
+
// TODO [#3441]: This line of code does not seem possible to reach.
|
|
2755
|
+
throw new Error();
|
|
2756
|
+
}
|
|
2899
2757
|
// accessor declaration
|
|
2900
2758
|
if (process.env.NODE_ENV !== 'production') {
|
|
2901
2759
|
validateAccessorDecoratedWithApi(Ctor, fieldName, descriptor);
|
|
2902
2760
|
}
|
|
2903
|
-
if (isUndefined$1(descriptor)) {
|
|
2904
|
-
throw new Error();
|
|
2905
|
-
}
|
|
2906
2761
|
descriptor = createPublicAccessorDescriptor(fieldName, descriptor);
|
|
2907
2762
|
}
|
|
2908
2763
|
else {
|
|
@@ -2942,7 +2797,10 @@
|
|
|
2942
2797
|
descriptor = getOwnPropertyDescriptor$1(proto, fieldOrMethodName);
|
|
2943
2798
|
if (method === 1) {
|
|
2944
2799
|
if (process.env.NODE_ENV !== 'production') {
|
|
2945
|
-
|
|
2800
|
+
if (!adapter) {
|
|
2801
|
+
// TODO [#3408]: this should throw, not log
|
|
2802
|
+
logError(`@wire on method "${fieldOrMethodName}": adapter id must be truthy.`);
|
|
2803
|
+
}
|
|
2946
2804
|
validateMethodDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
|
|
2947
2805
|
}
|
|
2948
2806
|
if (isUndefined$1(descriptor)) {
|
|
@@ -2953,7 +2811,10 @@
|
|
|
2953
2811
|
}
|
|
2954
2812
|
else {
|
|
2955
2813
|
if (process.env.NODE_ENV !== 'production') {
|
|
2956
|
-
|
|
2814
|
+
if (!adapter) {
|
|
2815
|
+
// TODO [#3408]: this should throw, not log
|
|
2816
|
+
logError(`@wire on field "${fieldOrMethodName}": adapter id must be truthy.`);
|
|
2817
|
+
}
|
|
2957
2818
|
validateFieldDecoratedWithWire(Ctor, fieldOrMethodName, descriptor);
|
|
2958
2819
|
}
|
|
2959
2820
|
descriptor = internalWireFieldDecorator(fieldOrMethodName);
|
|
@@ -6828,8 +6689,6 @@
|
|
|
6828
6689
|
return renderer.nextSibling(hydratedNode);
|
|
6829
6690
|
}
|
|
6830
6691
|
const NODE_VALUE_PROP = 'nodeValue';
|
|
6831
|
-
const PARENT_NODE_PROP = 'parentNode';
|
|
6832
|
-
const TAG_NAME_PROP = 'tagName';
|
|
6833
6692
|
function textNodeContentsAreEqual(node, vnode, renderer) {
|
|
6834
6693
|
const { getProperty } = renderer;
|
|
6835
6694
|
const nodeValue = getProperty(node, NODE_VALUE_PROP);
|
|
@@ -6841,22 +6700,6 @@
|
|
|
6841
6700
|
if (nodeValue === '\u200D' && vnode.text === '') {
|
|
6842
6701
|
return true;
|
|
6843
6702
|
}
|
|
6844
|
-
// Special case for text nodes inside `<style>` tags – these are escaped when rendered server-size,
|
|
6845
|
-
// but not when generated by the engine client-side.
|
|
6846
|
-
const parentNode = getProperty(node, PARENT_NODE_PROP);
|
|
6847
|
-
// Should never be null, but just to be safe, we check.
|
|
6848
|
-
/* istanbul ignore else */
|
|
6849
|
-
if (!isNull(parentNode)) {
|
|
6850
|
-
const tagName = getProperty(parentNode, TAG_NAME_PROP);
|
|
6851
|
-
// If the tagName is STYLE, then the following condition should always be true.
|
|
6852
|
-
// The LWC compiler blocks using `<style>`s inside of templates, so it should be impossible
|
|
6853
|
-
// for component authors to render different `<style>` text content on the client and server.
|
|
6854
|
-
// But just to be safe, we check.
|
|
6855
|
-
/* istanbul ignore next */
|
|
6856
|
-
if (tagName === 'STYLE' && htmlEscape(vnode.text) === nodeValue) {
|
|
6857
|
-
return true;
|
|
6858
|
-
}
|
|
6859
|
-
}
|
|
6860
6703
|
return false;
|
|
6861
6704
|
}
|
|
6862
6705
|
function hydrateText(node, vnode, renderer) {
|
|
@@ -7482,12 +7325,12 @@
|
|
|
7482
7325
|
if (process.env.NODE_ENV !== 'production') {
|
|
7483
7326
|
// TODO [#1292]: Remove the readonly decorator
|
|
7484
7327
|
if (arguments.length !== 1) {
|
|
7485
|
-
|
|
7328
|
+
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.');
|
|
7486
7329
|
}
|
|
7487
7330
|
}
|
|
7488
7331
|
return getReadOnlyProxy(obj);
|
|
7489
7332
|
}
|
|
7490
|
-
/* version: 2.
|
|
7333
|
+
/* version: 2.44.0 */
|
|
7491
7334
|
|
|
7492
7335
|
/*
|
|
7493
7336
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7915,7 +7758,7 @@
|
|
|
7915
7758
|
function isNull(obj) {
|
|
7916
7759
|
return obj === null;
|
|
7917
7760
|
}
|
|
7918
|
-
/** version: 2.
|
|
7761
|
+
/** version: 2.44.0 */
|
|
7919
7762
|
|
|
7920
7763
|
/*
|
|
7921
7764
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8534,7 +8377,7 @@
|
|
|
8534
8377
|
});
|
|
8535
8378
|
}));
|
|
8536
8379
|
}
|
|
8537
|
-
/* version: 2.
|
|
8380
|
+
/* version: 2.44.0 */
|
|
8538
8381
|
|
|
8539
8382
|
exports.LightningElement = LightningElement;
|
|
8540
8383
|
exports.__unstable__ProfilerControl = profilerControl;
|