Skip to content

Commit

Permalink
Revert "Merge pull request #9572 from weseek/support/upgrade-react"
Browse files Browse the repository at this point in the history
This reverts commit 6eb1da1, reversing
changes made to 5e0e337.
  • Loading branch information
miya committed Jan 22, 2025
1 parent f9d65f9 commit 3c03ef6
Show file tree
Hide file tree
Showing 357 changed files with 1,527 additions and 1,794 deletions.
8 changes: 4 additions & 4 deletions apps/app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,12 @@
"prop-types": "^15.8.1",
"qs": "^6.11.1",
"rate-limiter-flexible": "^2.3.7",
"react": "^18.3.0",
"react": "^18.2.0",
"react-bootstrap-typeahead": "^6.3.2",
"react-card-flip": "^1.0.10",
"react-datepicker": "^4.7.0",
"react-disable": "^0.1.1",
"react-dom": "^18.3.0",
"react-dom": "^18.2.0",
"react-error-boundary": "^3.1.4",
"react-i18next": "^15.1.1",
"react-image-crop": "^8.3.0",
Expand Down Expand Up @@ -264,8 +264,8 @@
"@types/ldapjs": "^2.2.5",
"@types/mdast": "^4.0.4",
"@types/node-cron": "^3.0.11",
"@types/react": "^18.3.0",
"@types/react-dom": "^18.3.0",
"@types/react": "^18.2.14",
"@types/react-dom": "^18.2.6",
"@types/react-input-autosize": "^2.2.4",
"@types/react-scroll": "^1.8.4",
"@types/react-stickynode": "^4.0.3",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ type EnvVarsTableProps = {
}

export const EnvVarsTable: React.FC<EnvVarsTableProps> = (props: EnvVarsTableProps) => {
const envVarRows: React.ReactElement[] = [];
const envVarRows: JSX.Element[] = [];

for (const [key, value] of Object.entries(props.envVars)) {
if (value != null) {
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/client/components/Admin/App/AppSetting.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const AppSetting = (props) => {
<input
className="form-control"
type="text"
defaultValue={adminAppContainer.state.title || ''}
defaletValue={adminAppContainer.state.title || ''}
onChange={(e) => {
adminAppContainer.changeTitle(e.target.value);
}}
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/client/components/Admin/App/AwsSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type AwsSettingMoleculeProps = {
onChangeS3SecretAccessKey: (val: string) => void
};

export const AwsSettingMolecule = (props: AwsSettingMoleculeProps): React.ReactElement => {
export const AwsSettingMolecule = (props: AwsSettingMoleculeProps): JSX.Element => {
const { t } = useTranslation();

return (
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/client/components/Admin/App/AzureSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export type AzureSettingMoleculeProps = {
onChangeAzureStorageContainerName: (val: string) => void
};

export const AzureSettingMolecule = (props: AzureSettingMoleculeProps): React.ReactElement => {
export const AzureSettingMolecule = (props: AzureSettingMoleculeProps): JSX.Element => {
const { t } = useTranslation();

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ type FileUploadSettingMoleculeProps = {
onChangeFileUploadType: (e: ChangeEvent, type: string) => void
} & AwsSettingMoleculeProps & GcsSettingMoleculeProps & AzureSettingMoleculeProps;

export const FileUploadSettingMolecule = React.memo((props: FileUploadSettingMoleculeProps): React.ReactElement => {
export const FileUploadSettingMolecule = React.memo((props: FileUploadSettingMoleculeProps): JSX.Element => {
const { t } = useTranslation(['admin', 'commons']);

return (
Expand Down Expand Up @@ -136,7 +136,7 @@ type FileUploadSettingProps = {
adminAppContainer: AdminAppContainer
}

const FileUploadSetting = (props: FileUploadSettingProps): React.ReactElement => {
const FileUploadSetting = (props: FileUploadSettingProps): JSX.Element => {
const { t } = useTranslation(['admin', 'commons']);
const { adminAppContainer } = props;

Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/client/components/Admin/App/GcsSetting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export type GcsSettingMoleculeProps = {
onChangeGcsUploadNamespace: (val: string) => void
};

export const GcsSettingMolecule = (props: GcsSettingMoleculeProps): React.ReactElement => {
export const GcsSettingMolecule = (props: GcsSettingMoleculeProps): JSX.Element => {
const { t } = useTranslation();

const {
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/client/components/Admin/App/MaskedInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Props = {
tabIndex?: number | undefined
};

export default function MaskedInput(props: Props): React.ReactElement {
export default function MaskedInput(props: Props): JSX.Element {
const [passwordShown, setPasswordShown] = useState(false);
const togglePassword = () => {
setPasswordShown(!passwordShown);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { useSWRxAppSettings } from '~/stores/admin/app-settings';

import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';

const QuestionnaireSettings = (): React.ReactElement => {
const QuestionnaireSettings = (): JSX.Element => {
const { t } = useTranslation(['admin', 'commons']);

const { data, error, mutate } = useSWRxAppSettings();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ type Props = {

}

export const AdminInstallButtonRow = (props: Props): React.ReactElement => {
export const AdminInstallButtonRow = (props: Props): JSX.Element => {
return (
<div className="row my-3">
<div className="mx-auto">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ type Props = {
disabled?: boolean,
}

const AdminUpdateButtonRow = (props: Props): React.ReactElement => {
const AdminUpdateButtonRow = (props: Props): JSX.Element => {
const { t } = useTranslation('admin');

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Props = {
isInProgress?: boolean,
}

const LabeledProgressBar = (props: Props): React.ReactElement => {
const LabeledProgressBar = (props: Props): JSX.Element => {
const {
header, currentCount, totalCount, isInProgress,
} = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Props = {
adminCustomizeContainer: AdminCustomizeContainer
}

const CustomizeCssSetting = (props: Props): React.ReactElement => {
const CustomizeCssSetting = (props: Props): JSX.Element => {

const { adminCustomizeContainer } = props;
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Props = {
children: React.ReactNode,
}

const CustomizeFunctionOption = (props: Props): React.ReactElement => {
const CustomizeFunctionOption = (props: Props): JSX.Element => {

const {
optionId, label, isChecked, onChecked, children,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Props = {
adminCustomizeContainer: AdminCustomizeContainer
}

const CustomizeFunctionSetting = (props: Props): React.ReactElement => {
const CustomizeFunctionSetting = (props: Props): JSX.Element => {

const { adminCustomizeContainer } = props;
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const useIsContainerFluid = () => {
};
};

const CustomizeLayoutSetting = (): React.ReactElement => {
const CustomizeLayoutSetting = (): JSX.Element => {
const { t } = useTranslation('admin');

const { resolvedTheme } = useNextThemes();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import AdminUpdateButtonRow from '../Common/AdminUpdateButtonRow';
const DEFAULT_LOGO = '/images/logo.svg';
const CUSTOMIZED_LOGO = '/attachment/brand-logo';

const CustomizeLogoSetting = (): React.ReactElement => {
const CustomizeLogoSetting = (): JSX.Element => {

const { t } = useTranslation();
const { data: isDefaultLogo } = useIsDefaultLogo();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Props = {
adminCustomizeContainer: AdminCustomizeContainer
}

const CustomizeNoscriptSetting = (props: Props): React.ReactElement => {
const CustomizeNoscriptSetting = (props: Props): JSX.Element => {

const { adminCustomizeContainer } = props;
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Props = {
adminCustomizeContainer: AdminCustomizeContainer
}

const CustomizePresentationSetting = (props: Props): React.ReactElement => {
const CustomizePresentationSetting = (props: Props): JSX.Element => {
const { adminCustomizeContainer } = props;
const { t } = useTranslation();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type Props = {
adminCustomizeContainer: AdminCustomizeContainer
}

const CustomizeScriptSetting = (props: Props): React.ReactElement => {
const CustomizeScriptSetting = (props: Props): JSX.Element => {

const { adminCustomizeContainer } = props;
const { t } = useTranslation();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { toastSuccess, toastError } from '~/client/util/toastr';
import { useNextThemes } from '~/stores-universal/use-next-themes';
import { useSWRxSidebarConfig } from '~/stores/admin/sidebar-config';

const CustomizeSidebarsetting = (): React.ReactElement => {
const CustomizeSidebarsetting = (): JSX.Element => {
const { t } = useTranslation(['admin', 'commons']);

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type Props = {
onSelected?: (themeName: string) => void,
};

const CustomizeThemeOptions = (props: Props): React.ReactElement => {
const CustomizeThemeOptions = (props: Props): JSX.Element => {
const { t } = useTranslation('admin');

const { availableThemes, selectedTheme, onSelected } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type Props = {
}

// eslint-disable-next-line @typescript-eslint/no-unused-vars
const CustomizeThemeSetting = (props: Props): React.ReactElement => {
const CustomizeThemeSetting = (props: Props): JSX.Element => {
const { t } = useTranslation();

const { data, error, update } = useSWRxGrowiThemeSetting();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type Props = {
onSelected?: () => void,
};

export const ThemeColorBox = (props: Props): React.ReactElement => {
export const ThemeColorBox = (props: Props): JSX.Element => {

const {
isSelected, metadata, onSelected,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type Props = {
isNormalized?: boolean,
}

const NormalizeIndicesControls = (props: Props): React.ReactElement => {
const NormalizeIndicesControls = (props: Props): JSX.Element => {
const { t } = useTranslation('admin');
const { isNormalized, isRebuildingProcessing } = props;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type Props = {
onReconnectingRequested: () => void,
}

const ReconnectControls = (props: Props): React.ReactElement => {
const ReconnectControls = (props: Props): JSX.Element => {
const { t } = useTranslation('admin');

const { isEnabled, isProcessing } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type ArchiveFilesTableProps = {
onZipFileStatRemove: (fileName: string) => void,
}

const ArchiveFilesTable = (props: ArchiveFilesTableProps): React.ReactElement => {
const ArchiveFilesTable = (props: ArchiveFilesTableProps): JSX.Element => {
const { t } = useTranslation();

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type ArchiveFilesTableMenuProps = {
onZipFileStatRemove: (fileName: string) => void,
}

const ArchiveFilesTableMenu = (props: ArchiveFilesTableMenuProps): React.ReactElement => {
const ArchiveFilesTableMenu = (props: ArchiveFilesTableMenuProps):JSX.Element => {
const { t } = useTranslation();

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ type Props = {
isAllChecked?: boolean,
};

const SelectCollectionsModal = (props: Props): React.ReactElement => {
const SelectCollectionsModal = (props: Props): JSX.Element => {
const { t } = useTranslation();

const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const IGNORED_COLLECTION_NAMES = [
'sessions', 'rlflx', 'yjs-writings', 'transferkeys',
];

const ExportArchiveDataPage = (): React.ReactElement => {
const ExportArchiveDataPage = (): JSX.Element => {
const { data: socket } = useAdminSocket();
const { t } = useTranslation('admin');

Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/client/components/Admin/ForbiddenPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import DefaultErrorPage from 'next/error';
import { useTranslation } from 'react-i18next';


export const ForbiddenPage = (): React.ReactElement => {
export const ForbiddenPage = (): JSX.Element => {
const { t } = useTranslation('admin');

const errorMessage = t('forbidden_page.do_not_have_admin_permission');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { useTranslation } from 'next-i18next';

import ElasticsearchManagement from './ElasticsearchManagement/ElasticsearchManagement';

export const FullTextSearchManagement = (): React.ReactElement => {
export const FullTextSearchManagement = (): JSX.Element => {
const { t } = useTranslation('admin');

return (
Expand Down
2 changes: 1 addition & 1 deletion apps/app/src/client/components/Admin/G2GDataTransfer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const IGNORED_COLLECTION_NAMES = [
'sessions', 'rlflx', 'activities', 'attachmentFiles.files', 'attachmentFiles.chunks',
];

const G2GDataTransfer = (): React.ReactElement => {
const G2GDataTransfer = (): JSX.Element => {
const { data: socket } = useAdminSocket();
const { t } = useTranslation(['admin', 'commons']);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ type Props = {
updateOptionsMap: (newOptionsMap: any) => void,
};

const G2GDataTransferExportForm = (props: Props): React.ReactElement => {
const G2GDataTransferExportForm = (props: Props): JSX.Element => {
const { t } = useTranslation('admin');

const {
Expand Down Expand Up @@ -66,7 +66,7 @@ const G2GDataTransferExportForm = (props: Props): React.ReactElement => {
});
}, [optionsMap, updateOptionsMap]);

const ImportItems = ({ collectionNames }): React.ReactElement => {
const ImportItems = ({ collectionNames }): JSX.Element => {
const toggleCheckbox = (collectionName, bool) => {
const collections = new Set(selectedCollections);
if (bool) {
Expand Down Expand Up @@ -122,7 +122,7 @@ const G2GDataTransferExportForm = (props: Props): React.ReactElement => {
);
};

const WarnForGroups = ({ errors }: { errors: Error[] }): React.ReactElement => {
const WarnForGroups = ({ errors }: { errors: Error[] }): JSX.Element => {
if (errors.length === 0) {
return <></>;
}
Expand All @@ -138,7 +138,7 @@ const G2GDataTransferExportForm = (props: Props): React.ReactElement => {
);
};

const GroupImportItems = ({ groupList, groupName, errors }): React.ReactElement => {
const GroupImportItems = ({ groupList, groupName, errors }): JSX.Element => {
const collectionNames = groupList.filter((groupCollectionName) => {
return allCollectionNames.includes(groupCollectionName);
});
Expand All @@ -156,7 +156,7 @@ const G2GDataTransferExportForm = (props: Props): React.ReactElement => {
);
};

const OtherImportItems = (): React.ReactElement => {
const OtherImportItems = (): JSX.Element => {
const collectionNames = allCollectionNames.filter((collectionName) => {
return !ALL_GROUPED_COLLECTIONS.includes(collectionName);
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ interface Props extends ComponentPropsWithoutRef<'span'>{
/**
* Icon for G2G transfer status
*/
const G2GDataTransferStatusIcon = ({ status, className, ...props }: Props): React.ReactElement => {
const G2GDataTransferStatusIcon = ({ status, className, ...props }: Props): JSX.Element => {
if (status === G2G_PROGRESS_STATUS.IN_PROGRESS) {
return (
<LoadingSpinner className={`${className}`} aria-label="in progress" {...props} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ type ErrorViewerProps = {
onClose: () => void,
}

const ErrorViewer = (props: ErrorViewerProps): React.ReactElement => {
const ErrorViewer = (props: ErrorViewerProps): JSX.Element => {
const { errors } = props;

let value = '(no errors)';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ type ManageExternalAccountProps = {
adminExternalAccountsContainer: AdminExternalAccountsContainer,
}

const ManageExternalAccount = (props: ManageExternalAccountProps): React.ReactElement => {
const ManageExternalAccount = (props: ManageExternalAccountProps): JSX.Element => {

const { t } = useTranslation();
const { adminExternalAccountsContainer } = props;
Expand Down
Loading

0 comments on commit 3c03ef6

Please sign in to comment.