lwc 2.45.4 → 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 +66 -116
- package/dist/engine-dom/esm/es2017/engine-dom.js.map +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom.js +66 -116
- 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 -114
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/iife/es5/engine-dom.js +74 -121
- 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 +72 -119
- package/dist/engine-dom/iife/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom.js +66 -116
- 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 -114
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js.map +1 -1
- package/dist/engine-dom/umd/es5/engine-dom.js +74 -121
- 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 +72 -119
- package/dist/engine-dom/umd/es5/engine-dom_debug.js.map +1 -1
- package/dist/engine-server/commonjs/es2017/engine-server.js +64 -115
- 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 +64 -115
- 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
|
@@ -335,55 +335,35 @@ const GLOBAL_ATTRIBUTE = /*@__PURE__*/ new Set([
|
|
|
335
335
|
function isGlobalHtmlAttribute(attrName) {
|
|
336
336
|
return GLOBAL_ATTRIBUTE.has(attrName);
|
|
337
337
|
}
|
|
338
|
-
//
|
|
339
|
-
const
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
['maxLength', 'maxlength'],
|
|
358
|
-
['minLength', 'minlength'],
|
|
359
|
-
['noValidate', 'novalidate'],
|
|
360
|
-
['useMap', 'usemap'],
|
|
361
|
-
['htmlFor', 'for'],
|
|
362
|
-
]);
|
|
363
|
-
/**
|
|
364
|
-
* Inverted map with attribute name key and property name value.
|
|
365
|
-
*/
|
|
366
|
-
const NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
367
|
-
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING.forEach((value, key) => NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.set(value, key));
|
|
368
|
-
return {
|
|
369
|
-
NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING,
|
|
370
|
-
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING,
|
|
371
|
-
};
|
|
372
|
-
})();
|
|
338
|
+
// These are HTML standard prop/attribute IDL mappings, but are not predictable based on camel/kebab-case conversion
|
|
339
|
+
const SPECIAL_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map([
|
|
340
|
+
['accessKey', 'accesskey'],
|
|
341
|
+
['readOnly', 'readonly'],
|
|
342
|
+
['tabIndex', 'tabindex'],
|
|
343
|
+
['bgColor', 'bgcolor'],
|
|
344
|
+
['colSpan', 'colspan'],
|
|
345
|
+
['rowSpan', 'rowspan'],
|
|
346
|
+
['contentEditable', 'contenteditable'],
|
|
347
|
+
['crossOrigin', 'crossorigin'],
|
|
348
|
+
['dateTime', 'datetime'],
|
|
349
|
+
['formAction', 'formaction'],
|
|
350
|
+
['isMap', 'ismap'],
|
|
351
|
+
['maxLength', 'maxlength'],
|
|
352
|
+
['minLength', 'minlength'],
|
|
353
|
+
['noValidate', 'novalidate'],
|
|
354
|
+
['useMap', 'usemap'],
|
|
355
|
+
['htmlFor', 'for'],
|
|
356
|
+
]);
|
|
373
357
|
/**
|
|
374
358
|
* Map associating previously transformed HTML property into HTML attribute.
|
|
375
359
|
*/
|
|
376
360
|
const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map();
|
|
377
|
-
/**
|
|
378
|
-
* Map associating previously transformed HTML attribute into HTML property.
|
|
379
|
-
*/
|
|
380
|
-
const CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/ new Map();
|
|
381
361
|
function htmlPropertyToAttribute(propName) {
|
|
382
362
|
const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
|
|
383
363
|
if (!isUndefined$1(ariaAttributeName)) {
|
|
384
364
|
return ariaAttributeName;
|
|
385
365
|
}
|
|
386
|
-
const specialAttributeName =
|
|
366
|
+
const specialAttributeName = SPECIAL_PROPERTY_ATTRIBUTE_MAPPING.get(propName);
|
|
387
367
|
if (!isUndefined$1(specialAttributeName)) {
|
|
388
368
|
return specialAttributeName;
|
|
389
369
|
}
|
|
@@ -406,22 +386,17 @@ function htmlPropertyToAttribute(propName) {
|
|
|
406
386
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
407
387
|
return attributeName;
|
|
408
388
|
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
if (
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
const cachedPropertyName = CACHED_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
|
|
419
|
-
if (!isUndefined$1(cachedPropertyName)) {
|
|
420
|
-
return cachedPropertyName;
|
|
389
|
+
/**
|
|
390
|
+
* Map associating previously transformed kabab-case attributes into camel-case props.
|
|
391
|
+
*/
|
|
392
|
+
const CACHED_KEBAB_CAMEL_MAPPING = /*@__PURE__@*/ new Map();
|
|
393
|
+
function kebabCaseToCamelCase(attrName) {
|
|
394
|
+
let result = CACHED_KEBAB_CAMEL_MAPPING.get(attrName);
|
|
395
|
+
if (isUndefined$1(result)) {
|
|
396
|
+
result = StringReplace.call(attrName, CAMEL_REGEX, (g) => g[1].toUpperCase());
|
|
397
|
+
CACHED_KEBAB_CAMEL_MAPPING.set(attrName, result);
|
|
421
398
|
}
|
|
422
|
-
|
|
423
|
-
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
424
|
-
return propertyName;
|
|
399
|
+
return result;
|
|
425
400
|
}
|
|
426
401
|
|
|
427
402
|
/*
|
|
@@ -449,9 +424,9 @@ function htmlEscape(str, attrMode = false) {
|
|
|
449
424
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
450
425
|
*/
|
|
451
426
|
// Increment whenever the LWC template compiler changes
|
|
452
|
-
const LWC_VERSION = "2.
|
|
427
|
+
const LWC_VERSION = "2.46.0";
|
|
453
428
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
454
|
-
/** version: 2.
|
|
429
|
+
/** version: 2.46.0 */
|
|
455
430
|
|
|
456
431
|
/* proxy-compat-disable */
|
|
457
432
|
/**
|
|
@@ -530,7 +505,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
530
505
|
setFeatureFlag(name, value);
|
|
531
506
|
}
|
|
532
507
|
}
|
|
533
|
-
/** version: 2.
|
|
508
|
+
/** version: 2.46.0 */
|
|
534
509
|
|
|
535
510
|
/*
|
|
536
511
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -627,7 +602,7 @@ function applyAriaReflection(prototype = Element.prototype) {
|
|
|
627
602
|
}
|
|
628
603
|
}
|
|
629
604
|
}
|
|
630
|
-
/** version: 2.
|
|
605
|
+
/** version: 2.46.0 */
|
|
631
606
|
|
|
632
607
|
/* proxy-compat-disable */
|
|
633
608
|
/**
|
|
@@ -3552,27 +3527,35 @@ function isVScopedSlotFragment(vnode) {
|
|
|
3552
3527
|
* SPDX-License-Identifier: MIT
|
|
3553
3528
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3554
3529
|
*/
|
|
3555
|
-
const ColonCharCode
|
|
3530
|
+
const ColonCharCode = 58;
|
|
3556
3531
|
function patchAttributes(oldVnode, vnode, renderer) {
|
|
3557
|
-
const { attrs } = vnode.data;
|
|
3532
|
+
const { attrs, external } = vnode.data;
|
|
3558
3533
|
if (isUndefined$1(attrs)) {
|
|
3559
3534
|
return;
|
|
3560
3535
|
}
|
|
3561
3536
|
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3537
|
+
// Attrs may be the same due to the static content optimization, so we can skip diffing
|
|
3562
3538
|
if (oldAttrs === attrs) {
|
|
3563
3539
|
return;
|
|
3564
3540
|
}
|
|
3565
3541
|
const { elm } = vnode;
|
|
3566
|
-
const { setAttribute, removeAttribute } = renderer;
|
|
3542
|
+
const { setAttribute, removeAttribute, setProperty } = renderer;
|
|
3567
3543
|
for (const key in attrs) {
|
|
3568
3544
|
const cur = attrs[key];
|
|
3569
3545
|
const old = oldAttrs[key];
|
|
3570
3546
|
if (old !== cur) {
|
|
3571
|
-
|
|
3547
|
+
let propName;
|
|
3548
|
+
// For external custom elements, sniff to see if the attr should be considered a prop.
|
|
3549
|
+
// Use kebabCaseToCamelCase directly because we don't want to set props like `ariaLabel` or `tabIndex`
|
|
3550
|
+
// on a custom element versus just using the more reliable attribute format.
|
|
3551
|
+
if (external && (propName = kebabCaseToCamelCase(key)) in elm) {
|
|
3552
|
+
setProperty(elm, propName, cur);
|
|
3553
|
+
}
|
|
3554
|
+
else if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
3572
3555
|
// Assume xml namespace
|
|
3573
3556
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
3574
3557
|
}
|
|
3575
|
-
else if (StringCharCodeAt.call(key, 5) === ColonCharCode
|
|
3558
|
+
else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
3576
3559
|
// Assume xlink namespace
|
|
3577
3560
|
setAttribute(elm, key, cur, XLINK_NAMESPACE);
|
|
3578
3561
|
}
|
|
@@ -3586,46 +3569,6 @@ function patchAttributes(oldVnode, vnode, renderer) {
|
|
|
3586
3569
|
}
|
|
3587
3570
|
}
|
|
3588
3571
|
|
|
3589
|
-
/*
|
|
3590
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
3591
|
-
* All rights reserved.
|
|
3592
|
-
* SPDX-License-Identifier: MIT
|
|
3593
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3594
|
-
*/
|
|
3595
|
-
const ColonCharCode = 58;
|
|
3596
|
-
function patchAttrUnlessProp(oldVnode, vnode, renderer) {
|
|
3597
|
-
const { data: { attrs }, elm, } = vnode;
|
|
3598
|
-
if (isUndefined$1(attrs)) {
|
|
3599
|
-
return;
|
|
3600
|
-
}
|
|
3601
|
-
const { removeAttribute, setAttribute, setProperty } = renderer;
|
|
3602
|
-
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3603
|
-
for (const name in attrs) {
|
|
3604
|
-
const cur = attrs[name];
|
|
3605
|
-
const old = oldAttrs[name];
|
|
3606
|
-
if (old !== cur) {
|
|
3607
|
-
const propName = htmlAttributeToProperty(name);
|
|
3608
|
-
if (propName in elm) {
|
|
3609
|
-
setProperty(elm, name, cur);
|
|
3610
|
-
}
|
|
3611
|
-
else if (StringCharCodeAt.call(name, 3) === ColonCharCode) {
|
|
3612
|
-
// Assume xml namespace
|
|
3613
|
-
setAttribute(elm, name, cur, XML_NAMESPACE);
|
|
3614
|
-
}
|
|
3615
|
-
else if (StringCharCodeAt.call(name, 5) === ColonCharCode) {
|
|
3616
|
-
// Assume xlink namespace
|
|
3617
|
-
setAttribute(elm, name, cur, XLINK_NAMESPACE);
|
|
3618
|
-
}
|
|
3619
|
-
else if (isNull(cur) || isUndefined$1(cur)) {
|
|
3620
|
-
removeAttribute(elm, name);
|
|
3621
|
-
}
|
|
3622
|
-
else {
|
|
3623
|
-
setAttribute(elm, name, cur);
|
|
3624
|
-
}
|
|
3625
|
-
}
|
|
3626
|
-
}
|
|
3627
|
-
}
|
|
3628
|
-
|
|
3629
3572
|
/*
|
|
3630
3573
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
3631
3574
|
* All rights reserved.
|
|
@@ -3647,6 +3590,7 @@ function patchProps(oldVnode, vnode, renderer) {
|
|
|
3647
3590
|
if (!isNull(oldVnode)) {
|
|
3648
3591
|
oldProps = oldVnode.data.props;
|
|
3649
3592
|
const oldSpread = oldVnode.data.spread;
|
|
3593
|
+
// Props may be the same due to the static content optimization, so we can skip diffing
|
|
3650
3594
|
if (oldProps === props && oldSpread === spread) {
|
|
3651
3595
|
return;
|
|
3652
3596
|
}
|
|
@@ -3769,7 +3713,9 @@ function patchStyleAttribute(oldVnode, vnode, renderer) {
|
|
|
3769
3713
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3770
3714
|
*/
|
|
3771
3715
|
function applyEventListeners(vnode, renderer) {
|
|
3772
|
-
|
|
3716
|
+
var _a;
|
|
3717
|
+
const { elm } = vnode;
|
|
3718
|
+
const on = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.on;
|
|
3773
3719
|
if (isUndefined$1(on)) {
|
|
3774
3720
|
return;
|
|
3775
3721
|
}
|
|
@@ -3981,6 +3927,8 @@ function mountStatic(vnode, parent, anchor, renderer) {
|
|
|
3981
3927
|
}
|
|
3982
3928
|
}
|
|
3983
3929
|
insertNode(elm, parent, anchor, renderer);
|
|
3930
|
+
// Event listeners are only applied once when mounting, so they are allowed for static vnodes
|
|
3931
|
+
applyEventListeners(vnode, renderer);
|
|
3984
3932
|
}
|
|
3985
3933
|
function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
3986
3934
|
const { sel, owner } = vnode;
|
|
@@ -4203,12 +4151,7 @@ function patchElementPropsAndAttrs$1(oldVnode, vnode, renderer) {
|
|
|
4203
4151
|
// value is set before type=radio.
|
|
4204
4152
|
patchClassAttribute(oldVnode, vnode, renderer);
|
|
4205
4153
|
patchStyleAttribute(oldVnode, vnode, renderer);
|
|
4206
|
-
|
|
4207
|
-
patchAttrUnlessProp(oldVnode, vnode, renderer);
|
|
4208
|
-
}
|
|
4209
|
-
else {
|
|
4210
|
-
patchAttributes(oldVnode, vnode, renderer);
|
|
4211
|
-
}
|
|
4154
|
+
patchAttributes(oldVnode, vnode, renderer);
|
|
4212
4155
|
patchProps(oldVnode, vnode, renderer);
|
|
4213
4156
|
}
|
|
4214
4157
|
function applyStyleScoping(elm, owner, renderer) {
|
|
@@ -4608,7 +4551,7 @@ function ssf(slotName, factory) {
|
|
|
4608
4551
|
};
|
|
4609
4552
|
}
|
|
4610
4553
|
// [st]atic node
|
|
4611
|
-
function st(fragment, key) {
|
|
4554
|
+
function st(fragment, key, data) {
|
|
4612
4555
|
return {
|
|
4613
4556
|
type: 4 /* VNodeType.Static */,
|
|
4614
4557
|
sel: undefined,
|
|
@@ -4616,6 +4559,7 @@ function st(fragment, key) {
|
|
|
4616
4559
|
elm: undefined,
|
|
4617
4560
|
fragment,
|
|
4618
4561
|
owner: getVMBeingRendered(),
|
|
4562
|
+
data,
|
|
4619
4563
|
};
|
|
4620
4564
|
}
|
|
4621
4565
|
// [fr]agment node
|
|
@@ -4721,7 +4665,12 @@ function s(slotName, data, children, slotset) {
|
|
|
4721
4665
|
// undefined is for root components, but root components cannot accept slotted content
|
|
4722
4666
|
setVMBeingRendered(slotset.owner);
|
|
4723
4667
|
try {
|
|
4724
|
-
|
|
4668
|
+
// The factory function is a template snippet from the slot set owner's template,
|
|
4669
|
+
// hence switch over to the slot set owner's template reactive observer
|
|
4670
|
+
const { tro } = slotset.owner;
|
|
4671
|
+
tro.observe(() => {
|
|
4672
|
+
ArrayPush$1.call(newChildren, vnode.factory(data.slotData, data.key));
|
|
4673
|
+
});
|
|
4725
4674
|
}
|
|
4726
4675
|
finally {
|
|
4727
4676
|
setVMBeingRendered(vmBeingRenderedInception);
|
|
@@ -6245,7 +6194,7 @@ function readonly(obj) {
|
|
|
6245
6194
|
}
|
|
6246
6195
|
return getReadOnlyProxy(obj);
|
|
6247
6196
|
}
|
|
6248
|
-
/** version: 2.
|
|
6197
|
+
/** version: 2.46.0 */
|
|
6249
6198
|
|
|
6250
6199
|
/*
|
|
6251
6200
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -14557,7 +14506,7 @@ seal(LightningElement.prototype);
|
|
|
14557
14506
|
function createElement() {
|
|
14558
14507
|
throw new Error('createElement is not supported in @lwc/engine-server, only @lwc/engine-dom.');
|
|
14559
14508
|
}
|
|
14560
|
-
/** version: 2.
|
|
14509
|
+
/** version: 2.46.0 */
|
|
14561
14510
|
|
|
14562
14511
|
exports.LightningElement = LightningElement;
|
|
14563
14512
|
exports.api = api$1;
|