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
|
@@ -249,55 +249,35 @@ var LWC = (function (exports) {
|
|
|
249
249
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
250
250
|
*/
|
|
251
251
|
const CAMEL_REGEX = /-([a-z])/g;
|
|
252
|
-
//
|
|
253
|
-
const
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
['maxLength', 'maxlength'],
|
|
272
|
-
['minLength', 'minlength'],
|
|
273
|
-
['noValidate', 'novalidate'],
|
|
274
|
-
['useMap', 'usemap'],
|
|
275
|
-
['htmlFor', 'for'],
|
|
276
|
-
]);
|
|
277
|
-
/**
|
|
278
|
-
* Inverted map with attribute name key and property name value.
|
|
279
|
-
*/
|
|
280
|
-
const NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING = new Map();
|
|
281
|
-
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING.forEach((value, key) => NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING.set(value, key));
|
|
282
|
-
return {
|
|
283
|
-
NO_STANDARD_ATTRIBUTE_PROPERTY_MAPPING,
|
|
284
|
-
NO_STANDARD_PROPERTY_ATTRIBUTE_MAPPING,
|
|
285
|
-
};
|
|
286
|
-
})();
|
|
252
|
+
// These are HTML standard prop/attribute IDL mappings, but are not predictable based on camel/kebab-case conversion
|
|
253
|
+
const SPECIAL_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map([
|
|
254
|
+
['accessKey', 'accesskey'],
|
|
255
|
+
['readOnly', 'readonly'],
|
|
256
|
+
['tabIndex', 'tabindex'],
|
|
257
|
+
['bgColor', 'bgcolor'],
|
|
258
|
+
['colSpan', 'colspan'],
|
|
259
|
+
['rowSpan', 'rowspan'],
|
|
260
|
+
['contentEditable', 'contenteditable'],
|
|
261
|
+
['crossOrigin', 'crossorigin'],
|
|
262
|
+
['dateTime', 'datetime'],
|
|
263
|
+
['formAction', 'formaction'],
|
|
264
|
+
['isMap', 'ismap'],
|
|
265
|
+
['maxLength', 'maxlength'],
|
|
266
|
+
['minLength', 'minlength'],
|
|
267
|
+
['noValidate', 'novalidate'],
|
|
268
|
+
['useMap', 'usemap'],
|
|
269
|
+
['htmlFor', 'for'],
|
|
270
|
+
]);
|
|
287
271
|
/**
|
|
288
272
|
* Map associating previously transformed HTML property into HTML attribute.
|
|
289
273
|
*/
|
|
290
274
|
const CACHED_PROPERTY_ATTRIBUTE_MAPPING = /*@__PURE__@*/ new Map();
|
|
291
|
-
/**
|
|
292
|
-
* Map associating previously transformed HTML attribute into HTML property.
|
|
293
|
-
*/
|
|
294
|
-
const CACHED_ATTRIBUTE_PROPERTY_MAPPING = /*@__PURE__@*/ new Map();
|
|
295
275
|
function htmlPropertyToAttribute(propName) {
|
|
296
276
|
const ariaAttributeName = AriaPropNameToAttrNameMap[propName];
|
|
297
277
|
if (!isUndefined$1(ariaAttributeName)) {
|
|
298
278
|
return ariaAttributeName;
|
|
299
279
|
}
|
|
300
|
-
const specialAttributeName =
|
|
280
|
+
const specialAttributeName = SPECIAL_PROPERTY_ATTRIBUTE_MAPPING.get(propName);
|
|
301
281
|
if (!isUndefined$1(specialAttributeName)) {
|
|
302
282
|
return specialAttributeName;
|
|
303
283
|
}
|
|
@@ -320,22 +300,17 @@ var LWC = (function (exports) {
|
|
|
320
300
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
321
301
|
return attributeName;
|
|
322
302
|
}
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
if (
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
const cachedPropertyName = CACHED_ATTRIBUTE_PROPERTY_MAPPING.get(attrName);
|
|
333
|
-
if (!isUndefined$1(cachedPropertyName)) {
|
|
334
|
-
return cachedPropertyName;
|
|
303
|
+
/**
|
|
304
|
+
* Map associating previously transformed kabab-case attributes into camel-case props.
|
|
305
|
+
*/
|
|
306
|
+
const CACHED_KEBAB_CAMEL_MAPPING = /*@__PURE__@*/ new Map();
|
|
307
|
+
function kebabCaseToCamelCase(attrName) {
|
|
308
|
+
let result = CACHED_KEBAB_CAMEL_MAPPING.get(attrName);
|
|
309
|
+
if (isUndefined$1(result)) {
|
|
310
|
+
result = StringReplace.call(attrName, CAMEL_REGEX, (g) => g[1].toUpperCase());
|
|
311
|
+
CACHED_KEBAB_CAMEL_MAPPING.set(attrName, result);
|
|
335
312
|
}
|
|
336
|
-
|
|
337
|
-
CACHED_ATTRIBUTE_PROPERTY_MAPPING.set(attrName, propertyName);
|
|
338
|
-
return propertyName;
|
|
313
|
+
return result;
|
|
339
314
|
}
|
|
340
315
|
|
|
341
316
|
/*
|
|
@@ -345,9 +320,9 @@ var LWC = (function (exports) {
|
|
|
345
320
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
346
321
|
*/
|
|
347
322
|
// Increment whenever the LWC template compiler changes
|
|
348
|
-
const LWC_VERSION = "2.
|
|
323
|
+
const LWC_VERSION = "2.47.0";
|
|
349
324
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
350
|
-
/** version: 2.
|
|
325
|
+
/** version: 2.47.0 */
|
|
351
326
|
|
|
352
327
|
/* proxy-compat-disable */
|
|
353
328
|
/**
|
|
@@ -426,7 +401,7 @@ var LWC = (function (exports) {
|
|
|
426
401
|
setFeatureFlag(name, value);
|
|
427
402
|
}
|
|
428
403
|
}
|
|
429
|
-
/** version: 2.
|
|
404
|
+
/** version: 2.47.0 */
|
|
430
405
|
|
|
431
406
|
/* proxy-compat-disable */
|
|
432
407
|
/**
|
|
@@ -491,7 +466,7 @@ var LWC = (function (exports) {
|
|
|
491
466
|
}
|
|
492
467
|
}
|
|
493
468
|
}
|
|
494
|
-
/** version: 2.
|
|
469
|
+
/** version: 2.47.0 */
|
|
495
470
|
|
|
496
471
|
/*
|
|
497
472
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -3796,27 +3771,35 @@ var LWC = (function (exports) {
|
|
|
3796
3771
|
* SPDX-License-Identifier: MIT
|
|
3797
3772
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3798
3773
|
*/
|
|
3799
|
-
const ColonCharCode
|
|
3774
|
+
const ColonCharCode = 58;
|
|
3800
3775
|
function patchAttributes(oldVnode, vnode, renderer) {
|
|
3801
|
-
const { attrs } = vnode.data;
|
|
3776
|
+
const { attrs, external } = vnode.data;
|
|
3802
3777
|
if (isUndefined$1(attrs)) {
|
|
3803
3778
|
return;
|
|
3804
3779
|
}
|
|
3805
3780
|
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3781
|
+
// Attrs may be the same due to the static content optimization, so we can skip diffing
|
|
3806
3782
|
if (oldAttrs === attrs) {
|
|
3807
3783
|
return;
|
|
3808
3784
|
}
|
|
3809
3785
|
const { elm } = vnode;
|
|
3810
|
-
const { setAttribute, removeAttribute } = renderer;
|
|
3786
|
+
const { setAttribute, removeAttribute, setProperty } = renderer;
|
|
3811
3787
|
for (const key in attrs) {
|
|
3812
3788
|
const cur = attrs[key];
|
|
3813
3789
|
const old = oldAttrs[key];
|
|
3814
3790
|
if (old !== cur) {
|
|
3815
|
-
|
|
3791
|
+
let propName;
|
|
3792
|
+
// For external custom elements, sniff to see if the attr should be considered a prop.
|
|
3793
|
+
// Use kebabCaseToCamelCase directly because we don't want to set props like `ariaLabel` or `tabIndex`
|
|
3794
|
+
// on a custom element versus just using the more reliable attribute format.
|
|
3795
|
+
if (external && (propName = kebabCaseToCamelCase(key)) in elm) {
|
|
3796
|
+
setProperty(elm, propName, cur);
|
|
3797
|
+
}
|
|
3798
|
+
else if (StringCharCodeAt.call(key, 3) === ColonCharCode) {
|
|
3816
3799
|
// Assume xml namespace
|
|
3817
3800
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
3818
3801
|
}
|
|
3819
|
-
else if (StringCharCodeAt.call(key, 5) === ColonCharCode
|
|
3802
|
+
else if (StringCharCodeAt.call(key, 5) === ColonCharCode) {
|
|
3820
3803
|
// Assume xlink namespace
|
|
3821
3804
|
setAttribute(elm, key, cur, XLINK_NAMESPACE);
|
|
3822
3805
|
}
|
|
@@ -3830,46 +3813,6 @@ var LWC = (function (exports) {
|
|
|
3830
3813
|
}
|
|
3831
3814
|
}
|
|
3832
3815
|
|
|
3833
|
-
/*
|
|
3834
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
3835
|
-
* All rights reserved.
|
|
3836
|
-
* SPDX-License-Identifier: MIT
|
|
3837
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
3838
|
-
*/
|
|
3839
|
-
const ColonCharCode = 58;
|
|
3840
|
-
function patchAttrUnlessProp(oldVnode, vnode, renderer) {
|
|
3841
|
-
const { data: { attrs }, elm, } = vnode;
|
|
3842
|
-
if (isUndefined$1(attrs)) {
|
|
3843
|
-
return;
|
|
3844
|
-
}
|
|
3845
|
-
const { removeAttribute, setAttribute, setProperty } = renderer;
|
|
3846
|
-
const oldAttrs = isNull(oldVnode) ? EmptyObject : oldVnode.data.attrs;
|
|
3847
|
-
for (const name in attrs) {
|
|
3848
|
-
const cur = attrs[name];
|
|
3849
|
-
const old = oldAttrs[name];
|
|
3850
|
-
if (old !== cur) {
|
|
3851
|
-
const propName = htmlAttributeToProperty(name);
|
|
3852
|
-
if (propName in elm) {
|
|
3853
|
-
setProperty(elm, name, cur);
|
|
3854
|
-
}
|
|
3855
|
-
else if (StringCharCodeAt.call(name, 3) === ColonCharCode) {
|
|
3856
|
-
// Assume xml namespace
|
|
3857
|
-
setAttribute(elm, name, cur, XML_NAMESPACE);
|
|
3858
|
-
}
|
|
3859
|
-
else if (StringCharCodeAt.call(name, 5) === ColonCharCode) {
|
|
3860
|
-
// Assume xlink namespace
|
|
3861
|
-
setAttribute(elm, name, cur, XLINK_NAMESPACE);
|
|
3862
|
-
}
|
|
3863
|
-
else if (isNull(cur) || isUndefined$1(cur)) {
|
|
3864
|
-
removeAttribute(elm, name);
|
|
3865
|
-
}
|
|
3866
|
-
else {
|
|
3867
|
-
setAttribute(elm, name, cur);
|
|
3868
|
-
}
|
|
3869
|
-
}
|
|
3870
|
-
}
|
|
3871
|
-
}
|
|
3872
|
-
|
|
3873
3816
|
/*
|
|
3874
3817
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
3875
3818
|
* All rights reserved.
|
|
@@ -3891,6 +3834,7 @@ var LWC = (function (exports) {
|
|
|
3891
3834
|
if (!isNull(oldVnode)) {
|
|
3892
3835
|
oldProps = oldVnode.data.props;
|
|
3893
3836
|
const oldSpread = oldVnode.data.spread;
|
|
3837
|
+
// Props may be the same due to the static content optimization, so we can skip diffing
|
|
3894
3838
|
if (oldProps === props && oldSpread === spread) {
|
|
3895
3839
|
return;
|
|
3896
3840
|
}
|
|
@@ -4021,7 +3965,9 @@ var LWC = (function (exports) {
|
|
|
4021
3965
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
4022
3966
|
*/
|
|
4023
3967
|
function applyEventListeners(vnode, renderer) {
|
|
4024
|
-
|
|
3968
|
+
var _a;
|
|
3969
|
+
const { elm } = vnode;
|
|
3970
|
+
const on = (_a = vnode.data) === null || _a === void 0 ? void 0 : _a.on;
|
|
4025
3971
|
if (isUndefined$1(on)) {
|
|
4026
3972
|
return;
|
|
4027
3973
|
}
|
|
@@ -4233,6 +4179,8 @@ var LWC = (function (exports) {
|
|
|
4233
4179
|
}
|
|
4234
4180
|
}
|
|
4235
4181
|
insertNode(elm, parent, anchor, renderer);
|
|
4182
|
+
// Event listeners are only applied once when mounting, so they are allowed for static vnodes
|
|
4183
|
+
applyEventListeners(vnode, renderer);
|
|
4236
4184
|
}
|
|
4237
4185
|
function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
4238
4186
|
const { sel, owner } = vnode;
|
|
@@ -4460,12 +4408,7 @@ var LWC = (function (exports) {
|
|
|
4460
4408
|
// value is set before type=radio.
|
|
4461
4409
|
patchClassAttribute(oldVnode, vnode, renderer);
|
|
4462
4410
|
patchStyleAttribute(oldVnode, vnode, renderer);
|
|
4463
|
-
|
|
4464
|
-
patchAttrUnlessProp(oldVnode, vnode, renderer);
|
|
4465
|
-
}
|
|
4466
|
-
else {
|
|
4467
|
-
patchAttributes(oldVnode, vnode, renderer);
|
|
4468
|
-
}
|
|
4411
|
+
patchAttributes(oldVnode, vnode, renderer);
|
|
4469
4412
|
patchProps(oldVnode, vnode, renderer);
|
|
4470
4413
|
}
|
|
4471
4414
|
function applyStyleScoping(elm, owner, renderer) {
|
|
@@ -4865,7 +4808,7 @@ var LWC = (function (exports) {
|
|
|
4865
4808
|
};
|
|
4866
4809
|
}
|
|
4867
4810
|
// [st]atic node
|
|
4868
|
-
function st(fragment, key) {
|
|
4811
|
+
function st(fragment, key, data) {
|
|
4869
4812
|
return {
|
|
4870
4813
|
type: 4 /* VNodeType.Static */,
|
|
4871
4814
|
sel: undefined,
|
|
@@ -4873,6 +4816,7 @@ var LWC = (function (exports) {
|
|
|
4873
4816
|
elm: undefined,
|
|
4874
4817
|
fragment,
|
|
4875
4818
|
owner: getVMBeingRendered(),
|
|
4819
|
+
data,
|
|
4876
4820
|
};
|
|
4877
4821
|
}
|
|
4878
4822
|
// [fr]agment node
|
|
@@ -6776,6 +6720,7 @@ var LWC = (function (exports) {
|
|
|
6776
6720
|
return handleMismatch(elm, vnode, renderer);
|
|
6777
6721
|
}
|
|
6778
6722
|
vnode.elm = elm;
|
|
6723
|
+
applyEventListeners(vnode, renderer);
|
|
6779
6724
|
return elm;
|
|
6780
6725
|
}
|
|
6781
6726
|
function hydrateFragment(elm, vnode, renderer) {
|
|
@@ -7383,7 +7328,7 @@ var LWC = (function (exports) {
|
|
|
7383
7328
|
}
|
|
7384
7329
|
return getReadOnlyProxy(obj);
|
|
7385
7330
|
}
|
|
7386
|
-
/** version: 2.
|
|
7331
|
+
/** version: 2.47.0 */
|
|
7387
7332
|
|
|
7388
7333
|
/*
|
|
7389
7334
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -7813,7 +7758,7 @@ var LWC = (function (exports) {
|
|
|
7813
7758
|
function isNull(obj) {
|
|
7814
7759
|
return obj === null;
|
|
7815
7760
|
}
|
|
7816
|
-
/** version: 2.
|
|
7761
|
+
/** version: 2.47.0 */
|
|
7817
7762
|
|
|
7818
7763
|
/*
|
|
7819
7764
|
* Copyright (c) 2023, salesforce.com, inc.
|
|
@@ -8432,7 +8377,7 @@ var LWC = (function (exports) {
|
|
|
8432
8377
|
});
|
|
8433
8378
|
}));
|
|
8434
8379
|
}
|
|
8435
|
-
/** version: 2.
|
|
8380
|
+
/** version: 2.47.0 */
|
|
8436
8381
|
|
|
8437
8382
|
exports.LightningElement = LightningElement;
|
|
8438
8383
|
exports.__unstable__ProfilerControl = profilerControl;
|