lwc 2.45.5 → 2.46.0
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/README.md +5 -11
- package/dist/engine-dom/esm/es2017/engine-dom.js +60 -115
- package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom.js +60 -115
- 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 +58 -113
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/iife/es5/engine-dom.js +54 -110
- 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 +52 -108
- package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom.js +60 -115
- 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 +58 -113
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es5/engine-dom.js +54 -110
- 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 +52 -108
- package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-server/commonjs/es2017/engine-server.js +58 -114
- 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 +58 -114
- package/dist/engine-server/esm/es2017/engine-server.js.map +1 -1
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
- 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 +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js.map +1 -1
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
- 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
|
@@ -252,55 +252,35 @@
|
|
|
252
252
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
253
253
|
*/
|
|
254
254
|
const CAMEL_REGEX = /-([a-z])/g;
|
|
255
|
-
//
|
|
256
|
-
const
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
['maxLength', 'maxlength'],
|
|
275
|
-
['minLength', 'minlength'],
|
|
276
|
-
['noValidate', 'novalidate'],
|
|
277
|
-
['useMap', 'usemap'],
|
|
278
|
-
['htmlFor', 'for'],
|
|
279
|
-
]);
|
|
280
|
-
/**
|
|
281
|
-
* Inverted map with attribute name key and property name value.
|
|
282
|
-
*/
|
|
283
|
-
const NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
284
|
-
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING.forEach((value, key) => NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.set(value, key));
|
|
285
|
-
return {
|
|
286
|
-
NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING,
|
|
287
|
-
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING,
|
|
288
|
-
};
|
|
289
|
-
})();
|
|
255
|
+
// These are HTML standard prop/attribute IDL mappings, but are not predictable based on camel/kebab-case conversion
|
|
256
|
+
const SPECIAL_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map([
|
|
257
|
+
['accessKey', 'accesskey'],
|
|
258
|
+
['readOnly', 'readonly'],
|
|
259
|
+
['tabIndex', 'tabindex'],
|
|
260
|
+
['bgColor', 'bgcolor'],
|
|
261
|
+
['colSpan', 'colspan'],
|
|
262
|
+
['rowSpan', 'rowspan'],
|
|
263
|
+
['contentEditable', 'contenteditable'],
|
|
264
|
+
['crossOrigin', 'crossorigin'],
|
|
265
|
+
['dateTime', 'datetime'],
|
|
266
|
+
['formAction', 'formaction'],
|
|
267
|
+
['isMap', 'ismap'],
|
|
268
|
+
['maxLength', 'maxlength'],
|
|
269
|
+
['minLength', 'minlength'],
|
|
270
|
+
['noValidate', 'novalidate'],
|
|
271
|
+
['useMap', 'usemap'],
|
|
272
|
+
['htmlFor', 'for'],
|
|
273
|
+
]);
|
|
290
274
|
/**
|
|
291
275
|
* Map associating previously transformed HTML property into HTML attribute.
|
|
292
276
|
*/
|
|
293
277
|
const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map();
|
|
294
|
-
/**
|
|
295
|
-
* Map associating previously transformed HTML attribute into HTML property.
|
|
296
|
-
*/
|
|
297
|
-
const CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/ new Map();
|
|
298
278
|
function htmlPropertyToAttribute(propName) {
|
|
299
279
|
const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
|
|
300
280
|
if (!isUndefined$1(ariaAttributeName)) {
|
|
301
281
|
return ariaAttributeName;
|
|
302
282
|
}
|
|
303
|
-
const specialAttributeName =
|
|
283
|
+
const specialAttributeName = SPECIAL_PROPERTY_ATTRIBUTE_MAPPING.get(propName);
|
|
304
284
|
if (!isUndefined$1(specialAttributeName)) {
|
|
305
285
|
return specialAttributeName;
|
|
306
286
|
}
|
|
@@ -323,22 +303,17 @@
|
|
|
323
303
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
324
304
|
return attributeName;
|
|
325
305
|
}
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
if (
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
const cachedPropertyName = CACHED_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
|
|
336
|
-
if (!isUndefined$1(cachedPropertyName)) {
|
|
337
|
-
return cachedPropertyName;
|
|
306
|
+
/**
|
|
307
|
+
* Map associating previously transformed kabab-case attributes into camel-case props.
|
|
308
|
+
*/
|
|
309
|
+
const CACHED_KEBAB_CAMEL_MAPPING = /*@__PURE__@*/ new Map();
|
|
310
|
+
function kebabCaseToCamelCase(attrName) {
|
|
311
|
+
let result = CACHED_KEBAB_CAMEL_MAPPING.get(attrName);
|
|
312
|
+
if (isUndefined$1(result)) {
|
|
313
|
+
result = StringReplace.call(attrName, CAMEL_REGEX, (g) => g[1].toUpperCase());
|
|
314
|
+
CACHED_KEBAB_CAMEL_MAPPING.set(attrName, result);
|
|
338
315
|
}
|
|
339
|
-
|
|
340
|
-
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
341
|
-
return propertyName;
|
|
316
|
+
return result;
|
|
342
317
|
}
|
|
343
318
|
|
|
344
319
|
/*
|
|
@@ -348,9 +323,9 @@
|
|
|
348
323
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
349
324
|
*/
|
|
350
325
|
// Increment whenever the LWC template compiler changes
|
|
351
|
-
const LWC_VERSION = "2.
|
|
326
|
+
const LWC_VERSION = "2.46.0";
|
|
352
327
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
353
|
-
/** version: 2.
|
|
328
|
+
/** version: 2.46.0 */
|
|
354
329
|
|
|
355
330
|
/* proxy-compat-disable */
|
|
356
331
|
/**
|
|
@@ -429,7 +404,7 @@
|
|
|
429
404
|
setFeatureFlag(name, value);
|
|
430
405
|
}
|
|
431
406
|
}
|
|
432
|
-
/** version: 2.
|
|
407
|
+
/** version: 2.46.0 */
|
|
433
408
|
|
|
434
409
|
/* proxy-compat-disable */
|
|
435
410
|
/**
|
|
@@ -494,7 +469,7 @@
|
|
|
494
469
|
}
|
|
495
470
|
}
|
|
496
471
|
}
|
|
497
|
-
/** version: 2.
|
|
472
|
+
/** version: 2.46.0 */
|
|
498
473
|
|
|
499
474
|
/*
|
|
500
475
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -3799,27 +3774,35 @@
|
|
|
3799
3774
|
* SPDX-License-Identifier: MIT
|
|
3800
3775
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3801
3776
|
*/
|
|
3802
|
-
const ColonCharCode
|
|
3777
|
+
const ColonCharCode = 58;
|
|
3803
3778
|
function patchAttributes(oldVnode, vnode, renderer) {
|
|
3804
|
-
const { attrs } = vnode.data;
|
|
3779
|
+
const { attrs, external } = vnode.data;
|
|
3805
3780
|
if (isUndefined$1(attrs)) {
|
|
3806
3781
|
return;
|
|
3807
3782
|
}
|
|
3808
3783
|
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3784
|
+
// Attrs may be the same due to the static content optimization, so we can skip diffing
|
|
3809
3785
|
if (oldAttrs === attrs) {
|
|
3810
3786
|
return;
|
|
3811
3787
|
}
|
|
3812
3788
|
const { elm } = vnode;
|
|
3813
|
-
const { setAttribute, removeAttribute } = renderer;
|
|
3789
|
+
const { setAttribute, removeAttribute, setProperty } = renderer;
|
|
3814
3790
|
for (const key in attrs) {
|
|
3815
3791
|
const cur = attrs[key];
|
|
3816
3792
|
const old = oldAttrs[key];
|
|
3817
3793
|
if (old !== cur) {
|
|
3818
|
-
|
|
3794
|
+
let propName;
|
|
3795
|
+
// For external custom elements, sniff to see if the attr should be considered a prop.
|
|
3796
|
+
// Use kebabCaseToCamelCase directly because we don't want to set props like `ariaLabel` or `tabIndex`
|
|
3797
|
+
// on a custom element versus just using the more reliable attribute format.
|
|
3798
|
+
if (external && (propName = kebabCaseToCamelCase(key)) in elm) {
|
|
3799
|
+
setProperty(elm, propName, cur);
|
|
3800
|
+
}
|
|
3801
|
+
else if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
3819
3802
|
// Assume xml namespace
|
|
3820
3803
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
3821
3804
|
}
|
|
3822
|
-
else if (StringCharCodeAt.call(key, 5) === ColonCharCode
|
|
3805
|
+
else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
3823
3806
|
// Assume xlink namespace
|
|
3824
3807
|
setAttribute(elm, key, cur, XLINK_NAMESPACE);
|
|
3825
3808
|
}
|
|
@@ -3833,46 +3816,6 @@
|
|
|
3833
3816
|
}
|
|
3834
3817
|
}
|
|
3835
3818
|
|
|
3836
|
-
/*
|
|
3837
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
3838
|
-
* All rights reserved.
|
|
3839
|
-
* SPDX-License-Identifier: MIT
|
|
3840
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3841
|
-
*/
|
|
3842
|
-
const ColonCharCode = 58;
|
|
3843
|
-
function patchAttrUnlessProp(oldVnode, vnode, renderer) {
|
|
3844
|
-
const { data: { attrs }, elm, } = vnode;
|
|
3845
|
-
if (isUndefined$1(attrs)) {
|
|
3846
|
-
return;
|
|
3847
|
-
}
|
|
3848
|
-
const { removeAttribute, setAttribute, setProperty } = renderer;
|
|
3849
|
-
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3850
|
-
for (const name in attrs) {
|
|
3851
|
-
const cur = attrs[name];
|
|
3852
|
-
const old = oldAttrs[name];
|
|
3853
|
-
if (old !== cur) {
|
|
3854
|
-
const propName = htmlAttributeToProperty(name);
|
|
3855
|
-
if (propName in elm) {
|
|
3856
|
-
setProperty(elm, name, cur);
|
|
3857
|
-
}
|
|
3858
|
-
else if (StringCharCodeAt.call(name, 3) === ColonCharCode) {
|
|
3859
|
-
// Assume xml namespace
|
|
3860
|
-
setAttribute(elm, name, cur, XML_NAMESPACE);
|
|
3861
|
-
}
|
|
3862
|
-
else if (StringCharCodeAt.call(name, 5) === ColonCharCode) {
|
|
3863
|
-
// Assume xlink namespace
|
|
3864
|
-
setAttribute(elm, name, cur, XLINK_NAMESPACE);
|
|
3865
|
-
}
|
|
3866
|
-
else if (isNull(cur) || isUndefined$1(cur)) {
|
|
3867
|
-
removeAttribute(elm, name);
|
|
3868
|
-
}
|
|
3869
|
-
else {
|
|
3870
|
-
setAttribute(elm, name, cur);
|
|
3871
|
-
}
|
|
3872
|
-
}
|
|
3873
|
-
}
|
|
3874
|
-
}
|
|
3875
|
-
|
|
3876
3819
|
/*
|
|
3877
3820
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
3878
3821
|
* All rights reserved.
|
|
@@ -3894,6 +3837,7 @@
|
|
|
3894
3837
|
if (!isNull(oldVnode)) {
|
|
3895
3838
|
oldProps = oldVnode.data.props;
|
|
3896
3839
|
const oldSpread = oldVnode.data.spread;
|
|
3840
|
+
// Props may be the same due to the static content optimization, so we can skip diffing
|
|
3897
3841
|
if (oldProps === props && oldSpread === spread) {
|
|
3898
3842
|
return;
|
|
3899
3843
|
}
|
|
@@ -4024,7 +3968,9 @@
|
|
|
4024
3968
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
4025
3969
|
*/
|
|
4026
3970
|
function applyEventListeners(vnode, renderer) {
|
|
4027
|
-
|
|
3971
|
+
var _a;
|
|
3972
|
+
const { elm } = vnode;
|
|
3973
|
+
const on = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.on;
|
|
4028
3974
|
if (isUndefined$1(on)) {
|
|
4029
3975
|
return;
|
|
4030
3976
|
}
|
|
@@ -4236,6 +4182,8 @@
|
|
|
4236
4182
|
}
|
|
4237
4183
|
}
|
|
4238
4184
|
insertNode(elm, parent, anchor, renderer);
|
|
4185
|
+
// Event listeners are only applied once when mounting, so they are allowed for static vnodes
|
|
4186
|
+
applyEventListeners(vnode, renderer);
|
|
4239
4187
|
}
|
|
4240
4188
|
function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
4241
4189
|
const { sel, owner } = vnode;
|
|
@@ -4463,12 +4411,7 @@
|
|
|
4463
4411
|
// value is set before type=radio.
|
|
4464
4412
|
patchClassAttribute(oldVnode, vnode, renderer);
|
|
4465
4413
|
patchStyleAttribute(oldVnode, vnode, renderer);
|
|
4466
|
-
|
|
4467
|
-
patchAttrUnlessProp(oldVnode, vnode, renderer);
|
|
4468
|
-
}
|
|
4469
|
-
else {
|
|
4470
|
-
patchAttributes(oldVnode, vnode, renderer);
|
|
4471
|
-
}
|
|
4414
|
+
patchAttributes(oldVnode, vnode, renderer);
|
|
4472
4415
|
patchProps(oldVnode, vnode, renderer);
|
|
4473
4416
|
}
|
|
4474
4417
|
function applyStyleScoping(elm, owner, renderer) {
|
|
@@ -4868,7 +4811,7 @@
|
|
|
4868
4811
|
};
|
|
4869
4812
|
}
|
|
4870
4813
|
// [st]atic node
|
|
4871
|
-
function st(fragment, key) {
|
|
4814
|
+
function st(fragment, key, data) {
|
|
4872
4815
|
return {
|
|
4873
4816
|
type: 4 /* VNodeType.Static */,
|
|
4874
4817
|
sel: undefined,
|
|
@@ -4876,6 +4819,7 @@
|
|
|
4876
4819
|
elm: undefined,
|
|
4877
4820
|
fragment,
|
|
4878
4821
|
owner: getVMBeingRendered(),
|
|
4822
|
+
data,
|
|
4879
4823
|
};
|
|
4880
4824
|
}
|
|
4881
4825
|
// [fr]agment node
|
|
@@ -6779,6 +6723,7 @@
|
|
|
6779
6723
|
return handleMismatch(elm, vnode, renderer);
|
|
6780
6724
|
}
|
|
6781
6725
|
vnode.elm = elm;
|
|
6726
|
+
applyEventListeners(vnode, renderer);
|
|
6782
6727
|
return elm;
|
|
6783
6728
|
}
|
|
6784
6729
|
function hydrateFragment(elm, vnode, renderer) {
|
|
@@ -7386,7 +7331,7 @@
|
|
|
7386
7331
|
}
|
|
7387
7332
|
return getReadOnlyProxy(obj);
|
|
7388
7333
|
}
|
|
7389
|
-
/** version: 2.
|
|
7334
|
+
/** version: 2.46.0 */
|
|
7390
7335
|
|
|
7391
7336
|
/*
|
|
7392
7337
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7816,7 +7761,7 @@
|
|
|
7816
7761
|
function isNull(obj) {
|
|
7817
7762
|
return obj === null;
|
|
7818
7763
|
}
|
|
7819
|
-
/** version: 2.
|
|
7764
|
+
/** version: 2.46.0 */
|
|
7820
7765
|
|
|
7821
7766
|
/*
|
|
7822
7767
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8435,7 +8380,7 @@
|
|
|
8435
8380
|
});
|
|
8436
8381
|
}));
|
|
8437
8382
|
}
|
|
8438
|
-
/** version: 2.
|
|
8383
|
+
/** version: 2.46.0 */
|
|
8439
8384
|
|
|
8440
8385
|
exports.LightningElement = LightningElement;
|
|
8441
8386
|
exports.__unstable__ProfilerControl = profilerControl;
|