@yuuvis/app-drive 2.0.14 → 2.1.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/README.md +2 -2
- package/fesm2022/yuuvis-app-drive-extensions.mjs +4 -7
- package/fesm2022/yuuvis-app-drive-extensions.mjs.map +1 -1
- package/fesm2022/yuuvis-app-drive.mjs +92 -94
- package/fesm2022/yuuvis-app-drive.mjs.map +1 -1
- package/lib/container/drive/drive.component.d.ts +1 -1
- package/lib/drive.schema.d.ts +1 -5
- package/lib/pages/files/files.component.d.ts +4 -4
- package/package.json +2 -2
- package/yuv-manifest.json +5 -2
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ npm install @yuuvis/app-drive --save
|
|
|
14
14
|
In your `app.config.ts` add the `AppDriveExtension` to the providers:
|
|
15
15
|
|
|
16
16
|
```ts
|
|
17
|
-
import {
|
|
17
|
+
import { AppDriveExtension } from '@yuuvis/app-drive/extensions';
|
|
18
18
|
import { provideDrive } from '@yuuvis/app-drive';
|
|
19
19
|
|
|
20
20
|
export const appConfig: ApplicationConfig = {
|
|
@@ -38,7 +38,7 @@ export const app: App[] = [
|
|
|
38
38
|
id: 'io.yuuvis.app.drive',
|
|
39
39
|
title: 'Drive',
|
|
40
40
|
path: 'drive',
|
|
41
|
-
|
|
41
|
+
iconName: 'cloud_circle',
|
|
42
42
|
loadChildren: () => import('@yuuvis/app-drive').then((m) => m.YuuvisDriveRoutes)
|
|
43
43
|
},
|
|
44
44
|
]
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { inject, Injectable } from '@angular/core';
|
|
3
|
-
import { FS_PROPERTIES, APP_ID,
|
|
3
|
+
import { FS_PROPERTIES, APP_ID, APP_TYPES } from '@yuuvis/app-drive';
|
|
4
4
|
import { BaseObjectTypeField, ContentStreamField, ObjectConfigService } from '@yuuvis/client-core';
|
|
5
5
|
import { ActionsService } from '@yuuvis/client-framework/actions';
|
|
6
|
-
import { ShellService } from '@yuuvis/client-shell-core';
|
|
7
6
|
import { ManageFlavorsAction } from '@yuuvis/client-shell';
|
|
8
7
|
|
|
9
8
|
const OC_DEFAULTS = {
|
|
@@ -12,23 +11,21 @@ const OC_DEFAULTS = {
|
|
|
12
11
|
title: { label: 'Filename', propertyName: FS_PROPERTIES.name },
|
|
13
12
|
description: { label: 'Size', propertyName: ContentStreamField.LENGTH },
|
|
14
13
|
aside: { label: 'Modified', propertyName: BaseObjectTypeField.MODIFICATION_DATE },
|
|
15
|
-
icon: { svg:
|
|
14
|
+
icon: { svg: APP_TYPES['file'].icon },
|
|
16
15
|
badges: [],
|
|
17
16
|
objectTypeId: `${APP_ID}.file`
|
|
18
17
|
},
|
|
19
18
|
'io.yuuvis.app.drive.folder': {
|
|
20
|
-
icon: { svg:
|
|
19
|
+
icon: { svg: APP_TYPES['folder'].icon },
|
|
21
20
|
objectTypeId: `${APP_ID}.folder`,
|
|
22
21
|
title: { label: 'Name', propertyName: FS_PROPERTIES.name }
|
|
23
22
|
}
|
|
24
23
|
};
|
|
25
24
|
|
|
26
25
|
class AppDriveExtension {
|
|
27
|
-
#shell = inject(ShellService);
|
|
28
26
|
#actionsService = inject(ActionsService);
|
|
29
27
|
#objectConfig = inject(ObjectConfigService);
|
|
30
28
|
init() {
|
|
31
|
-
this.#shell.registerApp(APP_SCHEMA);
|
|
32
29
|
// TODO: Dummy setting for drive app to integrate into shell settings page
|
|
33
30
|
// this.#shell.registerAppSettings(APP_SCHEMA.id, {
|
|
34
31
|
// appID: APP_SCHEMA.id,
|
|
@@ -43,7 +40,7 @@ class AppDriveExtension {
|
|
|
43
40
|
// ]
|
|
44
41
|
// });
|
|
45
42
|
// register a default object config for the types handled by the drive app
|
|
46
|
-
this.#objectConfig.registerDefaults(OC_DEFAULTS,
|
|
43
|
+
this.#objectConfig.registerDefaults(OC_DEFAULTS, APP_ID);
|
|
47
44
|
this.#actionsService.registerActions([
|
|
48
45
|
{
|
|
49
46
|
id: 'yuv.base.manage-flavor',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yuuvis-app-drive-extensions.mjs","sources":["../../../../../libs/apps/drive/extensions/src/lib/object-config.defaults.ts","../../../../../libs/apps/drive/extensions/src/lib/extensions.service.ts","../../../../../libs/apps/drive/extensions/src/yuuvis-app-drive-extensions.ts"],"sourcesContent":["import { APP_ID,
|
|
1
|
+
{"version":3,"file":"yuuvis-app-drive-extensions.mjs","sources":["../../../../../libs/apps/drive/extensions/src/lib/object-config.defaults.ts","../../../../../libs/apps/drive/extensions/src/lib/extensions.service.ts","../../../../../libs/apps/drive/extensions/src/yuuvis-app-drive-extensions.ts"],"sourcesContent":["import { APP_ID, APP_TYPES, FS_PROPERTIES } from '@yuuvis/app-drive';\nimport { BaseObjectTypeField, ContentStreamField, ObjectConfigRecord } from '@yuuvis/client-core';\n\nexport const OC_DEFAULTS: ObjectConfigRecord = {\n 'io.yuuvis.app.drive.file': {\n actions: [{ id: 'yuv.base.download' }, { id: 'yuv.base.delete' }],\n title: { label: 'Filename', propertyName: FS_PROPERTIES.name },\n description: { label: 'Size', propertyName: ContentStreamField.LENGTH },\n aside: { label: 'Modified', propertyName: BaseObjectTypeField.MODIFICATION_DATE },\n icon: { svg: APP_TYPES['file'].icon! },\n badges: [],\n\n objectTypeId: `${APP_ID}.file`\n },\n 'io.yuuvis.app.drive.folder': {\n icon: { svg: APP_TYPES['folder'].icon! },\n objectTypeId: `${APP_ID}.folder`,\n title: { label: 'Name', propertyName: FS_PROPERTIES.name }\n } \n};\n","import { Injectable, inject } from '@angular/core';\nimport { APP_ID } from '@yuuvis/app-drive';\nimport { ObjectConfigService } from '@yuuvis/client-core';\nimport { ActionsService } from '@yuuvis/client-framework/actions';\nimport { ManageFlavorsAction } from '@yuuvis/client-shell';\nimport { ClientShellExtension } from '@yuuvis/client-shell-core';\nimport { OC_DEFAULTS } from './object-config.defaults';\n\n@Injectable()\nexport class AppDriveExtension implements ClientShellExtension {\n #actionsService = inject(ActionsService);\n #objectConfig = inject(ObjectConfigService);\n\n init(): Promise<any> {\n // TODO: Dummy setting for drive app to integrate into shell settings page\n // this.#shell.registerAppSettings(APP_SCHEMA.id, {\n // appID: APP_SCHEMA.id,\n // label: APP_SCHEMA.name,\n // properties: [\n // {\n // label: 'Max items',\n // name: 'maxItems',\n // type: 'number',\n // value: 10\n // }\n // ]\n // });\n\n // register a default object config for the types handled by the drive app\n this.#objectConfig.registerDefaults(OC_DEFAULTS, APP_ID);\n this.#actionsService.registerActions([\n {\n id: 'yuv.base.manage-flavor',\n action: ManageFlavorsAction\n }\n ]);\n return Promise.resolve();\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":[],"mappings":";;;;;;;AAGO,MAAM,WAAW,GAAuB;AAC7C,IAAA,0BAA0B,EAAE;AAC1B,QAAA,OAAO,EAAE,CAAC,EAAE,EAAE,EAAE,mBAAmB,EAAE,EAAE,EAAE,EAAE,EAAE,iBAAiB,EAAE,CAAC;QACjE,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,aAAa,CAAC,IAAI,EAAE;QAC9D,WAAW,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,YAAY,EAAE,kBAAkB,CAAC,MAAM,EAAE;QACvE,KAAK,EAAE,EAAE,KAAK,EAAE,UAAU,EAAE,YAAY,EAAE,mBAAmB,CAAC,iBAAiB,EAAE;QACjF,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC,IAAK,EAAE;AACtC,QAAA,MAAM,EAAE,EAAE;QAEV,YAAY,EAAE,CAAG,EAAA,MAAM,CAAO,KAAA;AAC/B,KAAA;AACD,IAAA,4BAA4B,EAAE;QAC5B,IAAI,EAAE,EAAE,GAAG,EAAE,SAAS,CAAC,QAAQ,CAAC,CAAC,IAAK,EAAE;QACxC,YAAY,EAAE,CAAG,EAAA,MAAM,CAAS,OAAA,CAAA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