pigallery2-extension-kit 3.5.2 → 3.7.0-edge
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 +11 -5
- package/index.d.ts +1 -0
- package/index.js +2 -3
- package/lib/backend/Logger.d.ts +7 -7
- package/lib/backend/ProjectPath.d.ts +12 -0
- package/lib/backend/exceptions/DirectoryNotFound.d.ts +2 -0
- package/lib/backend/exceptions/FolderNotWritable.d.ts +2 -0
- package/lib/backend/index.d.ts +1 -1
- package/lib/backend/middlewares/GalleryMWs.d.ts +4 -0
- package/lib/backend/middlewares/PersonMWs.d.ts +1 -1
- package/lib/backend/middlewares/RenderingMWs.d.ts +24 -0
- package/lib/backend/middlewares/RequestParams.d.ts +13 -0
- package/lib/backend/middlewares/RequestSession.d.ts +9 -0
- package/lib/backend/middlewares/ServerTimingMWs.d.ts +6 -6
- package/lib/backend/middlewares/SharingMWs.d.ts +2 -1
- package/lib/backend/middlewares/VersionMWs.d.ts +1 -1
- package/lib/backend/middlewares/thumbnail/ThumbnailGeneratorMWs.d.ts +1 -1
- package/lib/backend/middlewares/user/AuthenticationMWs.d.ts +37 -0
- package/lib/backend/middlewares/user/OIDCAuthService.d.ts +36 -5
- package/lib/backend/middlewares/user/OIDCMWs.d.ts +10 -0
- package/lib/backend/middlewares/user/UserMWs.d.ts +1 -0
- package/lib/backend/middlewares/user/UserRequestConstrainsMWs.d.ts +0 -1
- package/lib/backend/model/DirectoryAccess.d.ts +78 -0
- package/lib/backend/model/EventLoopHandler.d.ts +1 -1
- package/lib/backend/model/FFmpeg.d.ts +47 -0
- package/lib/backend/model/FFmpegFactory.d.ts +11 -2
- package/lib/backend/model/ObjectManagers.d.ts +1 -1
- package/lib/backend/model/PasswordHelper.d.ts +1 -1
- package/lib/backend/model/SessionContext.d.ts +16 -6
- package/lib/backend/model/UploadManager.d.ts +6 -3
- package/lib/backend/model/database/CoverManager.d.ts +8 -2
- package/lib/backend/model/database/GalleryManager.d.ts +15 -9
- package/lib/backend/model/database/IndexingManager.d.ts +7 -7
- package/lib/backend/model/database/LocationManager.d.ts +2 -3
- package/lib/backend/model/database/PersonManager.d.ts +5 -3
- package/lib/backend/model/database/ProjectedCacheManager.d.ts +9 -8
- package/lib/backend/model/database/ProjectionAwareManager.d.ts +4 -4
- package/lib/backend/model/database/SQLConnection.d.ts +4 -2
- package/lib/backend/model/database/SearchManager.d.ts +23 -8
- package/lib/backend/model/database/SessionManager.d.ts +41 -4
- package/lib/backend/model/database/SharingManager.d.ts +11 -6
- package/lib/backend/model/database/UserManager.d.ts +8 -1
- package/lib/backend/model/database/enitites/DirectoryEntity.d.ts +1 -1
- package/lib/backend/model/database/enitites/EntityUtils.d.ts +22 -1
- package/lib/backend/model/database/enitites/MediaEntity.d.ts +5 -2
- package/lib/backend/model/database/enitites/ProjectedDirectoryCacheEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/SharingEntity.d.ts +11 -5
- package/lib/backend/model/database/enitites/UserEntity.d.ts +8 -5
- package/lib/backend/model/database/enitites/VideoEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/album/ProjectedAlbumCacheEntity.d.ts +2 -2
- package/lib/backend/model/database/enitites/person/ProjectedPersonCacheEntity.d.ts +1 -1
- package/lib/backend/model/diagnostics/ConfigDiagnostics.d.ts +31 -12
- package/lib/backend/model/extension/ExpressRouterWrapper.d.ts +10 -4
- package/lib/backend/model/extension/ExtensionApp.d.ts +2 -3
- package/lib/backend/model/extension/ExtensionDB.d.ts +2 -2
- package/lib/backend/model/extension/ExtensionEvent.d.ts +12 -1
- package/lib/backend/model/extension/ExtensionManager.d.ts +22 -4
- package/lib/backend/model/extension/ExtensionObject.d.ts +6 -3
- package/lib/backend/model/extension/IExtension.d.ts +35 -18
- package/lib/backend/model/fileaccess/DiskManager.d.ts +3 -1
- package/lib/backend/model/fileaccess/MetadataLoader.d.ts +17 -0
- package/lib/backend/model/fileaccess/TaskQue.d.ts +4 -4
- package/lib/backend/model/fileaccess/VideoConverterWorker.d.ts +6 -2
- package/lib/backend/model/fileaccess/fileprocessing/PhotoProcessing.d.ts +3 -2
- package/lib/backend/model/jobs/JobManager.d.ts +2 -4
- package/lib/backend/model/jobs/JobProgressManager.d.ts +5 -3
- package/lib/backend/model/jobs/JobRepository.d.ts +1 -3
- package/lib/backend/model/jobs/jobs/AlbumCoverFillingJob.d.ts +1 -1
- package/lib/backend/model/jobs/jobs/IJobListener.d.ts +2 -2
- package/lib/backend/model/jobs/jobs/Job.d.ts +4 -1
- package/lib/backend/model/messenger/EmailMessenger.d.ts +1 -1
- package/lib/backend/model/messenger/Messenger.d.ts +1 -2
- package/lib/backend/model/messenger/MessengerRepository.d.ts +1 -3
- package/lib/backend/routes/ErrorRouter.d.ts +1 -0
- package/lib/backend/routes/GalleryRouter.d.ts +8 -0
- package/lib/backend/routes/PublicRouter.d.ts +3 -6
- package/lib/backend/routes/SharingRouter.d.ts +1 -1
- package/lib/backend/routes/UserRouter.d.ts +1 -0
- package/lib/backend/server.d.ts +3 -3
- package/lib/common/DataStructureVersion.d.ts +1 -1
- package/lib/common/SearchQueryParser.d.ts +2 -2
- package/lib/common/SearchQueryUtils.d.ts +71 -4
- package/lib/common/SupportedFormats.d.ts +11 -1
- package/lib/common/SupportedFormats.js +13 -19
- package/lib/common/TextFold.d.ts +6 -0
- package/lib/common/UploadUtils.d.ts +4 -0
- package/lib/common/Utils.d.ts +23 -24
- package/lib/common/Utils.js +37 -97
- package/lib/common/config/Enums.d.ts +91 -0
- package/lib/common/config/Enums.js +109 -0
- package/lib/common/config/private/Config.d.ts +1 -1
- package/lib/common/config/private/PrivateConfig.d.ts +18 -39
- package/lib/common/config/private/WebConfig.d.ts +1 -2
- package/lib/common/config/private/subconfigs/ServerExtensionsConfig.d.ts +2 -3
- package/lib/common/config/public/ClientConfig.d.ts +51 -68
- package/lib/common/config/public/ClientConfig.js +774 -557
- package/lib/common/entities/AutoCompleteItem.d.ts +3 -3
- package/lib/common/entities/ContentWrapper.d.ts +21 -8
- package/lib/common/entities/ContentWrapper.js +286 -318
- package/lib/common/entities/DirectoryDTO.d.ts +7 -6
- package/lib/common/entities/DirectoryDTO.js +10 -5
- package/lib/common/entities/Error.d.ts +12 -7
- package/lib/common/entities/Error.js +15 -3
- package/lib/common/entities/MediaDTO.d.ts +13 -0
- package/lib/common/entities/MediaDTO.js +10 -7
- package/lib/common/entities/Message.d.ts +3 -3
- package/lib/common/entities/NotificationDTO.d.ts +2 -2
- package/lib/common/entities/SearchQueryDTO.d.ts +9 -1
- package/lib/common/entities/SearchQueryDTO.js +1 -0
- package/lib/common/entities/SharingDTO.d.ts +39 -5
- package/lib/common/entities/SortingMethods.d.ts +26 -2
- package/lib/common/entities/SortingMethods.js +14 -1
- package/lib/common/entities/UserDTO.d.ts +5 -2
- package/lib/common/entities/UserSettingsDTO.d.ts +3 -1
- package/lib/common/entities/VideoDTO.d.ts +2 -5
- package/lib/common/entities/album/AlbumBaseDTO.d.ts +2 -2
- package/lib/common/entities/extension/ExtensionListItem.d.ts +1 -1
- package/lib/common/entities/extension/IClientUIConfig.d.ts +19 -12
- package/lib/common/entities/job/JobDTO.d.ts +1 -1
- package/lib/common/entities/job/JobProgressDTO.d.ts +1 -1
- package/lib/common/entities/job/JobScheduleDTO.d.ts +5 -5
- package/lib/common/entities/job/JobScheduleDTO.js +9 -5
- package/lib/common/event/EventLimit.d.ts +1 -1
- package/package.json +21 -8
- package/REPOSITORY.md +0 -13
- package/events.drawio +0 -1
- package/events.png +0 -0
- package/index.js.map +0 -1
- package/index.ts +0 -2
- package/lib/backend/ProjectPath.js +0 -36
- package/lib/backend/model/NotifocationManager.js +0 -44
- package/lib/backend/model/PasswordHelper.js +0 -20
- package/lib/backend/model/database/enitites/PersonEntry.d.ts +0 -11
- package/lib/backend/model/database/enitites/PersonJunctionTable.d.ts +0 -10
- package/lib/backend/model/extension/ExtensionConfigTemplateLoader.js +0 -139
- package/lib/backend/model/extension/ExtensionConfigWrapper.js +0 -59
- package/lib/common/config/private/Config.js +0 -20
- package/lib/common/config/private/PrivateConfig.js +0 -1568
- package/lib/common/config/private/PrivateConfigClass.js +0 -96
- package/lib/common/config/private/WebConfig.js +0 -19
- package/lib/common/config/private/subconfigs/MessagingConfig.js +0 -134
- package/lib/common/config/private/subconfigs/ServerExtensionsConfig.js +0 -111
- package/lib/common/config/public/Config.js +0 -24
- package/lib/common/entities/ConentWrapper.d.ts +0 -18
- package/lib/common/entities/ConentWrapper.js +0 -490
- package/lib/frontend/app/app.component.d.ts +0 -18
- package/lib/frontend/app/app.module.d.ts +0 -23
- package/lib/frontend/app/app.routing.d.ts +0 -4
- package/lib/frontend/app/icon.component.d.ts +0 -7
- package/lib/frontend/app/model/IRenderable.d.ts +0 -17
- package/lib/frontend/app/model/backendtext.service.d.ts +0 -7
- package/lib/frontend/app/model/backendtext.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/extension.service.d.ts +0 -5
- package/lib/frontend/app/model/navigation.service.d.ts +0 -12
- package/lib/frontend/app/model/network/autehentication.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/network/authentication.service.d.ts +0 -22
- package/lib/frontend/app/model/network/helper/auth.guard.d.ts +0 -9
- package/lib/frontend/app/model/network/helper/csrf.interceptor.d.ts +0 -8
- package/lib/frontend/app/model/network/helper/error.interceptor.d.ts +0 -8
- package/lib/frontend/app/model/network/network.service.d.ts +0 -29
- package/lib/frontend/app/model/network/network.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/network/user.service.d.ts +0 -13
- package/lib/frontend/app/model/network/user.service.spec.d.ts +0 -1
- package/lib/frontend/app/model/notification.service.d.ts +0 -28
- package/lib/frontend/app/model/page.helper.d.ts +0 -15
- package/lib/frontend/app/model/pi-title.service.d.ts +0 -15
- package/lib/frontend/app/model/query.service.d.ts +0 -19
- package/lib/frontend/app/model/seededRandom.service.d.ts +0 -7
- package/lib/frontend/app/model/theme.service.d.ts +0 -16
- package/lib/frontend/app/model/version.service.d.ts +0 -10
- package/lib/frontend/app/pipes/DurationPipe.d.ts +0 -4
- package/lib/frontend/app/pipes/FileDTOToPathPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/FileDTOToRelativePathPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/FileSizePipe.d.ts +0 -4
- package/lib/frontend/app/pipes/GPXFilesFilterPipe.d.ts +0 -5
- package/lib/frontend/app/pipes/MDFilesFilterPipe.d.ts +0 -6
- package/lib/frontend/app/pipes/ParseIntPipe.d.ts +0 -4
- package/lib/frontend/app/pipes/PhotoFilterPipe.d.ts +0 -6
- package/lib/frontend/app/pipes/SafeHTMLPipe.d.ts +0 -7
- package/lib/frontend/app/pipes/StringifyEnum.d.ts +0 -4
- package/lib/frontend/app/pipes/StringifyGridSize.d.ts +0 -5
- package/lib/frontend/app/pipes/StringifyRolePipe.d.ts +0 -4
- package/lib/frontend/app/pipes/StringifySearchQuery.d.ts +0 -8
- package/lib/frontend/app/pipes/StringifySearchType.d.ts +0 -5
- package/lib/frontend/app/pipes/StringifySortingMethod.d.ts +0 -4
- package/lib/frontend/app/ui/EnumTranslations.d.ts +0 -5
- package/lib/frontend/app/ui/admin/admin.component.d.ts +0 -36
- package/lib/frontend/app/ui/albums/album/album.component.d.ts +0 -26
- package/lib/frontend/app/ui/albums/albums.component.d.ts +0 -31
- package/lib/frontend/app/ui/albums/albums.service.d.ts +0 -12
- package/lib/frontend/app/ui/albums/saved-search-popup/saved-search-popup.component.d.ts +0 -15
- package/lib/frontend/app/ui/duplicates/duplicates.component.d.ts +0 -36
- package/lib/frontend/app/ui/duplicates/duplicates.service.d.ts +0 -9
- package/lib/frontend/app/ui/duplicates/photo/photo.duplicates.component.d.ts +0 -11
- package/lib/frontend/app/ui/faces/Person.d.ts +0 -9
- package/lib/frontend/app/ui/faces/face/face.component.d.ts +0 -22
- package/lib/frontend/app/ui/faces/faces.component.d.ts +0 -18
- package/lib/frontend/app/ui/faces/faces.service.d.ts +0 -14
- package/lib/frontend/app/ui/faces/navigator/navigator.faces.component.d.ts +0 -15
- package/lib/frontend/app/ui/frame/frame.component.d.ts +0 -60
- package/lib/frontend/app/ui/gallery/Media.d.ts +0 -15
- package/lib/frontend/app/ui/gallery/MediaIcon.d.ts +0 -29
- package/lib/frontend/app/ui/gallery/blog/blog.gallery.component.d.ts +0 -16
- package/lib/frontend/app/ui/gallery/blog/blog.service.d.ts +0 -85
- package/lib/frontend/app/ui/gallery/blog/blog.service.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/cache.gallery.service.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/content.service.d.ts +0 -11
- package/lib/frontend/app/ui/gallery/contentLoader.service.d.ts +0 -37
- package/lib/frontend/app/ui/gallery/directories/directories.component.d.ts +0 -14
- package/lib/frontend/app/ui/gallery/directories/directory/directory.gallery.component.d.ts +0 -20
- package/lib/frontend/app/ui/gallery/filter/filter.gallery.component.d.ts +0 -32
- package/lib/frontend/app/ui/gallery/filter/filter.service.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/filter/filter.service.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/fullscreen.service.d.ts +0 -7
- package/lib/frontend/app/ui/gallery/gallery.component.d.ts +0 -64
- package/lib/frontend/app/ui/gallery/gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/gallery.service.d.ts +0 -13
- package/lib/frontend/app/ui/gallery/grid/GridMedia.d.ts +0 -13
- package/lib/frontend/app/ui/gallery/grid/GridRowBuilder.d.ts +0 -16
- package/lib/frontend/app/ui/gallery/grid/grid.gallery.component.d.ts +0 -88
- package/lib/frontend/app/ui/gallery/grid/grid.gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/grid/photo/loading/loading.photo.grid.gallery.component.d.ts +0 -4
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.component.d.ts +0 -20
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.service.d.ts +0 -27
- package/lib/frontend/app/ui/gallery/grid/photo/photo.grid.gallery.component.d.ts +0 -53
- package/lib/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.d.ts +0 -103
- package/lib/frontend/app/ui/gallery/lightbox/infopanel/info-panel.lightbox.gallery.component.d.ts +0 -51
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.d.ts +0 -95
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.spec.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.service.d.ts +0 -45
- package/lib/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.d.ts +0 -71
- package/lib/frontend/app/ui/gallery/map/MarkerFactory.d.ts +0 -12
- package/lib/frontend/app/ui/gallery/map/lightbox/lightbox.map.gallery.component.d.ts +0 -80
- package/lib/frontend/app/ui/gallery/map/map.gallery.component.d.ts +0 -36
- package/lib/frontend/app/ui/gallery/map/map.service.d.ts +0 -30
- package/lib/frontend/app/ui/gallery/navigator/navigator.gallery.component.d.ts +0 -81
- package/lib/frontend/app/ui/gallery/navigator/navigator.service.d.ts +0 -14
- package/lib/frontend/app/ui/gallery/navigator/sorting.service.d.ts +0 -38
- package/lib/frontend/app/ui/gallery/overlay.service.d.ts +0 -9
- package/lib/frontend/app/ui/gallery/photo-frame-builder/photo-frame-builder.gallery.component.d.ts +0 -40
- package/lib/frontend/app/ui/gallery/random-query-builder/random-query-builder.gallery.component.d.ts +0 -30
- package/lib/frontend/app/ui/gallery/search/AutoCompleteRenderItem.d.ts +0 -11
- package/lib/frontend/app/ui/gallery/search/autocomplete.service.d.ts +0 -33
- package/lib/frontend/app/ui/gallery/search/query-builder/query-bulder.gallery.component.d.ts +0 -22
- package/lib/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.d.ts +0 -43
- package/lib/frontend/app/ui/gallery/search/search-field/search-field.gallery.component.d.ts +0 -31
- package/lib/frontend/app/ui/gallery/search/search-field-base/search-field-base.gallery.component.d.ts +0 -57
- package/lib/frontend/app/ui/gallery/search/search-query-parser.service.d.ts +0 -7
- package/lib/frontend/app/ui/gallery/search/search.gallery.component.d.ts +0 -39
- package/lib/frontend/app/ui/gallery/share/share.gallery.component.d.ts +0 -67
- package/lib/frontend/app/ui/gallery/share.service.d.ts +0 -35
- package/lib/frontend/app/ui/gallery/thumbnailLoader.service.d.ts +0 -41
- package/lib/frontend/app/ui/gallery/thumbnailManager.service.d.ts +0 -46
- package/lib/frontend/app/ui/gallery/uploader/uploader.gallery.component.d.ts +0 -15
- package/lib/frontend/app/ui/gallery/uploader/uploader.service.d.ts +0 -36
- package/lib/frontend/app/ui/gallery/wakelock.service.d.ts +0 -19
- package/lib/frontend/app/ui/language/language.component.d.ts +0 -10
- package/lib/frontend/app/ui/login/login.component.d.ts +0 -18
- package/lib/frontend/app/ui/settings/extension-installer/extension-installer.component.d.ts +0 -18
- package/lib/frontend/app/ui/settings/extension-installer/extension-installer.service.d.ts +0 -10
- package/lib/frontend/app/ui/settings/gallery-statistic/gallery-statistic.component.d.ts +0 -5
- package/lib/frontend/app/ui/settings/scheduled-jobs.service.d.ts +0 -41
- package/lib/frontend/app/ui/settings/settings.service.d.ts +0 -27
- package/lib/frontend/app/ui/settings/sharings-list/sharings-list.component.d.ts +0 -14
- package/lib/frontend/app/ui/settings/template/CustomSettingsEntries.d.ts +0 -57
- package/lib/frontend/app/ui/settings/template/ISettingsComponent.d.ts +0 -13
- package/lib/frontend/app/ui/settings/template/settings-entry/settings-entry.component.d.ts +0 -118
- package/lib/frontend/app/ui/settings/template/settings-entry/sorting-method/sorting-method.settings-entry.component.d.ts +0 -28
- package/lib/frontend/app/ui/settings/template/template.component.d.ts +0 -97
- package/lib/frontend/app/ui/settings/users/users.component.d.ts +0 -47
- package/lib/frontend/app/ui/settings/users/users.service.d.ts +0 -12
- package/lib/frontend/app/ui/settings/workflow/button/job-button.settings.component.d.ts +0 -32
- package/lib/frontend/app/ui/settings/workflow/progress/job-progress.settings.component.d.ts +0 -25
- package/lib/frontend/app/ui/settings/workflow/workflow.component.d.ts +0 -68
- package/lib/frontend/app/ui/sharelogin/share-login.component.d.ts +0 -16
- package/lib/frontend/app/ui/utils/grid-size-icon/grid-size-icon.component.d.ts +0 -5
- package/lib/frontend/app/ui/utils/sorting-method-icon/sorting-method-icon.component.d.ts +0 -13
- package/lib/frontend/app/ui/utils/timestamp-datepicker/datepicker.component.d.ts +0 -10
- package/lib/frontend/app/ui/utils/timestamp-timepicker/timepicker.component.d.ts +0 -11
- package/lib/frontend/environments/environment.d.ts +0 -3
- package/lib/frontend/environments/environment.prod.d.ts +0 -3
- package/lib/frontend/main.d.ts +0 -21
- package/lib/frontend/polyfills.d.ts +0 -60
- package/lib/frontend/test.d.ts +0 -1
|
@@ -1,3 +1,13 @@
|
|
|
1
|
+
import type { ClientConfig } from './config/public/ClientConfig';
|
|
2
|
+
/**
|
|
3
|
+
* The part of the config the formats are read from.
|
|
4
|
+
* Both the public (frontend) and the private (backend) config have it.
|
|
5
|
+
*/
|
|
6
|
+
export type SupportedFormatsConfig = Pick<ClientConfig, 'Media' | 'MetaFile'>;
|
|
7
|
+
/**
|
|
8
|
+
* Lists the supported file formats.
|
|
9
|
+
* Empty until init() is called: the public config calls it in the frontend, the private config in the backend.
|
|
10
|
+
*/
|
|
1
11
|
export declare class SupportedFormats {
|
|
2
12
|
static Photos: string[];
|
|
3
13
|
static Videos: string[];
|
|
@@ -15,5 +25,5 @@ export declare class SupportedFormats {
|
|
|
15
25
|
Videos: string[];
|
|
16
26
|
};
|
|
17
27
|
};
|
|
18
|
-
static init(): void;
|
|
28
|
+
static init(config: SupportedFormatsConfig): void;
|
|
19
29
|
}
|
|
@@ -1,29 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SupportedFormats = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
}
|
|
9
|
-
else {
|
|
10
|
-
// eslint-disable-next-line @typescript-eslint/no-require-imports
|
|
11
|
-
Config = require('./config/private/Config').Config;
|
|
12
|
-
}
|
|
4
|
+
/**
|
|
5
|
+
* Lists the supported file formats.
|
|
6
|
+
* Empty until init() is called: the public config calls it in the frontend, the private config in the backend.
|
|
7
|
+
*/
|
|
13
8
|
class SupportedFormats {
|
|
14
|
-
static { this.Photos =
|
|
9
|
+
static { this.Photos = []; }
|
|
15
10
|
// Browser-supported video formats
|
|
16
11
|
// Read more: https://www.w3schools.com/html/html5_video.asp
|
|
17
|
-
static { this.Videos =
|
|
18
|
-
static { this.MetaFiles =
|
|
12
|
+
static { this.Videos = []; }
|
|
13
|
+
static { this.MetaFiles = []; }
|
|
19
14
|
// These formats need to be transcoded (with the built-in ffmpeg support)
|
|
20
15
|
static { this.TranscodeNeed = {
|
|
21
16
|
// based on libvips, all supported formats for sharp: https://github.com/libvips/libvips
|
|
22
17
|
Photos: [],
|
|
23
|
-
Videos:
|
|
18
|
+
Videos: [],
|
|
24
19
|
}; }
|
|
25
|
-
// --------------------------------------------
|
|
26
|
-
// Below this, it is autogenerated, DO NOT EDIT
|
|
27
20
|
static { this.WithDots = {
|
|
28
21
|
Photos: [],
|
|
29
22
|
Videos: [],
|
|
@@ -33,9 +26,11 @@ class SupportedFormats {
|
|
|
33
26
|
Videos: [],
|
|
34
27
|
}
|
|
35
28
|
}; }
|
|
36
|
-
static init() {
|
|
37
|
-
SupportedFormats.
|
|
38
|
-
SupportedFormats.
|
|
29
|
+
static init(config) {
|
|
30
|
+
SupportedFormats.TranscodeNeed.Videos = config.Media.Video.supportedFormatsWithTranscoding;
|
|
31
|
+
SupportedFormats.Photos = config.Media.Photo.supportedFormats.concat(SupportedFormats.TranscodeNeed.Photos);
|
|
32
|
+
SupportedFormats.Videos = config.Media.Video.supportedFormats.concat(SupportedFormats.TranscodeNeed.Videos);
|
|
33
|
+
SupportedFormats.MetaFiles = config.MetaFile.supportedFormats;
|
|
39
34
|
SupportedFormats.WithDots.Photos = SupportedFormats.Photos.map((f) => '.' + f);
|
|
40
35
|
SupportedFormats.WithDots.Videos = SupportedFormats.Videos.map((f) => '.' + f);
|
|
41
36
|
SupportedFormats.WithDots.MetaFiles = SupportedFormats.MetaFiles.map((f) => '.' + f);
|
|
@@ -46,4 +41,3 @@ class SupportedFormats {
|
|
|
46
41
|
}
|
|
47
42
|
}
|
|
48
43
|
exports.SupportedFormats = SupportedFormats;
|
|
49
|
-
SupportedFormats.init();
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* One letter in lowercase and without its accents ("Á" -> "a"), to compare texts the way MySQL's utf8mb4_general_ci does (#1309).
|
|
3
|
+
* Used by the SQLite search (fold()) and by the autocomplete of the client, which bolds the typed text.
|
|
4
|
+
* NFD only splits letters that carry a combining mark: ø, ł or ß stay as they are.
|
|
5
|
+
*/
|
|
6
|
+
export declare const foldChar: (char: string) => string;
|
package/lib/common/Utils.d.ts
CHANGED
|
@@ -2,53 +2,52 @@ export declare class Utils {
|
|
|
2
2
|
static GUID(): string;
|
|
3
3
|
static chunkArrays<T>(arr: T[], chunkSize: number): T[][];
|
|
4
4
|
static wait(time: number): Promise<unknown>;
|
|
5
|
-
static removeNullOrEmptyObj<T extends
|
|
5
|
+
static removeNullOrEmptyObj<T extends object>(obj: T): T;
|
|
6
6
|
static clone<T>(object: T): T;
|
|
7
7
|
static shallowClone<T>(object: T): T;
|
|
8
|
-
static zeroPrefix(number:
|
|
8
|
+
static zeroPrefix(number: number | string, length: number): string;
|
|
9
9
|
/**
|
|
10
10
|
* Checks if the two input (let them be objects or arrays or just primitives) are equal
|
|
11
11
|
*/
|
|
12
|
-
static equalsFilter(object:
|
|
12
|
+
static equalsFilter(object: unknown, filter: unknown, skipProp?: string[]): boolean;
|
|
13
13
|
static toIsoString(d: number | Date): string;
|
|
14
|
-
static toIsoTimestampString(YYYYMMDD: string, hhmmss: string): string;
|
|
15
|
-
static makeUTCMidnight(d: number | Date, offset
|
|
16
|
-
static getUTCFullYear(d: number | Date, offset
|
|
17
|
-
static getFullYear(d: number | Date, offset
|
|
18
|
-
static timestampToMS(timestamp: string, offset
|
|
19
|
-
static splitTimestampAndOffset(timestamp: string): [string | undefined, string | undefined];
|
|
20
|
-
static getTimeOffsetByGPSStamp(timestamp: string, gpsTimeStamp: string, gps
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
static
|
|
14
|
+
static toIsoTimestampString(YYYYMMDD: string, hhmmss: string): string | undefined;
|
|
15
|
+
static makeUTCMidnight(d: number | Date, offset?: string): Date;
|
|
16
|
+
static getUTCFullYear(d: number | Date, offset?: string): number;
|
|
17
|
+
static getFullYear(d: number | Date, offset?: string): number;
|
|
18
|
+
static timestampToMS(timestamp: string | undefined, offset?: string): number | undefined;
|
|
19
|
+
static splitTimestampAndOffset(timestamp: string | undefined): [string | undefined, string | undefined];
|
|
20
|
+
static getTimeOffsetByGPSStamp(timestamp: string, gpsTimeStamp: string, gps?: {
|
|
21
|
+
GPSDateStamp?: string;
|
|
22
|
+
GPSTimeStamp?: (number | string)[];
|
|
23
|
+
}): string | undefined;
|
|
24
|
+
static getOffsetString(offsetMinutes: number): string | undefined;
|
|
25
|
+
static getOffsetMinutes(offsetString?: string): number | undefined;
|
|
26
|
+
static getLocalTimeMS(creationDate: number, creationDateOffset?: string): number;
|
|
27
|
+
static getTimeMS(creationDate: number, creationDateOffset: string | undefined, localTime: boolean): number;
|
|
25
28
|
static isLeapYear(year: number): boolean;
|
|
26
29
|
static isDateFromLeapYear(date: Date): boolean;
|
|
27
30
|
static getDayOfYear(date: Date): number;
|
|
28
31
|
static addMonthToDate(date: Date, numMonths: number): Date;
|
|
29
32
|
static renderDataSize(size: number): string;
|
|
30
|
-
static getUnique(arr:
|
|
33
|
+
static getUnique<T>(arr: T[]): T[];
|
|
31
34
|
static createRange(from: number, to: number): number[];
|
|
32
35
|
static canonizePath(path: string): string;
|
|
33
36
|
static concatUrls(...args: string[]): string;
|
|
34
|
-
static updateKeys(targetObject: any, sourceObject: any): void;
|
|
35
|
-
static setKeys(targetObject: any, sourceObject: any): void;
|
|
36
|
-
static setKeysForced(targetObject: any, sourceObject: any): void;
|
|
37
37
|
static findClosest(num: number, arr: number[]): number;
|
|
38
38
|
static findClosestinSorted(num: number, arr: number[]): number;
|
|
39
|
-
static asciiToUTF8(text: string): string;
|
|
39
|
+
static asciiToUTF8(text: string): string | undefined;
|
|
40
40
|
static decodeHTMLChars(text: string): string;
|
|
41
41
|
static isUInt32(value: number, max?: number): boolean;
|
|
42
42
|
static isInt32(value: number): boolean;
|
|
43
43
|
static isFloat32(value: number): boolean;
|
|
44
|
-
static
|
|
45
|
-
static xmpExifGpsCoordinateToDecimalDegrees(text: string): number;
|
|
44
|
+
static xmpExifGpsCoordinateToDecimalDegrees(text: string): number | undefined;
|
|
46
45
|
static sortableFilename(filename: string): string;
|
|
47
|
-
static enumToArray(EnumType:
|
|
46
|
+
static enumToArray(EnumType: Record<string, string | number>): {
|
|
48
47
|
key: number;
|
|
49
48
|
value: string;
|
|
50
49
|
}[];
|
|
51
|
-
static isValidEnumInt(EnumType:
|
|
50
|
+
static isValidEnumInt(EnumType: Record<number, string | number>, value: number): boolean;
|
|
52
51
|
static parseEnumArray<T extends Record<string, number>>(param: string | string[], enumType: T): number[];
|
|
53
52
|
static serializeEnumNames(values: number[], enumType: Record<number, string>): string;
|
|
54
53
|
}
|
|
@@ -60,5 +59,5 @@ export declare class LRU<V> {
|
|
|
60
59
|
}>;
|
|
61
60
|
constructor(size: number);
|
|
62
61
|
set(key: string, value: V): void;
|
|
63
|
-
get(key: string): V;
|
|
62
|
+
get(key: string): V | undefined;
|
|
64
63
|
}
|
package/lib/common/Utils.js
CHANGED
|
@@ -21,32 +21,30 @@ class Utils {
|
|
|
21
21
|
setTimeout(resolve, time);
|
|
22
22
|
});
|
|
23
23
|
}
|
|
24
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
25
24
|
static removeNullOrEmptyObj(obj) {
|
|
26
25
|
if (typeof obj !== 'object' || obj == null) {
|
|
27
26
|
return obj;
|
|
28
27
|
}
|
|
29
|
-
|
|
30
|
-
if (
|
|
28
|
+
const o = obj;
|
|
29
|
+
if (o['_____removeNullOrEmptyObjvisiting']) {
|
|
31
30
|
throw new Error('Recursive call detected');
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const keys = Object.keys(obj);
|
|
32
|
+
o['_____removeNullOrEmptyObjvisiting'] = true;
|
|
33
|
+
const keys = Object.keys(o);
|
|
36
34
|
for (const key of keys) {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
35
|
+
const value = o[key];
|
|
36
|
+
if (value !== null && typeof value === 'object') {
|
|
37
|
+
if (Utils.removeNullOrEmptyObj(value)) {
|
|
38
|
+
if (Object.keys(value).length === 0) {
|
|
39
|
+
delete o[key];
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
else if (
|
|
45
|
-
delete
|
|
43
|
+
else if (value === null || value === undefined) {
|
|
44
|
+
delete o[key];
|
|
46
45
|
}
|
|
47
46
|
}
|
|
48
|
-
|
|
49
|
-
delete obj._____removeNullOrEmptyObjvisiting;
|
|
47
|
+
delete o['_____removeNullOrEmptyObjvisiting'];
|
|
50
48
|
return obj;
|
|
51
49
|
}
|
|
52
50
|
static clone(object) {
|
|
@@ -55,25 +53,22 @@ class Utils {
|
|
|
55
53
|
static shallowClone(object) {
|
|
56
54
|
const c = {};
|
|
57
55
|
for (const e of Object.entries(object)) {
|
|
58
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
59
56
|
c[e[0]] = e[1];
|
|
60
57
|
}
|
|
61
58
|
return c;
|
|
62
59
|
}
|
|
63
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
64
60
|
static zeroPrefix(number, length) {
|
|
65
|
-
if (!isNaN(number)) {
|
|
61
|
+
if (!isNaN(Number(number))) {
|
|
66
62
|
const zerosToAdd = Math.max(length - String(number).length, 0);
|
|
67
63
|
return '0'.repeat(zerosToAdd) + number;
|
|
68
64
|
}
|
|
69
65
|
else {
|
|
70
|
-
return '0'.repeat(number);
|
|
66
|
+
return '0'.repeat(Number(number));
|
|
71
67
|
}
|
|
72
68
|
}
|
|
73
69
|
/**
|
|
74
70
|
* Checks if the two input (let them be objects or arrays or just primitives) are equal
|
|
75
71
|
*/
|
|
76
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
77
72
|
static equalsFilter(object, filter, skipProp = []) {
|
|
78
73
|
if (typeof filter !== 'object' || filter == null) {
|
|
79
74
|
return object === filter;
|
|
@@ -81,20 +76,22 @@ class Utils {
|
|
|
81
76
|
if (!object) {
|
|
82
77
|
return false;
|
|
83
78
|
}
|
|
84
|
-
|
|
79
|
+
const o = object;
|
|
80
|
+
const f = filter;
|
|
81
|
+
if (Array.isArray(object) && object.length !== f['length']) {
|
|
85
82
|
return false;
|
|
86
83
|
}
|
|
87
|
-
const keys = Object.keys(
|
|
84
|
+
const keys = Object.keys(f);
|
|
88
85
|
for (const key of keys) {
|
|
89
86
|
if (skipProp.includes(key)) {
|
|
90
87
|
continue;
|
|
91
88
|
}
|
|
92
|
-
if (typeof
|
|
93
|
-
if (Utils.equalsFilter(
|
|
89
|
+
if (typeof f[key] === 'object') {
|
|
90
|
+
if (Utils.equalsFilter(o[key], f[key], skipProp) === false) {
|
|
94
91
|
return false;
|
|
95
92
|
}
|
|
96
93
|
}
|
|
97
|
-
else if (
|
|
94
|
+
else if (o[key] !== f[key]) {
|
|
98
95
|
return false;
|
|
99
96
|
}
|
|
100
97
|
}
|
|
@@ -112,8 +109,13 @@ class Utils {
|
|
|
112
109
|
const dateRegex = /^(\d{4})(\d{2})(\d{2})$/;
|
|
113
110
|
// Regular expression to match hhmmss+/-ohom format
|
|
114
111
|
const timeRegex = /^(\d{2})(\d{2})(\d{2})([+-]\d{2})?(\d{2})?$/;
|
|
115
|
-
const
|
|
116
|
-
const
|
|
112
|
+
const dateMatch = YYYYMMDD.match(dateRegex);
|
|
113
|
+
const timeMatch = hhmmss.match(timeRegex);
|
|
114
|
+
if (!dateMatch || !timeMatch) {
|
|
115
|
+
return undefined;
|
|
116
|
+
}
|
|
117
|
+
const [, year, month, day] = dateMatch;
|
|
118
|
+
const [, hour, minute, second, offsetHour, offsetMinute] = timeMatch;
|
|
117
119
|
const isoTimestamp = `${year}-${month}-${day}T${hour}:${minute}:${second}`;
|
|
118
120
|
if (offsetHour && offsetMinute) {
|
|
119
121
|
return isoTimestamp + `${offsetHour}:${offsetMinute}`;
|
|
@@ -183,7 +185,6 @@ class Utils {
|
|
|
183
185
|
}
|
|
184
186
|
}
|
|
185
187
|
//function to calculate offset from exif.exif.gpsTimeStamp or exif.gps.GPSDateStamp + exif.gps.GPSTimestamp
|
|
186
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
187
188
|
static getTimeOffsetByGPSStamp(timestamp, gpsTimeStamp, gps) {
|
|
188
189
|
let UTCTimestamp = gpsTimeStamp;
|
|
189
190
|
if (!UTCTimestamp &&
|
|
@@ -191,13 +192,12 @@ class Utils {
|
|
|
191
192
|
gps.GPSDateStamp &&
|
|
192
193
|
gps.GPSTimeStamp) { //else use exif.gps.GPS*Stamp if available
|
|
193
194
|
//GPS timestamp is always UTC (+00:00)
|
|
194
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
195
195
|
UTCTimestamp = gps.GPSDateStamp.replaceAll(':', '-') + ' ' + gps.GPSTimeStamp.map((num) => Utils.zeroPrefix(num, 2)).join(':');
|
|
196
196
|
}
|
|
197
197
|
if (UTCTimestamp && timestamp) {
|
|
198
198
|
//offset in minutes is the difference between gps timestamp, and given timestamp
|
|
199
199
|
//to calculate this correctly, we have to work with the same offset
|
|
200
|
-
const offsetMinutes = Math.round((Utils.timestampToMS(timestamp, '+00:00') - Utils.timestampToMS(UTCTimestamp, '+00:00')) / 1000 / 60);
|
|
200
|
+
const offsetMinutes = Math.round((Utils.timestampToMS(timestamp, '+00:00') - Utils.timestampToMS(UTCTimestamp, '+00:00')) / 1000 / 60); // both are set (checked above)
|
|
201
201
|
return Utils.getOffsetString(offsetMinutes);
|
|
202
202
|
}
|
|
203
203
|
else {
|
|
@@ -218,7 +218,7 @@ class Utils {
|
|
|
218
218
|
static getOffsetMinutes(offsetString) {
|
|
219
219
|
const regex = /^([+-](0[0-9]|1[0-4]):[0-5][0-9])$/; //checks if offset is between -14:00 and +14:00.
|
|
220
220
|
//-12:00 is the lowest valid UTC-offset, but we allow down to -14 for efficiency
|
|
221
|
-
if (regex.test(offsetString)) {
|
|
221
|
+
if (offsetString !== undefined && regex.test(offsetString)) {
|
|
222
222
|
const hhmm = offsetString.split(':');
|
|
223
223
|
const hours = parseInt(hhmm[0]);
|
|
224
224
|
return hours < 0 ? ((hours * 60) - parseInt(hhmm[1])) : ((hours * 60) + parseInt(hhmm[1]));
|
|
@@ -280,7 +280,6 @@ class Utils {
|
|
|
280
280
|
}
|
|
281
281
|
return size.toFixed(2) + postFixes[index];
|
|
282
282
|
}
|
|
283
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
284
283
|
static getUnique(arr) {
|
|
285
284
|
return arr.filter((value, index, arr) => arr.indexOf(value) === index);
|
|
286
285
|
}
|
|
@@ -315,45 +314,6 @@ class Utils {
|
|
|
315
314
|
}
|
|
316
315
|
return url.substring(0, url.length - 1);
|
|
317
316
|
}
|
|
318
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
319
|
-
static updateKeys(targetObject, sourceObject) {
|
|
320
|
-
Object.keys(sourceObject).forEach((key) => {
|
|
321
|
-
if (typeof targetObject[key] === 'undefined') {
|
|
322
|
-
return;
|
|
323
|
-
}
|
|
324
|
-
if (typeof targetObject[key] === 'object') {
|
|
325
|
-
Utils.updateKeys(targetObject[key], sourceObject[key]);
|
|
326
|
-
}
|
|
327
|
-
else {
|
|
328
|
-
targetObject[key] = sourceObject[key];
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
333
|
-
static setKeys(targetObject, sourceObject) {
|
|
334
|
-
Object.keys(sourceObject).forEach((key) => {
|
|
335
|
-
if (typeof targetObject[key] === 'object') {
|
|
336
|
-
Utils.setKeys(targetObject[key], sourceObject[key]);
|
|
337
|
-
}
|
|
338
|
-
else {
|
|
339
|
-
targetObject[key] = sourceObject[key];
|
|
340
|
-
}
|
|
341
|
-
});
|
|
342
|
-
}
|
|
343
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
344
|
-
static setKeysForced(targetObject, sourceObject) {
|
|
345
|
-
Object.keys(sourceObject).forEach((key) => {
|
|
346
|
-
if (typeof sourceObject[key] === 'object') {
|
|
347
|
-
if (typeof targetObject[key] === 'undefined') {
|
|
348
|
-
targetObject[key] = {};
|
|
349
|
-
}
|
|
350
|
-
Utils.setKeysForced(targetObject[key], sourceObject[key]);
|
|
351
|
-
}
|
|
352
|
-
else {
|
|
353
|
-
targetObject[key] = sourceObject[key];
|
|
354
|
-
}
|
|
355
|
-
});
|
|
356
|
-
}
|
|
357
317
|
static findClosest(num, arr) {
|
|
358
318
|
let curr = arr[0];
|
|
359
319
|
let diff = Math.abs(num - curr);
|
|
@@ -427,37 +387,19 @@ class Utils {
|
|
|
427
387
|
((value >= -3.402823466 * E && value <= -1.175494351 * nE) ||
|
|
428
388
|
(value <= 3.402823466 * E && value >= 1.175494351 * nE)));
|
|
429
389
|
}
|
|
430
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
431
|
-
static getAnyX(num, arr, start = 0) {
|
|
432
|
-
if (num <= 0 || num > arr.length || start >= arr.length) {
|
|
433
|
-
return [];
|
|
434
|
-
}
|
|
435
|
-
if (num <= 1) {
|
|
436
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
437
|
-
return arr.slice(start).map((e) => [e]);
|
|
438
|
-
}
|
|
439
|
-
if (num === arr.length - start) {
|
|
440
|
-
return [arr.slice(start)];
|
|
441
|
-
}
|
|
442
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
443
|
-
const ret = [];
|
|
444
|
-
for (let i = start; i < arr.length; ++i) {
|
|
445
|
-
Utils.getAnyX(num - 1, arr, i + 1).forEach((a) => {
|
|
446
|
-
a.push(arr[i]);
|
|
447
|
-
ret.push(a);
|
|
448
|
-
});
|
|
449
|
-
}
|
|
450
|
-
return ret;
|
|
451
|
-
}
|
|
452
390
|
static xmpExifGpsCoordinateToDecimalDegrees(text) {
|
|
453
|
-
if (!text) {
|
|
391
|
+
if (!text || typeof text !== 'string') {
|
|
454
392
|
return undefined;
|
|
455
393
|
}
|
|
456
394
|
const parts = text.match(/^([0-9]+),([0-9.]+)([EWNS])$/);
|
|
395
|
+
if (!parts) {
|
|
396
|
+
return undefined;
|
|
397
|
+
}
|
|
457
398
|
const degrees = parseInt(parts[1], 10);
|
|
458
399
|
const minutes = parseFloat(parts[2]);
|
|
459
400
|
const sign = (parts[3] === 'N' || parts[3] === 'E') ? 1 : -1;
|
|
460
|
-
|
|
401
|
+
const ret = sign * (degrees + (minutes / 60.0));
|
|
402
|
+
return Number.isFinite(ret) ? ret : undefined;
|
|
461
403
|
}
|
|
462
404
|
static sortableFilename(filename) {
|
|
463
405
|
const lastDot = filename.lastIndexOf('.');
|
|
@@ -468,7 +410,6 @@ class Utils {
|
|
|
468
410
|
// Fallback to the full name
|
|
469
411
|
return filename;
|
|
470
412
|
}
|
|
471
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
472
413
|
static enumToArray(EnumType) {
|
|
473
414
|
const arr = [];
|
|
474
415
|
for (const enumMember in EnumType) {
|
|
@@ -483,7 +424,6 @@ class Utils {
|
|
|
483
424
|
}
|
|
484
425
|
return arr;
|
|
485
426
|
}
|
|
486
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
487
427
|
static isValidEnumInt(EnumType, value) {
|
|
488
428
|
return typeof EnumType[value] === 'string';
|
|
489
429
|
}
|
|
@@ -546,7 +486,7 @@ class LRU {
|
|
|
546
486
|
}
|
|
547
487
|
get(key) {
|
|
548
488
|
if (!this.data[key]) {
|
|
549
|
-
return;
|
|
489
|
+
return undefined;
|
|
550
490
|
}
|
|
551
491
|
return this.data[key].value;
|
|
552
492
|
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
export declare enum DatabaseType {
|
|
2
|
+
mysql = 2,
|
|
3
|
+
sqlite = 3
|
|
4
|
+
}
|
|
5
|
+
export declare enum LogLevel {
|
|
6
|
+
error = 1,
|
|
7
|
+
warn = 2,
|
|
8
|
+
info = 3,
|
|
9
|
+
verbose = 4,
|
|
10
|
+
debug = 5,
|
|
11
|
+
silly = 6
|
|
12
|
+
}
|
|
13
|
+
export declare enum SQLLogLevel {
|
|
14
|
+
none = 1,
|
|
15
|
+
error = 2,
|
|
16
|
+
all = 3
|
|
17
|
+
}
|
|
18
|
+
export declare enum ReIndexingSensitivity {
|
|
19
|
+
never = 10,
|
|
20
|
+
low = 20,
|
|
21
|
+
medium = 30,
|
|
22
|
+
high = 40
|
|
23
|
+
}
|
|
24
|
+
export declare enum FFmpegPresets {
|
|
25
|
+
ultrafast = 1,
|
|
26
|
+
superfast = 2,
|
|
27
|
+
veryfast = 3,
|
|
28
|
+
faster = 4,
|
|
29
|
+
fast = 5,
|
|
30
|
+
medium = 6,
|
|
31
|
+
slow = 7,
|
|
32
|
+
slower = 8,
|
|
33
|
+
veryslow = 9,
|
|
34
|
+
placebo = 10
|
|
35
|
+
}
|
|
36
|
+
export declare enum MapProviders {
|
|
37
|
+
OpenStreetMap = 1,
|
|
38
|
+
Mapbox = 2,
|
|
39
|
+
Custom = 3
|
|
40
|
+
}
|
|
41
|
+
export declare enum ConfigPriority {
|
|
42
|
+
basic = 1,
|
|
43
|
+
advanced = 2,
|
|
44
|
+
underTheHood = 3
|
|
45
|
+
}
|
|
46
|
+
export declare enum ThemeModes {
|
|
47
|
+
light = 1,
|
|
48
|
+
dark = 2,
|
|
49
|
+
auto = 3
|
|
50
|
+
}
|
|
51
|
+
export declare enum ScrollUpModes {
|
|
52
|
+
never = 1,
|
|
53
|
+
mobileOnly = 2,
|
|
54
|
+
always = 3
|
|
55
|
+
}
|
|
56
|
+
export declare enum ScrollLabelModes {
|
|
57
|
+
never = 1,
|
|
58
|
+
date = 2,
|
|
59
|
+
always = 3
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Used for lightbox titles
|
|
63
|
+
*/
|
|
64
|
+
export declare enum LightBoxTitleTexts {
|
|
65
|
+
NONE = 1,
|
|
66
|
+
file = 2,
|
|
67
|
+
resolution = 3,
|
|
68
|
+
size = 4,
|
|
69
|
+
caption = 5,
|
|
70
|
+
title = 6,
|
|
71
|
+
keywords = 7,
|
|
72
|
+
persons = 8,
|
|
73
|
+
location = 9,
|
|
74
|
+
date = 10,
|
|
75
|
+
camera = 11,
|
|
76
|
+
lens = 12,
|
|
77
|
+
iso = 13,
|
|
78
|
+
fstop = 14,
|
|
79
|
+
focal_length = 15,
|
|
80
|
+
directory = 16,
|
|
81
|
+
titleOrCaption = 17,
|
|
82
|
+
titleOrDirectory = 18,
|
|
83
|
+
titleOrCaptionOrDirectory = 19
|
|
84
|
+
}
|
|
85
|
+
export declare enum NavigationLinkTypes {
|
|
86
|
+
gallery = 1,
|
|
87
|
+
faces = 2,
|
|
88
|
+
albums = 3,
|
|
89
|
+
search = 4,
|
|
90
|
+
url = 5
|
|
91
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// Enums of the config. They have no imports, so the extension kit can ship them without the config classes.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.NavigationLinkTypes = exports.LightBoxTitleTexts = exports.ScrollLabelModes = exports.ScrollUpModes = exports.ThemeModes = exports.ConfigPriority = exports.MapProviders = exports.FFmpegPresets = exports.ReIndexingSensitivity = exports.SQLLogLevel = exports.LogLevel = exports.DatabaseType = void 0;
|
|
5
|
+
var DatabaseType;
|
|
6
|
+
(function (DatabaseType) {
|
|
7
|
+
DatabaseType[DatabaseType["mysql"] = 2] = "mysql";
|
|
8
|
+
DatabaseType[DatabaseType["sqlite"] = 3] = "sqlite";
|
|
9
|
+
})(DatabaseType || (exports.DatabaseType = DatabaseType = {}));
|
|
10
|
+
var LogLevel;
|
|
11
|
+
(function (LogLevel) {
|
|
12
|
+
LogLevel[LogLevel["error"] = 1] = "error";
|
|
13
|
+
LogLevel[LogLevel["warn"] = 2] = "warn";
|
|
14
|
+
LogLevel[LogLevel["info"] = 3] = "info";
|
|
15
|
+
LogLevel[LogLevel["verbose"] = 4] = "verbose";
|
|
16
|
+
LogLevel[LogLevel["debug"] = 5] = "debug";
|
|
17
|
+
LogLevel[LogLevel["silly"] = 6] = "silly";
|
|
18
|
+
})(LogLevel || (exports.LogLevel = LogLevel = {}));
|
|
19
|
+
var SQLLogLevel;
|
|
20
|
+
(function (SQLLogLevel) {
|
|
21
|
+
SQLLogLevel[SQLLogLevel["none"] = 1] = "none";
|
|
22
|
+
SQLLogLevel[SQLLogLevel["error"] = 2] = "error";
|
|
23
|
+
SQLLogLevel[SQLLogLevel["all"] = 3] = "all";
|
|
24
|
+
})(SQLLogLevel || (exports.SQLLogLevel = SQLLogLevel = {}));
|
|
25
|
+
var ReIndexingSensitivity;
|
|
26
|
+
(function (ReIndexingSensitivity) {
|
|
27
|
+
// Order is important. It also used to do relative comparison.
|
|
28
|
+
// Keep space between items for future
|
|
29
|
+
ReIndexingSensitivity[ReIndexingSensitivity["never"] = 10] = "never";
|
|
30
|
+
ReIndexingSensitivity[ReIndexingSensitivity["low"] = 20] = "low";
|
|
31
|
+
ReIndexingSensitivity[ReIndexingSensitivity["medium"] = 30] = "medium";
|
|
32
|
+
ReIndexingSensitivity[ReIndexingSensitivity["high"] = 40] = "high";
|
|
33
|
+
})(ReIndexingSensitivity || (exports.ReIndexingSensitivity = ReIndexingSensitivity = {}));
|
|
34
|
+
var FFmpegPresets;
|
|
35
|
+
(function (FFmpegPresets) {
|
|
36
|
+
FFmpegPresets[FFmpegPresets["ultrafast"] = 1] = "ultrafast";
|
|
37
|
+
FFmpegPresets[FFmpegPresets["superfast"] = 2] = "superfast";
|
|
38
|
+
FFmpegPresets[FFmpegPresets["veryfast"] = 3] = "veryfast";
|
|
39
|
+
FFmpegPresets[FFmpegPresets["faster"] = 4] = "faster";
|
|
40
|
+
FFmpegPresets[FFmpegPresets["fast"] = 5] = "fast";
|
|
41
|
+
FFmpegPresets[FFmpegPresets["medium"] = 6] = "medium";
|
|
42
|
+
FFmpegPresets[FFmpegPresets["slow"] = 7] = "slow";
|
|
43
|
+
FFmpegPresets[FFmpegPresets["slower"] = 8] = "slower";
|
|
44
|
+
FFmpegPresets[FFmpegPresets["veryslow"] = 9] = "veryslow";
|
|
45
|
+
FFmpegPresets[FFmpegPresets["placebo"] = 10] = "placebo";
|
|
46
|
+
})(FFmpegPresets || (exports.FFmpegPresets = FFmpegPresets = {}));
|
|
47
|
+
var MapProviders;
|
|
48
|
+
(function (MapProviders) {
|
|
49
|
+
MapProviders[MapProviders["OpenStreetMap"] = 1] = "OpenStreetMap";
|
|
50
|
+
MapProviders[MapProviders["Mapbox"] = 2] = "Mapbox";
|
|
51
|
+
MapProviders[MapProviders["Custom"] = 3] = "Custom";
|
|
52
|
+
})(MapProviders || (exports.MapProviders = MapProviders = {}));
|
|
53
|
+
var ConfigPriority;
|
|
54
|
+
(function (ConfigPriority) {
|
|
55
|
+
ConfigPriority[ConfigPriority["basic"] = 1] = "basic";
|
|
56
|
+
ConfigPriority[ConfigPriority["advanced"] = 2] = "advanced";
|
|
57
|
+
ConfigPriority[ConfigPriority["underTheHood"] = 3] = "underTheHood";
|
|
58
|
+
})(ConfigPriority || (exports.ConfigPriority = ConfigPriority = {}));
|
|
59
|
+
var ThemeModes;
|
|
60
|
+
(function (ThemeModes) {
|
|
61
|
+
ThemeModes[ThemeModes["light"] = 1] = "light";
|
|
62
|
+
ThemeModes[ThemeModes["dark"] = 2] = "dark";
|
|
63
|
+
ThemeModes[ThemeModes["auto"] = 3] = "auto";
|
|
64
|
+
})(ThemeModes || (exports.ThemeModes = ThemeModes = {}));
|
|
65
|
+
var ScrollUpModes;
|
|
66
|
+
(function (ScrollUpModes) {
|
|
67
|
+
ScrollUpModes[ScrollUpModes["never"] = 1] = "never";
|
|
68
|
+
ScrollUpModes[ScrollUpModes["mobileOnly"] = 2] = "mobileOnly";
|
|
69
|
+
ScrollUpModes[ScrollUpModes["always"] = 3] = "always";
|
|
70
|
+
})(ScrollUpModes || (exports.ScrollUpModes = ScrollUpModes = {}));
|
|
71
|
+
var ScrollLabelModes;
|
|
72
|
+
(function (ScrollLabelModes) {
|
|
73
|
+
ScrollLabelModes[ScrollLabelModes["never"] = 1] = "never";
|
|
74
|
+
ScrollLabelModes[ScrollLabelModes["date"] = 2] = "date";
|
|
75
|
+
ScrollLabelModes[ScrollLabelModes["always"] = 3] = "always";
|
|
76
|
+
})(ScrollLabelModes || (exports.ScrollLabelModes = ScrollLabelModes = {}));
|
|
77
|
+
/**
|
|
78
|
+
* Used for lightbox titles
|
|
79
|
+
*/
|
|
80
|
+
var LightBoxTitleTexts;
|
|
81
|
+
(function (LightBoxTitleTexts) {
|
|
82
|
+
LightBoxTitleTexts[LightBoxTitleTexts["NONE"] = 1] = "NONE";
|
|
83
|
+
LightBoxTitleTexts[LightBoxTitleTexts["file"] = 2] = "file";
|
|
84
|
+
LightBoxTitleTexts[LightBoxTitleTexts["resolution"] = 3] = "resolution";
|
|
85
|
+
LightBoxTitleTexts[LightBoxTitleTexts["size"] = 4] = "size";
|
|
86
|
+
LightBoxTitleTexts[LightBoxTitleTexts["caption"] = 5] = "caption";
|
|
87
|
+
LightBoxTitleTexts[LightBoxTitleTexts["title"] = 6] = "title";
|
|
88
|
+
LightBoxTitleTexts[LightBoxTitleTexts["keywords"] = 7] = "keywords";
|
|
89
|
+
LightBoxTitleTexts[LightBoxTitleTexts["persons"] = 8] = "persons";
|
|
90
|
+
LightBoxTitleTexts[LightBoxTitleTexts["location"] = 9] = "location";
|
|
91
|
+
LightBoxTitleTexts[LightBoxTitleTexts["date"] = 10] = "date";
|
|
92
|
+
LightBoxTitleTexts[LightBoxTitleTexts["camera"] = 11] = "camera";
|
|
93
|
+
LightBoxTitleTexts[LightBoxTitleTexts["lens"] = 12] = "lens";
|
|
94
|
+
LightBoxTitleTexts[LightBoxTitleTexts["iso"] = 13] = "iso";
|
|
95
|
+
LightBoxTitleTexts[LightBoxTitleTexts["fstop"] = 14] = "fstop";
|
|
96
|
+
LightBoxTitleTexts[LightBoxTitleTexts["focal_length"] = 15] = "focal_length";
|
|
97
|
+
LightBoxTitleTexts[LightBoxTitleTexts["directory"] = 16] = "directory";
|
|
98
|
+
LightBoxTitleTexts[LightBoxTitleTexts["titleOrCaption"] = 17] = "titleOrCaption";
|
|
99
|
+
LightBoxTitleTexts[LightBoxTitleTexts["titleOrDirectory"] = 18] = "titleOrDirectory";
|
|
100
|
+
LightBoxTitleTexts[LightBoxTitleTexts["titleOrCaptionOrDirectory"] = 19] = "titleOrCaptionOrDirectory";
|
|
101
|
+
})(LightBoxTitleTexts || (exports.LightBoxTitleTexts = LightBoxTitleTexts = {}));
|
|
102
|
+
var NavigationLinkTypes;
|
|
103
|
+
(function (NavigationLinkTypes) {
|
|
104
|
+
NavigationLinkTypes[NavigationLinkTypes["gallery"] = 1] = "gallery";
|
|
105
|
+
NavigationLinkTypes[NavigationLinkTypes["faces"] = 2] = "faces";
|
|
106
|
+
NavigationLinkTypes[NavigationLinkTypes["albums"] = 3] = "albums";
|
|
107
|
+
NavigationLinkTypes[NavigationLinkTypes["search"] = 4] = "search";
|
|
108
|
+
NavigationLinkTypes[NavigationLinkTypes["url"] = 5] = "url";
|
|
109
|
+
})(NavigationLinkTypes || (exports.NavigationLinkTypes = NavigationLinkTypes = {}));
|