pigallery2-extension-kit 3.5.0-dev.1 → 3.5.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/lib/backend/model/extension/IExtension.d.ts +2 -5
- package/lib/common/entities/extension/IClientUIConfig.d.ts +32 -1
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.component.d.ts +2 -5
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.service.d.ts +3 -0
- package/package.json +1 -1
|
@@ -17,7 +17,7 @@ import { CoverPhotoDTOWithID } from '../database/CoverManager';
|
|
|
17
17
|
import { ParentDirectoryDTO } from '../../../common/entities/DirectoryDTO';
|
|
18
18
|
import { DirectoryScanSettings } from '../fileaccess/DiskManager';
|
|
19
19
|
import { SessionContext } from '../SessionContext';
|
|
20
|
-
import { IClientMediaButtonConfig } from '../../../common/entities/extension/IClientUIConfig';
|
|
20
|
+
import { IClientMediaButtonConfig, IMediaRequestBodyData } from '../../../common/entities/extension/IClientUIConfig';
|
|
21
21
|
import { MediaEntity } from '../database/enitites/MediaEntity';
|
|
22
22
|
import { VideoConverterInput } from '../fileaccess/VideoConverterWorker';
|
|
23
23
|
import { ProjectedDirectoryCacheEntity } from '../database/enitites/ProjectedDirectoryCacheEntity';
|
|
@@ -123,10 +123,7 @@ export interface IExtensionApp {
|
|
|
123
123
|
config: PrivateConfigClass;
|
|
124
124
|
}
|
|
125
125
|
export interface IMediaRequestBody {
|
|
126
|
-
data:
|
|
127
|
-
fields?: Record<string, any>;
|
|
128
|
-
customFields?: Record<string, any>;
|
|
129
|
-
};
|
|
126
|
+
data: IMediaRequestBodyData;
|
|
130
127
|
media: string;
|
|
131
128
|
}
|
|
132
129
|
export interface IExtensionRESTRoute {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { UserRoles } from '../UserDTO';
|
|
2
|
-
export type IClientMediaFields = 'title' | 'caption' | 'cameraData' | 'positionData' | 'faces' | 'size' | 'creationDate' | 'creationDateOffset' | 'bitRate' | 'duration' | 'fileSize' | 'fps';
|
|
2
|
+
export type IClientMediaFields = 'title' | 'caption' | 'cameraData' | 'positionData' | 'faces' | 'keywords' | 'size' | 'creationDate' | 'creationDateOffset' | 'bitRate' | 'duration' | 'fileSize' | 'fps';
|
|
3
3
|
export interface IClientSVGIconConfig {
|
|
4
4
|
/**
|
|
5
5
|
* SVG path viewBox. See: https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/viewBox
|
|
@@ -27,6 +27,10 @@ export interface IClientMediaButtonPopupFields {
|
|
|
27
27
|
* Default value of the field. Should appropriately to the type.
|
|
28
28
|
*/
|
|
29
29
|
defaultValue?: string | number | boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Keep value across popups. Use this if you would like to use the same value on multiple popups (e.g.: like adding the same keyword to multiple photos).
|
|
32
|
+
*/
|
|
33
|
+
keepValue: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* If true, the field will be required.
|
|
32
36
|
* If boolean, the field will be required to be true to click the button.
|
|
@@ -55,6 +59,33 @@ export interface IClientMediaButtonPopupConfig {
|
|
|
55
59
|
*/
|
|
56
60
|
customFields?: IClientMediaButtonPopupFields[];
|
|
57
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Data that will be sent to the server side when the media button is clicked.
|
|
64
|
+
* The data will be sent as a JSON object.
|
|
65
|
+
* The keys of the object will be the field names.
|
|
66
|
+
* The values will be the field values.
|
|
67
|
+
*/
|
|
68
|
+
export interface IMediaRequestBodyData {
|
|
69
|
+
/**
|
|
70
|
+
* Existing metadata fields of a media.
|
|
71
|
+
*/
|
|
72
|
+
fields?: {
|
|
73
|
+
title?: string;
|
|
74
|
+
caption?: string;
|
|
75
|
+
cameraData?: string;
|
|
76
|
+
positionData?: string;
|
|
77
|
+
faces?: string;
|
|
78
|
+
size?: string;
|
|
79
|
+
creationDate?: string;
|
|
80
|
+
creationDateOffset?: string;
|
|
81
|
+
bitRate?: string;
|
|
82
|
+
duration?: string;
|
|
83
|
+
fileSize?: string;
|
|
84
|
+
fps?: string;
|
|
85
|
+
keywords?: string;
|
|
86
|
+
};
|
|
87
|
+
customFields?: Record<string, any>;
|
|
88
|
+
}
|
|
58
89
|
export interface IClientMediaButtonConfig {
|
|
59
90
|
/**
|
|
60
91
|
* Name of the button. This is also used as id.
|
package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.component.d.ts
CHANGED
|
@@ -1,13 +1,10 @@
|
|
|
1
1
|
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
2
|
import { MediaButtonModalData, MediaButtonModalService } from './media-button-modal.service';
|
|
3
|
-
import { IClientMediaFields } from '../../../../../../../common/entities/extension/IClientUIConfig';
|
|
3
|
+
import { IClientMediaFields, IMediaRequestBodyData } from '../../../../../../../common/entities/extension/IClientUIConfig';
|
|
4
4
|
export declare class MediaButtonModalComponent implements OnInit, OnDestroy {
|
|
5
5
|
private modalService;
|
|
6
6
|
modalData: MediaButtonModalData | null;
|
|
7
|
-
formData:
|
|
8
|
-
fields?: Record<string, any>;
|
|
9
|
-
customFields?: Record<string, any>;
|
|
10
|
-
};
|
|
7
|
+
formData: IMediaRequestBodyData;
|
|
11
8
|
private subscription;
|
|
12
9
|
constructor(modalService: MediaButtonModalService);
|
|
13
10
|
ngOnInit(): void;
|
package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.service.d.ts
CHANGED
|
@@ -13,6 +13,7 @@ export declare class MediaButtonModalService {
|
|
|
13
13
|
private networkService;
|
|
14
14
|
private contentLoader;
|
|
15
15
|
private modalData$;
|
|
16
|
+
private savedModalValues;
|
|
16
17
|
constructor(notificationService: NotificationService, networkService: NetworkService, contentLoader: ContentLoaderService);
|
|
17
18
|
get modalData(): import("rxjs").Observable<MediaButtonModalData>;
|
|
18
19
|
showModal(button: IClientMediaButtonConfigWithBaseApiPath, media: GridMedia): void;
|
|
@@ -21,4 +22,6 @@ export declare class MediaButtonModalService {
|
|
|
21
22
|
fields?: Record<string, any>;
|
|
22
23
|
customFields?: Record<string, any>;
|
|
23
24
|
}): Promise<void>;
|
|
25
|
+
getValue(id: string): string | number | boolean;
|
|
26
|
+
setValue(id: string, value: string | number | boolean): void;
|
|
24
27
|
}
|
package/package.json
CHANGED