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
|
@@ -90,8 +90,10 @@
|
|
|
90
90
|
var isArray$1 = Array.isArray;
|
|
91
91
|
var _Array$prototype = Array.prototype,
|
|
92
92
|
ArrayCopyWithin = _Array$prototype.copyWithin,
|
|
93
|
+
ArrayEvery = _Array$prototype.every,
|
|
93
94
|
ArrayFill = _Array$prototype.fill,
|
|
94
95
|
ArrayFilter = _Array$prototype.filter,
|
|
96
|
+
ArrayIncludes = _Array$prototype.includes,
|
|
95
97
|
ArrayIndexOf = _Array$prototype.indexOf,
|
|
96
98
|
ArrayJoin = _Array$prototype.join,
|
|
97
99
|
ArrayMap = _Array$prototype.map,
|
|
@@ -105,6 +107,15 @@
|
|
|
105
107
|
ArraySplice = _Array$prototype.splice,
|
|
106
108
|
ArrayUnshift = _Array$prototype.unshift,
|
|
107
109
|
forEach = _Array$prototype.forEach;
|
|
110
|
+
// The type of the return value of Array.prototype.every is `this is T[]`. However, once this
|
|
111
|
+
// Array method is pulled out of the prototype, the function is now referencing `this` where
|
|
112
|
+
// `this` is meaningless, resulting in a TypeScript compilation error.
|
|
113
|
+
//
|
|
114
|
+
// Exposing this helper function is the closest we can get to preserving the usage patterns
|
|
115
|
+
// of Array.prototype methods used elsewhere in the codebase.
|
|
116
|
+
function arrayEvery(arr, predicate) {
|
|
117
|
+
return ArrayEvery.call(arr, predicate);
|
|
118
|
+
}
|
|
108
119
|
var StringFromCharCode = String.fromCharCode;
|
|
109
120
|
var _String$prototype = String.prototype,
|
|
110
121
|
StringCharCodeAt = _String$prototype.charCodeAt,
|
|
@@ -330,9 +341,9 @@
|
|
|
330
341
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
331
342
|
*/
|
|
332
343
|
// Increment whenever the LWC template compiler changes
|
|
333
|
-
var LWC_VERSION = "2.45.
|
|
344
|
+
var LWC_VERSION = "2.45.2";
|
|
334
345
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
335
|
-
/** version: 2.45.
|
|
346
|
+
/** version: 2.45.2 */
|
|
336
347
|
|
|
337
348
|
/**
|
|
338
349
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -412,7 +423,7 @@
|
|
|
412
423
|
setFeatureFlag(name, value);
|
|
413
424
|
}
|
|
414
425
|
}
|
|
415
|
-
/** version: 2.45.
|
|
426
|
+
/** version: 2.45.2 */
|
|
416
427
|
|
|
417
428
|
/**
|
|
418
429
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -476,7 +487,7 @@
|
|
|
476
487
|
}
|
|
477
488
|
}
|
|
478
489
|
}
|
|
479
|
-
/** version: 2.45.
|
|
490
|
+
/** version: 2.45.2 */
|
|
480
491
|
|
|
481
492
|
/*
|
|
482
493
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7026,6 +7037,35 @@
|
|
|
7026
7037
|
}
|
|
7027
7038
|
return false;
|
|
7028
7039
|
}
|
|
7040
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
7041
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
7042
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
7043
|
+
function getValidationPredicate(optOutStaticProp) {
|
|
7044
|
+
if (isUndefined$1(optOutStaticProp)) {
|
|
7045
|
+
return function (_attrName) {
|
|
7046
|
+
return true;
|
|
7047
|
+
};
|
|
7048
|
+
}
|
|
7049
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
7050
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
7051
|
+
if (isTrue(optOutStaticProp)) {
|
|
7052
|
+
return function (_attrName) {
|
|
7053
|
+
return false;
|
|
7054
|
+
};
|
|
7055
|
+
}
|
|
7056
|
+
// If validationOptOut is an array of strings, attributes specified in the
|
|
7057
|
+
// array will be "opted out". Attributes not specified in the array will still
|
|
7058
|
+
// be validated.
|
|
7059
|
+
if (isArray$1(optOutStaticProp) && arrayEvery(optOutStaticProp, isString)) {
|
|
7060
|
+
return function (attrName) {
|
|
7061
|
+
return !ArrayIncludes.call(optOutStaticProp, attrName);
|
|
7062
|
+
};
|
|
7063
|
+
}
|
|
7064
|
+
logWarn('Validation opt out must be `true` or an array of attributes that should not be validated.');
|
|
7065
|
+
return function (_attrName) {
|
|
7066
|
+
return true;
|
|
7067
|
+
};
|
|
7068
|
+
}
|
|
7029
7069
|
function hydrateText(node, vnode, renderer) {
|
|
7030
7070
|
var _a;
|
|
7031
7071
|
if (!hasCorrectNodeType(vnode, node, 3 /* EnvNodeTypes.TEXT */, renderer)) {
|
|
@@ -7105,7 +7145,18 @@
|
|
|
7105
7145
|
return elm;
|
|
7106
7146
|
}
|
|
7107
7147
|
function hydrateCustomElement(elm, vnode, renderer) {
|
|
7108
|
-
|
|
7148
|
+
var validationOptOut = vnode.ctor.validationOptOut;
|
|
7149
|
+
var shouldValidateAttr = getValidationPredicate(validationOptOut);
|
|
7150
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
7151
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
7152
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
7153
|
+
//
|
|
7154
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
7155
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
7156
|
+
//
|
|
7157
|
+
// Therefore, if validationOptOut is falsey or an array of strings, we need to
|
|
7158
|
+
// examine some or all of the custom element's attributes.
|
|
7159
|
+
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) || !isMatchingElement(vnode, elm, renderer, shouldValidateAttr)) {
|
|
7109
7160
|
return handleMismatch(elm, vnode, renderer);
|
|
7110
7161
|
}
|
|
7111
7162
|
var sel = vnode.sel,
|
|
@@ -7202,6 +7253,9 @@
|
|
|
7202
7253
|
return true;
|
|
7203
7254
|
}
|
|
7204
7255
|
function isMatchingElement(vnode, elm, renderer) {
|
|
7256
|
+
var shouldValidateAttr = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
|
|
7257
|
+
return true;
|
|
7258
|
+
};
|
|
7205
7259
|
var getProperty = renderer.getProperty;
|
|
7206
7260
|
if (vnode.sel.toLowerCase() !== getProperty(elm, 'tagName').toLowerCase()) {
|
|
7207
7261
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -7209,10 +7263,10 @@
|
|
|
7209
7263
|
}
|
|
7210
7264
|
return false;
|
|
7211
7265
|
}
|
|
7212
|
-
var
|
|
7213
|
-
var
|
|
7214
|
-
var
|
|
7215
|
-
return
|
|
7266
|
+
var hasCompatibleAttrs = validateAttrs(vnode, elm, renderer, shouldValidateAttr);
|
|
7267
|
+
var hasCompatibleClass = shouldValidateAttr('class') ? validateClassAttr(vnode, elm, renderer) : true;
|
|
7268
|
+
var hasCompatibleStyle = shouldValidateAttr('style') ? validateStyleAttr(vnode, elm, renderer) : true;
|
|
7269
|
+
return hasCompatibleAttrs && hasCompatibleClass && hasCompatibleStyle;
|
|
7216
7270
|
}
|
|
7217
7271
|
function attributeValuesAreEqual(vnodeValue, value) {
|
|
7218
7272
|
var vnodeValueAsString = String(vnodeValue);
|
|
@@ -7227,7 +7281,7 @@
|
|
|
7227
7281
|
// In all other cases, the two values are not considered equal
|
|
7228
7282
|
return false;
|
|
7229
7283
|
}
|
|
7230
|
-
function validateAttrs(vnode, elm, renderer) {
|
|
7284
|
+
function validateAttrs(vnode, elm, renderer, shouldValidateAttr) {
|
|
7231
7285
|
var _vnode$data$attrs = vnode.data.attrs,
|
|
7232
7286
|
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
|
|
7233
7287
|
var nodesAreCompatible = true;
|
|
@@ -7237,6 +7291,9 @@
|
|
|
7237
7291
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i37], 2),
|
|
7238
7292
|
attrName = _Object$entries$_i[0],
|
|
7239
7293
|
attrValue = _Object$entries$_i[1];
|
|
7294
|
+
if (!shouldValidateAttr(attrName)) {
|
|
7295
|
+
continue;
|
|
7296
|
+
}
|
|
7240
7297
|
var owner = vnode.owner;
|
|
7241
7298
|
var getAttribute = renderer.getAttribute;
|
|
7242
7299
|
var elmAttrValue = getAttribute(elm, attrName);
|
|
@@ -7688,7 +7745,7 @@
|
|
|
7688
7745
|
}
|
|
7689
7746
|
return getReadOnlyProxy(obj);
|
|
7690
7747
|
}
|
|
7691
|
-
/* version: 2.45.
|
|
7748
|
+
/* version: 2.45.2 */
|
|
7692
7749
|
|
|
7693
7750
|
/*
|
|
7694
7751
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8114,7 +8171,7 @@
|
|
|
8114
8171
|
function isNull(obj) {
|
|
8115
8172
|
return obj === null;
|
|
8116
8173
|
}
|
|
8117
|
-
/** version: 2.45.
|
|
8174
|
+
/** version: 2.45.2 */
|
|
8118
8175
|
|
|
8119
8176
|
/*
|
|
8120
8177
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8756,7 +8813,7 @@
|
|
|
8756
8813
|
});
|
|
8757
8814
|
});
|
|
8758
8815
|
}
|
|
8759
|
-
/* version: 2.45.
|
|
8816
|
+
/* version: 2.45.2 */
|
|
8760
8817
|
|
|
8761
8818
|
exports.LightningElement = LightningElement;
|
|
8762
8819
|
exports.__unstable__ProfilerControl = profilerControl;
|