lwc 2.21.0 → 2.23.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/engine-dom/esm/es2017/engine-dom.js +234 -236
- package/dist/engine-dom/iife/es2017/engine-dom.js +234 -236
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +221 -224
- package/dist/engine-dom/iife/es5/engine-dom.js +282 -265
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +257 -237
- package/dist/engine-dom/umd/es2017/engine-dom.js +234 -236
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +221 -224
- package/dist/engine-dom/umd/es5/engine-dom.js +282 -265
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +257 -237
- package/dist/engine-server/commonjs/es2017/engine-server.js +138 -445
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +138 -445
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +13 -10
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +13 -10
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +13 -10
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +15 -14
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +15 -14
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +13 -10
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +13 -10
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +15 -14
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.min.js +2 -2
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +15 -14
- 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 +2 -2
- package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
- 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 +2 -2
- package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
- package/package.json +7 -7
|
@@ -346,7 +346,7 @@ var LWC = (function (exports) {
|
|
|
346
346
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
347
347
|
return attributeName;
|
|
348
348
|
}
|
|
349
|
-
/** version: 2.
|
|
349
|
+
/** version: 2.23.0 */
|
|
350
350
|
|
|
351
351
|
/*
|
|
352
352
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -734,20 +734,24 @@ var LWC = (function (exports) {
|
|
|
734
734
|
|
|
735
735
|
return ReactiveObserver;
|
|
736
736
|
}();
|
|
737
|
-
/*
|
|
738
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
739
|
-
* All rights reserved.
|
|
740
|
-
* SPDX-License-Identifier: MIT
|
|
741
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
742
|
-
*/
|
|
743
|
-
|
|
744
737
|
|
|
745
738
|
function componentValueMutated(vm, key) {
|
|
746
|
-
|
|
739
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
740
|
+
{
|
|
741
|
+
valueMutated(vm.component, key);
|
|
742
|
+
}
|
|
747
743
|
}
|
|
748
744
|
|
|
749
745
|
function componentValueObserved(vm, key) {
|
|
750
|
-
|
|
746
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
747
|
+
{
|
|
748
|
+
valueObserved(vm.component, key);
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
function createReactiveObserver(callback) {
|
|
753
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
754
|
+
return new ReactiveObserver(callback);
|
|
751
755
|
}
|
|
752
756
|
/*
|
|
753
757
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1012,6 +1016,15 @@ var LWC = (function (exports) {
|
|
|
1012
1016
|
HTMLElementOriginalDescriptors[propName] = descriptor;
|
|
1013
1017
|
}
|
|
1014
1018
|
});
|
|
1019
|
+
|
|
1020
|
+
function updateComponentValue(vm, key, newValue) {
|
|
1021
|
+
var cmpFields = vm.cmpFields;
|
|
1022
|
+
|
|
1023
|
+
if (newValue !== cmpFields[key]) {
|
|
1024
|
+
cmpFields[key] = newValue;
|
|
1025
|
+
componentValueMutated(vm, key);
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1015
1028
|
/**
|
|
1016
1029
|
* Copyright (C) 2017 salesforce.com, inc.
|
|
1017
1030
|
*/
|
|
@@ -1672,8 +1685,28 @@ var LWC = (function (exports) {
|
|
|
1672
1685
|
*/
|
|
1673
1686
|
|
|
1674
1687
|
function unwrap(value) {
|
|
1688
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
1675
1689
|
return reactiveMembrane.unwrapProxy(value);
|
|
1676
1690
|
}
|
|
1691
|
+
|
|
1692
|
+
function getReadOnlyProxy(value) {
|
|
1693
|
+
// We must return a frozen wrapper around the value, so that child components cannot mutate properties passed to
|
|
1694
|
+
// them from their parents. This applies to both the client and server.
|
|
1695
|
+
return reactiveMembrane.getReadOnlyProxy(value);
|
|
1696
|
+
}
|
|
1697
|
+
|
|
1698
|
+
function getReactiveProxy(value) {
|
|
1699
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
1700
|
+
return reactiveMembrane.getProxy(value);
|
|
1701
|
+
} // Making the component instance a live value when using Locker to support expandos.
|
|
1702
|
+
|
|
1703
|
+
|
|
1704
|
+
function markLockerLiveObject(obj) {
|
|
1705
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
1706
|
+
{
|
|
1707
|
+
obj[lockerLivePropertyKey] = undefined;
|
|
1708
|
+
}
|
|
1709
|
+
}
|
|
1677
1710
|
/*
|
|
1678
1711
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
1679
1712
|
* All rights reserved.
|
|
@@ -1722,11 +1755,7 @@ var LWC = (function (exports) {
|
|
|
1722
1755
|
set: function set(newValue) {
|
|
1723
1756
|
var vm = getAssociatedVM(this);
|
|
1724
1757
|
|
|
1725
|
-
|
|
1726
|
-
vm.cmpProps[propName] = newValue;
|
|
1727
|
-
componentValueMutated(vm, propName);
|
|
1728
|
-
}
|
|
1729
|
-
|
|
1758
|
+
updateComponentValue(vm, propName, newValue);
|
|
1730
1759
|
return _set.call(vm.elm, newValue);
|
|
1731
1760
|
}
|
|
1732
1761
|
};
|
|
@@ -1764,10 +1793,9 @@ var LWC = (function (exports) {
|
|
|
1764
1793
|
vm.callHook = _callHook;
|
|
1765
1794
|
vm.setHook = _setHook;
|
|
1766
1795
|
vm.getHook = _getHook;
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1796
|
+
}
|
|
1769
1797
|
|
|
1770
|
-
this
|
|
1798
|
+
markLockerLiveObject(this); // Linking elm, shadow root and component with the VM.
|
|
1771
1799
|
|
|
1772
1800
|
associateVM(component, vm);
|
|
1773
1801
|
associateVM(elm, vm);
|
|
@@ -2015,47 +2043,7 @@ var LWC = (function (exports) {
|
|
|
2015
2043
|
},
|
|
2016
2044
|
set: function set(newValue) {
|
|
2017
2045
|
var vm = getAssociatedVM(this);
|
|
2018
|
-
|
|
2019
|
-
if (newValue !== vm.cmpFields[key]) {
|
|
2020
|
-
vm.cmpFields[key] = newValue;
|
|
2021
|
-
componentValueMutated(vm, key);
|
|
2022
|
-
}
|
|
2023
|
-
},
|
|
2024
|
-
enumerable: true,
|
|
2025
|
-
configurable: true
|
|
2026
|
-
};
|
|
2027
|
-
}
|
|
2028
|
-
/*
|
|
2029
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2030
|
-
* All rights reserved.
|
|
2031
|
-
* SPDX-License-Identifier: MIT
|
|
2032
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2033
|
-
*/
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
function api$1() {
|
|
2037
|
-
|
|
2038
|
-
throw new Error();
|
|
2039
|
-
}
|
|
2040
|
-
|
|
2041
|
-
function createPublicPropertyDescriptor(key) {
|
|
2042
|
-
return {
|
|
2043
|
-
get: function get() {
|
|
2044
|
-
var vm = getAssociatedVM(this);
|
|
2045
|
-
|
|
2046
|
-
if (isBeingConstructed(vm)) {
|
|
2047
|
-
|
|
2048
|
-
return;
|
|
2049
|
-
}
|
|
2050
|
-
|
|
2051
|
-
componentValueObserved(vm, key);
|
|
2052
|
-
return vm.cmpProps[key];
|
|
2053
|
-
},
|
|
2054
|
-
set: function set(newValue) {
|
|
2055
|
-
var vm = getAssociatedVM(this);
|
|
2056
|
-
|
|
2057
|
-
vm.cmpProps[key] = newValue;
|
|
2058
|
-
componentValueMutated(vm, key);
|
|
2046
|
+
updateComponentValue(vm, key, newValue);
|
|
2059
2047
|
},
|
|
2060
2048
|
enumerable: true,
|
|
2061
2049
|
configurable: true
|
|
@@ -2119,6 +2107,47 @@ var LWC = (function (exports) {
|
|
|
2119
2107
|
return AccessorReactiveObserver;
|
|
2120
2108
|
}(ReactiveObserver);
|
|
2121
2109
|
|
|
2110
|
+
function createAccessorReactiveObserver(vm, set) {
|
|
2111
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
2112
|
+
return new AccessorReactiveObserver(vm, set);
|
|
2113
|
+
}
|
|
2114
|
+
/*
|
|
2115
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2116
|
+
* All rights reserved.
|
|
2117
|
+
* SPDX-License-Identifier: MIT
|
|
2118
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2119
|
+
*/
|
|
2120
|
+
|
|
2121
|
+
|
|
2122
|
+
function api$1() {
|
|
2123
|
+
|
|
2124
|
+
throw new Error();
|
|
2125
|
+
}
|
|
2126
|
+
|
|
2127
|
+
function createPublicPropertyDescriptor(key) {
|
|
2128
|
+
return {
|
|
2129
|
+
get: function get() {
|
|
2130
|
+
var vm = getAssociatedVM(this);
|
|
2131
|
+
|
|
2132
|
+
if (isBeingConstructed(vm)) {
|
|
2133
|
+
|
|
2134
|
+
return;
|
|
2135
|
+
}
|
|
2136
|
+
|
|
2137
|
+
componentValueObserved(vm, key);
|
|
2138
|
+
return vm.cmpProps[key];
|
|
2139
|
+
},
|
|
2140
|
+
set: function set(newValue) {
|
|
2141
|
+
var vm = getAssociatedVM(this);
|
|
2142
|
+
|
|
2143
|
+
vm.cmpProps[key] = newValue;
|
|
2144
|
+
componentValueMutated(vm, key);
|
|
2145
|
+
},
|
|
2146
|
+
enumerable: true,
|
|
2147
|
+
configurable: true
|
|
2148
|
+
};
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2122
2151
|
function createPublicAccessorDescriptor(key, descriptor) {
|
|
2123
2152
|
var _get3 = descriptor.get,
|
|
2124
2153
|
_set2 = descriptor.set,
|
|
@@ -2145,7 +2174,7 @@ var LWC = (function (exports) {
|
|
|
2145
2174
|
var ro = vm.oar[key];
|
|
2146
2175
|
|
|
2147
2176
|
if (isUndefined$1(ro)) {
|
|
2148
|
-
ro = vm.oar[key] =
|
|
2177
|
+
ro = vm.oar[key] = createAccessorReactiveObserver(vm, _set2);
|
|
2149
2178
|
} // every time we invoke this setter from outside (through this wrapper setter)
|
|
2150
2179
|
// we should reset the value and then debounce just in case there is a pending
|
|
2151
2180
|
// invocation the next tick that is not longer relevant since the value is changing
|
|
@@ -2175,7 +2204,7 @@ var LWC = (function (exports) {
|
|
|
2175
2204
|
|
|
2176
2205
|
function track(target) {
|
|
2177
2206
|
if (arguments.length === 1) {
|
|
2178
|
-
return
|
|
2207
|
+
return getReactiveProxy(target);
|
|
2179
2208
|
}
|
|
2180
2209
|
|
|
2181
2210
|
throw new Error();
|
|
@@ -2191,12 +2220,8 @@ var LWC = (function (exports) {
|
|
|
2191
2220
|
set: function set(newValue) {
|
|
2192
2221
|
var vm = getAssociatedVM(this);
|
|
2193
2222
|
|
|
2194
|
-
var reactiveOrAnyValue =
|
|
2195
|
-
|
|
2196
|
-
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2197
|
-
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
2198
|
-
componentValueMutated(vm, key);
|
|
2199
|
-
}
|
|
2223
|
+
var reactiveOrAnyValue = getReactiveProxy(newValue);
|
|
2224
|
+
updateComponentValue(vm, key, reactiveOrAnyValue);
|
|
2200
2225
|
},
|
|
2201
2226
|
enumerable: true,
|
|
2202
2227
|
configurable: true
|
|
@@ -2237,10 +2262,7 @@ var LWC = (function (exports) {
|
|
|
2237
2262
|
* system to be backward compatible.
|
|
2238
2263
|
*/
|
|
2239
2264
|
|
|
2240
|
-
|
|
2241
|
-
vm.cmpFields[key] = value;
|
|
2242
|
-
componentValueMutated(vm, key);
|
|
2243
|
-
}
|
|
2265
|
+
updateComponentValue(vm, key, value);
|
|
2244
2266
|
},
|
|
2245
2267
|
enumerable: true,
|
|
2246
2268
|
configurable: true
|
|
@@ -2499,7 +2521,7 @@ var LWC = (function (exports) {
|
|
|
2499
2521
|
fn = cachedSetterByKey[key] = function (newValue) {
|
|
2500
2522
|
var vm = getAssociatedVM(this);
|
|
2501
2523
|
var setHook = vm.setHook;
|
|
2502
|
-
newValue =
|
|
2524
|
+
newValue = getReadOnlyProxy(newValue);
|
|
2503
2525
|
setHook(vm.component, key, newValue);
|
|
2504
2526
|
};
|
|
2505
2527
|
}
|
|
@@ -3106,9 +3128,7 @@ var LWC = (function (exports) {
|
|
|
3106
3128
|
function createStylesheet(vm, stylesheets) {
|
|
3107
3129
|
var renderMode = vm.renderMode,
|
|
3108
3130
|
shadowMode = vm.shadowMode,
|
|
3109
|
-
|
|
3110
|
-
ssr = _vm$renderer2.ssr,
|
|
3111
|
-
insertStylesheet = _vm$renderer2.insertStylesheet;
|
|
3131
|
+
insertStylesheet = vm.renderer.insertStylesheet;
|
|
3112
3132
|
|
|
3113
3133
|
if (renderMode === 1
|
|
3114
3134
|
/* RenderMode.Shadow */
|
|
@@ -3118,7 +3138,7 @@ var LWC = (function (exports) {
|
|
|
3118
3138
|
for (var _i12 = 0; _i12 < stylesheets.length; _i12++) {
|
|
3119
3139
|
insertStylesheet(stylesheets[_i12]);
|
|
3120
3140
|
}
|
|
3121
|
-
} else if (
|
|
3141
|
+
} else if (vm.hydrated) {
|
|
3122
3142
|
// Note: We need to ensure that during hydration, the stylesheets method is the same as those in ssr.
|
|
3123
3143
|
// This works in the client, because the stylesheets are created, and cached in the VM
|
|
3124
3144
|
// the first time the VM renders.
|
|
@@ -3499,7 +3519,7 @@ var LWC = (function (exports) {
|
|
|
3499
3519
|
}
|
|
3500
3520
|
}
|
|
3501
3521
|
|
|
3502
|
-
function patch(n1, n2, renderer) {
|
|
3522
|
+
function patch(n1, n2, parent, renderer) {
|
|
3503
3523
|
var _a, _b;
|
|
3504
3524
|
|
|
3505
3525
|
if (n1 === n2) {
|
|
@@ -3536,7 +3556,7 @@ var LWC = (function (exports) {
|
|
|
3536
3556
|
case 3
|
|
3537
3557
|
/* VNodeType.CustomElement */
|
|
3538
3558
|
:
|
|
3539
|
-
patchCustomElement(n1, n2, (_b = n2.data.renderer) !== null && _b !== void 0 ? _b : renderer);
|
|
3559
|
+
patchCustomElement(n1, n2, parent, (_b = n2.data.renderer) !== null && _b !== void 0 ? _b : renderer);
|
|
3540
3560
|
break;
|
|
3541
3561
|
}
|
|
3542
3562
|
}
|
|
@@ -3621,10 +3641,10 @@ var LWC = (function (exports) {
|
|
|
3621
3641
|
svg = vnode.data.svg;
|
|
3622
3642
|
var createElement = renderer.createElement;
|
|
3623
3643
|
var namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
3624
|
-
var elm = createElement(sel, namespace);
|
|
3644
|
+
var elm = vnode.elm = createElement(sel, namespace);
|
|
3625
3645
|
linkNodeToShadow(elm, owner, renderer);
|
|
3626
|
-
|
|
3627
|
-
|
|
3646
|
+
applyStyleScoping(elm, owner, renderer);
|
|
3647
|
+
applyDomManual(elm, vnode);
|
|
3628
3648
|
patchElementPropsAndAttrs$1(null, vnode, renderer);
|
|
3629
3649
|
insertNode(elm, parent, anchor, renderer);
|
|
3630
3650
|
mountVNodes(vnode.children, elm, renderer, null);
|
|
@@ -3641,7 +3661,7 @@ var LWC = (function (exports) {
|
|
|
3641
3661
|
var cloneNode = renderer.cloneNode,
|
|
3642
3662
|
isSyntheticShadowDefined = renderer.isSyntheticShadowDefined;
|
|
3643
3663
|
var elm = vnode.elm = cloneNode(vnode.fragment, true);
|
|
3644
|
-
linkNodeToShadow(elm, owner, renderer);
|
|
3664
|
+
linkNodeToShadow(elm, owner, renderer);
|
|
3645
3665
|
|
|
3646
3666
|
var renderMode = owner.renderMode,
|
|
3647
3667
|
shadowMode = owner.shadowMode;
|
|
@@ -3675,9 +3695,10 @@ var LWC = (function (exports) {
|
|
|
3675
3695
|
// the custom element from the registry is expecting an upgrade callback
|
|
3676
3696
|
vm = createViewModelHook(elm, vnode, renderer);
|
|
3677
3697
|
});
|
|
3678
|
-
linkNodeToShadow(elm, owner, renderer);
|
|
3679
3698
|
vnode.elm = elm;
|
|
3680
3699
|
vnode.vm = vm;
|
|
3700
|
+
linkNodeToShadow(elm, owner, renderer);
|
|
3701
|
+
applyStyleScoping(elm, owner, renderer);
|
|
3681
3702
|
|
|
3682
3703
|
if (vm) {
|
|
3683
3704
|
allocateChildren(vnode, vm);
|
|
@@ -3700,25 +3721,34 @@ var LWC = (function (exports) {
|
|
|
3700
3721
|
}
|
|
3701
3722
|
}
|
|
3702
3723
|
|
|
3703
|
-
function patchCustomElement(n1, n2, renderer) {
|
|
3704
|
-
|
|
3705
|
-
|
|
3706
|
-
|
|
3724
|
+
function patchCustomElement(n1, n2, parent, renderer) {
|
|
3725
|
+
if (n1.ctor !== n2.ctor) {
|
|
3726
|
+
// If the constructor, unmount the current component and mount a new one using the new
|
|
3727
|
+
// constructor.
|
|
3728
|
+
var anchor = renderer.nextSibling(n1.elm);
|
|
3729
|
+
unmount(n1, parent, renderer, true);
|
|
3730
|
+
mountCustomElement(n2, parent, anchor, renderer);
|
|
3731
|
+
} else {
|
|
3732
|
+
// Otherwise patch the existing component with new props/attrs/etc.
|
|
3733
|
+
var elm = n2.elm = n1.elm;
|
|
3734
|
+
var vm = n2.vm = n1.vm;
|
|
3735
|
+
patchElementPropsAndAttrs$1(n1, n2, renderer);
|
|
3707
3736
|
|
|
3708
|
-
|
|
3709
|
-
|
|
3710
|
-
|
|
3711
|
-
|
|
3712
|
-
|
|
3713
|
-
|
|
3737
|
+
if (!isUndefined$1(vm)) {
|
|
3738
|
+
// in fallback mode, the allocation will always set children to
|
|
3739
|
+
// empty and delegate the real allocation to the slot elements
|
|
3740
|
+
allocateChildren(n2, vm);
|
|
3741
|
+
} // in fallback mode, the children will be always empty, so, nothing
|
|
3742
|
+
// will happen, but in native, it does allocate the light dom
|
|
3714
3743
|
|
|
3715
3744
|
|
|
3716
|
-
|
|
3745
|
+
patchChildren(n1.children, n2.children, elm, renderer);
|
|
3717
3746
|
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3747
|
+
if (!isUndefined$1(vm)) {
|
|
3748
|
+
// this will probably update the shadowRoot, but only if the vm is in a dirty state
|
|
3749
|
+
// this is important to preserve the top to bottom synchronous rendering phase.
|
|
3750
|
+
rerenderVM(vm);
|
|
3751
|
+
}
|
|
3722
3752
|
}
|
|
3723
3753
|
}
|
|
3724
3754
|
|
|
@@ -3794,26 +3824,6 @@ var LWC = (function (exports) {
|
|
|
3794
3824
|
return vnode != null;
|
|
3795
3825
|
}
|
|
3796
3826
|
|
|
3797
|
-
function observeElementChildNodes(elm) {
|
|
3798
|
-
elm.$domManual$ = true;
|
|
3799
|
-
}
|
|
3800
|
-
|
|
3801
|
-
function setElementShadowToken(elm, token) {
|
|
3802
|
-
elm.$shadowToken$ = token;
|
|
3803
|
-
} // Set the scope token class for *.scoped.css styles
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
function setScopeTokenClassIfNecessary(elm, owner, renderer) {
|
|
3807
|
-
var token = getScopeTokenClass(owner);
|
|
3808
|
-
|
|
3809
|
-
if (!isNull(token)) {
|
|
3810
|
-
var _getClassList = renderer.getClassList; // TODO [#2762]: this dot notation with add is probably problematic
|
|
3811
|
-
// probably we should have a renderer api for just the add operation
|
|
3812
|
-
|
|
3813
|
-
_getClassList(elm).add(token);
|
|
3814
|
-
}
|
|
3815
|
-
}
|
|
3816
|
-
|
|
3817
3827
|
function linkNodeToShadow(elm, owner, renderer) {
|
|
3818
3828
|
var renderRoot = owner.renderRoot,
|
|
3819
3829
|
renderMode = owner.renderMode,
|
|
@@ -3864,28 +3874,39 @@ var LWC = (function (exports) {
|
|
|
3864
3874
|
patchProps(oldVnode, vnode, renderer);
|
|
3865
3875
|
}
|
|
3866
3876
|
|
|
3867
|
-
function
|
|
3868
|
-
|
|
3869
|
-
|
|
3877
|
+
function applyStyleScoping(elm, owner, renderer) {
|
|
3878
|
+
// Set the class name for `*.scoped.css` style scoping.
|
|
3879
|
+
var scopeToken = getScopeTokenClass(owner);
|
|
3880
|
+
|
|
3881
|
+
if (!isNull(scopeToken)) {
|
|
3882
|
+
var _getClassList = renderer.getClassList; // TODO [#2762]: this dot notation with add is probably problematic
|
|
3883
|
+
// probably we should have a renderer api for just the add operation
|
|
3884
|
+
|
|
3885
|
+
_getClassList(elm).add(scopeToken);
|
|
3886
|
+
} // Set property element for synthetic shadow DOM style scoping.
|
|
3887
|
+
|
|
3888
|
+
|
|
3889
|
+
var syntheticToken = owner.context.stylesheetToken;
|
|
3870
3890
|
|
|
3871
3891
|
if (owner.shadowMode === 1
|
|
3872
3892
|
/* ShadowMode.Synthetic */
|
|
3873
|
-
) {
|
|
3874
|
-
|
|
3875
|
-
|
|
3893
|
+
&& !isUndefined$1(syntheticToken)) {
|
|
3894
|
+
elm.$shadowToken$ = syntheticToken;
|
|
3895
|
+
}
|
|
3896
|
+
}
|
|
3876
3897
|
|
|
3877
|
-
|
|
3878
|
-
|
|
3879
|
-
) {
|
|
3880
|
-
// this element will now accept any manual content inserted into it
|
|
3881
|
-
observeElementChildNodes(elm);
|
|
3882
|
-
}
|
|
3898
|
+
function applyDomManual(elm, vnode) {
|
|
3899
|
+
var _a;
|
|
3883
3900
|
|
|
3884
|
-
|
|
3885
|
-
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3901
|
+
var owner = vnode.owner,
|
|
3902
|
+
context = vnode.data.context;
|
|
3903
|
+
|
|
3904
|
+
if (owner.shadowMode === 1
|
|
3905
|
+
/* ShadowMode.Synthetic */
|
|
3906
|
+
&& ((_a = context === null || context === void 0 ? void 0 : context.lwc) === null || _a === void 0 ? void 0 : _a.dom) === "manual"
|
|
3907
|
+
/* LwcDomMode.Manual */
|
|
3908
|
+
) {
|
|
3909
|
+
elm.$domManual$ = true;
|
|
3889
3910
|
}
|
|
3890
3911
|
}
|
|
3891
3912
|
|
|
@@ -3932,19 +3953,6 @@ var LWC = (function (exports) {
|
|
|
3932
3953
|
mode = vnode.mode,
|
|
3933
3954
|
ctor = vnode.ctor,
|
|
3934
3955
|
owner = vnode.owner;
|
|
3935
|
-
setScopeTokenClassIfNecessary(elm, owner, renderer);
|
|
3936
|
-
|
|
3937
|
-
if (owner.shadowMode === 1
|
|
3938
|
-
/* ShadowMode.Synthetic */
|
|
3939
|
-
) {
|
|
3940
|
-
var stylesheetToken = owner.context.stylesheetToken; // when running in synthetic shadow mode, we need to set the shadowToken value
|
|
3941
|
-
// into each element from the template, so they can be styled accordingly.
|
|
3942
|
-
|
|
3943
|
-
if (!isUndefined$1(stylesheetToken)) {
|
|
3944
|
-
setElementShadowToken(elm, stylesheetToken);
|
|
3945
|
-
}
|
|
3946
|
-
}
|
|
3947
|
-
|
|
3948
3956
|
vm = createVM(elm, ctor, renderer, {
|
|
3949
3957
|
mode: mode,
|
|
3950
3958
|
owner: owner,
|
|
@@ -4064,22 +4072,22 @@ var LWC = (function (exports) {
|
|
|
4064
4072
|
} else if (!isVNode(newEndVnode)) {
|
|
4065
4073
|
newEndVnode = newCh[--newEndIdx];
|
|
4066
4074
|
} else if (isSameVnode(oldStartVnode, newStartVnode)) {
|
|
4067
|
-
patch(oldStartVnode, newStartVnode, renderer);
|
|
4075
|
+
patch(oldStartVnode, newStartVnode, parent, renderer);
|
|
4068
4076
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
4069
4077
|
newStartVnode = newCh[++newStartIdx];
|
|
4070
4078
|
} else if (isSameVnode(oldEndVnode, newEndVnode)) {
|
|
4071
|
-
patch(oldEndVnode, newEndVnode, renderer);
|
|
4079
|
+
patch(oldEndVnode, newEndVnode, parent, renderer);
|
|
4072
4080
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
4073
4081
|
newEndVnode = newCh[--newEndIdx];
|
|
4074
4082
|
} else if (isSameVnode(oldStartVnode, newEndVnode)) {
|
|
4075
4083
|
// Vnode moved right
|
|
4076
|
-
patch(oldStartVnode, newEndVnode, renderer);
|
|
4084
|
+
patch(oldStartVnode, newEndVnode, parent, renderer);
|
|
4077
4085
|
insertNode(oldStartVnode.elm, parent, renderer.nextSibling(oldEndVnode.elm), renderer);
|
|
4078
4086
|
oldStartVnode = oldCh[++oldStartIdx];
|
|
4079
4087
|
newEndVnode = newCh[--newEndIdx];
|
|
4080
4088
|
} else if (isSameVnode(oldEndVnode, newStartVnode)) {
|
|
4081
4089
|
// Vnode moved left
|
|
4082
|
-
patch(oldEndVnode, newStartVnode, renderer);
|
|
4090
|
+
patch(oldEndVnode, newStartVnode, parent, renderer);
|
|
4083
4091
|
insertNode(newStartVnode.elm, parent, oldStartVnode.elm, renderer);
|
|
4084
4092
|
oldEndVnode = oldCh[--oldEndIdx];
|
|
4085
4093
|
newStartVnode = newCh[++newStartIdx];
|
|
@@ -4102,7 +4110,7 @@ var LWC = (function (exports) {
|
|
|
4102
4110
|
// New element
|
|
4103
4111
|
mount(newStartVnode, parent, renderer, oldStartVnode.elm);
|
|
4104
4112
|
} else {
|
|
4105
|
-
patch(elmToMove, newStartVnode, renderer); // Delete the old child, but copy the array since it is read-only.
|
|
4113
|
+
patch(elmToMove, newStartVnode, parent, renderer); // Delete the old child, but copy the array since it is read-only.
|
|
4106
4114
|
// The `oldCh` will be GC'ed after `updateDynamicChildren` is complete,
|
|
4107
4115
|
// so we only care about the `oldCh` object inside this function.
|
|
4108
4116
|
// To avoid cloning over and over again, we check `clonedOldCh`
|
|
@@ -4172,7 +4180,7 @@ var LWC = (function (exports) {
|
|
|
4172
4180
|
if (isVNode(n1)) {
|
|
4173
4181
|
if (isVNode(n2)) {
|
|
4174
4182
|
// both vnodes are equivalent, and we just need to patch them
|
|
4175
|
-
patch(n1, n2, renderer);
|
|
4183
|
+
patch(n1, n2, parent, renderer);
|
|
4176
4184
|
anchor = n2.elm;
|
|
4177
4185
|
} else {
|
|
4178
4186
|
// removing the old vnode since the new one is null
|
|
@@ -4473,19 +4481,11 @@ var LWC = (function (exports) {
|
|
|
4473
4481
|
|
|
4474
4482
|
return url;
|
|
4475
4483
|
}
|
|
4476
|
-
/**
|
|
4477
|
-
* Map to store an index value assigned to any dynamic component reference ingested
|
|
4478
|
-
* by dc() api. This allows us to generate a unique unique per template per dynamic
|
|
4479
|
-
* component reference to avoid diffing algo mismatches.
|
|
4480
|
-
*/
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
var DynamicImportedComponentMap = new Map();
|
|
4484
|
-
var dynamicImportedComponentCounter = 0;
|
|
4485
4484
|
/**
|
|
4486
4485
|
* create a dynamic component via `<x-foo lwc:dynamic={Ctor}>`
|
|
4487
4486
|
*/
|
|
4488
4487
|
|
|
4488
|
+
|
|
4489
4489
|
function dc(sel, Ctor, data) {
|
|
4490
4490
|
var children = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : EmptyArray;
|
|
4491
4491
|
|
|
@@ -4498,22 +4498,7 @@ var LWC = (function (exports) {
|
|
|
4498
4498
|
throw new Error("Invalid LWC Constructor ".concat(toString$1(Ctor), " for custom element <").concat(sel, ">."));
|
|
4499
4499
|
}
|
|
4500
4500
|
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
if (isUndefined$1(idx)) {
|
|
4504
|
-
idx = dynamicImportedComponentCounter++;
|
|
4505
|
-
DynamicImportedComponentMap.set(Ctor, idx);
|
|
4506
|
-
} // the new vnode key is a mix of idx and compiler key, this is required by the diffing algo
|
|
4507
|
-
// to identify different constructors as vnodes with different keys to avoid reusing the
|
|
4508
|
-
// element used for previous constructors.
|
|
4509
|
-
// Shallow clone is necessary here becuase VElementData may be shared across VNodes due to
|
|
4510
|
-
// hoisting optimization.
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
var newData = Object.assign(Object.assign({}, data), {
|
|
4514
|
-
key: "dc:".concat(idx, ":").concat(data.key)
|
|
4515
|
-
});
|
|
4516
|
-
return c(sel, Ctor, newData, children);
|
|
4501
|
+
return c(sel, Ctor, data, children);
|
|
4517
4502
|
}
|
|
4518
4503
|
/**
|
|
4519
4504
|
* slow children collection marking mechanism. this API allows the compiler to signal
|
|
@@ -4974,7 +4959,7 @@ var LWC = (function (exports) {
|
|
|
4974
4959
|
}
|
|
4975
4960
|
|
|
4976
4961
|
function getTemplateReactiveObserver(vm) {
|
|
4977
|
-
return
|
|
4962
|
+
return createReactiveObserver(function () {
|
|
4978
4963
|
var isDirty = vm.isDirty;
|
|
4979
4964
|
|
|
4980
4965
|
if (isFalse(isDirty)) {
|
|
@@ -5353,13 +5338,7 @@ var LWC = (function (exports) {
|
|
|
5353
5338
|
}
|
|
5354
5339
|
|
|
5355
5340
|
function runRenderedCallback(vm) {
|
|
5356
|
-
var renderedCallback = vm.def.renderedCallback
|
|
5357
|
-
ssr = vm.renderer.ssr;
|
|
5358
|
-
|
|
5359
|
-
if (isTrue(ssr)) {
|
|
5360
|
-
return;
|
|
5361
|
-
}
|
|
5362
|
-
|
|
5341
|
+
var renderedCallback = vm.def.renderedCallback;
|
|
5363
5342
|
var rendered = Services.rendered;
|
|
5364
5343
|
|
|
5365
5344
|
if (rendered) {
|
|
@@ -5582,9 +5561,7 @@ var LWC = (function (exports) {
|
|
|
5582
5561
|
}
|
|
5583
5562
|
|
|
5584
5563
|
function scheduleRehydration(vm) {
|
|
5585
|
-
|
|
5586
|
-
|
|
5587
|
-
if (isTrue(ssr) || isTrue(vm.isScheduled)) {
|
|
5564
|
+
if (isTrue(vm.isScheduled)) {
|
|
5588
5565
|
return;
|
|
5589
5566
|
}
|
|
5590
5567
|
|
|
@@ -5686,13 +5663,8 @@ var LWC = (function (exports) {
|
|
|
5686
5663
|
}( /*#__PURE__*/_wrapNativeSuper(CustomEvent));
|
|
5687
5664
|
|
|
5688
5665
|
function createFieldDataCallback(vm, name) {
|
|
5689
|
-
var cmpFields = vm.cmpFields;
|
|
5690
5666
|
return function (value) {
|
|
5691
|
-
|
|
5692
|
-
// storing the value in the underlying storage
|
|
5693
|
-
cmpFields[name] = value;
|
|
5694
|
-
componentValueMutated(vm, name);
|
|
5695
|
-
}
|
|
5667
|
+
updateComponentValue(vm, name, value);
|
|
5696
5668
|
};
|
|
5697
5669
|
}
|
|
5698
5670
|
|
|
@@ -5709,7 +5681,7 @@ var LWC = (function (exports) {
|
|
|
5709
5681
|
function createConfigWatcher(component, configCallback, callbackWhenConfigIsReady) {
|
|
5710
5682
|
var hasPendingConfig = false; // creating the reactive observer for reactive params when needed
|
|
5711
5683
|
|
|
5712
|
-
var ro =
|
|
5684
|
+
var ro = createReactiveObserver(function () {
|
|
5713
5685
|
if (hasPendingConfig === false) {
|
|
5714
5686
|
hasPendingConfig = true; // collect new config in the micro-task
|
|
5715
5687
|
|
|
@@ -6000,7 +5972,7 @@ var LWC = (function (exports) {
|
|
|
6000
5972
|
|
|
6001
5973
|
function readonly(obj) {
|
|
6002
5974
|
|
|
6003
|
-
return
|
|
5975
|
+
return getReadOnlyProxy(obj);
|
|
6004
5976
|
}
|
|
6005
5977
|
/*
|
|
6006
5978
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
@@ -6482,7 +6454,7 @@ var LWC = (function (exports) {
|
|
|
6482
6454
|
|
|
6483
6455
|
return ctor;
|
|
6484
6456
|
}
|
|
6485
|
-
/* version: 2.
|
|
6457
|
+
/* version: 2.23.0 */
|
|
6486
6458
|
|
|
6487
6459
|
/*
|
|
6488
6460
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6641,6 +6613,85 @@ var LWC = (function (exports) {
|
|
|
6641
6613
|
*/
|
|
6642
6614
|
|
|
6643
6615
|
|
|
6616
|
+
var SUPPORTS_TEMPLATE = typeof HTMLTemplateElement === 'function';
|
|
6617
|
+
var createFragment;
|
|
6618
|
+
|
|
6619
|
+
if (SUPPORTS_TEMPLATE) {
|
|
6620
|
+
// Parse the fragment HTML string into DOM
|
|
6621
|
+
createFragment = function createFragment(html) {
|
|
6622
|
+
var template = document.createElement('template');
|
|
6623
|
+
template.innerHTML = html;
|
|
6624
|
+
return template.content.firstChild;
|
|
6625
|
+
};
|
|
6626
|
+
} else {
|
|
6627
|
+
// In browsers that don't support <template> (e.g. IE11), we need to be careful to wrap elements like
|
|
6628
|
+
// <td> in the proper container elements (e.g. <tbody>), because otherwise they will be parsed as null.
|
|
6629
|
+
// Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L273-L280
|
|
6630
|
+
// With other elements added from:
|
|
6631
|
+
// https://github.com/sindresorhus/html-tags/blob/95dcdd5/index.js
|
|
6632
|
+
// Using the test:
|
|
6633
|
+
// document.createRange().createContextualFragment(`<${tag}></${tag}>`).firstChild === null
|
|
6634
|
+
// And omitting <html>, <head>, and <body> as these are not practical in an LWC component.
|
|
6635
|
+
var topLevelWrappingMap = {
|
|
6636
|
+
caption: ['table'],
|
|
6637
|
+
col: ['colgroup', 'table'],
|
|
6638
|
+
colgroup: ['table'],
|
|
6639
|
+
option: ['select'],
|
|
6640
|
+
tbody: ['table'],
|
|
6641
|
+
td: ['tr', 'tbody', 'table'],
|
|
6642
|
+
th: ['tr', 'tbody', 'table'],
|
|
6643
|
+
thead: ['table'],
|
|
6644
|
+
tfoot: ['table'],
|
|
6645
|
+
tr: ['tbody', 'table']
|
|
6646
|
+
}; // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L282-L288
|
|
6647
|
+
|
|
6648
|
+
var getTagName = function getTagName(text) {
|
|
6649
|
+
return (/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(text) || ['', ''])[1].toLowerCase();
|
|
6650
|
+
}; // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L295-L320
|
|
6651
|
+
|
|
6652
|
+
|
|
6653
|
+
createFragment = function createFragment(html) {
|
|
6654
|
+
var wrapperTags = topLevelWrappingMap[getTagName(html)];
|
|
6655
|
+
|
|
6656
|
+
if (!isUndefined$1(wrapperTags)) {
|
|
6657
|
+
var _iterator5 = _createForOfIteratorHelper(wrapperTags),
|
|
6658
|
+
_step5;
|
|
6659
|
+
|
|
6660
|
+
try {
|
|
6661
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
6662
|
+
var wrapperTag = _step5.value;
|
|
6663
|
+
html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
|
|
6664
|
+
}
|
|
6665
|
+
} catch (err) {
|
|
6666
|
+
_iterator5.e(err);
|
|
6667
|
+
} finally {
|
|
6668
|
+
_iterator5.f();
|
|
6669
|
+
}
|
|
6670
|
+
} // For IE11, the document title must not be undefined, but it can be an empty string
|
|
6671
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument#browser_compatibility
|
|
6672
|
+
|
|
6673
|
+
|
|
6674
|
+
var doc = document.implementation.createHTMLDocument('');
|
|
6675
|
+
doc.body.innerHTML = html;
|
|
6676
|
+
var content = doc.body;
|
|
6677
|
+
|
|
6678
|
+
if (!isUndefined$1(wrapperTags)) {
|
|
6679
|
+
for (var _i32 = 0; _i32 < wrapperTags.length; _i32++) {
|
|
6680
|
+
content = content.firstChild;
|
|
6681
|
+
}
|
|
6682
|
+
}
|
|
6683
|
+
|
|
6684
|
+
return content.firstChild;
|
|
6685
|
+
};
|
|
6686
|
+
}
|
|
6687
|
+
/*
|
|
6688
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
6689
|
+
* All rights reserved.
|
|
6690
|
+
* SPDX-License-Identifier: MIT
|
|
6691
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6692
|
+
*/
|
|
6693
|
+
|
|
6694
|
+
|
|
6644
6695
|
var getCustomElement;
|
|
6645
6696
|
var defineCustomElement;
|
|
6646
6697
|
var HTMLElementConstructor;
|
|
@@ -6722,18 +6773,6 @@ var LWC = (function (exports) {
|
|
|
6722
6773
|
HTMLElementConstructor.prototype = HTMLElement.prototype;
|
|
6723
6774
|
}
|
|
6724
6775
|
|
|
6725
|
-
var hydrating = false;
|
|
6726
|
-
|
|
6727
|
-
function setIsHydrating(value) {
|
|
6728
|
-
hydrating = value;
|
|
6729
|
-
}
|
|
6730
|
-
|
|
6731
|
-
var ssr = false;
|
|
6732
|
-
|
|
6733
|
-
function isHydrating() {
|
|
6734
|
-
return hydrating;
|
|
6735
|
-
}
|
|
6736
|
-
|
|
6737
6776
|
var isNativeShadowDefined = _globalThis[KEY__IS_NATIVE_SHADOW_ROOT_DEFINED];
|
|
6738
6777
|
var isSyntheticShadowDefined = hasOwnProperty$1.call(Element.prototype, KEY__SHADOW_TOKEN);
|
|
6739
6778
|
|
|
@@ -6741,10 +6780,6 @@ var LWC = (function (exports) {
|
|
|
6741
6780
|
return node.cloneNode(deep);
|
|
6742
6781
|
}
|
|
6743
6782
|
|
|
6744
|
-
function createFragment(html) {
|
|
6745
|
-
return document.createRange().createContextualFragment(html).firstChild;
|
|
6746
|
-
}
|
|
6747
|
-
|
|
6748
6783
|
function createElement$1(tagName, namespace) {
|
|
6749
6784
|
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
6750
6785
|
}
|
|
@@ -6770,15 +6805,11 @@ var LWC = (function (exports) {
|
|
|
6770
6805
|
}
|
|
6771
6806
|
|
|
6772
6807
|
function attachShadow(element, options) {
|
|
6773
|
-
// `
|
|
6808
|
+
// `shadowRoot` will be non-null in two cases:
|
|
6774
6809
|
// 1. upon initial load with an SSR-generated DOM, while in Shadow render mode
|
|
6775
6810
|
// 2. when a webapp author places <c-app> in their static HTML and mounts their
|
|
6776
|
-
// root component with
|
|
6777
|
-
|
|
6778
|
-
// The second case can be treated as a failed hydration with nominal impact
|
|
6779
|
-
// to performance. However, because <c-app> won't have a <template shadowroot>
|
|
6780
|
-
// declarative child, `element.shadowRoot` is `null`.
|
|
6781
|
-
if (hydrating && element.shadowRoot) {
|
|
6811
|
+
// root component with customElement.define('c-app', Ctor)
|
|
6812
|
+
if (!isNull(element.shadowRoot)) {
|
|
6782
6813
|
return element.shadowRoot;
|
|
6783
6814
|
}
|
|
6784
6815
|
|
|
@@ -6890,11 +6921,9 @@ var LWC = (function (exports) {
|
|
|
6890
6921
|
|
|
6891
6922
|
var HTMLElementExported = HTMLElementConstructor;
|
|
6892
6923
|
var renderer = {
|
|
6893
|
-
ssr: ssr,
|
|
6894
6924
|
isNativeShadowDefined: isNativeShadowDefined,
|
|
6895
6925
|
isSyntheticShadowDefined: isSyntheticShadowDefined,
|
|
6896
6926
|
HTMLElementExported: HTMLElementExported,
|
|
6897
|
-
isHydrating: isHydrating,
|
|
6898
6927
|
insert: insert,
|
|
6899
6928
|
remove: remove,
|
|
6900
6929
|
cloneNode: cloneNode,
|
|
@@ -6963,8 +6992,8 @@ var LWC = (function (exports) {
|
|
|
6963
6992
|
hydrated: true
|
|
6964
6993
|
});
|
|
6965
6994
|
|
|
6966
|
-
for (var
|
|
6967
|
-
var _Object$entries2$_i = _slicedToArray(_Object$entries2[
|
|
6995
|
+
for (var _i33 = 0, _Object$entries2 = Object.entries(props); _i33 < _Object$entries2.length; _i33++) {
|
|
6996
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i33], 2),
|
|
6968
6997
|
key = _Object$entries2$_i[0],
|
|
6969
6998
|
value = _Object$entries2$_i[1];
|
|
6970
6999
|
|
|
@@ -6996,13 +7025,8 @@ var LWC = (function (exports) {
|
|
|
6996
7025
|
}
|
|
6997
7026
|
|
|
6998
7027
|
try {
|
|
6999
|
-
// Let the renderer know we are hydrating, so it does not replace the existing shadowRoot
|
|
7000
|
-
// and uses the same algo to create the stylesheets as in SSR.
|
|
7001
|
-
setIsHydrating(true);
|
|
7002
7028
|
var vm = createVMWithProps(element, Ctor, props);
|
|
7003
|
-
hydrateRoot(vm);
|
|
7004
|
-
|
|
7005
|
-
setIsHydrating(false);
|
|
7029
|
+
hydrateRoot(vm);
|
|
7006
7030
|
} catch (e) {
|
|
7007
7031
|
// Fallback: In case there's an error while hydrating, let's log the error, and replace the element content
|
|
7008
7032
|
// with the client generated DOM.
|
|
@@ -7013,11 +7037,7 @@ var LWC = (function (exports) {
|
|
|
7013
7037
|
resetShadowRootAndLightDom(element, Ctor); // we need to recreate the vm with the hydration flag on, so it re-uses the existing shadowRoot.
|
|
7014
7038
|
|
|
7015
7039
|
createVMWithProps(element, Ctor, props);
|
|
7016
|
-
setIsHydrating(false);
|
|
7017
7040
|
connectRootElement(element);
|
|
7018
|
-
} finally {
|
|
7019
|
-
// in case there's an error during recovery
|
|
7020
|
-
setIsHydrating(false);
|
|
7021
7041
|
}
|
|
7022
7042
|
}
|
|
7023
7043
|
/*
|
|
@@ -7289,7 +7309,7 @@ var LWC = (function (exports) {
|
|
|
7289
7309
|
});
|
|
7290
7310
|
freeze(LightningElement);
|
|
7291
7311
|
seal(LightningElement.prototype);
|
|
7292
|
-
/* version: 2.
|
|
7312
|
+
/* version: 2.23.0 */
|
|
7293
7313
|
|
|
7294
7314
|
exports.LightningElement = LightningElement;
|
|
7295
7315
|
exports.__unstable__ProfilerControl = profilerControl;
|