Browse Source
fix: add displayName (#40092)
* fix: add displayName
* rerun ci
* rerun ci
pull/40096/head
lijianan
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
43 changed files with
166 additions and
6 deletions
-
components/_util/wave/index.ts
-
components/alert/index.tsx
-
components/anchor/Anchor.tsx
-
components/auto-complete/index.tsx
-
components/back-top/index.tsx
-
components/badge/Ribbon.tsx
-
components/badge/index.tsx
-
components/breadcrumb/Breadcrumb.tsx
-
components/calendar/generateCalendar.tsx
-
components/card/index.ts
-
components/carousel/index.tsx
-
components/checkbox/index.ts
-
components/collapse/Collapse.tsx
-
components/config-provider/index.tsx
-
components/descriptions/index.tsx
-
components/divider/index.tsx
-
components/dropdown/dropdown.tsx
-
components/empty/index.tsx
-
components/float-button/BackTop.tsx
-
components/image/index.tsx
-
components/input-number/index.tsx
-
components/input/index.ts
-
components/list/index.tsx
-
components/locale/index.tsx
-
components/menu/index.tsx
-
components/modal/index.tsx
-
components/pagination/Pagination.tsx
-
components/popconfirm/index.tsx
-
components/progress/progress.tsx
-
components/qrcode/index.tsx
-
components/result/index.tsx
-
components/result/noFound.tsx
-
components/result/serverError.tsx
-
components/result/unauthorized.tsx
-
components/select/index.tsx
-
components/skeleton/Skeleton.tsx
-
components/space/index.tsx
-
components/statistic/Statistic.tsx
-
components/steps/index.tsx
-
components/tabs/index.tsx
-
components/timeline/Timeline.tsx
-
components/tree/Tree.tsx
-
components/watermark/index.tsx
|
|
@ -68,4 +68,8 @@ const Wave: React.FC<WaveProps> = (props) => { |
|
|
|
return cloneElement(children, { ref }); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Wave.displayName = 'Wave'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Wave; |
|
|
|
|
|
@ -207,4 +207,8 @@ const Alert: CompoundedComponent = ({ |
|
|
|
|
|
|
|
Alert.ErrorBoundary = ErrorBoundary; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Alert.displayName = 'Alert'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Alert; |
|
|
|
|
|
@ -349,4 +349,8 @@ const Anchor: React.FC<AnchorProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Anchor.displayName = 'Anchor'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Anchor; |
|
|
|
|
|
@ -180,4 +180,8 @@ const PurePanel = genPurePanel(RefAutoComplete); |
|
|
|
RefAutoComplete.Option = Option; |
|
|
|
RefAutoComplete._InternalPanelDoNotUseOrYouWillBeFired = PurePanel; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
AutoComplete.displayName = 'AutoComplete'; |
|
|
|
} |
|
|
|
|
|
|
|
export default RefAutoComplete; |
|
|
|
|
|
@ -111,4 +111,8 @@ const BackTop: React.FC<BackTopProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
BackTop.displayName = 'BackTop'; |
|
|
|
} |
|
|
|
|
|
|
|
export default React.memo(BackTop); |
|
|
|
|
|
@ -18,7 +18,7 @@ export interface RibbonProps { |
|
|
|
placement?: RibbonPlacement; |
|
|
|
} |
|
|
|
|
|
|
|
const Ribbon: React.FC<RibbonProps> = function Ribbon({ |
|
|
|
const Ribbon: React.FC<RibbonProps> = ({ |
|
|
|
className, |
|
|
|
prefixCls: customizePrefixCls, |
|
|
|
style, |
|
|
@ -26,7 +26,7 @@ const Ribbon: React.FC<RibbonProps> = function Ribbon({ |
|
|
|
children, |
|
|
|
text, |
|
|
|
placement = 'end', |
|
|
|
}) { |
|
|
|
}) => { |
|
|
|
const { getPrefixCls, direction } = React.useContext(ConfigContext); |
|
|
|
const prefixCls = getPrefixCls('ribbon', customizePrefixCls); |
|
|
|
const colorInPreset = isPresetColor(color, false); |
|
|
@ -57,4 +57,8 @@ const Ribbon: React.FC<RibbonProps> = function Ribbon({ |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Ribbon.displayName = 'Ribbon'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Ribbon; |
|
|
|
|
|
@ -243,4 +243,8 @@ const Badge: CompoundedComponent = ({ |
|
|
|
|
|
|
|
Badge.Ribbon = Ribbon; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Badge.displayName = 'Badge'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Badge; |
|
|
|
|
|
@ -163,7 +163,10 @@ const Breadcrumb: CompoundedComponent = ({ |
|
|
|
}; |
|
|
|
|
|
|
|
Breadcrumb.Item = BreadcrumbItem; |
|
|
|
|
|
|
|
Breadcrumb.Separator = BreadcrumbSeparator; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Breadcrumb.displayName = 'Breadcrumb'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Breadcrumb; |
|
|
|
|
|
@ -290,6 +290,10 @@ function generateCalendar<DateType>(generateConfig: GenerateConfig<DateType>) { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Calendar.displayName = 'Calendar'; |
|
|
|
} |
|
|
|
|
|
|
|
return Calendar; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
@ -18,4 +18,8 @@ const Card = InternalCard as CardInterface; |
|
|
|
Card.Grid = Grid; |
|
|
|
Card.Meta = Meta; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Card.displayName = 'Card'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Card; |
|
|
|
|
|
@ -112,4 +112,8 @@ const Carousel = React.forwardRef<CarouselRef, CarouselProps>( |
|
|
|
}, |
|
|
|
); |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Carousel.displayName = 'Carousel'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Carousel; |
|
|
|
|
|
@ -19,4 +19,8 @@ const Checkbox = InternalCheckbox as CompoundedComponent; |
|
|
|
Checkbox.Group = Group; |
|
|
|
Checkbox.__ANT_CHECKBOX = true; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Checkbox.displayName = 'Checkbox'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Checkbox; |
|
|
|
|
|
@ -145,4 +145,8 @@ const Collapse: CompoundedComponent = (props) => { |
|
|
|
|
|
|
|
Collapse.Panel = CollapsePanel; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Collapse.displayName = 'Collapse'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Collapse; |
|
|
|
|
|
@ -326,4 +326,8 @@ ConfigProvider.ConfigContext = ConfigContext; |
|
|
|
ConfigProvider.SizeContext = SizeContext; |
|
|
|
ConfigProvider.config = setGlobalConfig; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
ConfigProvider.displayName = 'ConfigProvider'; |
|
|
|
} |
|
|
|
|
|
|
|
export default ConfigProvider; |
|
|
|
|
|
@ -202,6 +202,10 @@ function Descriptions({ |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Descriptions.displayName = 'Descriptions'; |
|
|
|
} |
|
|
|
|
|
|
|
Descriptions.Item = DescriptionsItem; |
|
|
|
|
|
|
|
export default Descriptions; |
|
|
|
|
|
@ -79,4 +79,8 @@ const Divider: React.FC<DividerProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Divider.displayName = 'Divider'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Divider; |
|
|
|
|
|
@ -307,4 +307,8 @@ const WrapPurePanel = (props: DropdownProps) => ( |
|
|
|
|
|
|
|
Dropdown._InternalPanelDoNotUseOrYouWillBeFired = WrapPurePanel; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Dropdown.displayName = 'Dropdown'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Dropdown; |
|
|
|
|
|
@ -86,4 +86,8 @@ const Empty: CompoundedComponent = ({ |
|
|
|
Empty.PRESENTED_IMAGE_DEFAULT = defaultEmptyImg; |
|
|
|
Empty.PRESENTED_IMAGE_SIMPLE = simpleEmptyImg; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Empty.displayName = 'Empty'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Empty; |
|
|
|
|
|
@ -82,4 +82,8 @@ const BackTop: React.FC<BackTopProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
BackTop.displayName = 'BackTop'; |
|
|
|
} |
|
|
|
|
|
|
|
export default memo(BackTop); |
|
|
|
|
|
@ -68,4 +68,8 @@ export { ImageProps }; |
|
|
|
|
|
|
|
Image.PreviewGroup = PreviewGroup; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Image.displayName = 'Image'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Image; |
|
|
|
|
|
@ -232,6 +232,10 @@ const PureInputNumber = (props: InputNumberProps<any>) => ( |
|
|
|
</ConfigProvider> |
|
|
|
); |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
TypedInputNumber.displayName = 'InputNumber'; |
|
|
|
} |
|
|
|
|
|
|
|
TypedInputNumber._InternalPanelDoNotUseOrYouWillBeFired = PureInputNumber; |
|
|
|
|
|
|
|
export default TypedInputNumber; |
|
|
|
|
|
@ -23,6 +23,10 @@ type CompoundedComponent = React.ForwardRefExoticComponent< |
|
|
|
|
|
|
|
const Input = InternalInput as CompoundedComponent; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Input.displayName = 'Input'; |
|
|
|
} |
|
|
|
|
|
|
|
Input.Group = Group; |
|
|
|
Input.Search = Search; |
|
|
|
Input.TextArea = TextArea; |
|
|
|
|
|
@ -294,6 +294,10 @@ function List<T>({ |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
List.displayName = 'List'; |
|
|
|
} |
|
|
|
|
|
|
|
List.Item = Item; |
|
|
|
|
|
|
|
export default List; |
|
|
|
|
|
@ -87,4 +87,8 @@ const LocaleProvider: React.FC<LocaleProviderProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
LocaleProvider.displayName = 'LocaleProvider'; |
|
|
|
} |
|
|
|
|
|
|
|
export default LocaleProvider; |
|
|
|
|
|
@ -46,4 +46,8 @@ Menu.SubMenu = SubMenu; |
|
|
|
Menu.Divider = MenuDivider; |
|
|
|
Menu.ItemGroup = ItemGroup; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Menu.displayName = 'Menu'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Menu; |
|
|
|
|
|
@ -65,4 +65,8 @@ Modal.config = modalGlobalConfig; |
|
|
|
|
|
|
|
Modal._InternalPanelDoNotUseOrYouWillBeFired = PurePanel; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Modal.displayName = 'Modal'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Modal; |
|
|
|
|
|
@ -125,4 +125,8 @@ const Pagination: React.FC<PaginationProps> = ({ |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Pagination.displayName = 'Pagination'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Pagination; |
|
|
|
|
|
@ -135,4 +135,8 @@ const Popconfirm = React.forwardRef<unknown, PopconfirmProps>((props, ref) => { |
|
|
|
/* istanbul ignore next */ |
|
|
|
Popconfirm._InternalPanelDoNotUseOrYouWillBeFired = PurePanel; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Popconfirm.displayName = 'Popconfirm'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Popconfirm; |
|
|
|
|
|
@ -183,4 +183,8 @@ const Progress: React.FC<ProgressProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Progress.displayName = 'Progress'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Progress; |
|
|
|
|
|
@ -97,4 +97,8 @@ const QRCode: React.FC<QRCodeProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
QRCode.displayName = 'QRCode'; |
|
|
|
} |
|
|
|
|
|
|
|
export default QRCode; |
|
|
|
|
|
@ -146,4 +146,8 @@ Result.PRESENTED_IMAGE_403 = ExceptionMap['403']; |
|
|
|
Result.PRESENTED_IMAGE_404 = ExceptionMap['404']; |
|
|
|
Result.PRESENTED_IMAGE_500 = ExceptionMap['500']; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Result.displayName = 'Result'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Result; |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import * as React from 'react'; |
|
|
|
|
|
|
|
const NoFound = () => ( |
|
|
|
const NoFound: React.FC = () => ( |
|
|
|
<svg width="252" height="294"> |
|
|
|
<defs> |
|
|
|
<path d="M0 .387h251.772v251.772H0z" /> |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import * as React from 'react'; |
|
|
|
|
|
|
|
const ServerError = () => ( |
|
|
|
const ServerError: React.FC = () => ( |
|
|
|
<svg width="254" height="294"> |
|
|
|
<defs> |
|
|
|
<path d="M0 .335h253.49v253.49H0z" /> |
|
|
|
|
|
@ -1,6 +1,6 @@ |
|
|
|
import * as React from 'react'; |
|
|
|
|
|
|
|
const Unauthorized = () => ( |
|
|
|
const Unauthorized: React.FC = () => ( |
|
|
|
<svg width="251" height="294"> |
|
|
|
<g fill="none" fillRule="evenodd"> |
|
|
|
<path |
|
|
|
|
|
@ -230,6 +230,10 @@ const InternalSelect = <OptionType extends BaseOptionType | DefaultOptionType = |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
InternalSelect.displayName = 'Select'; |
|
|
|
} |
|
|
|
|
|
|
|
const Select = React.forwardRef(InternalSelect) as unknown as (< |
|
|
|
ValueType = any, |
|
|
|
OptionType extends BaseOptionType | DefaultOptionType = DefaultOptionType, |
|
|
|
|
|
@ -186,4 +186,8 @@ Skeleton.Input = SkeletonInput; |
|
|
|
Skeleton.Image = SkeletonImage; |
|
|
|
Skeleton.Node = SkeletonNode; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Skeleton.displayName = 'Skeleton'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Skeleton; |
|
|
|
|
|
@ -151,11 +151,16 @@ const Space: React.FC<SpaceProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Space.displayName = 'Space'; |
|
|
|
} |
|
|
|
|
|
|
|
type CompoundedComponent = React.FC<SpaceProps> & { |
|
|
|
Compact: typeof Compact; |
|
|
|
}; |
|
|
|
|
|
|
|
const CompoundedSpace = Space as CompoundedComponent; |
|
|
|
|
|
|
|
CompoundedSpace.Compact = Compact; |
|
|
|
|
|
|
|
export default CompoundedSpace; |
|
|
|
|
|
@ -84,6 +84,10 @@ const Statistic: React.FC<StatisticProps> & CompoundedComponent = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Statistic.displayName = 'Statistic'; |
|
|
|
} |
|
|
|
|
|
|
|
Statistic.Countdown = Countdown; |
|
|
|
|
|
|
|
export default Statistic; |
|
|
|
|
|
@ -136,4 +136,8 @@ const Steps: CompoundedComponent = (props) => { |
|
|
|
|
|
|
|
Steps.Step = RcSteps.Step; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Steps.displayName = 'Steps'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Steps; |
|
|
|
|
|
@ -105,4 +105,8 @@ function Tabs({ |
|
|
|
|
|
|
|
Tabs.TabPane = TabPane; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Tabs.displayName = 'Tabs'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Tabs; |
|
|
|
|
|
@ -107,4 +107,8 @@ const Timeline: CompoundedComponent = (props) => { |
|
|
|
|
|
|
|
Timeline.Item = TimelineItem; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Timeline.displayName = 'Timeline'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Timeline; |
|
|
|
|
|
@ -248,4 +248,8 @@ const Tree = React.forwardRef<RcTree, TreeProps>((props, ref) => { |
|
|
|
); |
|
|
|
}); |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Tree.displayName = 'Tree'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Tree; |
|
|
|
|
|
@ -246,4 +246,8 @@ const Watermark: React.FC<WatermarkProps> = (props) => { |
|
|
|
); |
|
|
|
}; |
|
|
|
|
|
|
|
if (process.env.NODE_ENV !== 'production') { |
|
|
|
Watermark.displayName = 'Watermark'; |
|
|
|
} |
|
|
|
|
|
|
|
export default Watermark; |
|
|
|