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.
Files changed (35) hide show
  1. package/dist/engine-dom/esm/es2017/engine-dom.js +181 -127
  2. package/dist/engine-dom/iife/es2017/engine-dom.js +181 -127
  3. package/dist/engine-dom/iife/es2017/engine-dom.min.js +1 -1
  4. package/dist/engine-dom/iife/es2017/engine-dom_debug.js +168 -115
  5. package/dist/engine-dom/iife/es5/engine-dom.js +226 -147
  6. package/dist/engine-dom/iife/es5/engine-dom.min.js +1 -1
  7. package/dist/engine-dom/iife/es5/engine-dom_debug.js +201 -119
  8. package/dist/engine-dom/umd/es2017/engine-dom.js +181 -127
  9. package/dist/engine-dom/umd/es2017/engine-dom.min.js +1 -1
  10. package/dist/engine-dom/umd/es2017/engine-dom_debug.js +168 -115
  11. package/dist/engine-dom/umd/es5/engine-dom.js +226 -147
  12. package/dist/engine-dom/umd/es5/engine-dom.min.js +1 -1
  13. package/dist/engine-dom/umd/es5/engine-dom_debug.js +201 -119
  14. package/dist/engine-server/commonjs/es2017/engine-server.js +89 -318
  15. package/dist/engine-server/commonjs/es2017/engine-server.min.js +1 -1
  16. package/dist/engine-server/esm/es2017/engine-server.js +89 -318
  17. package/dist/synthetic-shadow/esm/es2017/synthetic-shadow.js +3 -3
  18. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow.js +3 -3
  19. package/dist/synthetic-shadow/iife/es2017/synthetic-shadow_debug.js +3 -3
  20. package/dist/synthetic-shadow/iife/es5/synthetic-shadow.js +3 -3
  21. package/dist/synthetic-shadow/iife/es5/synthetic-shadow_debug.js +3 -3
  22. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow.js +3 -3
  23. package/dist/synthetic-shadow/umd/es2017/synthetic-shadow_debug.js +3 -3
  24. package/dist/synthetic-shadow/umd/es5/synthetic-shadow.js +3 -3
  25. package/dist/synthetic-shadow/umd/es5/synthetic-shadow_debug.js +3 -3
  26. package/dist/wire-service/esm/es2017/wire-service.js +2 -2
  27. package/dist/wire-service/iife/es2017/wire-service.js +2 -2
  28. package/dist/wire-service/iife/es2017/wire-service_debug.js +2 -2
  29. package/dist/wire-service/iife/es5/wire-service.js +2 -2
  30. package/dist/wire-service/iife/es5/wire-service_debug.js +2 -2
  31. package/dist/wire-service/umd/es2017/wire-service.js +2 -2
  32. package/dist/wire-service/umd/es2017/wire-service_debug.js +2 -2
  33. package/dist/wire-service/umd/es5/wire-service.js +2 -2
  34. package/dist/wire-service/umd/es5/wire-service_debug.js +2 -2
  35. package/package.json +7 -7
@@ -302,9 +302,9 @@ var LWC = (function (exports) {
302
302
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
303
303
  */
304
304
  // Increment whenever the LWC template compiler changes
305
- const LWC_VERSION = "2.20.4";
305
+ const LWC_VERSION = "2.22.0";
306
306
  const LWC_VERSION_COMMENT_REGEX = /\/\*LWC compiler v([\d.]+)\*\/\s*}/;
307
- /** version: 2.20.4 */
307
+ /** version: 2.22.0 */
308
308
 
309
309
  /*
310
310
  * Copyright (c) 2018, salesforce.com, inc.
@@ -458,7 +458,7 @@ var LWC = (function (exports) {
458
458
  setFeatureFlag(name, value);
459
459
  }
460
460
  }
461
- /** version: 2.20.4 */
461
+ /** version: 2.22.0 */
462
462
 
463
463
  /*
464
464
  * Copyright (c) 2018, salesforce.com, inc.
@@ -690,18 +690,21 @@ var LWC = (function (exports) {
690
690
  ArrayPush$1.call(this.listeners, reactiveObservers);
691
691
  }
692
692
  }
693
-
694
- /*
695
- * Copyright (c) 2018, salesforce.com, inc.
696
- * All rights reserved.
697
- * SPDX-License-Identifier: MIT
698
- * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
699
- */
700
693
  function componentValueMutated(vm, key) {
701
- valueMutated(vm.component, key);
694
+ // On the server side, we don't need mutation tracking. Skipping it improves performance.
695
+ {
696
+ valueMutated(vm.component, key);
697
+ }
702
698
  }
703
699
  function componentValueObserved(vm, key) {
704
- valueObserved(vm.component, key);
700
+ // On the server side, we don't need mutation tracking. Skipping it improves performance.
701
+ {
702
+ valueObserved(vm.component, key);
703
+ }
704
+ }
705
+ function createReactiveObserver(callback) {
706
+ // On the server side, we don't need mutation tracking. Skipping it improves performance.
707
+ return new ReactiveObserver(callback) ;
705
708
  }
706
709
 
707
710
  /*
@@ -1823,7 +1826,24 @@ var LWC = (function (exports) {
1823
1826
  * change or being removed.
1824
1827
  */
1825
1828
  function unwrap(value) {
1826
- return reactiveMembrane.unwrapProxy(value);
1829
+ // On the server side, we don't need mutation tracking. Skipping it improves performance.
1830
+ return reactiveMembrane.unwrapProxy(value) ;
1831
+ }
1832
+ function getReadOnlyProxy(value) {
1833
+ // We must return a frozen wrapper around the value, so that child components cannot mutate properties passed to
1834
+ // them from their parents. This applies to both the client and server.
1835
+ return reactiveMembrane.getReadOnlyProxy(value);
1836
+ }
1837
+ function getReactiveProxy(value) {
1838
+ // On the server side, we don't need mutation tracking. Skipping it improves performance.
1839
+ return reactiveMembrane.getProxy(value) ;
1840
+ }
1841
+ // Making the component instance a live value when using Locker to support expandos.
1842
+ function markLockerLiveObject(obj) {
1843
+ // On the server side, we don't need mutation tracking. Skipping it improves performance.
1844
+ {
1845
+ obj[lockerLivePropertyKey] = undefined;
1846
+ }
1827
1847
  }
1828
1848
 
1829
1849
  /*
@@ -1913,8 +1933,7 @@ var LWC = (function (exports) {
1913
1933
  vm.setHook = setHook;
1914
1934
  vm.getHook = getHook;
1915
1935
  }
1916
- // Making the component instance a live value when using Locker to support expandos.
1917
- this[lockerLivePropertyKey] = undefined;
1936
+ markLockerLiveObject(this);
1918
1937
  // Linking elm, shadow root and component with the VM.
1919
1938
  associateVM(component, vm);
1920
1939
  associateVM(elm, vm);
@@ -2183,6 +2202,45 @@ var LWC = (function (exports) {
2183
2202
  configurable: true,
2184
2203
  };
2185
2204
  }
2205
+ class AccessorReactiveObserver extends ReactiveObserver {
2206
+ constructor(vm, set) {
2207
+ super(() => {
2208
+ if (isFalse(this.debouncing)) {
2209
+ this.debouncing = true;
2210
+ addCallbackToNextTick(() => {
2211
+ if (isTrue(this.debouncing)) {
2212
+ const { value } = this;
2213
+ const { isDirty: dirtyStateBeforeSetterCall, component, idx } = vm;
2214
+ set.call(component, value);
2215
+ // de-bouncing after the call to the original setter to prevent
2216
+ // infinity loop if the setter itself is mutating things that
2217
+ // were accessed during the previous invocation.
2218
+ this.debouncing = false;
2219
+ if (isTrue(vm.isDirty) && isFalse(dirtyStateBeforeSetterCall) && idx > 0) {
2220
+ // immediate rehydration due to a setter driven mutation, otherwise
2221
+ // the component will get rendered on the second tick, which it is not
2222
+ // desirable.
2223
+ rerenderVM(vm);
2224
+ }
2225
+ }
2226
+ });
2227
+ }
2228
+ });
2229
+ this.debouncing = false;
2230
+ }
2231
+ reset(value) {
2232
+ super.reset();
2233
+ this.debouncing = false;
2234
+ if (arguments.length > 0) {
2235
+ this.value = value;
2236
+ }
2237
+ }
2238
+ }
2239
+ function createAccessorReactiveObserver(vm, set) {
2240
+ // On the server side, we don't need mutation tracking. Skipping it improves performance.
2241
+ return new AccessorReactiveObserver(vm, set)
2242
+ ;
2243
+ }
2186
2244
 
2187
2245
  /*
2188
2246
  * Copyright (c) 2018, salesforce.com, inc.
@@ -2231,50 +2289,6 @@ var LWC = (function (exports) {
2231
2289
  configurable: true
2232
2290
  };
2233
2291
  }
2234
- class AccessorReactiveObserver extends ReactiveObserver {
2235
- constructor(vm, set) {
2236
- super(() => {
2237
- if (isFalse(this.debouncing)) {
2238
- this.debouncing = true;
2239
- addCallbackToNextTick(() => {
2240
- if (isTrue(this.debouncing)) {
2241
- const {
2242
- value
2243
- } = this;
2244
- const {
2245
- isDirty: dirtyStateBeforeSetterCall,
2246
- component,
2247
- idx
2248
- } = vm;
2249
- set.call(component, value); // de-bouncing after the call to the original setter to prevent
2250
- // infinity loop if the setter itself is mutating things that
2251
- // were accessed during the previous invocation.
2252
-
2253
- this.debouncing = false;
2254
-
2255
- if (isTrue(vm.isDirty) && isFalse(dirtyStateBeforeSetterCall) && idx > 0) {
2256
- // immediate rehydration due to a setter driven mutation, otherwise
2257
- // the component will get rendered on the second tick, which it is not
2258
- // desirable.
2259
- rerenderVM(vm);
2260
- }
2261
- }
2262
- });
2263
- }
2264
- });
2265
- this.debouncing = false;
2266
- }
2267
-
2268
- reset(value) {
2269
- super.reset();
2270
- this.debouncing = false;
2271
-
2272
- if (arguments.length > 0) {
2273
- this.value = value;
2274
- }
2275
- }
2276
-
2277
- }
2278
2292
  function createPublicAccessorDescriptor(key, descriptor) {
2279
2293
  const {
2280
2294
  get,
@@ -2315,7 +2329,7 @@ var LWC = (function (exports) {
2315
2329
  let ro = vm.oar[key];
2316
2330
 
2317
2331
  if (isUndefined$1(ro)) {
2318
- ro = vm.oar[key] = new AccessorReactiveObserver(vm, set);
2332
+ ro = vm.oar[key] = createAccessorReactiveObserver(vm, set);
2319
2333
  } // every time we invoke this setter from outside (through this wrapper setter)
2320
2334
  // we should reset the value and then debounce just in case there is a pending
2321
2335
  // invocation the next tick that is not longer relevant since the value is changing
@@ -2347,7 +2361,7 @@ var LWC = (function (exports) {
2347
2361
  */
2348
2362
  function track(target) {
2349
2363
  if (arguments.length === 1) {
2350
- return reactiveMembrane.getProxy(target);
2364
+ return getReactiveProxy(target);
2351
2365
  }
2352
2366
  if (process.env.NODE_ENV !== 'production') {
2353
2367
  assert.fail(`@track decorator can only be used with one argument to return a trackable object, or as a decorator function.`);
@@ -2368,7 +2382,7 @@ var LWC = (function (exports) {
2368
2382
  assert.invariant(!isInvokingRender, `${vmBeingRendered}.render() method has side effects on the state of ${vm}.${toString$1(key)}`);
2369
2383
  assert.invariant(!isUpdatingTemplate, `Updating the template of ${vmBeingRendered} has side effects on the state of ${vm}.${toString$1(key)}`);
2370
2384
  }
2371
- const reactiveOrAnyValue = reactiveMembrane.getProxy(newValue);
2385
+ const reactiveOrAnyValue = getReactiveProxy(newValue);
2372
2386
  if (reactiveOrAnyValue !== vm.cmpFields[key]) {
2373
2387
  vm.cmpFields[key] = reactiveOrAnyValue;
2374
2388
  componentValueMutated(vm, key);
@@ -2760,7 +2774,7 @@ var LWC = (function (exports) {
2760
2774
  fn = cachedSetterByKey[key] = function (newValue) {
2761
2775
  const vm = getAssociatedVM(this);
2762
2776
  const { setHook } = vm;
2763
- newValue = reactiveMembrane.getReadOnlyProxy(newValue);
2777
+ newValue = getReadOnlyProxy(newValue);
2764
2778
  setHook(vm.component, key, newValue);
2765
2779
  };
2766
2780
  }
@@ -3900,10 +3914,11 @@ var LWC = (function (exports) {
3900
3914
  const { sel, owner, data: { svg }, } = vnode;
3901
3915
  const { createElement } = renderer;
3902
3916
  const namespace = isTrue(svg) ? SVG_NAMESPACE : undefined;
3903
- const elm = createElement(sel, namespace);
3917
+ const elm = (vnode.elm = createElement(sel, namespace));
3904
3918
  linkNodeToShadow(elm, owner, renderer);
3905
- fallbackElmHook(elm, vnode, renderer);
3906
- vnode.elm = elm;
3919
+ applyStyleScoping(elm, owner, renderer);
3920
+ applyDomManual(elm, vnode);
3921
+ applyElementRestrictions(elm, vnode);
3907
3922
  patchElementPropsAndAttrs$1(null, vnode, renderer);
3908
3923
  insertNode(elm, parent, anchor, renderer);
3909
3924
  mountVNodes(vnode.children, elm, renderer, null);
@@ -3918,6 +3933,7 @@ var LWC = (function (exports) {
3918
3933
  const { cloneNode, isSyntheticShadowDefined } = renderer;
3919
3934
  const elm = (vnode.elm = cloneNode(vnode.fragment, true));
3920
3935
  linkNodeToShadow(elm, owner, renderer);
3936
+ applyElementRestrictions(elm, vnode);
3921
3937
  // Marks this node as Static to propagate the shadow resolver. must happen after elm is assigned to the proper shadow
3922
3938
  const { renderMode, shadowMode } = owner;
3923
3939
  if (isSyntheticShadowDefined) {
@@ -3925,10 +3941,6 @@ var LWC = (function (exports) {
3925
3941
  elm[KEY__SHADOW_STATIC] = true;
3926
3942
  }
3927
3943
  }
3928
- if (process.env.NODE_ENV !== 'production') {
3929
- const isLight = renderMode === 0 /* RenderMode.Light */;
3930
- patchElementWithRestrictions(elm, { isPortal: false, isLight });
3931
- }
3932
3944
  insertNode(elm, parent, anchor, renderer);
3933
3945
  }
3934
3946
  function mountCustomElement(vnode, parent, anchor, renderer) {
@@ -3945,9 +3957,10 @@ var LWC = (function (exports) {
3945
3957
  // the custom element from the registry is expecting an upgrade callback
3946
3958
  vm = createViewModelHook(elm, vnode, renderer);
3947
3959
  });
3948
- linkNodeToShadow(elm, owner, renderer);
3949
3960
  vnode.elm = elm;
3950
3961
  vnode.vm = vm;
3962
+ linkNodeToShadow(elm, owner, renderer);
3963
+ applyStyleScoping(elm, owner, renderer);
3951
3964
  if (vm) {
3952
3965
  allocateChildren(vnode, vm);
3953
3966
  }
@@ -4031,22 +4044,6 @@ var LWC = (function (exports) {
4031
4044
  function isVNode(vnode) {
4032
4045
  return vnode != null;
4033
4046
  }
4034
- function observeElementChildNodes(elm) {
4035
- elm.$domManual$ = true;
4036
- }
4037
- function setElementShadowToken(elm, token) {
4038
- elm.$shadowToken$ = token;
4039
- }
4040
- // Set the scope token class for *.scoped.css styles
4041
- function setScopeTokenClassIfNecessary(elm, owner, renderer) {
4042
- const token = getScopeTokenClass(owner);
4043
- if (!isNull(token)) {
4044
- const { getClassList } = renderer;
4045
- // TODO [#2762]: this dot notation with add is probably problematic
4046
- // probably we should have a renderer api for just the add operation
4047
- getClassList(elm).add(token);
4048
- }
4049
- }
4050
4047
  function linkNodeToShadow(elm, owner, renderer) {
4051
4048
  const { renderRoot, renderMode, shadowMode } = owner;
4052
4049
  const { isSyntheticShadowDefined } = renderer;
@@ -4099,31 +4096,37 @@ var LWC = (function (exports) {
4099
4096
  patchAttributes(oldVnode, vnode, renderer);
4100
4097
  patchProps(oldVnode, vnode, renderer);
4101
4098
  }
4102
- function fallbackElmHook(elm, vnode, renderer) {
4103
- const { owner } = vnode;
4104
- setScopeTokenClassIfNecessary(elm, owner, renderer);
4105
- if (owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
4106
- const { data: { context }, } = vnode;
4107
- const { stylesheetToken } = owner.context;
4108
- if (!isUndefined$1(context) &&
4109
- !isUndefined$1(context.lwc) &&
4110
- context.lwc.dom === "manual" /* LwcDomMode.Manual */) {
4111
- // this element will now accept any manual content inserted into it
4112
- observeElementChildNodes(elm);
4113
- }
4114
- if (!isUndefined$1(stylesheetToken)) {
4115
- // when running in synthetic shadow mode, we need to set the shadowToken value
4116
- // into each element from the template, so they can be styled accordingly.
4117
- setElementShadowToken(elm, stylesheetToken);
4118
- }
4099
+ function applyStyleScoping(elm, owner, renderer) {
4100
+ // Set the class name for `*.scoped.css` style scoping.
4101
+ const scopeToken = getScopeTokenClass(owner);
4102
+ if (!isNull(scopeToken)) {
4103
+ const { getClassList } = renderer;
4104
+ // TODO [#2762]: this dot notation with add is probably problematic
4105
+ // probably we should have a renderer api for just the add operation
4106
+ getClassList(elm).add(scopeToken);
4107
+ }
4108
+ // Set property element for synthetic shadow DOM style scoping.
4109
+ const { stylesheetToken: syntheticToken } = owner.context;
4110
+ if (owner.shadowMode === 1 /* ShadowMode.Synthetic */ && !isUndefined$1(syntheticToken)) {
4111
+ elm.$shadowToken$ = syntheticToken;
4112
+ }
4113
+ }
4114
+ function applyDomManual(elm, vnode) {
4115
+ var _a;
4116
+ const { owner, data: { context }, } = vnode;
4117
+ if (owner.shadowMode === 1 /* ShadowMode.Synthetic */ && ((_a = context === null || context === void 0 ? void 0 : context.lwc) === null || _a === void 0 ? void 0 : _a.dom) === "manual" /* LwcDomMode.Manual */) {
4118
+ elm.$domManual$ = true;
4119
4119
  }
4120
+ }
4121
+ function applyElementRestrictions(elm, vnode) {
4122
+ var _a, _b;
4120
4123
  if (process.env.NODE_ENV !== 'production') {
4121
- const { data: { context }, } = vnode;
4122
- const isPortal = !isUndefined$1(context) &&
4123
- !isUndefined$1(context.lwc) &&
4124
- context.lwc.dom === "manual" /* LwcDomMode.Manual */;
4125
- const isLight = owner.renderMode === 0 /* RenderMode.Light */;
4126
- patchElementWithRestrictions(elm, { isPortal, isLight });
4124
+ const isPortal = vnode.type === 2 /* VNodeType.Element */ && ((_b = (_a = vnode.data.context) === null || _a === void 0 ? void 0 : _a.lwc) === null || _b === void 0 ? void 0 : _b.dom) === "manual" /* LwcDomMode.Manual */;
4125
+ const isLight = vnode.owner.renderMode === 0 /* RenderMode.Light */;
4126
+ patchElementWithRestrictions(elm, {
4127
+ isPortal,
4128
+ isLight,
4129
+ });
4127
4130
  }
4128
4131
  }
4129
4132
  function allocateChildren(vnode, vm) {
@@ -4158,15 +4161,6 @@ var LWC = (function (exports) {
4158
4161
  return vm;
4159
4162
  }
4160
4163
  const { sel, mode, ctor, owner } = vnode;
4161
- setScopeTokenClassIfNecessary(elm, owner, renderer);
4162
- if (owner.shadowMode === 1 /* ShadowMode.Synthetic */) {
4163
- const { stylesheetToken } = owner.context;
4164
- // when running in synthetic shadow mode, we need to set the shadowToken value
4165
- // into each element from the template, so they can be styled accordingly.
4166
- if (!isUndefined$1(stylesheetToken)) {
4167
- setElementShadowToken(elm, stylesheetToken);
4168
- }
4169
- }
4170
4164
  vm = createVM(elm, ctor, renderer, {
4171
4165
  mode,
4172
4166
  owner,
@@ -5216,7 +5210,7 @@ var LWC = (function (exports) {
5216
5210
  return signedTemplateMap.get(Ctor);
5217
5211
  }
5218
5212
  function getTemplateReactiveObserver(vm) {
5219
- return new ReactiveObserver(() => {
5213
+ return createReactiveObserver(() => {
5220
5214
  const { isDirty } = vm;
5221
5215
  if (isFalse(isDirty)) {
5222
5216
  markComponentAsDirty(vm);
@@ -6031,7 +6025,7 @@ var LWC = (function (exports) {
6031
6025
  function createConfigWatcher(component, configCallback, callbackWhenConfigIsReady) {
6032
6026
  let hasPendingConfig = false; // creating the reactive observer for reactive params when needed
6033
6027
 
6034
- const ro = new ReactiveObserver(() => {
6028
+ const ro = createReactiveObserver(() => {
6035
6029
  if (hasPendingConfig === false) {
6036
6030
  hasPendingConfig = true; // collect new config in the micro-task
6037
6031
 
@@ -6327,7 +6321,7 @@ var LWC = (function (exports) {
6327
6321
  assert.fail('@readonly cannot be used as a decorator just yet, use it as a function with one argument to produce a readonly version of the provided value.');
6328
6322
  }
6329
6323
  }
6330
- return reactiveMembrane.getReadOnlyProxy(obj);
6324
+ return getReadOnlyProxy(obj);
6331
6325
  }
6332
6326
 
6333
6327
  /*
@@ -6838,7 +6832,7 @@ var LWC = (function (exports) {
6838
6832
  }
6839
6833
  return ctor;
6840
6834
  }
6841
- /* version: 2.20.4 */
6835
+ /* version: 2.22.0 */
6842
6836
 
6843
6837
  /*
6844
6838
  * Copyright (c) 2018, salesforce.com, inc.
@@ -6982,6 +6976,69 @@ var LWC = (function (exports) {
6982
6976
  }
6983
6977
  }
6984
6978
 
6979
+ /*
6980
+ * Copyright (c) 2018, salesforce.com, inc.
6981
+ * All rights reserved.
6982
+ * SPDX-License-Identifier: MIT
6983
+ * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
6984
+ */
6985
+ const SUPPORTS_TEMPLATE = typeof HTMLTemplateElement === 'function';
6986
+ let createFragment;
6987
+ if (SUPPORTS_TEMPLATE) {
6988
+ // Parse the fragment HTML string into DOM
6989
+ createFragment = function (html) {
6990
+ const template = document.createElement('template');
6991
+ template.innerHTML = html;
6992
+ return template.content.firstChild;
6993
+ };
6994
+ }
6995
+ else {
6996
+ // In browsers that don't support <template> (e.g. IE11), we need to be careful to wrap elements like
6997
+ // <td> in the proper container elements (e.g. <tbody>), because otherwise they will be parsed as null.
6998
+ // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L273-L280
6999
+ // With other elements added from:
7000
+ // https://github.com/sindresorhus/html-tags/blob/95dcdd5/index.js
7001
+ // Using the test:
7002
+ // document.createRange().createContextualFragment(`<${tag}></${tag}>`).firstChild === null
7003
+ // And omitting <html>, <head>, and <body> as these are not practical in an LWC component.
7004
+ const topLevelWrappingMap = {
7005
+ caption: ['table'],
7006
+ col: ['colgroup', 'table'],
7007
+ colgroup: ['table'],
7008
+ option: ['select'],
7009
+ tbody: ['table'],
7010
+ td: ['tr', 'tbody', 'table'],
7011
+ th: ['tr', 'tbody', 'table'],
7012
+ thead: ['table'],
7013
+ tfoot: ['table'],
7014
+ tr: ['tbody', 'table'],
7015
+ };
7016
+ // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L282-L288
7017
+ const getTagName = function (text) {
7018
+ return (/<([a-z][^/\0>\x20\t\r\n\f]+)/i.exec(text) || ['', ''])[1].toLowerCase();
7019
+ };
7020
+ // Via https://github.com/webcomponents/polyfills/blob/ee1db33/packages/template/template.js#L295-L320
7021
+ createFragment = function (html) {
7022
+ const wrapperTags = topLevelWrappingMap[getTagName(html)];
7023
+ if (!isUndefined$1(wrapperTags)) {
7024
+ for (const wrapperTag of wrapperTags) {
7025
+ html = `<${wrapperTag}>${html}</${wrapperTag}>`;
7026
+ }
7027
+ }
7028
+ // For IE11, the document title must not be undefined, but it can be an empty string
7029
+ // https://developer.mozilla.org/en-US/docs/Web/API/DOMImplementation/createHTMLDocument#browser_compatibility
7030
+ const doc = document.implementation.createHTMLDocument('');
7031
+ doc.body.innerHTML = html;
7032
+ let content = doc.body;
7033
+ if (!isUndefined$1(wrapperTags)) {
7034
+ for (let i = 0; i < wrapperTags.length; i++) {
7035
+ content = content.firstChild;
7036
+ }
7037
+ }
7038
+ return content.firstChild;
7039
+ };
7040
+ }
7041
+
6985
7042
  /*
6986
7043
  * Copyright (c) 2018, salesforce.com, inc.
6987
7044
  * All rights reserved.
@@ -7060,9 +7117,6 @@ var LWC = (function (exports) {
7060
7117
  function cloneNode(node, deep) {
7061
7118
  return node.cloneNode(deep);
7062
7119
  }
7063
- function createFragment(html) {
7064
- return document.createRange().createContextualFragment(html).firstChild;
7065
- }
7066
7120
  function createElement$1(tagName, namespace) {
7067
7121
  return isUndefined$1(namespace)
7068
7122
  ? document.createElement(tagName)
@@ -7526,7 +7580,7 @@ var LWC = (function (exports) {
7526
7580
  });
7527
7581
  freeze(LightningElement);
7528
7582
  seal(LightningElement.prototype);
7529
- /* version: 2.20.4 */
7583
+ /* version: 2.22.0 */
7530
7584
 
7531
7585
  exports.LightningElement = LightningElement;
7532
7586
  exports.__unstable__ProfilerControl = profilerControl;