@nextcloud/files 4.0.0-beta.9 → 4.0.0-rc.1
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/README.md +117 -0
- package/dist/actions/fileAction.d.ts +4 -23
- package/dist/actions/fileListAction.d.ts +3 -15
- package/dist/actions/index.d.ts +4 -3
- package/dist/filters/functions.d.ts +20 -0
- package/dist/filters/index.d.ts +7 -0
- package/dist/{fileListFilters.d.ts → filters/listFilters.d.ts} +1 -20
- package/dist/headers/functions.d.ts +11 -0
- package/dist/headers/index.d.ts +3 -0
- package/dist/{fileListHeaders.d.ts → headers/listHeaders.d.ts} +5 -15
- package/dist/index.d.ts +3 -2
- package/dist/index.mjs +111 -781
- package/dist/index.mjs.map +1 -1
- package/dist/navigation/navigation.d.ts +2 -2
- package/dist/registry.d.ts +28 -0
- package/dist/sidebar/SidebarTab.d.ts +23 -7
- package/package.json +5 -6
|
@@ -20,14 +20,17 @@ export interface ISidebarContext {
|
|
|
20
20
|
* @see https://developer.mozilla.org/en-US/docs/Web/API/Web_components
|
|
21
21
|
* @see https://vuejs.org/guide/extras/web-components#building-custom-elements-with-vue
|
|
22
22
|
*/
|
|
23
|
-
export interface
|
|
23
|
+
export interface SidebarTabComponent extends ISidebarContext {
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
* @param active - The new active state
|
|
25
|
+
* The active state of the sidebar tab.
|
|
26
|
+
* It will be set to true if this component is the currently active tab.
|
|
28
27
|
*/
|
|
29
|
-
|
|
28
|
+
active: boolean;
|
|
30
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* The instance type of a sidebar tab web component.
|
|
32
|
+
*/
|
|
33
|
+
export type SidebarTabComponentInstance = SidebarTabComponent & HTMLElement;
|
|
31
34
|
/**
|
|
32
35
|
* Implementation of a custom sidebar tab within the files app.
|
|
33
36
|
*/
|
|
@@ -52,7 +55,10 @@ export interface ISidebarTab {
|
|
|
52
55
|
order: number;
|
|
53
56
|
/**
|
|
54
57
|
* The tag name of the web component.
|
|
55
|
-
*
|
|
58
|
+
*
|
|
59
|
+
* The web component must be defined using this name with `CustomElementRegistry.define()`,
|
|
60
|
+
* either on initialization or within the `onInit` callback (preferred).
|
|
61
|
+
* When rendering the sidebar tab, the files app will wait for the component to be defined in the registry (`customElements.whenDefined()`).
|
|
56
62
|
*
|
|
57
63
|
* To avoid name clashes the name has to start with your appid (e.g. `your_app`).
|
|
58
64
|
* So in addition with the web component naming rules a good name would be `your_app-files-sidebar-tab`.
|
|
@@ -61,9 +67,19 @@ export interface ISidebarTab {
|
|
|
61
67
|
/**
|
|
62
68
|
* Callback to check if the sidebar tab should be shown for the selected node.
|
|
63
69
|
*
|
|
70
|
+
* If not provided, the tab will always be shown.
|
|
71
|
+
*
|
|
64
72
|
* @param context - The current context of the files app
|
|
65
73
|
*/
|
|
66
|
-
enabled
|
|
74
|
+
enabled?: (context: ISidebarContext) => boolean;
|
|
75
|
+
/**
|
|
76
|
+
* Called when the sidebar tab is active and rendered the first time in the sidebar.
|
|
77
|
+
* This should be used to register the web componen (`CustomElementRegistry.define()`).
|
|
78
|
+
*
|
|
79
|
+
* The sidebar itself will anyways wait for the component to be defined in the registry (`customElements.whenDefined()`).
|
|
80
|
+
* But also will wait for the promise returned by this method to resolve before rendering the tab.
|
|
81
|
+
*/
|
|
82
|
+
onInit?: () => Promise<void>;
|
|
67
83
|
}
|
|
68
84
|
/**
|
|
69
85
|
* Register a new sidebar tab for the files app.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nextcloud/files",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-rc.1",
|
|
4
4
|
"description": "Nextcloud files utils",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"nextcloud",
|
|
@@ -62,17 +62,16 @@
|
|
|
62
62
|
},
|
|
63
63
|
"devDependencies": {
|
|
64
64
|
"@codecov/vite-plugin": "^1.9.1",
|
|
65
|
-
"@nextcloud/eslint-config": "^9.0.0-rc.
|
|
66
|
-
"@nextcloud/event-bus": "^3.3.3",
|
|
65
|
+
"@nextcloud/eslint-config": "^9.0.0-rc.8",
|
|
67
66
|
"@nextcloud/typings": "^1.10.0",
|
|
68
67
|
"@nextcloud/vite-config": "^2.5.2",
|
|
69
|
-
"@types/node": "^25.0
|
|
70
|
-
"@vitest/coverage-istanbul": "^4.0.
|
|
68
|
+
"@types/node": "^25.1.0",
|
|
69
|
+
"@vitest/coverage-istanbul": "^4.0.18",
|
|
71
70
|
"css.escape": "^1.5.1",
|
|
72
71
|
"fast-xml-parser": "^5.3.3",
|
|
73
72
|
"jsdom": "^27.4.0",
|
|
74
73
|
"tslib": "^2.8.1",
|
|
75
|
-
"typedoc": "^0.28.
|
|
74
|
+
"typedoc": "^0.28.16",
|
|
76
75
|
"typedoc-plugin-missing-exports": "^4.1.2",
|
|
77
76
|
"typescript": "^5.9.3",
|
|
78
77
|
"vite": "^7.3.1",
|