react-component / motion

Compare 194cb5d ... +0 ... 217c865

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 1 files from the diff.

@@ -1,6 +1,7 @@
Loading
1 1
/* eslint react/prop-types: 0 */
2 2
import * as React from 'react';
3 -
import OriginCSSMotion, { CSSMotionProps } from './CSSMotion';
3 +
import OriginCSSMotion from './CSSMotion';
4 +
import type { CSSMotionProps } from './CSSMotion';
4 5
import { supportTransition } from './util/motion';
5 6
import {
6 7
  STATUS_ADD,
@@ -9,8 +10,8 @@
Loading
9 10
  STATUS_REMOVED,
10 11
  diffKeys,
11 12
  parseKeys,
12 -
  KeyObject,
13 13
} from './util/diff';
14 +
import type { KeyObject } from './util/diff';
14 15
15 16
const MOTION_PROP_NAMES = [
16 17
  'eventProps',
@@ -36,7 +37,8 @@
Loading
36 37
];
37 38
38 39
export interface CSSMotionListProps
39 -
  extends Omit<CSSMotionProps, 'onVisibleChanged'> {
40 +
  extends Omit<CSSMotionProps, 'onVisibleChanged'>,
41 +
    Omit<React.HTMLAttributes<any>, 'children'> {
40 42
  keys: (React.Key | { key: React.Key; [name: string]: any })[];
41 43
  component?: string | React.ComponentType | false;
42 44
@@ -77,7 +79,7 @@
Loading
77 79
      const mixedKeyEntities = diffKeys(keyEntities, parsedKeyObjects);
78 80
79 81
      return {
80 -
        keyEntities: mixedKeyEntities.filter((entity) => {
82 +
        keyEntities: mixedKeyEntities.filter(entity => {
81 83
          const prevEntity = keyEntities.find(({ key }) => entity.key === key);
82 84
83 85
          // Remove if already mark as removed
@@ -95,7 +97,7 @@
Loading
95 97
96 98
    removeKey = (removeKey: React.Key) => {
97 99
      this.setState(({ keyEntities }) => ({
98 -
        keyEntities: keyEntities.map((entity) => {
100 +
        keyEntities: keyEntities.map(entity => {
99 101
          if (entity.key !== removeKey) return entity;
100 102
          return {
101 103
            ...entity,
@@ -117,7 +119,7 @@
Loading
117 119
      const Component = component || React.Fragment;
118 120
119 121
      const motionProps: CSSMotionProps = {};
120 -
      MOTION_PROP_NAMES.forEach((prop) => {
122 +
      MOTION_PROP_NAMES.forEach(prop => {
121 123
        motionProps[prop] = restProps[prop];
122 124
        delete restProps[prop];
123 125
      });
@@ -133,7 +135,7 @@
Loading
133 135
                key={eventProps.key}
134 136
                visible={visible}
135 137
                eventProps={eventProps}
136 -
                onVisibleChanged={(changedVisible) => {
138 +
                onVisibleChanged={changedVisible => {
137 139
                  onVisibleChanged?.(changedVisible, { key: eventProps.key });
138 140
139 141
                  if (!changedVisible) {

Everything is accounted for!

No changes detected that need to be reviewed.
What changes does Codecov check for?
Lines, not adjusted in diff, that have changed coverage data.
Files that introduced coverage data that had none before.
Files that have missing coverage data that once were tracked.
Files Coverage
src 98.63%
Project Totals (12 files) 98.63%
Loading