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
|
@@ -87,8 +87,10 @@ var LWC = (function (exports) {
|
|
|
87
87
|
var isArray$1 = Array.isArray;
|
|
88
88
|
var _Array$prototype = Array.prototype,
|
|
89
89
|
ArrayCopyWithin = _Array$prototype.copyWithin,
|
|
90
|
+
ArrayEvery = _Array$prototype.every,
|
|
90
91
|
ArrayFill = _Array$prototype.fill,
|
|
91
92
|
ArrayFilter = _Array$prototype.filter,
|
|
93
|
+
ArrayIncludes = _Array$prototype.includes,
|
|
92
94
|
ArrayIndexOf = _Array$prototype.indexOf,
|
|
93
95
|
ArrayJoin = _Array$prototype.join,
|
|
94
96
|
ArrayMap = _Array$prototype.map,
|
|
@@ -102,6 +104,15 @@ var LWC = (function (exports) {
|
|
|
102
104
|
ArraySplice = _Array$prototype.splice,
|
|
103
105
|
ArrayUnshift = _Array$prototype.unshift,
|
|
104
106
|
forEach = _Array$prototype.forEach;
|
|
107
|
+
// The type of the return value of Array.prototype.every is `this is T[]`. However, once this
|
|
108
|
+
// Array method is pulled out of the prototype, the function is now referencing `this` where
|
|
109
|
+
// `this` is meaningless, resulting in a TypeScript compilation error.
|
|
110
|
+
//
|
|
111
|
+
// Exposing this helper function is the closest we can get to preserving the usage patterns
|
|
112
|
+
// of Array.prototype methods used elsewhere in the codebase.
|
|
113
|
+
function arrayEvery(arr, predicate) {
|
|
114
|
+
return ArrayEvery.call(arr, predicate);
|
|
115
|
+
}
|
|
105
116
|
var StringFromCharCode = String.fromCharCode;
|
|
106
117
|
var _String$prototype = String.prototype,
|
|
107
118
|
StringCharCodeAt = _String$prototype.charCodeAt,
|
|
@@ -327,9 +338,9 @@ var LWC = (function (exports) {
|
|
|
327
338
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
328
339
|
*/
|
|
329
340
|
// Increment whenever the LWC template compiler changes
|
|
330
|
-
var LWC_VERSION = "2.45.
|
|
341
|
+
var LWC_VERSION = "2.45.2";
|
|
331
342
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
332
|
-
/** version: 2.45.
|
|
343
|
+
/** version: 2.45.2 */
|
|
333
344
|
|
|
334
345
|
/**
|
|
335
346
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -409,7 +420,7 @@ var LWC = (function (exports) {
|
|
|
409
420
|
setFeatureFlag(name, value);
|
|
410
421
|
}
|
|
411
422
|
}
|
|
412
|
-
/** version: 2.45.
|
|
423
|
+
/** version: 2.45.2 */
|
|
413
424
|
|
|
414
425
|
/**
|
|
415
426
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -473,7 +484,7 @@ var LWC = (function (exports) {
|
|
|
473
484
|
}
|
|
474
485
|
}
|
|
475
486
|
}
|
|
476
|
-
/** version: 2.45.
|
|
487
|
+
/** version: 2.45.2 */
|
|
477
488
|
|
|
478
489
|
/*
|
|
479
490
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7023,6 +7034,35 @@ var LWC = (function (exports) {
|
|
|
7023
7034
|
}
|
|
7024
7035
|
return false;
|
|
7025
7036
|
}
|
|
7037
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
7038
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
7039
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
7040
|
+
function getValidationPredicate(optOutStaticProp) {
|
|
7041
|
+
if (isUndefined$1(optOutStaticProp)) {
|
|
7042
|
+
return function (_attrName) {
|
|
7043
|
+
return true;
|
|
7044
|
+
};
|
|
7045
|
+
}
|
|
7046
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
7047
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
7048
|
+
if (isTrue(optOutStaticProp)) {
|
|
7049
|
+
return function (_attrName) {
|
|
7050
|
+
return false;
|
|
7051
|
+
};
|
|
7052
|
+
}
|
|
7053
|
+
// If validationOptOut is an array of strings, attributes specified in the
|
|
7054
|
+
// array will be "opted out". Attributes not specified in the array will still
|
|
7055
|
+
// be validated.
|
|
7056
|
+
if (isArray$1(optOutStaticProp) && arrayEvery(optOutStaticProp, isString)) {
|
|
7057
|
+
return function (attrName) {
|
|
7058
|
+
return !ArrayIncludes.call(optOutStaticProp, attrName);
|
|
7059
|
+
};
|
|
7060
|
+
}
|
|
7061
|
+
logWarn('Validation opt out must be `true` or an array of attributes that should not be validated.');
|
|
7062
|
+
return function (_attrName) {
|
|
7063
|
+
return true;
|
|
7064
|
+
};
|
|
7065
|
+
}
|
|
7026
7066
|
function hydrateText(node, vnode, renderer) {
|
|
7027
7067
|
var _a;
|
|
7028
7068
|
if (!hasCorrectNodeType(vnode, node, 3 /* EnvNodeTypes.TEXT */, renderer)) {
|
|
@@ -7102,7 +7142,18 @@ var LWC = (function (exports) {
|
|
|
7102
7142
|
return elm;
|
|
7103
7143
|
}
|
|
7104
7144
|
function hydrateCustomElement(elm, vnode, renderer) {
|
|
7105
|
-
|
|
7145
|
+
var validationOptOut = vnode.ctor.validationOptOut;
|
|
7146
|
+
var shouldValidateAttr = getValidationPredicate(validationOptOut);
|
|
7147
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
7148
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
7149
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
7150
|
+
//
|
|
7151
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
7152
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
7153
|
+
//
|
|
7154
|
+
// Therefore, if validationOptOut is falsey or an array of strings, we need to
|
|
7155
|
+
// examine some or all of the custom element's attributes.
|
|
7156
|
+
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) || !isMatchingElement(vnode, elm, renderer, shouldValidateAttr)) {
|
|
7106
7157
|
return handleMismatch(elm, vnode, renderer);
|
|
7107
7158
|
}
|
|
7108
7159
|
var sel = vnode.sel,
|
|
@@ -7199,6 +7250,9 @@ var LWC = (function (exports) {
|
|
|
7199
7250
|
return true;
|
|
7200
7251
|
}
|
|
7201
7252
|
function isMatchingElement(vnode, elm, renderer) {
|
|
7253
|
+
var shouldValidateAttr = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
|
|
7254
|
+
return true;
|
|
7255
|
+
};
|
|
7202
7256
|
var getProperty = renderer.getProperty;
|
|
7203
7257
|
if (vnode.sel.toLowerCase() !== getProperty(elm, 'tagName').toLowerCase()) {
|
|
7204
7258
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -7206,10 +7260,10 @@ var LWC = (function (exports) {
|
|
|
7206
7260
|
}
|
|
7207
7261
|
return false;
|
|
7208
7262
|
}
|
|
7209
|
-
var
|
|
7210
|
-
var
|
|
7211
|
-
var
|
|
7212
|
-
return
|
|
7263
|
+
var hasCompatibleAttrs = validateAttrs(vnode, elm, renderer, shouldValidateAttr);
|
|
7264
|
+
var hasCompatibleClass = shouldValidateAttr('class') ? validateClassAttr(vnode, elm, renderer) : true;
|
|
7265
|
+
var hasCompatibleStyle = shouldValidateAttr('style') ? validateStyleAttr(vnode, elm, renderer) : true;
|
|
7266
|
+
return hasCompatibleAttrs && hasCompatibleClass && hasCompatibleStyle;
|
|
7213
7267
|
}
|
|
7214
7268
|
function attributeValuesAreEqual(vnodeValue, value) {
|
|
7215
7269
|
var vnodeValueAsString = String(vnodeValue);
|
|
@@ -7224,7 +7278,7 @@ var LWC = (function (exports) {
|
|
|
7224
7278
|
// In all other cases, the two values are not considered equal
|
|
7225
7279
|
return false;
|
|
7226
7280
|
}
|
|
7227
|
-
function validateAttrs(vnode, elm, renderer) {
|
|
7281
|
+
function validateAttrs(vnode, elm, renderer, shouldValidateAttr) {
|
|
7228
7282
|
var _vnode$data$attrs = vnode.data.attrs,
|
|
7229
7283
|
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
|
|
7230
7284
|
var nodesAreCompatible = true;
|
|
@@ -7234,6 +7288,9 @@ var LWC = (function (exports) {
|
|
|
7234
7288
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i37], 2),
|
|
7235
7289
|
attrName = _Object$entries$_i[0],
|
|
7236
7290
|
attrValue = _Object$entries$_i[1];
|
|
7291
|
+
if (!shouldValidateAttr(attrName)) {
|
|
7292
|
+
continue;
|
|
7293
|
+
}
|
|
7237
7294
|
var owner = vnode.owner;
|
|
7238
7295
|
var getAttribute = renderer.getAttribute;
|
|
7239
7296
|
var elmAttrValue = getAttribute(elm, attrName);
|
|
@@ -7685,7 +7742,7 @@ var LWC = (function (exports) {
|
|
|
7685
7742
|
}
|
|
7686
7743
|
return getReadOnlyProxy(obj);
|
|
7687
7744
|
}
|
|
7688
|
-
/* version: 2.45.
|
|
7745
|
+
/* version: 2.45.2 */
|
|
7689
7746
|
|
|
7690
7747
|
/*
|
|
7691
7748
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8111,7 +8168,7 @@ var LWC = (function (exports) {
|
|
|
8111
8168
|
function isNull(obj) {
|
|
8112
8169
|
return obj === null;
|
|
8113
8170
|
}
|
|
8114
|
-
/** version: 2.45.
|
|
8171
|
+
/** version: 2.45.2 */
|
|
8115
8172
|
|
|
8116
8173
|
/*
|
|
8117
8174
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8753,7 +8810,7 @@ var LWC = (function (exports) {
|
|
|
8753
8810
|
});
|
|
8754
8811
|
});
|
|
8755
8812
|
}
|
|
8756
|
-
/* version: 2.45.
|
|
8813
|
+
/* version: 2.45.2 */
|
|
8757
8814
|
|
|
8758
8815
|
exports.LightningElement = LightningElement;
|
|
8759
8816
|
exports.__unstable__ProfilerControl = profilerControl;
|