mirror of
https://github.com/suitenumerique/drive.git
synced 2026-09-27 20:15:04 +02:00
✨(frontend) migrate to @gouvfr-lasuite/cunningham-react
Updated all imports from @openfun/cunningham-react to @gouvfr-lasuite/cunningham-react across the application. This change includes updating dependencies in package.json and yarn.lock to reflect the new package version. Enhanced the integration of the Cunningham components for improved consistency and functionality throughout the app.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { login } from "../Auth";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { SESSION_STORAGE_REDIRECT_AFTER_LOGIN_URL } from "@/features/api/fetchApi";
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { logout } from "../Auth";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ export interface ConfigContextType {
|
||||
}
|
||||
|
||||
export const ConfigContext = createContext<ConfigContextType | undefined>(
|
||||
undefined
|
||||
undefined,
|
||||
);
|
||||
|
||||
export const useConfig = () => {
|
||||
@@ -27,6 +27,8 @@ export const ConfigProvider = ({ children }: { children: React.ReactNode }) => {
|
||||
useEffect(() => {
|
||||
if (config?.FRONTEND_THEME) {
|
||||
setTheme(config.FRONTEND_THEME);
|
||||
} else {
|
||||
setTheme("default");
|
||||
}
|
||||
}, [config?.FRONTEND_THEME, setTheme]);
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ import { Item, TreeItem } from "@/features/drivers/types";
|
||||
import { ExplorerDragOverlay } from "./tree/ExploreDragOverlay";
|
||||
import { TreeViewNodeTypeEnum, useTreeContext } from "@gouvfr-lasuite/ui-kit";
|
||||
import { addItemsMovedToast } from "./toasts/addItemsMovedToast";
|
||||
import { useModal } from "@openfun/cunningham-react";
|
||||
import { useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { createContext, useContext, useState } from "react";
|
||||
import {
|
||||
ConfirmationMoveState,
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Button, useModal } from "@openfun/cunningham-react";
|
||||
import { Button, useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import {
|
||||
NavigationEventType,
|
||||
useGlobalExplorer,
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { Item } from "@/features/drivers/types";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useGlobalExplorer } from "../GlobalExplorerContext";
|
||||
import clsx from "clsx";
|
||||
import { Loader, useCunningham } from "@openfun/cunningham-react";
|
||||
import { Loader, useCunningham } from "@gouvfr-lasuite/cunningham-react";
|
||||
import gridEmpty from "@/assets/grid_empty.png";
|
||||
import starEmpty from "@/assets/star_tab_empty.svg";
|
||||
import {
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Button, useModal } from "@openfun/cunningham-react";
|
||||
import { Button, useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { ExplorerSearchModal } from "@/features/explorer/components/modals/search/ExplorerSearchModal";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useEffect } from "react";
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Button, useModal } from "@openfun/cunningham-react";
|
||||
import { Button, useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useGlobalExplorer } from "@/features/explorer/components/GlobalExplorerContext";
|
||||
import { useAppExplorer } from "@/features/explorer/components/app-view/AppExplorer";
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ import clsx from "clsx";
|
||||
import { isTablet } from "@/features/ui/components/responsive/ResponsiveDivs";
|
||||
import { Droppable } from "@/features/explorer/components/Droppable";
|
||||
import { useDragItemContext } from "@/features/explorer/components/ExplorerDndProvider";
|
||||
import { useModal } from "@openfun/cunningham-react";
|
||||
import { useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { ExplorerMoveFolder } from "@/features/explorer/components/modals/move/ExplorerMoveFolderModal";
|
||||
|
||||
export type EmbeddedExplorerGridProps = {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { CellContext } from "@tanstack/react-table";
|
||||
import { Item } from "@/features/drivers/types";
|
||||
import { useState } from "react";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { Draggable } from "@/features/explorer/components/Draggable";
|
||||
import { useDisableDragGridItem } from "./hooks";
|
||||
import { ItemActionDropdown } from "../item-actions/ItemActionDropdown";
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ import { CellContext } from "@tanstack/react-table";
|
||||
import { Item, LinkReach } from "@/features/drivers/types";
|
||||
import { useEffect, useMemo, useRef, useState } from "react";
|
||||
import { Draggable } from "@/features/explorer/components/Draggable";
|
||||
import { Tooltip } from "@openfun/cunningham-react";
|
||||
import { Tooltip } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { ItemIcon } from "@/features/explorer/components/icons/ItemIcon";
|
||||
import { useDisableDragGridItem } from "@/features/explorer/components/embedded-explorer/hooks";
|
||||
import { removeFileExtension } from "../../utils/mimeTypes";
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { CellContext } from "@tanstack/react-table";
|
||||
import { Item } from "@/features/drivers/types";
|
||||
import { Tooltip } from "@openfun/cunningham-react";
|
||||
import { Tooltip } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { timeAgo } from "@/features/explorer/utils/utils";
|
||||
import { Draggable } from "@/features/explorer/components/Draggable";
|
||||
import { useDisableDragGridItem } from "@/features/explorer/components/embedded-explorer/hooks";
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { Item, ItemType } from "@/features/drivers/types";
|
||||
import { DropdownMenu, useTreeContext } from "@gouvfr-lasuite/ui-kit";
|
||||
import { useModal } from "@openfun/cunningham-react";
|
||||
import { useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { t } from "i18next";
|
||||
import { itemToTreeItem, useGlobalExplorer } from "../GlobalExplorerContext";
|
||||
import settingsSvg from "@/assets/icons/settings.svg";
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import {
|
||||
Modal,
|
||||
ModalProps,
|
||||
ModalSize,
|
||||
} from "@openfun/cunningham-react";
|
||||
} from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FormProvider, SubmitHandler, useForm } from "react-hook-form";
|
||||
import { RhfInput } from "@/features/forms/components/RhfInput";
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ import {
|
||||
Modal,
|
||||
ModalProps,
|
||||
ModalSize,
|
||||
} from "@openfun/cunningham-react";
|
||||
} from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FormProvider, SubmitHandler, useForm } from "react-hook-form";
|
||||
import { Item } from "@/features/drivers/types";
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
|
||||
import {
|
||||
DecisionModalProps,
|
||||
Modal,
|
||||
ModalSize,
|
||||
} from "@openfun/cunningham-react";
|
||||
} from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export const HardDeleteConfirmationModal = ({
|
||||
|
||||
+6
-1
@@ -1,6 +1,11 @@
|
||||
import { getDriver } from "@/features/config/Config";
|
||||
import { Item, ItemType, Role } from "@/features/drivers/types";
|
||||
import { Button, Modal, ModalSize, useModal } from "@openfun/cunningham-react";
|
||||
import {
|
||||
Button,
|
||||
Modal,
|
||||
ModalSize,
|
||||
useModal,
|
||||
} from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||
import {
|
||||
HorizontalSeparator,
|
||||
|
||||
+1
-1
@@ -4,7 +4,7 @@ import {
|
||||
ModalProps,
|
||||
ModalSize,
|
||||
useModals,
|
||||
} from "@openfun/cunningham-react";
|
||||
} from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import {
|
||||
|
||||
-73
@@ -1,73 +0,0 @@
|
||||
import {
|
||||
Button,
|
||||
Modal,
|
||||
ModalProps,
|
||||
ModalSize,
|
||||
} from "@openfun/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { Item } from "@/features/drivers/types";
|
||||
import { WorkspaceForm, WorkspaceFormInputs } from "./WorkspaceForm";
|
||||
import { useMutationUpdateWorkspace } from "@/features/explorer/hooks/useMutations";
|
||||
import { SubmitHandler } from "react-hook-form";
|
||||
import { useTreeContext } from "@gouvfr-lasuite/ui-kit";
|
||||
import { useGlobalExplorer } from "../../GlobalExplorerContext";
|
||||
|
||||
export const ExplorerEditWorkspaceModal = (
|
||||
props: Pick<ModalProps, "isOpen" | "onClose"> & {
|
||||
item: Item;
|
||||
}
|
||||
) => {
|
||||
const { t } = useTranslation();
|
||||
const treeContext = useTreeContext<Item>();
|
||||
const { setRightPanelForcedItem, rightPanelForcedItem, rightPanelOpen } =
|
||||
useGlobalExplorer();
|
||||
const updateWorkspace = useMutationUpdateWorkspace();
|
||||
|
||||
const onSubmit: SubmitHandler<WorkspaceFormInputs> = async (data) => {
|
||||
updateWorkspace.mutate(
|
||||
{
|
||||
id: props.item.id,
|
||||
...data,
|
||||
},
|
||||
{
|
||||
onSuccess: () => {
|
||||
const updatedItem = {
|
||||
...props.item,
|
||||
title: data.title,
|
||||
description: data.description,
|
||||
};
|
||||
treeContext?.treeData.updateNode(props.item.id, updatedItem);
|
||||
if (rightPanelOpen && rightPanelForcedItem?.id === props.item.id) {
|
||||
setRightPanelForcedItem(updatedItem);
|
||||
}
|
||||
props.onClose();
|
||||
},
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<Modal
|
||||
{...props}
|
||||
size={ModalSize.MEDIUM}
|
||||
closeOnClickOutside
|
||||
title={t("explorer.workspaces.edit.title")}
|
||||
rightActions={
|
||||
<>
|
||||
<Button variant="bordered" onClick={props.onClose}>
|
||||
{t("explorer.workspaces.edit.cancel")}
|
||||
</Button>
|
||||
<Button type="submit" form="workspace-form">
|
||||
{t("explorer.workspaces.edit.submit")}
|
||||
</Button>
|
||||
</>
|
||||
}
|
||||
>
|
||||
<div className="clr-greyscale-600 fs-s m-0">
|
||||
{t("explorer.workspaces.edit.description")}
|
||||
</div>
|
||||
<WorkspaceForm item={props.item} onSubmit={onSubmit} />
|
||||
</Modal>
|
||||
);
|
||||
};
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import { Item, ItemUploadState } from "@/features/drivers/types";
|
||||
import { ItemIcon } from "../icons/ItemIcon";
|
||||
import { Button, useModal } from "@openfun/cunningham-react";
|
||||
import { Button, useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useGlobalExplorer } from "../GlobalExplorerContext";
|
||||
import { InfoRow } from "@/features/ui/components/info/InfoRow";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { ToasterItem } from "@/features/ui/components/toaster/Toaster";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useEffect, useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import clsx from "clsx";
|
||||
|
||||
+1
-1
@@ -9,7 +9,7 @@ import {
|
||||
import { useState } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { DropdownMenu } from "@gouvfr-lasuite/ui-kit";
|
||||
import { Button, Decision, useModal } from "@openfun/cunningham-react";
|
||||
import { Button, Decision, useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import undoIcon from "@/assets/icons/undo.svg";
|
||||
import cancelIcon from "@/assets/icons/cancel.svg";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useModals } from "@openfun/cunningham-react";
|
||||
import { useModals } from "@gouvfr-lasuite/cunningham-react";
|
||||
import i18n from "@/features/i18n/initI18n";
|
||||
|
||||
export const messageModalTrashNavigate = (
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { useModal } from "@openfun/cunningham-react";
|
||||
import { useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useGlobalExplorer } from "../GlobalExplorerContext";
|
||||
import { Item, TreeItem } from "@/features/drivers/types";
|
||||
|
||||
+3
-7
@@ -1,11 +1,9 @@
|
||||
import { DropdownMenu, useDropdownMenu } from "@gouvfr-lasuite/ui-kit";
|
||||
import { useGlobalExplorer } from "@/features/explorer/components/GlobalExplorerContext";
|
||||
import createFolderSvg from "@/assets/icons/create_folder.svg";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { ExplorerSearchButton } from "@/features/explorer/components/app-view/ExplorerSearchButton";
|
||||
import { isMyFilesRoute } from "@/utils/defaultRoutes";
|
||||
import { useRouter } from "next/router";
|
||||
|
||||
type ExplorerTreeActionsProps = {
|
||||
openCreateFolderModal: () => void;
|
||||
@@ -16,10 +14,9 @@ export const ExplorerTreeActions = ({
|
||||
}: ExplorerTreeActionsProps) => {
|
||||
const { t } = useTranslation();
|
||||
const { treeIsInitialized, item } = useGlobalExplorer();
|
||||
const router = useRouter();
|
||||
const isMyFiles = isMyFilesRoute(router.pathname);
|
||||
|
||||
const createMenu = useDropdownMenu();
|
||||
const showMenu = isMyFiles || item?.abilities?.children_create;
|
||||
const showMenu = item ? item?.abilities?.children_create : true;
|
||||
|
||||
if (!treeIsInitialized) {
|
||||
return null;
|
||||
@@ -41,7 +38,6 @@ export const ExplorerTreeActions = ({
|
||||
onOpenChange={createMenu.setIsOpen}
|
||||
>
|
||||
<Button
|
||||
disabled={!showMenu}
|
||||
icon={<span className="material-icons">add</span>}
|
||||
onClick={() => createMenu.setIsOpen(true)}
|
||||
>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { Item } from "@/features/drivers/types";
|
||||
import clsx from "clsx";
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { Item } from "@/features/drivers/types";
|
||||
import { Button, Modal, ModalSize } from "@openfun/cunningham-react";
|
||||
import { Button, Modal, ModalSize } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { Trans, useTranslation } from "react-i18next";
|
||||
|
||||
export type ConfirmationMoveState = {
|
||||
|
||||
@@ -5,7 +5,7 @@ import {
|
||||
Modal,
|
||||
ModalSize,
|
||||
useModal,
|
||||
} from "@openfun/cunningham-react";
|
||||
} from "@gouvfr-lasuite/cunningham-react";
|
||||
import React, { useMemo } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useConfig } from "../config/ConfigProvider";
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { Controller, useFormContext } from "react-hook-form";
|
||||
import { Input, TextArea, TextAreaProps } from "@openfun/cunningham-react";
|
||||
import { InputProps } from "@openfun/cunningham-react";
|
||||
import {
|
||||
Input,
|
||||
TextArea,
|
||||
TextAreaProps,
|
||||
InputProps,
|
||||
} from "@gouvfr-lasuite/cunningham-react";
|
||||
|
||||
export const RhfInput = (props: InputProps & { name: string }) => {
|
||||
const { control, setValue } = useFormContext();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Item, ItemUploadState } from "@/features/drivers/types";
|
||||
import { ModalSize, useModals } from "@openfun/cunningham-react";
|
||||
import { ModalSize, useModals } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { downloadFile } from "../utils";
|
||||
import { useAuth } from "@/features/auth/Auth";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
@@ -2,7 +2,7 @@ import { useTranslation } from "react-i18next";
|
||||
import { getDriver } from "../config/Config";
|
||||
import { useEffect, useRef, useState } from "react";
|
||||
import { Item, LinkReach, LinkRole } from "../drivers/types";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { Spinner } from "@gouvfr-lasuite/ui-kit";
|
||||
import { ClientMessageType, SDKRelayManager } from "./SdkRelayManager";
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import React, { ReactElement, ReactNode } from "react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
import { useEffect, useRef, useCallback, ReactNode } from "react";
|
||||
import { Loader, useCunningham } from "@openfun/cunningham-react";
|
||||
import { Loader, useCunningham } from "@gouvfr-lasuite/cunningham-react";
|
||||
|
||||
interface InfiniteScrollProps {
|
||||
/** Whether there are more items to load */
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import clsx from "clsx";
|
||||
import { ToastContainer, ToastContentProps, toast } from "react-toastify";
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { Icon } from "@gouvfr-lasuite/ui-kit";
|
||||
import { VolumeBar } from "../volume-bar/VolumeBar";
|
||||
import { useEffect } from "react";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { Icon } from "@gouvfr-lasuite/ui-kit";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useEffect } from "react";
|
||||
|
||||
export type VolumeBarProps = {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { useMemo } from "react";
|
||||
import { itemToPreviewFile } from "@/features/explorer/utils/utils";
|
||||
import { useDownloadItem } from "@/features/items/hooks/useDownloadItem";
|
||||
import { ItemInfo } from "@/features/items/components/ItemInfo";
|
||||
import { Button, useModal } from "@openfun/cunningham-react";
|
||||
import { Button, useModal } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { ItemShareModal } from "@/features/explorer/components/modals/share/ItemShareModal";
|
||||
|
||||
type CustomFilesPreviewProps = {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FilePreviewType } from "../files-preview/FilesPreview";
|
||||
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { Icon, IconType } from "@gouvfr-lasuite/ui-kit";
|
||||
import { FileIcon } from "@/features/explorer/components/icons/ItemIcon";
|
||||
import { downloadFile } from "@/features/items/utils";
|
||||
|
||||
@@ -4,7 +4,7 @@ import {
|
||||
removeFileExtension,
|
||||
} from "@/features/explorer/utils/mimeTypes";
|
||||
import { Icon, IconType } from "@gouvfr-lasuite/ui-kit";
|
||||
import { Button, Modal, ModalSize } from "@openfun/cunningham-react";
|
||||
import { Button, Modal, ModalSize } from "@gouvfr-lasuite/cunningham-react";
|
||||
import React, { useEffect, useMemo, useState } from "react";
|
||||
import { ImageViewer } from "../image-viewer/ImageViewer";
|
||||
import { VideoPlayer } from "../video-player/VideoPlayer";
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { Icon } from "@gouvfr-lasuite/ui-kit";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import React, { useState, useRef, useCallback, useEffect } from "react";
|
||||
|
||||
interface ImageViewerProps {
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { FilePreviewType } from "../files-preview/FilesPreview";
|
||||
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { Icon, IconType } from "@gouvfr-lasuite/ui-kit";
|
||||
import { FileIcon } from "@/features/explorer/components/icons/ItemIcon";
|
||||
import { useCallback } from "react";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { Icon, IconType } from "@gouvfr-lasuite/ui-kit";
|
||||
import mimeSuspicious from "@/assets/files/icons/suspicious_file.svg";
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { login } from "@/features/auth/Auth";
|
||||
import { getSimpleLayout } from "@/features/layouts/components/simple/SimpleLayout";
|
||||
import { GenericDisclaimer } from "@/features/ui/components/generic-disclaimer/GenericDisclaimer";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function UnauthorizedPage() {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { getSimpleLayout } from "@/features/layouts/components/simple/SimpleLayout";
|
||||
import { GenericDisclaimer } from "@/features/ui/components/generic-disclaimer/GenericDisclaimer";
|
||||
import { Icon } from "@gouvfr-lasuite/ui-kit";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
export default function UnauthorizedPage() {
|
||||
|
||||
@@ -2,7 +2,7 @@ import { GenericDisclaimer } from "@/features/ui/components/generic-disclaimer/G
|
||||
import { SpinnerPage } from "@/features/ui/components/spinner/SpinnerPage";
|
||||
import { CustomFilesPreview } from "@/features/ui/preview/custom-files-preview/CustomFilesPreview";
|
||||
import { Icon } from "@gouvfr-lasuite/ui-kit";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useRouter } from "next/router";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useItem } from "@/features/explorer/hooks/useQueries";
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
Decision,
|
||||
useModal,
|
||||
useModals,
|
||||
} from "@openfun/cunningham-react";
|
||||
} from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import undoIcon from "@/assets/icons/undo_blue.svg";
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
Toaster,
|
||||
ToasterItem,
|
||||
} from "@/features/ui/components/toaster/Toaster";
|
||||
import { Button } from "@openfun/cunningham-react";
|
||||
import { Button } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useConfig } from "@/features/config/ConfigProvider";
|
||||
import { LeftPanelMobile } from "@/features/layouts/components/left-panel/LeftPanelMobile";
|
||||
import { SESSION_STORAGE_REDIRECT_AFTER_LOGIN_URL } from "@/features/api/fetchApi";
|
||||
|
||||
@@ -12,7 +12,7 @@ import {
|
||||
useSdkContext,
|
||||
} from "@/features/layouts/components/sdk/SdkLayout";
|
||||
import { PickerFooter } from "@/features/sdk/SdkPickerFooter";
|
||||
import { Tooltip } from "@openfun/cunningham-react";
|
||||
import { Tooltip } from "@gouvfr-lasuite/cunningham-react";
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
function canPickItem(item: Item) {
|
||||
|
||||
+1
-36
@@ -801,7 +801,7 @@
|
||||
react-modal "3.16.3"
|
||||
react-stately "3.37.0"
|
||||
|
||||
"@gouvfr-lasuite/cunningham-tokens@*":
|
||||
"@gouvfr-lasuite/cunningham-tokens@*", "@gouvfr-lasuite/cunningham-tokens@3.1.0":
|
||||
version "3.1.0"
|
||||
resolved "https://registry.yarnpkg.com/@gouvfr-lasuite/cunningham-tokens/-/cunningham-tokens-3.1.0.tgz#39d957e6322f7c10b463dc8eeed8fdbb3e006788"
|
||||
integrity sha512-7HP7E1vjxv3FbFn21XuEqbjQPHP5xucWU0D8+Oj02nIeKLL+0eArTL2GB+c2rPFBt0tAzaLI6A3WlsimOjHN4A==
|
||||
@@ -1436,41 +1436,6 @@
|
||||
resolved "https://registry.yarnpkg.com/@nolyfill/is-core-module/-/is-core-module-1.0.39.tgz#3dc35ba0f1e66b403c00b39344f870298ebb1c8e"
|
||||
integrity sha512-nn5ozdjYQpUCZlWGuxcJY/KpxkWQs4DcbMCmKojjyrYDEAGy4Ce19NN4v5MduafTwJlbKc99UA8YhSVqq9yPZA==
|
||||
|
||||
"@openfun/cunningham-react@4.0.0":
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@openfun/cunningham-react/-/cunningham-react-4.0.0.tgz#5d273c72a2ced76cf060931b546238b7ee75c6ec"
|
||||
integrity sha512-2JgIRDl2UE/PMcOrjjfxbhFRwEwF7JFAaPoN/Xjq+sOYHP6WasRxFRrkwhnuZ5ZU7lOpzaAFyPtkawoBF6GsEQ==
|
||||
dependencies:
|
||||
"@fontsource-variable/roboto-flex" "5.2.5"
|
||||
"@fontsource/material-icons-outlined" "5.2.5"
|
||||
"@internationalized/date" "3.8.0"
|
||||
"@openfun/cunningham-tokens" "*"
|
||||
"@react-aria/calendar" "3.8.0"
|
||||
"@react-aria/datepicker" "3.14.2"
|
||||
"@react-aria/i18n" "3.12.8"
|
||||
"@react-stately/calendar" "3.8.0"
|
||||
"@react-stately/datepicker" "3.14.0"
|
||||
"@tanstack/react-table" "8.21.3"
|
||||
"@types/react-modal" "3.16.3"
|
||||
chromatic "11.28.2"
|
||||
classnames "2.5.1"
|
||||
downshift "9.0.9"
|
||||
react-aria "3.39.0"
|
||||
react-aria-components "1.8.0"
|
||||
react-modal "3.16.3"
|
||||
react-stately "3.37.0"
|
||||
|
||||
"@openfun/cunningham-tokens@*":
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/@openfun/cunningham-tokens/-/cunningham-tokens-3.0.0.tgz#2346ebcb7d18a35cbbb1c4f4c501f238173a3c8c"
|
||||
integrity sha512-YMLLL7CaQA1+kuSVxf3UgXNjdyeX6Dj2Kdlz/9+lX2ePm51rPxZsEGXWeUVafNLFH+T/zpsajiEzgJ9mBEJd5w==
|
||||
dependencies:
|
||||
chalk "4.1.2"
|
||||
commander "13.1.0"
|
||||
deepmerge "4.3.1"
|
||||
figlet "1.8.1"
|
||||
ts-node "10.9.2"
|
||||
|
||||
"@parcel/watcher-android-arm64@2.5.1":
|
||||
version "2.5.1"
|
||||
resolved "https://registry.yarnpkg.com/@parcel/watcher-android-arm64/-/watcher-android-arm64-2.5.1.tgz#507f836d7e2042f798c7d07ad19c3546f9848ac1"
|
||||
|
||||
Reference in New Issue
Block a user