@lwc/engine-core 3.4.0 → 3.5.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-lightning-element.d.ts +5 -0
- package/dist/framework/def.d.ts +5 -0
- package/dist/framework/main.d.ts +1 -1
- package/dist/framework/renderer.d.ts +1 -1
- package/dist/framework/vm.d.ts +5 -0
- package/dist/index.cjs.js +159 -24
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.js +157 -26
- 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) 2023 salesforce.com, inc.
|
|
3
3
|
*/
|
|
4
|
-
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, globalThis as globalThis$1, forEach, AriaPropNameToAttrNameMap, getPropertyDescriptor, defineProperties, getPrototypeOf as getPrototypeOf$1, setPrototypeOf, assign, isObject,
|
|
4
|
+
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, globalThis as globalThis$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, getOwnPropertyDescriptors, htmlPropertyToAttribute, ArraySlice, ArrayMap, KEY__SCOPED_CSS, kebabCaseToCamelCase, StringCharCodeAt, XML_NAMESPACE, XLINK_NAMESPACE, isString, StringSlice, isTrue, SVG_NAMESPACE, KEY__SHADOW_STATIC, KEY__SHADOW_RESOLVER, ArraySome, ArrayPop, isNumber, StringReplace, ArrayUnshift, 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, ArrayShift } from '@lwc/shared';
|
|
5
5
|
import { applyAriaReflection } from '@lwc/aria-reflection';
|
|
6
6
|
export { setFeatureFlag, setFeatureFlagForTest } from '@lwc/features';
|
|
7
7
|
|
|
@@ -519,8 +519,8 @@ function lockDomMutation() {
|
|
|
519
519
|
assertNotProd(); // this method should never leak to prod
|
|
520
520
|
isDomMutationAllowed = false;
|
|
521
521
|
}
|
|
522
|
-
function
|
|
523
|
-
return
|
|
522
|
+
function logMissingPortalWarn(name, type) {
|
|
523
|
+
return logWarn(`The \`${name}\` ${type} is available only on elements that use the \`lwc:dom="manual"\` directive.`);
|
|
524
524
|
}
|
|
525
525
|
function patchElementWithRestrictions(elm, options) {
|
|
526
526
|
assertNotProd(); // this method should never leak to prod
|
|
@@ -545,14 +545,14 @@ function patchElementWithRestrictions(elm, options) {
|
|
|
545
545
|
assign(descriptors, {
|
|
546
546
|
appendChild: generateDataDescriptor({
|
|
547
547
|
value(aChild) {
|
|
548
|
-
|
|
548
|
+
logMissingPortalWarn('appendChild', 'method');
|
|
549
549
|
return appendChild.call(this, aChild);
|
|
550
550
|
},
|
|
551
551
|
}),
|
|
552
552
|
insertBefore: generateDataDescriptor({
|
|
553
553
|
value(newNode, referenceNode) {
|
|
554
554
|
if (!isDomMutationAllowed) {
|
|
555
|
-
|
|
555
|
+
logMissingPortalWarn('insertBefore', 'method');
|
|
556
556
|
}
|
|
557
557
|
return insertBefore.call(this, newNode, referenceNode);
|
|
558
558
|
},
|
|
@@ -560,14 +560,14 @@ function patchElementWithRestrictions(elm, options) {
|
|
|
560
560
|
removeChild: generateDataDescriptor({
|
|
561
561
|
value(aChild) {
|
|
562
562
|
if (!isDomMutationAllowed) {
|
|
563
|
-
|
|
563
|
+
logMissingPortalWarn('removeChild', 'method');
|
|
564
564
|
}
|
|
565
565
|
return removeChild.call(this, aChild);
|
|
566
566
|
},
|
|
567
567
|
}),
|
|
568
568
|
replaceChild: generateDataDescriptor({
|
|
569
569
|
value(newChild, oldChild) {
|
|
570
|
-
|
|
570
|
+
logMissingPortalWarn('replaceChild', 'method');
|
|
571
571
|
return replaceChild.call(this, newChild, oldChild);
|
|
572
572
|
},
|
|
573
573
|
}),
|
|
@@ -577,7 +577,7 @@ function patchElementWithRestrictions(elm, options) {
|
|
|
577
577
|
},
|
|
578
578
|
set(value) {
|
|
579
579
|
if (!isDomMutationAllowed) {
|
|
580
|
-
|
|
580
|
+
logMissingPortalWarn('nodeValue', 'property');
|
|
581
581
|
}
|
|
582
582
|
originalNodeValueDescriptor.set.call(this, value);
|
|
583
583
|
},
|
|
@@ -587,7 +587,7 @@ function patchElementWithRestrictions(elm, options) {
|
|
|
587
587
|
return originalTextContentDescriptor.get.call(this);
|
|
588
588
|
},
|
|
589
589
|
set(value) {
|
|
590
|
-
|
|
590
|
+
logMissingPortalWarn('textContent', 'property');
|
|
591
591
|
originalTextContentDescriptor.set.call(this, value);
|
|
592
592
|
},
|
|
593
593
|
}),
|
|
@@ -596,7 +596,7 @@ function patchElementWithRestrictions(elm, options) {
|
|
|
596
596
|
return originalInnerHTMLDescriptor.get.call(this);
|
|
597
597
|
},
|
|
598
598
|
set(value) {
|
|
599
|
-
|
|
599
|
+
logMissingPortalWarn('innerHTML', 'property');
|
|
600
600
|
return originalInnerHTMLDescriptor.set.call(this, value);
|
|
601
601
|
},
|
|
602
602
|
}),
|
|
@@ -1454,7 +1454,51 @@ function warnIfInvokedDuringConstruction(vm, methodOrPropName) {
|
|
|
1454
1454
|
logError(`this.${methodOrPropName} should not be called during the construction of the custom element for ${getComponentTag(vm)} because the element is not yet in the DOM or has no children yet.`);
|
|
1455
1455
|
}
|
|
1456
1456
|
}
|
|
1457
|
-
|
|
1457
|
+
// List of properties on ElementInternals that are formAssociated can be found in the spec:
|
|
1458
|
+
// https://html.spec.whatwg.org/multipage/custom-elements.html#form-associated-custom-elements
|
|
1459
|
+
const formAssociatedProps = new Set([
|
|
1460
|
+
'setFormValue',
|
|
1461
|
+
'form',
|
|
1462
|
+
'setValidity',
|
|
1463
|
+
'willValidate',
|
|
1464
|
+
'validity',
|
|
1465
|
+
'validationMessage',
|
|
1466
|
+
'checkValidity',
|
|
1467
|
+
'reportValidity',
|
|
1468
|
+
'labels',
|
|
1469
|
+
]);
|
|
1470
|
+
// Verify that access to a form-associated property of the ElementInternals proxy has formAssociated set in the LWC.
|
|
1471
|
+
function assertFormAssociatedPropertySet(propertyKey, isFormAssociated) {
|
|
1472
|
+
if (formAssociatedProps.has(propertyKey) && !isFormAssociated) {
|
|
1473
|
+
//Note this error message mirrors Chrome and Firefox error messages, in Safari the error is slightly different.
|
|
1474
|
+
throw new DOMException(`Failed to execute '${propertyKey}' on 'ElementInternals': The target element is not a form-associated custom element.`);
|
|
1475
|
+
}
|
|
1476
|
+
}
|
|
1477
|
+
// Wrap all ElementInternal objects in a proxy to prevent form association when `formAssociated` is not set on an LWC.
|
|
1478
|
+
// This is needed because the 1UpgradeableConstructor1 always sets `formAssociated=true`, which means all
|
|
1479
|
+
// ElementInternal objects will have form-associated properties set when an LWC is placed in a form.
|
|
1480
|
+
// We are doing this to guard against customers taking a dependency on form elements being associated to ElementInternals
|
|
1481
|
+
// when 'formAssociated' has not been set on the LWC.
|
|
1482
|
+
function createElementInternalsProxy(elementInternals, isFormAssociated) {
|
|
1483
|
+
const elementInternalsProxy = new Proxy(elementInternals, {
|
|
1484
|
+
set(target, propertyKey, newValue) {
|
|
1485
|
+
// ElementInternals implementation uses strings as property keys exclusively in chrome, firefox, and safari
|
|
1486
|
+
assertFormAssociatedPropertySet(propertyKey, isFormAssociated);
|
|
1487
|
+
return Reflect.set(target, propertyKey, newValue);
|
|
1488
|
+
},
|
|
1489
|
+
get(target, propertyKey) {
|
|
1490
|
+
// ElementInternals implementation uses strings as property keys exclusively in chrome, firefox, and safari
|
|
1491
|
+
assertFormAssociatedPropertySet(propertyKey, isFormAssociated);
|
|
1492
|
+
const internalsPropertyValue = Reflect.get(target, propertyKey);
|
|
1493
|
+
// Bind the property value to the target so that function invocations are called with the
|
|
1494
|
+
// correct context ('this' value).
|
|
1495
|
+
return typeof internalsPropertyValue === 'function'
|
|
1496
|
+
? internalsPropertyValue.bind(target)
|
|
1497
|
+
: internalsPropertyValue;
|
|
1498
|
+
},
|
|
1499
|
+
});
|
|
1500
|
+
return elementInternalsProxy;
|
|
1501
|
+
}
|
|
1458
1502
|
// @ts-ignore
|
|
1459
1503
|
LightningElement.prototype = {
|
|
1460
1504
|
constructor: LightningElement,
|
|
@@ -1548,15 +1592,13 @@ LightningElement.prototype = {
|
|
|
1548
1592
|
},
|
|
1549
1593
|
attachInternals() {
|
|
1550
1594
|
const vm = getAssociatedVM(this);
|
|
1551
|
-
const { elm, renderer: { attachInternals }, } = vm;
|
|
1552
|
-
if (
|
|
1553
|
-
// Browsers that don't support attachInternals will need to be polyfilled before LWC is loaded.
|
|
1554
|
-
throw new Error('attachInternals API is not supported in this browser environment.');
|
|
1555
|
-
}
|
|
1556
|
-
if (vm.renderMode === 0 /* RenderMode.Light */ || vm.shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
1595
|
+
const { elm, def: { formAssociated }, renderer: { attachInternals }, } = vm;
|
|
1596
|
+
if (vm.shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
1557
1597
|
throw new Error('attachInternals API is not supported in light DOM or synthetic shadow.');
|
|
1558
1598
|
}
|
|
1559
|
-
|
|
1599
|
+
const internals = attachInternals(elm);
|
|
1600
|
+
// #TODO[2970]: remove proxy once `UpgradeableConstructor` has been removed
|
|
1601
|
+
return createElementInternalsProxy(internals, Boolean(formAssociated));
|
|
1560
1602
|
},
|
|
1561
1603
|
get isConnected() {
|
|
1562
1604
|
const vm = getAssociatedVM(this);
|
|
@@ -2637,9 +2679,26 @@ function HTMLBridgeElementFactory(SuperClass, publicProperties, methods, observe
|
|
|
2637
2679
|
};
|
|
2638
2680
|
// To avoid leaking private component details, accessing internals from outside a component is not allowed.
|
|
2639
2681
|
descriptors.attachInternals = {
|
|
2682
|
+
set() {
|
|
2683
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2684
|
+
logWarn('attachInternals cannot be accessed outside of a component. Use this.attachInternals instead.');
|
|
2685
|
+
}
|
|
2686
|
+
},
|
|
2640
2687
|
get() {
|
|
2641
2688
|
if (process.env.NODE_ENV !== 'production') {
|
|
2642
|
-
|
|
2689
|
+
logWarn('attachInternals cannot be accessed outside of a component. Use this.attachInternals instead.');
|
|
2690
|
+
}
|
|
2691
|
+
},
|
|
2692
|
+
};
|
|
2693
|
+
descriptors.formAssociated = {
|
|
2694
|
+
set() {
|
|
2695
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2696
|
+
logWarn('formAssociated cannot be accessed outside of a component. Set the value within the component class.');
|
|
2697
|
+
}
|
|
2698
|
+
},
|
|
2699
|
+
get() {
|
|
2700
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
2701
|
+
logWarn('formAssociated cannot be accessed outside of a component. Set the value within the component class.');
|
|
2643
2702
|
}
|
|
2644
2703
|
},
|
|
2645
2704
|
};
|
|
@@ -2951,7 +3010,7 @@ function getCtorProto(Ctor) {
|
|
|
2951
3010
|
return proto;
|
|
2952
3011
|
}
|
|
2953
3012
|
function createComponentDef(Ctor) {
|
|
2954
|
-
const { shadowSupportMode: ctorShadowSupportMode, renderMode: ctorRenderMode } = Ctor;
|
|
3013
|
+
const { shadowSupportMode: ctorShadowSupportMode, renderMode: ctorRenderMode, formAssociated: ctorFormAssociated, } = Ctor;
|
|
2955
3014
|
if (process.env.NODE_ENV !== 'production') {
|
|
2956
3015
|
const ctorName = Ctor.name;
|
|
2957
3016
|
// Removing the following assert until https://bugs.webkit.org/show_bug.cgi?id=190140 is fixed.
|
|
@@ -2975,7 +3034,7 @@ function createComponentDef(Ctor) {
|
|
|
2975
3034
|
const decoratorsMeta = getDecoratorsMeta(Ctor);
|
|
2976
3035
|
const { apiFields, apiFieldsConfig, apiMethods, wiredFields, wiredMethods, observedFields } = decoratorsMeta;
|
|
2977
3036
|
const proto = Ctor.prototype;
|
|
2978
|
-
let { connectedCallback, disconnectedCallback, renderedCallback, errorCallback, render } = proto;
|
|
3037
|
+
let { connectedCallback, disconnectedCallback, renderedCallback, errorCallback, formAssociatedCallback, formResetCallback, formDisabledCallback, formStateRestoreCallback, render, } = proto;
|
|
2979
3038
|
const superProto = getCtorProto(Ctor);
|
|
2980
3039
|
const superDef = superProto !== LightningElement ? getComponentInternalDef(superProto) : lightingElementDef;
|
|
2981
3040
|
const bridge = HTMLBridgeElementFactory(superDef.bridge, keys(apiFields), keys(apiMethods), keys(observedFields), proto);
|
|
@@ -2987,6 +3046,10 @@ function createComponentDef(Ctor) {
|
|
|
2987
3046
|
disconnectedCallback = disconnectedCallback || superDef.disconnectedCallback;
|
|
2988
3047
|
renderedCallback = renderedCallback || superDef.renderedCallback;
|
|
2989
3048
|
errorCallback = errorCallback || superDef.errorCallback;
|
|
3049
|
+
formAssociatedCallback = formAssociatedCallback || superDef.formAssociatedCallback;
|
|
3050
|
+
formResetCallback = formResetCallback || superDef.formResetCallback;
|
|
3051
|
+
formDisabledCallback = formDisabledCallback || superDef.formDisabledCallback;
|
|
3052
|
+
formStateRestoreCallback = formStateRestoreCallback || superDef.formStateRestoreCallback;
|
|
2990
3053
|
render = render || superDef.render;
|
|
2991
3054
|
let shadowSupportMode = superDef.shadowSupportMode;
|
|
2992
3055
|
if (!isUndefined$1(ctorShadowSupportMode)) {
|
|
@@ -2996,6 +3059,10 @@ function createComponentDef(Ctor) {
|
|
|
2996
3059
|
if (!isUndefined$1(ctorRenderMode)) {
|
|
2997
3060
|
renderMode = ctorRenderMode === 'light' ? 0 /* RenderMode.Light */ : 1 /* RenderMode.Shadow */;
|
|
2998
3061
|
}
|
|
3062
|
+
let formAssociated = superDef.formAssociated;
|
|
3063
|
+
if (!isUndefined$1(ctorFormAssociated)) {
|
|
3064
|
+
formAssociated = ctorFormAssociated;
|
|
3065
|
+
}
|
|
2999
3066
|
const template = getComponentRegisteredTemplate(Ctor) || superDef.template;
|
|
3000
3067
|
const name = Ctor.name || superDef.name;
|
|
3001
3068
|
// installing observed fields into the prototype.
|
|
@@ -3011,10 +3078,15 @@ function createComponentDef(Ctor) {
|
|
|
3011
3078
|
template,
|
|
3012
3079
|
renderMode,
|
|
3013
3080
|
shadowSupportMode,
|
|
3081
|
+
formAssociated,
|
|
3014
3082
|
connectedCallback,
|
|
3015
3083
|
disconnectedCallback,
|
|
3016
|
-
renderedCallback,
|
|
3017
3084
|
errorCallback,
|
|
3085
|
+
formAssociatedCallback,
|
|
3086
|
+
formDisabledCallback,
|
|
3087
|
+
formResetCallback,
|
|
3088
|
+
formStateRestoreCallback,
|
|
3089
|
+
renderedCallback,
|
|
3018
3090
|
render,
|
|
3019
3091
|
};
|
|
3020
3092
|
// This is a no-op unless Lightning DevTools are enabled.
|
|
@@ -3091,6 +3163,7 @@ const lightingElementDef = {
|
|
|
3091
3163
|
methods: EmptyObject,
|
|
3092
3164
|
renderMode: 1 /* RenderMode.Shadow */,
|
|
3093
3165
|
shadowSupportMode: "reset" /* ShadowSupportMode.Default */,
|
|
3166
|
+
formAssociated: undefined,
|
|
3094
3167
|
wire: EmptyObject,
|
|
3095
3168
|
bridge: BaseBridgeElement,
|
|
3096
3169
|
template: defaultEmptyTemplate,
|
|
@@ -3800,6 +3873,10 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
|
3800
3873
|
};
|
|
3801
3874
|
let connectedCallback;
|
|
3802
3875
|
let disconnectedCallback;
|
|
3876
|
+
let formAssociatedCallback;
|
|
3877
|
+
let formDisabledCallback;
|
|
3878
|
+
let formResetCallback;
|
|
3879
|
+
let formStateRestoreCallback;
|
|
3803
3880
|
if (lwcRuntimeFlags.ENABLE_NATIVE_CUSTOM_ELEMENT_LIFECYCLE) {
|
|
3804
3881
|
connectedCallback = (elm) => {
|
|
3805
3882
|
connectRootElement(elm);
|
|
@@ -3807,13 +3884,25 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
|
3807
3884
|
disconnectedCallback = (elm) => {
|
|
3808
3885
|
disconnectRootElement(elm);
|
|
3809
3886
|
};
|
|
3887
|
+
formAssociatedCallback = (elm) => {
|
|
3888
|
+
runFormAssociatedCallback(elm);
|
|
3889
|
+
};
|
|
3890
|
+
formDisabledCallback = (elm) => {
|
|
3891
|
+
runFormDisabledCallback(elm);
|
|
3892
|
+
};
|
|
3893
|
+
formResetCallback = (elm) => {
|
|
3894
|
+
runFormResetCallback(elm);
|
|
3895
|
+
};
|
|
3896
|
+
formStateRestoreCallback = (elm) => {
|
|
3897
|
+
runFormStateRestoreCallback(elm);
|
|
3898
|
+
};
|
|
3810
3899
|
}
|
|
3811
3900
|
// Should never get a tag with upper case letter at this point; the compiler
|
|
3812
3901
|
// should produce only tags with lowercase letters. However, the Java
|
|
3813
3902
|
// compiler may generate tagnames with uppercase letters so - for backwards
|
|
3814
3903
|
// compatibility, we lower case the tagname here.
|
|
3815
3904
|
const normalizedTagname = sel.toLowerCase();
|
|
3816
|
-
const elm = createCustomElement(normalizedTagname, upgradeCallback, connectedCallback, disconnectedCallback);
|
|
3905
|
+
const elm = createCustomElement(normalizedTagname, upgradeCallback, connectedCallback, disconnectedCallback, formAssociatedCallback, formDisabledCallback, formResetCallback, formStateRestoreCallback);
|
|
3817
3906
|
vnode.elm = elm;
|
|
3818
3907
|
vnode.vm = vm;
|
|
3819
3908
|
linkNodeToShadow(elm, owner, renderer);
|
|
@@ -5941,6 +6030,48 @@ function forceRehydration(vm) {
|
|
|
5941
6030
|
scheduleRehydration(vm);
|
|
5942
6031
|
}
|
|
5943
6032
|
}
|
|
6033
|
+
function runFormAssociatedCustomElementCallback(vm, faceCb) {
|
|
6034
|
+
const { renderMode, shadowMode, def: { formAssociated }, } = vm;
|
|
6035
|
+
// Technically the UpgradableConstructor always sets `static formAssociated = true` but silently fail here to match browser behavior.
|
|
6036
|
+
if (isUndefined$1(formAssociated) || isFalse(formAssociated)) {
|
|
6037
|
+
if (process.env.NODE_ENV !== 'production') {
|
|
6038
|
+
logWarn(`Form associated lifecycle methods must have the 'static formAssociated' value set in the component's prototype chain.`);
|
|
6039
|
+
}
|
|
6040
|
+
return;
|
|
6041
|
+
}
|
|
6042
|
+
if (shadowMode === 1 /* ShadowMode.Synthetic */ && renderMode !== 0 /* RenderMode.Light */) {
|
|
6043
|
+
throw new Error('Form associated lifecycle methods are not available in synthetic shadow. Please use native shadow or light DOM.');
|
|
6044
|
+
}
|
|
6045
|
+
invokeComponentCallback(vm, faceCb);
|
|
6046
|
+
}
|
|
6047
|
+
function runFormAssociatedCallback(elm) {
|
|
6048
|
+
const vm = getAssociatedVM(elm);
|
|
6049
|
+
const { formAssociatedCallback } = vm.def;
|
|
6050
|
+
if (!isUndefined$1(formAssociatedCallback)) {
|
|
6051
|
+
runFormAssociatedCustomElementCallback(vm, formAssociatedCallback);
|
|
6052
|
+
}
|
|
6053
|
+
}
|
|
6054
|
+
function runFormDisabledCallback(elm) {
|
|
6055
|
+
const vm = getAssociatedVM(elm);
|
|
6056
|
+
const { formDisabledCallback } = vm.def;
|
|
6057
|
+
if (!isUndefined$1(formDisabledCallback)) {
|
|
6058
|
+
runFormAssociatedCustomElementCallback(vm, formDisabledCallback);
|
|
6059
|
+
}
|
|
6060
|
+
}
|
|
6061
|
+
function runFormResetCallback(elm) {
|
|
6062
|
+
const vm = getAssociatedVM(elm);
|
|
6063
|
+
const { formResetCallback } = vm.def;
|
|
6064
|
+
if (!isUndefined$1(formResetCallback)) {
|
|
6065
|
+
runFormAssociatedCustomElementCallback(vm, formResetCallback);
|
|
6066
|
+
}
|
|
6067
|
+
}
|
|
6068
|
+
function runFormStateRestoreCallback(elm) {
|
|
6069
|
+
const vm = getAssociatedVM(elm);
|
|
6070
|
+
const { formStateRestoreCallback } = vm.def;
|
|
6071
|
+
if (!isUndefined$1(formStateRestoreCallback)) {
|
|
6072
|
+
runFormAssociatedCustomElementCallback(vm, formStateRestoreCallback);
|
|
6073
|
+
}
|
|
6074
|
+
}
|
|
5944
6075
|
|
|
5945
6076
|
/*
|
|
5946
6077
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6853,7 +6984,7 @@ function trackMutations(tmpl) {
|
|
|
6853
6984
|
}
|
|
6854
6985
|
function addLegacyStylesheetTokensShim(tmpl) {
|
|
6855
6986
|
// When ENABLE_FROZEN_TEMPLATE is false, then we shim stylesheetTokens on top of stylesheetToken for anyone who
|
|
6856
|
-
// is accessing the old internal API (backwards compat). Details:
|
|
6987
|
+
// is accessing the old internal API (backwards compat). Details: W-14210169
|
|
6857
6988
|
defineProperty(tmpl, 'stylesheetTokens', {
|
|
6858
6989
|
enumerable: true,
|
|
6859
6990
|
configurable: true,
|
|
@@ -6947,6 +7078,6 @@ function readonly(obj) {
|
|
|
6947
7078
|
return getReadOnlyProxy(obj);
|
|
6948
7079
|
}
|
|
6949
7080
|
|
|
6950
|
-
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, sanitizeAttribute, setHooks, swapComponent, swapStyle, swapTemplate, track, unwrap, wire };
|
|
6951
|
-
/** version: 3.
|
|
7081
|
+
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.5.0 */
|
|
6952
7083
|
//# sourceMappingURL=index.js.map
|