ode-explorer 1.3.2-dev.202401091605 → 1.3.2-dev.202401101530
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/index.js +3 -3
- package/dist/version.txt +1 -1
- package/explorer.d.ts +1 -0
- package/lib/ActionBarContainer.js +281 -0
- package/lib/AppAction.js +34 -0
- package/lib/DeleteModal.js +52 -0
- package/lib/DisableModal.js +20 -0
- package/lib/EmptyScreenApp.js +37 -0
- package/lib/EmptyScreenError.js +12 -0
- package/lib/EmptyScreenNoContentInFolder.js +18 -0
- package/lib/EmptyScreenSearch.js +18 -0
- package/lib/EmptyScreenTrash.js +16 -0
- package/lib/FolderModal.js +119 -0
- package/lib/FoldersList.js +64 -0
- package/lib/Library.js +16 -0
- package/lib/MoveModal.js +78 -0
- package/lib/ResourcesList.js +249 -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 +1376 -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 +1 -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 -4
package/lib/main.d.ts
ADDED
|
File without changes
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { type ISearchParameters, type ID, type ShareRight, type UpdateParameters, type IFolder, CreateParameters, App } from "edifice-ts-client";
|
|
2
|
+
/**
|
|
3
|
+
* searchContext API
|
|
4
|
+
* @param searchParams
|
|
5
|
+
* @returns resources, no trashed folders and pagination
|
|
6
|
+
*/
|
|
7
|
+
export declare const searchContext: (searchParams: ISearchParameters) => Promise<{
|
|
8
|
+
folders: IFolder[];
|
|
9
|
+
pagination: import("edifice-ts-client").IPagination;
|
|
10
|
+
resources: import("edifice-ts-client").IResource[];
|
|
11
|
+
searchConfig?: {
|
|
12
|
+
minLength: number;
|
|
13
|
+
} | undefined;
|
|
14
|
+
}>;
|
|
15
|
+
/**
|
|
16
|
+
* createFolder API
|
|
17
|
+
* @param searchParams, name, parentId
|
|
18
|
+
* @returns a new folder
|
|
19
|
+
*/
|
|
20
|
+
export declare const createFolder: ({ searchParams, name, parentId, }: {
|
|
21
|
+
searchParams: ISearchParameters;
|
|
22
|
+
name: string;
|
|
23
|
+
parentId: ID;
|
|
24
|
+
}) => Promise<import("edifice-ts-client").CreateFolderResult>;
|
|
25
|
+
/**
|
|
26
|
+
* updateFolder API
|
|
27
|
+
* @param searchParams, folderId, parentId, name
|
|
28
|
+
* @returns updated folder
|
|
29
|
+
*/
|
|
30
|
+
export declare const updateFolder: ({ folderId, searchParams, parentId, name, }: {
|
|
31
|
+
folderId: ID;
|
|
32
|
+
searchParams: ISearchParameters;
|
|
33
|
+
parentId: ID;
|
|
34
|
+
name: string;
|
|
35
|
+
}) => Promise<import("edifice-ts-client").CreateFolderResult>;
|
|
36
|
+
/**
|
|
37
|
+
* trashAll API
|
|
38
|
+
* @param searchParams, resourceIds, folderIds
|
|
39
|
+
* @move resources and folders to bin
|
|
40
|
+
*/
|
|
41
|
+
export declare const trashAll: ({ searchParams, resourceIds, useAssetIds, folderIds, }: {
|
|
42
|
+
searchParams: ISearchParameters;
|
|
43
|
+
resourceIds: ID[];
|
|
44
|
+
useAssetIds: boolean;
|
|
45
|
+
folderIds: ID[];
|
|
46
|
+
}) => Promise<import("edifice-ts-client").IActionResult>;
|
|
47
|
+
/**
|
|
48
|
+
* deleteAll API
|
|
49
|
+
* @param searchParams, resourceIds, folderIds
|
|
50
|
+
* @delete folders and resources
|
|
51
|
+
*/
|
|
52
|
+
export declare const deleteAll: ({ searchParams, resourceIds, useAssetIds, folderIds, }: {
|
|
53
|
+
searchParams: ISearchParameters;
|
|
54
|
+
resourceIds: ID[];
|
|
55
|
+
useAssetIds: boolean;
|
|
56
|
+
folderIds: ID[];
|
|
57
|
+
}) => Promise<import("edifice-ts-client").IActionResult>;
|
|
58
|
+
/**
|
|
59
|
+
* restoreAll API
|
|
60
|
+
* @param searchParams, resourceIds, folderIds
|
|
61
|
+
* @restore trashed folders and resources
|
|
62
|
+
*/
|
|
63
|
+
export declare const restoreAll: ({ searchParams, resourceIds, folderIds, useAssetIds, }: {
|
|
64
|
+
searchParams: ISearchParameters;
|
|
65
|
+
resourceIds: ID[];
|
|
66
|
+
useAssetIds: boolean;
|
|
67
|
+
folderIds: ID[];
|
|
68
|
+
}) => Promise<import("edifice-ts-client").IActionResult>;
|
|
69
|
+
/**
|
|
70
|
+
* moveToFolder API
|
|
71
|
+
* @param searchParams, resourceIds, folderIds, folderId
|
|
72
|
+
* @returns folders and resources to new folderId location
|
|
73
|
+
*/
|
|
74
|
+
export declare const moveToFolder: ({ searchParams, resourceIds, folderId, folderIds, useAssetIds, }: {
|
|
75
|
+
searchParams: ISearchParameters;
|
|
76
|
+
folderId: ID;
|
|
77
|
+
resourceIds: ID[];
|
|
78
|
+
useAssetIds: boolean;
|
|
79
|
+
folderIds: ID[];
|
|
80
|
+
}) => Promise<import("edifice-ts-client").IActionResult>;
|
|
81
|
+
/**
|
|
82
|
+
* shareResource API
|
|
83
|
+
* @param searchParams, entId, shares
|
|
84
|
+
* @returns shared resource
|
|
85
|
+
*/
|
|
86
|
+
export declare const shareResource: ({ app, resourceId, rights, }: {
|
|
87
|
+
app: string;
|
|
88
|
+
resourceId: string;
|
|
89
|
+
rights: ShareRight[];
|
|
90
|
+
}) => Promise<import("edifice-ts-client").PutShareResponse>;
|
|
91
|
+
/**
|
|
92
|
+
* updateResource API
|
|
93
|
+
* @param searchParams, params
|
|
94
|
+
* @returns updated resource
|
|
95
|
+
*/
|
|
96
|
+
export declare const updateResource: ({ app, params, }: {
|
|
97
|
+
app: App;
|
|
98
|
+
params: UpdateParameters;
|
|
99
|
+
}) => Promise<import("edifice-ts-client").UpdateResult>;
|
|
100
|
+
/**
|
|
101
|
+
* sessionHasWorkflowRights API
|
|
102
|
+
* @param actionRights
|
|
103
|
+
* @returns check if user has rights
|
|
104
|
+
*/
|
|
105
|
+
export declare const sessionHasWorkflowRights: (actionRights: string[]) => Promise<Record<string, boolean>>;
|
|
106
|
+
export declare const goToResource: ({ searchParams, assetId, }: {
|
|
107
|
+
searchParams: ISearchParameters;
|
|
108
|
+
assetId: ID;
|
|
109
|
+
}) => void;
|
|
110
|
+
export declare const createResource: ({ searchParams, params, }: {
|
|
111
|
+
searchParams: ISearchParameters;
|
|
112
|
+
params: CreateParameters;
|
|
113
|
+
}) => Promise<import("edifice-ts-client").CreateResult>;
|
|
114
|
+
export declare const printResource: ({ searchParams, assetId, }: {
|
|
115
|
+
searchParams: ISearchParameters;
|
|
116
|
+
assetId: ID;
|
|
117
|
+
}) => void;
|
|
118
|
+
/**
|
|
119
|
+
* getPreference API
|
|
120
|
+
* @returns check onboarding trash param
|
|
121
|
+
*/
|
|
122
|
+
export declare const getOnboardingTrash: (key: string) => Promise<{
|
|
123
|
+
showOnboardingTrash: boolean;
|
|
124
|
+
}>;
|
|
125
|
+
/**
|
|
126
|
+
* savePreference API
|
|
127
|
+
* @returns set onboarding trash param
|
|
128
|
+
*/
|
|
129
|
+
export declare const saveOnboardingTrash: (key: string) => Promise<void>;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { type TreeNode } from "@edifice-ui/react";
|
|
2
|
+
import { type QueryClient } from "@tanstack/react-query";
|
|
3
|
+
import { type ISearchParameters, type IFolder, type IResource, type ID } from "edifice-ts-client";
|
|
4
|
+
import { AppParams } from '../config/getExplorerConfig';
|
|
5
|
+
interface State {
|
|
6
|
+
config: AppParams | null;
|
|
7
|
+
searchParams: ISearchParameters;
|
|
8
|
+
treeData: TreeNode;
|
|
9
|
+
selectedNodesIds: string[];
|
|
10
|
+
currentFolder: Partial<IFolder>;
|
|
11
|
+
selectedFolders: IFolder[];
|
|
12
|
+
selectedResources: IResource[];
|
|
13
|
+
folderIds: ID[];
|
|
14
|
+
resourceIds: ID[];
|
|
15
|
+
resourceIsTrash: boolean;
|
|
16
|
+
resourceActionDisable: boolean;
|
|
17
|
+
searchConfig: {
|
|
18
|
+
minLength: number;
|
|
19
|
+
};
|
|
20
|
+
status: string | undefined;
|
|
21
|
+
updaters: {
|
|
22
|
+
setConfig: (config: AppParams) => void;
|
|
23
|
+
setSearchConfig: (config: {
|
|
24
|
+
minLength: number;
|
|
25
|
+
}) => void;
|
|
26
|
+
setTreeData: (treeData: TreeNode) => void;
|
|
27
|
+
setSearchParams: (searchParams: Partial<ISearchParameters>) => void;
|
|
28
|
+
setCurrentFolder: (folder: Partial<IFolder>) => void;
|
|
29
|
+
setSelectedFolders: (selectedFolders: IFolder[]) => void;
|
|
30
|
+
setSelectedResources: (selectedResources: IResource[]) => void;
|
|
31
|
+
setFolderIds: (folderIds: ID[]) => void;
|
|
32
|
+
setResourceIds: (resourceIds: ID[]) => void;
|
|
33
|
+
setResourceIsTrash: (resourceIsTrash: boolean) => void;
|
|
34
|
+
setResourceActionDisable: (resourceActionDisable: boolean) => void;
|
|
35
|
+
clearSelectedItems: () => void;
|
|
36
|
+
clearSelectedIds: () => void;
|
|
37
|
+
openResource: (resource: IResource) => void;
|
|
38
|
+
printSelectedResource: () => void;
|
|
39
|
+
openFolder: ({ folderId, folder, }: {
|
|
40
|
+
folderId: ID;
|
|
41
|
+
folder?: IFolder;
|
|
42
|
+
}) => void;
|
|
43
|
+
foldTreeItem: (folderId: string) => void;
|
|
44
|
+
selectTreeItem: (folderId: string) => void;
|
|
45
|
+
unfoldTreeItem: (folderId: string, queryClient: QueryClient) => Promise<void>;
|
|
46
|
+
gotoPreviousFolder: () => void;
|
|
47
|
+
goToTrash: () => void;
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
export declare const useStoreContext: import("zustand").UseBoundStore<import("zustand").StoreApi<State>>;
|
|
51
|
+
export declare const useSearchParams: () => ISearchParameters;
|
|
52
|
+
export declare const useSelectedNodesIds: () => string[];
|
|
53
|
+
export declare const useTreeData: () => TreeNode;
|
|
54
|
+
export declare const useSelectedFolders: () => IFolder[];
|
|
55
|
+
export declare const useSelectedResources: () => IResource[];
|
|
56
|
+
export declare const useSearchConfig: () => {
|
|
57
|
+
minLength: number;
|
|
58
|
+
};
|
|
59
|
+
export declare const useFolderIds: () => string[];
|
|
60
|
+
export declare const useResourceIds: () => string[];
|
|
61
|
+
export declare const useResourceAssetIds: () => string[];
|
|
62
|
+
export declare const useResourceWithoutIds: () => IResource[];
|
|
63
|
+
export declare const useCurrentFolder: () => Partial<IFolder>;
|
|
64
|
+
export declare const useStoreActions: () => {
|
|
65
|
+
setConfig: (config: AppParams) => void;
|
|
66
|
+
setSearchConfig: (config: {
|
|
67
|
+
minLength: number;
|
|
68
|
+
}) => void;
|
|
69
|
+
setTreeData: (treeData: TreeNode) => void;
|
|
70
|
+
setSearchParams: (searchParams: Partial<ISearchParameters>) => void;
|
|
71
|
+
setCurrentFolder: (folder: Partial<IFolder>) => void;
|
|
72
|
+
setSelectedFolders: (selectedFolders: IFolder[]) => void;
|
|
73
|
+
setSelectedResources: (selectedResources: IResource[]) => void;
|
|
74
|
+
setFolderIds: (folderIds: ID[]) => void;
|
|
75
|
+
setResourceIds: (resourceIds: ID[]) => void;
|
|
76
|
+
setResourceIsTrash: (resourceIsTrash: boolean) => void;
|
|
77
|
+
setResourceActionDisable: (resourceActionDisable: boolean) => void;
|
|
78
|
+
clearSelectedItems: () => void;
|
|
79
|
+
clearSelectedIds: () => void;
|
|
80
|
+
openResource: (resource: IResource) => void;
|
|
81
|
+
printSelectedResource: () => void;
|
|
82
|
+
openFolder: ({ folderId, folder, }: {
|
|
83
|
+
folderId: ID;
|
|
84
|
+
folder?: IFolder | undefined;
|
|
85
|
+
}) => void;
|
|
86
|
+
foldTreeItem: (folderId: string) => void;
|
|
87
|
+
selectTreeItem: (folderId: string) => void;
|
|
88
|
+
unfoldTreeItem: (folderId: string, queryClient: QueryClient) => Promise<void>;
|
|
89
|
+
gotoPreviousFolder: () => void;
|
|
90
|
+
goToTrash: () => void;
|
|
91
|
+
};
|
|
92
|
+
export declare const useIsTrash: () => boolean;
|
|
93
|
+
export declare const useResourceIsTrash: () => boolean;
|
|
94
|
+
export declare const useResourceActionDisable: () => boolean;
|
|
95
|
+
export declare const useIsRoot: () => boolean;
|
|
96
|
+
export declare const useHasSelectedNodes: () => boolean;
|
|
97
|
+
export declare const useTreeStatus: () => string | undefined;
|
|
98
|
+
export {};
|
package/lib/style.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@font-face{font-family:swiper-icons;src:url(data:application/font-woff;charset=utf-8;base64,\ d09GRgABAAAAAAZgABAAAAAADAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABGRlRNAAAGRAAAABoAAAAci6qHkUdERUYAAAWgAAAAIwAAACQAYABXR1BPUwAABhQAAAAuAAAANuAY7+xHU1VCAAAFxAAAAFAAAABm2fPczU9TLzIAAAHcAAAASgAAAGBP9V5RY21hcAAAAkQAAACIAAABYt6F0cBjdnQgAAACzAAAAAQAAAAEABEBRGdhc3AAAAWYAAAACAAAAAj//wADZ2x5ZgAAAywAAADMAAAD2MHtryVoZWFkAAABbAAAADAAAAA2E2+eoWhoZWEAAAGcAAAAHwAAACQC9gDzaG10eAAAAigAAAAZAAAArgJkABFsb2NhAAAC0AAAAFoAAABaFQAUGG1heHAAAAG8AAAAHwAAACAAcABAbmFtZQAAA/gAAAE5AAACXvFdBwlwb3N0AAAFNAAAAGIAAACE5s74hXjaY2BkYGAAYpf5Hu/j+W2+MnAzMYDAzaX6QjD6/4//Bxj5GA8AuRwMYGkAPywL13jaY2BkYGA88P8Agx4j+/8fQDYfA1AEBWgDAIB2BOoAeNpjYGRgYNBh4GdgYgABEMnIABJzYNADCQAACWgAsQB42mNgYfzCOIGBlYGB0YcxjYGBwR1Kf2WQZGhhYGBiYGVmgAFGBiQQkOaawtDAoMBQxXjg/wEGPcYDDA4wNUA2CCgwsAAAO4EL6gAAeNpj2M0gyAACqxgGNWBkZ2D4/wMA+xkDdgAAAHjaY2BgYGaAYBkGRgYQiAHyGMF8FgYHIM3DwMHABGQrMOgyWDLEM1T9/w8UBfEMgLzE////P/5//f/V/xv+r4eaAAeMbAxwIUYmIMHEgKYAYjUcsDAwsLKxc3BycfPw8jEQA/gZBASFhEVExcQlJKWkZWTl5BUUlZRVVNXUNTQZBgMAAMR+E+gAEQFEAAAAKgAqACoANAA+AEgAUgBcAGYAcAB6AIQAjgCYAKIArAC2AMAAygDUAN4A6ADyAPwBBgEQARoBJAEuATgBQgFMAVYBYAFqAXQBfgGIAZIBnAGmAbIBzgHsAAB42u2NMQ6CUAyGW568x9AneYYgm4MJbhKFaExIOAVX8ApewSt4Bic4AfeAid3VOBixDxfPYEza5O+Xfi04YADggiUIULCuEJK8VhO4bSvpdnktHI5QCYtdi2sl8ZnXaHlqUrNKzdKcT8cjlq+rwZSvIVczNiezsfnP/uznmfPFBNODM2K7MTQ45YEAZqGP81AmGGcF3iPqOop0r1SPTaTbVkfUe4HXj97wYE+yNwWYxwWu4v1ugWHgo3S1XdZEVqWM7ET0cfnLGxWfkgR42o2PvWrDMBSFj/IHLaF0zKjRgdiVMwScNRAoWUoH78Y2icB/yIY09An6AH2Bdu/UB+yxopYshQiEvnvu0dURgDt8QeC8PDw7Fpji3fEA4z/PEJ6YOB5hKh4dj3EvXhxPqH/SKUY3rJ7srZ4FZnh1PMAtPhwP6fl2PMJMPDgeQ4rY8YT6Gzao0eAEA409DuggmTnFnOcSCiEiLMgxCiTI6Cq5DZUd3Qmp10vO0LaLTd2cjN4fOumlc7lUYbSQcZFkutRG7g6JKZKy0RmdLY680CDnEJ+UMkpFFe1RN7nxdVpXrC4aTtnaurOnYercZg2YVmLN/d/gczfEimrE/fs/bOuq29Zmn8tloORaXgZgGa78yO9/cnXm2BpaGvq25Dv9S4E9+5SIc9PqupJKhYFSSl47+Qcr1mYNAAAAeNptw0cKwkAAAMDZJA8Q7OUJvkLsPfZ6zFVERPy8qHh2YER+3i/BP83vIBLLySsoKimrqKqpa2hp6+jq6RsYGhmbmJqZSy0sraxtbO3sHRydnEMU4uR6yx7JJXveP7WrDycAAAAAAAH//wACeNpjYGRgYOABYhkgZgJCZgZNBkYGLQZtIJsFLMYAAAw3ALgAeNolizEKgDAQBCchRbC2sFER0YD6qVQiBCv/H9ezGI6Z5XBAw8CBK/m5iQQVauVbXLnOrMZv2oLdKFa8Pjuru2hJzGabmOSLzNMzvutpB3N42mNgZGBg4GKQYzBhYMxJLMlj4GBgAYow/P/PAJJhLM6sSoWKfWCAAwDAjgbRAAB42mNgYGBkAIIbCZo5IPrmUn0hGA0AO8EFTQAA);font-weight:400;font-style:normal}:root{--swiper-theme-color: #007aff}:host{position:relative;display:block;margin-left:auto;margin-right:auto;z-index:1}.swiper{margin-left:auto;margin-right:auto;position:relative;overflow:hidden;overflow:clip;list-style:none;padding:0;z-index:1;display:block}.swiper-vertical>.swiper-wrapper{flex-direction:column}.swiper-wrapper{position:relative;width:100%;height:100%;z-index:1;display:flex;transition-property:transform;transition-timing-function:var(--swiper-wrapper-transition-timing-function, initial);box-sizing:content-box}.swiper-android .swiper-slide,.swiper-ios .swiper-slide,.swiper-wrapper{transform:translateZ(0)}.swiper-horizontal{touch-action:pan-y}.swiper-vertical{touch-action:pan-x}.swiper-slide{flex-shrink:0;width:100%;height:100%;position:relative;transition-property:transform;display:block}.swiper-slide-invisible-blank{visibility:hidden}.swiper-autoheight,.swiper-autoheight .swiper-slide{height:auto}.swiper-autoheight .swiper-wrapper{align-items:flex-start;transition-property:transform,height}.swiper-backface-hidden .swiper-slide{transform:translateZ(0);-webkit-backface-visibility:hidden;backface-visibility:hidden}.swiper-3d.swiper-css-mode .swiper-wrapper{perspective:1200px}.swiper-3d .swiper-wrapper{transform-style:preserve-3d}.swiper-3d{perspective:1200px}.swiper-3d .swiper-slide,.swiper-3d .swiper-cube-shadow{transform-style:preserve-3d}.swiper-css-mode>.swiper-wrapper{overflow:auto;scrollbar-width:none;-ms-overflow-style:none}.swiper-css-mode>.swiper-wrapper::-webkit-scrollbar{display:none}.swiper-css-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:start start}.swiper-css-mode.swiper-horizontal>.swiper-wrapper{scroll-snap-type:x mandatory}.swiper-css-mode.swiper-vertical>.swiper-wrapper{scroll-snap-type:y mandatory}.swiper-css-mode.swiper-free-mode>.swiper-wrapper{scroll-snap-type:none}.swiper-css-mode.swiper-free-mode>.swiper-wrapper>.swiper-slide{scroll-snap-align:none}.swiper-css-mode.swiper-centered>.swiper-wrapper:before{content:"";flex-shrink:0;order:9999}.swiper-css-mode.swiper-centered>.swiper-wrapper>.swiper-slide{scroll-snap-align:center center;scroll-snap-stop:always}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper>.swiper-slide:first-child{margin-inline-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-horizontal>.swiper-wrapper:before{height:100%;min-height:1px;width:var(--swiper-centered-offset-after)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper>.swiper-slide:first-child{margin-block-start:var(--swiper-centered-offset-before)}.swiper-css-mode.swiper-centered.swiper-vertical>.swiper-wrapper:before{width:100%;min-width:1px;height:var(--swiper-centered-offset-after)}.swiper-3d .swiper-slide-shadow,.swiper-3d .swiper-slide-shadow-left,.swiper-3d .swiper-slide-shadow-right,.swiper-3d .swiper-slide-shadow-top,.swiper-3d .swiper-slide-shadow-bottom{position:absolute;left:0;top:0;width:100%;height:100%;pointer-events:none;z-index:10}.swiper-3d .swiper-slide-shadow{background:rgba(0,0,0,.15)}.swiper-3d .swiper-slide-shadow-left{background-image:linear-gradient(to left,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-right{background-image:linear-gradient(to right,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-top{background-image:linear-gradient(to top,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-3d .swiper-slide-shadow-bottom{background-image:linear-gradient(to bottom,rgba(0,0,0,.5),rgba(0,0,0,0))}.swiper-lazy-preloader{width:42px;height:42px;position:absolute;left:50%;top:50%;margin-left:-21px;margin-top:-21px;z-index:10;transform-origin:50%;box-sizing:border-box;border:4px solid var(--swiper-preloader-color, var(--swiper-theme-color));border-radius:50%;border-top-color:transparent}.swiper:not(.swiper-watch-progress) .swiper-lazy-preloader,.swiper-watch-progress .swiper-slide-visible .swiper-lazy-preloader{animation:swiper-preloader-spin 1s infinite linear}.swiper-lazy-preloader-white{--swiper-preloader-color: #fff}.swiper-lazy-preloader-black{--swiper-preloader-color: #000}@keyframes swiper-preloader-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.swiper-pagination{position:absolute;text-align:center;transition:.3s opacity;transform:translateZ(0);z-index:10}.swiper-pagination.swiper-pagination-hidden{opacity:0}.swiper-pagination-disabled>.swiper-pagination,.swiper-pagination.swiper-pagination-disabled{display:none!important}.swiper-pagination-fraction,.swiper-pagination-custom,.swiper-horizontal>.swiper-pagination-bullets,.swiper-pagination-bullets.swiper-pagination-horizontal{bottom:var(--swiper-pagination-bottom, 8px);top:var(--swiper-pagination-top, auto);left:0;width:100%}.swiper-pagination-bullets-dynamic{overflow:hidden;font-size:0}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transform:scale(.33);position:relative}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active,.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-main{transform:scale(1)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-prev-prev{transform:scale(.33)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next{transform:scale(.66)}.swiper-pagination-bullets-dynamic .swiper-pagination-bullet-active-next-next{transform:scale(.33)}.swiper-pagination-bullet{width:var(--swiper-pagination-bullet-width, var(--swiper-pagination-bullet-size, 8px));height:var(--swiper-pagination-bullet-height, var(--swiper-pagination-bullet-size, 8px));display:inline-block;border-radius:var(--swiper-pagination-bullet-border-radius, 50%);background:var(--swiper-pagination-bullet-inactive-color, #000);opacity:var(--swiper-pagination-bullet-inactive-opacity, .2)}button.swiper-pagination-bullet{border:none;margin:0;padding:0;box-shadow:none;-webkit-appearance:none;-moz-appearance:none;appearance:none}.swiper-pagination-clickable .swiper-pagination-bullet{cursor:pointer}.swiper-pagination-bullet:only-child{display:none!important}.swiper-pagination-bullet-active{opacity:var(--swiper-pagination-bullet-opacity, 1);background:var(--swiper-pagination-color, var(--swiper-theme-color))}.swiper-vertical>.swiper-pagination-bullets,.swiper-pagination-vertical.swiper-pagination-bullets{right:var(--swiper-pagination-right, 8px);left:var(--swiper-pagination-left, auto);top:50%;transform:translate3d(0,-50%,0)}.swiper-vertical>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets .swiper-pagination-bullet{margin:var(--swiper-pagination-bullet-vertical-gap, 6px) 0;display:block}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{top:50%;transform:translateY(-50%);width:8px}.swiper-vertical>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-vertical.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{display:inline-block;transition:.2s transform,.2s top}.swiper-horizontal>.swiper-pagination-bullets .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets .swiper-pagination-bullet{margin:0 var(--swiper-pagination-bullet-horizontal-gap, 4px)}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic{left:50%;transform:translate(-50%);white-space:nowrap}.swiper-horizontal>.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet,.swiper-pagination-horizontal.swiper-pagination-bullets.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s left}.swiper-horizontal.swiper-rtl>.swiper-pagination-bullets-dynamic .swiper-pagination-bullet{transition:.2s transform,.2s right}.swiper-pagination-fraction{color:var(--swiper-pagination-fraction-color, inherit)}.swiper-pagination-progressbar{background:var(--swiper-pagination-progressbar-bg-color, rgba(0, 0, 0, .25));position:absolute}.swiper-pagination-progressbar .swiper-pagination-progressbar-fill{background:var(--swiper-pagination-color, var(--swiper-theme-color));position:absolute;left:0;top:0;width:100%;height:100%;transform:scale(0);transform-origin:left top}.swiper-rtl .swiper-pagination-progressbar .swiper-pagination-progressbar-fill{transform-origin:right top}.swiper-horizontal>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-horizontal,.swiper-vertical>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-vertical.swiper-pagination-progressbar-opposite{width:100%;height:var(--swiper-pagination-progressbar-size, 4px);left:0;top:0}.swiper-vertical>.swiper-pagination-progressbar,.swiper-pagination-progressbar.swiper-pagination-vertical,.swiper-horizontal>.swiper-pagination-progressbar.swiper-pagination-progressbar-opposite,.swiper-pagination-progressbar.swiper-pagination-horizontal.swiper-pagination-progressbar-opposite{width:var(--swiper-pagination-progressbar-size, 4px);height:100%;left:0;top:0}.swiper-pagination-lock{display:none}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TreeNode } from "@edifice-ui/react";
|
|
2
|
+
import { type IFolder } from "edifice-ts-client";
|
|
3
|
+
/** Utility inner class that wraps an IFolder into a TreeNode. */
|
|
4
|
+
export default class TreeNodeFolderWrapper implements TreeNode {
|
|
5
|
+
readonly folder: IFolder;
|
|
6
|
+
constructor(folder: IFolder);
|
|
7
|
+
readonly id: string;
|
|
8
|
+
readonly name: string;
|
|
9
|
+
readonly childNumber: number;
|
|
10
|
+
section: boolean;
|
|
11
|
+
readonly children: TreeNode[];
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function arrayUnique<T>(array: T[]): T[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function capitalizeFirstLetter(string: string): string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function fullTextSearch(text: string, search: string): boolean;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type App, type ResourceType, type IAction, type IFilter, type IOrder } from "edifice-ts-client";
|
|
2
|
+
export interface AppParams {
|
|
3
|
+
app: App;
|
|
4
|
+
types: ResourceType[];
|
|
5
|
+
filters: IFilter[];
|
|
6
|
+
orders: IOrder[];
|
|
7
|
+
actions: IAction[];
|
|
8
|
+
trashActions: IAction[];
|
|
9
|
+
libraryAppFilter?: string;
|
|
10
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const refScrollTo: () => () => void;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ode-explorer",
|
|
3
|
-
"version": "1.3.2-dev.
|
|
3
|
+
"version": "1.3.2-dev.202401101530",
|
|
4
4
|
"description": "Open Digital Education Explorer",
|
|
5
5
|
"homepage": "https://github.com/opendigitaleducation/explorer#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -14,8 +14,16 @@
|
|
|
14
14
|
"author": "Open Digital Education",
|
|
15
15
|
"type": "module",
|
|
16
16
|
"files": [
|
|
17
|
-
"dist"
|
|
17
|
+
"dist",
|
|
18
|
+
"lib",
|
|
19
|
+
"*.d.ts"
|
|
18
20
|
],
|
|
21
|
+
"exports": {
|
|
22
|
+
"./lib": {
|
|
23
|
+
"import": "./lib/index.js",
|
|
24
|
+
"types": "./lib/index.d.ts"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
19
27
|
"husky": {
|
|
20
28
|
"hooks": {
|
|
21
29
|
"pre-commit": "lint-staged"
|
|
@@ -32,20 +40,25 @@
|
|
|
32
40
|
"@edifice-ui/react": "develop",
|
|
33
41
|
"@react-spring/web": "9.7.3",
|
|
34
42
|
"@tanstack/react-query": "5.8.4",
|
|
43
|
+
"clsx": "2.0.0",
|
|
35
44
|
"dayjs": "1.11.10",
|
|
45
|
+
"edifice-ts-client": "develop",
|
|
36
46
|
"i18next": "23.7.6",
|
|
37
47
|
"i18next-http-backend": "2.4.2",
|
|
48
|
+
"ohash": "1.1.3",
|
|
38
49
|
"react": "18.2.0",
|
|
39
50
|
"react-dom": "18.2.0",
|
|
40
51
|
"react-error-boundary": "4.0.11",
|
|
41
52
|
"react-hook-form": "7.49.2",
|
|
42
53
|
"react-i18next": "13.5.0",
|
|
43
54
|
"react-intersection-observer": "9.5.3",
|
|
55
|
+
"react-slugify": "3.0.3",
|
|
44
56
|
"swiper": "11.0.4",
|
|
45
57
|
"zustand": "4.4.6"
|
|
46
58
|
},
|
|
47
59
|
"devDependencies": {
|
|
48
60
|
"@axe-core/react": "4.8.1",
|
|
61
|
+
"@babel/plugin-transform-react-pure-annotations": "7.23.3",
|
|
49
62
|
"@tanstack/react-query-devtools": "5.8.4",
|
|
50
63
|
"@types/node": "20.9.3",
|
|
51
64
|
"@types/react": "18.2.38",
|
|
@@ -65,19 +78,35 @@
|
|
|
65
78
|
"eslint-plugin-jsx-a11y": "6.8.0",
|
|
66
79
|
"eslint-plugin-react": "7.33.2",
|
|
67
80
|
"eslint-plugin-react-hooks": "4.6.0",
|
|
81
|
+
"eslint-plugin-react-refresh": "0.4.5",
|
|
68
82
|
"husky": "8.0.3",
|
|
69
83
|
"lint-staged": "15.1.0",
|
|
70
84
|
"prettier": "3.1.0",
|
|
71
|
-
"typescript": "5.
|
|
85
|
+
"typescript": "5.2.2",
|
|
72
86
|
"vite": "4.5.1",
|
|
87
|
+
"vite-plugin-dts": "3.7.0",
|
|
73
88
|
"vite-tsconfig-paths": "4.2.1"
|
|
74
89
|
},
|
|
90
|
+
"peerDependencies": {
|
|
91
|
+
"@edifice-ui/icons": "*",
|
|
92
|
+
"@edifice-ui/react": "*",
|
|
93
|
+
"@react-spring/web": "9.7.3",
|
|
94
|
+
"@tanstack/react-query": "5.8.4",
|
|
95
|
+
"clsx": "2.0.0",
|
|
96
|
+
"i18next": "23.7.6",
|
|
97
|
+
"i18next-http-backend": "2.4.2",
|
|
98
|
+
"react": "18.2.0",
|
|
99
|
+
"react-dom": "18.2.0",
|
|
100
|
+
"react-hook-form": "7.49.2",
|
|
101
|
+
"react-i18next": "13.5.0",
|
|
102
|
+
"zustand": "4.4.6"
|
|
103
|
+
},
|
|
75
104
|
"packageManager": "pnpm@8.6.6",
|
|
76
105
|
"engines": {
|
|
77
106
|
"node": "18"
|
|
78
107
|
},
|
|
79
108
|
"scripts": {
|
|
80
|
-
"build": "vite build",
|
|
109
|
+
"build": "vite build && vite build --mode lib",
|
|
81
110
|
"clean": "concurrently \"pnpm:clean:*\"",
|
|
82
111
|
"clean:dist": "rm -rf dist",
|
|
83
112
|
"clean:lighthouse": "rm -rf .lighthouseci",
|