@lwc/engine-core 8.20.5 → 8.20.6
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/index.cjs.js +38 -8
- package/dist/index.js +38 -8
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -6833,42 +6833,72 @@ class ContextBinding {
|
|
|
6833
6833
|
}
|
|
6834
6834
|
_ContextBinding_renderer = new WeakMap(), _ContextBinding_providedContextVarieties = new WeakMap(), _ContextBinding_elm = new WeakMap();
|
|
6835
6835
|
function connectContext(vm) {
|
|
6836
|
+
/**
|
|
6837
|
+
* If ENABLE_LEGACY_CONTEXT_CONNECTION is true, enumerates directly on the component
|
|
6838
|
+
* which can result in the component lifecycle observing properties that are not typically observed.
|
|
6839
|
+
* See PR #5536 for more information.
|
|
6840
|
+
*/
|
|
6841
|
+
if (lwcRuntimeFlags.ENABLE_LEGACY_CONTEXT_CONNECTION) {
|
|
6842
|
+
connect(vm, shared.keys(shared.getPrototypeOf(vm.component)), vm.component);
|
|
6843
|
+
}
|
|
6844
|
+
else {
|
|
6845
|
+
// Non-decorated objects
|
|
6846
|
+
connect(vm, shared.keys(vm.cmpFields), vm.cmpFields);
|
|
6847
|
+
// Decorated objects like @api context
|
|
6848
|
+
connect(vm, shared.keys(vm.cmpProps), vm.cmpProps);
|
|
6849
|
+
}
|
|
6850
|
+
}
|
|
6851
|
+
function disconnectContext(vm) {
|
|
6852
|
+
/**
|
|
6853
|
+
* If ENABLE_LEGACY_CONTEXT_CONNECTION is true, enumerates directly on the component
|
|
6854
|
+
* which can result in the component lifecycle observing properties that are not typically observed.
|
|
6855
|
+
* See PR #5536 for more information.
|
|
6856
|
+
*/
|
|
6857
|
+
if (lwcRuntimeFlags.ENABLE_LEGACY_CONTEXT_CONNECTION) {
|
|
6858
|
+
connect(vm, shared.keys(shared.getPrototypeOf(vm.component)), vm.component);
|
|
6859
|
+
}
|
|
6860
|
+
else {
|
|
6861
|
+
// Non-decorated objects
|
|
6862
|
+
disconnect(vm, shared.keys(vm.cmpFields), vm.cmpFields);
|
|
6863
|
+
// Decorated objects like @api context
|
|
6864
|
+
disconnect(vm, shared.keys(vm.cmpProps), vm.cmpProps);
|
|
6865
|
+
}
|
|
6866
|
+
}
|
|
6867
|
+
function connect(vm, enumerableKeys, contextContainer) {
|
|
6836
6868
|
const contextKeys = shared.getContextKeys();
|
|
6837
6869
|
if (shared.isUndefined(contextKeys)) {
|
|
6838
6870
|
return;
|
|
6839
6871
|
}
|
|
6840
6872
|
const { connectContext } = contextKeys;
|
|
6841
6873
|
const { component } = vm;
|
|
6842
|
-
const
|
|
6843
|
-
const contextfulKeys = shared.ArrayFilter.call(enumerableKeys, (enumerableKey) => shared.isTrustedContext(component[enumerableKey]));
|
|
6874
|
+
const contextfulKeys = shared.ArrayFilter.call(enumerableKeys, (enumerableKey) => shared.isTrustedContext(contextContainer[enumerableKey]));
|
|
6844
6875
|
if (contextfulKeys.length === 0) {
|
|
6845
6876
|
return;
|
|
6846
6877
|
}
|
|
6847
6878
|
const providedContextVarieties = new Map();
|
|
6848
6879
|
try {
|
|
6849
6880
|
for (let i = 0; i < contextfulKeys.length; i++) {
|
|
6850
|
-
|
|
6881
|
+
contextContainer[contextfulKeys[i]][connectContext](new ContextBinding(vm, component, providedContextVarieties));
|
|
6851
6882
|
}
|
|
6852
6883
|
}
|
|
6853
6884
|
catch (err) {
|
|
6854
6885
|
logWarnOnce(`Attempted to connect to trusted context but received the following error: ${err.message}`);
|
|
6855
6886
|
}
|
|
6856
6887
|
}
|
|
6857
|
-
function
|
|
6888
|
+
function disconnect(vm, enumerableKeys, contextContainer) {
|
|
6858
6889
|
const contextKeys = shared.getContextKeys();
|
|
6859
6890
|
if (!contextKeys) {
|
|
6860
6891
|
return;
|
|
6861
6892
|
}
|
|
6862
6893
|
const { disconnectContext } = contextKeys;
|
|
6863
6894
|
const { component } = vm;
|
|
6864
|
-
const
|
|
6865
|
-
const contextfulKeys = shared.ArrayFilter.call(enumerableKeys, (enumerableKey) => shared.isTrustedContext(component[enumerableKey]));
|
|
6895
|
+
const contextfulKeys = shared.ArrayFilter.call(enumerableKeys, (enumerableKey) => shared.isTrustedContext(contextContainer[enumerableKey]));
|
|
6866
6896
|
if (contextfulKeys.length === 0) {
|
|
6867
6897
|
return;
|
|
6868
6898
|
}
|
|
6869
6899
|
try {
|
|
6870
6900
|
for (let i = 0; i < contextfulKeys.length; i++) {
|
|
6871
|
-
|
|
6901
|
+
contextContainer[contextfulKeys[i]][disconnectContext](component);
|
|
6872
6902
|
}
|
|
6873
6903
|
}
|
|
6874
6904
|
catch (err) {
|
|
@@ -8752,5 +8782,5 @@ exports.swapTemplate = swapTemplate;
|
|
|
8752
8782
|
exports.track = track;
|
|
8753
8783
|
exports.unwrap = unwrap;
|
|
8754
8784
|
exports.wire = wire;
|
|
8755
|
-
/** version: 8.20.
|
|
8785
|
+
/** version: 8.20.6 */
|
|
8756
8786
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.js
CHANGED
|
@@ -6830,42 +6830,72 @@ class ContextBinding {
|
|
|
6830
6830
|
}
|
|
6831
6831
|
_ContextBinding_renderer = new WeakMap(), _ContextBinding_providedContextVarieties = new WeakMap(), _ContextBinding_elm = new WeakMap();
|
|
6832
6832
|
function connectContext(vm) {
|
|
6833
|
+
/**
|
|
6834
|
+
* If ENABLE_LEGACY_CONTEXT_CONNECTION is true, enumerates directly on the component
|
|
6835
|
+
* which can result in the component lifecycle observing properties that are not typically observed.
|
|
6836
|
+
* See PR #5536 for more information.
|
|
6837
|
+
*/
|
|
6838
|
+
if (lwcRuntimeFlags.ENABLE_LEGACY_CONTEXT_CONNECTION) {
|
|
6839
|
+
connect(vm, keys(getPrototypeOf$1(vm.component)), vm.component);
|
|
6840
|
+
}
|
|
6841
|
+
else {
|
|
6842
|
+
// Non-decorated objects
|
|
6843
|
+
connect(vm, keys(vm.cmpFields), vm.cmpFields);
|
|
6844
|
+
// Decorated objects like @api context
|
|
6845
|
+
connect(vm, keys(vm.cmpProps), vm.cmpProps);
|
|
6846
|
+
}
|
|
6847
|
+
}
|
|
6848
|
+
function disconnectContext(vm) {
|
|
6849
|
+
/**
|
|
6850
|
+
* If ENABLE_LEGACY_CONTEXT_CONNECTION is true, enumerates directly on the component
|
|
6851
|
+
* which can result in the component lifecycle observing properties that are not typically observed.
|
|
6852
|
+
* See PR #5536 for more information.
|
|
6853
|
+
*/
|
|
6854
|
+
if (lwcRuntimeFlags.ENABLE_LEGACY_CONTEXT_CONNECTION) {
|
|
6855
|
+
connect(vm, keys(getPrototypeOf$1(vm.component)), vm.component);
|
|
6856
|
+
}
|
|
6857
|
+
else {
|
|
6858
|
+
// Non-decorated objects
|
|
6859
|
+
disconnect(vm, keys(vm.cmpFields), vm.cmpFields);
|
|
6860
|
+
// Decorated objects like @api context
|
|
6861
|
+
disconnect(vm, keys(vm.cmpProps), vm.cmpProps);
|
|
6862
|
+
}
|
|
6863
|
+
}
|
|
6864
|
+
function connect(vm, enumerableKeys, contextContainer) {
|
|
6833
6865
|
const contextKeys = getContextKeys();
|
|
6834
6866
|
if (isUndefined$1(contextKeys)) {
|
|
6835
6867
|
return;
|
|
6836
6868
|
}
|
|
6837
6869
|
const { connectContext } = contextKeys;
|
|
6838
6870
|
const { component } = vm;
|
|
6839
|
-
const
|
|
6840
|
-
const contextfulKeys = ArrayFilter.call(enumerableKeys, (enumerableKey) => isTrustedContext(component[enumerableKey]));
|
|
6871
|
+
const contextfulKeys = ArrayFilter.call(enumerableKeys, (enumerableKey) => isTrustedContext(contextContainer[enumerableKey]));
|
|
6841
6872
|
if (contextfulKeys.length === 0) {
|
|
6842
6873
|
return;
|
|
6843
6874
|
}
|
|
6844
6875
|
const providedContextVarieties = new Map();
|
|
6845
6876
|
try {
|
|
6846
6877
|
for (let i = 0; i < contextfulKeys.length; i++) {
|
|
6847
|
-
|
|
6878
|
+
contextContainer[contextfulKeys[i]][connectContext](new ContextBinding(vm, component, providedContextVarieties));
|
|
6848
6879
|
}
|
|
6849
6880
|
}
|
|
6850
6881
|
catch (err) {
|
|
6851
6882
|
logWarnOnce(`Attempted to connect to trusted context but received the following error: ${err.message}`);
|
|
6852
6883
|
}
|
|
6853
6884
|
}
|
|
6854
|
-
function
|
|
6885
|
+
function disconnect(vm, enumerableKeys, contextContainer) {
|
|
6855
6886
|
const contextKeys = getContextKeys();
|
|
6856
6887
|
if (!contextKeys) {
|
|
6857
6888
|
return;
|
|
6858
6889
|
}
|
|
6859
6890
|
const { disconnectContext } = contextKeys;
|
|
6860
6891
|
const { component } = vm;
|
|
6861
|
-
const
|
|
6862
|
-
const contextfulKeys = ArrayFilter.call(enumerableKeys, (enumerableKey) => isTrustedContext(component[enumerableKey]));
|
|
6892
|
+
const contextfulKeys = ArrayFilter.call(enumerableKeys, (enumerableKey) => isTrustedContext(contextContainer[enumerableKey]));
|
|
6863
6893
|
if (contextfulKeys.length === 0) {
|
|
6864
6894
|
return;
|
|
6865
6895
|
}
|
|
6866
6896
|
try {
|
|
6867
6897
|
for (let i = 0; i < contextfulKeys.length; i++) {
|
|
6868
|
-
|
|
6898
|
+
contextContainer[contextfulKeys[i]][disconnectContext](component);
|
|
6869
6899
|
}
|
|
6870
6900
|
}
|
|
6871
6901
|
catch (err) {
|
|
@@ -8678,5 +8708,5 @@ function readonly(obj) {
|
|
|
8678
8708
|
}
|
|
8679
8709
|
|
|
8680
8710
|
export { BaseBridgeElement, LightningElement, profilerControl as __unstable__ProfilerControl, reportingControl as __unstable__ReportingControl, api$1 as api, computeShadowAndRenderMode, connectRootElement, createContextProviderWithRegister, createVM, disconnectRootElement, freezeTemplate, getAssociatedVMIfPresent, getComponentAPIVersion, getComponentConstructor, getComponentDef, getComponentHtmlPrototype, hydrateRoot, isComponentConstructor, parseFragment, parseSVGFragment, readonly, registerComponent, registerDecorators, registerTemplate, runFormAssociatedCallback, runFormDisabledCallback, runFormResetCallback, runFormStateRestoreCallback, sanitizeAttribute, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
8681
|
-
/** version: 8.20.
|
|
8711
|
+
/** version: 8.20.6 */
|
|
8682
8712
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"You can safely modify dependencies, devDependencies, keywords, etc., but other props will be overwritten."
|
|
5
5
|
],
|
|
6
6
|
"name": "@lwc/engine-core",
|
|
7
|
-
"version": "8.20.
|
|
7
|
+
"version": "8.20.6",
|
|
8
8
|
"description": "Core LWC engine APIs.",
|
|
9
9
|
"keywords": [
|
|
10
10
|
"lwc"
|
|
@@ -46,9 +46,9 @@
|
|
|
46
46
|
}
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@lwc/features": "8.20.
|
|
50
|
-
"@lwc/shared": "8.20.
|
|
51
|
-
"@lwc/signals": "8.20.
|
|
49
|
+
"@lwc/features": "8.20.6",
|
|
50
|
+
"@lwc/shared": "8.20.6",
|
|
51
|
+
"@lwc/signals": "8.20.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
54
|
"observable-membrane": "2.0.0"
|