@lwc/engine-core 6.5.0 → 6.5.2
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/LICENSE.md +88 -0
- package/dist/framework/api.d.ts +1 -1
- package/dist/framework/vnodes.d.ts +7 -2
- package/dist/index.cjs.js +23 -19
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +24 -20
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Copyright (c) 2024 Salesforce, Inc.
|
|
3
3
|
*/
|
|
4
|
-
import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, ArrayIndexOf,
|
|
4
|
+
import { noop, StringToLowerCase, isNull, ArrayPush as ArrayPush$1, ArrayJoin, isFrozen, isUndefined as isUndefined$1, defineProperty, ArrayIndexOf, ArrayPop, create, isFalse, isFunction as isFunction$1, isObject, seal, isAPIFeatureEnabled, isArray as isArray$1, keys, hasOwnProperty as hasOwnProperty$1, entries, AriaPropNameToAttrNameMap, getPropertyDescriptor, forEach, defineProperties, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, assign, freeze, KEY__SYNTHETIC_MODE, assert, toString as toString$1, getOwnPropertyDescriptor as getOwnPropertyDescriptor$1, LWC_VERSION_COMMENT_REGEX, LWC_VERSION, getOwnPropertyNames as getOwnPropertyNames$1, getOwnPropertyDescriptors, htmlPropertyToAttribute, ArraySlice, ArraySplice, ArrayMap, KEY__SCOPED_CSS, kebabCaseToCamelCase, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, isString, StringSlice, ArrayShift, ArrayUnshift, isTrue, SVG_NAMESPACE, KEY__SHADOW_STATIC, KEY__SHADOW_RESOLVER, ArraySome, isNumber, StringReplace, htmlEscape, StringCharAt, LOWEST_API_VERSION, 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 } from '@lwc/shared';
|
|
5
5
|
export { setFeatureFlag, setFeatureFlagForTest } from '@lwc/features';
|
|
6
6
|
|
|
7
7
|
/*
|
|
@@ -257,16 +257,17 @@ class ReactiveObserver {
|
|
|
257
257
|
if (len > 0) {
|
|
258
258
|
for (let i = 0; i < len; i++) {
|
|
259
259
|
const set = listeners[i];
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
ArraySplice.call(set, pos, 1);
|
|
260
|
+
const setLength = set.length;
|
|
261
|
+
// The length is usually 1, so avoid doing an indexOf when we know for certain
|
|
262
|
+
// that `this` is the first item in the array.
|
|
263
|
+
if (setLength > 1) {
|
|
264
|
+
// Swap with the last item before removal.
|
|
265
|
+
// (Avoiding splice here is a perf optimization, and the order doesn't matter.)
|
|
266
|
+
const index = ArrayIndexOf.call(set, this);
|
|
267
|
+
set[index] = set[setLength - 1];
|
|
269
268
|
}
|
|
269
|
+
// Remove the last item
|
|
270
|
+
ArrayPop.call(set);
|
|
270
271
|
}
|
|
271
272
|
listeners.length = 0;
|
|
272
273
|
}
|
|
@@ -2052,7 +2053,7 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
|
|
|
2052
2053
|
}
|
|
2053
2054
|
|
|
2054
2055
|
/*
|
|
2055
|
-
* Copyright (c)
|
|
2056
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
|
2056
2057
|
* All rights reserved.
|
|
2057
2058
|
* SPDX-License-Identifier: MIT
|
|
2058
2059
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -2211,7 +2212,8 @@ function installWireAdapters(vm) {
|
|
|
2211
2212
|
vm.debugInfo[WIRE_DEBUG_ENTRY] = create(null);
|
|
2212
2213
|
}
|
|
2213
2214
|
const wiredConnecting = (context.wiredConnecting = []);
|
|
2214
|
-
const wiredDisconnecting = (context.wiredDisconnecting =
|
|
2215
|
+
const wiredDisconnecting = (context.wiredDisconnecting =
|
|
2216
|
+
[]);
|
|
2215
2217
|
for (const fieldNameOrMethod in wire) {
|
|
2216
2218
|
const descriptor = wire[fieldNameOrMethod];
|
|
2217
2219
|
const wireDef = WireMetaMap.get(descriptor);
|
|
@@ -2712,7 +2714,7 @@ function sanitizeAttribute(tagName, namespaceUri, attrName, attrValue) {
|
|
|
2712
2714
|
}
|
|
2713
2715
|
|
|
2714
2716
|
/*
|
|
2715
|
-
* Copyright (c)
|
|
2717
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
|
2716
2718
|
* All rights reserved.
|
|
2717
2719
|
* SPDX-License-Identifier: MIT
|
|
2718
2720
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -3621,7 +3623,7 @@ function createStylesheet(vm, stylesheets) {
|
|
|
3621
3623
|
}
|
|
3622
3624
|
|
|
3623
3625
|
/*
|
|
3624
|
-
* Copyright (c)
|
|
3626
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
|
3625
3627
|
* All rights reserved.
|
|
3626
3628
|
* SPDX-License-Identifier: MIT
|
|
3627
3629
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -4141,7 +4143,7 @@ function hydrateStaticParts(vnode, renderer) {
|
|
|
4141
4143
|
}
|
|
4142
4144
|
|
|
4143
4145
|
/*
|
|
4144
|
-
* Copyright (c)
|
|
4146
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
|
4145
4147
|
* All rights reserved.
|
|
4146
4148
|
* SPDX-License-Identifier: MIT
|
|
4147
4149
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -4911,7 +4913,7 @@ function updateStaticChildren(c1, c2, parent, renderer) {
|
|
|
4911
4913
|
}
|
|
4912
4914
|
|
|
4913
4915
|
/*
|
|
4914
|
-
* Copyright (c)
|
|
4916
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
|
4915
4917
|
* All rights reserved.
|
|
4916
4918
|
* SPDX-License-Identifier: MIT
|
|
4917
4919
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -5193,6 +5195,7 @@ function i(iterable, factory) {
|
|
|
5193
5195
|
ArrayPush$1.apply(list, vnode);
|
|
5194
5196
|
}
|
|
5195
5197
|
else {
|
|
5198
|
+
// `isArray` doesn't narrow this block properly...
|
|
5196
5199
|
ArrayPush$1.call(list, vnode);
|
|
5197
5200
|
}
|
|
5198
5201
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5244,6 +5247,7 @@ function f(items) {
|
|
|
5244
5247
|
ArrayPush$1.apply(flattened, item);
|
|
5245
5248
|
}
|
|
5246
5249
|
else {
|
|
5250
|
+
// `isArray` doesn't narrow this block properly...
|
|
5247
5251
|
ArrayPush$1.call(flattened, item);
|
|
5248
5252
|
}
|
|
5249
5253
|
}
|
|
@@ -5573,7 +5577,7 @@ function logGlobalOperationEnd(opId, vm) {
|
|
|
5573
5577
|
}
|
|
5574
5578
|
|
|
5575
5579
|
/*
|
|
5576
|
-
* Copyright (c)
|
|
5580
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
|
5577
5581
|
* All rights reserved.
|
|
5578
5582
|
* SPDX-License-Identifier: MIT
|
|
5579
5583
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -7544,7 +7548,7 @@ function setHooks(hooks) {
|
|
|
7544
7548
|
}
|
|
7545
7549
|
|
|
7546
7550
|
/*
|
|
7547
|
-
* Copyright (c)
|
|
7551
|
+
* Copyright (c) 2024, Salesforce, Inc.
|
|
7548
7552
|
* All rights reserved.
|
|
7549
7553
|
* SPDX-License-Identifier: MIT
|
|
7550
7554
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
@@ -7612,9 +7616,9 @@ function warnOnArrayMutation(stylesheets) {
|
|
|
7612
7616
|
// we can at least warn when they use the most common mutation methods.
|
|
7613
7617
|
for (const prop of ARRAY_MUTATION_METHODS) {
|
|
7614
7618
|
const originalArrayMethod = getOriginalArrayMethod(prop);
|
|
7619
|
+
// Assertions used here because TypeScript can't handle mapping over our types
|
|
7615
7620
|
stylesheets[prop] = function arrayMutationWarningWrapper() {
|
|
7616
7621
|
reportTemplateViolation('stylesheets');
|
|
7617
|
-
// @ts-expect-error can't properly determine the right `this`
|
|
7618
7622
|
return originalArrayMethod.apply(this, arguments);
|
|
7619
7623
|
};
|
|
7620
7624
|
}
|
|
@@ -7800,5 +7804,5 @@ function readonly(obj) {
|
|
|
7800
7804
|
}
|
|
7801
7805
|
|
|
7802
7806
|
export { 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, setHooks, shouldBeFormAssociated, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
7803
|
-
/** version: 6.5.
|
|
7807
|
+
/** version: 6.5.2 */
|
|
7804
7808
|
//# sourceMappingURL=index.js.map
|