@lwc/engine-core 2.45.2 → 2.45.4
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/framework/attributes.d.ts +1 -0
- package/{types → dist}/framework/wiring/types.d.ts +3 -1
- package/dist/{engine-core.cjs.js → index.cjs.js} +31 -38
- package/dist/index.cjs.js.map +1 -0
- package/dist/{engine-core.js → index.js} +29 -38
- package/dist/index.js.map +1 -0
- package/package.json +27 -22
- package/dist/engine-core.cjs.js.map +0 -1
- package/dist/engine-core.js.map +0 -1
- package/types/framework/attributes.d.ts +0 -4
- /package/{types → dist}/framework/api.d.ts +0 -0
- /package/{types → dist}/framework/base-bridge-element.d.ts +0 -0
- /package/{types → dist}/framework/base-lightning-element.d.ts +0 -0
- /package/{types → dist}/framework/check-version-mismatch.d.ts +0 -0
- /package/{types → dist}/framework/component.d.ts +0 -0
- /package/{types → dist}/framework/decorators/api.d.ts +0 -0
- /package/{types → dist}/framework/decorators/register.d.ts +0 -0
- /package/{types → dist}/framework/decorators/track.d.ts +0 -0
- /package/{types → dist}/framework/decorators/wire.d.ts +0 -0
- /package/{types → dist}/framework/def.d.ts +0 -0
- /package/{types → dist}/framework/freeze-template.d.ts +0 -0
- /package/{types → dist}/framework/get-component-constructor.d.ts +0 -0
- /package/{types → dist}/framework/hot-swaps.d.ts +0 -0
- /package/{types → dist}/framework/html-element.d.ts +0 -0
- /package/{types → dist}/framework/html-properties.d.ts +0 -0
- /package/{types → dist}/framework/hydration.d.ts +0 -0
- /package/{types → dist}/framework/invoker.d.ts +0 -0
- /package/{types → dist}/framework/main.d.ts +0 -0
- /package/{types → dist}/framework/membrane.d.ts +0 -0
- /package/{types → dist}/framework/modules/attr-unless-prop.d.ts +0 -0
- /package/{types → dist}/framework/modules/attrs.d.ts +0 -0
- /package/{types → dist}/framework/modules/computed-class-attr.d.ts +0 -0
- /package/{types → dist}/framework/modules/computed-style-attr.d.ts +0 -0
- /package/{types → dist}/framework/modules/events.d.ts +0 -0
- /package/{types → dist}/framework/modules/props.d.ts +0 -0
- /package/{types → dist}/framework/modules/static-class-attr.d.ts +0 -0
- /package/{types → dist}/framework/modules/static-style-attr.d.ts +0 -0
- /package/{types → dist}/framework/mutation-tracker.d.ts +0 -0
- /package/{types → dist}/framework/observed-fields.d.ts +0 -0
- /package/{types → dist}/framework/overridable-hooks.d.ts +0 -0
- /package/{types → dist}/framework/profiler.d.ts +0 -0
- /package/{types → dist}/framework/readonly.d.ts +0 -0
- /package/{types → dist}/framework/renderer.d.ts +0 -0
- /package/{types → dist}/framework/rendering.d.ts +0 -0
- /package/{types → dist}/framework/reporting.d.ts +0 -0
- /package/{types → dist}/framework/restrictions.d.ts +0 -0
- /package/{types → dist}/framework/secure-template.d.ts +0 -0
- /package/{types → dist}/framework/services.d.ts +0 -0
- /package/{types → dist}/framework/stylesheet.d.ts +0 -0
- /package/{types → dist}/framework/template.d.ts +0 -0
- /package/{types → dist}/framework/update-component-value.d.ts +0 -0
- /package/{types → dist}/framework/utils.d.ts +0 -0
- /package/{types → dist}/framework/vm.d.ts +0 -0
- /package/{types → dist}/framework/vnodes.d.ts +0 -0
- /package/{types → dist}/framework/weak-multimap.d.ts +0 -0
- /package/{types → dist}/framework/wiring/context.d.ts +0 -0
- /package/{types → dist}/framework/wiring/index.d.ts +0 -0
- /package/{types → dist}/framework/wiring/wiring.d.ts +0 -0
- /package/{types → dist}/index.d.ts +0 -0
- /package/{types → dist}/libs/mutation-tracker/index.d.ts +0 -0
- /package/{types → dist}/patches/detect-non-standard-aria.d.ts +0 -0
- /package/{types → dist}/patches/detect-synthetic-cross-root-aria.d.ts +0 -0
- /package/{types → dist}/shared/circular-module-dependencies.d.ts +0 -0
- /package/{types → dist}/shared/error.d.ts +0 -0
- /package/{types → dist}/shared/format.d.ts +0 -0
- /package/{types → dist}/shared/logger.d.ts +0 -0
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
/* proxy-compat-disable */
|
|
2
|
+
/**
|
|
3
|
+
* Copyright (C) 2023 salesforce.com, inc.
|
|
4
|
+
*/
|
|
2
5
|
import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, ArrayIndexOf, ArraySplice, create, seal, isArray as isArray$1, isFunction as isFunction$1, keys, hasOwnProperty as hasOwnProperty$1, forEach, AriaPropNameToAttrNameMap, getPropertyDescriptor, defineProperties, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, assign, isObject, freeze, KEY__SYNTHETIC_MODE, assert, toString as toString$1, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, isFalse, LWC_VERSION_COMMENT_REGEX, LWC_VERSION, getOwnPropertyNames as getOwnPropertyNames$1, htmlPropertyToAttribute, ArraySlice, ArrayMap, KEY__SCOPED_CSS, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, htmlAttributeToProperty, isString, StringSlice, isTrue, SVG_NAMESPACE, KEY__SHADOW_STATIC, KEY__SHADOW_RESOLVER, ArraySome, ArrayPop, isNumber, StringReplace, ArrayUnshift, globalThis as globalThis$1, KEY__NATIVE_GET_ELEMENT_BY_ID, KEY__NATIVE_QUERY_SELECTOR_ALL, ID_REFERENCING_ATTRIBUTES_SET, KEY__SHADOW_TOKEN, ArrayFilter, StringSplit, arrayEvery, ArrayIncludes, ArrayCopyWithin, ArrayFill, ArraySort, ArrayReverse, ArrayShift } from '@lwc/shared';
|
|
3
6
|
import { applyAriaReflection } from '@lwc/aria-reflection';
|
|
4
7
|
export { setFeatureFlag, setFeatureFlagForTest } from '@lwc/features';
|
|
@@ -444,19 +447,6 @@ const defaultDefHTMLPropertyNames = [
|
|
|
444
447
|
'tabIndex',
|
|
445
448
|
'title',
|
|
446
449
|
];
|
|
447
|
-
let controlledElement = null;
|
|
448
|
-
let controlledAttributeName;
|
|
449
|
-
function isAttributeLocked(elm, attrName) {
|
|
450
|
-
return elm !== controlledElement || attrName !== controlledAttributeName;
|
|
451
|
-
}
|
|
452
|
-
function lockAttribute(_elm, _key) {
|
|
453
|
-
controlledElement = null;
|
|
454
|
-
controlledAttributeName = undefined;
|
|
455
|
-
}
|
|
456
|
-
function unlockAttribute(elm, key) {
|
|
457
|
-
controlledElement = elm;
|
|
458
|
-
controlledAttributeName = key;
|
|
459
|
-
}
|
|
460
450
|
|
|
461
451
|
/*
|
|
462
452
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -495,6 +485,7 @@ forEach.call(defaultDefHTMLPropertyNames, (propName) => {
|
|
|
495
485
|
* SPDX-License-Identifier: MIT
|
|
496
486
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
497
487
|
*/
|
|
488
|
+
/* eslint @lwc/lwc-internal/no-production-assert: "off" */
|
|
498
489
|
function generateDataDescriptor(options) {
|
|
499
490
|
return assign({
|
|
500
491
|
configurable: true,
|
|
@@ -1324,6 +1315,14 @@ function markLockerLiveObject(obj) {
|
|
|
1324
1315
|
* SPDX-License-Identifier: MIT
|
|
1325
1316
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
1326
1317
|
*/
|
|
1318
|
+
/**
|
|
1319
|
+
* This module is responsible for producing the ComponentDef object that is always
|
|
1320
|
+
* accessible via `vm.def`. This is lazily created during the creation of the first
|
|
1321
|
+
* instance of a component class, and shared across all instances.
|
|
1322
|
+
*
|
|
1323
|
+
* This structure can be used to synthetically create proxies, and understand the
|
|
1324
|
+
* shape of a component. It is also used internally to apply extra optimizations.
|
|
1325
|
+
*/
|
|
1327
1326
|
/**
|
|
1328
1327
|
* This operation is called with a descriptor of an standard html property
|
|
1329
1328
|
* that a Custom Element can support (including AOM properties), which
|
|
@@ -1487,15 +1486,11 @@ LightningElement.prototype = {
|
|
|
1487
1486
|
removeAttribute(name) {
|
|
1488
1487
|
const vm = getAssociatedVM(this);
|
|
1489
1488
|
const { elm, renderer: { removeAttribute }, } = vm;
|
|
1490
|
-
unlockAttribute(elm, name);
|
|
1491
1489
|
removeAttribute(elm, name);
|
|
1492
|
-
lockAttribute();
|
|
1493
1490
|
},
|
|
1494
1491
|
removeAttributeNS(namespace, name) {
|
|
1495
1492
|
const { elm, renderer: { removeAttribute }, } = getAssociatedVM(this);
|
|
1496
|
-
unlockAttribute(elm, name);
|
|
1497
1493
|
removeAttribute(elm, name, namespace);
|
|
1498
|
-
lockAttribute();
|
|
1499
1494
|
},
|
|
1500
1495
|
getAttribute(name) {
|
|
1501
1496
|
const vm = getAssociatedVM(this);
|
|
@@ -1517,9 +1512,7 @@ LightningElement.prototype = {
|
|
|
1517
1512
|
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1518
1513
|
}
|
|
1519
1514
|
}
|
|
1520
|
-
unlockAttribute(elm, name);
|
|
1521
1515
|
setAttribute(elm, name, value);
|
|
1522
|
-
lockAttribute();
|
|
1523
1516
|
},
|
|
1524
1517
|
setAttributeNS(namespace, name, value) {
|
|
1525
1518
|
const vm = getAssociatedVM(this);
|
|
@@ -1529,9 +1522,7 @@ LightningElement.prototype = {
|
|
|
1529
1522
|
logError(`Failed to construct '${getComponentTag(vm)}': The result must not have attributes.`);
|
|
1530
1523
|
}
|
|
1531
1524
|
}
|
|
1532
|
-
unlockAttribute(elm, name);
|
|
1533
1525
|
setAttribute(elm, name, value, namespace);
|
|
1534
|
-
lockAttribute();
|
|
1535
1526
|
},
|
|
1536
1527
|
getBoundingClientRect() {
|
|
1537
1528
|
const vm = getAssociatedVM(this);
|
|
@@ -1913,7 +1904,7 @@ function createConnector(vm, name, wireDef) {
|
|
|
1913
1904
|
});
|
|
1914
1905
|
runWithBoundaryProtection(vm, vm, noop, () => {
|
|
1915
1906
|
// job
|
|
1916
|
-
connector = new adapter(dataCallback);
|
|
1907
|
+
connector = new adapter(dataCallback, { tagName: vm.tagName });
|
|
1917
1908
|
}, noop);
|
|
1918
1909
|
const updateConnectorConfig = (config) => {
|
|
1919
1910
|
// every time the config is recomputed due to tracking,
|
|
@@ -2481,6 +2472,10 @@ function sanitizeAttribute(tagName, namespaceUri, attrName, attrValue) {
|
|
|
2481
2472
|
* SPDX-License-Identifier: MIT
|
|
2482
2473
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2483
2474
|
*/
|
|
2475
|
+
/**
|
|
2476
|
+
* This module is responsible for creating the base bridge class BaseBridgeElement
|
|
2477
|
+
* that represents the HTMLElement extension used for any LWC inserted in the DOM.
|
|
2478
|
+
*/
|
|
2484
2479
|
// A bridge descriptor is a descriptor whose job is just to get the component instance
|
|
2485
2480
|
// from the element instance, and get the value or set a new value on the component.
|
|
2486
2481
|
// This means that across different elements, similar names can get the exact same
|
|
@@ -2534,14 +2529,6 @@ function createAttributeChangedCallback(attributeToPropMap, superAttributeChange
|
|
|
2534
2529
|
}
|
|
2535
2530
|
return;
|
|
2536
2531
|
}
|
|
2537
|
-
if (!isAttributeLocked(this, attrName)) {
|
|
2538
|
-
// Ignore changes triggered by the engine itself during:
|
|
2539
|
-
// * diffing when public props are attempting to reflect to the DOM
|
|
2540
|
-
// * component via `this.setAttribute()`, should never update the prop
|
|
2541
|
-
// Both cases, the setAttribute call is always wrapped by the unlocking of the
|
|
2542
|
-
// attribute to be changed
|
|
2543
|
-
return;
|
|
2544
|
-
}
|
|
2545
2532
|
// Reflect attribute change to the corresponding property when changed from outside.
|
|
2546
2533
|
this[propName] = newValue;
|
|
2547
2534
|
};
|
|
@@ -2886,6 +2873,14 @@ function swapStyle(oldStyle, newStyle) {
|
|
|
2886
2873
|
* SPDX-License-Identifier: MIT
|
|
2887
2874
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2888
2875
|
*/
|
|
2876
|
+
/**
|
|
2877
|
+
* This module is responsible for producing the ComponentDef object that is always
|
|
2878
|
+
* accessible via `vm.def`. This is lazily created during the creation of the first
|
|
2879
|
+
* instance of a component class, and shared across all instances.
|
|
2880
|
+
*
|
|
2881
|
+
* This structure can be used to synthetically create proxies, and understand the
|
|
2882
|
+
* shape of a component. It is also used internally to apply extra optimizations.
|
|
2883
|
+
*/
|
|
2889
2884
|
const CtorToDefMap = new WeakMap();
|
|
2890
2885
|
function getCtorProto(Ctor) {
|
|
2891
2886
|
let proto = getPrototypeOf$1(Ctor);
|
|
@@ -3327,7 +3322,6 @@ function patchAttributes(oldVnode, vnode, renderer) {
|
|
|
3327
3322
|
const cur = attrs[key];
|
|
3328
3323
|
const old = oldAttrs[key];
|
|
3329
3324
|
if (old !== cur) {
|
|
3330
|
-
unlockAttribute(elm, key);
|
|
3331
3325
|
if (StringCharCodeAt.call(key, 3) === ColonCharCode$1) {
|
|
3332
3326
|
// Assume xml namespace
|
|
3333
3327
|
setAttribute(elm, key, cur, XML_NAMESPACE);
|
|
@@ -3342,7 +3336,6 @@ function patchAttributes(oldVnode, vnode, renderer) {
|
|
|
3342
3336
|
else {
|
|
3343
3337
|
setAttribute(elm, key, cur);
|
|
3344
3338
|
}
|
|
3345
|
-
lockAttribute();
|
|
3346
3339
|
}
|
|
3347
3340
|
}
|
|
3348
3341
|
}
|
|
@@ -6380,14 +6373,12 @@ function hydrateCustomElement(elm, vnode, renderer) {
|
|
|
6380
6373
|
function hydrateChildren(node, children, parentNode, owner) {
|
|
6381
6374
|
let hasWarned = false;
|
|
6382
6375
|
let nextNode = node;
|
|
6383
|
-
let anchor = null;
|
|
6384
6376
|
const { renderer } = owner;
|
|
6385
6377
|
for (let i = 0; i < children.length; i++) {
|
|
6386
6378
|
const childVnode = children[i];
|
|
6387
6379
|
if (!isNull(childVnode)) {
|
|
6388
6380
|
if (nextNode) {
|
|
6389
6381
|
nextNode = hydrateNode(nextNode, childVnode, renderer);
|
|
6390
|
-
anchor = childVnode.elm;
|
|
6391
6382
|
}
|
|
6392
6383
|
else {
|
|
6393
6384
|
hasMismatch = true;
|
|
@@ -6397,8 +6388,8 @@ function hydrateChildren(node, children, parentNode, owner) {
|
|
|
6397
6388
|
logError(`Hydration mismatch: incorrect number of rendered nodes. Client produced more nodes than the server.`, owner);
|
|
6398
6389
|
}
|
|
6399
6390
|
}
|
|
6400
|
-
mount(childVnode, parentNode, renderer,
|
|
6401
|
-
|
|
6391
|
+
mount(childVnode, parentNode, renderer, nextNode);
|
|
6392
|
+
nextNode = renderer.nextSibling(childVnode.elm);
|
|
6402
6393
|
}
|
|
6403
6394
|
}
|
|
6404
6395
|
}
|
|
@@ -6907,5 +6898,5 @@ function readonly(obj) {
|
|
|
6907
6898
|
}
|
|
6908
6899
|
|
|
6909
6900
|
export { LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, register, registerComponent, registerDecorators, registerTemplate, sanitizeAttribute, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
6910
|
-
|
|
6911
|
-
//# sourceMappingURL=
|
|
6901
|
+
/** version: 2.45.4 */
|
|
6902
|
+
//# sourceMappingURL=index.js.map
|