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,
|
|
@@ -101,6 +105,15 @@ var LWC = (function (exports) {
|
|
|
101
105
|
ArraySplice = _Array$prototype.splice,
|
|
102
106
|
ArrayUnshift = _Array$prototype.unshift,
|
|
103
107
|
forEach = _Array$prototype.forEach;
|
|
108
|
+
// The type of the return value of Array.prototype.every is `this is T[]`. However, once this
|
|
109
|
+
// Array method is pulled out of the prototype, the function is now referencing `this` where
|
|
110
|
+
// `this` is meaningless, resulting in a TypeScript compilation error.
|
|
111
|
+
//
|
|
112
|
+
// Exposing this helper function is the closest we can get to preserving the usage patterns
|
|
113
|
+
// of Array.prototype methods used elsewhere in the codebase.
|
|
114
|
+
function arrayEvery(arr, predicate) {
|
|
115
|
+
return ArrayEvery.call(arr, predicate);
|
|
116
|
+
}
|
|
104
117
|
var StringFromCharCode = String.fromCharCode;
|
|
105
118
|
var _String$prototype = String.prototype,
|
|
106
119
|
StringCharCodeAt = _String$prototype.charCodeAt,
|
|
@@ -200,7 +213,7 @@ var LWC = (function (exports) {
|
|
|
200
213
|
AriaPropNameToAttrNameMap = _ref.AriaPropNameToAttrNameMap;
|
|
201
214
|
// These attributes take either an ID or a list of IDs as values.
|
|
202
215
|
// This includes aria-* attributes as well as the special non-ARIA "for" attribute
|
|
203
|
-
var ID_REFERENCING_ATTRIBUTES_SET = new Set(['aria-activedescendant', 'aria-controls', 'aria-describedby', 'aria-details', 'aria-errormessage', 'aria-flowto', 'aria-labelledby', 'aria-owns', 'for']);
|
|
216
|
+
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']);
|
|
204
217
|
|
|
205
218
|
/*
|
|
206
219
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -263,11 +276,11 @@ var LWC = (function (exports) {
|
|
|
263
276
|
/**
|
|
264
277
|
* Map associating previously transformed HTML property into HTML attribute.
|
|
265
278
|
*/
|
|
266
|
-
var CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
|
|
279
|
+
var CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/new Map();
|
|
267
280
|
/**
|
|
268
281
|
* Map associating previously transformed HTML attribute into HTML property.
|
|
269
282
|
*/
|
|
270
|
-
var CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
283
|
+
var CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/new Map();
|
|
271
284
|
function htmlPropertyToAttribute(propName) {
|
|
272
285
|
var ariaAttributeName = AriaPropNameToAttrNameMap[propName];
|
|
273
286
|
if (!isUndefined$1(ariaAttributeName)) {
|
|
@@ -315,10 +328,10 @@ var LWC = (function (exports) {
|
|
|
315
328
|
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
316
329
|
return propertyName;
|
|
317
330
|
}
|
|
318
|
-
/** version: 2.45.
|
|
331
|
+
/** version: 2.45.3 */
|
|
319
332
|
|
|
320
333
|
/**
|
|
321
|
-
* Copyright (C)
|
|
334
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
322
335
|
*/
|
|
323
336
|
|
|
324
337
|
/*
|
|
@@ -386,10 +399,10 @@ var LWC = (function (exports) {
|
|
|
386
399
|
*/
|
|
387
400
|
function setFeatureFlagForTest(name, value) {
|
|
388
401
|
}
|
|
389
|
-
/** version: 2.45.
|
|
402
|
+
/** version: 2.45.3 */
|
|
390
403
|
|
|
391
404
|
/**
|
|
392
|
-
* Copyright (C)
|
|
405
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
393
406
|
*/
|
|
394
407
|
|
|
395
408
|
/*
|
|
@@ -450,7 +463,7 @@ var LWC = (function (exports) {
|
|
|
450
463
|
}
|
|
451
464
|
}
|
|
452
465
|
}
|
|
453
|
-
/** version: 2.45.
|
|
466
|
+
/** version: 2.45.3 */
|
|
454
467
|
|
|
455
468
|
/*
|
|
456
469
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -464,7 +477,9 @@ var LWC = (function (exports) {
|
|
|
464
477
|
applyAriaReflection();
|
|
465
478
|
}
|
|
466
479
|
|
|
467
|
-
|
|
480
|
+
/**
|
|
481
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
482
|
+
*/
|
|
468
483
|
|
|
469
484
|
/*
|
|
470
485
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -611,6 +626,9 @@ var LWC = (function (exports) {
|
|
|
611
626
|
function logError(message, vm) {
|
|
612
627
|
log('error', message, vm, false);
|
|
613
628
|
}
|
|
629
|
+
function logWarn(message, vm) {
|
|
630
|
+
log('warn', message, vm, false);
|
|
631
|
+
}
|
|
614
632
|
|
|
615
633
|
/*
|
|
616
634
|
* Copyright (c) 2019, salesforce.com, inc.
|
|
@@ -885,19 +903,6 @@ var LWC = (function (exports) {
|
|
|
885
903
|
*/
|
|
886
904
|
// These properties get added to LWCElement.prototype publicProps automatically
|
|
887
905
|
var defaultDefHTMLPropertyNames = ['accessKey', 'dir', 'draggable', 'hidden', 'id', 'lang', 'spellcheck', 'tabIndex', 'title'];
|
|
888
|
-
var controlledElement = null;
|
|
889
|
-
var controlledAttributeName;
|
|
890
|
-
function isAttributeLocked(elm, attrName) {
|
|
891
|
-
return elm !== controlledElement || attrName !== controlledAttributeName;
|
|
892
|
-
}
|
|
893
|
-
function lockAttribute(_elm, _key) {
|
|
894
|
-
controlledElement = null;
|
|
895
|
-
controlledAttributeName = undefined;
|
|
896
|
-
}
|
|
897
|
-
function unlockAttribute(elm, key) {
|
|
898
|
-
controlledElement = elm;
|
|
899
|
-
controlledAttributeName = key;
|
|
900
|
-
}
|
|
901
906
|
|
|
902
907
|
/*
|
|
903
908
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1513,6 +1518,14 @@ var LWC = (function (exports) {
|
|
|
1513
1518
|
* SPDX-License-Identifier: MIT
|
|
1514
1519
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1515
1520
|
*/
|
|
1521
|
+
/**
|
|
1522
|
+
* This module is responsible for producing the ComponentDef object that is always
|
|
1523
|
+
* accessible via `vm.def`. This is lazily created during the creation of the first
|
|
1524
|
+
* instance of a component class, and shared across all instances.
|
|
1525
|
+
*
|
|
1526
|
+
* This structure can be used to synthetically create proxies, and understand the
|
|
1527
|
+
* shape of a component. It is also used internally to apply extra optimizations.
|
|
1528
|
+
*/
|
|
1516
1529
|
/**
|
|
1517
1530
|
* This operation is called with a descriptor of an standard html property
|
|
1518
1531
|
* that a Custom Element can support (including AOM properties), which
|
|
@@ -1643,17 +1656,13 @@ var LWC = (function (exports) {
|
|
|
1643
1656
|
var vm = getAssociatedVM(this);
|
|
1644
1657
|
var elm = vm.elm,
|
|
1645
1658
|
removeAttribute = vm.renderer.removeAttribute;
|
|
1646
|
-
unlockAttribute(elm, name);
|
|
1647
1659
|
removeAttribute(elm, name);
|
|
1648
|
-
lockAttribute();
|
|
1649
1660
|
},
|
|
1650
1661
|
removeAttributeNS: function removeAttributeNS(namespace, name) {
|
|
1651
1662
|
var _getAssociatedVM = getAssociatedVM(this),
|
|
1652
1663
|
elm = _getAssociatedVM.elm,
|
|
1653
1664
|
removeAttribute = _getAssociatedVM.renderer.removeAttribute;
|
|
1654
|
-
unlockAttribute(elm, name);
|
|
1655
1665
|
removeAttribute(elm, name, namespace);
|
|
1656
|
-
lockAttribute();
|
|
1657
1666
|
},
|
|
1658
1667
|
getAttribute: function getAttribute(name) {
|
|
1659
1668
|
var vm = getAssociatedVM(this);
|
|
@@ -1671,17 +1680,13 @@ var LWC = (function (exports) {
|
|
|
1671
1680
|
var vm = getAssociatedVM(this);
|
|
1672
1681
|
var elm = vm.elm,
|
|
1673
1682
|
setAttribute = vm.renderer.setAttribute;
|
|
1674
|
-
unlockAttribute(elm, name);
|
|
1675
1683
|
setAttribute(elm, name, value);
|
|
1676
|
-
lockAttribute();
|
|
1677
1684
|
},
|
|
1678
1685
|
setAttributeNS: function setAttributeNS(namespace, name, value) {
|
|
1679
1686
|
var vm = getAssociatedVM(this);
|
|
1680
1687
|
var elm = vm.elm,
|
|
1681
1688
|
setAttribute = vm.renderer.setAttribute;
|
|
1682
|
-
unlockAttribute(elm, name);
|
|
1683
1689
|
setAttribute(elm, name, value, namespace);
|
|
1684
|
-
lockAttribute();
|
|
1685
1690
|
},
|
|
1686
1691
|
getBoundingClientRect: function getBoundingClientRect() {
|
|
1687
1692
|
var vm = getAssociatedVM(this);
|
|
@@ -2014,7 +2019,9 @@ var LWC = (function (exports) {
|
|
|
2014
2019
|
});
|
|
2015
2020
|
runWithBoundaryProtection(vm, vm, noop, function () {
|
|
2016
2021
|
// job
|
|
2017
|
-
connector = new adapter(dataCallback
|
|
2022
|
+
connector = new adapter(dataCallback, {
|
|
2023
|
+
tagName: vm.tagName
|
|
2024
|
+
});
|
|
2018
2025
|
}, noop);
|
|
2019
2026
|
var updateConnectorConfig = function updateConnectorConfig(config) {
|
|
2020
2027
|
// every time the config is recomputed due to tracking,
|
|
@@ -2399,6 +2406,10 @@ var LWC = (function (exports) {
|
|
|
2399
2406
|
* SPDX-License-Identifier: MIT
|
|
2400
2407
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2401
2408
|
*/
|
|
2409
|
+
/**
|
|
2410
|
+
* This module is responsible for creating the base bridge class BaseBridgeElement
|
|
2411
|
+
* that represents the HTMLElement extension used for any LWC inserted in the DOM.
|
|
2412
|
+
*/
|
|
2402
2413
|
// A bridge descriptor is a descriptor whose job is just to get the component instance
|
|
2403
2414
|
// from the element instance, and get the value or set a new value on the component.
|
|
2404
2415
|
// This means that across different elements, similar names can get the exact same
|
|
@@ -2453,14 +2464,6 @@ var LWC = (function (exports) {
|
|
|
2453
2464
|
}
|
|
2454
2465
|
return;
|
|
2455
2466
|
}
|
|
2456
|
-
if (!isAttributeLocked(this, attrName)) {
|
|
2457
|
-
// Ignore changes triggered by the engine itself during:
|
|
2458
|
-
// * diffing when public props are attempting to reflect to the DOM
|
|
2459
|
-
// * component via `this.setAttribute()`, should never update the prop
|
|
2460
|
-
// Both cases, the setAttribute call is always wrapped by the unlocking of the
|
|
2461
|
-
// attribute to be changed
|
|
2462
|
-
return;
|
|
2463
|
-
}
|
|
2464
2467
|
// Reflect attribute change to the corresponding property when changed from outside.
|
|
2465
2468
|
this[propName] = newValue;
|
|
2466
2469
|
};
|
|
@@ -2679,6 +2682,15 @@ var LWC = (function (exports) {
|
|
|
2679
2682
|
return ModernWeakMultiMap;
|
|
2680
2683
|
}();
|
|
2681
2684
|
var WeakMultiMap = supportsWeakRefs ? ModernWeakMultiMap : LegacyWeakMultiMap;
|
|
2685
|
+
|
|
2686
|
+
/*
|
|
2687
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
2688
|
+
* All rights reserved.
|
|
2689
|
+
* SPDX-License-Identifier: MIT
|
|
2690
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2691
|
+
*/
|
|
2692
|
+
new WeakMap();
|
|
2693
|
+
new WeakMap();
|
|
2682
2694
|
var swappedStyleMap = new WeakMap();
|
|
2683
2695
|
// The important thing here is the weak values – VMs are transient (one per component instance) and should be GC'ed,
|
|
2684
2696
|
// so we don't want to create strong references to them.
|
|
@@ -2749,6 +2761,14 @@ var LWC = (function (exports) {
|
|
|
2749
2761
|
* SPDX-License-Identifier: MIT
|
|
2750
2762
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2751
2763
|
*/
|
|
2764
|
+
/**
|
|
2765
|
+
* This module is responsible for producing the ComponentDef object that is always
|
|
2766
|
+
* accessible via `vm.def`. This is lazily created during the creation of the first
|
|
2767
|
+
* instance of a component class, and shared across all instances.
|
|
2768
|
+
*
|
|
2769
|
+
* This structure can be used to synthetically create proxies, and understand the
|
|
2770
|
+
* shape of a component. It is also used internally to apply extra optimizations.
|
|
2771
|
+
*/
|
|
2752
2772
|
var CtorToDefMap = new WeakMap();
|
|
2753
2773
|
function getCtorProto(Ctor) {
|
|
2754
2774
|
var proto = getPrototypeOf$1(Ctor);
|
|
@@ -2920,9 +2940,9 @@ var LWC = (function (exports) {
|
|
|
2920
2940
|
};
|
|
2921
2941
|
}
|
|
2922
2942
|
var publicMethods = {};
|
|
2923
|
-
for (var
|
|
2943
|
+
for (var _key in methods) {
|
|
2924
2944
|
// avoid leaking the reference to the public method descriptors
|
|
2925
|
-
publicMethods[
|
|
2945
|
+
publicMethods[_key] = methods[_key].value;
|
|
2926
2946
|
}
|
|
2927
2947
|
return {
|
|
2928
2948
|
ctor: ctor,
|
|
@@ -3173,7 +3193,6 @@ var LWC = (function (exports) {
|
|
|
3173
3193
|
var cur = attrs[key];
|
|
3174
3194
|
var old = oldAttrs[key];
|
|
3175
3195
|
if (old !== cur) {
|
|
3176
|
-
unlockAttribute(elm, key);
|
|
3177
3196
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
|
|
3178
3197
|
// Assume xml namespace
|
|
3179
3198
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
@@ -3185,7 +3204,6 @@ var LWC = (function (exports) {
|
|
|
3185
3204
|
} else {
|
|
3186
3205
|
setAttribute(elm, key, cur);
|
|
3187
3206
|
}
|
|
3188
|
-
lockAttribute();
|
|
3189
3207
|
}
|
|
3190
3208
|
}
|
|
3191
3209
|
}
|
|
@@ -4595,8 +4613,8 @@ var LWC = (function (exports) {
|
|
|
4595
4613
|
}
|
|
4596
4614
|
function buildParseFragmentFn(createFragmentFn) {
|
|
4597
4615
|
return function (strings) {
|
|
4598
|
-
for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0),
|
|
4599
|
-
keys[
|
|
4616
|
+
for (var _len3 = arguments.length, keys = new Array(_len3 > 1 ? _len3 - 1 : 0), _key2 = 1; _key2 < _len3; _key2++) {
|
|
4617
|
+
keys[_key2 - 1] = arguments[_key2];
|
|
4600
4618
|
}
|
|
4601
4619
|
var cache = create(null);
|
|
4602
4620
|
return function () {
|
|
@@ -5706,6 +5724,35 @@ var LWC = (function (exports) {
|
|
|
5706
5724
|
return renderer.nextSibling(hydratedNode);
|
|
5707
5725
|
}
|
|
5708
5726
|
var NODE_VALUE_PROP = 'nodeValue';
|
|
5727
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
5728
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
5729
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
5730
|
+
function getValidationPredicate(optOutStaticProp) {
|
|
5731
|
+
if (isUndefined$1(optOutStaticProp)) {
|
|
5732
|
+
return function (_attrName) {
|
|
5733
|
+
return true;
|
|
5734
|
+
};
|
|
5735
|
+
}
|
|
5736
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
5737
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
5738
|
+
if (isTrue(optOutStaticProp)) {
|
|
5739
|
+
return function (_attrName) {
|
|
5740
|
+
return false;
|
|
5741
|
+
};
|
|
5742
|
+
}
|
|
5743
|
+
// If validationOptOut is an array of strings, attributes specified in the
|
|
5744
|
+
// array will be "opted out". Attributes not specified in the array will still
|
|
5745
|
+
// be validated.
|
|
5746
|
+
if (isArray$1(optOutStaticProp) && arrayEvery(optOutStaticProp, isString)) {
|
|
5747
|
+
return function (attrName) {
|
|
5748
|
+
return !ArrayIncludes.call(optOutStaticProp, attrName);
|
|
5749
|
+
};
|
|
5750
|
+
}
|
|
5751
|
+
logWarn('Validation opt out must be `true` or an array of attributes that should not be validated.');
|
|
5752
|
+
return function (_attrName) {
|
|
5753
|
+
return true;
|
|
5754
|
+
};
|
|
5755
|
+
}
|
|
5709
5756
|
function hydrateText(node, vnode, renderer) {
|
|
5710
5757
|
var _a;
|
|
5711
5758
|
if (!hasCorrectNodeType(vnode, node, 3 /* EnvNodeTypes.TEXT */, renderer)) {
|
|
@@ -5769,7 +5816,18 @@ var LWC = (function (exports) {
|
|
|
5769
5816
|
return elm;
|
|
5770
5817
|
}
|
|
5771
5818
|
function hydrateCustomElement(elm, vnode, renderer) {
|
|
5772
|
-
|
|
5819
|
+
var validationOptOut = vnode.ctor.validationOptOut;
|
|
5820
|
+
var shouldValidateAttr = getValidationPredicate(validationOptOut);
|
|
5821
|
+
// The validationOptOut static property can be an array of attribute names.
|
|
5822
|
+
// Any attribute names specified in that array will not be validated, and the
|
|
5823
|
+
// LWC runtime will assume that VDOM attrs and DOM attrs are in sync.
|
|
5824
|
+
//
|
|
5825
|
+
// If validationOptOut is true, no attributes will be checked for correctness
|
|
5826
|
+
// and the runtime will assume VDOM attrs and DOM attrs are in sync.
|
|
5827
|
+
//
|
|
5828
|
+
// Therefore, if validationOptOut is falsey or an array of strings, we need to
|
|
5829
|
+
// examine some or all of the custom element's attributes.
|
|
5830
|
+
if (!hasCorrectNodeType(vnode, elm, 1 /* EnvNodeTypes.ELEMENT */, renderer) || !isMatchingElement(vnode, elm, renderer, shouldValidateAttr)) {
|
|
5773
5831
|
return handleMismatch(elm, vnode, renderer);
|
|
5774
5832
|
}
|
|
5775
5833
|
var sel = vnode.sel,
|
|
@@ -5798,18 +5856,16 @@ var LWC = (function (exports) {
|
|
|
5798
5856
|
}
|
|
5799
5857
|
function hydrateChildren(node, children, parentNode, owner) {
|
|
5800
5858
|
var nextNode = node;
|
|
5801
|
-
var anchor = null;
|
|
5802
5859
|
var renderer = owner.renderer;
|
|
5803
5860
|
for (var _i36 = 0; _i36 < children.length; _i36++) {
|
|
5804
5861
|
var childVnode = children[_i36];
|
|
5805
5862
|
if (!isNull(childVnode)) {
|
|
5806
5863
|
if (nextNode) {
|
|
5807
5864
|
nextNode = hydrateNode(nextNode, childVnode, renderer);
|
|
5808
|
-
anchor = childVnode.elm;
|
|
5809
5865
|
} else {
|
|
5810
5866
|
hasMismatch = true;
|
|
5811
|
-
mount(childVnode, parentNode, renderer,
|
|
5812
|
-
|
|
5867
|
+
mount(childVnode, parentNode, renderer, nextNode);
|
|
5868
|
+
nextNode = renderer.nextSibling(childVnode.elm);
|
|
5813
5869
|
}
|
|
5814
5870
|
}
|
|
5815
5871
|
}
|
|
@@ -5847,14 +5903,17 @@ var LWC = (function (exports) {
|
|
|
5847
5903
|
return true;
|
|
5848
5904
|
}
|
|
5849
5905
|
function isMatchingElement(vnode, elm, renderer) {
|
|
5906
|
+
var shouldValidateAttr = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : function () {
|
|
5907
|
+
return true;
|
|
5908
|
+
};
|
|
5850
5909
|
var getProperty = renderer.getProperty;
|
|
5851
5910
|
if (vnode.sel.toLowerCase() !== getProperty(elm, 'tagName').toLowerCase()) {
|
|
5852
5911
|
return false;
|
|
5853
5912
|
}
|
|
5854
|
-
var
|
|
5855
|
-
var
|
|
5856
|
-
var
|
|
5857
|
-
return
|
|
5913
|
+
var hasCompatibleAttrs = validateAttrs(vnode, elm, renderer, shouldValidateAttr);
|
|
5914
|
+
var hasCompatibleClass = shouldValidateAttr('class') ? validateClassAttr(vnode, elm, renderer) : true;
|
|
5915
|
+
var hasCompatibleStyle = shouldValidateAttr('style') ? validateStyleAttr(vnode, elm, renderer) : true;
|
|
5916
|
+
return hasCompatibleAttrs && hasCompatibleClass && hasCompatibleStyle;
|
|
5858
5917
|
}
|
|
5859
5918
|
function attributeValuesAreEqual(vnodeValue, value) {
|
|
5860
5919
|
var vnodeValueAsString = String(vnodeValue);
|
|
@@ -5869,7 +5928,7 @@ var LWC = (function (exports) {
|
|
|
5869
5928
|
// In all other cases, the two values are not considered equal
|
|
5870
5929
|
return false;
|
|
5871
5930
|
}
|
|
5872
|
-
function validateAttrs(vnode, elm, renderer) {
|
|
5931
|
+
function validateAttrs(vnode, elm, renderer, shouldValidateAttr) {
|
|
5873
5932
|
var _vnode$data$attrs = vnode.data.attrs,
|
|
5874
5933
|
attrs = _vnode$data$attrs === void 0 ? {} : _vnode$data$attrs;
|
|
5875
5934
|
var nodesAreCompatible = true;
|
|
@@ -5879,6 +5938,9 @@ var LWC = (function (exports) {
|
|
|
5879
5938
|
var _Object$entries$_i = _slicedToArray(_Object$entries[_i37], 2),
|
|
5880
5939
|
attrName = _Object$entries$_i[0],
|
|
5881
5940
|
attrValue = _Object$entries$_i[1];
|
|
5941
|
+
if (!shouldValidateAttr(attrName)) {
|
|
5942
|
+
continue;
|
|
5943
|
+
}
|
|
5882
5944
|
vnode.owner;
|
|
5883
5945
|
var getAttribute = renderer.getAttribute;
|
|
5884
5946
|
var elmAttrValue = getAttribute(elm, attrName);
|
|
@@ -6469,6 +6531,7 @@ var LWC = (function (exports) {
|
|
|
6469
6531
|
* SPDX-License-Identifier: MIT
|
|
6470
6532
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6471
6533
|
*/
|
|
6534
|
+
new WeakMap();
|
|
6472
6535
|
// Creates a custom element for compat (legacy) browser environments
|
|
6473
6536
|
var createCustomElementCompat = function createCustomElementCompat(tagName, upgradeCallback) {
|
|
6474
6537
|
var elm = document.createElement(tagName);
|
|
@@ -6596,7 +6659,7 @@ var LWC = (function (exports) {
|
|
|
6596
6659
|
function rendererFactory(baseRenderer) {
|
|
6597
6660
|
var renderer = function (exports) {
|
|
6598
6661
|
/**
|
|
6599
|
-
* Copyright (C)
|
|
6662
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
6600
6663
|
*/
|
|
6601
6664
|
/*
|
|
6602
6665
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6635,7 +6698,7 @@ var LWC = (function (exports) {
|
|
|
6635
6698
|
function isNull(obj) {
|
|
6636
6699
|
return obj === null;
|
|
6637
6700
|
}
|
|
6638
|
-
/** version: 2.45.
|
|
6701
|
+
/** version: 2.45.3 */
|
|
6639
6702
|
|
|
6640
6703
|
/*
|
|
6641
6704
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -7270,7 +7333,7 @@ var LWC = (function (exports) {
|
|
|
7270
7333
|
});
|
|
7271
7334
|
});
|
|
7272
7335
|
}
|
|
7273
|
-
|
|
7336
|
+
/** version: 2.45.3 */
|
|
7274
7337
|
|
|
7275
7338
|
exports.LightningElement = LightningElement;
|
|
7276
7339
|
exports.__unstable__ProfilerControl = profilerControl;
|