Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: remove useless tsx support #39890

Merged
merged 11 commits into from Dec 29, 2022
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions components/_util/transKeys.ts
Expand Up @@ -5,6 +5,7 @@ export const groupKeysMap = (keys: string[]) => {
});
return map;
};

export const groupDisabledKeysMap = <RecordType extends any[]>(dataSource: RecordType) => {
const map = new Map<string, number>();
dataSource.forEach(({ disabled, key }, index) => {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
6 changes: 1 addition & 5 deletions components/carousel/index.tsx
Expand Up @@ -16,11 +16,7 @@ export interface CarouselProps extends Omit<Settings, 'dots' | 'dotsClass'> {
slickGoTo?: number;
dotPosition?: DotPosition;
children?: React.ReactNode;
dots?:
| boolean
| {
className?: string;
};
dots?: boolean | { className?: string };
}

export interface CarouselRef {
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,3 @@
import type { Context } from 'react';
import { createContext } from 'react';

export interface RowContextState {
Expand All @@ -7,6 +6,6 @@ export interface RowContextState {
supportFlexGap?: boolean;
}

const RowContext: Context<RowContextState> = createContext({});
const RowContext = createContext<RowContextState>({});

export default RowContext;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -2,7 +2,7 @@ import * as React from 'react';
import type { Locale } from '.';
import type { LocaleContextProps } from './context';
import LocaleContext from './context';
import defaultLocaleData from '../locale/en_US';
import defaultLocaleData from './en_US';

export type LocaleComponentName = Exclude<keyof Locale, 'locale'>;

Expand Down
2 changes: 1 addition & 1 deletion components/locale/ar_EG.tsx → components/locale/ar_EG.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/ar_EG';
import Calendar from '../calendar/locale/ar_EG';
import DatePicker from '../date-picker/locale/ar_EG';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/ar_EG';

const typeTemplate = 'ليس ${label} من نوع ${type} صالحًا';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/az_AZ.tsx → components/locale/az_AZ.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/az_AZ';
import Calendar from '../calendar/locale/az_AZ';
import DatePicker from '../date-picker/locale/az_AZ';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/az_AZ';

const typeTemplate = '${label}Hökmlü deyil${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/bg_BG.tsx → components/locale/bg_BG.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/bg_BG';
import Calendar from '../calendar/locale/bg_BG';
import DatePicker from '../date-picker/locale/bg_BG';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/bg_BG';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/bn_BD.tsx → components/locale/bn_BD.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/bn_BD';
import Calendar from '../calendar/locale/bn_BD';
import DatePicker from '../date-picker/locale/bn_BD';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/bn_BD';

const typeTemplate = '${label} টি সঠিক ${type} নয়।';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/by_BY.tsx → components/locale/by_BY.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/by_BY';
import Calendar from '../calendar/locale/by_BY';
import DatePicker from '../date-picker/locale/by_BY';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/by_BY';

const typeTemplate: string = "${label} не з'яўляецца тыпам ${type}";
Expand Down
2 changes: 1 addition & 1 deletion components/locale/ca_ES.tsx → components/locale/ca_ES.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/ca_ES';
import Calendar from '../calendar/locale/ca_ES';
import DatePicker from '../date-picker/locale/ca_ES';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/ca_ES';

const typeTemplate = '${label} no és un ${type} vàlid';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/cs_CZ.tsx → components/locale/cs_CZ.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/cs_CZ';
import Calendar from '../calendar/locale/cs_CZ';
import DatePicker from '../date-picker/locale/cs_CZ';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/cs_CZ';

const typeTemplate = '${label} není platný ${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/da_DK.tsx → components/locale/da_DK.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/da_DK';
import Calendar from '../calendar/locale/da_DK';
import DatePicker from '../date-picker/locale/da_DK';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/da_DK';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/de_DE.tsx → components/locale/de_DE.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/de_DE';
import Calendar from '../calendar/locale/de_DE';
import DatePicker from '../date-picker/locale/de_DE';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/de_DE';

const typeTemplate = '${label} ist nicht gültig. ${type} erwartet';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/el_GR.tsx → components/locale/el_GR.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/el_GR';
import Calendar from '../calendar/locale/el_GR';
import DatePicker from '../date-picker/locale/el_GR';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/el_GR';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/en_GB.tsx → components/locale/en_GB.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/en_GB';
import Calendar from '../calendar/locale/en_GB';
import DatePicker from '../date-picker/locale/en_GB';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/en_GB';

const typeTemplate = '${label} is not a valid ${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/en_US.tsx → components/locale/en_US.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/en_US';
import Calendar from '../calendar/locale/en_US';
import DatePicker from '../date-picker/locale/en_US';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/en_US';

const typeTemplate = '${label} is not a valid ${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/es_ES.tsx → components/locale/es_ES.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/es_ES';
import Calendar from '../calendar/locale/es_ES';
import DatePicker from '../date-picker/locale/es_ES';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/es_ES';

const typeTemplate = '${label} no es un ${type} válido';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/et_EE.tsx → components/locale/et_EE.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/et_EE';
import Calendar from '../calendar/locale/et_EE';
import DatePicker from '../date-picker/locale/et_EE';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/et_EE';

const typeTemplate = '${label} ei ole kehtiv ${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/eu_ES.tsx → components/locale/eu_ES.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/eu_ES';
import Calendar from '../calendar/locale/eu_ES';
import DatePicker from '../date-picker/locale/eu_ES';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/eu_ES';

const typeTemplate = '${label} ez da ${type} balioduna';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/fa_IR.tsx → components/locale/fa_IR.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/fa_IR';
import Calendar from '../calendar/locale/fa_IR';
import DatePicker from '../date-picker/locale/fa_IR';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/fa_IR';

const typeTemplate = '${label} از نوع ${type} معتبر نیست';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/fi_FI.tsx → components/locale/fi_FI.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/fi_FI';
import Calendar from '../calendar/locale/fi_FI';
import DatePicker from '../date-picker/locale/fi_FI';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/fi_FI';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/fr_BE.tsx → components/locale/fr_BE.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/fr_BE';
import Calendar from '../calendar/locale/fr_BE';
import DatePicker from '../date-picker/locale/fr_BE';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/fr_BE';

const typeTemplate = "La valeur du champ ${label} n'est pas valide pour le type ${type}";
Expand Down
2 changes: 1 addition & 1 deletion components/locale/fr_CA.tsx → components/locale/fr_CA.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/fr_CA';
import Calendar from '../calendar/locale/fr_CA';
import DatePicker from '../date-picker/locale/fr_CA';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/fr_CA';

const typeTemplate = "La valeur du champ ${label} n'est pas valide pour le type ${type}";
Expand Down
2 changes: 1 addition & 1 deletion components/locale/fr_FR.tsx → components/locale/fr_FR.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/fr_FR';
import Calendar from '../calendar/locale/fr_FR';
import DatePicker from '../date-picker/locale/fr_FR';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/fr_FR';

const typeTemplate = "La valeur du champ ${label} n'est pas valide pour le type ${type}";
Expand Down
2 changes: 1 addition & 1 deletion components/locale/ga_IE.tsx → components/locale/ga_IE.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/ga_IE';
import Calendar from '../calendar/locale/ga_IE';
import DatePicker from '../date-picker/locale/ga_IE';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/ga_IE';

const typeTemplate = '${label} is not a valid ${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/gl_ES.tsx → components/locale/gl_ES.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/gl_ES';
import Calendar from '../calendar/locale/gl_ES';
import DatePicker from '../date-picker/locale/gl_ES';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/gl_ES';

const typeTemplate = '${label} non é un ${type} válido';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/he_IL.tsx → components/locale/he_IL.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/he_IL';
import Calendar from '../calendar/locale/he_IL';
import DatePicker from '../date-picker/locale/he_IL';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/he_IL';

const typeTemplate = '${label} הוא לא ${type} תקין';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/hi_IN.tsx → components/locale/hi_IN.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/hi_IN';
import Calendar from '../calendar/locale/hi_IN';
import DatePicker from '../date-picker/locale/hi_IN';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/hi_IN';

const typeTemplate = '${label} मान्य ${type} नहीं है';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/hr_HR.tsx → components/locale/hr_HR.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/hr_HR';
import Calendar from '../calendar/locale/hr_HR';
import DatePicker from '../date-picker/locale/hr_HR';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/hr_HR';

const typeTemplate = '${label} nije valjan ${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/hu_HU.tsx → components/locale/hu_HU.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/hu_HU';
import Calendar from '../calendar/locale/hu_HU';
import DatePicker from '../date-picker/locale/hu_HU';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/hu_HU';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/hy_AM.tsx → components/locale/hy_AM.ts
@@ -1,5 +1,5 @@
import type { PickerLocale } from '../date-picker/generatePicker';
import type { Locale } from '../locale';
import type { Locale } from '.';

const datePickerLocale: PickerLocale = {
lang: {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/id_ID.tsx → components/locale/id_ID.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/id_ID';
import Calendar from '../calendar/locale/id_ID';
import DatePicker from '../date-picker/locale/id_ID';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/id_ID';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/is_IS.tsx → components/locale/is_IS.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/is_IS';
import Calendar from '../calendar/locale/is_IS';
import DatePicker from '../date-picker/locale/is_IS';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/is_IS';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/it_IT.tsx → components/locale/it_IT.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/it_IT';
import Calendar from '../calendar/locale/it_IT';
import DatePicker from '../date-picker/locale/it_IT';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/it_IT';

const typeTemplate = ' ${label} non è un ${type} valido';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/ja_JP.tsx → components/locale/ja_JP.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/ja_JP';
import Calendar from '../calendar/locale/ja_JP';
import DatePicker from '../date-picker/locale/ja_JP';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/ja_JP';

const typeTemplate = '${label}は有効な${type}ではありません';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/ka_GE.tsx → components/locale/ka_GE.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/ka_GE';
import Calendar from '../calendar/locale/ka_GE';
import DatePicker from '../date-picker/locale/ka_GE';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/ka_GE';

const typeTemplate = '${label} არ არის სწორი ${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/kk_KZ.tsx → components/locale/kk_KZ.ts
Expand Up @@ -3,7 +3,7 @@
import Pagination from 'rc-pagination/lib/locale/kk_KZ';
import Calendar from '../calendar/locale/kk_KZ';
import DatePicker from '../date-picker/locale/kk_KZ';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/kk_KZ';

const typeTemplate: string = '${label} ${type} типі емес';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/km_KH.tsx → components/locale/km_KH.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/km_KH';
import Calendar from '../calendar/locale/km_KH';
import DatePicker from '../date-picker/locale/km_KH';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/km_KH';

const typeTemplate = '${label} is not a valid ${type}';
Expand Down
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/kmr_IQ';
import Calendar from '../calendar/locale/kmr_IQ';
import DatePicker from '../date-picker/locale/kmr_IQ';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/kmr_IQ';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/kn_IN.tsx → components/locale/kn_IN.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/kn_IN';
import Calendar from '../calendar/locale/kn_IN';
import DatePicker from '../date-picker/locale/kn_IN';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/kn_IN';

const localeValues: Locale = {
Expand Down
2 changes: 1 addition & 1 deletion components/locale/ko_KR.tsx → components/locale/ko_KR.ts
Expand Up @@ -2,7 +2,7 @@
import Pagination from 'rc-pagination/lib/locale/ko_KR';
import Calendar from '../calendar/locale/ko_KR';
import DatePicker from '../date-picker/locale/ko_KR';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/ko_KR';

const typeTemplate = '${label} 유효하지 않은 ${type}';
Expand Down
2 changes: 1 addition & 1 deletion components/locale/ku_IQ.tsx → components/locale/ku_IQ.ts
@@ -1,7 +1,7 @@
import Pagination from 'rc-pagination/lib/locale/kmr_IQ';
import Calendar from '../calendar/locale/kmr_IQ';
import DatePicker from '../date-picker/locale/kmr_IQ';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/kmr_IQ';

// please use antd/locale/kmr_IQ instead
Expand Down
2 changes: 1 addition & 1 deletion components/locale/lt_LT.tsx → components/locale/lt_LT.ts
Expand Up @@ -3,7 +3,7 @@
import Pagination from 'rc-pagination/lib/locale/lt_LT';
import Calendar from '../calendar/locale/lt_LT';
import DatePicker from '../date-picker/locale/lt_LT';
import type { Locale } from '../locale';
import type { Locale } from '.';
import TimePicker from '../time-picker/locale/lt_LT';

const typeTemplate: string = '${label} neatitinka tipo ${type}';
Expand Down