@lwc/engine-core 3.5.0 → 3.6.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/framework/base-bridge-element.d.ts +1 -1
- package/dist/framework/vm.d.ts +2 -1
- package/dist/index.cjs.js +14 -9
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +14 -9
- package/dist/index.js.map +1 -1
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -2620,7 +2620,7 @@ function createAccessorThatWarns(propName) {
|
|
|
2620
2620
|
configurable: true,
|
|
2621
2621
|
};
|
|
2622
2622
|
}
|
|
2623
|
-
function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observedFields, proto) {
|
|
2623
|
+
function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observedFields, proto, hasCustomSuperClass) {
|
|
2624
2624
|
const HTMLBridgeElement = class extends SuperClass {
|
|
2625
2625
|
};
|
|
2626
2626
|
// generating the hash table for attributes to avoid duplicate fields and facilitate validation
|
|
@@ -2631,7 +2631,8 @@ function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observe
|
|
|
2631
2631
|
const descriptors = create(null);
|
|
2632
2632
|
// present a hint message so that developers are aware that they have not decorated property with @api
|
|
2633
2633
|
if (process.env.NODE_ENV !== 'production') {
|
|
2634
|
-
|
|
2634
|
+
// TODO [#3761]: enable for components that don't extend from LightningElement
|
|
2635
|
+
if (!isUndefined$1(proto) && !isNull(proto) && !hasCustomSuperClass) {
|
|
2635
2636
|
const nonPublicPropertiesToWarnOn = new Set([
|
|
2636
2637
|
// getters, setters, and methods
|
|
2637
2638
|
...keys(getOwnPropertyDescriptors(proto)),
|
|
@@ -2712,7 +2713,7 @@ function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observe
|
|
|
2712
2713
|
defineProperties(HTMLBridgeElement.prototype, descriptors);
|
|
2713
2714
|
return HTMLBridgeElement;
|
|
2714
2715
|
}
|
|
2715
|
-
const BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), [], [], null);
|
|
2716
|
+
const BaseBridgeElement = HTMLBridgeElementFactory(HTMLElementConstructor, getOwnPropertyNames$1(HTMLElementOriginalDescriptors), [], [], null, false);
|
|
2716
2717
|
if (process.env.IS_BROWSER) {
|
|
2717
2718
|
// This ARIA reflection only really makes sense in the browser. On the server, there is no `renderedCallback()`,
|
|
2718
2719
|
// so you cannot do e.g. `this.template.querySelector('x-child').ariaBusy = 'true'`. So we don't need to expose
|
|
@@ -3022,7 +3023,8 @@ function createComponentDef(Ctor) {
|
|
|
3022
3023
|
}
|
|
3023
3024
|
if (!isUndefined$1(ctorShadowSupportMode) &&
|
|
3024
3025
|
ctorShadowSupportMode !== "any" /* ShadowSupportMode.Any */ &&
|
|
3025
|
-
ctorShadowSupportMode !== "reset" /* ShadowSupportMode.Default */
|
|
3026
|
+
ctorShadowSupportMode !== "reset" /* ShadowSupportMode.Default */ &&
|
|
3027
|
+
ctorShadowSupportMode !== "native" /* ShadowSupportMode.Native */) {
|
|
3026
3028
|
logError(`Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
|
|
3027
3029
|
}
|
|
3028
3030
|
if (!isUndefined$1(ctorRenderMode) &&
|
|
@@ -3036,8 +3038,9 @@ function createComponentDef(Ctor) {
|
|
|
3036
3038
|
const proto = Ctor.prototype;
|
|
3037
3039
|
let { connectedCallback, disconnectedCallback, renderedCallback, errorCallback, formAssociatedCallback, formResetCallback, formDisabledCallback, formStateRestoreCallback, render, } = proto;
|
|
3038
3040
|
const superProto = getCtorProto(Ctor);
|
|
3039
|
-
const
|
|
3040
|
-
const
|
|
3041
|
+
const hasCustomSuperClass = superProto !== LightningElement;
|
|
3042
|
+
const superDef = hasCustomSuperClass ? getComponentInternalDef(superProto) : lightingElementDef;
|
|
3043
|
+
const bridge = HTMLBridgeElementFactory(superDef.bridge, keys(apiFields), keys(apiMethods), keys(observedFields), proto, hasCustomSuperClass);
|
|
3041
3044
|
const props = assign(create(null), superDef.props, apiFields);
|
|
3042
3045
|
const propsConfig = assign(create(null), superDef.propsConfig, apiFieldsConfig);
|
|
3043
3046
|
const methods = assign(create(null), superDef.methods, apiMethods);
|
|
@@ -5720,8 +5723,10 @@ function computeShadowMode(def, owner, renderer) {
|
|
|
5720
5723
|
// everything defaults to native when the synthetic shadow polyfill is unavailable.
|
|
5721
5724
|
shadowMode = 0 /* ShadowMode.Native */;
|
|
5722
5725
|
}
|
|
5723
|
-
else if (lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE
|
|
5724
|
-
|
|
5726
|
+
else if (lwcRuntimeFlags.ENABLE_MIXED_SHADOW_MODE ||
|
|
5727
|
+
def.shadowSupportMode === "native" /* ShadowSupportMode.Native */) {
|
|
5728
|
+
if (def.shadowSupportMode === "any" /* ShadowSupportMode.Any */ ||
|
|
5729
|
+
def.shadowSupportMode === "native" /* ShadowSupportMode.Native */) {
|
|
5725
5730
|
shadowMode = 0 /* ShadowMode.Native */;
|
|
5726
5731
|
}
|
|
5727
5732
|
else {
|
|
@@ -7079,5 +7084,5 @@ function readonly(obj) {
|
|
|
7079
7084
|
}
|
|
7080
7085
|
|
|
7081
7086
|
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, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
7082
|
-
/** version: 3.
|
|
7087
|
+
/** version: 3.6.0 */
|
|
7083
7088
|
//# sourceMappingURL=index.js.map
|