@opencloud-eu/web-pkg 4.3.0 → 5.0.0-alpha.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/dist/{TextEditor-Cn7QTWpj.js → TextEditor-uEaAtt7z.js} +5 -5
- package/dist/assets/worker-Br2EoHIh.js +40 -0
- package/dist/assets/{worker-B8_1fnv6.js → worker-CL8AMTxB.js} +3 -3
- package/dist/assets/{worker-CexULVXL.js → worker-SrzUf4Ns.js} +23 -23
- package/dist/{index-BAXp6cDe.js → index-BwyOzVbn.js} +16422 -16327
- package/dist/src/apps/types.d.ts +1 -0
- package/dist/src/components/ContextActions/ContextMenuQuickAction.vue.d.ts +2 -2
- package/dist/src/components/FilesList/ResourceGhostElement.vue.d.ts +7 -28
- package/dist/src/components/FilesList/ResourceIcon.vue.d.ts +5 -44
- package/dist/src/components/FilesList/ResourceTable.vue.d.ts +16 -357
- package/dist/src/components/FilesList/ResourceTiles.vue.d.ts +14 -64
- package/dist/src/components/ItemFilter.vue.d.ts +8 -9
- package/dist/src/composables/actions/files/index.d.ts +12 -11
- package/dist/src/composables/actions/files/useFileActions.d.ts +2 -7
- package/dist/src/composables/actions/files/useFileActionsOpenWithDefault.d.ts +4 -0
- package/dist/src/composables/actions/types.d.ts +1 -1
- package/dist/src/composables/filesList/useResourceRouteResolver.d.ts +5 -3
- package/dist/src/composables/folderLink/useFolderLink.d.ts +2 -2
- package/dist/src/composables/keyboardActions/useInterceptModifierClick.d.ts +1 -1
- package/dist/src/composables/piniaStores/apps.d.ts +6 -0
- package/dist/src/composables/piniaStores/messages.d.ts +6 -6
- package/dist/src/composables/resources/index.d.ts +2 -0
- package/dist/src/composables/resources/useResourceViewContextMenu.d.ts +11 -0
- package/dist/src/composables/resources/useResourceViewDrag.d.ts +8 -29
- package/dist/src/composables/resources/useResourceViewHelpers.d.ts +24 -34
- package/dist/src/composables/resources/useResourceViewSelection.d.ts +13 -0
- package/dist/src/composables/sort/useSort.d.ts +2 -0
- package/dist/src/constants.d.ts +3 -0
- package/dist/src/helpers/contextMenuDropdown.d.ts +1 -1
- package/dist/src/helpers/index.d.ts +0 -1
- package/dist/web-pkg.js +321 -320
- package/dist/web-pkg.umd.cjs +46 -45
- package/package.json +3 -3
- package/dist/assets/worker-DW5HxaGD.js +0 -40
- package/dist/src/helpers/folderLink/index.d.ts +0 -1
- package/dist/src/helpers/folderLink/types.d.ts +0 -6
|
@@ -1,16 +1,10 @@
|
|
|
1
|
-
import { ComponentPublicInstance } from 'vue';
|
|
2
1
|
import { Resource, SpaceResource } from '@opencloud-eu/web-client';
|
|
3
|
-
import { CreateTargetRouteOptions } from '../../helpers';
|
|
4
|
-
import { ImageDimension } from '../../constants';
|
|
5
|
-
import { default as ResourceTile } from './ResourceTile.vue';
|
|
6
2
|
import { SortDir, SortField, FileActionOptions } from '../../composables';
|
|
7
3
|
import { SizeType } from '@opencloud-eu/design-system/helpers';
|
|
8
|
-
type ResourceTileRef = ComponentPublicInstance<typeof ResourceTile>;
|
|
9
4
|
type __VLS_Props = {
|
|
10
5
|
resources?: Resource[];
|
|
11
6
|
selectedIds?: string[];
|
|
12
7
|
isSelectable?: boolean;
|
|
13
|
-
targetRouteCallback?: (arg: CreateTargetRouteOptions) => unknown;
|
|
14
8
|
space?: SpaceResource;
|
|
15
9
|
sortFields?: SortField[];
|
|
16
10
|
sortBy?: string;
|
|
@@ -64,34 +58,13 @@ declare function __VLS_template(): {
|
|
|
64
58
|
showThirdLayer(): boolean;
|
|
65
59
|
itemCount(): number;
|
|
66
60
|
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, {
|
|
67
|
-
ResourceIcon: import('vue').DefineComponent<
|
|
68
|
-
resource:
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
size
|
|
73
|
-
|
|
74
|
-
default: string;
|
|
75
|
-
validator: (value: string) => boolean;
|
|
76
|
-
};
|
|
77
|
-
}>, {
|
|
78
|
-
icon: import('vue').ComputedRef<import('../..').IconType>;
|
|
79
|
-
isSpace: import('vue').ComputedRef<boolean>;
|
|
80
|
-
isFolder: import('vue').ComputedRef<boolean>;
|
|
81
|
-
isDisabledSpace: import('vue').ComputedRef<boolean>;
|
|
82
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
83
|
-
resource: {
|
|
84
|
-
type: import('vue').PropType<Resource | SpaceResource>;
|
|
85
|
-
required: true;
|
|
86
|
-
};
|
|
87
|
-
size: {
|
|
88
|
-
type: import('vue').PropType<SizeType>;
|
|
89
|
-
default: string;
|
|
90
|
-
validator: (value: string) => boolean;
|
|
91
|
-
};
|
|
92
|
-
}>> & Readonly<{}>, {
|
|
93
|
-
size: SizeType;
|
|
94
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
61
|
+
ResourceIcon: import('vue').DefineComponent<{
|
|
62
|
+
resource: Resource | SpaceResource;
|
|
63
|
+
size?: SizeType;
|
|
64
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
65
|
+
resource: Resource | SpaceResource;
|
|
66
|
+
size?: SizeType;
|
|
67
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
95
68
|
} & import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
96
69
|
P: {};
|
|
97
70
|
B: {};
|
|
@@ -119,7 +92,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
119
92
|
sortBy: string;
|
|
120
93
|
sortDir: SortDir;
|
|
121
94
|
}) => any;
|
|
122
|
-
rowMounted: (resource: Resource, compnent: ResourceTileRef, dimension: ImageDimension) => any;
|
|
123
95
|
fileDropped: (id: string) => any;
|
|
124
96
|
itemVisible: (resource: Resource) => any;
|
|
125
97
|
fileClick: (options: FileActionOptions) => any;
|
|
@@ -129,7 +101,6 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
129
101
|
sortBy: string;
|
|
130
102
|
sortDir: SortDir;
|
|
131
103
|
}) => any;
|
|
132
|
-
onRowMounted?: (resource: Resource, compnent: ResourceTileRef, dimension: ImageDimension) => any;
|
|
133
104
|
onFileDropped?: (id: string) => any;
|
|
134
105
|
onItemVisible?: (resource: Resource) => any;
|
|
135
106
|
onFileClick?: (options: FileActionOptions) => any;
|
|
@@ -146,34 +117,13 @@ declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {}, {}
|
|
|
146
117
|
showThirdLayer(): boolean;
|
|
147
118
|
itemCount(): number;
|
|
148
119
|
}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, import('vue').PublicProps, {}, true, {}, {}, {
|
|
149
|
-
ResourceIcon: import('vue').DefineComponent<
|
|
150
|
-
resource:
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
size
|
|
155
|
-
|
|
156
|
-
default: string;
|
|
157
|
-
validator: (value: string) => boolean;
|
|
158
|
-
};
|
|
159
|
-
}>, {
|
|
160
|
-
icon: import('vue').ComputedRef<import('../..').IconType>;
|
|
161
|
-
isSpace: import('vue').ComputedRef<boolean>;
|
|
162
|
-
isFolder: import('vue').ComputedRef<boolean>;
|
|
163
|
-
isDisabledSpace: import('vue').ComputedRef<boolean>;
|
|
164
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
165
|
-
resource: {
|
|
166
|
-
type: import('vue').PropType<Resource | SpaceResource>;
|
|
167
|
-
required: true;
|
|
168
|
-
};
|
|
169
|
-
size: {
|
|
170
|
-
type: import('vue').PropType<SizeType>;
|
|
171
|
-
default: string;
|
|
172
|
-
validator: (value: string) => boolean;
|
|
173
|
-
};
|
|
174
|
-
}>> & Readonly<{}>, {
|
|
175
|
-
size: SizeType;
|
|
176
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
120
|
+
ResourceIcon: import('vue').DefineComponent<{
|
|
121
|
+
resource: Resource | SpaceResource;
|
|
122
|
+
size?: SizeType;
|
|
123
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
124
|
+
resource: Resource | SpaceResource;
|
|
125
|
+
size?: SizeType;
|
|
126
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
177
127
|
} & import('vue').GlobalComponents, import('vue').GlobalDirectives, string, {}, any, import('vue').ComponentProvideOptions, {
|
|
178
128
|
P: {};
|
|
179
129
|
B: {};
|
|
@@ -15,13 +15,12 @@ type __VLS_Props = {
|
|
|
15
15
|
};
|
|
16
16
|
declare function __VLS_template(): {
|
|
17
17
|
attrs: Partial<{}>;
|
|
18
|
-
slots: {
|
|
19
|
-
image
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
item
|
|
23
|
-
|
|
24
|
-
}): any;
|
|
18
|
+
slots: Readonly<{
|
|
19
|
+
image?: (item: Item) => unknown;
|
|
20
|
+
item?: (item: Item) => unknown;
|
|
21
|
+
}> & {
|
|
22
|
+
image?: (item: Item) => unknown;
|
|
23
|
+
item?: (item: Item) => unknown;
|
|
25
24
|
};
|
|
26
25
|
refs: {
|
|
27
26
|
filterInputRef: {
|
|
@@ -122,9 +121,9 @@ type __VLS_TemplateResult = ReturnType<typeof __VLS_template>;
|
|
|
122
121
|
declare const __VLS_component: import('vue').DefineComponent<__VLS_Props, {
|
|
123
122
|
setSelectedItemsBasedOnQuery: () => void;
|
|
124
123
|
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
125
|
-
selectionChange: (selectedItems:
|
|
124
|
+
selectionChange: (selectedItems: any[]) => any;
|
|
126
125
|
}, string, import('vue').PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
127
|
-
onSelectionChange?: (selectedItems:
|
|
126
|
+
onSelectionChange?: (selectedItems: any[]) => any;
|
|
128
127
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {
|
|
129
128
|
filterInputRef: {
|
|
130
129
|
$: import('vue').ComponentInternalInstance;
|
|
@@ -1,29 +1,30 @@
|
|
|
1
1
|
export * from './useFileActions';
|
|
2
|
-
export * from './useFileActionsEnableSync';
|
|
3
|
-
export * from './useFileActionsToggleHideShare';
|
|
4
2
|
export * from './useFileActionsCopy';
|
|
5
3
|
export * from './useFileActionsCopyPermanentLink';
|
|
6
|
-
export * from './
|
|
4
|
+
export * from './useFileActionsCreateLink';
|
|
5
|
+
export * from './useFileActionsCreateNewFile';
|
|
6
|
+
export * from './useFileActionsCreateNewFolder';
|
|
7
|
+
export * from './useFileActionsCreateNewShortcut';
|
|
8
|
+
export * from './useFileActionsCreateSpaceFromResource';
|
|
7
9
|
export * from './useFileActionsDelete';
|
|
10
|
+
export * from './useFileActionsDisableSync';
|
|
8
11
|
export * from './useFileActionsDownloadArchive';
|
|
9
12
|
export * from './useFileActionsDownloadFile';
|
|
10
13
|
export * from './useFileActionsEmptyTrashBin';
|
|
14
|
+
export * from './useFileActionsEnableSync';
|
|
11
15
|
export * from './useFileActionsFavorite';
|
|
12
16
|
export * from './useFileActionsMove';
|
|
13
17
|
export * from './useFileActionsNavigate';
|
|
18
|
+
export * from './useFileActionsOpenWithDefault';
|
|
19
|
+
export * from './useFileActionsOpenShortcut';
|
|
20
|
+
export * from './useFileActionsOpenWithApp';
|
|
14
21
|
export * from './useFileActionsPaste';
|
|
15
22
|
export * from './useFileActionsRename';
|
|
16
23
|
export * from './useFileActionsRestore';
|
|
24
|
+
export * from './useFileActionsSaveAs';
|
|
17
25
|
export * from './useFileActionsSetImage';
|
|
18
26
|
export * from './useFileActionsShowActions';
|
|
19
27
|
export * from './useFileActionsShowDetails';
|
|
20
28
|
export * from './useFileActionsShowShares';
|
|
21
|
-
export * from './
|
|
22
|
-
export * from './useFileActionsCreateNewFolder';
|
|
23
|
-
export * from './useFileActionsCreateNewFile';
|
|
24
|
-
export * from './useFileActionsCreateNewShortcut';
|
|
25
|
-
export * from './useFileActionsOpenShortcut';
|
|
26
|
-
export * from './useFileActionsCreateLink';
|
|
27
|
-
export * from './useFileActionsOpenWithApp';
|
|
28
|
-
export * from './useFileActionsSaveAs';
|
|
29
|
+
export * from './useFileActionsToggleHideShare';
|
|
29
30
|
export * from './useFileActionsUndoDelete';
|
|
@@ -2,8 +2,6 @@ import { Resource, SpaceResource } from '@opencloud-eu/web-client';
|
|
|
2
2
|
import { Action, FileAction, FileActionOptions } from '../../actions';
|
|
3
3
|
import { ApplicationFileExtension } from '../../../apps';
|
|
4
4
|
import { RouteRecordName } from 'vue-router';
|
|
5
|
-
export declare const EDITOR_MODE_EDIT = "edit";
|
|
6
|
-
export declare const EDITOR_MODE_CREATE = "create";
|
|
7
5
|
export interface GetFileActionsOptions extends FileActionOptions {
|
|
8
6
|
omitSystemActions?: boolean;
|
|
9
7
|
}
|
|
@@ -11,11 +9,8 @@ export interface FileActionOptionsWithEvent extends FileActionOptions<Resource>
|
|
|
11
9
|
event?: MouseEvent;
|
|
12
10
|
}
|
|
13
11
|
export declare const useFileActions: () => {
|
|
14
|
-
editorActions: import('vue').ComputedRef<FileAction[]>;
|
|
15
|
-
defaultEditorActions: import('vue').ComputedRef<FileAction[]>;
|
|
16
|
-
systemActions: import('vue').ComputedRef<Action<import('../types').ActionOptions>[]>;
|
|
17
12
|
getDefaultAction: (options: GetFileActionsOptions) => Action | undefined;
|
|
18
|
-
|
|
13
|
+
getAllOpenWithActions: (options: GetFileActionsOptions) => (Action<import('../types').ActionOptions> | FileAction)[];
|
|
19
14
|
getEditorRouteOpts: (routeName: RouteRecordName, space: SpaceResource, resource: Resource, remoteItemId: string, templateId?: string) => {
|
|
20
15
|
name: import('vue-router').RouteRecordNameGeneric;
|
|
21
16
|
params: {
|
|
@@ -28,5 +23,5 @@ export declare const useFileActions: () => {
|
|
|
28
23
|
};
|
|
29
24
|
};
|
|
30
25
|
openEditor: (appFileExtension: ApplicationFileExtension, space: SpaceResource, resource: Resource) => void;
|
|
31
|
-
triggerDefaultAction: (options:
|
|
26
|
+
triggerDefaultAction: (options: GetFileActionsOptions) => void;
|
|
32
27
|
};
|
|
@@ -23,7 +23,7 @@ export interface Action<T = ActionOptions> {
|
|
|
23
23
|
label(options?: T): string;
|
|
24
24
|
isVisible(options?: T): boolean;
|
|
25
25
|
handler?(options?: T): Promise<void> | void;
|
|
26
|
-
route?(options?: T): RouteLocationRaw;
|
|
26
|
+
route?(options?: T): RouteLocationRaw | undefined;
|
|
27
27
|
href?(options?: T): string;
|
|
28
28
|
isDisabled?(options?: T): boolean;
|
|
29
29
|
disabledTooltip?(options?: T): string;
|
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { CreateTargetRouteOptions } from '../../helpers/folderLink/types';
|
|
3
2
|
import { Resource, SpaceResource } from '@opencloud-eu/web-client';
|
|
4
3
|
import { ConfigStore } from '../piniaStores';
|
|
5
4
|
export type ResourceRouteResolverOptions = {
|
|
6
5
|
configStore?: ConfigStore;
|
|
7
|
-
targetRouteCallback?: Ref<(arg: CreateTargetRouteOptions) => unknown>;
|
|
8
6
|
space?: Ref<SpaceResource>;
|
|
9
7
|
};
|
|
10
8
|
export declare const useResourceRouteResolver: (options?: ResourceRouteResolverOptions,
|
|
11
9
|
/** @deprecated */
|
|
12
10
|
context?: any) => {
|
|
13
11
|
createFileAction: (resource: Resource) => void;
|
|
14
|
-
createFolderLink: (createTargetRouteOptions:
|
|
12
|
+
createFolderLink: (createTargetRouteOptions: {
|
|
13
|
+
path: string;
|
|
14
|
+
resource: Resource | SpaceResource;
|
|
15
|
+
fileId?: string;
|
|
16
|
+
}) => import('vue-router').RouteLocationNamedRaw;
|
|
15
17
|
};
|
|
@@ -2,8 +2,8 @@ import { Resource } from '@opencloud-eu/web-client';
|
|
|
2
2
|
import { ResourceRouteResolverOptions } from '../filesList';
|
|
3
3
|
export declare const useFolderLink: (options?: ResourceRouteResolverOptions) => {
|
|
4
4
|
getPathPrefix: (resource: Resource) => any;
|
|
5
|
-
getFolderLink: (resource: Resource) =>
|
|
6
|
-
getParentFolderLink: (resource: Resource) =>
|
|
5
|
+
getFolderLink: (resource: Resource) => import('vue-router').RouteLocationNamedRaw;
|
|
6
|
+
getParentFolderLink: (resource: Resource) => import('vue-router').RouteLocationNamedRaw;
|
|
7
7
|
getParentFolderName: (resource: Resource) => string;
|
|
8
8
|
getParentFolderLinkIconAdditionalAttributes: (resource: Resource) => {
|
|
9
9
|
name: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Resource } from '@opencloud-eu/web-client';
|
|
2
2
|
export declare function useInterceptModifierClick(): {
|
|
3
|
-
interceptModifierClick: (event: MouseEvent | undefined, resource: Resource) => boolean;
|
|
3
|
+
interceptModifierClick: (event: MouseEvent | KeyboardEvent | undefined, resource: Resource) => boolean;
|
|
4
4
|
};
|
|
@@ -7,6 +7,7 @@ export declare const useAppsStore: import('pinia').StoreDefinition<"apps", Pick<
|
|
|
7
7
|
fileExtensions: import('vue').Ref<{
|
|
8
8
|
app?: string;
|
|
9
9
|
extension?: string;
|
|
10
|
+
type?: "file" | "folder";
|
|
10
11
|
createFileHandler?: (arg: {
|
|
11
12
|
fileName: string;
|
|
12
13
|
space: import('@opencloud-eu/web-client').SpaceResource;
|
|
@@ -25,6 +26,7 @@ export declare const useAppsStore: import('pinia').StoreDefinition<"apps", Pick<
|
|
|
25
26
|
}[], ApplicationFileExtension[] | {
|
|
26
27
|
app?: string;
|
|
27
28
|
extension?: string;
|
|
29
|
+
type?: "file" | "folder";
|
|
28
30
|
createFileHandler?: (arg: {
|
|
29
31
|
fileName: string;
|
|
30
32
|
space: import('@opencloud-eu/web-client').SpaceResource;
|
|
@@ -58,6 +60,7 @@ export declare const useAppsStore: import('pinia').StoreDefinition<"apps", Pick<
|
|
|
58
60
|
fileExtensions: import('vue').Ref<{
|
|
59
61
|
app?: string;
|
|
60
62
|
extension?: string;
|
|
63
|
+
type?: "file" | "folder";
|
|
61
64
|
createFileHandler?: (arg: {
|
|
62
65
|
fileName: string;
|
|
63
66
|
space: import('@opencloud-eu/web-client').SpaceResource;
|
|
@@ -76,6 +79,7 @@ export declare const useAppsStore: import('pinia').StoreDefinition<"apps", Pick<
|
|
|
76
79
|
}[], ApplicationFileExtension[] | {
|
|
77
80
|
app?: string;
|
|
78
81
|
extension?: string;
|
|
82
|
+
type?: "file" | "folder";
|
|
79
83
|
createFileHandler?: (arg: {
|
|
80
84
|
fileName: string;
|
|
81
85
|
space: import('@opencloud-eu/web-client').SpaceResource;
|
|
@@ -109,6 +113,7 @@ export declare const useAppsStore: import('pinia').StoreDefinition<"apps", Pick<
|
|
|
109
113
|
fileExtensions: import('vue').Ref<{
|
|
110
114
|
app?: string;
|
|
111
115
|
extension?: string;
|
|
116
|
+
type?: "file" | "folder";
|
|
112
117
|
createFileHandler?: (arg: {
|
|
113
118
|
fileName: string;
|
|
114
119
|
space: import('@opencloud-eu/web-client').SpaceResource;
|
|
@@ -127,6 +132,7 @@ export declare const useAppsStore: import('pinia').StoreDefinition<"apps", Pick<
|
|
|
127
132
|
}[], ApplicationFileExtension[] | {
|
|
128
133
|
app?: string;
|
|
129
134
|
extension?: string;
|
|
135
|
+
type?: "file" | "folder";
|
|
130
136
|
createFileHandler?: (arg: {
|
|
131
137
|
fileName: string;
|
|
132
138
|
space: import('@opencloud-eu/web-client').SpaceResource;
|
|
@@ -136,7 +136,7 @@ export declare const useMessages: import('pinia').StoreDefinition<"messages", Pi
|
|
|
136
136
|
label: (options?: ActionOptions) => string;
|
|
137
137
|
isVisible: (options?: ActionOptions) => boolean;
|
|
138
138
|
handler?: (options?: ActionOptions) => Promise<void> | void;
|
|
139
|
-
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw;
|
|
139
|
+
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw | undefined;
|
|
140
140
|
href?: (options?: ActionOptions) => string;
|
|
141
141
|
isDisabled?: (options?: ActionOptions) => boolean;
|
|
142
142
|
disabledTooltip?: (options?: ActionOptions) => string;
|
|
@@ -265,7 +265,7 @@ export declare const useMessages: import('pinia').StoreDefinition<"messages", Pi
|
|
|
265
265
|
label: (options?: ActionOptions) => string;
|
|
266
266
|
isVisible: (options?: ActionOptions) => boolean;
|
|
267
267
|
handler?: (options?: ActionOptions) => Promise<void> | void;
|
|
268
|
-
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw;
|
|
268
|
+
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw | undefined;
|
|
269
269
|
href?: (options?: ActionOptions) => string;
|
|
270
270
|
isDisabled?: (options?: ActionOptions) => boolean;
|
|
271
271
|
disabledTooltip?: (options?: ActionOptions) => string;
|
|
@@ -419,7 +419,7 @@ export declare const useMessages: import('pinia').StoreDefinition<"messages", Pi
|
|
|
419
419
|
label: (options?: ActionOptions) => string;
|
|
420
420
|
isVisible: (options?: ActionOptions) => boolean;
|
|
421
421
|
handler?: (options?: ActionOptions) => Promise<void> | void;
|
|
422
|
-
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw;
|
|
422
|
+
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw | undefined;
|
|
423
423
|
href?: (options?: ActionOptions) => string;
|
|
424
424
|
isDisabled?: (options?: ActionOptions) => boolean;
|
|
425
425
|
disabledTooltip?: (options?: ActionOptions) => string;
|
|
@@ -548,7 +548,7 @@ export declare const useMessages: import('pinia').StoreDefinition<"messages", Pi
|
|
|
548
548
|
label: (options?: ActionOptions) => string;
|
|
549
549
|
isVisible: (options?: ActionOptions) => boolean;
|
|
550
550
|
handler?: (options?: ActionOptions) => Promise<void> | void;
|
|
551
|
-
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw;
|
|
551
|
+
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw | undefined;
|
|
552
552
|
href?: (options?: ActionOptions) => string;
|
|
553
553
|
isDisabled?: (options?: ActionOptions) => boolean;
|
|
554
554
|
disabledTooltip?: (options?: ActionOptions) => string;
|
|
@@ -702,7 +702,7 @@ export declare const useMessages: import('pinia').StoreDefinition<"messages", Pi
|
|
|
702
702
|
label: (options?: ActionOptions) => string;
|
|
703
703
|
isVisible: (options?: ActionOptions) => boolean;
|
|
704
704
|
handler?: (options?: ActionOptions) => Promise<void> | void;
|
|
705
|
-
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw;
|
|
705
|
+
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw | undefined;
|
|
706
706
|
href?: (options?: ActionOptions) => string;
|
|
707
707
|
isDisabled?: (options?: ActionOptions) => boolean;
|
|
708
708
|
disabledTooltip?: (options?: ActionOptions) => string;
|
|
@@ -831,7 +831,7 @@ export declare const useMessages: import('pinia').StoreDefinition<"messages", Pi
|
|
|
831
831
|
label: (options?: ActionOptions) => string;
|
|
832
832
|
isVisible: (options?: ActionOptions) => boolean;
|
|
833
833
|
handler?: (options?: ActionOptions) => Promise<void> | void;
|
|
834
|
-
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw;
|
|
834
|
+
route?: (options?: ActionOptions) => import('vue-router').RouteLocationRaw | undefined;
|
|
835
835
|
href?: (options?: ActionOptions) => string;
|
|
836
836
|
isDisabled?: (options?: ActionOptions) => boolean;
|
|
837
837
|
disabledTooltip?: (options?: ActionOptions) => string;
|
|
@@ -3,5 +3,7 @@ export * from './useCanListVersions';
|
|
|
3
3
|
export * from './useGetResourceContext';
|
|
4
4
|
export * from './useLoadPreview';
|
|
5
5
|
export * from './useResourceContents';
|
|
6
|
+
export * from './useResourceViewContextMenu';
|
|
6
7
|
export * from './useResourceViewDrag';
|
|
7
8
|
export * from './useResourceViewHelpers';
|
|
9
|
+
export * from './useResourceViewSelection';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Resource } from '@opencloud-eu/web-client';
|
|
2
|
+
import { ContextMenuBtnClickEventData } from '../../helpers';
|
|
3
|
+
export declare const useResourceViewContextMenu: ({ isResourceSelected, isResourceDisabled, emit }: {
|
|
4
|
+
isResourceSelected: (resource: Resource) => boolean;
|
|
5
|
+
isResourceDisabled: (resource: Resource) => boolean;
|
|
6
|
+
emit: ReturnType<typeof defineEmits>;
|
|
7
|
+
}) => {
|
|
8
|
+
shouldShowContextDrop: (item: Resource) => boolean;
|
|
9
|
+
showContextMenuOnBtnClick: (data: ContextMenuBtnClickEventData, item: Resource) => boolean;
|
|
10
|
+
showContextMenuOnRightClick: (event: MouseEvent | KeyboardEvent, item: Resource) => boolean;
|
|
11
|
+
};
|
|
@@ -3,7 +3,7 @@ import { Resource } from '@opencloud-eu/web-client';
|
|
|
3
3
|
export declare const useResourceViewDrag: ({ selectedIds, selectedResources, emit }: {
|
|
4
4
|
selectedIds: Ref<string[]>;
|
|
5
5
|
selectedResources: Ref<Resource[]>;
|
|
6
|
-
emit:
|
|
6
|
+
emit: ReturnType<typeof defineEmits>;
|
|
7
7
|
}) => {
|
|
8
8
|
ghostElement: Readonly<import('vue').ShallowRef<ComponentPublicInstance<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
9
9
|
previewItems: {
|
|
@@ -21,34 +21,13 @@ export declare const useResourceViewDrag: ({ selectedIds, selectedResources, emi
|
|
|
21
21
|
required: true;
|
|
22
22
|
};
|
|
23
23
|
}>> & Readonly<{}>, {}, {}, {
|
|
24
|
-
ResourceIcon: import('vue').DefineComponent<
|
|
25
|
-
resource:
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
size
|
|
30
|
-
|
|
31
|
-
default: string;
|
|
32
|
-
validator: (value: string) => boolean;
|
|
33
|
-
};
|
|
34
|
-
}>, {
|
|
35
|
-
icon: import('vue').ComputedRef<import('../..').IconType>;
|
|
36
|
-
isSpace: import('vue').ComputedRef<boolean>;
|
|
37
|
-
isFolder: import('vue').ComputedRef<boolean>;
|
|
38
|
-
isDisabledSpace: import('vue').ComputedRef<boolean>;
|
|
39
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
40
|
-
resource: {
|
|
41
|
-
type: import('vue').PropType<Resource | import('@opencloud-eu/web-client').SpaceResource>;
|
|
42
|
-
required: true;
|
|
43
|
-
};
|
|
44
|
-
size: {
|
|
45
|
-
type: import('vue').PropType<import('@opencloud-eu/design-system/helpers').SizeType>;
|
|
46
|
-
default: string;
|
|
47
|
-
validator: (value: string) => boolean;
|
|
48
|
-
};
|
|
49
|
-
}>> & Readonly<{}>, {
|
|
50
|
-
size: import('@opencloud-eu/design-system/helpers').SizeType;
|
|
51
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
24
|
+
ResourceIcon: import('vue').DefineComponent<{
|
|
25
|
+
resource: Resource | import('@opencloud-eu/web-client').SpaceResource;
|
|
26
|
+
size?: import('@opencloud-eu/design-system/helpers').SizeType;
|
|
27
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
28
|
+
resource: Resource | import('@opencloud-eu/web-client').SpaceResource;
|
|
29
|
+
size?: import('@opencloud-eu/design-system/helpers').SizeType;
|
|
30
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
52
31
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>>>;
|
|
53
32
|
dragItem: Ref<Resource, Resource>;
|
|
54
33
|
dragSelection: import('vue').ComputedRef<Resource[]>;
|
|
@@ -1,13 +1,21 @@
|
|
|
1
1
|
import { Ref } from 'vue';
|
|
2
|
-
import { Resource } from '@opencloud-eu/web-client';
|
|
2
|
+
import { Resource, SpaceResource } from '@opencloud-eu/web-client';
|
|
3
3
|
/**
|
|
4
4
|
* Shared helpers for resource view components (like ResourceTable and ResourceTiles).
|
|
5
5
|
*/
|
|
6
|
-
export declare const useResourceViewHelpers: ({ resources, selectedIds, emit }: {
|
|
6
|
+
export declare const useResourceViewHelpers: ({ space, resources, selectedIds, emit }: {
|
|
7
|
+
space: Ref<SpaceResource>;
|
|
7
8
|
resources: Ref<Resource[]>;
|
|
8
9
|
selectedIds: Ref<string[]>;
|
|
9
|
-
emit:
|
|
10
|
+
emit: ReturnType<typeof defineEmits>;
|
|
10
11
|
}) => {
|
|
12
|
+
getResourceCheckboxLabel: (resource: Resource) => string;
|
|
13
|
+
areAllResourcesSelected: import('vue').ComputedRef<boolean>;
|
|
14
|
+
selectAllCheckboxLabel: import('vue').ComputedRef<string>;
|
|
15
|
+
toggleSelectionAll: () => void;
|
|
16
|
+
shouldShowContextDrop: (item: Resource) => boolean;
|
|
17
|
+
showContextMenuOnBtnClick: (data: import('../..').ContextMenuBtnClickEventData, item: Resource) => boolean;
|
|
18
|
+
showContextMenuOnRightClick: (event: MouseEvent | KeyboardEvent, item: Resource) => boolean;
|
|
11
19
|
ghostElement: Readonly<import('vue').ShallowRef<import('vue').ComponentPublicInstance<import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
12
20
|
previewItems: {
|
|
13
21
|
type: import('vue').PropType<Resource[]>;
|
|
@@ -24,34 +32,13 @@ export declare const useResourceViewHelpers: ({ resources, selectedIds, emit }:
|
|
|
24
32
|
required: true;
|
|
25
33
|
};
|
|
26
34
|
}>> & Readonly<{}>, {}, {}, {
|
|
27
|
-
ResourceIcon: import('vue').DefineComponent<
|
|
28
|
-
resource:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
size
|
|
33
|
-
|
|
34
|
-
default: string;
|
|
35
|
-
validator: (value: string) => boolean;
|
|
36
|
-
};
|
|
37
|
-
}>, {
|
|
38
|
-
icon: import('vue').ComputedRef<import('../..').IconType>;
|
|
39
|
-
isSpace: import('vue').ComputedRef<boolean>;
|
|
40
|
-
isFolder: import('vue').ComputedRef<boolean>;
|
|
41
|
-
isDisabledSpace: import('vue').ComputedRef<boolean>;
|
|
42
|
-
}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
43
|
-
resource: {
|
|
44
|
-
type: import('vue').PropType<Resource | import('@opencloud-eu/web-client').SpaceResource>;
|
|
45
|
-
required: true;
|
|
46
|
-
};
|
|
47
|
-
size: {
|
|
48
|
-
type: import('vue').PropType<import('@opencloud-eu/design-system/helpers').SizeType>;
|
|
49
|
-
default: string;
|
|
50
|
-
validator: (value: string) => boolean;
|
|
51
|
-
};
|
|
52
|
-
}>> & Readonly<{}>, {
|
|
53
|
-
size: import('@opencloud-eu/design-system/helpers').SizeType;
|
|
54
|
-
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
35
|
+
ResourceIcon: import('vue').DefineComponent<{
|
|
36
|
+
resource: Resource | SpaceResource;
|
|
37
|
+
size?: import('@opencloud-eu/design-system/helpers').SizeType;
|
|
38
|
+
}, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<{
|
|
39
|
+
resource: Resource | SpaceResource;
|
|
40
|
+
size?: import('@opencloud-eu/design-system/helpers').SizeType;
|
|
41
|
+
}> & Readonly<{}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
55
42
|
}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>>>>;
|
|
56
43
|
dragItem: Ref<Resource, Resource>;
|
|
57
44
|
dragSelection: import('vue').ComputedRef<Resource[]>;
|
|
@@ -59,19 +46,22 @@ export declare const useResourceViewHelpers: ({ resources, selectedIds, emit }:
|
|
|
59
46
|
fileDropped: (resource: Resource, event: DragEvent) => void;
|
|
60
47
|
setDropStyling: (resource: Resource, leaving: boolean, event: DragEvent) => void;
|
|
61
48
|
selectedResources: import('vue').ComputedRef<Resource[]>;
|
|
49
|
+
disabledResources: import('vue').ComputedRef<string[]>;
|
|
62
50
|
isResourceSelected: (item: Resource) => boolean;
|
|
63
51
|
isResourceInDeleteQueue: (id: string) => boolean;
|
|
64
52
|
isResourceDisabled: (resource: Resource) => boolean;
|
|
53
|
+
isResourceClickable: (resource: Resource, areResourcesClickable: boolean) => boolean;
|
|
65
54
|
fileContainerClicked: ({ resource, event }: {
|
|
66
55
|
resource: Resource;
|
|
67
|
-
event: MouseEvent;
|
|
56
|
+
event: MouseEvent | KeyboardEvent;
|
|
68
57
|
}) => void;
|
|
69
58
|
fileNameClicked: ({ resource, event }: {
|
|
70
59
|
resource: Resource;
|
|
71
|
-
event: MouseEvent;
|
|
60
|
+
event: MouseEvent | KeyboardEvent;
|
|
72
61
|
}) => void;
|
|
73
62
|
fileCheckboxClicked: ({ resource, event }: {
|
|
74
63
|
resource: Resource;
|
|
75
|
-
event: MouseEvent;
|
|
64
|
+
event: MouseEvent | KeyboardEvent;
|
|
76
65
|
}) => void;
|
|
66
|
+
getResourceLink: (resource: Resource) => string | import('vue-router').RouteLocationAsRelativeGeneric | import('vue-router').RouteLocationAsPathGeneric;
|
|
77
67
|
};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
2
|
+
import { Resource } from '@opencloud-eu/web-client';
|
|
3
|
+
export declare const useResourceViewSelection: ({ resources, disabledResources, selectedIds, emit }: {
|
|
4
|
+
resources: Ref<Resource[]>;
|
|
5
|
+
disabledResources: Ref<string[]>;
|
|
6
|
+
selectedIds: Ref<string[]>;
|
|
7
|
+
emit: ReturnType<typeof defineEmits>;
|
|
8
|
+
}) => {
|
|
9
|
+
getResourceCheckboxLabel: (resource: Resource) => string;
|
|
10
|
+
areAllResourcesSelected: import('vue').ComputedRef<boolean>;
|
|
11
|
+
selectAllCheckboxLabel: import('vue').ComputedRef<string>;
|
|
12
|
+
toggleSelectionAll: () => void;
|
|
13
|
+
};
|
|
@@ -2,7 +2,9 @@ import { Ref, MaybeRef } from 'vue';
|
|
|
2
2
|
import { ReadOnlyRef } from '../../utils';
|
|
3
3
|
export interface SortableItem {
|
|
4
4
|
type?: string;
|
|
5
|
+
extension?: string;
|
|
5
6
|
}
|
|
7
|
+
/** @deprecated use SortDir from design-system instead */
|
|
6
8
|
export declare enum SortDir {
|
|
7
9
|
Desc = "desc",
|
|
8
10
|
Asc = "asc"
|
package/dist/src/constants.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
/** @deprecated use from design-system instead */
|
|
1
2
|
export declare const EVENT_TROW_MOUNTED = "rowMounted";
|
|
3
|
+
/** @deprecated use from design-system instead */
|
|
2
4
|
export declare const EVENT_FILE_DROPPED = "fileDropped";
|
|
5
|
+
/** @deprecated use from design-system instead */
|
|
3
6
|
export declare const EVENT_TROW_CONTEXTMENU = "contextmenuClicked";
|
|
4
7
|
export declare abstract class ImageDimension {
|
|
5
8
|
static readonly Thumbnail: [number, number];
|
|
@@ -4,4 +4,4 @@ export type ContextMenuBtnClickEventData = {
|
|
|
4
4
|
event: MouseEvent | KeyboardEvent;
|
|
5
5
|
dropdown: ComponentPublicInstance<typeof OcDrop>;
|
|
6
6
|
};
|
|
7
|
-
export declare const displayPositionedDropdown: (dropdown: ComponentPublicInstance<typeof OcDrop>, event: MouseEvent | KeyboardEvent, contextMenuButton: ComponentPublicInstance<unknown>) => void;
|
|
7
|
+
export declare const displayPositionedDropdown: (dropdown: ComponentPublicInstance<typeof OcDrop>, event: MouseEvent | KeyboardEvent, contextMenuButton: HTMLElement | ComponentPublicInstance<unknown>) => void;
|