lwc 2.45.1 → 2.45.2
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 +63 -15
- package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom.js +63 -15
- 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 +64 -13
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/iife/es5/engine-dom.js +70 -13
- 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 +71 -11
- package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom.js +63 -15
- 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 +64 -13
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es5/engine-dom.js +70 -13
- 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 +71 -11
- package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-server/commonjs/es2017/engine-server.js +7 -7
- 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 +7 -7
- package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +4 -4
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +4 -4
- 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 +4 -4
- 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 +4 -4
- 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 +4 -4
- 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
|
@@ -43,7 +43,16 @@ var assert = /*#__PURE__*/Object.freeze({
|
|
|
43
43
|
*/
|
|
44
44
|
const { assign, create, defineProperties, defineProperty, freeze, getOwnPropertyDescriptor: getOwnPropertyDescriptor$1, getOwnPropertyNames: getOwnPropertyNames$1, getPrototypeOf: getPrototypeOf$1, hasOwnProperty: hasOwnProperty$1, isFrozen, keys, seal, setPrototypeOf, } = Object;
|
|
45
45
|
const { isArray: isArray$1 } = Array;
|
|
46
|
-
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;
|
|
46
|
+
const { concat: ArrayConcat$1, copyWithin: ArrayCopyWithin, every: ArrayEvery, fill: ArrayFill, filter: ArrayFilter, find: ArrayFind, findIndex: ArrayFindIndex, includes: ArrayIncludes, 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;
|
|
47
|
+
// The type of the return value of Array.prototype.every is `this is T[]`. However, once this
|
|
48
|
+
// Array method is pulled out of the prototype, the function is now referencing `this` where
|
|
49
|
+
// `this` is meaningless, resulting in a TypeScript compilation error.
|
|
50
|
+
//
|
|
51
|
+
// Exposing this helper function is the closest we can get to preserving the usage patterns
|
|
52
|
+
// of Array.prototype methods used elsewhere in the codebase.
|
|
53
|
+
function arrayEvery(arr, predicate) {
|
|
54
|
+
return ArrayEvery.call(arr, predicate);
|
|
55
|
+
}
|
|
47
56
|
const { fromCharCode: StringFromCharCode } = String;
|
|
48
57
|
const { charCodeAt: StringCharCodeAt, replace: StringReplace, split: StringSplit, slice: StringSlice, toLowerCase: StringToLowerCase, } = String.prototype;
|
|
49
58
|
function isUndefined$1(obj) {
|
|
@@ -329,9 +338,9 @@ function htmlAttributeToProperty(attrName) {
|
|
|
329
338
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
330
339
|
*/
|
|
331
340
|
// Increment whenever the LWC template compiler changes
|
|
332
|
-
const LWC_VERSION = "2.45.
|
|
341
|
+
const LWC_VERSION = "2.45.2";
|
|
333
342
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
334
|
-
/** version: 2.45.
|
|
343
|
+
/** version: 2.45.2 */
|
|
335
344
|
|
|
336
345
|
/**
|
|
337
346
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -409,7 +418,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
409
418
|
setFeatureFlag(name, value);
|
|
410
419
|
}
|
|
411
420
|
}
|
|
412
|
-
/** version: 2.45.
|
|
421
|
+
/** version: 2.45.2 */
|
|
413
422
|
|
|
414
423
|
/**
|
|
415
424
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -473,7 +482,7 @@ function applyAriaReflection(prototype = Element.prototype) {
|
|
|
473
482
|
}
|
|
474
483
|
}
|
|
475
484
|
}
|
|
476
|
-
/** version: 2.45.
|
|
485
|
+
/** version: 2.45.2 */
|
|
477
486
|
|
|
478
487
|
/*
|
|
479
488
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6702,6 +6711,27 @@ function textNodeContentsAreEqual(node, vnode, renderer) {
|
|
|
6702
6711
|
}
|
|
6703
6712
|
return false;
|
|
6704
6713
|
}
|
|
6714
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
6715
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
6716
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
6717
|
+
function getValidationPredicate(optOutStaticProp) {
|
|
6718
|
+
if (isUndefined$1(optOutStaticProp)) {
|
|
6719
|
+
return (_attrName) => true;
|
|
6720
|
+
}
|
|
6721
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
6722
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
6723
|
+
if (isTrue(optOutStaticProp)) {
|
|
6724
|
+
return (_attrName) => false;
|
|
6725
|
+
}
|
|
6726
|
+
// If validationOptOut is an array of strings, attributes specified in the
|
|
6727
|
+
// array will be "opted out". Attributes not specified in the array will still
|
|
6728
|
+
// be validated.
|
|
6729
|
+
if (isArray$1(optOutStaticProp) && arrayEvery(optOutStaticProp, isString)) {
|
|
6730
|
+
return (attrName) => !ArrayIncludes.call(optOutStaticProp, attrName);
|
|
6731
|
+
}
|
|
6732
|
+
logWarn('Validation opt out must be `true` or an array of attributes that should not be validated.');
|
|
6733
|
+
return (_attrName) => true;
|
|
6734
|
+
}
|
|
6705
6735
|
function hydrateText(node, vnode, renderer) {
|
|
6706
6736
|
var _a;
|
|
6707
6737
|
if (!hasCorrectNodeType(vnode, node, 3 /* EnvNodeTypes.TEXT */, renderer)) {
|
|
@@ -6780,8 +6810,19 @@ function hydrateElement(elm, vnode, renderer) {
|
|
|
6780
6810
|
return elm;
|
|
6781
6811
|
}
|
|
6782
6812
|
function hydrateCustomElement(elm, vnode, renderer) {
|
|
6813
|
+
const { validationOptOut } = vnode.ctor;
|
|
6814
|
+
const shouldValidateAttr = getValidationPredicate(validationOptOut);
|
|
6815
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
6816
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
6817
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
6818
|
+
//
|
|
6819
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
6820
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
6821
|
+
//
|
|
6822
|
+
// Therefore, if validationOptOut is falsey or an array of strings, we need to
|
|
6823
|
+
// examine some or all of the custom element's attributes.
|
|
6783
6824
|
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) ||
|
|
6784
|
-
!isMatchingElement(vnode, elm, renderer)) {
|
|
6825
|
+
!isMatchingElement(vnode, elm, renderer, shouldValidateAttr)) {
|
|
6785
6826
|
return handleMismatch(elm, vnode, renderer);
|
|
6786
6827
|
}
|
|
6787
6828
|
const { sel, mode, ctor, owner } = vnode;
|
|
@@ -6875,7 +6916,7 @@ function hasCorrectNodeType(vnode, node, nodeType, renderer) {
|
|
|
6875
6916
|
}
|
|
6876
6917
|
return true;
|
|
6877
6918
|
}
|
|
6878
|
-
function isMatchingElement(vnode, elm, renderer) {
|
|
6919
|
+
function isMatchingElement(vnode, elm, renderer, shouldValidateAttr = () => true) {
|
|
6879
6920
|
const { getProperty } = renderer;
|
|
6880
6921
|
if (vnode.sel.toLowerCase() !== getProperty(elm, 'tagName').toLowerCase()) {
|
|
6881
6922
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -6883,10 +6924,14 @@ function isMatchingElement(vnode, elm, renderer) {
|
|
|
6883
6924
|
}
|
|
6884
6925
|
return false;
|
|
6885
6926
|
}
|
|
6886
|
-
const
|
|
6887
|
-
const
|
|
6888
|
-
|
|
6889
|
-
|
|
6927
|
+
const hasCompatibleAttrs = validateAttrs(vnode, elm, renderer, shouldValidateAttr);
|
|
6928
|
+
const hasCompatibleClass = shouldValidateAttr('class')
|
|
6929
|
+
? validateClassAttr(vnode, elm, renderer)
|
|
6930
|
+
: true;
|
|
6931
|
+
const hasCompatibleStyle = shouldValidateAttr('style')
|
|
6932
|
+
? validateStyleAttr(vnode, elm, renderer)
|
|
6933
|
+
: true;
|
|
6934
|
+
return hasCompatibleAttrs && hasCompatibleClass && hasCompatibleStyle;
|
|
6890
6935
|
}
|
|
6891
6936
|
function attributeValuesAreEqual(vnodeValue, value) {
|
|
6892
6937
|
const vnodeValueAsString = String(vnodeValue);
|
|
@@ -6901,12 +6946,15 @@ function attributeValuesAreEqual(vnodeValue, value) {
|
|
|
6901
6946
|
// In all other cases, the two values are not considered equal
|
|
6902
6947
|
return false;
|
|
6903
6948
|
}
|
|
6904
|
-
function validateAttrs(vnode, elm, renderer) {
|
|
6949
|
+
function validateAttrs(vnode, elm, renderer, shouldValidateAttr) {
|
|
6905
6950
|
const { data: { attrs = {} }, } = vnode;
|
|
6906
6951
|
let nodesAreCompatible = true;
|
|
6907
6952
|
// Validate attributes, though we could always recovery from those by running the update mods.
|
|
6908
6953
|
// Note: intentionally ONLY matching vnodes.attrs to elm.attrs, in case SSR is adding extra attributes.
|
|
6909
6954
|
for (const [attrName, attrValue] of Object.entries(attrs)) {
|
|
6955
|
+
if (!shouldValidateAttr(attrName)) {
|
|
6956
|
+
continue;
|
|
6957
|
+
}
|
|
6910
6958
|
const { owner } = vnode;
|
|
6911
6959
|
const { getAttribute } = renderer;
|
|
6912
6960
|
const elmAttrValue = getAttribute(elm, attrName);
|
|
@@ -7330,7 +7378,7 @@ function readonly(obj) {
|
|
|
7330
7378
|
}
|
|
7331
7379
|
return getReadOnlyProxy(obj);
|
|
7332
7380
|
}
|
|
7333
|
-
/* version: 2.45.
|
|
7381
|
+
/* version: 2.45.2 */
|
|
7334
7382
|
|
|
7335
7383
|
/*
|
|
7336
7384
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7758,7 +7806,7 @@ function rendererFactory(baseRenderer) {
|
|
|
7758
7806
|
function isNull(obj) {
|
|
7759
7807
|
return obj === null;
|
|
7760
7808
|
}
|
|
7761
|
-
/** version: 2.45.
|
|
7809
|
+
/** version: 2.45.2 */
|
|
7762
7810
|
|
|
7763
7811
|
/*
|
|
7764
7812
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8377,7 +8425,7 @@ function registerContextProvider(elm, adapterContextToken, onContextSubscription
|
|
|
8377
8425
|
});
|
|
8378
8426
|
}));
|
|
8379
8427
|
}
|
|
8380
|
-
/* version: 2.45.
|
|
8428
|
+
/* version: 2.45.2 */
|
|
8381
8429
|
|
|
8382
8430
|
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 };
|
|
8383
8431
|
//# sourceMappingURL=engine-dom.js.map
|