lwc 2.45.1 → 2.45.3
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 +101 -60
- package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom.js +101 -60
- 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 +110 -58
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/iife/es5/engine-dom.js +114 -62
- 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 +123 -60
- package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom.js +101 -60
- 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 +110 -58
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es5/engine-dom.js +114 -62
- 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 +123 -60
- package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-server/commonjs/es2017/engine-server.js +7796 -92
- 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 +7795 -72
- package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +72 -13
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +72 -13
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +40 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +56 -6
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +71 -12
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +39 -1
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +43 -4
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +72 -13
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +40 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +56 -6
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js.map +1 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +71 -12
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +39 -1
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +43 -4
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js.map +1 -1
- package/dist/wire-service/esm/es2017/wire-service.js +10 -4
- package/dist/wire-service/esm/es2017/wire-service.js.map +1 -1
- package/dist/wire-service/iife/es2017/wire-service.js +10 -4
- package/dist/wire-service/iife/es2017/wire-service.js.map +1 -1
- package/dist/wire-service/iife/es2017/wire-service_debug.js +10 -4
- package/dist/wire-service/iife/es2017/wire-service_debug.js.map +1 -1
- package/dist/wire-service/iife/es5/wire-service.js +10 -4
- package/dist/wire-service/iife/es5/wire-service.js.map +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +10 -4
- package/dist/wire-service/iife/es5/wire-service_debug.js.map +1 -1
- package/dist/wire-service/umd/es2017/wire-service.js +10 -4
- package/dist/wire-service/umd/es2017/wire-service.js.map +1 -1
- package/dist/wire-service/umd/es2017/wire-service_debug.js +10 -4
- package/dist/wire-service/umd/es2017/wire-service_debug.js.map +1 -1
- package/dist/wire-service/umd/es5/wire-service.js +10 -4
- package/dist/wire-service/umd/es5/wire-service.js.map +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +10 -4
- package/dist/wire-service/umd/es5/wire-service_debug.js.map +1 -1
- package/package.json +7 -7
|
@@ -29,9 +29,11 @@ var LWC = (function (exports) {
|
|
|
29
29
|
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return _typeof(key) === "symbol" ? key : String(key); }
|
|
30
30
|
function _toPrimitive(input, hint) { if (_typeof(input) !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (_typeof(res) !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
31
31
|
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
32
|
-
/* proxy-compat-disable */
|
|
33
32
|
/**
|
|
34
|
-
* Copyright (C)
|
|
33
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
34
|
+
*/
|
|
35
|
+
/**
|
|
36
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
35
37
|
*/
|
|
36
38
|
/*
|
|
37
39
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -87,8 +89,10 @@ var LWC = (function (exports) {
|
|
|
87
89
|
var isArray$1 = Array.isArray;
|
|
88
90
|
var _Array$prototype = Array.prototype,
|
|
89
91
|
ArrayCopyWithin = _Array$prototype.copyWithin,
|
|
92
|
+
ArrayEvery = _Array$prototype.every,
|
|
90
93
|
ArrayFill = _Array$prototype.fill,
|
|
91
94
|
ArrayFilter = _Array$prototype.filter,
|
|
95
|
+
ArrayIncludes = _Array$prototype.includes,
|
|
92
96
|
ArrayIndexOf = _Array$prototype.indexOf,
|
|
93
97
|
ArrayJoin = _Array$prototype.join,
|
|
94
98
|
ArrayMap = _Array$prototype.map,
|
|
@@ -102,6 +106,15 @@ var LWC = (function (exports) {
|
|
|
102
106
|
ArraySplice = _Array$prototype.splice,
|
|
103
107
|
ArrayUnshift = _Array$prototype.unshift,
|
|
104
108
|
forEach = _Array$prototype.forEach;
|
|
109
|
+
// The type of the return value of Array.prototype.every is `this is T[]`. However, once this
|
|
110
|
+
// Array method is pulled out of the prototype, the function is now referencing `this` where
|
|
111
|
+
// `this` is meaningless, resulting in a TypeScript compilation error.
|
|
112
|
+
//
|
|
113
|
+
// Exposing this helper function is the closest we can get to preserving the usage patterns
|
|
114
|
+
// of Array.prototype methods used elsewhere in the codebase.
|
|
115
|
+
function arrayEvery(arr, predicate) {
|
|
116
|
+
return ArrayEvery.call(arr, predicate);
|
|
117
|
+
}
|
|
105
118
|
var StringFromCharCode = String.fromCharCode;
|
|
106
119
|
var _String$prototype = String.prototype,
|
|
107
120
|
StringCharCodeAt = _String$prototype.charCodeAt,
|
|
@@ -204,7 +217,7 @@ var LWC = (function (exports) {
|
|
|
204
217
|
AriaPropNameToAttrNameMap = _ref.AriaPropNameToAttrNameMap;
|
|
205
218
|
// These attributes take either an ID or a list of IDs as values.
|
|
206
219
|
// This includes aria-* attributes as well as the special non-ARIA "for" attribute
|
|
207
|
-
var ID_REFERENCING_ATTRIBUTES_SET = new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
|
|
220
|
+
var ID_REFERENCING_ATTRIBUTES_SET = /*@__PURE__*/new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
|
|
208
221
|
|
|
209
222
|
/*
|
|
210
223
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -267,11 +280,11 @@ var LWC = (function (exports) {
|
|
|
267
280
|
/**
|
|
268
281
|
* Map associating previously transformed HTML property into HTML attribute.
|
|
269
282
|
*/
|
|
270
|
-
var CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
|
|
283
|
+
var CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/new Map();
|
|
271
284
|
/**
|
|
272
285
|
* Map associating previously transformed HTML attribute into HTML property.
|
|
273
286
|
*/
|
|
274
|
-
var CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
287
|
+
var CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/new Map();
|
|
275
288
|
function htmlPropertyToAttribute(propName) {
|
|
276
289
|
var ariaAttributeName = AriaPropNameToAttrNameMap[propName];
|
|
277
290
|
if (!isUndefined$1(ariaAttributeName)) {
|
|
@@ -327,12 +340,12 @@ var LWC = (function (exports) {
|
|
|
327
340
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
328
341
|
*/
|
|
329
342
|
// Increment whenever the LWC template compiler changes
|
|
330
|
-
var LWC_VERSION = "2.45.
|
|
343
|
+
var LWC_VERSION = "2.45.3";
|
|
331
344
|
var LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
332
|
-
/** version: 2.45.
|
|
345
|
+
/** version: 2.45.3 */
|
|
333
346
|
|
|
334
347
|
/**
|
|
335
|
-
* Copyright (C)
|
|
348
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
336
349
|
*/
|
|
337
350
|
|
|
338
351
|
/*
|
|
@@ -409,10 +422,10 @@ var LWC = (function (exports) {
|
|
|
409
422
|
setFeatureFlag(name, value);
|
|
410
423
|
}
|
|
411
424
|
}
|
|
412
|
-
/** version: 2.45.
|
|
425
|
+
/** version: 2.45.3 */
|
|
413
426
|
|
|
414
427
|
/**
|
|
415
|
-
* Copyright (C)
|
|
428
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
416
429
|
*/
|
|
417
430
|
|
|
418
431
|
/*
|
|
@@ -473,7 +486,7 @@ var LWC = (function (exports) {
|
|
|
473
486
|
}
|
|
474
487
|
}
|
|
475
488
|
}
|
|
476
|
-
/** version: 2.45.
|
|
489
|
+
/** version: 2.45.3 */
|
|
477
490
|
|
|
478
491
|
/*
|
|
479
492
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -487,7 +500,9 @@ var LWC = (function (exports) {
|
|
|
487
500
|
applyAriaReflection();
|
|
488
501
|
}
|
|
489
502
|
|
|
490
|
-
|
|
503
|
+
/**
|
|
504
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
505
|
+
*/
|
|
491
506
|
|
|
492
507
|
/*
|
|
493
508
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -940,19 +955,6 @@ var LWC = (function (exports) {
|
|
|
940
955
|
*/
|
|
941
956
|
// These properties get added to LWCElement.prototype publicProps automatically
|
|
942
957
|
var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
|
|
943
|
-
var controlledElement = null;
|
|
944
|
-
var controlledAttributeName;
|
|
945
|
-
function isAttributeLocked(elm, attrName) {
|
|
946
|
-
return elm !== controlledElement || attrName !== controlledAttributeName;
|
|
947
|
-
}
|
|
948
|
-
function lockAttribute(_elm, _key) {
|
|
949
|
-
controlledElement = null;
|
|
950
|
-
controlledAttributeName = undefined;
|
|
951
|
-
}
|
|
952
|
-
function unlockAttribute(elm, key) {
|
|
953
|
-
controlledElement = elm;
|
|
954
|
-
controlledAttributeName = key;
|
|
955
|
-
}
|
|
956
958
|
|
|
957
959
|
/*
|
|
958
960
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -991,6 +993,7 @@ var LWC = (function (exports) {
|
|
|
991
993
|
* SPDX-License-Identifier: MIT
|
|
992
994
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
993
995
|
*/
|
|
996
|
+
/* eslint @lwc/lwc-internal/no-production-assert: "off" */
|
|
994
997
|
function generateDataDescriptor(options) {
|
|
995
998
|
return assign({
|
|
996
999
|
configurable: true,
|
|
@@ -1936,6 +1939,14 @@ var LWC = (function (exports) {
|
|
|
1936
1939
|
* SPDX-License-Identifier: MIT
|
|
1937
1940
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1938
1941
|
*/
|
|
1942
|
+
/**
|
|
1943
|
+
* This module is responsible for producing the ComponentDef object that is always
|
|
1944
|
+
* accessible via `vm.def`. This is lazily created during the creation of the first
|
|
1945
|
+
* instance of a component class, and shared across all instances.
|
|
1946
|
+
*
|
|
1947
|
+
* This structure can be used to synthetically create proxies, and understand the
|
|
1948
|
+
* shape of a component. It is also used internally to apply extra optimizations.
|
|
1949
|
+
*/
|
|
1939
1950
|
/**
|
|
1940
1951
|
* This operation is called with a descriptor of an standard html property
|
|
1941
1952
|
* that a Custom Element can support (including AOM properties), which
|
|
@@ -2112,17 +2123,13 @@ var LWC = (function (exports) {
|
|
|
2112
2123
|
var vm = getAssociatedVM(this);
|
|
2113
2124
|
var elm = vm.elm,
|
|
2114
2125
|
removeAttribute = vm.renderer.removeAttribute;
|
|
2115
|
-
unlockAttribute(elm, name);
|
|
2116
2126
|
removeAttribute(elm, name);
|
|
2117
|
-
lockAttribute();
|
|
2118
2127
|
},
|
|
2119
2128
|
removeAttributeNS: function removeAttributeNS(namespace, name) {
|
|
2120
2129
|
var _getAssociatedVM = getAssociatedVM(this),
|
|
2121
2130
|
elm = _getAssociatedVM.elm,
|
|
2122
2131
|
removeAttribute = _getAssociatedVM.renderer.removeAttribute;
|
|
2123
|
-
unlockAttribute(elm, name);
|
|
2124
2132
|
removeAttribute(elm, name, namespace);
|
|
2125
|
-
lockAttribute();
|
|
2126
2133
|
},
|
|
2127
2134
|
getAttribute: function getAttribute(name) {
|
|
2128
2135
|
var vm = getAssociatedVM(this);
|
|
@@ -2145,9 +2152,7 @@ var LWC = (function (exports) {
|
|
|
2145
2152
|
logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
2146
2153
|
}
|
|
2147
2154
|
}
|
|
2148
|
-
unlockAttribute(elm, name);
|
|
2149
2155
|
setAttribute(elm, name, value);
|
|
2150
|
-
lockAttribute();
|
|
2151
2156
|
},
|
|
2152
2157
|
setAttributeNS: function setAttributeNS(namespace, name, value) {
|
|
2153
2158
|
var vm = getAssociatedVM(this);
|
|
@@ -2158,9 +2163,7 @@ var LWC = (function (exports) {
|
|
|
2158
2163
|
logError("Failed to construct '".concat(getComponentTag(vm), "': The result must not have attributes."));
|
|
2159
2164
|
}
|
|
2160
2165
|
}
|
|
2161
|
-
unlockAttribute(elm, name);
|
|
2162
2166
|
setAttribute(elm, name, value, namespace);
|
|
2163
|
-
lockAttribute();
|
|
2164
2167
|
},
|
|
2165
2168
|
getBoundingClientRect: function getBoundingClientRect() {
|
|
2166
2169
|
var vm = getAssociatedVM(this);
|
|
@@ -2560,7 +2563,9 @@ var LWC = (function (exports) {
|
|
|
2560
2563
|
});
|
|
2561
2564
|
runWithBoundaryProtection(vm, vm, noop, function () {
|
|
2562
2565
|
// job
|
|
2563
|
-
connector = new adapter(dataCallback
|
|
2566
|
+
connector = new adapter(dataCallback, {
|
|
2567
|
+
tagName: vm.tagName
|
|
2568
|
+
});
|
|
2564
2569
|
}, noop);
|
|
2565
2570
|
var updateConnectorConfig = function updateConnectorConfig(config) {
|
|
2566
2571
|
// every time the config is recomputed due to tracking,
|
|
@@ -3150,6 +3155,10 @@ var LWC = (function (exports) {
|
|
|
3150
3155
|
* SPDX-License-Identifier: MIT
|
|
3151
3156
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3152
3157
|
*/
|
|
3158
|
+
/**
|
|
3159
|
+
* This module is responsible for creating the base bridge class BaseBridgeElement
|
|
3160
|
+
* that represents the HTMLElement extension used for any LWC inserted in the DOM.
|
|
3161
|
+
*/
|
|
3153
3162
|
// A bridge descriptor is a descriptor whose job is just to get the component instance
|
|
3154
3163
|
// from the element instance, and get the value or set a new value on the component.
|
|
3155
3164
|
// This means that across different elements, similar names can get the exact same
|
|
@@ -3204,14 +3213,6 @@ var LWC = (function (exports) {
|
|
|
3204
3213
|
}
|
|
3205
3214
|
return;
|
|
3206
3215
|
}
|
|
3207
|
-
if (!isAttributeLocked(this, attrName)) {
|
|
3208
|
-
// Ignore changes triggered by the engine itself during:
|
|
3209
|
-
// * diffing when public props are attempting to reflect to the DOM
|
|
3210
|
-
// * component via `this.setAttribute()`, should never update the prop
|
|
3211
|
-
// Both cases, the setAttribute call is always wrapped by the unlocking of the
|
|
3212
|
-
// attribute to be changed
|
|
3213
|
-
return;
|
|
3214
|
-
}
|
|
3215
3216
|
// Reflect attribute change to the corresponding property when changed from outside.
|
|
3216
3217
|
this[propName] = newValue;
|
|
3217
3218
|
};
|
|
@@ -3626,6 +3627,14 @@ var LWC = (function (exports) {
|
|
|
3626
3627
|
* SPDX-License-Identifier: MIT
|
|
3627
3628
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3628
3629
|
*/
|
|
3630
|
+
/**
|
|
3631
|
+
* This module is responsible for producing the ComponentDef object that is always
|
|
3632
|
+
* accessible via `vm.def`. This is lazily created during the creation of the first
|
|
3633
|
+
* instance of a component class, and shared across all instances.
|
|
3634
|
+
*
|
|
3635
|
+
* This structure can be used to synthetically create proxies, and understand the
|
|
3636
|
+
* shape of a component. It is also used internally to apply extra optimizations.
|
|
3637
|
+
*/
|
|
3629
3638
|
var CtorToDefMap = new WeakMap();
|
|
3630
3639
|
function getCtorProto(Ctor) {
|
|
3631
3640
|
var proto = getPrototypeOf$1(Ctor);
|
|
@@ -3824,9 +3833,9 @@ var LWC = (function (exports) {
|
|
|
3824
3833
|
};
|
|
3825
3834
|
}
|
|
3826
3835
|
var publicMethods = {};
|
|
3827
|
-
for (var
|
|
3836
|
+
for (var _key in methods) {
|
|
3828
3837
|
// avoid leaking the reference to the public method descriptors
|
|
3829
|
-
publicMethods[
|
|
3838
|
+
publicMethods[_key] = methods[_key].value;
|
|
3830
3839
|
}
|
|
3831
3840
|
return {
|
|
3832
3841
|
ctor: ctor,
|
|
@@ -4085,7 +4094,6 @@ var LWC = (function (exports) {
|
|
|
4085
4094
|
var cur = attrs[key];
|
|
4086
4095
|
var old = oldAttrs[key];
|
|
4087
4096
|
if (old !== cur) {
|
|
4088
|
-
unlockAttribute(elm, key);
|
|
4089
4097
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
|
|
4090
4098
|
// Assume xml namespace
|
|
4091
4099
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
@@ -4097,7 +4105,6 @@ var LWC = (function (exports) {
|
|
|
4097
4105
|
} else {
|
|
4098
4106
|
setAttribute(elm, key, cur);
|
|
4099
4107
|
}
|
|
4100
|
-
lockAttribute();
|
|
4101
4108
|
}
|
|
4102
4109
|
}
|
|
4103
4110
|
}
|
|
@@ -5758,8 +5765,8 @@ var LWC = (function (exports) {
|
|
|
5758
5765
|
}
|
|
5759
5766
|
function buildParseFragmentFn(createFragmentFn) {
|
|
5760
5767
|
return function (strings) {
|
|
5761
|
-
for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0),
|
|
5762
|
-
keys[
|
|
5768
|
+
for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key2 = 1; _key2 < _len3; _key2++) {
|
|
5769
|
+
keys[_key2 - 1] = arguments[_key2];
|
|
5763
5770
|
}
|
|
5764
5771
|
var cache = create(null);
|
|
5765
5772
|
return function () {
|
|
@@ -7023,6 +7030,35 @@ var LWC = (function (exports) {
|
|
|
7023
7030
|
}
|
|
7024
7031
|
return false;
|
|
7025
7032
|
}
|
|
7033
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
7034
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
7035
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
7036
|
+
function getValidationPredicate(optOutStaticProp) {
|
|
7037
|
+
if (isUndefined$1(optOutStaticProp)) {
|
|
7038
|
+
return function (_attrName) {
|
|
7039
|
+
return true;
|
|
7040
|
+
};
|
|
7041
|
+
}
|
|
7042
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
7043
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
7044
|
+
if (isTrue(optOutStaticProp)) {
|
|
7045
|
+
return function (_attrName) {
|
|
7046
|
+
return false;
|
|
7047
|
+
};
|
|
7048
|
+
}
|
|
7049
|
+
// If validationOptOut is an array of strings, attributes specified in the
|
|
7050
|
+
// array will be "opted out". Attributes not specified in the array will still
|
|
7051
|
+
// be validated.
|
|
7052
|
+
if (isArray$1(optOutStaticProp) && arrayEvery(optOutStaticProp, isString)) {
|
|
7053
|
+
return function (attrName) {
|
|
7054
|
+
return !ArrayIncludes.call(optOutStaticProp, attrName);
|
|
7055
|
+
};
|
|
7056
|
+
}
|
|
7057
|
+
logWarn('Validation opt out must be `true` or an array of attributes that should not be validated.');
|
|
7058
|
+
return function (_attrName) {
|
|
7059
|
+
return true;
|
|
7060
|
+
};
|
|
7061
|
+
}
|
|
7026
7062
|
function hydrateText(node, vnode, renderer) {
|
|
7027
7063
|
var _a;
|
|
7028
7064
|
if (!hasCorrectNodeType(vnode, node, 3 /* EnvNodeTypes.TEXT */, renderer)) {
|
|
@@ -7102,7 +7138,18 @@ var LWC = (function (exports) {
|
|
|
7102
7138
|
return elm;
|
|
7103
7139
|
}
|
|
7104
7140
|
function hydrateCustomElement(elm, vnode, renderer) {
|
|
7105
|
-
|
|
7141
|
+
var validationOptOut = vnode.ctor.validationOptOut;
|
|
7142
|
+
var shouldValidateAttr = getValidationPredicate(validationOptOut);
|
|
7143
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
7144
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
7145
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
7146
|
+
//
|
|
7147
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
7148
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
7149
|
+
//
|
|
7150
|
+
// Therefore, if validationOptOut is falsey or an array of strings, we need to
|
|
7151
|
+
// examine some or all of the custom element's attributes.
|
|
7152
|
+
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) || !isMatchingElement(vnode, elm, renderer, shouldValidateAttr)) {
|
|
7106
7153
|
return handleMismatch(elm, vnode, renderer);
|
|
7107
7154
|
}
|
|
7108
7155
|
var sel = vnode.sel,
|
|
@@ -7136,14 +7183,12 @@ var LWC = (function (exports) {
|
|
|
7136
7183
|
function hydrateChildren(node, children, parentNode, owner) {
|
|
7137
7184
|
var hasWarned = false;
|
|
7138
7185
|
var nextNode = node;
|
|
7139
|
-
var anchor = null;
|
|
7140
7186
|
var renderer = owner.renderer;
|
|
7141
7187
|
for (var _i36 = 0; _i36 < children.length; _i36++) {
|
|
7142
7188
|
var childVnode = children[_i36];
|
|
7143
7189
|
if (!isNull(childVnode)) {
|
|
7144
7190
|
if (nextNode) {
|
|
7145
7191
|
nextNode = hydrateNode(nextNode, childVnode, renderer);
|
|
7146
|
-
anchor = childVnode.elm;
|
|
7147
7192
|
} else {
|
|
7148
7193
|
hasMismatch = true;
|
|
7149
7194
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -7152,8 +7197,8 @@ var LWC = (function (exports) {
|
|
|
7152
7197
|
logError("Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.", owner);
|
|
7153
7198
|
}
|
|
7154
7199
|
}
|
|
7155
|
-
mount(childVnode, parentNode, renderer,
|
|
7156
|
-
|
|
7200
|
+
mount(childVnode, parentNode, renderer, nextNode);
|
|
7201
|
+
nextNode = renderer.nextSibling(childVnode.elm);
|
|
7157
7202
|
}
|
|
7158
7203
|
}
|
|
7159
7204
|
}
|
|
@@ -7199,6 +7244,9 @@ var LWC = (function (exports) {
|
|
|
7199
7244
|
return true;
|
|
7200
7245
|
}
|
|
7201
7246
|
function isMatchingElement(vnode, elm, renderer) {
|
|
7247
|
+
var shouldValidateAttr = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
|
|
7248
|
+
return true;
|
|
7249
|
+
};
|
|
7202
7250
|
var getProperty = renderer.getProperty;
|
|
7203
7251
|
if (vnode.sel.toLowerCase() !== getProperty(elm, 'tagName').toLowerCase()) {
|
|
7204
7252
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -7206,10 +7254,10 @@ var LWC = (function (exports) {
|
|
|
7206
7254
|
}
|
|
7207
7255
|
return false;
|
|
7208
7256
|
}
|
|
7209
|
-
var
|
|
7210
|
-
var
|
|
7211
|
-
var
|
|
7212
|
-
return
|
|
7257
|
+
var hasCompatibleAttrs = validateAttrs(vnode, elm, renderer, shouldValidateAttr);
|
|
7258
|
+
var hasCompatibleClass = shouldValidateAttr('class') ? validateClassAttr(vnode, elm, renderer) : true;
|
|
7259
|
+
var hasCompatibleStyle = shouldValidateAttr('style') ? validateStyleAttr(vnode, elm, renderer) : true;
|
|
7260
|
+
return hasCompatibleAttrs && hasCompatibleClass && hasCompatibleStyle;
|
|
7213
7261
|
}
|
|
7214
7262
|
function attributeValuesAreEqual(vnodeValue, value) {
|
|
7215
7263
|
var vnodeValueAsString = String(vnodeValue);
|
|
@@ -7224,7 +7272,7 @@ var LWC = (function (exports) {
|
|
|
7224
7272
|
// In all other cases, the two values are not considered equal
|
|
7225
7273
|
return false;
|
|
7226
7274
|
}
|
|
7227
|
-
function validateAttrs(vnode, elm, renderer) {
|
|
7275
|
+
function validateAttrs(vnode, elm, renderer, shouldValidateAttr) {
|
|
7228
7276
|
var _vnode$data$attrs = vnode.data.attrs,
|
|
7229
7277
|
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
|
|
7230
7278
|
var nodesAreCompatible = true;
|
|
@@ -7234,6 +7282,9 @@ var LWC = (function (exports) {
|
|
|
7234
7282
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i37], 2),
|
|
7235
7283
|
attrName = _Object$entries$_i[0],
|
|
7236
7284
|
attrValue = _Object$entries$_i[1];
|
|
7285
|
+
if (!shouldValidateAttr(attrName)) {
|
|
7286
|
+
continue;
|
|
7287
|
+
}
|
|
7237
7288
|
var owner = vnode.owner;
|
|
7238
7289
|
var getAttribute = renderer.getAttribute;
|
|
7239
7290
|
var elmAttrValue = getAttribute(elm, attrName);
|
|
@@ -7685,7 +7736,7 @@ var LWC = (function (exports) {
|
|
|
7685
7736
|
}
|
|
7686
7737
|
return getReadOnlyProxy(obj);
|
|
7687
7738
|
}
|
|
7688
|
-
|
|
7739
|
+
/** version: 2.45.3 */
|
|
7689
7740
|
|
|
7690
7741
|
/*
|
|
7691
7742
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7945,6 +7996,7 @@ var LWC = (function (exports) {
|
|
|
7945
7996
|
* SPDX-License-Identifier: MIT
|
|
7946
7997
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
7947
7998
|
*/
|
|
7999
|
+
new WeakMap();
|
|
7948
8000
|
// Creates a custom element for compat (legacy) browser environments
|
|
7949
8001
|
var createCustomElementCompat = function createCustomElementCompat(tagName, upgradeCallback) {
|
|
7950
8002
|
var elm = document.createElement(tagName);
|
|
@@ -8072,7 +8124,7 @@ var LWC = (function (exports) {
|
|
|
8072
8124
|
function rendererFactory(baseRenderer) {
|
|
8073
8125
|
var renderer = function (exports) {
|
|
8074
8126
|
/**
|
|
8075
|
-
* Copyright (C)
|
|
8127
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
8076
8128
|
*/
|
|
8077
8129
|
/*
|
|
8078
8130
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8111,7 +8163,7 @@ var LWC = (function (exports) {
|
|
|
8111
8163
|
function isNull(obj) {
|
|
8112
8164
|
return obj === null;
|
|
8113
8165
|
}
|
|
8114
|
-
/** version: 2.45.
|
|
8166
|
+
/** version: 2.45.3 */
|
|
8115
8167
|
|
|
8116
8168
|
/*
|
|
8117
8169
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8753,7 +8805,7 @@ var LWC = (function (exports) {
|
|
|
8753
8805
|
});
|
|
8754
8806
|
});
|
|
8755
8807
|
}
|
|
8756
|
-
|
|
8808
|
+
/** version: 2.45.3 */
|
|
8757
8809
|
|
|
8758
8810
|
exports.LightningElement = LightningElement;
|
|
8759
8811
|
exports.__unstable__ProfilerControl = profilerControl;
|