lwc 2.20.4 → 2.22.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 +181 -127
- package/dist/engine-dom/iife/es2017/engine-dom.js +181 -127
- package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es2017/engine-dom_debug.js +168 -115
- package/dist/engine-dom/iife/es5/engine-dom.js +226 -147
- package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/iife/es5/engine-dom_debug.js +201 -119
- package/dist/engine-dom/umd/es2017/engine-dom.js +181 -127
- package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es2017/engine-dom_debug.js +168 -115
- package/dist/engine-dom/umd/es5/engine-dom.js +226 -147
- package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
- package/dist/engine-dom/umd/es5/engine-dom_debug.js +201 -119
- package/dist/engine-server/commonjs/es2017/engine-server.js +89 -318
- package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
- package/dist/engine-server/esm/es2017/engine-server.js +89 -318
- package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
- package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
- 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
|
@@ -349,7 +349,7 @@
|
|
|
349
349
|
CACHED_PROPERTY_ATTRIBUTE_MAPPING.set(propName, attributeName);
|
|
350
350
|
return attributeName;
|
|
351
351
|
}
|
|
352
|
-
/** version: 2.
|
|
352
|
+
/** version: 2.22.0 */
|
|
353
353
|
|
|
354
354
|
/*
|
|
355
355
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -737,20 +737,24 @@
|
|
|
737
737
|
|
|
738
738
|
return ReactiveObserver;
|
|
739
739
|
}();
|
|
740
|
-
/*
|
|
741
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
742
|
-
* All rights reserved.
|
|
743
|
-
* SPDX-License-Identifier: MIT
|
|
744
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
745
|
-
*/
|
|
746
|
-
|
|
747
740
|
|
|
748
741
|
function componentValueMutated(vm, key) {
|
|
749
|
-
|
|
742
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
743
|
+
{
|
|
744
|
+
valueMutated(vm.component, key);
|
|
745
|
+
}
|
|
750
746
|
}
|
|
751
747
|
|
|
752
748
|
function componentValueObserved(vm, key) {
|
|
753
|
-
|
|
749
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
750
|
+
{
|
|
751
|
+
valueObserved(vm.component, key);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
function createReactiveObserver(callback) {
|
|
756
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
757
|
+
return new ReactiveObserver(callback);
|
|
754
758
|
}
|
|
755
759
|
/*
|
|
756
760
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -1675,8 +1679,28 @@
|
|
|
1675
1679
|
*/
|
|
1676
1680
|
|
|
1677
1681
|
function unwrap(value) {
|
|
1682
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
1678
1683
|
return reactiveMembrane.unwrapProxy(value);
|
|
1679
1684
|
}
|
|
1685
|
+
|
|
1686
|
+
function getReadOnlyProxy(value) {
|
|
1687
|
+
// We must return a frozen wrapper around the value, so that child components cannot mutate properties passed to
|
|
1688
|
+
// them from their parents. This applies to both the client and server.
|
|
1689
|
+
return reactiveMembrane.getReadOnlyProxy(value);
|
|
1690
|
+
}
|
|
1691
|
+
|
|
1692
|
+
function getReactiveProxy(value) {
|
|
1693
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
1694
|
+
return reactiveMembrane.getProxy(value);
|
|
1695
|
+
} // Making the component instance a live value when using Locker to support expandos.
|
|
1696
|
+
|
|
1697
|
+
|
|
1698
|
+
function markLockerLiveObject(obj) {
|
|
1699
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
1700
|
+
{
|
|
1701
|
+
obj[lockerLivePropertyKey] = undefined;
|
|
1702
|
+
}
|
|
1703
|
+
}
|
|
1680
1704
|
/*
|
|
1681
1705
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
1682
1706
|
* All rights reserved.
|
|
@@ -1767,10 +1791,9 @@
|
|
|
1767
1791
|
vm.callHook = _callHook;
|
|
1768
1792
|
vm.setHook = _setHook;
|
|
1769
1793
|
vm.getHook = _getHook;
|
|
1770
|
-
}
|
|
1771
|
-
|
|
1794
|
+
}
|
|
1772
1795
|
|
|
1773
|
-
this
|
|
1796
|
+
markLockerLiveObject(this); // Linking elm, shadow root and component with the VM.
|
|
1774
1797
|
|
|
1775
1798
|
associateVM(component, vm);
|
|
1776
1799
|
associateVM(elm, vm);
|
|
@@ -2028,42 +2051,6 @@
|
|
|
2028
2051
|
configurable: true
|
|
2029
2052
|
};
|
|
2030
2053
|
}
|
|
2031
|
-
/*
|
|
2032
|
-
* Copyright (c) 2018, salesforce.com, inc.
|
|
2033
|
-
* All rights reserved.
|
|
2034
|
-
* SPDX-License-Identifier: MIT
|
|
2035
|
-
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2036
|
-
*/
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
function api$1() {
|
|
2040
|
-
|
|
2041
|
-
throw new Error();
|
|
2042
|
-
}
|
|
2043
|
-
|
|
2044
|
-
function createPublicPropertyDescriptor(key) {
|
|
2045
|
-
return {
|
|
2046
|
-
get: function get() {
|
|
2047
|
-
var vm = getAssociatedVM(this);
|
|
2048
|
-
|
|
2049
|
-
if (isBeingConstructed(vm)) {
|
|
2050
|
-
|
|
2051
|
-
return;
|
|
2052
|
-
}
|
|
2053
|
-
|
|
2054
|
-
componentValueObserved(vm, key);
|
|
2055
|
-
return vm.cmpProps[key];
|
|
2056
|
-
},
|
|
2057
|
-
set: function set(newValue) {
|
|
2058
|
-
var vm = getAssociatedVM(this);
|
|
2059
|
-
|
|
2060
|
-
vm.cmpProps[key] = newValue;
|
|
2061
|
-
componentValueMutated(vm, key);
|
|
2062
|
-
},
|
|
2063
|
-
enumerable: true,
|
|
2064
|
-
configurable: true
|
|
2065
|
-
};
|
|
2066
|
-
}
|
|
2067
2054
|
|
|
2068
2055
|
var AccessorReactiveObserver = /*#__PURE__*/function (_ReactiveObserver) {
|
|
2069
2056
|
_inherits(AccessorReactiveObserver, _ReactiveObserver);
|
|
@@ -2122,6 +2109,47 @@
|
|
|
2122
2109
|
return AccessorReactiveObserver;
|
|
2123
2110
|
}(ReactiveObserver);
|
|
2124
2111
|
|
|
2112
|
+
function createAccessorReactiveObserver(vm, set) {
|
|
2113
|
+
// On the server side, we don't need mutation tracking. Skipping it improves performance.
|
|
2114
|
+
return new AccessorReactiveObserver(vm, set);
|
|
2115
|
+
}
|
|
2116
|
+
/*
|
|
2117
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
2118
|
+
* All rights reserved.
|
|
2119
|
+
* SPDX-License-Identifier: MIT
|
|
2120
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
2121
|
+
*/
|
|
2122
|
+
|
|
2123
|
+
|
|
2124
|
+
function api$1() {
|
|
2125
|
+
|
|
2126
|
+
throw new Error();
|
|
2127
|
+
}
|
|
2128
|
+
|
|
2129
|
+
function createPublicPropertyDescriptor(key) {
|
|
2130
|
+
return {
|
|
2131
|
+
get: function get() {
|
|
2132
|
+
var vm = getAssociatedVM(this);
|
|
2133
|
+
|
|
2134
|
+
if (isBeingConstructed(vm)) {
|
|
2135
|
+
|
|
2136
|
+
return;
|
|
2137
|
+
}
|
|
2138
|
+
|
|
2139
|
+
componentValueObserved(vm, key);
|
|
2140
|
+
return vm.cmpProps[key];
|
|
2141
|
+
},
|
|
2142
|
+
set: function set(newValue) {
|
|
2143
|
+
var vm = getAssociatedVM(this);
|
|
2144
|
+
|
|
2145
|
+
vm.cmpProps[key] = newValue;
|
|
2146
|
+
componentValueMutated(vm, key);
|
|
2147
|
+
},
|
|
2148
|
+
enumerable: true,
|
|
2149
|
+
configurable: true
|
|
2150
|
+
};
|
|
2151
|
+
}
|
|
2152
|
+
|
|
2125
2153
|
function createPublicAccessorDescriptor(key, descriptor) {
|
|
2126
2154
|
var _get3 = descriptor.get,
|
|
2127
2155
|
_set2 = descriptor.set,
|
|
@@ -2148,7 +2176,7 @@
|
|
|
2148
2176
|
var ro = vm.oar[key];
|
|
2149
2177
|
|
|
2150
2178
|
if (isUndefined$1(ro)) {
|
|
2151
|
-
ro = vm.oar[key] =
|
|
2179
|
+
ro = vm.oar[key] = createAccessorReactiveObserver(vm, _set2);
|
|
2152
2180
|
} // every time we invoke this setter from outside (through this wrapper setter)
|
|
2153
2181
|
// we should reset the value and then debounce just in case there is a pending
|
|
2154
2182
|
// invocation the next tick that is not longer relevant since the value is changing
|
|
@@ -2178,7 +2206,7 @@
|
|
|
2178
2206
|
|
|
2179
2207
|
function track(target) {
|
|
2180
2208
|
if (arguments.length === 1) {
|
|
2181
|
-
return
|
|
2209
|
+
return getReactiveProxy(target);
|
|
2182
2210
|
}
|
|
2183
2211
|
|
|
2184
2212
|
throw new Error();
|
|
@@ -2194,7 +2222,7 @@
|
|
|
2194
2222
|
set: function set(newValue) {
|
|
2195
2223
|
var vm = getAssociatedVM(this);
|
|
2196
2224
|
|
|
2197
|
-
var reactiveOrAnyValue =
|
|
2225
|
+
var reactiveOrAnyValue = getReactiveProxy(newValue);
|
|
2198
2226
|
|
|
2199
2227
|
if (reactiveOrAnyValue !== vm.cmpFields[key]) {
|
|
2200
2228
|
vm.cmpFields[key] = reactiveOrAnyValue;
|
|
@@ -2502,7 +2530,7 @@
|
|
|
2502
2530
|
fn = cachedSetterByKey[key] = function (newValue) {
|
|
2503
2531
|
var vm = getAssociatedVM(this);
|
|
2504
2532
|
var setHook = vm.setHook;
|
|
2505
|
-
newValue =
|
|
2533
|
+
newValue = getReadOnlyProxy(newValue);
|
|
2506
2534
|
setHook(vm.component, key, newValue);
|
|
2507
2535
|
};
|
|
2508
2536
|
}
|
|
@@ -3624,10 +3652,10 @@
|
|
|
3624
3652
|
svg = vnode.data.svg;
|
|
3625
3653
|
var createElement = renderer.createElement;
|
|
3626
3654
|
var namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
|
|
3627
|
-
var elm = createElement(sel, namespace);
|
|
3655
|
+
var elm = vnode.elm = createElement(sel, namespace);
|
|
3628
3656
|
linkNodeToShadow(elm, owner, renderer);
|
|
3629
|
-
|
|
3630
|
-
|
|
3657
|
+
applyStyleScoping(elm, owner, renderer);
|
|
3658
|
+
applyDomManual(elm, vnode);
|
|
3631
3659
|
patchElementPropsAndAttrs$1(null, vnode, renderer);
|
|
3632
3660
|
insertNode(elm, parent, anchor, renderer);
|
|
3633
3661
|
mountVNodes(vnode.children, elm, renderer, null);
|
|
@@ -3644,7 +3672,7 @@
|
|
|
3644
3672
|
var cloneNode = renderer.cloneNode,
|
|
3645
3673
|
isSyntheticShadowDefined = renderer.isSyntheticShadowDefined;
|
|
3646
3674
|
var elm = vnode.elm = cloneNode(vnode.fragment, true);
|
|
3647
|
-
linkNodeToShadow(elm, owner, renderer);
|
|
3675
|
+
linkNodeToShadow(elm, owner, renderer);
|
|
3648
3676
|
|
|
3649
3677
|
var renderMode = owner.renderMode,
|
|
3650
3678
|
shadowMode = owner.shadowMode;
|
|
@@ -3678,9 +3706,10 @@
|
|
|
3678
3706
|
// the custom element from the registry is expecting an upgrade callback
|
|
3679
3707
|
vm = createViewModelHook(elm, vnode, renderer);
|
|
3680
3708
|
});
|
|
3681
|
-
linkNodeToShadow(elm, owner, renderer);
|
|
3682
3709
|
vnode.elm = elm;
|
|
3683
3710
|
vnode.vm = vm;
|
|
3711
|
+
linkNodeToShadow(elm, owner, renderer);
|
|
3712
|
+
applyStyleScoping(elm, owner, renderer);
|
|
3684
3713
|
|
|
3685
3714
|
if (vm) {
|
|
3686
3715
|
allocateChildren(vnode, vm);
|
|
@@ -3797,26 +3826,6 @@
|
|
|
3797
3826
|
return vnode != null;
|
|
3798
3827
|
}
|
|
3799
3828
|
|
|
3800
|
-
function observeElementChildNodes(elm) {
|
|
3801
|
-
elm.$domManual$ = true;
|
|
3802
|
-
}
|
|
3803
|
-
|
|
3804
|
-
function setElementShadowToken(elm, token) {
|
|
3805
|
-
elm.$shadowToken$ = token;
|
|
3806
|
-
} // Set the scope token class for *.scoped.css styles
|
|
3807
|
-
|
|
3808
|
-
|
|
3809
|
-
function setScopeTokenClassIfNecessary(elm, owner, renderer) {
|
|
3810
|
-
var token = getScopeTokenClass(owner);
|
|
3811
|
-
|
|
3812
|
-
if (!isNull(token)) {
|
|
3813
|
-
var _getClassList = renderer.getClassList; // TODO [#2762]: this dot notation with add is probably problematic
|
|
3814
|
-
// probably we should have a renderer api for just the add operation
|
|
3815
|
-
|
|
3816
|
-
_getClassList(elm).add(token);
|
|
3817
|
-
}
|
|
3818
|
-
}
|
|
3819
|
-
|
|
3820
3829
|
function linkNodeToShadow(elm, owner, renderer) {
|
|
3821
3830
|
var renderRoot = owner.renderRoot,
|
|
3822
3831
|
renderMode = owner.renderMode,
|
|
@@ -3867,28 +3876,39 @@
|
|
|
3867
3876
|
patchProps(oldVnode, vnode, renderer);
|
|
3868
3877
|
}
|
|
3869
3878
|
|
|
3870
|
-
function
|
|
3871
|
-
|
|
3872
|
-
|
|
3879
|
+
function applyStyleScoping(elm, owner, renderer) {
|
|
3880
|
+
// Set the class name for `*.scoped.css` style scoping.
|
|
3881
|
+
var scopeToken = getScopeTokenClass(owner);
|
|
3882
|
+
|
|
3883
|
+
if (!isNull(scopeToken)) {
|
|
3884
|
+
var _getClassList = renderer.getClassList; // TODO [#2762]: this dot notation with add is probably problematic
|
|
3885
|
+
// probably we should have a renderer api for just the add operation
|
|
3886
|
+
|
|
3887
|
+
_getClassList(elm).add(scopeToken);
|
|
3888
|
+
} // Set property element for synthetic shadow DOM style scoping.
|
|
3889
|
+
|
|
3890
|
+
|
|
3891
|
+
var syntheticToken = owner.context.stylesheetToken;
|
|
3873
3892
|
|
|
3874
3893
|
if (owner.shadowMode === 1
|
|
3875
3894
|
/* ShadowMode.Synthetic */
|
|
3876
|
-
) {
|
|
3877
|
-
|
|
3878
|
-
|
|
3895
|
+
&& !isUndefined$1(syntheticToken)) {
|
|
3896
|
+
elm.$shadowToken$ = syntheticToken;
|
|
3897
|
+
}
|
|
3898
|
+
}
|
|
3879
3899
|
|
|
3880
|
-
|
|
3881
|
-
|
|
3882
|
-
) {
|
|
3883
|
-
// this element will now accept any manual content inserted into it
|
|
3884
|
-
observeElementChildNodes(elm);
|
|
3885
|
-
}
|
|
3900
|
+
function applyDomManual(elm, vnode) {
|
|
3901
|
+
var _a;
|
|
3886
3902
|
|
|
3887
|
-
|
|
3888
|
-
|
|
3889
|
-
|
|
3890
|
-
|
|
3891
|
-
|
|
3903
|
+
var owner = vnode.owner,
|
|
3904
|
+
context = vnode.data.context;
|
|
3905
|
+
|
|
3906
|
+
if (owner.shadowMode === 1
|
|
3907
|
+
/* ShadowMode.Synthetic */
|
|
3908
|
+
&& ((_a = context === null || context === void 0 ? void 0 : context.lwc) === null || _a === void 0 ? void 0 : _a.dom) === "manual"
|
|
3909
|
+
/* LwcDomMode.Manual */
|
|
3910
|
+
) {
|
|
3911
|
+
elm.$domManual$ = true;
|
|
3892
3912
|
}
|
|
3893
3913
|
}
|
|
3894
3914
|
|
|
@@ -3935,19 +3955,6 @@
|
|
|
3935
3955
|
mode = vnode.mode,
|
|
3936
3956
|
ctor = vnode.ctor,
|
|
3937
3957
|
owner = vnode.owner;
|
|
3938
|
-
setScopeTokenClassIfNecessary(elm, owner, renderer);
|
|
3939
|
-
|
|
3940
|
-
if (owner.shadowMode === 1
|
|
3941
|
-
/* ShadowMode.Synthetic */
|
|
3942
|
-
) {
|
|
3943
|
-
var stylesheetToken = owner.context.stylesheetToken; // when running in synthetic shadow mode, we need to set the shadowToken value
|
|
3944
|
-
// into each element from the template, so they can be styled accordingly.
|
|
3945
|
-
|
|
3946
|
-
if (!isUndefined$1(stylesheetToken)) {
|
|
3947
|
-
setElementShadowToken(elm, stylesheetToken);
|
|
3948
|
-
}
|
|
3949
|
-
}
|
|
3950
|
-
|
|
3951
3958
|
vm = createVM(elm, ctor, renderer, {
|
|
3952
3959
|
mode: mode,
|
|
3953
3960
|
owner: owner,
|
|
@@ -4977,7 +4984,7 @@
|
|
|
4977
4984
|
}
|
|
4978
4985
|
|
|
4979
4986
|
function getTemplateReactiveObserver(vm) {
|
|
4980
|
-
return
|
|
4987
|
+
return createReactiveObserver(function () {
|
|
4981
4988
|
var isDirty = vm.isDirty;
|
|
4982
4989
|
|
|
4983
4990
|
if (isFalse(isDirty)) {
|
|
@@ -5712,7 +5719,7 @@
|
|
|
5712
5719
|
function createConfigWatcher(component, configCallback, callbackWhenConfigIsReady) {
|
|
5713
5720
|
var hasPendingConfig = false; // creating the reactive observer for reactive params when needed
|
|
5714
5721
|
|
|
5715
|
-
var ro =
|
|
5722
|
+
var ro = createReactiveObserver(function () {
|
|
5716
5723
|
if (hasPendingConfig === false) {
|
|
5717
5724
|
hasPendingConfig = true; // collect new config in the micro-task
|
|
5718
5725
|
|
|
@@ -6003,7 +6010,7 @@
|
|
|
6003
6010
|
|
|
6004
6011
|
function readonly(obj) {
|
|
6005
6012
|
|
|
6006
|
-
return
|
|
6013
|
+
return getReadOnlyProxy(obj);
|
|
6007
6014
|
}
|
|
6008
6015
|
/*
|
|
6009
6016
|
* Copyright (c) 2022, salesforce.com, inc.
|
|
@@ -6485,7 +6492,7 @@
|
|
|
6485
6492
|
|
|
6486
6493
|
return ctor;
|
|
6487
6494
|
}
|
|
6488
|
-
/* version: 2.
|
|
6495
|
+
/* version: 2.22.0 */
|
|
6489
6496
|
|
|
6490
6497
|
/*
|
|
6491
6498
|
* Copyright (c) 2018, salesforce.com, inc.
|
|
@@ -6644,6 +6651,85 @@
|
|
|
6644
6651
|
*/
|
|
6645
6652
|
|
|
6646
6653
|
|
|
6654
|
+
var SUPPORTS_TEMPLATE = typeof HTMLTemplateElement === 'function';
|
|
6655
|
+
var createFragment;
|
|
6656
|
+
|
|
6657
|
+
if (SUPPORTS_TEMPLATE) {
|
|
6658
|
+
// Parse the fragment HTML string into DOM
|
|
6659
|
+
createFragment = function createFragment(html) {
|
|
6660
|
+
var template = document.createElement('template');
|
|
6661
|
+
template.innerHTML = html;
|
|
6662
|
+
return template.content.firstChild;
|
|
6663
|
+
};
|
|
6664
|
+
} else {
|
|
6665
|
+
// In browsers that don't support <template> (e.g. IE11), we need to be careful to wrap elements like
|
|
6666
|
+
// <td> in the proper container elements (e.g. <tbody>), because otherwise they will be parsed as null.
|
|
6667
|
+
// Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L273-L280
|
|
6668
|
+
// With other elements added from:
|
|
6669
|
+
// https://github.com/sindresorhus/html-tags/blob/95dcdd5/index.js
|
|
6670
|
+
// Using the test:
|
|
6671
|
+
// document.createRange().createContextualFragment(`<${tag}></${tag}>`).firstChild === null
|
|
6672
|
+
// And omitting <html>, <head>, and <body> as these are not practical in an LWC component.
|
|
6673
|
+
var topLevelWrappingMap = {
|
|
6674
|
+
caption: ['table'],
|
|
6675
|
+
col: ['colgroup', 'table'],
|
|
6676
|
+
colgroup: ['table'],
|
|
6677
|
+
option: ['select'],
|
|
6678
|
+
tbody: ['table'],
|
|
6679
|
+
td: ['tr', 'tbody', 'table'],
|
|
6680
|
+
th: ['tr', 'tbody', 'table'],
|
|
6681
|
+
thead: ['table'],
|
|
6682
|
+
tfoot: ['table'],
|
|
6683
|
+
tr: ['tbody', 'table']
|
|
6684
|
+
}; // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L282-L288
|
|
6685
|
+
|
|
6686
|
+
var getTagName = function getTagName(text) {
|
|
6687
|
+
return (/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(text) || ['', ''])[1].toLowerCase();
|
|
6688
|
+
}; // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L295-L320
|
|
6689
|
+
|
|
6690
|
+
|
|
6691
|
+
createFragment = function createFragment(html) {
|
|
6692
|
+
var wrapperTags = topLevelWrappingMap[getTagName(html)];
|
|
6693
|
+
|
|
6694
|
+
if (!isUndefined$1(wrapperTags)) {
|
|
6695
|
+
var _iterator5 = _createForOfIteratorHelper(wrapperTags),
|
|
6696
|
+
_step5;
|
|
6697
|
+
|
|
6698
|
+
try {
|
|
6699
|
+
for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {
|
|
6700
|
+
var wrapperTag = _step5.value;
|
|
6701
|
+
html = "<".concat(wrapperTag, ">").concat(html, "</").concat(wrapperTag, ">");
|
|
6702
|
+
}
|
|
6703
|
+
} catch (err) {
|
|
6704
|
+
_iterator5.e(err);
|
|
6705
|
+
} finally {
|
|
6706
|
+
_iterator5.f();
|
|
6707
|
+
}
|
|
6708
|
+
} // For IE11, the document title must not be undefined, but it can be an empty string
|
|
6709
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument#browser_compatibility
|
|
6710
|
+
|
|
6711
|
+
|
|
6712
|
+
var doc = document.implementation.createHTMLDocument('');
|
|
6713
|
+
doc.body.innerHTML = html;
|
|
6714
|
+
var content = doc.body;
|
|
6715
|
+
|
|
6716
|
+
if (!isUndefined$1(wrapperTags)) {
|
|
6717
|
+
for (var _i32 = 0; _i32 < wrapperTags.length; _i32++) {
|
|
6718
|
+
content = content.firstChild;
|
|
6719
|
+
}
|
|
6720
|
+
}
|
|
6721
|
+
|
|
6722
|
+
return content.firstChild;
|
|
6723
|
+
};
|
|
6724
|
+
}
|
|
6725
|
+
/*
|
|
6726
|
+
* Copyright (c) 2018, salesforce.com, inc.
|
|
6727
|
+
* All rights reserved.
|
|
6728
|
+
* SPDX-License-Identifier: MIT
|
|
6729
|
+
* For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
|
|
6730
|
+
*/
|
|
6731
|
+
|
|
6732
|
+
|
|
6647
6733
|
var getCustomElement;
|
|
6648
6734
|
var defineCustomElement;
|
|
6649
6735
|
var HTMLElementConstructor;
|
|
@@ -6744,10 +6830,6 @@
|
|
|
6744
6830
|
return node.cloneNode(deep);
|
|
6745
6831
|
}
|
|
6746
6832
|
|
|
6747
|
-
function createFragment(html) {
|
|
6748
|
-
return document.createRange().createContextualFragment(html).firstChild;
|
|
6749
|
-
}
|
|
6750
|
-
|
|
6751
6833
|
function createElement$1(tagName, namespace) {
|
|
6752
6834
|
return isUndefined$1(namespace) ? document.createElement(tagName) : document.createElementNS(namespace, tagName);
|
|
6753
6835
|
}
|
|
@@ -6966,8 +7048,8 @@
|
|
|
6966
7048
|
hydrated: true
|
|
6967
7049
|
});
|
|
6968
7050
|
|
|
6969
|
-
for (var
|
|
6970
|
-
var _Object$entries2$_i = _slicedToArray(_Object$entries2[
|
|
7051
|
+
for (var _i33 = 0, _Object$entries2 = Object.entries(props); _i33 < _Object$entries2.length; _i33++) {
|
|
7052
|
+
var _Object$entries2$_i = _slicedToArray(_Object$entries2[_i33], 2),
|
|
6971
7053
|
key = _Object$entries2$_i[0],
|
|
6972
7054
|
value = _Object$entries2$_i[1];
|
|
6973
7055
|
|
|
@@ -7292,7 +7374,7 @@
|
|
|
7292
7374
|
});
|
|
7293
7375
|
freeze(LightningElement);
|
|
7294
7376
|
seal(LightningElement.prototype);
|
|
7295
|
-
/* version: 2.
|
|
7377
|
+
/* version: 2.22.0 */
|
|
7296
7378
|
|
|
7297
7379
|
exports.LightningElement = LightningElement;
|
|
7298
7380
|
exports.__unstable__ProfilerControl = profilerControl;
|