@lwc/synthetic-shadow 2.17.0 → 2.19.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -148,7 +148,7 @@ const KEY__SYNTHETIC_MODE = '$$lwc-synthetic-mode';
148
148
  // We use this to detect symbol support in order to avoid the expensive symbol polyfill. Note that
149
149
  // we can't use typeof since it will fail when transpiling.
150
150
  const hasNativeSymbolSupport = /*@__PURE__*/ (() => Symbol('x').toString() === 'Symbol(x)')();
151
- /** version: 2.17.0 */
151
+ /** version: 2.19.1 */
152
152
 
153
153
  /*
154
154
  * Copyright (c) 2018, salesforce.com, inc.
@@ -157,7 +157,7 @@ const hasNativeSymbolSupport = /*@__PURE__*/ (() => Symbol('x').toString() === '
157
157
  * For full license text, see the LICENSE file in the repo root or https://opensource.org/licenses/MIT
158
158
  */
159
159
  // TODO [#2472]: Remove this workaround when appropriate.
160
- // eslint-disable-next-line lwc-internal/no-global-node
160
+ // eslint-disable-next-line @lwc/lwc-internal/no-global-node
161
161
  const _Node = Node;
162
162
  const nodePrototype = _Node.prototype;
163
163
  const { DOCUMENT_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_PRECEDING, DOCUMENT_POSITION_FOLLOWING, ELEMENT_NODE, TEXT_NODE, CDATA_SECTION_NODE, PROCESSING_INSTRUCTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, } = _Node;
@@ -1124,7 +1124,7 @@ if (!_globalThis.lwcRuntimeFlags) {
1124
1124
  Object.defineProperty(_globalThis, 'lwcRuntimeFlags', { value: create(null) });
1125
1125
  }
1126
1126
  const runtimeFlags = _globalThis.lwcRuntimeFlags;
1127
- /** version: 2.17.0 */
1127
+ /** version: 2.19.1 */
1128
1128
 
1129
1129
  /*
1130
1130
  * Copyright (c) 2018, salesforce.com, inc.
@@ -1689,7 +1689,7 @@ function getWrappedShadowRootListener(listener) {
1689
1689
  listener.call(currentTarget, event);
1690
1690
  }
1691
1691
  };
1692
- shadowRootWrappedListener.placement = 1 /* SHADOW_ROOT_LISTENER */;
1692
+ shadowRootWrappedListener.placement = 1 /* EventListenerContext.SHADOW_ROOT_LISTENER */;
1693
1693
  shadowRootEventListenerMap.set(listener, shadowRootWrappedListener);
1694
1694
  }
1695
1695
  return shadowRootWrappedListener;
@@ -1709,7 +1709,7 @@ function getWrappedCustomElementListener(listener) {
1709
1709
  listener.call(currentTarget, event);
1710
1710
  }
1711
1711
  };
1712
- customElementWrappedListener.placement = 0 /* CUSTOM_ELEMENT_LISTENER */;
1712
+ customElementWrappedListener.placement = 0 /* EventListenerContext.CUSTOM_ELEMENT_LISTENER */;
1713
1713
  customElementEventListenerMap.set(listener, customElementWrappedListener);
1714
1714
  }
1715
1715
  return customElementWrappedListener;
@@ -1753,14 +1753,14 @@ function domListener(evt) {
1753
1753
  }
1754
1754
  });
1755
1755
  }
1756
- eventToContextMap.set(evt, 1 /* SHADOW_ROOT_LISTENER */);
1757
- invokeListenersByPlacement(1 /* SHADOW_ROOT_LISTENER */);
1756
+ eventToContextMap.set(evt, 1 /* EventListenerContext.SHADOW_ROOT_LISTENER */);
1757
+ invokeListenersByPlacement(1 /* EventListenerContext.SHADOW_ROOT_LISTENER */);
1758
1758
  if (isFalse(immediatePropagationStopped) && isFalse(propagationStopped)) {
1759
1759
  // doing the second iteration only if the first one didn't interrupt the event propagation
1760
- eventToContextMap.set(evt, 0 /* CUSTOM_ELEMENT_LISTENER */);
1761
- invokeListenersByPlacement(0 /* CUSTOM_ELEMENT_LISTENER */);
1760
+ eventToContextMap.set(evt, 0 /* EventListenerContext.CUSTOM_ELEMENT_LISTENER */);
1761
+ invokeListenersByPlacement(0 /* EventListenerContext.CUSTOM_ELEMENT_LISTENER */);
1762
1762
  }
1763
- eventToContextMap.set(evt, 2 /* UNKNOWN_LISTENER */);
1763
+ eventToContextMap.set(evt, 2 /* EventListenerContext.UNKNOWN_LISTENER */);
1764
1764
  }
1765
1765
  function attachDOMListener(elm, type, wrappedListener) {
1766
1766
  const listenerMap = getEventMap(elm);
@@ -3363,7 +3363,7 @@ function patchedCurrentTargetGetter() {
3363
3363
  if (isNull(currentTarget)) {
3364
3364
  return null;
3365
3365
  }
3366
- if (eventToContextMap.get(this) === 1 /* SHADOW_ROOT_LISTENER */) {
3366
+ if (eventToContextMap.get(this) === 1 /* EventListenerContext.SHADOW_ROOT_LISTENER */) {
3367
3367
  return getShadowRoot(currentTarget);
3368
3368
  }
3369
3369
  return currentTarget;
@@ -3399,7 +3399,7 @@ function patchedTargetGetter() {
3399
3399
  // Address the possibility that `currentTarget` is a shadow root
3400
3400
  if (isSyntheticShadowHost(originalCurrentTarget)) {
3401
3401
  const context = eventToContextMap.get(this);
3402
- if (context === 1 /* SHADOW_ROOT_LISTENER */) {
3402
+ if (context === 1 /* EventListenerContext.SHADOW_ROOT_LISTENER */) {
3403
3403
  actualCurrentTarget = getShadowRoot(originalCurrentTarget);
3404
3404
  }
3405
3405
  }
@@ -4011,7 +4011,7 @@ function getFilteredArrayOfNodes(context, unfilteredNodes, shadowDomSemantic) {
4011
4011
  // context is handled by lwc, using getNodeNearestOwnerKey to include manually inserted elements in the same shadow.
4012
4012
  filtered = ArrayFilter.call(unfilteredNodes, elm => getNodeNearestOwnerKey(elm) === ownerKey);
4013
4013
  } else if (shadowDomSemantic === 1
4014
- /* Enabled */
4014
+ /* ShadowDomSemantic.Enabled */
4015
4015
  ) {
4016
4016
  // context is inside a shadow, we dont know which one.
4017
4017
  const contextNearestOwnerKey = getNodeNearestOwnerKey(context);
@@ -4022,7 +4022,7 @@ function getFilteredArrayOfNodes(context, unfilteredNodes, shadowDomSemantic) {
4022
4022
  }
4023
4023
  } else {
4024
4024
  if (context instanceof HTMLBodyElement || shadowDomSemantic === 1
4025
- /* Enabled */
4025
+ /* ShadowDomSemantic.Enabled */
4026
4026
  ) {
4027
4027
  // `context` is document.body or element belonging to the document with the patch enabled
4028
4028
  filtered = ArrayFilter.call(unfilteredNodes, // TODO [#1222]: remove global bypass
@@ -4058,13 +4058,13 @@ defineProperties(Element.prototype, {
4058
4058
 
4059
4059
  if (!runtimeFlags.ENABLE_NODE_LIST_PATCH) {
4060
4060
  const filteredResults = getFilteredArrayOfNodes(this, nodeList, 0
4061
- /* Disabled */
4061
+ /* ShadowDomSemantic.Disabled */
4062
4062
  );
4063
4063
  return createStaticNodeList(filteredResults);
4064
4064
  }
4065
4065
 
4066
4066
  return createStaticNodeList(getFilteredArrayOfNodes(this, nodeList, 1
4067
- /* Enabled */
4067
+ /* ShadowDomSemantic.Enabled */
4068
4068
  ));
4069
4069
  },
4070
4070
 
@@ -4085,7 +4085,7 @@ if (process.env.NODE_ENV !== 'test') {
4085
4085
  }
4086
4086
 
4087
4087
  const filteredResults = getFilteredArrayOfNodes(this, elements, 1
4088
- /* Enabled */
4088
+ /* ShadowDomSemantic.Enabled */
4089
4089
  );
4090
4090
  return createStaticHTMLCollection(filteredResults);
4091
4091
  },
@@ -4103,7 +4103,7 @@ if (process.env.NODE_ENV !== 'test') {
4103
4103
  }
4104
4104
 
4105
4105
  const filteredResults = getFilteredArrayOfNodes(this, elements, 1
4106
- /* Enabled */
4106
+ /* ShadowDomSemantic.Enabled */
4107
4107
  );
4108
4108
  return createStaticHTMLCollection(filteredResults);
4109
4109
  },
@@ -4121,7 +4121,7 @@ if (process.env.NODE_ENV !== 'test') {
4121
4121
  }
4122
4122
 
4123
4123
  const filteredResults = getFilteredArrayOfNodes(this, elements, 1
4124
- /* Enabled */
4124
+ /* ShadowDomSemantic.Enabled */
4125
4125
  );
4126
4126
  return createStaticHTMLCollection(filteredResults);
4127
4127
  },
@@ -5111,4 +5111,4 @@ if (process.env.NODE_ENV !== 'production' && typeof __karma__ !== 'undefined') {
5111
5111
  }));
5112
5112
  });
5113
5113
  }
5114
- /** version: 2.17.0 */
5114
+ /** version: 2.19.1 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lwc/synthetic-shadow",
3
- "version": "2.17.0",
3
+ "version": "2.19.1",
4
4
  "description": "Synthetic Shadow Root for LWC",
5
5
  "homepage": "https://lwc.dev/",
6
6
  "repository": {
@@ -37,7 +37,7 @@
37
37
  "access": "public"
38
38
  },
39
39
  "devDependencies": {
40
- "@lwc/features": "2.17.0",
41
- "@lwc/shared": "2.17.0"
40
+ "@lwc/features": "2.19.1",
41
+ "@lwc/shared": "2.19.1"
42
42
  }
43
43
  }