@nextcloud/files 3.2.0 → 3.3.0
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/dav/dav.d.ts +3 -24
- package/dist/fileAction.d.ts +1 -21
- package/dist/fileListHeaders.d.ts +1 -21
- package/dist/filename.d.ts +10 -0
- package/dist/files/file.d.ts +1 -21
- package/dist/files/folder.d.ts +1 -21
- package/dist/files/node.d.ts +33 -1
- package/dist/files/nodeData.d.ts +1 -21
- package/dist/index.cjs +2083 -1134
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -24
- package/dist/index.mjs +2082 -1140
- package/dist/index.mjs.map +1 -1
- package/dist/navigation/column.d.ts +1 -21
- package/dist/navigation/navigation.d.ts +1 -21
- package/dist/navigation/view.d.ts +3 -22
- package/dist/newFileMenu.d.ts +23 -22
- package/dist/utils/logger.d.ts +1 -1
- package/dist/vendor.LICENSE.txt +1 -1
- package/package.json +14 -13
package/dist/dav/dav.d.ts
CHANGED
|
@@ -1,28 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
* @author Ferdinand Thiessen <opensource@fthiessen.de>
|
|
6
|
-
*
|
|
7
|
-
* @license AGPL-3.0-or-later
|
|
8
|
-
*
|
|
9
|
-
* This program is free software: you can redistribute it and/or modify
|
|
10
|
-
* it under the terms of the GNU Affero General Public License as
|
|
11
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
12
|
-
* License, or (at your option) any later version.
|
|
13
|
-
*
|
|
14
|
-
* This program is distributed in the hope that it will be useful,
|
|
15
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
16
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
17
|
-
* GNU Affero General Public License for more details.
|
|
18
|
-
*
|
|
19
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
20
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
21
|
-
*
|
|
22
|
-
*/
|
|
23
|
-
import type { FileStat, WebDAVClient } from 'webdav';
|
|
24
|
-
import type { Node } from '../files/node';
|
|
1
|
+
import { FileStat, WebDAVClient } from 'webdav';
|
|
2
|
+
import { Node } from '../files/node';
|
|
25
3
|
import { CancelablePromise } from 'cancelable-promise';
|
|
4
|
+
|
|
26
5
|
/**
|
|
27
6
|
* The DAV root path for the current user
|
|
28
7
|
*/
|
package/dist/fileAction.d.ts
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
*
|
|
6
|
-
* @license AGPL-3.0-or-later
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
1
|
import { Node } from './files/node';
|
|
23
2
|
import { View } from './navigation/view';
|
|
3
|
+
|
|
24
4
|
export declare enum DefaultType {
|
|
25
5
|
DEFAULT = "default",
|
|
26
6
|
HIDDEN = "hidden"
|
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2023 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
*
|
|
6
|
-
* @license AGPL-3.0-or-later
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
1
|
import { Folder } from './files/folder';
|
|
23
2
|
import { View } from './navigation/view';
|
|
3
|
+
|
|
24
4
|
export interface HeaderData {
|
|
25
5
|
/** Unique ID */
|
|
26
6
|
id: string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: Ferdinand Thiessen <opensource@fthiessen.de>
|
|
3
|
+
* SPDX-License-Identifier: AGPL-3.0-or-later or LGPL-3.0-or-later
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Check the validity of a filename
|
|
7
|
+
* This is a convinient wrapper for `checkFilenameValidity` to only return a boolean for the valid
|
|
8
|
+
* @param filename Filename to check validity
|
|
9
|
+
*/
|
|
10
|
+
export declare function isFilenameValid(filename: string): boolean;
|
package/dist/files/file.d.ts
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
*
|
|
6
|
-
* @license AGPL-3.0-or-later
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
1
|
import { FileType } from './fileType';
|
|
23
2
|
import { Node } from './node';
|
|
3
|
+
|
|
24
4
|
export declare class File extends Node {
|
|
25
5
|
get type(): FileType;
|
|
26
6
|
}
|
package/dist/files/folder.d.ts
CHANGED
|
@@ -1,27 +1,7 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
*
|
|
6
|
-
* @license AGPL-3.0-or-later
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
1
|
import { FileType } from './fileType';
|
|
23
2
|
import { Node } from './node';
|
|
24
3
|
import { NodeData } from './nodeData';
|
|
4
|
+
|
|
25
5
|
export declare class Folder extends Node {
|
|
26
6
|
constructor(data: NodeData);
|
|
27
7
|
get type(): FileType;
|
package/dist/files/node.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { Permission } from '../permissions';
|
|
2
2
|
import { FileType } from './fileType';
|
|
3
3
|
import { Attribute, NodeData } from './nodeData';
|
|
4
|
+
|
|
4
5
|
export declare enum NodeStatus {
|
|
5
6
|
/** This is a new node and it doesn't exists on the filesystem yet */
|
|
6
7
|
NEW = "new",
|
|
@@ -15,9 +16,12 @@ export declare abstract class Node {
|
|
|
15
16
|
private _data;
|
|
16
17
|
private _attributes;
|
|
17
18
|
private _knownDavService;
|
|
19
|
+
private handler;
|
|
18
20
|
constructor(data: NodeData, davService?: RegExp);
|
|
19
21
|
/**
|
|
20
22
|
* Get the source url to this object
|
|
23
|
+
* There is no setter as the source is not meant to be changed manually.
|
|
24
|
+
* You can use the rename or move method to change the source.
|
|
21
25
|
*/
|
|
22
26
|
get source(): string;
|
|
23
27
|
/**
|
|
@@ -26,15 +30,22 @@ export declare abstract class Node {
|
|
|
26
30
|
get encodedSource(): string;
|
|
27
31
|
/**
|
|
28
32
|
* Get this object name
|
|
33
|
+
* There is no setter as the source is not meant to be changed manually.
|
|
34
|
+
* You can use the rename or move method to change the source.
|
|
29
35
|
*/
|
|
30
36
|
get basename(): string;
|
|
31
37
|
/**
|
|
32
38
|
* Get this object's extension
|
|
39
|
+
* There is no setter as the source is not meant to be changed manually.
|
|
40
|
+
* You can use the rename or move method to change the source.
|
|
33
41
|
*/
|
|
34
42
|
get extension(): string | null;
|
|
35
43
|
/**
|
|
36
44
|
* Get the directory path leading to this object
|
|
37
45
|
* Will use the relative path to root if available
|
|
46
|
+
*
|
|
47
|
+
* There is no setter as the source is not meant to be changed manually.
|
|
48
|
+
* You can use the rename or move method to change the source.
|
|
38
49
|
*/
|
|
39
50
|
get dirname(): string;
|
|
40
51
|
/**
|
|
@@ -43,20 +54,28 @@ export declare abstract class Node {
|
|
|
43
54
|
abstract get type(): FileType;
|
|
44
55
|
/**
|
|
45
56
|
* Get the file mime
|
|
57
|
+
* There is no setter as the mime is not meant to be changed
|
|
46
58
|
*/
|
|
47
59
|
get mime(): string | undefined;
|
|
48
60
|
/**
|
|
49
61
|
* Get the file modification time
|
|
62
|
+
* There is no setter as the modification time is not meant to be changed manually.
|
|
63
|
+
* It will be automatically updated when the attributes are changed.
|
|
50
64
|
*/
|
|
51
65
|
get mtime(): Date | undefined;
|
|
52
66
|
/**
|
|
53
67
|
* Get the file creation time
|
|
68
|
+
* There is no setter as the creation time is not meant to be changed
|
|
54
69
|
*/
|
|
55
70
|
get crtime(): Date | undefined;
|
|
56
71
|
/**
|
|
57
72
|
* Get the file size
|
|
58
73
|
*/
|
|
59
74
|
get size(): number | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Set the file size
|
|
77
|
+
*/
|
|
78
|
+
set size(size: number | undefined);
|
|
60
79
|
/**
|
|
61
80
|
* Get the file attribute
|
|
62
81
|
*/
|
|
@@ -65,8 +84,13 @@ export declare abstract class Node {
|
|
|
65
84
|
* Get the file permissions
|
|
66
85
|
*/
|
|
67
86
|
get permissions(): Permission;
|
|
87
|
+
/**
|
|
88
|
+
* Set the file permissions
|
|
89
|
+
*/
|
|
90
|
+
set permissions(permissions: Permission);
|
|
68
91
|
/**
|
|
69
92
|
* Get the file owner
|
|
93
|
+
* There is no setter as the owner is not meant to be changed
|
|
70
94
|
*/
|
|
71
95
|
get owner(): string | null;
|
|
72
96
|
/**
|
|
@@ -75,6 +99,7 @@ export declare abstract class Node {
|
|
|
75
99
|
get isDavRessource(): boolean;
|
|
76
100
|
/**
|
|
77
101
|
* Get the dav root of this object
|
|
102
|
+
* There is no setter as the root is not meant to be changed
|
|
78
103
|
*/
|
|
79
104
|
get root(): string | null;
|
|
80
105
|
/**
|
|
@@ -83,7 +108,7 @@ export declare abstract class Node {
|
|
|
83
108
|
get path(): string;
|
|
84
109
|
/**
|
|
85
110
|
* Get the node id if defined.
|
|
86
|
-
*
|
|
111
|
+
* There is no setter as the fileid is not meant to be changed
|
|
87
112
|
*/
|
|
88
113
|
get fileid(): number | undefined;
|
|
89
114
|
/**
|
|
@@ -112,4 +137,11 @@ export declare abstract class Node {
|
|
|
112
137
|
* Update the mtime if exists.
|
|
113
138
|
*/
|
|
114
139
|
private updateMtime;
|
|
140
|
+
/**
|
|
141
|
+
* Update the attributes of the node
|
|
142
|
+
*
|
|
143
|
+
* @param attributes The new attributes to update
|
|
144
|
+
*/
|
|
145
|
+
update(attributes: Attribute): void;
|
|
146
|
+
private cleanAttributes;
|
|
115
147
|
}
|
package/dist/files/nodeData.d.ts
CHANGED
|
@@ -1,26 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @copyright Copyright (c) 2022 John Molakvoæ <skjnldsv@protonmail.com>
|
|
3
|
-
*
|
|
4
|
-
* @author John Molakvoæ <skjnldsv@protonmail.com>
|
|
5
|
-
*
|
|
6
|
-
* @license AGPL-3.0-or-later
|
|
7
|
-
*
|
|
8
|
-
* This program is free software: you can redistribute it and/or modify
|
|
9
|
-
* it under the terms of the GNU Affero General Public License as
|
|
10
|
-
* published by the Free Software Foundation, either version 3 of the
|
|
11
|
-
* License, or (at your option) any later version.
|
|
12
|
-
*
|
|
13
|
-
* This program is distributed in the hope that it will be useful,
|
|
14
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16
|
-
* GNU Affero General Public License for more details.
|
|
17
|
-
*
|
|
18
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
19
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
20
|
-
*
|
|
21
|
-
*/
|
|
22
1
|
import { Permission } from '../permissions';
|
|
23
2
|
import { NodeStatus } from './node';
|
|
3
|
+
|
|
24
4
|
export interface Attribute {
|
|
25
5
|
[key: string]: any;
|
|
26
6
|
}
|