@nextcloud/files 3.0.0-beta.26 → 3.0.0-beta.27
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/fileAction.d.ts +6 -0
- package/dist/humanfilesize.d.ts +6 -2
- package/dist/index.cjs +274 -269
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +254 -249
- package/dist/index.mjs.map +1 -1
- package/package.json +12 -12
package/dist/fileAction.d.ts
CHANGED
|
@@ -52,6 +52,11 @@ interface FileActionData {
|
|
|
52
52
|
execBatch?: (files: Node[], view: View, dir: string) => Promise<(boolean | null)[]>;
|
|
53
53
|
/** This action order in the list */
|
|
54
54
|
order?: number;
|
|
55
|
+
/**
|
|
56
|
+
* This action's parent id in the list.
|
|
57
|
+
* If none found, will be displayed as a top-level action.
|
|
58
|
+
*/
|
|
59
|
+
parent?: string;
|
|
55
60
|
/**
|
|
56
61
|
* Make this action the default.
|
|
57
62
|
* If multiple actions are default, the first one
|
|
@@ -83,6 +88,7 @@ export declare class FileAction {
|
|
|
83
88
|
get exec(): (file: Node, view: View, dir: string) => Promise<boolean | null>;
|
|
84
89
|
get execBatch(): ((files: Node[], view: View, dir: string) => Promise<(boolean | null)[]>) | undefined;
|
|
85
90
|
get order(): number | undefined;
|
|
91
|
+
get parent(): string | undefined;
|
|
86
92
|
get default(): DefaultType | undefined;
|
|
87
93
|
get inline(): ((file: Node, view: View) => boolean) | undefined;
|
|
88
94
|
get renderInline(): ((file: Node, view: View) => Promise<HTMLElement | null>) | undefined;
|
package/dist/humanfilesize.d.ts
CHANGED
|
@@ -23,11 +23,15 @@
|
|
|
23
23
|
/**
|
|
24
24
|
* Format a file size in a human-like format. e.g. 42GB
|
|
25
25
|
*
|
|
26
|
+
* The default for Nextcloud is like Windows using binary sizes but showing decimal units,
|
|
27
|
+
* meaning 1024 bytes will show as 1KB instead of 1KiB or like on Apple 1.02 KB
|
|
28
|
+
*
|
|
26
29
|
* @param size in bytes
|
|
27
30
|
* @param skipSmallSizes avoid rendering tiny sizes and return '< 1 KB' instead
|
|
28
|
-
* @param binaryPrefixes True if size
|
|
31
|
+
* @param binaryPrefixes True if size binary prefixes like `KiB` should be used as per IEC 80000-13
|
|
32
|
+
* @param base1000 Set to true to use base 1000 as per SI or used by Apple (default is base 1024 like Linux or Windows)
|
|
29
33
|
*/
|
|
30
|
-
export declare function formatFileSize(size: number | string, skipSmallSizes?: boolean, binaryPrefixes?: boolean): string;
|
|
34
|
+
export declare function formatFileSize(size: number | string, skipSmallSizes?: boolean, binaryPrefixes?: boolean, base1000?: boolean): string;
|
|
31
35
|
/**
|
|
32
36
|
* Returns a file size in bytes from a humanly readable string
|
|
33
37
|
* Note: `b` and `B` are both parsed as bytes and not as bit or byte.
|