ode-explorer 1.3.2-dev.202401091605 → 1.3.2-dev.202401091744
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/version.txt +1 -1
- package/explorer.d.ts +1 -0
- package/lib/ActionBarContainer.js +375 -0
- package/lib/AppAction.js +47 -0
- package/lib/DeleteModal.js +60 -0
- package/lib/DisableModal.js +20 -0
- package/lib/EmptyScreenApp.js +53 -0
- package/lib/EmptyScreenError.js +13 -0
- package/lib/EmptyScreenNoContentInFolder.js +20 -0
- package/lib/EmptyScreenSearch.js +20 -0
- package/lib/EmptyScreenTrash.js +18 -0
- package/lib/FolderModal.js +138 -0
- package/lib/FoldersList.js +77 -0
- package/lib/Library.js +19 -0
- package/lib/MoveModal.js +94 -0
- package/lib/ResourcesList.js +261 -0
- package/lib/TrashModal.js +20 -0
- package/lib/app/root/index.d.ts +2 -0
- package/lib/components/AppAction/AppAction.d.ts +1 -0
- package/lib/components/EmptyScreens/EmptyScreenApp.d.ts +2 -0
- package/lib/components/EmptyScreens/EmptyScreenError.d.ts +2 -0
- package/lib/components/EmptyScreens/EmptyScreenNoContentInFolder.d.ts +2 -0
- package/lib/components/EmptyScreens/EmptyScreenSearch.d.ts +2 -0
- package/lib/components/EmptyScreens/EmptyScreenTrash.d.ts +1 -0
- package/lib/components/Explorer.d.ts +5 -0
- package/lib/components/ExplorerBreadcrumb.d.ts +1 -0
- package/lib/components/LoadMore.d.ts +3 -0
- package/lib/config/getExplorerConfig.d.ts +11 -0
- package/lib/config/index.d.ts +3 -0
- package/lib/features/AccessControl/AccessControl.d.ts +12 -0
- package/lib/features/AccessControl/useAccessControl.d.ts +14 -0
- package/lib/features/ActionBar/ActionBarContainer.d.ts +1 -0
- package/lib/features/ActionBar/Delete/DeleteModal.d.ts +8 -0
- package/lib/features/ActionBar/Delete/useDeleteModal.d.ts +8 -0
- package/lib/features/ActionBar/Disable/DisableModal.d.ts +5 -0
- package/lib/features/ActionBar/Disable/useDisableModal.d.ts +4 -0
- package/lib/features/ActionBar/Folder/FolderModal.d.ts +9 -0
- package/lib/features/ActionBar/Folder/useFolderModal.d.ts +22 -0
- package/lib/features/ActionBar/Move/MoveModal.d.ts +8 -0
- package/lib/features/ActionBar/Move/useMoveModal.d.ts +12 -0
- package/lib/features/ActionBar/Trash/TrashModal.d.ts +5 -0
- package/lib/features/ActionBar/Trash/useTrashModal.d.ts +4 -0
- package/lib/features/ActionBar/useActionBar.d.ts +30 -0
- package/lib/features/List/FolderCard.d.ts +17 -0
- package/lib/features/List/FoldersList.d.ts +7 -0
- package/lib/features/List/List.d.ts +1 -0
- package/lib/features/List/ResourceCard.d.ts +22 -0
- package/lib/features/List/ResourcesList.d.ts +8 -0
- package/lib/features/SearchForm/SearchForm.d.ts +1 -0
- package/lib/features/SearchForm/useSearchForm.d.ts +8 -0
- package/lib/features/SearchForm/useSelectedFilters.d.ts +8 -0
- package/lib/features/SideBar/Library/Library.d.ts +2 -0
- package/lib/features/SideBar/TrashButton.d.ts +7 -0
- package/lib/features/SideBar/TreeViewContainer.d.ts +1 -0
- package/lib/i18n.d.ts +2 -0
- package/lib/index.d.ts +1 -0
- package/lib/index.js +13 -0
- package/lib/index2.js +1867 -0
- package/lib/main.d.ts +0 -0
- package/lib/services/api/index.d.ts +129 -0
- package/lib/store/index.d.ts +98 -0
- package/lib/style.css +410 -0
- package/lib/utils/TreeNodeFolderWrapper.d.ts +12 -0
- package/lib/utils/addNode.d.ts +6 -0
- package/lib/utils/arrayUnique.d.ts +1 -0
- package/lib/utils/capitalizeFirstLetter.d.ts +1 -0
- package/lib/utils/deleteNode.d.ts +4 -0
- package/lib/utils/findNodeById.d.ts +2 -0
- package/lib/utils/fullTextSearch.d.ts +1 -0
- package/lib/utils/getAncestors.d.ts +2 -0
- package/lib/utils/getAppParams.d.ts +10 -0
- package/lib/utils/hasChildren.d.ts +2 -0
- package/lib/utils/isResourceShared.d.ts +2 -0
- package/lib/utils/modifyNode.d.ts +2 -0
- package/lib/utils/moveNode.d.ts +5 -0
- package/lib/utils/scrollToTop.d.ts +1 -0
- package/lib/utils/updateNode.d.ts +6 -0
- package/lib/utils/wrapTreeNode.d.ts +3 -0
- package/package.json +33 -3
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ReactNode, type ReactElement } from "react";
|
|
2
|
+
import { IAction, RightRole } from "edifice-ts-client";
|
|
3
|
+
import { IObjectWithRights } from './useAccessControl';
|
|
4
|
+
interface AccessControlProps {
|
|
5
|
+
roleExpected: RightRole | RightRole[];
|
|
6
|
+
resourceRights: string | string[] | IObjectWithRights | IObjectWithRights[];
|
|
7
|
+
action: IAction;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
renderWhenForbidden?: () => ReactElement;
|
|
10
|
+
}
|
|
11
|
+
export declare function AccessControl({ resourceRights, roleExpected, action, children, renderWhenForbidden, }: AccessControlProps): ReactElement;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { type RightRole } from "edifice-ts-client";
|
|
2
|
+
export interface IObjectWithRights {
|
|
3
|
+
rights: string[];
|
|
4
|
+
}
|
|
5
|
+
interface AccessControlProps {
|
|
6
|
+
roles: RightRole | RightRole[];
|
|
7
|
+
rights: string | string[] | IObjectWithRights | IObjectWithRights[];
|
|
8
|
+
action: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export declare function useAccessControl({ roles, rights, action, }: AccessControlProps): {
|
|
11
|
+
visible: boolean;
|
|
12
|
+
refreshState: () => Promise<void>;
|
|
13
|
+
};
|
|
14
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export default function ActionBarContainer(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface FolderModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
edit: boolean;
|
|
5
|
+
onSuccess?: () => void;
|
|
6
|
+
onCancel: () => void;
|
|
7
|
+
}
|
|
8
|
+
export default function FolderModal({ isOpen, edit, onSuccess, onCancel: onClose, }: FolderModalProps): import("react").ReactPortal | null;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { type SubmitHandler } from "react-hook-form";
|
|
2
|
+
interface useFolderModalProps {
|
|
3
|
+
edit: boolean;
|
|
4
|
+
onSuccess?: () => void;
|
|
5
|
+
onClose: () => void;
|
|
6
|
+
}
|
|
7
|
+
interface HandlerProps {
|
|
8
|
+
name: string;
|
|
9
|
+
}
|
|
10
|
+
export declare function useFolderModal({ edit, onSuccess, onClose, }: useFolderModalProps): {
|
|
11
|
+
formId: string;
|
|
12
|
+
errors: import("react-hook-form").FieldErrors<HandlerProps>;
|
|
13
|
+
isSubmitting: boolean;
|
|
14
|
+
isDirty: boolean;
|
|
15
|
+
isValid: boolean;
|
|
16
|
+
register: import("react-hook-form").UseFormRegister<HandlerProps>;
|
|
17
|
+
setFocus: import("react-hook-form").UseFormSetFocus<HandlerProps>;
|
|
18
|
+
handleSubmit: import("react-hook-form").UseFormHandleSubmit<HandlerProps, undefined>;
|
|
19
|
+
onCancel: () => void;
|
|
20
|
+
onSubmit: SubmitHandler<HandlerProps>;
|
|
21
|
+
};
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type ID } from "edifice-ts-client";
|
|
2
|
+
interface ModalProps {
|
|
3
|
+
onSuccess?: () => void;
|
|
4
|
+
}
|
|
5
|
+
export declare function useMoveModal({ onSuccess }: ModalProps): {
|
|
6
|
+
disableSubmit: boolean;
|
|
7
|
+
handleTreeItemSelect: (folderId: string) => void;
|
|
8
|
+
handleTreeItemFold: (folderId: string) => void;
|
|
9
|
+
handleTreeItemUnfold: (folderId: ID) => Promise<void>;
|
|
10
|
+
onMove: () => void;
|
|
11
|
+
};
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { type IAction } from "edifice-ts-client";
|
|
2
|
+
export default function useActionBar(): {
|
|
3
|
+
onRestore: () => Promise<void>;
|
|
4
|
+
actions: IAction[] | undefined;
|
|
5
|
+
selectedElement: (import("edifice-ts-client").IFolder | import("edifice-ts-client").IResource)[];
|
|
6
|
+
currentFolderId: string | undefined;
|
|
7
|
+
overrideLabel: (action: IAction) => string;
|
|
8
|
+
handleClick: (action: IAction) => Promise<void>;
|
|
9
|
+
isActivable: (action: IAction) => boolean;
|
|
10
|
+
isActionBarOpen: boolean;
|
|
11
|
+
isMoveModalOpen: boolean;
|
|
12
|
+
onMoveCancel: () => void;
|
|
13
|
+
onMoveSuccess: () => void;
|
|
14
|
+
isDeleteModalOpen: boolean;
|
|
15
|
+
onDeleteCancel: () => void;
|
|
16
|
+
onDeleteSuccess: () => void;
|
|
17
|
+
isPublishModalOpen: boolean;
|
|
18
|
+
onPublishCancel: () => void;
|
|
19
|
+
onPublishSuccess: () => void;
|
|
20
|
+
isEditFolderOpen: boolean;
|
|
21
|
+
onEditFolderCancel: () => void;
|
|
22
|
+
onEditFolderSuccess: () => void;
|
|
23
|
+
isEditResourceOpen: boolean;
|
|
24
|
+
onEditResourceCancel: () => void;
|
|
25
|
+
onEditResourceSuccess: () => void;
|
|
26
|
+
isShareResourceOpen: boolean;
|
|
27
|
+
onShareResourceCancel: () => void;
|
|
28
|
+
onShareResourceSuccess: () => void;
|
|
29
|
+
onClearActionBar: () => void;
|
|
30
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { CardProps } from "@edifice-ui/react";
|
|
2
|
+
import { IWebApp } from "edifice-ts-client";
|
|
3
|
+
export interface FolderCardProps extends Omit<CardProps, "children"> {
|
|
4
|
+
/**
|
|
5
|
+
* IWeb App
|
|
6
|
+
*/
|
|
7
|
+
app?: IWebApp | undefined;
|
|
8
|
+
/**
|
|
9
|
+
* Folder's name
|
|
10
|
+
*/
|
|
11
|
+
name: string;
|
|
12
|
+
}
|
|
13
|
+
declare const FolderCard: {
|
|
14
|
+
({ app, name, isSelected, isSelectable, onClick, onSelect, }: FolderCardProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
displayName: string;
|
|
16
|
+
};
|
|
17
|
+
export default FolderCard;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { InfiniteData } from "@tanstack/react-query";
|
|
2
|
+
import { ISearchResults } from "edifice-ts-client";
|
|
3
|
+
declare const FoldersList: ({ data, }: {
|
|
4
|
+
data: InfiniteData<ISearchResults> | undefined;
|
|
5
|
+
isFetching: boolean;
|
|
6
|
+
}) => import("react/jsx-runtime").JSX.Element | null;
|
|
7
|
+
export default FoldersList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const List: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { CardProps } from "@edifice-ui/react";
|
|
2
|
+
import { IResource, IWebApp } from "edifice-ts-client";
|
|
3
|
+
type OmitChildren = Omit<CardProps, "children">;
|
|
4
|
+
export interface ResourceCardProps extends OmitChildren {
|
|
5
|
+
/**
|
|
6
|
+
* IWeb App
|
|
7
|
+
*/
|
|
8
|
+
app?: IWebApp | undefined;
|
|
9
|
+
/**
|
|
10
|
+
* Resource
|
|
11
|
+
*/
|
|
12
|
+
resource: Partial<IResource>;
|
|
13
|
+
/**
|
|
14
|
+
* Updated date
|
|
15
|
+
*/
|
|
16
|
+
time: string;
|
|
17
|
+
}
|
|
18
|
+
declare const ResourceCard: {
|
|
19
|
+
({ app, resource, time, isSelected, isSelectable, onClick, onSelect, }: ResourceCardProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
displayName: string;
|
|
21
|
+
};
|
|
22
|
+
export default ResourceCard;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { InfiniteData } from "@tanstack/react-query";
|
|
2
|
+
import { ISearchResults } from "edifice-ts-client";
|
|
3
|
+
declare const ResourcesList: ({ data, fetchNextPage, }: {
|
|
4
|
+
data: InfiniteData<ISearchResults> | undefined;
|
|
5
|
+
isFetching: boolean;
|
|
6
|
+
fetchNextPage: () => void;
|
|
7
|
+
}) => JSX.Element | null;
|
|
8
|
+
export default ResourcesList;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const SearchForm: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const useSearchForm: () => {
|
|
3
|
+
formRef: import("react").MutableRefObject<null>;
|
|
4
|
+
inputSearch: string;
|
|
5
|
+
handleInputSearchChange: (event: React.ChangeEvent<HTMLInputElement>) => void;
|
|
6
|
+
handleKeyPress: (event: React.KeyboardEvent) => void;
|
|
7
|
+
handleSearchSubmit: (e: React.MouseEvent) => void;
|
|
8
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const TreeViewContainer: () => import("react/jsx-runtime").JSX.Element;
|
package/lib/i18n.d.ts
ADDED
package/lib/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Explorer } from "./components/Explorer";
|
package/lib/index.js
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { E } from "./index2.js";
|
|
2
|
+
import "react/jsx-runtime";
|
|
3
|
+
import "react";
|
|
4
|
+
import "@edifice-ui/react";
|
|
5
|
+
import "@edifice-ui/icons";
|
|
6
|
+
import "react-i18next";
|
|
7
|
+
import "edifice-ts-client";
|
|
8
|
+
import "i18next";
|
|
9
|
+
import "zustand";
|
|
10
|
+
import "@tanstack/react-query";
|
|
11
|
+
export {
|
|
12
|
+
E as Explorer
|
|
13
|
+
};
|