lwc 2.30.2 → 2.31.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/dist/engine-dom/esm/es2017/engine-dom.js +128 -41
- package/dist/engine-dom/iife/es2017/engine-dom.js +128 -41
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +125 -38
- package/dist/engine-dom/iife/es5/engine-dom.js +156 -65
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +153 -62
- package/dist/engine-dom/umd/es2017/engine-dom.js +128 -41
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +125 -38
- package/dist/engine-dom/umd/es5/engine-dom.js +156 -65
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +153 -62
- package/dist/engine-server/commonjs/es2017/engine-server.js +120 -40
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +120 -40
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +7 -4
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +7 -4
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +7 -4
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +7 -4
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +7 -4
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +7 -4
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +7 -4
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +7 -4
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +7 -4
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +2 -2
- package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +2 -2
- package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
- package/package.json +7 -7
|
@@ -237,32 +237,57 @@ const KEY__SCOPED_CSS = '$scoped$';
|
|
|
237
237
|
const XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
|
238
238
|
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
239
239
|
const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
*
|
|
240
|
+
|
|
241
|
+
/*
|
|
242
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
243
|
+
* All rights reserved.
|
|
244
|
+
* SPDX-License-Identifier: MIT
|
|
245
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
243
246
|
*/
|
|
244
|
-
const
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
[
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
]
|
|
247
|
+
const CAMEL_REGEX = /-([a-z])/g;
|
|
248
|
+
// Convoluted map generation so that @lwc/shared remains fully tree-shakable (verify-treeshakable)
|
|
249
|
+
const { NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING, NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING } =
|
|
250
|
+
/*#__PURE__*/ (() => {
|
|
251
|
+
/**
|
|
252
|
+
* Map composed of properties to attributes not following the HTML property to attribute mapping
|
|
253
|
+
* convention.
|
|
254
|
+
*/
|
|
255
|
+
const NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING = new Map([
|
|
256
|
+
['accessKey', 'accesskey'],
|
|
257
|
+
['readOnly', 'readonly'],
|
|
258
|
+
['tabIndex', 'tabindex'],
|
|
259
|
+
['bgColor', 'bgcolor'],
|
|
260
|
+
['colSpan', 'colspan'],
|
|
261
|
+
['rowSpan', 'rowspan'],
|
|
262
|
+
['contentEditable', 'contenteditable'],
|
|
263
|
+
['crossOrigin', 'crossorigin'],
|
|
264
|
+
['dateTime', 'datetime'],
|
|
265
|
+
['formAction', 'formaction'],
|
|
266
|
+
['isMap', 'ismap'],
|
|
267
|
+
['maxLength', 'maxlength'],
|
|
268
|
+
['minLength', 'minlength'],
|
|
269
|
+
['noValidate', 'novalidate'],
|
|
270
|
+
['useMap', 'usemap'],
|
|
271
|
+
['htmlFor', 'for'],
|
|
272
|
+
]);
|
|
273
|
+
/**
|
|
274
|
+
* Inverted map with attribute name key and property name value.
|
|
275
|
+
*/
|
|
276
|
+
const NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
277
|
+
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING.forEach((value, key) => NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.set(value, key));
|
|
278
|
+
return {
|
|
279
|
+
NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING,
|
|
280
|
+
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING,
|
|
281
|
+
};
|
|
282
|
+
})();
|
|
262
283
|
/**
|
|
263
284
|
* Map associating previously transformed HTML property into HTML attribute.
|
|
264
285
|
*/
|
|
265
286
|
const CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
|
|
287
|
+
/**
|
|
288
|
+
* Map associating previously transformed HTML attribute into HTML property.
|
|
289
|
+
*/
|
|
290
|
+
const CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
266
291
|
function htmlPropertyToAttribute(propName) {
|
|
267
292
|
const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
|
|
268
293
|
if (!isUndefined$1(ariaAttributeName)) {
|
|
@@ -291,6 +316,23 @@ function htmlPropertyToAttribute(propName) {
|
|
|
291
316
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
292
317
|
return attributeName;
|
|
293
318
|
}
|
|
319
|
+
function htmlAttributeToProperty(attrName) {
|
|
320
|
+
const ariaPropertyName = AriaAttrNameToPropNameMap[attrName];
|
|
321
|
+
if (!isUndefined$1(ariaPropertyName)) {
|
|
322
|
+
return ariaPropertyName;
|
|
323
|
+
}
|
|
324
|
+
const specialPropertyName = NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
|
|
325
|
+
if (!isUndefined$1(specialPropertyName)) {
|
|
326
|
+
return specialPropertyName;
|
|
327
|
+
}
|
|
328
|
+
const cachedPropertyName = CACHED_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
|
|
329
|
+
if (!isUndefined$1(cachedPropertyName)) {
|
|
330
|
+
return cachedPropertyName;
|
|
331
|
+
}
|
|
332
|
+
const propertyName = StringReplace.call(attrName, CAMEL_REGEX, (g) => g[1].toUpperCase());
|
|
333
|
+
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
334
|
+
return propertyName;
|
|
335
|
+
}
|
|
294
336
|
|
|
295
337
|
/*
|
|
296
338
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -299,9 +341,9 @@ function htmlPropertyToAttribute(propName) {
|
|
|
299
341
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
300
342
|
*/
|
|
301
343
|
// Increment whenever the LWC template compiler changes
|
|
302
|
-
const LWC_VERSION = "2.
|
|
344
|
+
const LWC_VERSION = "2.31.0";
|
|
303
345
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
304
|
-
/** version: 2.
|
|
346
|
+
/** version: 2.31.0 */
|
|
305
347
|
|
|
306
348
|
/**
|
|
307
349
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -383,7 +425,7 @@ for (let i = 0, len = ElementPrototypeAriaPropertyNames.length; i < len; i += 1)
|
|
|
383
425
|
patch$1(propName);
|
|
384
426
|
}
|
|
385
427
|
}
|
|
386
|
-
/** version: 2.
|
|
428
|
+
/** version: 2.31.0 */
|
|
387
429
|
|
|
388
430
|
/**
|
|
389
431
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -463,7 +505,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
463
505
|
setFeatureFlag(name, value);
|
|
464
506
|
}
|
|
465
507
|
}
|
|
466
|
-
/** version: 2.
|
|
508
|
+
/** version: 2.31.0 */
|
|
467
509
|
|
|
468
510
|
/*
|
|
469
511
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -3615,7 +3657,7 @@ function isVScopedSlotFragment(vnode) {
|
|
|
3615
3657
|
* SPDX-License-Identifier: MIT
|
|
3616
3658
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3617
3659
|
*/
|
|
3618
|
-
const ColonCharCode = 58;
|
|
3660
|
+
const ColonCharCode$1 = 58;
|
|
3619
3661
|
function patchAttributes(oldVnode, vnode, renderer) {
|
|
3620
3662
|
const { attrs } = vnode.data;
|
|
3621
3663
|
if (isUndefined$1(attrs)) {
|
|
@@ -3632,11 +3674,11 @@ function patchAttributes(oldVnode, vnode, renderer) {
|
|
|
3632
3674
|
const old = oldAttrs[key];
|
|
3633
3675
|
if (old !== cur) {
|
|
3634
3676
|
unlockAttribute(elm, key);
|
|
3635
|
-
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
3677
|
+
if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
|
|
3636
3678
|
// Assume xml namespace
|
|
3637
3679
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
3638
3680
|
}
|
|
3639
|
-
else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
3681
|
+
else if (StringCharCodeAt.call(key, 5) === ColonCharCode$1) {
|
|
3640
3682
|
// Assume xlink namespace
|
|
3641
3683
|
setAttribute(elm, key, cur, XLINK_NAMESPACE);
|
|
3642
3684
|
}
|
|
@@ -3651,6 +3693,46 @@ function patchAttributes(oldVnode, vnode, renderer) {
|
|
|
3651
3693
|
}
|
|
3652
3694
|
}
|
|
3653
3695
|
|
|
3696
|
+
/*
|
|
3697
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
3698
|
+
* All rights reserved.
|
|
3699
|
+
* SPDX-License-Identifier: MIT
|
|
3700
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3701
|
+
*/
|
|
3702
|
+
const ColonCharCode = 58;
|
|
3703
|
+
function patchAttrUnlessProp(oldVnode, vnode, renderer) {
|
|
3704
|
+
const { data: { attrs }, elm, } = vnode;
|
|
3705
|
+
if (isUndefined$1(attrs)) {
|
|
3706
|
+
return;
|
|
3707
|
+
}
|
|
3708
|
+
const { removeAttribute, setAttribute, setProperty } = renderer;
|
|
3709
|
+
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3710
|
+
for (const name in attrs) {
|
|
3711
|
+
const cur = attrs[name];
|
|
3712
|
+
const old = oldAttrs[name];
|
|
3713
|
+
if (old !== cur) {
|
|
3714
|
+
const propName = htmlAttributeToProperty(name);
|
|
3715
|
+
if (propName in elm) {
|
|
3716
|
+
setProperty(elm, name, cur);
|
|
3717
|
+
}
|
|
3718
|
+
else if (StringCharCodeAt.call(name, 3) === ColonCharCode) {
|
|
3719
|
+
// Assume xml namespace
|
|
3720
|
+
setAttribute(elm, name, cur, XML_NAMESPACE);
|
|
3721
|
+
}
|
|
3722
|
+
else if (StringCharCodeAt.call(name, 5) === ColonCharCode) {
|
|
3723
|
+
// Assume xlink namespace
|
|
3724
|
+
setAttribute(elm, name, cur, XLINK_NAMESPACE);
|
|
3725
|
+
}
|
|
3726
|
+
else if (isNull(cur) || isUndefined$1(cur)) {
|
|
3727
|
+
removeAttribute(elm, name);
|
|
3728
|
+
}
|
|
3729
|
+
else {
|
|
3730
|
+
setAttribute(elm, name, cur);
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
}
|
|
3734
|
+
}
|
|
3735
|
+
|
|
3654
3736
|
/*
|
|
3655
3737
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
3656
3738
|
* All rights reserved.
|
|
@@ -4247,7 +4329,11 @@ function patchElementPropsAndAttrs$1(oldVnode, vnode, renderer) {
|
|
|
4247
4329
|
// value is set before type=radio.
|
|
4248
4330
|
patchClassAttribute(oldVnode, vnode, renderer);
|
|
4249
4331
|
patchStyleAttribute(oldVnode, vnode, renderer);
|
|
4250
|
-
|
|
4332
|
+
if (vnode.data.external) {
|
|
4333
|
+
patchAttrUnlessProp(oldVnode, vnode, renderer);
|
|
4334
|
+
} else {
|
|
4335
|
+
patchAttributes(oldVnode, vnode, renderer);
|
|
4336
|
+
}
|
|
4251
4337
|
patchProps(oldVnode, vnode, renderer);
|
|
4252
4338
|
}
|
|
4253
4339
|
function applyStyleScoping(elm, owner, renderer) {
|
|
@@ -4680,8 +4766,11 @@ function s(slotName, data, children, slotset) {
|
|
|
4680
4766
|
!isUndefined$1(slotset.slotAssignments) &&
|
|
4681
4767
|
!isUndefined$1(slotset.slotAssignments[slotName]) &&
|
|
4682
4768
|
slotset.slotAssignments[slotName].length !== 0) {
|
|
4683
|
-
|
|
4684
|
-
|
|
4769
|
+
const newChildren = [];
|
|
4770
|
+
const slotAssignments = slotset.slotAssignments[slotName];
|
|
4771
|
+
for (let i = 0; i < slotAssignments.length; i++) {
|
|
4772
|
+
const vnode = slotAssignments[i];
|
|
4773
|
+
if (!isNull(vnode)) {
|
|
4685
4774
|
const assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode);
|
|
4686
4775
|
// The only sniff test for a scoped <slot> element is the presence of `slotData`
|
|
4687
4776
|
const isScopedSlotElement = !isUndefined$1(data.slotData);
|
|
@@ -4691,32 +4780,30 @@ function s(slotName, data, children, slotset) {
|
|
|
4691
4780
|
logError(`Mismatched slot types for ${slotName === '' ? '(default)' : slotName} slot. Both parent and child component must use standard type or scoped type for a given slot.`, slotset.owner);
|
|
4692
4781
|
}
|
|
4693
4782
|
// Ignore slot content from parent
|
|
4694
|
-
|
|
4783
|
+
continue;
|
|
4695
4784
|
}
|
|
4696
4785
|
// If the passed slot content is factory, evaluate it and add the produced vnodes
|
|
4697
4786
|
if (assignedNodeIsScopedSlot) {
|
|
4698
4787
|
const vmBeingRenderedInception = getVMBeingRendered();
|
|
4699
|
-
let scopedSlotChildren = [];
|
|
4700
4788
|
// Evaluate in the scope of the slot content's owner
|
|
4701
4789
|
// if a slotset is provided, there will always be an owner. The only case where owner is
|
|
4702
4790
|
// undefined is for root components, but root components cannot accept slotted content
|
|
4703
4791
|
setVMBeingRendered(slotset.owner);
|
|
4704
4792
|
try {
|
|
4705
|
-
|
|
4793
|
+
ArrayPush$1.apply(newChildren, vnode.factory(data.slotData));
|
|
4706
4794
|
}
|
|
4707
4795
|
finally {
|
|
4708
4796
|
setVMBeingRendered(vmBeingRenderedInception);
|
|
4709
4797
|
}
|
|
4710
|
-
return ArrayConcat$1.call(accumulator, scopedSlotChildren);
|
|
4711
4798
|
}
|
|
4712
4799
|
else {
|
|
4713
4800
|
// If the slot content is standard type, the content is static, no additional
|
|
4714
4801
|
// processing needed on the vnode
|
|
4715
|
-
|
|
4802
|
+
ArrayPush$1.call(newChildren, vnode);
|
|
4716
4803
|
}
|
|
4717
4804
|
}
|
|
4718
|
-
|
|
4719
|
-
|
|
4805
|
+
}
|
|
4806
|
+
children = newChildren;
|
|
4720
4807
|
}
|
|
4721
4808
|
const vmBeingRendered = getVMBeingRendered();
|
|
4722
4809
|
const { renderMode, shadowMode } = vmBeingRendered;
|
|
@@ -6937,7 +7024,7 @@ function getComponentConstructor(elm) {
|
|
|
6937
7024
|
}
|
|
6938
7025
|
return ctor;
|
|
6939
7026
|
}
|
|
6940
|
-
/* version: 2.
|
|
7027
|
+
/* version: 2.31.0 */
|
|
6941
7028
|
|
|
6942
7029
|
/*
|
|
6943
7030
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7910,7 +7997,7 @@ function rendererFactory(baseRenderer) {
|
|
|
7910
7997
|
function isNull(obj) {
|
|
7911
7998
|
return obj === null;
|
|
7912
7999
|
}
|
|
7913
|
-
/** version: 2.
|
|
8000
|
+
/** version: 2.31.0 */
|
|
7914
8001
|
|
|
7915
8002
|
/*
|
|
7916
8003
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8471,6 +8558,6 @@ defineProperty(LightningElement, 'CustomElementConstructor', {
|
|
|
8471
8558
|
});
|
|
8472
8559
|
freeze(LightningElement);
|
|
8473
8560
|
seal(LightningElement.prototype);
|
|
8474
|
-
/* version: 2.
|
|
8561
|
+
/* version: 2.31.0 */
|
|
8475
8562
|
|
|
8476
8563
|
export { LightningElement, profilerControl as __unstable__ProfilerControl, api$1 as api, deprecatedBuildCustomElementConstructor as buildCustomElementConstructor, createContextProvider, createElement, freezeTemplate, getComponentConstructor, getComponentDef, hydrateComponent, isComponentConstructor, isNodeShadowed as isNodeFromTemplate, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, renderer, rendererFactory, sanitizeAttribute, setFeatureFlag, setFeatureFlagForTest, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
@@ -240,32 +240,57 @@ var LWC = (function (exports) {
|
|
|
240
240
|
const XML_NAMESPACE = 'http://www.w3.org/XML/1998/namespace';
|
|
241
241
|
const SVG_NAMESPACE = 'http://www.w3.org/2000/svg';
|
|
242
242
|
const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
*
|
|
243
|
+
|
|
244
|
+
/*
|
|
245
|
+
* Copyright (c) 2020, salesforce.com, inc.
|
|
246
|
+
* All rights reserved.
|
|
247
|
+
* SPDX-License-Identifier: MIT
|
|
248
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
246
249
|
*/
|
|
247
|
-
const
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
[
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
250
|
+
const CAMEL_REGEX = /-([a-z])/g;
|
|
251
|
+
// Convoluted map generation so that @lwc/shared remains fully tree-shakable (verify-treeshakable)
|
|
252
|
+
const { NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING, NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING } =
|
|
253
|
+
/*#__PURE__*/ (() => {
|
|
254
|
+
/**
|
|
255
|
+
* Map composed of properties to attributes not following the HTML property to attribute mapping
|
|
256
|
+
* convention.
|
|
257
|
+
*/
|
|
258
|
+
const NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING = new Map([
|
|
259
|
+
['accessKey', 'accesskey'],
|
|
260
|
+
['readOnly', 'readonly'],
|
|
261
|
+
['tabIndex', 'tabindex'],
|
|
262
|
+
['bgColor', 'bgcolor'],
|
|
263
|
+
['colSpan', 'colspan'],
|
|
264
|
+
['rowSpan', 'rowspan'],
|
|
265
|
+
['contentEditable', 'contenteditable'],
|
|
266
|
+
['crossOrigin', 'crossorigin'],
|
|
267
|
+
['dateTime', 'datetime'],
|
|
268
|
+
['formAction', 'formaction'],
|
|
269
|
+
['isMap', 'ismap'],
|
|
270
|
+
['maxLength', 'maxlength'],
|
|
271
|
+
['minLength', 'minlength'],
|
|
272
|
+
['noValidate', 'novalidate'],
|
|
273
|
+
['useMap', 'usemap'],
|
|
274
|
+
['htmlFor', 'for'],
|
|
275
|
+
]);
|
|
276
|
+
/**
|
|
277
|
+
* Inverted map with attribute name key and property name value.
|
|
278
|
+
*/
|
|
279
|
+
const NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
280
|
+
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING.forEach((value, key) => NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.set(value, key));
|
|
281
|
+
return {
|
|
282
|
+
NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING,
|
|
283
|
+
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING,
|
|
284
|
+
};
|
|
285
|
+
})();
|
|
265
286
|
/**
|
|
266
287
|
* Map associating previously transformed HTML property into HTML attribute.
|
|
267
288
|
*/
|
|
268
289
|
const CACHED_PROPERTY_ATTRIBUTE_MAPPING = new Map();
|
|
290
|
+
/**
|
|
291
|
+
* Map associating previously transformed HTML attribute into HTML property.
|
|
292
|
+
*/
|
|
293
|
+
const CACHED_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
269
294
|
function htmlPropertyToAttribute(propName) {
|
|
270
295
|
const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
|
|
271
296
|
if (!isUndefined$1(ariaAttributeName)) {
|
|
@@ -294,6 +319,23 @@ var LWC = (function (exports) {
|
|
|
294
319
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
295
320
|
return attributeName;
|
|
296
321
|
}
|
|
322
|
+
function htmlAttributeToProperty(attrName) {
|
|
323
|
+
const ariaPropertyName = AriaAttrNameToPropNameMap[attrName];
|
|
324
|
+
if (!isUndefined$1(ariaPropertyName)) {
|
|
325
|
+
return ariaPropertyName;
|
|
326
|
+
}
|
|
327
|
+
const specialPropertyName = NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
|
|
328
|
+
if (!isUndefined$1(specialPropertyName)) {
|
|
329
|
+
return specialPropertyName;
|
|
330
|
+
}
|
|
331
|
+
const cachedPropertyName = CACHED_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
|
|
332
|
+
if (!isUndefined$1(cachedPropertyName)) {
|
|
333
|
+
return cachedPropertyName;
|
|
334
|
+
}
|
|
335
|
+
const propertyName = StringReplace.call(attrName, CAMEL_REGEX, (g) => g[1].toUpperCase());
|
|
336
|
+
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
337
|
+
return propertyName;
|
|
338
|
+
}
|
|
297
339
|
|
|
298
340
|
/*
|
|
299
341
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -302,9 +344,9 @@ var LWC = (function (exports) {
|
|
|
302
344
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
303
345
|
*/
|
|
304
346
|
// Increment whenever the LWC template compiler changes
|
|
305
|
-
const LWC_VERSION = "2.
|
|
347
|
+
const LWC_VERSION = "2.31.0";
|
|
306
348
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
307
|
-
/** version: 2.
|
|
349
|
+
/** version: 2.31.0 */
|
|
308
350
|
|
|
309
351
|
/**
|
|
310
352
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -386,7 +428,7 @@ var LWC = (function (exports) {
|
|
|
386
428
|
patch$1(propName);
|
|
387
429
|
}
|
|
388
430
|
}
|
|
389
|
-
/** version: 2.
|
|
431
|
+
/** version: 2.31.0 */
|
|
390
432
|
|
|
391
433
|
/**
|
|
392
434
|
* Copyright (C) 2018 salesforce.com, inc.
|
|
@@ -466,7 +508,7 @@ var LWC = (function (exports) {
|
|
|
466
508
|
setFeatureFlag(name, value);
|
|
467
509
|
}
|
|
468
510
|
}
|
|
469
|
-
/** version: 2.
|
|
511
|
+
/** version: 2.31.0 */
|
|
470
512
|
|
|
471
513
|
/*
|
|
472
514
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -3618,7 +3660,7 @@ var LWC = (function (exports) {
|
|
|
3618
3660
|
* SPDX-License-Identifier: MIT
|
|
3619
3661
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3620
3662
|
*/
|
|
3621
|
-
const ColonCharCode = 58;
|
|
3663
|
+
const ColonCharCode$1 = 58;
|
|
3622
3664
|
function patchAttributes(oldVnode, vnode, renderer) {
|
|
3623
3665
|
const { attrs } = vnode.data;
|
|
3624
3666
|
if (isUndefined$1(attrs)) {
|
|
@@ -3635,11 +3677,11 @@ var LWC = (function (exports) {
|
|
|
3635
3677
|
const old = oldAttrs[key];
|
|
3636
3678
|
if (old !== cur) {
|
|
3637
3679
|
unlockAttribute(elm, key);
|
|
3638
|
-
if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
3680
|
+
if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
|
|
3639
3681
|
// Assume xml namespace
|
|
3640
3682
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
3641
3683
|
}
|
|
3642
|
-
else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
3684
|
+
else if (StringCharCodeAt.call(key, 5) === ColonCharCode$1) {
|
|
3643
3685
|
// Assume xlink namespace
|
|
3644
3686
|
setAttribute(elm, key, cur, XLINK_NAMESPACE);
|
|
3645
3687
|
}
|
|
@@ -3654,6 +3696,46 @@ var LWC = (function (exports) {
|
|
|
3654
3696
|
}
|
|
3655
3697
|
}
|
|
3656
3698
|
|
|
3699
|
+
/*
|
|
3700
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
3701
|
+
* All rights reserved.
|
|
3702
|
+
* SPDX-License-Identifier: MIT
|
|
3703
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3704
|
+
*/
|
|
3705
|
+
const ColonCharCode = 58;
|
|
3706
|
+
function patchAttrUnlessProp(oldVnode, vnode, renderer) {
|
|
3707
|
+
const { data: { attrs }, elm, } = vnode;
|
|
3708
|
+
if (isUndefined$1(attrs)) {
|
|
3709
|
+
return;
|
|
3710
|
+
}
|
|
3711
|
+
const { removeAttribute, setAttribute, setProperty } = renderer;
|
|
3712
|
+
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3713
|
+
for (const name in attrs) {
|
|
3714
|
+
const cur = attrs[name];
|
|
3715
|
+
const old = oldAttrs[name];
|
|
3716
|
+
if (old !== cur) {
|
|
3717
|
+
const propName = htmlAttributeToProperty(name);
|
|
3718
|
+
if (propName in elm) {
|
|
3719
|
+
setProperty(elm, name, cur);
|
|
3720
|
+
}
|
|
3721
|
+
else if (StringCharCodeAt.call(name, 3) === ColonCharCode) {
|
|
3722
|
+
// Assume xml namespace
|
|
3723
|
+
setAttribute(elm, name, cur, XML_NAMESPACE);
|
|
3724
|
+
}
|
|
3725
|
+
else if (StringCharCodeAt.call(name, 5) === ColonCharCode) {
|
|
3726
|
+
// Assume xlink namespace
|
|
3727
|
+
setAttribute(elm, name, cur, XLINK_NAMESPACE);
|
|
3728
|
+
}
|
|
3729
|
+
else if (isNull(cur) || isUndefined$1(cur)) {
|
|
3730
|
+
removeAttribute(elm, name);
|
|
3731
|
+
}
|
|
3732
|
+
else {
|
|
3733
|
+
setAttribute(elm, name, cur);
|
|
3734
|
+
}
|
|
3735
|
+
}
|
|
3736
|
+
}
|
|
3737
|
+
}
|
|
3738
|
+
|
|
3657
3739
|
/*
|
|
3658
3740
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
3659
3741
|
* All rights reserved.
|
|
@@ -4250,7 +4332,11 @@ var LWC = (function (exports) {
|
|
|
4250
4332
|
// value is set before type=radio.
|
|
4251
4333
|
patchClassAttribute(oldVnode, vnode, renderer);
|
|
4252
4334
|
patchStyleAttribute(oldVnode, vnode, renderer);
|
|
4253
|
-
|
|
4335
|
+
if (vnode.data.external) {
|
|
4336
|
+
patchAttrUnlessProp(oldVnode, vnode, renderer);
|
|
4337
|
+
} else {
|
|
4338
|
+
patchAttributes(oldVnode, vnode, renderer);
|
|
4339
|
+
}
|
|
4254
4340
|
patchProps(oldVnode, vnode, renderer);
|
|
4255
4341
|
}
|
|
4256
4342
|
function applyStyleScoping(elm, owner, renderer) {
|
|
@@ -4683,8 +4769,11 @@ var LWC = (function (exports) {
|
|
|
4683
4769
|
!isUndefined$1(slotset.slotAssignments) &&
|
|
4684
4770
|
!isUndefined$1(slotset.slotAssignments[slotName]) &&
|
|
4685
4771
|
slotset.slotAssignments[slotName].length !== 0) {
|
|
4686
|
-
|
|
4687
|
-
|
|
4772
|
+
const newChildren = [];
|
|
4773
|
+
const slotAssignments = slotset.slotAssignments[slotName];
|
|
4774
|
+
for (let i = 0; i < slotAssignments.length; i++) {
|
|
4775
|
+
const vnode = slotAssignments[i];
|
|
4776
|
+
if (!isNull(vnode)) {
|
|
4688
4777
|
const assignedNodeIsScopedSlot = isVScopedSlotFragment(vnode);
|
|
4689
4778
|
// The only sniff test for a scoped <slot> element is the presence of `slotData`
|
|
4690
4779
|
const isScopedSlotElement = !isUndefined$1(data.slotData);
|
|
@@ -4694,32 +4783,30 @@ var LWC = (function (exports) {
|
|
|
4694
4783
|
logError(`Mismatched slot types for ${slotName === '' ? '(default)' : slotName} slot. Both parent and child component must use standard type or scoped type for a given slot.`, slotset.owner);
|
|
4695
4784
|
}
|
|
4696
4785
|
// Ignore slot content from parent
|
|
4697
|
-
|
|
4786
|
+
continue;
|
|
4698
4787
|
}
|
|
4699
4788
|
// If the passed slot content is factory, evaluate it and add the produced vnodes
|
|
4700
4789
|
if (assignedNodeIsScopedSlot) {
|
|
4701
4790
|
const vmBeingRenderedInception = getVMBeingRendered();
|
|
4702
|
-
let scopedSlotChildren = [];
|
|
4703
4791
|
// Evaluate in the scope of the slot content's owner
|
|
4704
4792
|
// if a slotset is provided, there will always be an owner. The only case where owner is
|
|
4705
4793
|
// undefined is for root components, but root components cannot accept slotted content
|
|
4706
4794
|
setVMBeingRendered(slotset.owner);
|
|
4707
4795
|
try {
|
|
4708
|
-
|
|
4796
|
+
ArrayPush$1.apply(newChildren, vnode.factory(data.slotData));
|
|
4709
4797
|
}
|
|
4710
4798
|
finally {
|
|
4711
4799
|
setVMBeingRendered(vmBeingRenderedInception);
|
|
4712
4800
|
}
|
|
4713
|
-
return ArrayConcat$1.call(accumulator, scopedSlotChildren);
|
|
4714
4801
|
}
|
|
4715
4802
|
else {
|
|
4716
4803
|
// If the slot content is standard type, the content is static, no additional
|
|
4717
4804
|
// processing needed on the vnode
|
|
4718
|
-
|
|
4805
|
+
ArrayPush$1.call(newChildren, vnode);
|
|
4719
4806
|
}
|
|
4720
4807
|
}
|
|
4721
|
-
|
|
4722
|
-
|
|
4808
|
+
}
|
|
4809
|
+
children = newChildren;
|
|
4723
4810
|
}
|
|
4724
4811
|
const vmBeingRendered = getVMBeingRendered();
|
|
4725
4812
|
const { renderMode, shadowMode } = vmBeingRendered;
|
|
@@ -6940,7 +7027,7 @@ var LWC = (function (exports) {
|
|
|
6940
7027
|
}
|
|
6941
7028
|
return ctor;
|
|
6942
7029
|
}
|
|
6943
|
-
/* version: 2.
|
|
7030
|
+
/* version: 2.31.0 */
|
|
6944
7031
|
|
|
6945
7032
|
/*
|
|
6946
7033
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7913,7 +8000,7 @@ var LWC = (function (exports) {
|
|
|
7913
8000
|
function isNull(obj) {
|
|
7914
8001
|
return obj === null;
|
|
7915
8002
|
}
|
|
7916
|
-
/** version: 2.
|
|
8003
|
+
/** version: 2.31.0 */
|
|
7917
8004
|
|
|
7918
8005
|
/*
|
|
7919
8006
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -8474,7 +8561,7 @@ var LWC = (function (exports) {
|
|
|
8474
8561
|
});
|
|
8475
8562
|
freeze(LightningElement);
|
|
8476
8563
|
seal(LightningElement.prototype);
|
|
8477
|
-
/* version: 2.
|
|
8564
|
+
/* version: 2.31.0 */
|
|
8478
8565
|
|
|
8479
8566
|
exports.LightningElement = LightningElement;
|
|
8480
8567
|
exports.__unstable__ProfilerControl = profilerControl;
|