pigallery2-extension-kit 3.1.0 → 3.5.0-dev.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/README.md +3 -106
- package/REPOSITORY.md +1 -0
- package/lib/backend/exceptions/FileAlreadyExists.d.ts +4 -0
- package/lib/backend/middlewares/UploadMWs.d.ts +4 -0
- package/lib/backend/middlewares/user/OIDCAuthService.d.ts +7 -0
- package/lib/backend/model/ObjectManagers.d.ts +6 -2
- package/lib/backend/model/UploadManager.d.ts +9 -0
- package/lib/backend/model/database/IObjectManager.d.ts +2 -2
- package/lib/backend/model/database/PersonManager.d.ts +1 -1
- package/lib/backend/model/database/ProjectedCacheManager.d.ts +1 -0
- package/lib/backend/model/database/SearchManager.d.ts +1 -1
- package/lib/backend/model/extension/ExpressRouterWrapper.d.ts +2 -2
- package/lib/backend/model/extension/IExtension.d.ts +9 -2
- package/lib/backend/model/extension/UIExtension.d.ts +2 -2
- package/lib/backend/model/fileaccess/DiskManager.d.ts +2 -1
- package/lib/backend/routes/OIDCRouter.d.ts +7 -0
- package/lib/backend/routes/UploadRouter.d.ts +5 -0
- package/lib/common/DataStructureVersion.d.ts +1 -1
- package/lib/common/PG2ConfMap.d.ts +1 -0
- package/lib/common/QueryParams.d.ts +10 -1
- package/lib/common/SearchQueryParser.d.ts +11 -10
- package/lib/common/SearchQueryUtils.d.ts +13 -2
- package/lib/common/Utils.d.ts +7 -5
- package/lib/common/Utils.js +55 -19
- package/lib/common/config/private/PrivateConfig.d.ts +16 -1
- package/lib/common/config/private/PrivateConfig.js +161 -5
- package/lib/common/config/public/ClientConfig.d.ts +22 -1
- package/lib/common/config/public/ClientConfig.js +145 -5
- package/lib/common/entities/AutoCompleteItem.d.ts +3 -3
- package/lib/common/entities/AutoCompleteItem.js +3 -3
- package/lib/common/entities/Error.d.ts +2 -1
- package/lib/common/entities/Error.js +1 -0
- package/lib/common/entities/SearchQueryDTO.d.ts +24 -41
- package/lib/common/entities/SearchQueryDTO.js +10 -19
- package/lib/common/entities/SortingMethods.d.ts +8 -0
- package/lib/common/entities/SortingMethods.js +10 -1
- package/lib/frontend/app/model/network/network.service.d.ts +4 -1
- package/lib/frontend/app/model/page.helper.d.ts +3 -2
- package/lib/frontend/app/model/query.service.d.ts +1 -0
- package/lib/frontend/app/ui/faces/faces.component.d.ts +1 -1
- package/lib/frontend/app/ui/faces/faces.service.d.ts +4 -0
- package/lib/frontend/app/ui/faces/navigator/navigator.faces.component.d.ts +15 -0
- package/lib/frontend/app/ui/frame/frame.component.d.ts +5 -2
- package/lib/frontend/app/ui/gallery/blog/blog.service.d.ts +1 -0
- package/lib/frontend/app/ui/gallery/contentLoader.service.d.ts +2 -1
- package/lib/frontend/app/ui/gallery/gallery.component.d.ts +12 -4
- package/lib/frontend/app/ui/gallery/grid/grid.gallery.component.d.ts +3 -1
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.component.d.ts +2 -1
- package/lib/frontend/app/ui/gallery/grid/photo/media-button-modal/media-button-modal.service.d.ts +4 -1
- package/lib/frontend/app/ui/gallery/lightbox/controls/controls.lightbox.gallery.component.d.ts +0 -1
- package/lib/frontend/app/ui/gallery/lightbox/lightbox.service.d.ts +18 -0
- package/lib/frontend/app/ui/gallery/lightbox/media/media.lightbox.gallery.component.d.ts +5 -2
- package/lib/frontend/app/ui/gallery/map/lightbox/lightbox.map.gallery.component.d.ts +18 -12
- package/lib/frontend/app/ui/gallery/map/map.gallery.component.d.ts +5 -1
- package/lib/frontend/app/ui/gallery/overlay.service.d.ts +2 -2
- package/lib/frontend/app/ui/gallery/photo-frame-builder/photo-frame-builder.gallery.component.d.ts +9 -0
- package/lib/frontend/app/ui/gallery/search/autocomplete.service.d.ts +1 -1
- package/lib/frontend/app/ui/gallery/search/query-enrty/query-entry.search.gallery.component.d.ts +2 -1
- package/lib/frontend/app/ui/gallery/search/search-query-parser.service.d.ts +0 -2
- package/lib/frontend/app/ui/gallery/thumbnailManager.service.d.ts +1 -1
- package/lib/frontend/app/ui/gallery/uploader/uploader.gallery.component.d.ts +15 -0
- package/lib/frontend/app/ui/gallery/uploader/uploader.service.d.ts +36 -0
- package/lib/frontend/app/ui/login/login.component.d.ts +3 -0
- package/lib/frontend/app/ui/settings/template/template.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ServerConfig = exports.ServerEnvironmentConfig = exports.ServerServiceConfig = exports.ServerMediaConfig = exports.ServerAlbumCoverConfig = exports.ServerVideoConfig = exports.VideoTranscodingConfig = exports.ServerJobConfig = exports.JobScheduleConfig = exports.AfterJobTriggerConfig = exports.PeriodicJobTriggerConfig = exports.ScheduledJobTriggerConfig = exports.NeverJobTriggerConfig = exports.JobTriggerConfigBase = exports.ServerLogConfig = exports.ServerDuplicatesConfig = exports.ServerIndexingConfig = exports.ServerSharingConfig = exports.ServerMetaFileConfig = exports.ServerGPXCompressingConfig = exports.ServerPhotoConfig = exports.ServerUserConfig = exports.ServerDataBaseConfig = exports.UserConfig = exports.SQLiteConfig = exports.MySQLConfig = exports.FFmpegPresets = exports.ReIndexingSensitivity = exports.SQLLogLevel = exports.LogLevel = exports.DatabaseType = void 0;
|
|
3
|
+
exports.ServerConfig = exports.ServerUploadConfig = exports.ServerEnvironmentConfig = exports.ServerServiceConfig = exports.ServerMediaConfig = exports.ServerAlbumCoverConfig = exports.ServerVideoConfig = exports.VideoTranscodingConfig = exports.ServerJobConfig = exports.JobScheduleConfig = exports.AfterJobTriggerConfig = exports.PeriodicJobTriggerConfig = exports.ScheduledJobTriggerConfig = exports.NeverJobTriggerConfig = exports.JobTriggerConfigBase = exports.ServerLogConfig = exports.ServerDuplicatesConfig = exports.ServerIndexingConfig = exports.ServerSharingConfig = exports.ServerMetaFileConfig = exports.ServerGPXCompressingConfig = exports.ServerPhotoConfig = exports.ServerUserConfig = exports.ServerUserOIDCConfig = exports.ServerDataBaseConfig = exports.UserConfig = exports.SQLiteConfig = exports.MySQLConfig = exports.FFmpegPresets = exports.ReIndexingSensitivity = exports.SQLLogLevel = exports.LogLevel = exports.DatabaseType = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
|
6
6
|
require("reflect-metadata");
|
|
@@ -273,19 +273,146 @@ tslib_1.__decorate([
|
|
|
273
273
|
exports.ServerDataBaseConfig = ServerDataBaseConfig = tslib_1.__decorate([
|
|
274
274
|
(0, common_1.SubConfigClass)({ softReadonly: true })
|
|
275
275
|
], ServerDataBaseConfig);
|
|
276
|
+
let ServerUserOIDCConfig = class ServerUserOIDCConfig extends ClientConfig_1.ClientUserOIDCConfig {
|
|
277
|
+
constructor() {
|
|
278
|
+
super(...arguments);
|
|
279
|
+
this.issuerUrl = '';
|
|
280
|
+
this.clientId = '';
|
|
281
|
+
this.clientSecret = '';
|
|
282
|
+
this.redirectUri = '';
|
|
283
|
+
this.scopes = ['openid', 'profile', 'email'];
|
|
284
|
+
this.usernameClaim = 'preferred_username';
|
|
285
|
+
this.emailClaim = 'email';
|
|
286
|
+
this.allowedDomains = [];
|
|
287
|
+
this.autoCreateUser = false;
|
|
288
|
+
}
|
|
289
|
+
};
|
|
290
|
+
exports.ServerUserOIDCConfig = ServerUserOIDCConfig;
|
|
291
|
+
tslib_1.__decorate([
|
|
292
|
+
(0, common_1.ConfigProperty)({
|
|
293
|
+
tags: {
|
|
294
|
+
name: $localize `Issuer URL`,
|
|
295
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
296
|
+
uiResetNeeded: { server: true },
|
|
297
|
+
uiOptional: true,
|
|
298
|
+
relevant: (c) => c.enabled,
|
|
299
|
+
hint: 'https://auth.example.com/application/o/pigallery2/'
|
|
300
|
+
},
|
|
301
|
+
description: $localize `OIDC provider Issuer URL`
|
|
302
|
+
}),
|
|
303
|
+
tslib_1.__metadata("design:type", String)
|
|
304
|
+
], ServerUserOIDCConfig.prototype, "issuerUrl", void 0);
|
|
305
|
+
tslib_1.__decorate([
|
|
306
|
+
(0, common_1.ConfigProperty)({
|
|
307
|
+
tags: {
|
|
308
|
+
name: $localize `Client ID`,
|
|
309
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
310
|
+
uiOptional: true,
|
|
311
|
+
relevant: (c) => c.enabled,
|
|
312
|
+
uiResetNeeded: { server: true }
|
|
313
|
+
}
|
|
314
|
+
}),
|
|
315
|
+
tslib_1.__metadata("design:type", String)
|
|
316
|
+
], ServerUserOIDCConfig.prototype, "clientId", void 0);
|
|
317
|
+
tslib_1.__decorate([
|
|
318
|
+
(0, common_1.ConfigProperty)({
|
|
319
|
+
type: 'password',
|
|
320
|
+
tags: {
|
|
321
|
+
name: $localize `Client secret`,
|
|
322
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
323
|
+
uiOptional: true,
|
|
324
|
+
relevant: (c) => c.enabled,
|
|
325
|
+
uiResetNeeded: { server: true }
|
|
326
|
+
}
|
|
327
|
+
}),
|
|
328
|
+
tslib_1.__metadata("design:type", String)
|
|
329
|
+
], ServerUserOIDCConfig.prototype, "clientSecret", void 0);
|
|
330
|
+
tslib_1.__decorate([
|
|
331
|
+
(0, common_1.ConfigProperty)({
|
|
332
|
+
tags: {
|
|
333
|
+
name: $localize `Redirect URI`, priority: ClientConfig_1.ConfigPriority.advanced,
|
|
334
|
+
hint: 'https://example.com/pgapi/auth/oidc/callback',
|
|
335
|
+
uiOptional: true,
|
|
336
|
+
relevant: (c) => c.enabled,
|
|
337
|
+
uiResetNeeded: { server: true }
|
|
338
|
+
},
|
|
339
|
+
description: $localize `Full callback URL registered at the provider (e.g.: https://example.com/pgapi/auth/oidc/callback)`
|
|
340
|
+
}),
|
|
341
|
+
tslib_1.__metadata("design:type", String)
|
|
342
|
+
], ServerUserOIDCConfig.prototype, "redirectUri", void 0);
|
|
343
|
+
tslib_1.__decorate([
|
|
344
|
+
(0, common_1.ConfigProperty)({
|
|
345
|
+
arrayType: 'string',
|
|
346
|
+
tags: {
|
|
347
|
+
name: $localize `Scopes`,
|
|
348
|
+
relevant: (c) => c.enabled,
|
|
349
|
+
priority: ClientConfig_1.ConfigPriority.advanced
|
|
350
|
+
}
|
|
351
|
+
}),
|
|
352
|
+
tslib_1.__metadata("design:type", Array)
|
|
353
|
+
], ServerUserOIDCConfig.prototype, "scopes", void 0);
|
|
354
|
+
tslib_1.__decorate([
|
|
355
|
+
(0, common_1.ConfigProperty)({
|
|
356
|
+
tags: {
|
|
357
|
+
name: $localize `Username claim`,
|
|
358
|
+
relevant: (c) => c.enabled,
|
|
359
|
+
priority: ClientConfig_1.ConfigPriority.advanced
|
|
360
|
+
},
|
|
361
|
+
description: $localize `JWT claim to use for matching user name. Defaults to preferred_username; fallbacks to email if empty.`
|
|
362
|
+
}),
|
|
363
|
+
tslib_1.__metadata("design:type", String)
|
|
364
|
+
], ServerUserOIDCConfig.prototype, "usernameClaim", void 0);
|
|
365
|
+
tslib_1.__decorate([
|
|
366
|
+
(0, common_1.ConfigProperty)({
|
|
367
|
+
tags: {
|
|
368
|
+
name: $localize `Email claim`,
|
|
369
|
+
relevant: (c) => c.enabled,
|
|
370
|
+
priority: ClientConfig_1.ConfigPriority.advanced
|
|
371
|
+
}
|
|
372
|
+
}),
|
|
373
|
+
tslib_1.__metadata("design:type", String)
|
|
374
|
+
], ServerUserOIDCConfig.prototype, "emailClaim", void 0);
|
|
375
|
+
tslib_1.__decorate([
|
|
376
|
+
(0, common_1.ConfigProperty)({
|
|
377
|
+
arrayType: 'string',
|
|
378
|
+
tags: {
|
|
379
|
+
name: $localize `Allowed email domains`,
|
|
380
|
+
uiOptional: true,
|
|
381
|
+
relevant: (c) => c.enabled,
|
|
382
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
383
|
+
},
|
|
384
|
+
description: $localize `If set, only identities with emails in these domains will be accepted.`
|
|
385
|
+
}),
|
|
386
|
+
tslib_1.__metadata("design:type", Array)
|
|
387
|
+
], ServerUserOIDCConfig.prototype, "allowedDomains", void 0);
|
|
388
|
+
tslib_1.__decorate([
|
|
389
|
+
(0, common_1.ConfigProperty)({
|
|
390
|
+
tags: {
|
|
391
|
+
name: $localize `Auto-create users`,
|
|
392
|
+
relevant: (c) => c.enabled,
|
|
393
|
+
priority: ClientConfig_1.ConfigPriority.advanced
|
|
394
|
+
},
|
|
395
|
+
description: $localize `If enabled, unknown users will be created with Guest role on first login. If disabled, only existing app users can log in.`
|
|
396
|
+
}),
|
|
397
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
398
|
+
], ServerUserOIDCConfig.prototype, "autoCreateUser", void 0);
|
|
399
|
+
exports.ServerUserOIDCConfig = ServerUserOIDCConfig = tslib_1.__decorate([
|
|
400
|
+
(0, common_1.SubConfigClass)({ softReadonly: true })
|
|
401
|
+
], ServerUserOIDCConfig);
|
|
276
402
|
let ServerUserConfig = class ServerUserConfig extends ClientConfig_1.ClientUserConfig {
|
|
277
403
|
constructor() {
|
|
278
404
|
super(...arguments);
|
|
279
405
|
this.enforcedUsers = [];
|
|
280
406
|
this.allowQuery = {
|
|
281
407
|
type: SearchQueryDTO_1.SearchQueryTypes.any_text,
|
|
282
|
-
|
|
408
|
+
value: '',
|
|
283
409
|
};
|
|
284
410
|
this.blockQuery = {
|
|
285
411
|
type: SearchQueryDTO_1.SearchQueryTypes.any_text,
|
|
286
|
-
|
|
412
|
+
value: '',
|
|
287
413
|
};
|
|
288
414
|
this.suppressDefUserWarn = false;
|
|
415
|
+
this.oidc = new ServerUserOIDCConfig();
|
|
289
416
|
}
|
|
290
417
|
};
|
|
291
418
|
exports.ServerUserConfig = ServerUserConfig;
|
|
@@ -339,6 +466,19 @@ tslib_1.__decorate([
|
|
|
339
466
|
}),
|
|
340
467
|
tslib_1.__metadata("design:type", Boolean)
|
|
341
468
|
], ServerUserConfig.prototype, "suppressDefUserWarn", void 0);
|
|
469
|
+
tslib_1.__decorate([
|
|
470
|
+
(0, common_1.ConfigProperty)({
|
|
471
|
+
tags: {
|
|
472
|
+
name: $localize `OpenID Connect`,
|
|
473
|
+
priority: ClientConfig_1.ConfigPriority.advanced,
|
|
474
|
+
uiResetNeeded: { server: true },
|
|
475
|
+
uiIcon: 'ionFingerPrint',
|
|
476
|
+
githubIssue: 1096
|
|
477
|
+
},
|
|
478
|
+
description: $localize `Setup SSO with external authentication apps like Authentik or Authelia`,
|
|
479
|
+
}),
|
|
480
|
+
tslib_1.__metadata("design:type", ServerUserOIDCConfig)
|
|
481
|
+
], ServerUserConfig.prototype, "oidc", void 0);
|
|
342
482
|
exports.ServerUserConfig = ServerUserConfig = tslib_1.__decorate([
|
|
343
483
|
(0, common_1.SubConfigClass)({ softReadonly: true })
|
|
344
484
|
], ServerUserConfig);
|
|
@@ -1037,7 +1177,7 @@ let ServerAlbumCoverConfig = class ServerAlbumCoverConfig {
|
|
|
1037
1177
|
constructor() {
|
|
1038
1178
|
this.SearchQuery = {
|
|
1039
1179
|
type: SearchQueryDTO_1.SearchQueryTypes.any_text,
|
|
1040
|
-
|
|
1180
|
+
value: '',
|
|
1041
1181
|
};
|
|
1042
1182
|
this.Sorting = [
|
|
1043
1183
|
new ClientConfig_1.ClientSortingConfig(SortingMethods_1.SortByTypes.Rating, false),
|
|
@@ -1255,6 +1395,12 @@ tslib_1.__decorate([
|
|
|
1255
1395
|
exports.ServerEnvironmentConfig = ServerEnvironmentConfig = tslib_1.__decorate([
|
|
1256
1396
|
(0, common_1.SubConfigClass)({ softReadonly: true })
|
|
1257
1397
|
], ServerEnvironmentConfig);
|
|
1398
|
+
let ServerUploadConfig = class ServerUploadConfig extends ClientConfig_1.ClientUploadConfig {
|
|
1399
|
+
};
|
|
1400
|
+
exports.ServerUploadConfig = ServerUploadConfig;
|
|
1401
|
+
exports.ServerUploadConfig = ServerUploadConfig = tslib_1.__decorate([
|
|
1402
|
+
(0, common_1.SubConfigClass)({ softReadonly: true })
|
|
1403
|
+
], ServerUploadConfig);
|
|
1258
1404
|
let ServerConfig = class ServerConfig extends ClientConfig_1.ClientConfig {
|
|
1259
1405
|
constructor() {
|
|
1260
1406
|
super(...arguments);
|
|
@@ -1270,6 +1416,7 @@ let ServerConfig = class ServerConfig extends ClientConfig_1.ClientConfig {
|
|
|
1270
1416
|
this.Duplicates = new ServerDuplicatesConfig();
|
|
1271
1417
|
this.Messaging = new MessagingConfig_1.MessagingConfig();
|
|
1272
1418
|
this.Extensions = new ServerExtensionsConfig_1.ServerExtensionsConfig();
|
|
1419
|
+
this.Upload = new ServerUploadConfig();
|
|
1273
1420
|
this.Jobs = new ServerJobConfig();
|
|
1274
1421
|
}
|
|
1275
1422
|
};
|
|
@@ -1394,10 +1541,19 @@ tslib_1.__decorate([
|
|
|
1394
1541
|
tags: {
|
|
1395
1542
|
name: $localize `Extensions`,
|
|
1396
1543
|
uiIcon: 'ionExtensionPuzzleOutline'
|
|
1397
|
-
}
|
|
1544
|
+
}
|
|
1398
1545
|
}),
|
|
1399
1546
|
tslib_1.__metadata("design:type", ServerExtensionsConfig_1.ServerExtensionsConfig)
|
|
1400
1547
|
], ServerConfig.prototype, "Extensions", void 0);
|
|
1548
|
+
tslib_1.__decorate([
|
|
1549
|
+
(0, common_1.ConfigProperty)({
|
|
1550
|
+
tags: {
|
|
1551
|
+
name: $localize `Upload`,
|
|
1552
|
+
uiIcon: 'ionCloudUploadOutline'
|
|
1553
|
+
}
|
|
1554
|
+
}),
|
|
1555
|
+
tslib_1.__metadata("design:type", ServerUploadConfig)
|
|
1556
|
+
], ServerConfig.prototype, "Upload", void 0);
|
|
1401
1557
|
tslib_1.__decorate([
|
|
1402
1558
|
(0, common_1.ConfigProperty)({
|
|
1403
1559
|
tags: {
|
|
@@ -41,7 +41,11 @@ export declare enum LightBoxTitleTexts {
|
|
|
41
41
|
lens = 12,
|
|
42
42
|
iso = 13,
|
|
43
43
|
fstop = 14,
|
|
44
|
-
focal_length = 15
|
|
44
|
+
focal_length = 15,
|
|
45
|
+
directory = 16,
|
|
46
|
+
titleOrCaption = 17,
|
|
47
|
+
titleOrDirectory = 18,
|
|
48
|
+
titleOrCaptionOrDirectory = 19
|
|
45
49
|
}
|
|
46
50
|
export type TAGS = {
|
|
47
51
|
client?: true;
|
|
@@ -161,6 +165,11 @@ export declare class ClientSortingConfig implements SortingMethod {
|
|
|
161
165
|
ascending: boolean;
|
|
162
166
|
constructor(method?: number, ascending?: boolean);
|
|
163
167
|
}
|
|
168
|
+
export declare class ClientFaceSortingConfig implements SortingMethod {
|
|
169
|
+
method: number;
|
|
170
|
+
ascending: boolean;
|
|
171
|
+
constructor(method?: number, ascending?: boolean);
|
|
172
|
+
}
|
|
164
173
|
export declare class ClientGroupingConfig implements GroupingMethod {
|
|
165
174
|
method: number;
|
|
166
175
|
ascending: boolean;
|
|
@@ -270,6 +279,7 @@ export declare class ClientMetaFileConfig {
|
|
|
270
279
|
}
|
|
271
280
|
export declare class ClientFacesConfig {
|
|
272
281
|
enabled: boolean;
|
|
282
|
+
sorting: ClientFaceSortingConfig;
|
|
273
283
|
keywordsToPersons: boolean;
|
|
274
284
|
writeAccessMinRole: UserRoles;
|
|
275
285
|
readAccessMinRole: UserRoles;
|
|
@@ -284,13 +294,23 @@ export declare class ClientServiceConfig {
|
|
|
284
294
|
svgIcon: SVGIconConfig;
|
|
285
295
|
reloadClientOnServerUpdate: boolean;
|
|
286
296
|
}
|
|
297
|
+
export declare class ClientUserOIDCConfig {
|
|
298
|
+
enabled: boolean;
|
|
299
|
+
displayName: string;
|
|
300
|
+
}
|
|
287
301
|
export declare class ClientUserConfig {
|
|
288
302
|
authenticationRequired: boolean;
|
|
289
303
|
unAuthenticatedUserRole: UserRoles;
|
|
304
|
+
oidc: ClientUserOIDCConfig;
|
|
290
305
|
}
|
|
291
306
|
export declare class ClientExtensionsConfig {
|
|
292
307
|
enabled: boolean;
|
|
293
308
|
}
|
|
309
|
+
export declare class ClientUploadConfig {
|
|
310
|
+
enabled: boolean;
|
|
311
|
+
minimumRole: UserRoles;
|
|
312
|
+
enforcedDirectoryConfig: boolean;
|
|
313
|
+
}
|
|
294
314
|
export declare class ClientConfig {
|
|
295
315
|
Server: ClientServiceConfig;
|
|
296
316
|
Users: ClientUserConfig;
|
|
@@ -304,4 +324,5 @@ export declare class ClientConfig {
|
|
|
304
324
|
Faces: ClientFacesConfig;
|
|
305
325
|
RandomPhoto: ClientRandomPhotoConfig;
|
|
306
326
|
Extensions: ClientExtensionsConfig;
|
|
327
|
+
Upload: ClientUploadConfig;
|
|
307
328
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ClientConfig = exports.ClientExtensionsConfig = exports.ClientUserConfig = exports.ClientServiceConfig = exports.ClientFacesConfig = exports.ClientMetaFileConfig = exports.ClientMediaConfig = exports.ClientGPXCompressingConfig = exports.ClientPhotoConfig = exports.ClientVideoConfig = exports.ClientGalleryConfig = exports.ThemesConfig = exports.ThemeConfig = exports.ClientLightboxConfig = exports.AutoUpdateConfig = exports.ClientLightboxTitleConfig = exports.NavBarConfig = exports.NavBarSortingAndGroupingConfig = exports.ClientGroupingConfig = exports.ClientSortingConfig = exports.NavigationLinkConfig = exports.NavigationLinkTypes = exports.ClientMapConfig = exports.MapPathGroupConfig = exports.MapPathGroupThemeConfig = exports.PathThemeConfig = exports.SVGIconConfig = exports.MapLayers = exports.ClientRandomPhotoConfig = exports.ClientSharingConfig = exports.ClientAlbumConfig = exports.ClientSearchConfig = exports.AutoCompleteConfig = exports.AutoCompleteItemsPerCategoryConfig = exports.LightBoxTitleTexts = exports.ScrollUpModes = exports.ThemeModes = exports.ConfigPriority = exports.MapProviders = void 0;
|
|
3
|
+
exports.ClientConfig = exports.ClientUploadConfig = exports.ClientExtensionsConfig = exports.ClientUserConfig = exports.ClientUserOIDCConfig = exports.ClientServiceConfig = exports.ClientFacesConfig = exports.ClientMetaFileConfig = exports.ClientMediaConfig = exports.ClientGPXCompressingConfig = exports.ClientPhotoConfig = exports.ClientVideoConfig = exports.ClientGalleryConfig = exports.ThemesConfig = exports.ThemeConfig = exports.ClientLightboxConfig = exports.AutoUpdateConfig = exports.ClientLightboxTitleConfig = exports.NavBarConfig = exports.NavBarSortingAndGroupingConfig = exports.ClientGroupingConfig = exports.ClientFaceSortingConfig = exports.ClientSortingConfig = exports.NavigationLinkConfig = exports.NavigationLinkTypes = exports.ClientMapConfig = exports.MapPathGroupConfig = exports.MapPathGroupThemeConfig = exports.PathThemeConfig = exports.SVGIconConfig = exports.MapLayers = exports.ClientRandomPhotoConfig = exports.ClientSharingConfig = exports.ClientAlbumConfig = exports.ClientSearchConfig = exports.AutoCompleteConfig = exports.AutoCompleteItemsPerCategoryConfig = exports.LightBoxTitleTexts = exports.ScrollUpModes = exports.ThemeModes = exports.ConfigPriority = exports.MapProviders = void 0;
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
/* eslint-disable @typescript-eslint/no-inferrable-types */
|
|
6
6
|
require("reflect-metadata");
|
|
@@ -58,6 +58,10 @@ var LightBoxTitleTexts;
|
|
|
58
58
|
LightBoxTitleTexts[LightBoxTitleTexts["iso"] = 13] = "iso";
|
|
59
59
|
LightBoxTitleTexts[LightBoxTitleTexts["fstop"] = 14] = "fstop";
|
|
60
60
|
LightBoxTitleTexts[LightBoxTitleTexts["focal_length"] = 15] = "focal_length";
|
|
61
|
+
LightBoxTitleTexts[LightBoxTitleTexts["directory"] = 16] = "directory";
|
|
62
|
+
LightBoxTitleTexts[LightBoxTitleTexts["titleOrCaption"] = 17] = "titleOrCaption";
|
|
63
|
+
LightBoxTitleTexts[LightBoxTitleTexts["titleOrDirectory"] = 18] = "titleOrDirectory";
|
|
64
|
+
LightBoxTitleTexts[LightBoxTitleTexts["titleOrCaptionOrDirectory"] = 19] = "titleOrCaptionOrDirectory";
|
|
61
65
|
})(LightBoxTitleTexts || (exports.LightBoxTitleTexts = LightBoxTitleTexts = {}));
|
|
62
66
|
let AutoCompleteItemsPerCategoryConfig = class AutoCompleteItemsPerCategoryConfig {
|
|
63
67
|
constructor() {
|
|
@@ -392,7 +396,7 @@ tslib_1.__decorate([
|
|
|
392
396
|
(0, common_1.ConfigProperty)({
|
|
393
397
|
tags: {
|
|
394
398
|
priority: ConfigPriority.advanced,
|
|
395
|
-
hint: '
|
|
399
|
+
hint: 'https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png'
|
|
396
400
|
},
|
|
397
401
|
description: $localize `Url of a map layer.`,
|
|
398
402
|
}),
|
|
@@ -767,6 +771,36 @@ exports.ClientSortingConfig = ClientSortingConfig = tslib_1.__decorate([
|
|
|
767
771
|
(0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true }),
|
|
768
772
|
tslib_1.__metadata("design:paramtypes", [Number, Boolean])
|
|
769
773
|
], ClientSortingConfig);
|
|
774
|
+
let ClientFaceSortingConfig = class ClientFaceSortingConfig {
|
|
775
|
+
constructor(method = SortingMethods_1.FaceSortByTypes.PersonCount, ascending = true) {
|
|
776
|
+
this.method = SortingMethods_1.FaceSortByTypes.PersonCount;
|
|
777
|
+
this.ascending = true;
|
|
778
|
+
this.method = method;
|
|
779
|
+
this.ascending = ascending;
|
|
780
|
+
}
|
|
781
|
+
};
|
|
782
|
+
exports.ClientFaceSortingConfig = ClientFaceSortingConfig;
|
|
783
|
+
tslib_1.__decorate([
|
|
784
|
+
(0, common_1.ConfigProperty)({
|
|
785
|
+
type: SortingMethods_1.FaceSortByTypes,
|
|
786
|
+
tags: {
|
|
787
|
+
name: $localize `Method`,
|
|
788
|
+
},
|
|
789
|
+
}),
|
|
790
|
+
tslib_1.__metadata("design:type", Number)
|
|
791
|
+
], ClientFaceSortingConfig.prototype, "method", void 0);
|
|
792
|
+
tslib_1.__decorate([
|
|
793
|
+
(0, common_1.ConfigProperty)({
|
|
794
|
+
tags: {
|
|
795
|
+
name: $localize `Ascending`,
|
|
796
|
+
},
|
|
797
|
+
}),
|
|
798
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
799
|
+
], ClientFaceSortingConfig.prototype, "ascending", void 0);
|
|
800
|
+
exports.ClientFaceSortingConfig = ClientFaceSortingConfig = tslib_1.__decorate([
|
|
801
|
+
(0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true }),
|
|
802
|
+
tslib_1.__metadata("design:paramtypes", [Number, Boolean])
|
|
803
|
+
], ClientFaceSortingConfig);
|
|
770
804
|
let ClientGroupingConfig = class ClientGroupingConfig {
|
|
771
805
|
constructor(method = SortingMethods_1.GroupByTypes.Date, ascending = true) {
|
|
772
806
|
this.method = SortingMethods_1.GroupByTypes.Date;
|
|
@@ -1246,11 +1280,11 @@ tslib_1.__decorate([
|
|
|
1246
1280
|
(0, common_1.ConfigProperty)({
|
|
1247
1281
|
arrayType: ThemeConfig,
|
|
1248
1282
|
tags: {
|
|
1249
|
-
name: $localize `Selected theme
|
|
1283
|
+
name: $localize `Selected theme CSS`, //this is a 'hack' to the UI settings. UI will only show the selected setting's CSS
|
|
1250
1284
|
uiDisabled: (sb) => !sb.enabled,
|
|
1251
1285
|
relevant: (c) => c.selectedTheme !== 'default',
|
|
1252
1286
|
},
|
|
1253
|
-
description: $localize `Adds these
|
|
1287
|
+
description: $localize `Adds these CSS settings as it is to the end of the body tag of the page.`
|
|
1254
1288
|
}),
|
|
1255
1289
|
tslib_1.__metadata("design:type", Array)
|
|
1256
1290
|
], ThemesConfig.prototype, "availableThemes", void 0);
|
|
@@ -1668,6 +1702,7 @@ exports.ClientMetaFileConfig = ClientMetaFileConfig = tslib_1.__decorate([
|
|
|
1668
1702
|
let ClientFacesConfig = class ClientFacesConfig {
|
|
1669
1703
|
constructor() {
|
|
1670
1704
|
this.enabled = true;
|
|
1705
|
+
this.sorting = new ClientFaceSortingConfig();
|
|
1671
1706
|
this.keywordsToPersons = true;
|
|
1672
1707
|
this.writeAccessMinRole = UserDTO_1.UserRoles.Admin;
|
|
1673
1708
|
this.readAccessMinRole = UserDTO_1.UserRoles.User;
|
|
@@ -1684,6 +1719,16 @@ tslib_1.__decorate([
|
|
|
1684
1719
|
}),
|
|
1685
1720
|
tslib_1.__metadata("design:type", Boolean)
|
|
1686
1721
|
], ClientFacesConfig.prototype, "enabled", void 0);
|
|
1722
|
+
tslib_1.__decorate([
|
|
1723
|
+
(0, common_1.ConfigProperty)({
|
|
1724
|
+
tags: {
|
|
1725
|
+
name: $localize `Default sorting`,
|
|
1726
|
+
priority: ConfigPriority.advanced,
|
|
1727
|
+
},
|
|
1728
|
+
description: $localize `Default sorting on the faces page`
|
|
1729
|
+
}),
|
|
1730
|
+
tslib_1.__metadata("design:type", ClientFaceSortingConfig)
|
|
1731
|
+
], ClientFacesConfig.prototype, "sorting", void 0);
|
|
1687
1732
|
tslib_1.__decorate([
|
|
1688
1733
|
(0, common_1.ConfigProperty)({
|
|
1689
1734
|
tags: {
|
|
@@ -1751,7 +1796,7 @@ tslib_1.__decorate([
|
|
|
1751
1796
|
], ClientServiceConfig.prototype, "publicUrl", void 0);
|
|
1752
1797
|
tslib_1.__decorate([
|
|
1753
1798
|
(0, common_1.ConfigProperty)({
|
|
1754
|
-
description: $localize `If you access the gallery under a sub url (like:
|
|
1799
|
+
description: $localize `If you access the gallery under a sub url (like: https://mydomain.com/myGallery), set it here. If it is not working you might miss the '/' from the beginning of the url.`,
|
|
1755
1800
|
tags: {
|
|
1756
1801
|
name: $localize `Url Base`,
|
|
1757
1802
|
hint: '/myGallery',
|
|
@@ -1820,10 +1865,44 @@ tslib_1.__decorate([
|
|
|
1820
1865
|
exports.ClientServiceConfig = ClientServiceConfig = tslib_1.__decorate([
|
|
1821
1866
|
(0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
|
|
1822
1867
|
], ClientServiceConfig);
|
|
1868
|
+
let ClientUserOIDCConfig = class ClientUserOIDCConfig {
|
|
1869
|
+
constructor() {
|
|
1870
|
+
this.enabled = false;
|
|
1871
|
+
this.displayName = '';
|
|
1872
|
+
}
|
|
1873
|
+
};
|
|
1874
|
+
exports.ClientUserOIDCConfig = ClientUserOIDCConfig;
|
|
1875
|
+
tslib_1.__decorate([
|
|
1876
|
+
(0, common_1.ConfigProperty)({
|
|
1877
|
+
tags: {
|
|
1878
|
+
name: $localize `Enabled`,
|
|
1879
|
+
priority: ConfigPriority.advanced,
|
|
1880
|
+
uiResetNeeded: { server: true },
|
|
1881
|
+
}
|
|
1882
|
+
}),
|
|
1883
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
1884
|
+
], ClientUserOIDCConfig.prototype, "enabled", void 0);
|
|
1885
|
+
tslib_1.__decorate([
|
|
1886
|
+
(0, common_1.ConfigProperty)({
|
|
1887
|
+
tags: {
|
|
1888
|
+
name: $localize `Display name`,
|
|
1889
|
+
priority: ConfigPriority.advanced,
|
|
1890
|
+
uiOptional: true,
|
|
1891
|
+
relevant: (c) => c.enabled,
|
|
1892
|
+
hint: 'Authentik'
|
|
1893
|
+
},
|
|
1894
|
+
description: $localize `Shown on the login button (client-visible).`
|
|
1895
|
+
}),
|
|
1896
|
+
tslib_1.__metadata("design:type", String)
|
|
1897
|
+
], ClientUserOIDCConfig.prototype, "displayName", void 0);
|
|
1898
|
+
exports.ClientUserOIDCConfig = ClientUserOIDCConfig = tslib_1.__decorate([
|
|
1899
|
+
(0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
|
|
1900
|
+
], ClientUserOIDCConfig);
|
|
1823
1901
|
let ClientUserConfig = class ClientUserConfig {
|
|
1824
1902
|
constructor() {
|
|
1825
1903
|
this.authenticationRequired = true;
|
|
1826
1904
|
this.unAuthenticatedUserRole = UserDTO_1.UserRoles.Admin;
|
|
1905
|
+
this.oidc = new ClientUserOIDCConfig();
|
|
1827
1906
|
}
|
|
1828
1907
|
};
|
|
1829
1908
|
exports.ClientUserConfig = ClientUserConfig;
|
|
@@ -1854,6 +1933,19 @@ tslib_1.__decorate([
|
|
|
1854
1933
|
}),
|
|
1855
1934
|
tslib_1.__metadata("design:type", Number)
|
|
1856
1935
|
], ClientUserConfig.prototype, "unAuthenticatedUserRole", void 0);
|
|
1936
|
+
tslib_1.__decorate([
|
|
1937
|
+
(0, common_1.ConfigProperty)({
|
|
1938
|
+
tags: {
|
|
1939
|
+
name: $localize `OpenID Connect`,
|
|
1940
|
+
priority: ConfigPriority.advanced,
|
|
1941
|
+
uiResetNeeded: { server: true },
|
|
1942
|
+
uiIcon: 'ionFingerPrint',
|
|
1943
|
+
githubIssue: 1096
|
|
1944
|
+
},
|
|
1945
|
+
description: $localize `Setup SSO with external authentication apps like Authentik or Authelia`,
|
|
1946
|
+
}),
|
|
1947
|
+
tslib_1.__metadata("design:type", ClientUserOIDCConfig)
|
|
1948
|
+
], ClientUserConfig.prototype, "oidc", void 0);
|
|
1857
1949
|
exports.ClientUserConfig = ClientUserConfig = tslib_1.__decorate([
|
|
1858
1950
|
(0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
|
|
1859
1951
|
], ClientUserConfig);
|
|
@@ -1875,6 +1967,44 @@ tslib_1.__decorate([
|
|
|
1875
1967
|
exports.ClientExtensionsConfig = ClientExtensionsConfig = tslib_1.__decorate([
|
|
1876
1968
|
(0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
|
|
1877
1969
|
], ClientExtensionsConfig);
|
|
1970
|
+
let ClientUploadConfig = class ClientUploadConfig {
|
|
1971
|
+
constructor() {
|
|
1972
|
+
this.enabled = false;
|
|
1973
|
+
this.minimumRole = UserDTO_1.UserRoles.Admin;
|
|
1974
|
+
this.enforcedDirectoryConfig = false;
|
|
1975
|
+
}
|
|
1976
|
+
};
|
|
1977
|
+
exports.ClientUploadConfig = ClientUploadConfig;
|
|
1978
|
+
tslib_1.__decorate([
|
|
1979
|
+
(0, common_1.ConfigProperty)({
|
|
1980
|
+
tags: {
|
|
1981
|
+
name: $localize `Enabled`,
|
|
1982
|
+
}
|
|
1983
|
+
}),
|
|
1984
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
1985
|
+
], ClientUploadConfig.prototype, "enabled", void 0);
|
|
1986
|
+
tslib_1.__decorate([
|
|
1987
|
+
(0, common_1.ConfigProperty)({
|
|
1988
|
+
type: UserDTO_1.UserRoles,
|
|
1989
|
+
tags: {
|
|
1990
|
+
name: $localize `Minimum user role`,
|
|
1991
|
+
},
|
|
1992
|
+
description: $localize `Minimum user role to enable file upload.`
|
|
1993
|
+
}),
|
|
1994
|
+
tslib_1.__metadata("design:type", Number)
|
|
1995
|
+
], ClientUploadConfig.prototype, "minimumRole", void 0);
|
|
1996
|
+
tslib_1.__decorate([
|
|
1997
|
+
(0, common_1.ConfigProperty)({
|
|
1998
|
+
tags: {
|
|
1999
|
+
name: $localize `Require uploader.pg2conf`,
|
|
2000
|
+
},
|
|
2001
|
+
description: $localize `Only enable upload in folder where an ".uploader.pg2conf" is present in the folder.`
|
|
2002
|
+
}),
|
|
2003
|
+
tslib_1.__metadata("design:type", Boolean)
|
|
2004
|
+
], ClientUploadConfig.prototype, "enforcedDirectoryConfig", void 0);
|
|
2005
|
+
exports.ClientUploadConfig = ClientUploadConfig = tslib_1.__decorate([
|
|
2006
|
+
(0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
|
|
2007
|
+
], ClientUploadConfig);
|
|
1878
2008
|
let ClientConfig = class ClientConfig {
|
|
1879
2009
|
constructor() {
|
|
1880
2010
|
this.Server = new ClientServiceConfig();
|
|
@@ -1889,6 +2019,7 @@ let ClientConfig = class ClientConfig {
|
|
|
1889
2019
|
this.Faces = new ClientFacesConfig();
|
|
1890
2020
|
this.RandomPhoto = new ClientRandomPhotoConfig();
|
|
1891
2021
|
this.Extensions = new ClientExtensionsConfig();
|
|
2022
|
+
this.Upload = new ClientUploadConfig();
|
|
1892
2023
|
}
|
|
1893
2024
|
};
|
|
1894
2025
|
exports.ClientConfig = ClientConfig;
|
|
@@ -1981,6 +2112,15 @@ tslib_1.__decorate([
|
|
|
1981
2112
|
}),
|
|
1982
2113
|
tslib_1.__metadata("design:type", ClientExtensionsConfig)
|
|
1983
2114
|
], ClientConfig.prototype, "Extensions", void 0);
|
|
2115
|
+
tslib_1.__decorate([
|
|
2116
|
+
(0, common_1.ConfigProperty)({
|
|
2117
|
+
tags: {
|
|
2118
|
+
name: $localize `Upload`,
|
|
2119
|
+
uiIcon: 'ionCloudUploadOutline'
|
|
2120
|
+
},
|
|
2121
|
+
}),
|
|
2122
|
+
tslib_1.__metadata("design:type", ClientUploadConfig)
|
|
2123
|
+
], ClientConfig.prototype, "Upload", void 0);
|
|
1984
2124
|
exports.ClientConfig = ClientConfig = tslib_1.__decorate([
|
|
1985
2125
|
(0, common_1.SubConfigClass)({ tags: { client: true }, softReadonly: true })
|
|
1986
2126
|
], ClientConfig);
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { SearchQueryTypes } from './SearchQueryDTO';
|
|
2
2
|
export interface IAutoCompleteItem {
|
|
3
|
-
|
|
3
|
+
value: string;
|
|
4
4
|
type?: SearchQueryTypes;
|
|
5
5
|
}
|
|
6
6
|
export declare class AutoCompleteItem implements IAutoCompleteItem {
|
|
7
|
-
|
|
7
|
+
value: string;
|
|
8
8
|
type: SearchQueryTypes;
|
|
9
|
-
constructor(
|
|
9
|
+
constructor(value: string, type?: SearchQueryTypes);
|
|
10
10
|
equals(other: AutoCompleteItem): boolean;
|
|
11
11
|
}
|
|
@@ -2,12 +2,12 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AutoCompleteItem = void 0;
|
|
4
4
|
class AutoCompleteItem {
|
|
5
|
-
constructor(
|
|
6
|
-
this.
|
|
5
|
+
constructor(value, type = null) {
|
|
6
|
+
this.value = value;
|
|
7
7
|
this.type = type;
|
|
8
8
|
}
|
|
9
9
|
equals(other) {
|
|
10
|
-
return this.
|
|
10
|
+
return this.value === other.value && this.type === other.type;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
exports.AutoCompleteItem = AutoCompleteItem;
|
|
@@ -23,6 +23,7 @@ var ErrorCodes;
|
|
|
23
23
|
ErrorCodes[ErrorCodes["JOB_ERROR"] = 62] = "JOB_ERROR";
|
|
24
24
|
ErrorCodes[ErrorCodes["LocationLookUp_ERROR"] = 63] = "LocationLookUp_ERROR";
|
|
25
25
|
ErrorCodes[ErrorCodes["ALBUM_ERROR"] = 70] = "ALBUM_ERROR";
|
|
26
|
+
ErrorCodes[ErrorCodes["UPLOAD_ERROR"] = 80] = "UPLOAD_ERROR";
|
|
26
27
|
})(ErrorCodes || (exports.ErrorCodes = ErrorCodes = {}));
|
|
27
28
|
class ErrorDTO {
|
|
28
29
|
constructor(code, message, details, req) {
|