ant-design / ant-design
Showing 7 of 630 files from the diff.
Other files ignored by Codecov
.prettierrc has changed.
.stylelintrc.json has changed.
.depslintrc.js has changed.
.prettierignore has changed.
.eslintrc.js has changed.
package.json has changed.
README.md has changed.
.remarkrc.js has changed.
README-zh_CN.md has changed.

@@ -84,7 +84,10 @@
Loading
84 84
  return keys;
85 85
}
86 86
87 -
export function convertDirectoryKeysToNodes(rootChildren: React.ReactNode | React.ReactNode[], keys: string[]) {
87 +
export function convertDirectoryKeysToNodes(
88 +
  rootChildren: React.ReactNode | React.ReactNode[],
89 +
  keys: string[],
90 +
) {
88 91
  const restKeys: string[] = [...keys];
89 92
  const nodes: AntTreeNode[] = [];
90 93
  traverseNodesKey(rootChildren, (key: string, node: AntTreeNode) => {
@@ -97,4 +100,4 @@
Loading
97 100
    return !!restKeys.length;
98 101
  });
99 102
  return nodes;
100 -
}

@@ -1,19 +1,19 @@
Loading
1 -
import CalendarLocale from 'rc-calendar/lib/locale/ar_EG';
2 -
import TimePickerLocale from '../../time-picker/locale/ar_EG';
3 -
4 -
// Merge into a locale object
5 -
const locale = {
6 -
  lang: {
7 -
    placeholder: 'اختيار التاريخ',
8 -
    rangePlaceholder: ['البداية', 'النهاية'],
9 -
    ...CalendarLocale,
10 -
  },
11 -
  timePickerLocale: {
12 -
    ...TimePickerLocale,
13 -
  },
14 -
};
15 -
16 -
// All settings at:
17 -
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
18 -
19 -
export default locale;
1 +
import CalendarLocale from 'rc-calendar/lib/locale/ar_EG';
2 +
import TimePickerLocale from '../../time-picker/locale/ar_EG';
3 +
4 +
// Merge into a locale object
5 +
const locale = {
6 +
  lang: {
7 +
    placeholder: 'اختيار التاريخ',
8 +
    rangePlaceholder: ['البداية', 'النهاية'],
9 +
    ...CalendarLocale,
10 +
  },
11 +
  timePickerLocale: {
12 +
    ...TimePickerLocale,
13 +
  },
14 +
};
15 +
16 +
// All settings at:
17 +
// https://github.com/ant-design/ant-design/blob/master/components/date-picker/locale/example.json
18 +
19 +
export default locale;

@@ -10,18 +10,23 @@
Loading
10 10
    : ({ top: 0, bottom: window.innerHeight } as ClientRect);
11 11
}
12 12
13 -
export function getFixedTop(placeholderReact: Rect, targetRect: Rect, offsetTop: number | undefined) {
13 +
export function getFixedTop(
14 +
  placeholderReact: Rect,
15 +
  targetRect: Rect,
16 +
  offsetTop: number | undefined,
17 +
) {
14 18
  if (offsetTop !== undefined && targetRect.top > placeholderReact.top - offsetTop) {
15 19
    return offsetTop + targetRect.top;
16 20
  }
17 21
  return undefined;
18 22
}
19 23
20 -
export function getFixedBottom(placeholderReact: Rect, targetRect: Rect, offsetBottom: number | undefined) {
21 -
  if (
22 -
    offsetBottom !== undefined &&
23 -
    targetRect.bottom < placeholderReact.bottom + offsetBottom
24 -
  ) {
24 +
export function getFixedBottom(
25 +
  placeholderReact: Rect,
26 +
  targetRect: Rect,
27 +
  offsetBottom: number | undefined,
28 +
) {
29 +
  if (offsetBottom !== undefined && targetRect.bottom < placeholderReact.bottom + offsetBottom) {
25 30
    const targetBottomOffset = window.innerHeight - targetRect.bottom;
26 31
    return offsetBottom + targetBottomOffset;
27 32
  }

@@ -4,4 +4,4 @@
Loading
4 4
  if (!React.isValidElement(element)) return element;
5 5
6 6
  return React.cloneElement(element, ...restArgs);
7 -
}

@@ -35,4 +35,4 @@
Loading
35 35
  delete ids[pid];
36 36
};
37 37
38 -
wrapperRaf.ids = ids; // export this for test usage

@@ -261,7 +261,7 @@
Loading
261 261
        confirm: this.handleConfirm,
262 262
        clearFilters: this.handleClearFilters,
263 263
        filters: column.filters,
264 -
        getPopupContainer: (triggerNode: HTMLElement) => triggerNode.parentNode,
264 +
        getPopupContainer: (triggerNode: HTMLElement) => triggerNode.parentNode as HTMLElement,
265 265
      });
266 266
    }
267 267

@@ -1,14 +1,14 @@
Loading
1 -
import * as moment from 'moment';
2 -
3 -
export function formatDate(
4 -
  value: moment.Moment | undefined | null,
5 -
  format: string | string[],
6 -
): string {
7 -
  if (!value) {
8 -
    return '';
9 -
  }
10 -
  if (Array.isArray(format)) {
11 -
    format = format[0];
12 -
  }
13 -
  return value.format(format);
14 -
}
1 +
import * as moment from 'moment';
2 +
3 +
export function formatDate(
4 +
  value: moment.Moment | undefined | null,
5 +
  format: string | string[],
6 +
): string {
7 +
  if (!value) {
8 +
    return '';
9 +
  }
10 +
  if (Array.isArray(format)) {
11 +
    format = format[0];
12 +
  }
13 +
  return value.format(format);
14 +
}
Files Coverage
components 95.65%
Project Totals (258 files) 95.65%
1
codecov:
2
  branch: master
3

4
coverage:
5
  status:
6
    project:
7
      default:
8
        # Fail the status if coverage drops by >= 0.1%
9
        threshold: 0.1
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading