lwc 2.45.5 → 2.47.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
|
@@ -333,55 +333,35 @@ const GLOBAL_ATTRIBUTE = /*@__PURE__*/ new Set([
|
|
|
333
333
|
function isGlobalHtmlAttribute(attrName) {
|
|
334
334
|
return GLOBAL_ATTRIBUTE.has(attrName);
|
|
335
335
|
}
|
|
336
|
-
//
|
|
337
|
-
const
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
['maxLength', 'maxlength'],
|
|
356
|
-
['minLength', 'minlength'],
|
|
357
|
-
['noValidate', 'novalidate'],
|
|
358
|
-
['useMap', 'usemap'],
|
|
359
|
-
['htmlFor', 'for'],
|
|
360
|
-
]);
|
|
361
|
-
/**
|
|
362
|
-
* Inverted map with attribute name key and property name value.
|
|
363
|
-
*/
|
|
364
|
-
const NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
365
|
-
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING.forEach((value, key) => NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.set(value, key));
|
|
366
|
-
return {
|
|
367
|
-
NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING,
|
|
368
|
-
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING,
|
|
369
|
-
};
|
|
370
|
-
})();
|
|
336
|
+
// These are HTML standard prop/attribute IDL mappings, but are not predictable based on camel/kebab-case conversion
|
|
337
|
+
const SPECIAL_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map([
|
|
338
|
+
['accessKey', 'accesskey'],
|
|
339
|
+
['readOnly', 'readonly'],
|
|
340
|
+
['tabIndex', 'tabindex'],
|
|
341
|
+
['bgColor', 'bgcolor'],
|
|
342
|
+
['colSpan', 'colspan'],
|
|
343
|
+
['rowSpan', 'rowspan'],
|
|
344
|
+
['contentEditable', 'contenteditable'],
|
|
345
|
+
['crossOrigin', 'crossorigin'],
|
|
346
|
+
['dateTime', 'datetime'],
|
|
347
|
+
['formAction', 'formaction'],
|
|
348
|
+
['isMap', 'ismap'],
|
|
349
|
+
['maxLength', 'maxlength'],
|
|
350
|
+
['minLength', 'minlength'],
|
|
351
|
+
['noValidate', 'novalidate'],
|
|
352
|
+
['useMap', 'usemap'],
|
|
353
|
+
['htmlFor', 'for'],
|
|
354
|
+
]);
|
|
371
355
|
/**
|
|
372
356
|
* Map associating previously transformed HTML property into HTML attribute.
|
|
373
357
|
*/
|
|
374
358
|
const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map();
|
|
375
|
-
/**
|
|
376
|
-
* Map associating previously transformed HTML attribute into HTML property.
|
|
377
|
-
*/
|
|
378
|
-
const CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/ new Map();
|
|
379
359
|
function htmlPropertyToAttribute(propName) {
|
|
380
360
|
const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
|
|
381
361
|
if (!isUndefined$1(ariaAttributeName)) {
|
|
382
362
|
return ariaAttributeName;
|
|
383
363
|
}
|
|
384
|
-
const specialAttributeName =
|
|
364
|
+
const specialAttributeName = SPECIAL_PROPERTY_ATTRIBUTE_MAPPING.get(propName);
|
|
385
365
|
if (!isUndefined$1(specialAttributeName)) {
|
|
386
366
|
return specialAttributeName;
|
|
387
367
|
}
|
|
@@ -404,22 +384,17 @@ function htmlPropertyToAttribute(propName) {
|
|
|
404
384
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
405
385
|
return attributeName;
|
|
406
386
|
}
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
if (
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
const cachedPropertyName = CACHED_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
|
|
417
|
-
if (!isUndefined$1(cachedPropertyName)) {
|
|
418
|
-
return cachedPropertyName;
|
|
387
|
+
/**
|
|
388
|
+
* Map associating previously transformed kabab-case attributes into camel-case props.
|
|
389
|
+
*/
|
|
390
|
+
const CACHED_KEBAB_CAMEL_MAPPING = /*@__PURE__@*/ new Map();
|
|
391
|
+
function kebabCaseToCamelCase(attrName) {
|
|
392
|
+
let result = CACHED_KEBAB_CAMEL_MAPPING.get(attrName);
|
|
393
|
+
if (isUndefined$1(result)) {
|
|
394
|
+
result = StringReplace.call(attrName, CAMEL_REGEX, (g) => g[1].toUpperCase());
|
|
395
|
+
CACHED_KEBAB_CAMEL_MAPPING.set(attrName, result);
|
|
419
396
|
}
|
|
420
|
-
|
|
421
|
-
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
422
|
-
return propertyName;
|
|
397
|
+
return result;
|
|
423
398
|
}
|
|
424
399
|
|
|
425
400
|
/*
|
|
@@ -447,9 +422,9 @@ function htmlEscape(str, attrMode = false) {
|
|
|
447
422
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
448
423
|
*/
|
|
449
424
|
// Increment whenever the LWC template compiler changes
|
|
450
|
-
const LWC_VERSION = "2.
|
|
425
|
+
const LWC_VERSION = "2.47.0";
|
|
451
426
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
452
|
-
/** version: 2.
|
|
427
|
+
/** version: 2.47.0 */
|
|
453
428
|
|
|
454
429
|
/* proxy-compat-disable */
|
|
455
430
|
/**
|
|
@@ -528,7 +503,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
528
503
|
setFeatureFlag(name, value);
|
|
529
504
|
}
|
|
530
505
|
}
|
|
531
|
-
/** version: 2.
|
|
506
|
+
/** version: 2.47.0 */
|
|
532
507
|
|
|
533
508
|
/*
|
|
534
509
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -625,7 +600,7 @@ function applyAriaReflection(prototype = Element.prototype) {
|
|
|
625
600
|
}
|
|
626
601
|
}
|
|
627
602
|
}
|
|
628
|
-
/** version: 2.
|
|
603
|
+
/** version: 2.47.0 */
|
|
629
604
|
|
|
630
605
|
/* proxy-compat-disable */
|
|
631
606
|
/**
|
|
@@ -3550,27 +3525,35 @@ function isVScopedSlotFragment(vnode) {
|
|
|
3550
3525
|
* SPDX-License-Identifier: MIT
|
|
3551
3526
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3552
3527
|
*/
|
|
3553
|
-
const ColonCharCode
|
|
3528
|
+
const ColonCharCode = 58;
|
|
3554
3529
|
function patchAttributes(oldVnode, vnode, renderer) {
|
|
3555
|
-
const { attrs } = vnode.data;
|
|
3530
|
+
const { attrs, external } = vnode.data;
|
|
3556
3531
|
if (isUndefined$1(attrs)) {
|
|
3557
3532
|
return;
|
|
3558
3533
|
}
|
|
3559
3534
|
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3535
|
+
// Attrs may be the same due to the static content optimization, so we can skip diffing
|
|
3560
3536
|
if (oldAttrs === attrs) {
|
|
3561
3537
|
return;
|
|
3562
3538
|
}
|
|
3563
3539
|
const { elm } = vnode;
|
|
3564
|
-
const { setAttribute, removeAttribute } = renderer;
|
|
3540
|
+
const { setAttribute, removeAttribute, setProperty } = renderer;
|
|
3565
3541
|
for (const key in attrs) {
|
|
3566
3542
|
const cur = attrs[key];
|
|
3567
3543
|
const old = oldAttrs[key];
|
|
3568
3544
|
if (old !== cur) {
|
|
3569
|
-
|
|
3545
|
+
let propName;
|
|
3546
|
+
// For external custom elements, sniff to see if the attr should be considered a prop.
|
|
3547
|
+
// Use kebabCaseToCamelCase directly because we don't want to set props like `ariaLabel` or `tabIndex`
|
|
3548
|
+
// on a custom element versus just using the more reliable attribute format.
|
|
3549
|
+
if (external && (propName = kebabCaseToCamelCase(key)) in elm) {
|
|
3550
|
+
setProperty(elm, propName, cur);
|
|
3551
|
+
}
|
|
3552
|
+
else if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
3570
3553
|
// Assume xml namespace
|
|
3571
3554
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
3572
3555
|
}
|
|
3573
|
-
else if (StringCharCodeAt.call(key, 5) === ColonCharCode
|
|
3556
|
+
else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
3574
3557
|
// Assume xlink namespace
|
|
3575
3558
|
setAttribute(elm, key, cur, XLINK_NAMESPACE);
|
|
3576
3559
|
}
|
|
@@ -3584,46 +3567,6 @@ function patchAttributes(oldVnode, vnode, renderer) {
|
|
|
3584
3567
|
}
|
|
3585
3568
|
}
|
|
3586
3569
|
|
|
3587
|
-
/*
|
|
3588
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
3589
|
-
* All rights reserved.
|
|
3590
|
-
* SPDX-License-Identifier: MIT
|
|
3591
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3592
|
-
*/
|
|
3593
|
-
const ColonCharCode = 58;
|
|
3594
|
-
function patchAttrUnlessProp(oldVnode, vnode, renderer) {
|
|
3595
|
-
const { data: { attrs }, elm, } = vnode;
|
|
3596
|
-
if (isUndefined$1(attrs)) {
|
|
3597
|
-
return;
|
|
3598
|
-
}
|
|
3599
|
-
const { removeAttribute, setAttribute, setProperty } = renderer;
|
|
3600
|
-
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3601
|
-
for (const name in attrs) {
|
|
3602
|
-
const cur = attrs[name];
|
|
3603
|
-
const old = oldAttrs[name];
|
|
3604
|
-
if (old !== cur) {
|
|
3605
|
-
const propName = htmlAttributeToProperty(name);
|
|
3606
|
-
if (propName in elm) {
|
|
3607
|
-
setProperty(elm, name, cur);
|
|
3608
|
-
}
|
|
3609
|
-
else if (StringCharCodeAt.call(name, 3) === ColonCharCode) {
|
|
3610
|
-
// Assume xml namespace
|
|
3611
|
-
setAttribute(elm, name, cur, XML_NAMESPACE);
|
|
3612
|
-
}
|
|
3613
|
-
else if (StringCharCodeAt.call(name, 5) === ColonCharCode) {
|
|
3614
|
-
// Assume xlink namespace
|
|
3615
|
-
setAttribute(elm, name, cur, XLINK_NAMESPACE);
|
|
3616
|
-
}
|
|
3617
|
-
else if (isNull(cur) || isUndefined$1(cur)) {
|
|
3618
|
-
removeAttribute(elm, name);
|
|
3619
|
-
}
|
|
3620
|
-
else {
|
|
3621
|
-
setAttribute(elm, name, cur);
|
|
3622
|
-
}
|
|
3623
|
-
}
|
|
3624
|
-
}
|
|
3625
|
-
}
|
|
3626
|
-
|
|
3627
3570
|
/*
|
|
3628
3571
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
3629
3572
|
* All rights reserved.
|
|
@@ -3645,6 +3588,7 @@ function patchProps(oldVnode, vnode, renderer) {
|
|
|
3645
3588
|
if (!isNull(oldVnode)) {
|
|
3646
3589
|
oldProps = oldVnode.data.props;
|
|
3647
3590
|
const oldSpread = oldVnode.data.spread;
|
|
3591
|
+
// Props may be the same due to the static content optimization, so we can skip diffing
|
|
3648
3592
|
if (oldProps === props && oldSpread === spread) {
|
|
3649
3593
|
return;
|
|
3650
3594
|
}
|
|
@@ -3767,7 +3711,9 @@ function patchStyleAttribute(oldVnode, vnode, renderer) {
|
|
|
3767
3711
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3768
3712
|
*/
|
|
3769
3713
|
function applyEventListeners(vnode, renderer) {
|
|
3770
|
-
|
|
3714
|
+
var _a;
|
|
3715
|
+
const { elm } = vnode;
|
|
3716
|
+
const on = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.on;
|
|
3771
3717
|
if (isUndefined$1(on)) {
|
|
3772
3718
|
return;
|
|
3773
3719
|
}
|
|
@@ -3979,6 +3925,8 @@ function mountStatic(vnode, parent, anchor, renderer) {
|
|
|
3979
3925
|
}
|
|
3980
3926
|
}
|
|
3981
3927
|
insertNode(elm, parent, anchor, renderer);
|
|
3928
|
+
// Event listeners are only applied once when mounting, so they are allowed for static vnodes
|
|
3929
|
+
applyEventListeners(vnode, renderer);
|
|
3982
3930
|
}
|
|
3983
3931
|
function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
3984
3932
|
const { sel, owner } = vnode;
|
|
@@ -4201,12 +4149,7 @@ function patchElementPropsAndAttrs$1(oldVnode, vnode, renderer) {
|
|
|
4201
4149
|
// value is set before type=radio.
|
|
4202
4150
|
patchClassAttribute(oldVnode, vnode, renderer);
|
|
4203
4151
|
patchStyleAttribute(oldVnode, vnode, renderer);
|
|
4204
|
-
|
|
4205
|
-
patchAttrUnlessProp(oldVnode, vnode, renderer);
|
|
4206
|
-
}
|
|
4207
|
-
else {
|
|
4208
|
-
patchAttributes(oldVnode, vnode, renderer);
|
|
4209
|
-
}
|
|
4152
|
+
patchAttributes(oldVnode, vnode, renderer);
|
|
4210
4153
|
patchProps(oldVnode, vnode, renderer);
|
|
4211
4154
|
}
|
|
4212
4155
|
function applyStyleScoping(elm, owner, renderer) {
|
|
@@ -4606,7 +4549,7 @@ function ssf(slotName, factory) {
|
|
|
4606
4549
|
};
|
|
4607
4550
|
}
|
|
4608
4551
|
// [st]atic node
|
|
4609
|
-
function st(fragment, key) {
|
|
4552
|
+
function st(fragment, key, data) {
|
|
4610
4553
|
return {
|
|
4611
4554
|
type: 4 /* VNodeType.Static */,
|
|
4612
4555
|
sel: undefined,
|
|
@@ -4614,6 +4557,7 @@ function st(fragment, key) {
|
|
|
4614
4557
|
elm: undefined,
|
|
4615
4558
|
fragment,
|
|
4616
4559
|
owner: getVMBeingRendered(),
|
|
4560
|
+
data,
|
|
4617
4561
|
};
|
|
4618
4562
|
}
|
|
4619
4563
|
// [fr]agment node
|
|
@@ -6248,7 +6192,7 @@ function readonly(obj) {
|
|
|
6248
6192
|
}
|
|
6249
6193
|
return getReadOnlyProxy(obj);
|
|
6250
6194
|
}
|
|
6251
|
-
/** version: 2.
|
|
6195
|
+
/** version: 2.47.0 */
|
|
6252
6196
|
|
|
6253
6197
|
/*
|
|
6254
6198
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -14560,7 +14504,7 @@ seal(LightningElement.prototype);
|
|
|
14560
14504
|
function createElement() {
|
|
14561
14505
|
throw new Error('createElement is not supported in @lwc/engine-server, only @lwc/engine-dom.');
|
|
14562
14506
|
}
|
|
14563
|
-
/** version: 2.
|
|
14507
|
+
/** version: 2.47.0 */
|
|
14564
14508
|
|
|
14565
14509
|
export { LightningElement, api$1 as api, createContextProvider, createElement, freezeTemplate, getComponentDef, isComponentConstructor, parseFragment$1 as parseFragment, parseFragment$1 as parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderComponent, renderer, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, track, unwrap, wire };
|
|
14566
14510
|
//# sourceMappingURL=engine-server.js.map
|