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.
Files changed (79) hide show
  1. package/dist/version.txt +1 -1
  2. package/explorer.d.ts +1 -0
  3. package/lib/ActionBarContainer.js +375 -0
  4. package/lib/AppAction.js +47 -0
  5. package/lib/DeleteModal.js +60 -0
  6. package/lib/DisableModal.js +20 -0
  7. package/lib/EmptyScreenApp.js +53 -0
  8. package/lib/EmptyScreenError.js +13 -0
  9. package/lib/EmptyScreenNoContentInFolder.js +20 -0
  10. package/lib/EmptyScreenSearch.js +20 -0
  11. package/lib/EmptyScreenTrash.js +18 -0
  12. package/lib/FolderModal.js +138 -0
  13. package/lib/FoldersList.js +77 -0
  14. package/lib/Library.js +19 -0
  15. package/lib/MoveModal.js +94 -0
  16. package/lib/ResourcesList.js +261 -0
  17. package/lib/TrashModal.js +20 -0
  18. package/lib/app/root/index.d.ts +2 -0
  19. package/lib/components/AppAction/AppAction.d.ts +1 -0
  20. package/lib/components/EmptyScreens/EmptyScreenApp.d.ts +2 -0
  21. package/lib/components/EmptyScreens/EmptyScreenError.d.ts +2 -0
  22. package/lib/components/EmptyScreens/EmptyScreenNoContentInFolder.d.ts +2 -0
  23. package/lib/components/EmptyScreens/EmptyScreenSearch.d.ts +2 -0
  24. package/lib/components/EmptyScreens/EmptyScreenTrash.d.ts +1 -0
  25. package/lib/components/Explorer.d.ts +5 -0
  26. package/lib/components/ExplorerBreadcrumb.d.ts +1 -0
  27. package/lib/components/LoadMore.d.ts +3 -0
  28. package/lib/config/getExplorerConfig.d.ts +11 -0
  29. package/lib/config/index.d.ts +3 -0
  30. package/lib/features/AccessControl/AccessControl.d.ts +12 -0
  31. package/lib/features/AccessControl/useAccessControl.d.ts +14 -0
  32. package/lib/features/ActionBar/ActionBarContainer.d.ts +1 -0
  33. package/lib/features/ActionBar/Delete/DeleteModal.d.ts +8 -0
  34. package/lib/features/ActionBar/Delete/useDeleteModal.d.ts +8 -0
  35. package/lib/features/ActionBar/Disable/DisableModal.d.ts +5 -0
  36. package/lib/features/ActionBar/Disable/useDisableModal.d.ts +4 -0
  37. package/lib/features/ActionBar/Folder/FolderModal.d.ts +9 -0
  38. package/lib/features/ActionBar/Folder/useFolderModal.d.ts +22 -0
  39. package/lib/features/ActionBar/Move/MoveModal.d.ts +8 -0
  40. package/lib/features/ActionBar/Move/useMoveModal.d.ts +12 -0
  41. package/lib/features/ActionBar/Trash/TrashModal.d.ts +5 -0
  42. package/lib/features/ActionBar/Trash/useTrashModal.d.ts +4 -0
  43. package/lib/features/ActionBar/useActionBar.d.ts +30 -0
  44. package/lib/features/List/FolderCard.d.ts +17 -0
  45. package/lib/features/List/FoldersList.d.ts +7 -0
  46. package/lib/features/List/List.d.ts +1 -0
  47. package/lib/features/List/ResourceCard.d.ts +22 -0
  48. package/lib/features/List/ResourcesList.d.ts +8 -0
  49. package/lib/features/SearchForm/SearchForm.d.ts +1 -0
  50. package/lib/features/SearchForm/useSearchForm.d.ts +8 -0
  51. package/lib/features/SearchForm/useSelectedFilters.d.ts +8 -0
  52. package/lib/features/SideBar/Library/Library.d.ts +2 -0
  53. package/lib/features/SideBar/TrashButton.d.ts +7 -0
  54. package/lib/features/SideBar/TreeViewContainer.d.ts +1 -0
  55. package/lib/i18n.d.ts +2 -0
  56. package/lib/index.d.ts +1 -0
  57. package/lib/index.js +13 -0
  58. package/lib/index2.js +1867 -0
  59. package/lib/main.d.ts +0 -0
  60. package/lib/services/api/index.d.ts +129 -0
  61. package/lib/store/index.d.ts +98 -0
  62. package/lib/style.css +410 -0
  63. package/lib/utils/TreeNodeFolderWrapper.d.ts +12 -0
  64. package/lib/utils/addNode.d.ts +6 -0
  65. package/lib/utils/arrayUnique.d.ts +1 -0
  66. package/lib/utils/capitalizeFirstLetter.d.ts +1 -0
  67. package/lib/utils/deleteNode.d.ts +4 -0
  68. package/lib/utils/findNodeById.d.ts +2 -0
  69. package/lib/utils/fullTextSearch.d.ts +1 -0
  70. package/lib/utils/getAncestors.d.ts +2 -0
  71. package/lib/utils/getAppParams.d.ts +10 -0
  72. package/lib/utils/hasChildren.d.ts +2 -0
  73. package/lib/utils/isResourceShared.d.ts +2 -0
  74. package/lib/utils/modifyNode.d.ts +2 -0
  75. package/lib/utils/moveNode.d.ts +5 -0
  76. package/lib/utils/scrollToTop.d.ts +1 -0
  77. package/lib/utils/updateNode.d.ts +6 -0
  78. package/lib/utils/wrapTreeNode.d.ts +3 -0
  79. package/package.json +33 -3
@@ -0,0 +1,2 @@
1
+ import { type TreeNode } from "@edifice-ui/react";
2
+ export declare function hasChildren(folderId: string, data: TreeNode): boolean;
@@ -0,0 +1,2 @@
1
+ import { type IResource } from "edifice-ts-client";
2
+ export declare function isResourceShared(resource: IResource): boolean;
@@ -0,0 +1,2 @@
1
+ import { type TreeNode } from "@edifice-ui/react";
2
+ export declare function modifyNode(data: TreeNode, callback: (node: TreeNode, parent?: TreeNode) => TreeNode | undefined): TreeNode;
@@ -0,0 +1,5 @@
1
+ import { type TreeNode } from "@edifice-ui/react";
2
+ export declare function moveNode(treeData: TreeNode, { destinationId, folders }: {
3
+ destinationId: string;
4
+ folders: string[];
5
+ }): TreeNode;
@@ -0,0 +1 @@
1
+ export declare const refScrollTo: () => () => void;
@@ -0,0 +1,6 @@
1
+ import { type TreeNode } from "@edifice-ui/react";
2
+ import { type IFolder } from "edifice-ts-client";
3
+ export declare function updateNode(treeData: TreeNode, { folderId, newFolder }: {
4
+ folderId: string;
5
+ newFolder: IFolder;
6
+ }): TreeNode;
@@ -0,0 +1,3 @@
1
+ import { type TreeNode } from "@edifice-ui/react";
2
+ import { type IFolder } from "edifice-ts-client";
3
+ export declare const wrapTreeNode: (treeNode: TreeNode, folders: IFolder[] | undefined, parentId: string) => TreeNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ode-explorer",
3
- "version": "1.3.2-dev.202401091605",
3
+ "version": "1.3.2-dev.202401091744",
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,36 @@
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
85
  "typescript": "5.3.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 && pnpm run build-lib",
110
+ "build-lib": "vite build -c vite.config.lib.ts",
81
111
  "clean": "concurrently \"pnpm:clean:*\"",
82
112
  "clean:dist": "rm -rf dist",
83
113
  "clean:lighthouse": "rm -rf .lighthouseci",