lwc 2.17.0 → 2.19.1
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/engine-dom/esm/es2017/engine-dom.js +137 -137
- package/dist/engine-dom/iife/es2017/engine-dom.js +137 -137
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +116 -116
- package/dist/engine-dom/iife/es5/engine-dom.js +148 -149
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +127 -128
- package/dist/engine-dom/umd/es2017/engine-dom.js +137 -137
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +116 -116
- package/dist/engine-dom/umd/es5/engine-dom.js +148 -149
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +127 -128
- package/dist/engine-server/commonjs/es2017/engine-server.js +114 -114
- package/dist/engine-server/esm/es2017/engine-server.js +114 -114
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +20 -20
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +20 -20
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +20 -20
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +20 -20
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +20 -20
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +20 -20
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +20 -20
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +20 -20
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +20 -20
- package/dist/wire-service/esm/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service.js +2 -2
- package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/iife/es5/wire-service.js +4 -4
- package/dist/wire-service/iife/es5/wire-service.min.js +1 -1
- package/dist/wire-service/iife/es5/wire-service_debug.js +4 -4
- package/dist/wire-service/umd/es2017/wire-service.js +2 -2
- package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
- package/dist/wire-service/umd/es5/wire-service.js +4 -4
- package/dist/wire-service/umd/es5/wire-service.min.js +1 -1
- package/dist/wire-service/umd/es5/wire-service_debug.js +4 -4
- package/package.json +7 -7
|
@@ -440,9 +440,9 @@ const XLINK_NAMESPACE = 'http://www.w3.org/1999/xlink';
|
|
|
440
440
|
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
441
441
|
*/
|
|
442
442
|
// Increment whenever the LWC template compiler changes
|
|
443
|
-
const LWC_VERSION = "2.
|
|
443
|
+
const LWC_VERSION = "2.19.1";
|
|
444
444
|
const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
|
|
445
|
-
/** version: 2.
|
|
445
|
+
/** version: 2.19.1 */
|
|
446
446
|
|
|
447
447
|
/*
|
|
448
448
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -551,7 +551,7 @@ function setFeatureFlagForTest(name, value) {
|
|
|
551
551
|
setFeatureFlag(name, value);
|
|
552
552
|
}
|
|
553
553
|
}
|
|
554
|
-
/** version: 2.
|
|
554
|
+
/** version: 2.19.1 */
|
|
555
555
|
|
|
556
556
|
/* proxy-compat-disable */
|
|
557
557
|
|
|
@@ -1956,7 +1956,7 @@ const LightningElement = function () {
|
|
|
1956
1956
|
// Linking elm, shadow root and component with the VM.
|
|
1957
1957
|
associateVM(component, vm);
|
|
1958
1958
|
associateVM(elm, vm);
|
|
1959
|
-
if (vm.renderMode === 1 /* Shadow */) {
|
|
1959
|
+
if (vm.renderMode === 1 /* RenderMode.Shadow */) {
|
|
1960
1960
|
vm.renderRoot = doAttachShadow(vm);
|
|
1961
1961
|
}
|
|
1962
1962
|
else {
|
|
@@ -1972,7 +1972,7 @@ const LightningElement = function () {
|
|
|
1972
1972
|
function doAttachShadow(vm) {
|
|
1973
1973
|
const { elm, mode, shadowMode, def: { ctor }, renderer: { attachShadow }, } = vm;
|
|
1974
1974
|
const shadowRoot = attachShadow(elm, {
|
|
1975
|
-
[KEY__SYNTHETIC_MODE]: shadowMode === 1 /* Synthetic */,
|
|
1975
|
+
[KEY__SYNTHETIC_MODE]: shadowMode === 1 /* ShadowMode.Synthetic */,
|
|
1976
1976
|
delegatesFocus: Boolean(ctor.delegatesFocus),
|
|
1977
1977
|
mode,
|
|
1978
1978
|
});
|
|
@@ -2095,7 +2095,7 @@ LightningElement.prototype = {
|
|
|
2095
2095
|
get template() {
|
|
2096
2096
|
const vm = getAssociatedVM(this);
|
|
2097
2097
|
if (process.env.NODE_ENV !== 'production') {
|
|
2098
|
-
if (vm.renderMode === 0 /* Light */) {
|
|
2098
|
+
if (vm.renderMode === 0 /* RenderMode.Light */) {
|
|
2099
2099
|
logError('`this.template` returns null for light DOM components. Since there is no shadow, the rendered content can be accessed via `this` itself. e.g. instead of `this.template.querySelector`, use `this.querySelector`.');
|
|
2100
2100
|
}
|
|
2101
2101
|
}
|
|
@@ -2467,13 +2467,13 @@ function internalWireFieldDecorator(key) {
|
|
|
2467
2467
|
*/
|
|
2468
2468
|
function getClassDescriptorType(descriptor) {
|
|
2469
2469
|
if (isFunction$1(descriptor.value)) {
|
|
2470
|
-
return "method" /* Method */;
|
|
2470
|
+
return "method" /* DescriptorType.Method */;
|
|
2471
2471
|
}
|
|
2472
2472
|
else if (isFunction$1(descriptor.set) || isFunction$1(descriptor.get)) {
|
|
2473
|
-
return "accessor" /* Accessor */;
|
|
2473
|
+
return "accessor" /* DescriptorType.Accessor */;
|
|
2474
2474
|
}
|
|
2475
2475
|
else {
|
|
2476
|
-
return "field" /* Field */;
|
|
2476
|
+
return "field" /* DescriptorType.Field */;
|
|
2477
2477
|
}
|
|
2478
2478
|
}
|
|
2479
2479
|
function validateObservedField(Ctor, fieldName, descriptor) {
|
|
@@ -2482,7 +2482,7 @@ function validateObservedField(Ctor, fieldName, descriptor) {
|
|
|
2482
2482
|
const message = `Invalid observed ${fieldName} field. Found a duplicate ${type} with the same name.`;
|
|
2483
2483
|
// [W-9927596] Ideally we always throw an error when detecting duplicate observed field.
|
|
2484
2484
|
// This branch is only here for backward compatibility reasons.
|
|
2485
|
-
if (type === "accessor" /* Accessor */) {
|
|
2485
|
+
if (type === "accessor" /* DescriptorType.Accessor */) {
|
|
2486
2486
|
logError(message);
|
|
2487
2487
|
}
|
|
2488
2488
|
else {
|
|
@@ -2513,7 +2513,7 @@ function validateFieldDecoratedWithApi(Ctor, fieldName, descriptor) {
|
|
|
2513
2513
|
const message = `Invalid @api ${fieldName} field. Found a duplicate ${type} with the same name.`;
|
|
2514
2514
|
// [W-9927596] Ideally we always throw an error when detecting duplicate public properties.
|
|
2515
2515
|
// This branch is only here for backward compatibility reasons.
|
|
2516
|
-
if (type === "accessor" /* Accessor */) {
|
|
2516
|
+
if (type === "accessor" /* DescriptorType.Accessor */) {
|
|
2517
2517
|
logError(message);
|
|
2518
2518
|
}
|
|
2519
2519
|
else {
|
|
@@ -3118,8 +3118,8 @@ function createComponentDef(Ctor) {
|
|
|
3118
3118
|
// assert.isTrue(ctorName && isString(ctorName), `${toString(Ctor)} should have a "name" property with string value, but found ${ctorName}.`);
|
|
3119
3119
|
assert.isTrue(Ctor.constructor, `Missing ${ctorName}.constructor, ${ctorName} should have a "constructor" property.`);
|
|
3120
3120
|
if (!isUndefined$1(ctorShadowSupportMode)) {
|
|
3121
|
-
assert.invariant(ctorShadowSupportMode === "any" /* Any */ ||
|
|
3122
|
-
ctorShadowSupportMode === "reset" /* Default */, `Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
|
|
3121
|
+
assert.invariant(ctorShadowSupportMode === "any" /* ShadowSupportMode.Any */ ||
|
|
3122
|
+
ctorShadowSupportMode === "reset" /* ShadowSupportMode.Default */, `Invalid value for static property shadowSupportMode: '${ctorShadowSupportMode}'`);
|
|
3123
3123
|
}
|
|
3124
3124
|
if (!isUndefined$1(ctorRenderMode)) {
|
|
3125
3125
|
assert.invariant(ctorRenderMode === 'light' || ctorRenderMode === 'shadow', `Invalid value for static property renderMode: '${ctorRenderMode}'. renderMode must be either 'light' or 'shadow'.`);
|
|
@@ -3147,7 +3147,7 @@ function createComponentDef(Ctor) {
|
|
|
3147
3147
|
}
|
|
3148
3148
|
let renderMode = superDef.renderMode;
|
|
3149
3149
|
if (!isUndefined$1(ctorRenderMode)) {
|
|
3150
|
-
renderMode = ctorRenderMode === 'light' ? 0 /* Light */ : 1 /* Shadow */;
|
|
3150
|
+
renderMode = ctorRenderMode === 'light' ? 0 /* RenderMode.Light */ : 1 /* RenderMode.Shadow */;
|
|
3151
3151
|
}
|
|
3152
3152
|
const template = getComponentRegisteredTemplate(Ctor) || superDef.template;
|
|
3153
3153
|
const name = Ctor.name || superDef.name;
|
|
@@ -3236,8 +3236,8 @@ const lightingElementDef = {
|
|
|
3236
3236
|
props: lightningBasedDescriptors,
|
|
3237
3237
|
propsConfig: EmptyObject,
|
|
3238
3238
|
methods: EmptyObject,
|
|
3239
|
-
renderMode: 1 /* Shadow */,
|
|
3240
|
-
shadowSupportMode: "reset" /* Default */,
|
|
3239
|
+
renderMode: 1 /* RenderMode.Shadow */,
|
|
3240
|
+
shadowSupportMode: "reset" /* ShadowSupportMode.Default */,
|
|
3241
3241
|
wire: EmptyObject,
|
|
3242
3242
|
bridge: BaseBridgeElement,
|
|
3243
3243
|
template: defaultEmptyTemplate,
|
|
@@ -3259,7 +3259,7 @@ function getComponentDef(Ctor) {
|
|
|
3259
3259
|
// avoid leaking the reference to the public props descriptors
|
|
3260
3260
|
publicProps[key] = {
|
|
3261
3261
|
config: propsConfig[key] || 0,
|
|
3262
|
-
type: "any" /* any */,
|
|
3262
|
+
type: "any" /* PropDefType.any */,
|
|
3263
3263
|
attr: htmlPropertyToAttribute(key),
|
|
3264
3264
|
};
|
|
3265
3265
|
}
|
|
@@ -3316,7 +3316,7 @@ function getUpgradableConstructor(tagName, renderer) {
|
|
|
3316
3316
|
*/
|
|
3317
3317
|
function isVBaseElement(vnode) {
|
|
3318
3318
|
const { type } = vnode;
|
|
3319
|
-
return type === 2 /* Element */ || type === 3 /* CustomElement */;
|
|
3319
|
+
return type === 2 /* VNodeType.Element */ || type === 3 /* VNodeType.CustomElement */;
|
|
3320
3320
|
}
|
|
3321
3321
|
function isSameVnode(vnode1, vnode2) {
|
|
3322
3322
|
return vnode1.key === vnode2.key && vnode1.sel === vnode2.sel;
|
|
@@ -3572,21 +3572,21 @@ function patch(n1, n2, renderer) {
|
|
|
3572
3572
|
}
|
|
3573
3573
|
}
|
|
3574
3574
|
switch (n2.type) {
|
|
3575
|
-
case 0 /* Text */:
|
|
3575
|
+
case 0 /* VNodeType.Text */:
|
|
3576
3576
|
// VText has no special capability, fallback to the owner's renderer
|
|
3577
3577
|
patchText(n1, n2, renderer);
|
|
3578
3578
|
break;
|
|
3579
|
-
case 1 /* Comment */:
|
|
3579
|
+
case 1 /* VNodeType.Comment */:
|
|
3580
3580
|
// VComment has no special capability, fallback to the owner's renderer
|
|
3581
3581
|
patchComment(n1, n2, renderer);
|
|
3582
3582
|
break;
|
|
3583
|
-
case 4 /* Static */:
|
|
3583
|
+
case 4 /* VNodeType.Static */:
|
|
3584
3584
|
n2.elm = n1.elm;
|
|
3585
3585
|
break;
|
|
3586
|
-
case 2 /* Element */:
|
|
3586
|
+
case 2 /* VNodeType.Element */:
|
|
3587
3587
|
patchElement(n1, n2, (_a = n2.data.renderer) !== null && _a !== void 0 ? _a : renderer);
|
|
3588
3588
|
break;
|
|
3589
|
-
case 3 /* CustomElement */:
|
|
3589
|
+
case 3 /* VNodeType.CustomElement */:
|
|
3590
3590
|
patchCustomElement(n1, n2, (_b = n2.data.renderer) !== null && _b !== void 0 ? _b : renderer);
|
|
3591
3591
|
break;
|
|
3592
3592
|
}
|
|
@@ -3594,23 +3594,23 @@ function patch(n1, n2, renderer) {
|
|
|
3594
3594
|
function mount(node, parent, renderer, anchor) {
|
|
3595
3595
|
var _a, _b;
|
|
3596
3596
|
switch (node.type) {
|
|
3597
|
-
case 0 /* Text */:
|
|
3597
|
+
case 0 /* VNodeType.Text */:
|
|
3598
3598
|
// VText has no special capability, fallback to the owner's renderer
|
|
3599
3599
|
mountText(node, parent, anchor, renderer);
|
|
3600
3600
|
break;
|
|
3601
|
-
case 1 /* Comment */:
|
|
3601
|
+
case 1 /* VNodeType.Comment */:
|
|
3602
3602
|
// VComment has no special capability, fallback to the owner's renderer
|
|
3603
3603
|
mountComment(node, parent, anchor, renderer);
|
|
3604
3604
|
break;
|
|
3605
|
-
case 4 /* Static */:
|
|
3605
|
+
case 4 /* VNodeType.Static */:
|
|
3606
3606
|
// VStatic cannot have a custom renderer associated to them, using owner's renderer
|
|
3607
3607
|
mountStatic(node, parent, anchor, renderer);
|
|
3608
3608
|
break;
|
|
3609
|
-
case 2 /* Element */:
|
|
3609
|
+
case 2 /* VNodeType.Element */:
|
|
3610
3610
|
// If the vnode data has a renderer override use it, else fallback to owner's renderer
|
|
3611
3611
|
mountElement(node, parent, anchor, (_a = node.data.renderer) !== null && _a !== void 0 ? _a : renderer);
|
|
3612
3612
|
break;
|
|
3613
|
-
case 3 /* CustomElement */:
|
|
3613
|
+
case 3 /* VNodeType.CustomElement */:
|
|
3614
3614
|
// If the vnode data has a renderer override use it, else fallback to owner's renderer
|
|
3615
3615
|
mountCustomElement(node, parent, anchor, (_b = node.data.renderer) !== null && _b !== void 0 ? _b : renderer);
|
|
3616
3616
|
break;
|
|
@@ -3669,12 +3669,12 @@ function mountStatic(vnode, parent, anchor, renderer) {
|
|
|
3669
3669
|
// Marks this node as Static to propagate the shadow resolver. must happen after elm is assigned to the proper shadow
|
|
3670
3670
|
const { renderMode, shadowMode } = owner;
|
|
3671
3671
|
if (isSyntheticShadowDefined) {
|
|
3672
|
-
if (shadowMode === 1 /* Synthetic */ || renderMode === 0 /* Light */) {
|
|
3672
|
+
if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
|
|
3673
3673
|
elm[KEY__SHADOW_STATIC] = true;
|
|
3674
3674
|
}
|
|
3675
3675
|
}
|
|
3676
3676
|
if (process.env.NODE_ENV !== 'production') {
|
|
3677
|
-
const isLight = renderMode === 0 /* Light */;
|
|
3677
|
+
const isLight = renderMode === 0 /* RenderMode.Light */;
|
|
3678
3678
|
patchElementWithRestrictions(elm, { isPortal: false, isLight });
|
|
3679
3679
|
}
|
|
3680
3680
|
insertNode(elm, parent, anchor, renderer);
|
|
@@ -3706,7 +3706,7 @@ function mountCustomElement(vnode, parent, anchor, renderer) {
|
|
|
3706
3706
|
insertNode(elm, parent, anchor, renderer);
|
|
3707
3707
|
if (vm) {
|
|
3708
3708
|
if (process.env.NODE_ENV !== 'production') {
|
|
3709
|
-
assert.isTrue(vm.state === 0 /* created */, `${vm} cannot be recycled.`);
|
|
3709
|
+
assert.isTrue(vm.state === 0 /* VMState.created */, `${vm} cannot be recycled.`);
|
|
3710
3710
|
}
|
|
3711
3711
|
runConnectedCallback(vm);
|
|
3712
3712
|
}
|
|
@@ -3751,14 +3751,14 @@ function unmount(vnode, parent, renderer, doRemove = false) {
|
|
|
3751
3751
|
removeNode(elm, parent, renderer);
|
|
3752
3752
|
}
|
|
3753
3753
|
switch (type) {
|
|
3754
|
-
case 2 /* Element */: {
|
|
3754
|
+
case 2 /* VNodeType.Element */: {
|
|
3755
3755
|
// Slot content is removed to trigger slotchange event when removing slot.
|
|
3756
3756
|
// Only required for synthetic shadow.
|
|
3757
|
-
const shouldRemoveChildren = sel === 'slot' && vnode.owner.shadowMode === 1 /* Synthetic */;
|
|
3757
|
+
const shouldRemoveChildren = sel === 'slot' && vnode.owner.shadowMode === 1 /* ShadowMode.Synthetic */;
|
|
3758
3758
|
unmountVNodes(vnode.children, elm, renderer, shouldRemoveChildren);
|
|
3759
3759
|
break;
|
|
3760
3760
|
}
|
|
3761
|
-
case 3 /* CustomElement */: {
|
|
3761
|
+
case 3 /* VNodeType.CustomElement */: {
|
|
3762
3762
|
const { vm } = vnode;
|
|
3763
3763
|
// No need to unmount the children here, `removeVM` will take care of removing the
|
|
3764
3764
|
// children.
|
|
@@ -3801,7 +3801,7 @@ function linkNodeToShadow(elm, owner, renderer) {
|
|
|
3801
3801
|
const { isSyntheticShadowDefined } = renderer;
|
|
3802
3802
|
// TODO [#1164]: this should eventually be done by the polyfill directly
|
|
3803
3803
|
if (isSyntheticShadowDefined) {
|
|
3804
|
-
if (shadowMode === 1 /* Synthetic */ || renderMode === 0 /* Light */) {
|
|
3804
|
+
if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
|
|
3805
3805
|
elm[KEY__SHADOW_RESOLVER] = renderRoot[KEY__SHADOW_RESOLVER];
|
|
3806
3806
|
}
|
|
3807
3807
|
}
|
|
@@ -3851,12 +3851,12 @@ function patchElementPropsAndAttrs$1(oldVnode, vnode, renderer) {
|
|
|
3851
3851
|
function fallbackElmHook(elm, vnode, renderer) {
|
|
3852
3852
|
const { owner } = vnode;
|
|
3853
3853
|
setScopeTokenClassIfNecessary(elm, owner, renderer);
|
|
3854
|
-
if (owner.shadowMode === 1 /* Synthetic */) {
|
|
3854
|
+
if (owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
3855
3855
|
const { data: { context }, } = vnode;
|
|
3856
3856
|
const { stylesheetToken } = owner.context;
|
|
3857
3857
|
if (!isUndefined$1(context) &&
|
|
3858
3858
|
!isUndefined$1(context.lwc) &&
|
|
3859
|
-
context.lwc.dom === "manual" /* Manual */) {
|
|
3859
|
+
context.lwc.dom === "manual" /* LwcDomMode.Manual */) {
|
|
3860
3860
|
// this element will now accept any manual content inserted into it
|
|
3861
3861
|
observeElementChildNodes(elm);
|
|
3862
3862
|
}
|
|
@@ -3870,8 +3870,8 @@ function fallbackElmHook(elm, vnode, renderer) {
|
|
|
3870
3870
|
const { data: { context }, } = vnode;
|
|
3871
3871
|
const isPortal = !isUndefined$1(context) &&
|
|
3872
3872
|
!isUndefined$1(context.lwc) &&
|
|
3873
|
-
context.lwc.dom === "manual" /* Manual */;
|
|
3874
|
-
const isLight = owner.renderMode === 0 /* Light */;
|
|
3873
|
+
context.lwc.dom === "manual" /* LwcDomMode.Manual */;
|
|
3874
|
+
const isLight = owner.renderMode === 0 /* RenderMode.Light */;
|
|
3875
3875
|
patchElementWithRestrictions(elm, { isPortal, isLight });
|
|
3876
3876
|
}
|
|
3877
3877
|
}
|
|
@@ -3889,7 +3889,7 @@ function allocateChildren(vnode, vm) {
|
|
|
3889
3889
|
const children = vnode.aChildren || vnode.children;
|
|
3890
3890
|
vm.aChildren = children;
|
|
3891
3891
|
const { renderMode, shadowMode } = vm;
|
|
3892
|
-
if (shadowMode === 1 /* Synthetic */ || renderMode === 0 /* Light */) {
|
|
3892
|
+
if (shadowMode === 1 /* ShadowMode.Synthetic */ || renderMode === 0 /* RenderMode.Light */) {
|
|
3893
3893
|
// slow path
|
|
3894
3894
|
allocateInSlot(vm, children);
|
|
3895
3895
|
// save the allocated children in case this vnode is reused.
|
|
@@ -3908,7 +3908,7 @@ function createViewModelHook(elm, vnode, renderer) {
|
|
|
3908
3908
|
}
|
|
3909
3909
|
const { sel, mode, ctor, owner } = vnode;
|
|
3910
3910
|
setScopeTokenClassIfNecessary(elm, owner, renderer);
|
|
3911
|
-
if (owner.shadowMode === 1 /* Synthetic */) {
|
|
3911
|
+
if (owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
3912
3912
|
const { stylesheetToken } = owner.context;
|
|
3913
3913
|
// when running in synthetic shadow mode, we need to set the shadowToken value
|
|
3914
3914
|
// into each element from the template, so they can be styled accordingly.
|
|
@@ -4150,7 +4150,7 @@ function addVNodeToChildLWC(vnode) {
|
|
|
4150
4150
|
// [st]atic node
|
|
4151
4151
|
function st(fragment, key) {
|
|
4152
4152
|
return {
|
|
4153
|
-
type: 4 /* Static */,
|
|
4153
|
+
type: 4 /* VNodeType.Static */,
|
|
4154
4154
|
sel: undefined,
|
|
4155
4155
|
key,
|
|
4156
4156
|
elm: undefined,
|
|
@@ -4184,7 +4184,7 @@ function h(sel, data, children = EmptyArray) {
|
|
|
4184
4184
|
let elm;
|
|
4185
4185
|
const { key } = data;
|
|
4186
4186
|
return {
|
|
4187
|
-
type: 2 /* Element */,
|
|
4187
|
+
type: 2 /* VNodeType.Element */,
|
|
4188
4188
|
sel,
|
|
4189
4189
|
data,
|
|
4190
4190
|
children,
|
|
@@ -4221,11 +4221,11 @@ function s(slotName, data, children, slotset) {
|
|
|
4221
4221
|
}
|
|
4222
4222
|
const vmBeingRendered = getVMBeingRendered();
|
|
4223
4223
|
const { renderMode, shadowMode } = vmBeingRendered;
|
|
4224
|
-
if (renderMode === 0 /* Light */) {
|
|
4224
|
+
if (renderMode === 0 /* RenderMode.Light */) {
|
|
4225
4225
|
sc(children);
|
|
4226
4226
|
return children;
|
|
4227
4227
|
}
|
|
4228
|
-
if (shadowMode === 1 /* Synthetic */) {
|
|
4228
|
+
if (shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
4229
4229
|
// TODO [#1276]: compiler should give us some sort of indicator when a vnodes collection is dynamic
|
|
4230
4230
|
sc(children);
|
|
4231
4231
|
}
|
|
@@ -4259,7 +4259,7 @@ function c(sel, Ctor, data, children = EmptyArray) {
|
|
|
4259
4259
|
const { key } = data;
|
|
4260
4260
|
let elm, aChildren, vm;
|
|
4261
4261
|
const vnode = {
|
|
4262
|
-
type: 3 /* CustomElement */,
|
|
4262
|
+
type: 3 /* VNodeType.CustomElement */,
|
|
4263
4263
|
sel,
|
|
4264
4264
|
data,
|
|
4265
4265
|
children,
|
|
@@ -4367,7 +4367,7 @@ function f(items) {
|
|
|
4367
4367
|
function t(text) {
|
|
4368
4368
|
let sel, key, elm;
|
|
4369
4369
|
return {
|
|
4370
|
-
type: 0 /* Text */,
|
|
4370
|
+
type: 0 /* VNodeType.Text */,
|
|
4371
4371
|
sel,
|
|
4372
4372
|
text,
|
|
4373
4373
|
elm,
|
|
@@ -4379,7 +4379,7 @@ function t(text) {
|
|
|
4379
4379
|
function co(text) {
|
|
4380
4380
|
let sel, key, elm;
|
|
4381
4381
|
return {
|
|
4382
|
-
type: 1 /* Comment */,
|
|
4382
|
+
type: 1 /* VNodeType.Comment */,
|
|
4383
4383
|
sel,
|
|
4384
4384
|
text,
|
|
4385
4385
|
elm,
|
|
@@ -4428,7 +4428,7 @@ function gid(id) {
|
|
|
4428
4428
|
return null;
|
|
4429
4429
|
}
|
|
4430
4430
|
const { idx, shadowMode } = vmBeingRendered;
|
|
4431
|
-
if (shadowMode === 1 /* Synthetic */) {
|
|
4431
|
+
if (shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
4432
4432
|
return StringReplace.call(id, /\S+/g, (id) => `${id}-${idx}`);
|
|
4433
4433
|
}
|
|
4434
4434
|
return id;
|
|
@@ -4450,7 +4450,7 @@ function fid(url) {
|
|
|
4450
4450
|
}
|
|
4451
4451
|
const { idx, shadowMode } = vmBeingRendered;
|
|
4452
4452
|
// Apply transformation only for fragment-only-urls, and only in shadow DOM
|
|
4453
|
-
if (shadowMode === 1 /* Synthetic */ && /^#/.test(url)) {
|
|
4453
|
+
if (shadowMode === 1 /* ShadowMode.Synthetic */ && /^#/.test(url)) {
|
|
4454
4454
|
return `${url}-${idx}`;
|
|
4455
4455
|
}
|
|
4456
4456
|
return url;
|
|
@@ -4573,7 +4573,7 @@ function createInlineStyleVNode(content) {
|
|
|
4573
4573
|
function updateStylesheetToken(vm, template) {
|
|
4574
4574
|
const { elm, context, renderMode, shadowMode, renderer: { getClassList, removeAttribute, setAttribute }, } = vm;
|
|
4575
4575
|
const { stylesheets: newStylesheets, stylesheetToken: newStylesheetToken } = template;
|
|
4576
|
-
const isSyntheticShadow = renderMode === 1 /* Shadow */ && shadowMode === 1 /* Synthetic */;
|
|
4576
|
+
const isSyntheticShadow = renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */;
|
|
4577
4577
|
const { hasScopedStyles } = context;
|
|
4578
4578
|
let newToken;
|
|
4579
4579
|
let newHasTokenInClass;
|
|
@@ -4629,19 +4629,19 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
|
4629
4629
|
const isScopedCss = stylesheet[KEY__SCOPED_CSS];
|
|
4630
4630
|
// Apply the scope token only if the stylesheet itself is scoped, or if we're rendering synthetic shadow.
|
|
4631
4631
|
const scopeToken = isScopedCss ||
|
|
4632
|
-
(vm.shadowMode === 1 /* Synthetic */ && vm.renderMode === 1 /* Shadow */)
|
|
4632
|
+
(vm.shadowMode === 1 /* ShadowMode.Synthetic */ && vm.renderMode === 1 /* RenderMode.Shadow */)
|
|
4633
4633
|
? stylesheetToken
|
|
4634
4634
|
: undefined;
|
|
4635
4635
|
// Use the actual `:host` selector if we're rendering global CSS for light DOM, or if we're rendering
|
|
4636
4636
|
// native shadow DOM. Synthetic shadow DOM never uses `:host`.
|
|
4637
|
-
const useActualHostSelector = vm.renderMode === 0 /* Light */
|
|
4637
|
+
const useActualHostSelector = vm.renderMode === 0 /* RenderMode.Light */
|
|
4638
4638
|
? !isScopedCss
|
|
4639
|
-
: vm.shadowMode === 0 /* Native */;
|
|
4639
|
+
: vm.shadowMode === 0 /* ShadowMode.Native */;
|
|
4640
4640
|
// Use the native :dir() pseudoclass only in native shadow DOM. Otherwise, in synthetic shadow,
|
|
4641
4641
|
// we use an attribute selector on the host to simulate :dir().
|
|
4642
4642
|
let useNativeDirPseudoclass;
|
|
4643
|
-
if (vm.renderMode === 1 /* Shadow */) {
|
|
4644
|
-
useNativeDirPseudoclass = vm.shadowMode === 0 /* Native */;
|
|
4643
|
+
if (vm.renderMode === 1 /* RenderMode.Shadow */) {
|
|
4644
|
+
useNativeDirPseudoclass = vm.shadowMode === 0 /* ShadowMode.Native */;
|
|
4645
4645
|
}
|
|
4646
4646
|
else {
|
|
4647
4647
|
// Light DOM components should only render `[dir]` if they're inside of a synthetic shadow root.
|
|
@@ -4650,7 +4650,7 @@ function evaluateStylesheetsContent(stylesheets, stylesheetToken, vm) {
|
|
|
4650
4650
|
// Only calculate the root once as necessary
|
|
4651
4651
|
root = getNearestShadowComponent(vm);
|
|
4652
4652
|
}
|
|
4653
|
-
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* Native */;
|
|
4653
|
+
useNativeDirPseudoclass = isNull(root) || root.shadowMode === 0 /* ShadowMode.Native */;
|
|
4654
4654
|
}
|
|
4655
4655
|
ArrayPush$1.call(content, stylesheet(scopeToken, useActualHostSelector, useNativeDirPseudoclass));
|
|
4656
4656
|
}
|
|
@@ -4671,7 +4671,7 @@ function getStylesheetsContent(vm, template) {
|
|
|
4671
4671
|
function getNearestShadowComponent(vm) {
|
|
4672
4672
|
let owner = vm;
|
|
4673
4673
|
while (!isNull(owner)) {
|
|
4674
|
-
if (owner.renderMode === 1 /* Shadow */) {
|
|
4674
|
+
if (owner.renderMode === 1 /* RenderMode.Shadow */) {
|
|
4675
4675
|
return owner;
|
|
4676
4676
|
}
|
|
4677
4677
|
owner = owner.owner;
|
|
@@ -4680,7 +4680,7 @@ function getNearestShadowComponent(vm) {
|
|
|
4680
4680
|
}
|
|
4681
4681
|
function getNearestNativeShadowComponent(vm) {
|
|
4682
4682
|
const owner = getNearestShadowComponent(vm);
|
|
4683
|
-
if (!isNull(owner) && owner.shadowMode === 1 /* Synthetic */) {
|
|
4683
|
+
if (!isNull(owner) && owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
4684
4684
|
// Synthetic-within-native is impossible. So if the nearest shadow component is
|
|
4685
4685
|
// synthetic, we know we won't find a native component if we go any further.
|
|
4686
4686
|
return null;
|
|
@@ -4689,7 +4689,7 @@ function getNearestNativeShadowComponent(vm) {
|
|
|
4689
4689
|
}
|
|
4690
4690
|
function createStylesheet(vm, stylesheets) {
|
|
4691
4691
|
const { renderMode, shadowMode, renderer: { ssr, insertStylesheet }, } = vm;
|
|
4692
|
-
if (renderMode === 1 /* Shadow */ && shadowMode === 1 /* Synthetic */) {
|
|
4692
|
+
if (renderMode === 1 /* RenderMode.Shadow */ && shadowMode === 1 /* ShadowMode.Synthetic */) {
|
|
4693
4693
|
for (let i = 0; i < stylesheets.length; i++) {
|
|
4694
4694
|
insertStylesheet(stylesheets[i]);
|
|
4695
4695
|
}
|
|
@@ -4814,11 +4814,11 @@ function validateSlots(vm, html) {
|
|
|
4814
4814
|
const { cmpSlots } = vm;
|
|
4815
4815
|
const { slots = EmptyArray } = html;
|
|
4816
4816
|
for (const slotName in cmpSlots) {
|
|
4817
|
-
// eslint-disable-next-line lwc-internal/no-production-assert
|
|
4817
|
+
// eslint-disable-next-line @lwc/lwc-internal/no-production-assert
|
|
4818
4818
|
assert.isTrue(isArray$1(cmpSlots[slotName]), `Slots can only be set to an array, instead received ${toString$1(cmpSlots[slotName])} for slot "${slotName}" in ${vm}.`);
|
|
4819
4819
|
if (slotName !== '' && ArrayIndexOf.call(slots, slotName) === -1) {
|
|
4820
4820
|
// TODO [#1297]: this should never really happen because the compiler should always validate
|
|
4821
|
-
// eslint-disable-next-line lwc-internal/no-production-assert
|
|
4821
|
+
// eslint-disable-next-line @lwc/lwc-internal/no-production-assert
|
|
4822
4822
|
logError(`Ignoring unknown provided slot name "${slotName}" in ${vm}. Check for a typo on the slot attribute.`, vm);
|
|
4823
4823
|
}
|
|
4824
4824
|
}
|
|
@@ -4826,7 +4826,7 @@ function validateSlots(vm, html) {
|
|
|
4826
4826
|
function validateLightDomTemplate(template, vm) {
|
|
4827
4827
|
if (template === defaultEmptyTemplate)
|
|
4828
4828
|
return;
|
|
4829
|
-
if (vm.renderMode === 0 /* Light */) {
|
|
4829
|
+
if (vm.renderMode === 0 /* RenderMode.Light */) {
|
|
4830
4830
|
assert.isTrue(template.renderMode === 'light', `Light DOM components can't render shadow DOM templates. Add an 'lwc:render-mode="light"' directive to the root template tag of ${getComponentTag(vm)}.`);
|
|
4831
4831
|
}
|
|
4832
4832
|
else {
|
|
@@ -4839,13 +4839,13 @@ function buildParseFragmentFn(createFragmentFn) {
|
|
|
4839
4839
|
return function () {
|
|
4840
4840
|
const { context: { hasScopedStyles, stylesheetToken }, shadowMode, renderer, } = getVMBeingRendered();
|
|
4841
4841
|
const hasStyleToken = !isUndefined$1(stylesheetToken);
|
|
4842
|
-
const isSyntheticShadow = shadowMode === 1 /* Synthetic */;
|
|
4842
|
+
const isSyntheticShadow = shadowMode === 1 /* ShadowMode.Synthetic */;
|
|
4843
4843
|
let cacheKey = 0;
|
|
4844
4844
|
if (hasStyleToken && hasScopedStyles) {
|
|
4845
|
-
cacheKey |= 1 /* HAS_SCOPED_STYLE */;
|
|
4845
|
+
cacheKey |= 1 /* FragmentCache.HAS_SCOPED_STYLE */;
|
|
4846
4846
|
}
|
|
4847
4847
|
if (hasStyleToken && isSyntheticShadow) {
|
|
4848
|
-
cacheKey |= 2 /* SHADOW_MODE_SYNTHETIC */;
|
|
4848
|
+
cacheKey |= 2 /* FragmentCache.SHADOW_MODE_SYNTHETIC */;
|
|
4849
4849
|
}
|
|
4850
4850
|
if (!isUndefined$1(cache[cacheKey])) {
|
|
4851
4851
|
return cache[cacheKey];
|
|
@@ -4895,7 +4895,7 @@ function evaluateTemplate(vm, html) {
|
|
|
4895
4895
|
runWithBoundaryProtection(vm, vm.owner, () => {
|
|
4896
4896
|
// pre
|
|
4897
4897
|
vmBeingRendered = vm;
|
|
4898
|
-
logOperationStart(1 /* Render */, vm);
|
|
4898
|
+
logOperationStart(1 /* OperationId.Render */, vm);
|
|
4899
4899
|
}, () => {
|
|
4900
4900
|
// job
|
|
4901
4901
|
const { component, context, cmpSlots, cmpTemplate, tro } = vm;
|
|
@@ -4953,7 +4953,7 @@ function evaluateTemplate(vm, html) {
|
|
|
4953
4953
|
// post
|
|
4954
4954
|
isUpdatingTemplate = isUpdatingTemplateInception;
|
|
4955
4955
|
vmBeingRendered = vmOfTemplateBeingUpdatedInception;
|
|
4956
|
-
logOperationEnd(1 /* Render */, vm);
|
|
4956
|
+
logOperationEnd(1 /* OperationId.Render */, vm);
|
|
4957
4957
|
});
|
|
4958
4958
|
if (process.env.NODE_ENV !== 'production') {
|
|
4959
4959
|
assert.invariant(isArray$1(vnodes), `Compiler should produce html functions that always return an array.`);
|
|
@@ -4992,7 +4992,7 @@ function invokeComponentCallback(vm, fn, args) {
|
|
|
4992
4992
|
function invokeComponentConstructor(vm, Ctor) {
|
|
4993
4993
|
const vmBeingConstructedInception = vmBeingConstructed;
|
|
4994
4994
|
let error;
|
|
4995
|
-
logOperationStart(0 /* Constructor */, vm);
|
|
4995
|
+
logOperationStart(0 /* OperationId.Constructor */, vm);
|
|
4996
4996
|
vmBeingConstructed = vm;
|
|
4997
4997
|
/**
|
|
4998
4998
|
* Constructors don't need to be wrapped with a boundary because for root elements
|
|
@@ -5014,7 +5014,7 @@ function invokeComponentConstructor(vm, Ctor) {
|
|
|
5014
5014
|
error = Object(e);
|
|
5015
5015
|
}
|
|
5016
5016
|
finally {
|
|
5017
|
-
logOperationEnd(0 /* Constructor */, vm);
|
|
5017
|
+
logOperationEnd(0 /* OperationId.Constructor */, vm);
|
|
5018
5018
|
vmBeingConstructed = vmBeingConstructedInception;
|
|
5019
5019
|
if (!isUndefined$1(error)) {
|
|
5020
5020
|
addErrorComponentStack(vm, error);
|
|
@@ -5195,12 +5195,12 @@ function rerenderVM(vm) {
|
|
|
5195
5195
|
function connectRootElement(elm) {
|
|
5196
5196
|
const vm = getAssociatedVM(elm);
|
|
5197
5197
|
logGlobalOperationStart(7
|
|
5198
|
-
/* GlobalHydrate */
|
|
5198
|
+
/* OperationId.GlobalHydrate */
|
|
5199
5199
|
, vm); // Usually means moving the element from one place to another, which is observable via
|
|
5200
5200
|
// life-cycle hooks.
|
|
5201
5201
|
|
|
5202
5202
|
if (vm.state === 1
|
|
5203
|
-
/* connected */
|
|
5203
|
+
/* VMState.connected */
|
|
5204
5204
|
) {
|
|
5205
5205
|
disconnectRootElement(elm);
|
|
5206
5206
|
}
|
|
@@ -5208,7 +5208,7 @@ function connectRootElement(elm) {
|
|
|
5208
5208
|
runConnectedCallback(vm);
|
|
5209
5209
|
rehydrate(vm);
|
|
5210
5210
|
logGlobalOperationEnd(7
|
|
5211
|
-
/* GlobalHydrate */
|
|
5211
|
+
/* OperationId.GlobalHydrate */
|
|
5212
5212
|
, vm);
|
|
5213
5213
|
}
|
|
5214
5214
|
function disconnectRootElement(elm) {
|
|
@@ -5226,7 +5226,7 @@ function resetComponentStateWhenRemoved(vm) {
|
|
|
5226
5226
|
} = vm;
|
|
5227
5227
|
|
|
5228
5228
|
if (state !== 2
|
|
5229
|
-
/* disconnected */
|
|
5229
|
+
/* VMState.disconnected */
|
|
5230
5230
|
) {
|
|
5231
5231
|
const {
|
|
5232
5232
|
oar,
|
|
@@ -5255,9 +5255,9 @@ function resetComponentStateWhenRemoved(vm) {
|
|
|
5255
5255
|
function removeVM(vm) {
|
|
5256
5256
|
if (process.env.NODE_ENV !== 'production') {
|
|
5257
5257
|
assert.isTrue(vm.state === 1
|
|
5258
|
-
/* connected */
|
|
5258
|
+
/* VMState.connected */
|
|
5259
5259
|
|| vm.state === 2
|
|
5260
|
-
/* disconnected */
|
|
5260
|
+
/* VMState.disconnected */
|
|
5261
5261
|
, `${vm} must have been connected.`);
|
|
5262
5262
|
}
|
|
5263
5263
|
|
|
@@ -5268,7 +5268,7 @@ function getNearestShadowAncestor(vm) {
|
|
|
5268
5268
|
let ancestor = vm.owner;
|
|
5269
5269
|
|
|
5270
5270
|
while (!isNull(ancestor) && ancestor.renderMode === 0
|
|
5271
|
-
/* Light */
|
|
5271
|
+
/* RenderMode.Light */
|
|
5272
5272
|
) {
|
|
5273
5273
|
ancestor = ancestor.owner;
|
|
5274
5274
|
}
|
|
@@ -5289,7 +5289,7 @@ function createVM(elm, ctor, renderer, options) {
|
|
|
5289
5289
|
def,
|
|
5290
5290
|
idx: idx++,
|
|
5291
5291
|
state: 0
|
|
5292
|
-
/* created */
|
|
5292
|
+
/* VMState.created */
|
|
5293
5293
|
,
|
|
5294
5294
|
isScheduled: false,
|
|
5295
5295
|
isDirty: true,
|
|
@@ -5338,7 +5338,7 @@ function createVM(elm, ctor, renderer, options) {
|
|
|
5338
5338
|
|
|
5339
5339
|
if (runtimeFlags.ENABLE_FORCE_NATIVE_SHADOW_MODE_FOR_TEST) {
|
|
5340
5340
|
vm.shadowMode = 0
|
|
5341
|
-
/* Native */
|
|
5341
|
+
/* ShadowMode.Native */
|
|
5342
5342
|
;
|
|
5343
5343
|
}
|
|
5344
5344
|
} // Create component instance associated to the vm and the element.
|
|
@@ -5365,57 +5365,57 @@ function computeShadowMode(vm, renderer) {
|
|
|
5365
5365
|
|
|
5366
5366
|
if (isSyntheticShadowDefined) {
|
|
5367
5367
|
if (def.renderMode === 0
|
|
5368
|
-
/* Light */
|
|
5368
|
+
/* RenderMode.Light */
|
|
5369
5369
|
) {
|
|
5370
5370
|
// ShadowMode.Native implies "not synthetic shadow" which is consistent with how
|
|
5371
5371
|
// everything defaults to native when the synthetic shadow polyfill is unavailable.
|
|
5372
5372
|
shadowMode = 0
|
|
5373
|
-
/* Native */
|
|
5373
|
+
/* ShadowMode.Native */
|
|
5374
5374
|
;
|
|
5375
5375
|
} else if (isNativeShadowDefined) {
|
|
5376
5376
|
// Not combined with above condition because @lwc/features only supports identifiers in
|
|
5377
5377
|
// the if-condition.
|
|
5378
5378
|
if (runtimeFlags.ENABLE_MIXED_SHADOW_MODE) {
|
|
5379
5379
|
if (def.shadowSupportMode === "any"
|
|
5380
|
-
/* Any */
|
|
5380
|
+
/* ShadowSupportMode.Any */
|
|
5381
5381
|
) {
|
|
5382
5382
|
shadowMode = 0
|
|
5383
|
-
/* Native */
|
|
5383
|
+
/* ShadowMode.Native */
|
|
5384
5384
|
;
|
|
5385
5385
|
} else {
|
|
5386
5386
|
const shadowAncestor = getNearestShadowAncestor(vm);
|
|
5387
5387
|
|
|
5388
5388
|
if (!isNull(shadowAncestor) && shadowAncestor.shadowMode === 0
|
|
5389
|
-
/* Native */
|
|
5389
|
+
/* ShadowMode.Native */
|
|
5390
5390
|
) {
|
|
5391
5391
|
// Transitive support for native Shadow DOM. A component in native mode
|
|
5392
5392
|
// transitively opts all of its descendants into native.
|
|
5393
5393
|
shadowMode = 0
|
|
5394
|
-
/* Native */
|
|
5394
|
+
/* ShadowMode.Native */
|
|
5395
5395
|
;
|
|
5396
5396
|
} else {
|
|
5397
5397
|
// Synthetic if neither this component nor any of its ancestors are configured
|
|
5398
5398
|
// to be native.
|
|
5399
5399
|
shadowMode = 1
|
|
5400
|
-
/* Synthetic */
|
|
5400
|
+
/* ShadowMode.Synthetic */
|
|
5401
5401
|
;
|
|
5402
5402
|
}
|
|
5403
5403
|
}
|
|
5404
5404
|
} else {
|
|
5405
5405
|
shadowMode = 1
|
|
5406
|
-
/* Synthetic */
|
|
5406
|
+
/* ShadowMode.Synthetic */
|
|
5407
5407
|
;
|
|
5408
5408
|
}
|
|
5409
5409
|
} else {
|
|
5410
5410
|
// Synthetic if there is no native Shadow DOM support.
|
|
5411
5411
|
shadowMode = 1
|
|
5412
|
-
/* Synthetic */
|
|
5412
|
+
/* ShadowMode.Synthetic */
|
|
5413
5413
|
;
|
|
5414
5414
|
}
|
|
5415
5415
|
} else {
|
|
5416
5416
|
// Native if the synthetic shadow polyfill is unavailable.
|
|
5417
5417
|
shadowMode = 0
|
|
5418
|
-
/* Native */
|
|
5418
|
+
/* ShadowMode.Native */
|
|
5419
5419
|
;
|
|
5420
5420
|
}
|
|
5421
5421
|
|
|
@@ -5475,7 +5475,7 @@ function patchShadowRoot(vm, newCh) {
|
|
|
5475
5475
|
runWithBoundaryProtection(vm, vm, () => {
|
|
5476
5476
|
// pre
|
|
5477
5477
|
logOperationStart(2
|
|
5478
|
-
/* Patch */
|
|
5478
|
+
/* OperationId.Patch */
|
|
5479
5479
|
, vm);
|
|
5480
5480
|
}, () => {
|
|
5481
5481
|
// job
|
|
@@ -5483,14 +5483,14 @@ function patchShadowRoot(vm, newCh) {
|
|
|
5483
5483
|
}, () => {
|
|
5484
5484
|
// post
|
|
5485
5485
|
logOperationEnd(2
|
|
5486
|
-
/* Patch */
|
|
5486
|
+
/* OperationId.Patch */
|
|
5487
5487
|
, vm);
|
|
5488
5488
|
});
|
|
5489
5489
|
}
|
|
5490
5490
|
}
|
|
5491
5491
|
|
|
5492
5492
|
if (vm.state === 1
|
|
5493
|
-
/* connected */
|
|
5493
|
+
/* VMState.connected */
|
|
5494
5494
|
) {
|
|
5495
5495
|
// If the element is connected, that means connectedCallback was already issued, and
|
|
5496
5496
|
// any successive rendering should finish with the call to renderedCallback, otherwise
|
|
@@ -5524,11 +5524,11 @@ function runRenderedCallback(vm) {
|
|
|
5524
5524
|
|
|
5525
5525
|
if (!isUndefined$1(renderedCallback)) {
|
|
5526
5526
|
logOperationStart(4
|
|
5527
|
-
/* RenderedCallback */
|
|
5527
|
+
/* OperationId.RenderedCallback */
|
|
5528
5528
|
, vm);
|
|
5529
5529
|
invokeComponentCallback(vm, renderedCallback);
|
|
5530
5530
|
logOperationEnd(4
|
|
5531
|
-
/* RenderedCallback */
|
|
5531
|
+
/* OperationId.RenderedCallback */
|
|
5532
5532
|
, vm);
|
|
5533
5533
|
}
|
|
5534
5534
|
}
|
|
@@ -5536,7 +5536,7 @@ let rehydrateQueue = [];
|
|
|
5536
5536
|
|
|
5537
5537
|
function flushRehydrationQueue() {
|
|
5538
5538
|
logGlobalOperationStart(8
|
|
5539
|
-
/* GlobalRehydrate */
|
|
5539
|
+
/* OperationId.GlobalRehydrate */
|
|
5540
5540
|
);
|
|
5541
5541
|
|
|
5542
5542
|
if (process.env.NODE_ENV !== 'production') {
|
|
@@ -5563,7 +5563,7 @@ function flushRehydrationQueue() {
|
|
|
5563
5563
|
|
|
5564
5564
|
|
|
5565
5565
|
logGlobalOperationEnd(8
|
|
5566
|
-
/* GlobalRehydrate */
|
|
5566
|
+
/* OperationId.GlobalRehydrate */
|
|
5567
5567
|
); // re-throwing the original error will break the current tick, but since the next tick is
|
|
5568
5568
|
// already scheduled, it should continue patching the rest.
|
|
5569
5569
|
|
|
@@ -5572,7 +5572,7 @@ function flushRehydrationQueue() {
|
|
|
5572
5572
|
}
|
|
5573
5573
|
|
|
5574
5574
|
logGlobalOperationEnd(8
|
|
5575
|
-
/* GlobalRehydrate */
|
|
5575
|
+
/* OperationId.GlobalRehydrate */
|
|
5576
5576
|
);
|
|
5577
5577
|
}
|
|
5578
5578
|
|
|
@@ -5582,13 +5582,13 @@ function runConnectedCallback(vm) {
|
|
|
5582
5582
|
} = vm;
|
|
5583
5583
|
|
|
5584
5584
|
if (state === 1
|
|
5585
|
-
/* connected */
|
|
5585
|
+
/* VMState.connected */
|
|
5586
5586
|
) {
|
|
5587
5587
|
return; // nothing to do since it was already connected
|
|
5588
5588
|
}
|
|
5589
5589
|
|
|
5590
5590
|
vm.state = 1
|
|
5591
|
-
/* connected */
|
|
5591
|
+
/* VMState.connected */
|
|
5592
5592
|
; // reporting connection
|
|
5593
5593
|
|
|
5594
5594
|
const {
|
|
@@ -5609,11 +5609,11 @@ function runConnectedCallback(vm) {
|
|
|
5609
5609
|
|
|
5610
5610
|
if (!isUndefined$1(connectedCallback)) {
|
|
5611
5611
|
logOperationStart(3
|
|
5612
|
-
/* ConnectedCallback */
|
|
5612
|
+
/* OperationId.ConnectedCallback */
|
|
5613
5613
|
, vm);
|
|
5614
5614
|
invokeComponentCallback(vm, connectedCallback);
|
|
5615
5615
|
logOperationEnd(3
|
|
5616
|
-
/* ConnectedCallback */
|
|
5616
|
+
/* OperationId.ConnectedCallback */
|
|
5617
5617
|
, vm);
|
|
5618
5618
|
}
|
|
5619
5619
|
}
|
|
@@ -5625,7 +5625,7 @@ function hasWireAdapters(vm) {
|
|
|
5625
5625
|
function runDisconnectedCallback(vm) {
|
|
5626
5626
|
if (process.env.NODE_ENV !== 'production') {
|
|
5627
5627
|
assert.isTrue(vm.state !== 2
|
|
5628
|
-
/* disconnected */
|
|
5628
|
+
/* VMState.disconnected */
|
|
5629
5629
|
, `${vm} must be inserted.`);
|
|
5630
5630
|
}
|
|
5631
5631
|
|
|
@@ -5638,7 +5638,7 @@ function runDisconnectedCallback(vm) {
|
|
|
5638
5638
|
}
|
|
5639
5639
|
|
|
5640
5640
|
vm.state = 2
|
|
5641
|
-
/* disconnected */
|
|
5641
|
+
/* VMState.disconnected */
|
|
5642
5642
|
; // reporting disconnection
|
|
5643
5643
|
|
|
5644
5644
|
const {
|
|
@@ -5659,11 +5659,11 @@ function runDisconnectedCallback(vm) {
|
|
|
5659
5659
|
|
|
5660
5660
|
if (!isUndefined$1(disconnectedCallback)) {
|
|
5661
5661
|
logOperationStart(5
|
|
5662
|
-
/* DisconnectedCallback */
|
|
5662
|
+
/* OperationId.DisconnectedCallback */
|
|
5663
5663
|
, vm);
|
|
5664
5664
|
invokeComponentCallback(vm, disconnectedCallback);
|
|
5665
5665
|
logOperationEnd(5
|
|
5666
|
-
/* DisconnectedCallback */
|
|
5666
|
+
/* OperationId.DisconnectedCallback */
|
|
5667
5667
|
, vm);
|
|
5668
5668
|
}
|
|
5669
5669
|
}
|
|
@@ -5719,13 +5719,13 @@ function recursivelyDisconnectChildren(vnodes) {
|
|
|
5719
5719
|
if (!isNull(vnode) && !isUndefined$1(vnode.elm)) {
|
|
5720
5720
|
switch (vnode.type) {
|
|
5721
5721
|
case 2
|
|
5722
|
-
/* Element */
|
|
5722
|
+
/* VNodeType.Element */
|
|
5723
5723
|
:
|
|
5724
5724
|
recursivelyDisconnectChildren(vnode.children);
|
|
5725
5725
|
break;
|
|
5726
5726
|
|
|
5727
5727
|
case 3
|
|
5728
|
-
/* CustomElement */
|
|
5728
|
+
/* VNodeType.CustomElement */
|
|
5729
5729
|
:
|
|
5730
5730
|
{
|
|
5731
5731
|
const vm = getAssociatedVM(vnode.elm);
|
|
@@ -5816,13 +5816,13 @@ function runWithBoundaryProtection(vm, owner, pre, job, post) {
|
|
|
5816
5816
|
resetComponentRoot(vm); // remove offenders
|
|
5817
5817
|
|
|
5818
5818
|
logOperationStart(6
|
|
5819
|
-
/* ErrorCallback */
|
|
5819
|
+
/* OperationId.ErrorCallback */
|
|
5820
5820
|
, vm); // error boundaries must have an ErrorCallback
|
|
5821
5821
|
|
|
5822
5822
|
const errorCallback = errorBoundaryVm.def.errorCallback;
|
|
5823
5823
|
invokeComponentCallback(errorBoundaryVm, errorCallback, [error, error.wcStack]);
|
|
5824
5824
|
logOperationEnd(6
|
|
5825
|
-
/* ErrorCallback */
|
|
5825
|
+
/* OperationId.ErrorCallback */
|
|
5826
5826
|
, vm);
|
|
5827
5827
|
}
|
|
5828
5828
|
}
|
|
@@ -5900,7 +5900,7 @@ function createConfigWatcher(component, configCallback, callbackWhenConfigIsRead
|
|
|
5900
5900
|
|
|
5901
5901
|
const computeConfigAndUpdate = () => {
|
|
5902
5902
|
let config;
|
|
5903
|
-
ro.observe(() => config = configCallback(component)); // eslint-disable-next-line lwc-internal/no-invalid-todo
|
|
5903
|
+
ro.observe(() => config = configCallback(component)); // eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
|
|
5904
5904
|
// TODO: dev-mode validation of config based on the adapter.configSchema
|
|
5905
5905
|
// @ts-ignore it is assigned in the observe() callback
|
|
5906
5906
|
|
|
@@ -5942,7 +5942,7 @@ function createContextWatcher(vm, wireDef, callbackWhenContextIsReady) {
|
|
|
5942
5942
|
// guarantee that the linkage can be forged.
|
|
5943
5943
|
const contextRegistrationEvent = new WireContextRegistrationEvent(adapterContextToken, {
|
|
5944
5944
|
setNewContext(newContext) {
|
|
5945
|
-
// eslint-disable-next-line lwc-internal/no-invalid-todo
|
|
5945
|
+
// eslint-disable-next-line @lwc/lwc-internal/no-invalid-todo
|
|
5946
5946
|
// TODO: dev-mode validation of config based on the adapter.contextSchema
|
|
5947
5947
|
callbackWhenContextIsReady(newContext);
|
|
5948
5948
|
},
|
|
@@ -6006,7 +6006,7 @@ function createConnector(vm, name, wireDef) {
|
|
|
6006
6006
|
// (ever), while context can have identity
|
|
6007
6007
|
|
|
6008
6008
|
if (vm.state === 1
|
|
6009
|
-
/* connected */
|
|
6009
|
+
/* VMState.connected */
|
|
6010
6010
|
) {
|
|
6011
6011
|
computeConfigAndUpdate();
|
|
6012
6012
|
}
|
|
@@ -6294,7 +6294,7 @@ function freezeTemplate(tmpl) {
|
|
|
6294
6294
|
});
|
|
6295
6295
|
}
|
|
6296
6296
|
}
|
|
6297
|
-
/* version: 2.
|
|
6297
|
+
/* version: 2.19.1 */
|
|
6298
6298
|
|
|
6299
6299
|
/*
|
|
6300
6300
|
* Copyright (c) 2020, salesforce.com, inc.
|
|
@@ -6747,7 +6747,7 @@ function renderComponent(tagName, Ctor, props = {}) {
|
|
|
6747
6747
|
*/
|
|
6748
6748
|
freeze(LightningElement);
|
|
6749
6749
|
seal(LightningElement.prototype);
|
|
6750
|
-
/* version: 2.
|
|
6750
|
+
/* version: 2.19.1 */
|
|
6751
6751
|
|
|
6752
6752
|
exports.LightningElement = LightningElement;
|
|
6753
6753
|
exports.api = api$1;
|