pigallery2-extension-kit 2.5.0-edge8 → 3.0.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.
Files changed (38) hide show
  1. package/lib/backend/middlewares/ServerTimingMWs.d.ts +1 -0
  2. package/lib/backend/middlewares/admin/ExtensionMWs.d.ts +2 -0
  3. package/lib/backend/model/extension/ExtensionConfig.d.ts +5 -2
  4. package/lib/backend/model/extension/ExtensionConfigTemplateLoader.d.ts +7 -7
  5. package/lib/backend/model/extension/ExtensionConfigTemplateLoader.js +50 -44
  6. package/lib/backend/model/extension/ExtensionManager.d.ts +16 -1
  7. package/lib/backend/model/extension/ExtensionObject.d.ts +7 -0
  8. package/lib/backend/model/extension/IExtension.d.ts +2 -2
  9. package/lib/backend/model/fileaccess/MetadataLoader.d.ts +1 -0
  10. package/lib/backend/routes/admin/ExtensionRouter.d.ts +2 -0
  11. package/lib/common/DataStructureVersion.d.ts +1 -1
  12. package/lib/common/config/private/PrivateConfig.d.ts +18 -4
  13. package/lib/common/config/private/PrivateConfig.js +60 -8
  14. package/lib/common/config/public/ClientConfig.d.ts +9 -8
  15. package/lib/common/config/public/ClientConfig.js +12 -1
  16. package/lib/common/entities/ContentWrapper.d.ts +3 -0
  17. package/lib/common/entities/ContentWrapper.js +6 -3
  18. package/lib/common/entities/extension/IClientUIConfig.d.ts +23 -4
  19. package/lib/frontend/app/model/page.helper.d.ts +3 -1
  20. package/lib/frontend/app/ui/albums/albums.component.d.ts +7 -2
  21. package/lib/frontend/app/ui/gallery/blog/blog.gallery.component.d.ts +3 -1
  22. package/lib/frontend/app/ui/gallery/blog/blog.service.d.ts +65 -4
  23. package/lib/frontend/app/ui/gallery/blog/blog.service.spec.d.ts +1 -0
  24. package/lib/frontend/app/ui/gallery/cache.gallery.service.d.ts +1 -2
  25. package/lib/frontend/app/ui/gallery/contentLoader.service.d.ts +1 -4
  26. package/lib/frontend/app/ui/gallery/gallery.component.d.ts +2 -1
  27. package/lib/frontend/app/ui/gallery/gallery.component.spec.d.ts +1 -0
  28. package/lib/frontend/app/ui/gallery/grid/grid.gallery.component.d.ts +8 -8
  29. package/lib/frontend/app/ui/gallery/grid/photo/photo.grid.gallery.component.d.ts +5 -0
  30. package/lib/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.d.ts +12 -8
  31. package/lib/frontend/app/ui/gallery/lightbox/lightbox.gallery.component.spec.d.ts +1 -0
  32. package/lib/frontend/app/ui/gallery/lightbox/lightbox.service.d.ts +1 -0
  33. package/lib/frontend/app/ui/gallery/navigator/navigator.gallery.component.d.ts +2 -1
  34. package/lib/frontend/app/ui/gallery/search/search-field-base/search-field-base.gallery.component.d.ts +1 -1
  35. package/lib/frontend/app/ui/gallery/wakelock.service.d.ts +19 -0
  36. package/lib/frontend/app/ui/settings/extension-installer/extension-installer.service.d.ts +2 -0
  37. package/lib/frontend/app/ui/settings/template/template.component.d.ts +12 -7
  38. package/package.json +1 -1
@@ -7,6 +7,7 @@ export declare class ServerTimeEntry {
7
7
  start(): void;
8
8
  end(): void;
9
9
  }
10
+ export declare const FunctionTime: (id: string, name: string) => (target: unknown, propertyName: string, descriptor: TypedPropertyDescriptor<(...args: any[]) => any>) => void;
10
11
  export declare const ServerTime: (id: string, name: string) => (target: unknown, propertyName: string, descriptor: TypedPropertyDescriptor<(req: unknown, res: unknown, next: () => void) => void>) => void;
11
12
  export declare class ServerTimingMWs {
12
13
  /**
@@ -2,4 +2,6 @@ import { NextFunction, Request, Response } from 'express';
2
2
  export declare class ExtensionMWs {
3
3
  static getExtensionList(req: Request, res: Response, next: NextFunction): Promise<void>;
4
4
  static installExtension(req: Request, res: Response, next: NextFunction): Promise<void>;
5
+ static reloadExtension(req: Request, res: Response, next: NextFunction): Promise<void>;
6
+ static deleteExtension(req: Request, res: Response, next: NextFunction): Promise<void>;
5
7
  }
@@ -1,6 +1,9 @@
1
1
  import { IExtensionConfig } from './IExtension';
2
2
  export declare class ExtensionConfig<C> implements IExtensionConfig<C> {
3
- private readonly extensionFolder;
4
- constructor(extensionFolder: string);
3
+ private readonly configKey;
4
+ /**
5
+ * @param configKey - The key used in Config.Extensions.extensions map (matches the extension's folder name)
6
+ */
7
+ constructor(configKey: string);
5
8
  getConfig(): C;
6
9
  }
@@ -6,16 +6,9 @@ import { PrivateConfigClass } from '../../../common/config/private/PrivateConfig
6
6
  */
7
7
  export declare class ExtensionConfigTemplateLoader {
8
8
  private static instance;
9
- private loaded;
10
9
  private extensionList;
11
10
  private extensionTemplates;
12
11
  static get Instance(): ExtensionConfigTemplateLoader;
13
- /**
14
- * Loads a single extension template
15
- * @param extFolder The folder name of the extension
16
- * @returns The extension template object if the extension is valid, null otherwise
17
- */
18
- private loadSingleExtensionTemplate;
19
12
  /**
20
13
  * Loads a single extension template and adds it to the config
21
14
  * @param extFolder The folder name of the extension
@@ -23,5 +16,12 @@ export declare class ExtensionConfigTemplateLoader {
23
16
  */
24
17
  loadSingleExtension(extFolder: string, config: PrivateConfigClass): void;
25
18
  loadExtensionTemplates(config: PrivateConfigClass): void;
19
+ /**
20
+ * Loads a single extension template
21
+ * @param extFolder The folder name of the extension
22
+ * @returns The extension template object if the extension is valid, null otherwise
23
+ */
24
+ private loadSingleExtensionTemplate;
25
+ private getExtensionFolders;
26
26
  private setTemplatesToConfig;
27
27
  }
@@ -5,6 +5,7 @@ const fs = require("fs");
5
5
  const path = require("path");
6
6
  const ServerExtensionsConfig_1 = require("../../../common/config/private/subconfigs/ServerExtensionsConfig");
7
7
  const ProjectPath_1 = require("../../ProjectPath");
8
+ const Utils_1 = require("../../../common/Utils");
8
9
  /**
9
10
  * This class decouples the extension management and the config.
10
11
  * It helps to solve the "chicken and the egg" which should load first:
@@ -12,7 +13,6 @@ const ProjectPath_1 = require("../../ProjectPath");
12
13
  */
13
14
  class ExtensionConfigTemplateLoader {
14
15
  constructor() {
15
- this.loaded = false;
16
16
  this.extensionList = [];
17
17
  this.extensionTemplates = [];
18
18
  }
@@ -22,36 +22,6 @@ class ExtensionConfigTemplateLoader {
22
22
  }
23
23
  return this.instance;
24
24
  }
25
- /**
26
- * Loads a single extension template
27
- * @param extFolder The folder name of the extension
28
- * @returns The extension template object if the extension is valid, null otherwise
29
- */
30
- loadSingleExtensionTemplate(extFolder) {
31
- if (!ProjectPath_1.ProjectPath.ExtensionFolder) {
32
- throw new Error('Unknown extensions folder.');
33
- }
34
- const extPath = path.join(ProjectPath_1.ProjectPath.ExtensionFolder, extFolder);
35
- const configExtPath = path.join(extPath, 'config.js');
36
- const serverExtPath = path.join(extPath, 'server.js');
37
- // if server.js is missing, it's not a valid extension
38
- if (!fs.existsSync(serverExtPath)) {
39
- return null;
40
- }
41
- let template = { folder: extFolder };
42
- if (fs.existsSync(configExtPath)) {
43
- // eslint-disable-next-line @typescript-eslint/no-var-requires
44
- const extCfg = require(configExtPath);
45
- if (typeof extCfg?.initConfig === 'function') {
46
- extCfg?.initConfig({
47
- setConfigTemplate: (templateClass) => {
48
- template = { folder: extFolder, template: templateClass };
49
- }
50
- });
51
- }
52
- }
53
- return template;
54
- }
55
25
  /**
56
26
  * Loads a single extension template and adds it to the config
57
27
  * @param extFolder The folder name of the extension
@@ -84,26 +54,62 @@ class ExtensionConfigTemplateLoader {
84
54
  if (!ProjectPath_1.ProjectPath.ExtensionFolder) {
85
55
  throw new Error('Unknown extensions folder.');
86
56
  }
57
+ if (!fs.existsSync(ProjectPath_1.ProjectPath.ExtensionFolder)) {
58
+ return;
59
+ }
60
+ const newList = this.getExtensionFolders();
61
+ const loaded = Utils_1.Utils.equalsFilter(this.extensionList, newList);
62
+ this.extensionList = newList;
87
63
  // already loaded
88
- if (!this.loaded) {
64
+ if (!loaded) {
89
65
  this.extensionTemplates = [];
90
- if (fs.existsSync(ProjectPath_1.ProjectPath.ExtensionFolder)) {
91
- this.extensionList = (fs
92
- .readdirSync(ProjectPath_1.ProjectPath.ExtensionFolder))
93
- .filter((f) => fs.statSync(path.join(ProjectPath_1.ProjectPath.ExtensionFolder, f)).isDirectory());
94
- this.extensionList.sort();
95
- for (let i = 0; i < this.extensionList.length; ++i) {
96
- const extFolder = this.extensionList[i];
97
- const template = this.loadSingleExtensionTemplate(extFolder);
98
- if (template) {
99
- this.extensionTemplates.push(template);
100
- }
66
+ for (let i = 0; i < this.extensionList.length; ++i) {
67
+ const extFolder = this.extensionList[i];
68
+ const template = this.loadSingleExtensionTemplate(extFolder);
69
+ if (template) {
70
+ this.extensionTemplates.push(template);
101
71
  }
102
72
  }
103
- this.loaded = true;
104
73
  }
105
74
  this.setTemplatesToConfig(config);
106
75
  }
76
+ /**
77
+ * Loads a single extension template
78
+ * @param extFolder The folder name of the extension
79
+ * @returns The extension template object if the extension is valid, null otherwise
80
+ */
81
+ loadSingleExtensionTemplate(extFolder) {
82
+ if (!ProjectPath_1.ProjectPath.ExtensionFolder) {
83
+ throw new Error('Unknown extensions folder.');
84
+ }
85
+ const extPath = path.join(ProjectPath_1.ProjectPath.ExtensionFolder, extFolder);
86
+ const configExtPath = path.join(extPath, 'config.js');
87
+ const serverExtPath = path.join(extPath, 'server.js');
88
+ // if server.js is missing, it's not a valid extension
89
+ if (!fs.existsSync(serverExtPath)) {
90
+ return null;
91
+ }
92
+ let template = { folder: extFolder };
93
+ if (fs.existsSync(configExtPath)) {
94
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
95
+ const extCfg = require(configExtPath);
96
+ if (typeof extCfg?.initConfig === 'function') {
97
+ extCfg?.initConfig({
98
+ setConfigTemplate: (templateClass) => {
99
+ template = { folder: extFolder, template: templateClass };
100
+ }
101
+ });
102
+ }
103
+ }
104
+ return template;
105
+ }
106
+ getExtensionFolders() {
107
+ const list = (fs
108
+ .readdirSync(ProjectPath_1.ProjectPath.ExtensionFolder))
109
+ .filter((f) => fs.statSync(path.join(ProjectPath_1.ProjectPath.ExtensionFolder, f)).isDirectory());
110
+ list.sort();
111
+ return list;
112
+ }
107
113
  setTemplatesToConfig(config) {
108
114
  if (!this.extensionTemplates) {
109
115
  return;
@@ -17,13 +17,27 @@ export declare class ExtensionManager implements IObjectManager {
17
17
  init(): Promise<void>;
18
18
  getExtensionListWithInstallStatus(): Promise<ExtensionListItem[]>;
19
19
  cleanUp(): Promise<void>;
20
+ /**
21
+ * Install an extension from the repository
22
+ * @param extensionId - The repository extension ID (not to be confused with the unique internal extensionId used in extObjects)
23
+ */
20
24
  installExtension(extensionId: string): Promise<void>;
25
+ /**
26
+ * Reload an extension by cleaning up and re-initializing it
27
+ * @param configKey - The key used in Config.Extensions.extensions map (typically the folder name)
28
+ */
29
+ reloadExtension(configKey: string): Promise<void>;
30
+ /**
31
+ * Delete an extension by cleaning up, removing its folder, and removing it from configuration
32
+ * @param configKey - The key used in Config.Extensions.extensions map (typically the folder name)
33
+ */
34
+ deleteExtension(configKey: string): Promise<void>;
21
35
  getUIExtensionConfigs(): UIExtensionDTO[];
22
36
  private initEvents;
23
37
  private createUniqueExtensionObject;
24
38
  /**
25
39
  * Initialize a single extension
26
- * @param extId The id of the extension
40
+ * @param configKey The key used in Config.Extensions.extensions map (typically the folder name)
27
41
  * @returns Promise that resolves when the extension is initialized
28
42
  */
29
43
  private initSingleExtension;
@@ -31,6 +45,7 @@ export declare class ExtensionManager implements IObjectManager {
31
45
  * Initialize all extensions
32
46
  */
33
47
  private initExtensions;
48
+ private cleanUpSingleExtension;
34
49
  private cleanUpExtensions;
35
50
  private downloadFile;
36
51
  private unzipFile;
@@ -19,5 +19,12 @@ export declare class ExtensionObject<C> implements IExtensionObject<C> {
19
19
  readonly RESTApi: ExpressRouterWrapper;
20
20
  readonly messengers: ExtensionMessengerHandler;
21
21
  readonly ui: UIExtension<C>;
22
+ /**
23
+ * @param extensionId - Unique ID used internally to track this extension instance (may have _1, _2 suffix if name collision occurs)
24
+ * @param extensionName - Display name of the extension (typically from package.json)
25
+ * @param folder - Folder name where the extension is stored (also used as config key in Config.Extensions.extensions)
26
+ * @param extensionRouter - Express router for extension REST API endpoints
27
+ * @param events - Extension events for hooking into gallery functionality
28
+ */
22
29
  constructor(extensionId: string, extensionName: string, folder: string, extensionRouter: express.Router, events: IExtensionEvents);
23
30
  }
@@ -222,9 +222,9 @@ export interface IUIExtension<C> {
222
222
  * Adds a new button on to UI to all media (photo, video).
223
223
  * Implement the server-side click action in the serverSB function.
224
224
  * @param buttonConfig
225
- * @param serverSB
225
+ * @param serverSB If not set the button will be a fake button (i.e.: only show up not clickable)
226
226
  */
227
- addMediaButton(buttonConfig: IClientMediaButtonConfig, serverSB: (params: ParamsDictionary, body: any, user: UserDTO, media: MediaEntity, repository: Repository<MediaEntity>) => Promise<void>): void;
227
+ addMediaButton(buttonConfig: IClientMediaButtonConfig, serverSB?: (params: ParamsDictionary, body: any, user: UserDTO, media: MediaEntity, repository: Repository<MediaEntity>) => Promise<void>): void;
228
228
  }
229
229
  export interface IExtensionConfigInit<C> {
230
230
  /**
@@ -16,4 +16,5 @@ export declare class MetadataLoader {
16
16
  private static mapToponyms;
17
17
  private static mapRating;
18
18
  private static mapFaces;
19
+ private static mapExifReader;
19
20
  }
@@ -3,4 +3,6 @@ export declare class ExtensionRouter {
3
3
  static route(app: Express): void;
4
4
  private static addExtensionList;
5
5
  private static addExtensionInstall;
6
+ private static addExtensionReload;
7
+ private static addExtensionDelete;
6
8
  }
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * This version indicates that the sql/entities/*Entity.ts files got changed and the db needs to be recreated
3
3
  */
4
- export declare const DataStructureVersion = 38;
4
+ export declare const DataStructureVersion = 39;
@@ -72,6 +72,7 @@ export declare class ServerUserConfig extends ClientUserConfig {
72
72
  enforcedUsers: UserConfig[];
73
73
  allowQuery: SearchQueryDTO;
74
74
  blockQuery: SearchQueryDTO;
75
+ suppressDefUserWarn: boolean;
75
76
  }
76
77
  export declare class ServerPhotoConfig extends ClientPhotoConfig {
77
78
  useLanczos3: boolean;
@@ -109,19 +110,32 @@ export declare class ServerLogConfig {
109
110
  sqlLevel: SQLLogLevel;
110
111
  logServerTiming: boolean;
111
112
  }
112
- export declare class NeverJobTriggerConfig implements NeverJobTrigger {
113
+ /**
114
+ * This is a "Hack" for the typeconfig
115
+ * The config should contain all the fields that are settable,
116
+ * otherwise change detection won't work, and we can't save the config.
117
+ * WARN: Do not use this class directly, use the separate Trigger classes below
118
+ */
119
+ export declare class JobTriggerConfigBase {
120
+ readonly type: JobTriggerType;
121
+ time?: number | undefined;
122
+ periodicity?: number | undefined;
123
+ atTime?: number | undefined;
124
+ afterScheduleName?: string | undefined;
125
+ }
126
+ export declare class NeverJobTriggerConfig extends JobTriggerConfigBase implements NeverJobTrigger {
113
127
  readonly type = JobTriggerType.never;
114
128
  }
115
- export declare class ScheduledJobTriggerConfig implements ScheduledJobTrigger {
129
+ export declare class ScheduledJobTriggerConfig extends JobTriggerConfigBase implements ScheduledJobTrigger {
116
130
  readonly type = JobTriggerType.scheduled;
117
131
  time: number;
118
132
  }
119
- export declare class PeriodicJobTriggerConfig implements PeriodicJobTrigger {
133
+ export declare class PeriodicJobTriggerConfig extends JobTriggerConfigBase implements PeriodicJobTrigger {
120
134
  readonly type = JobTriggerType.periodic;
121
135
  periodicity: number | undefined;
122
136
  atTime: number | undefined;
123
137
  }
124
- export declare class AfterJobTriggerConfig implements AfterJobTrigger {
138
+ export declare class AfterJobTriggerConfig extends JobTriggerConfigBase implements AfterJobTrigger {
125
139
  readonly type = JobTriggerType.after;
126
140
  afterScheduleName: string | undefined;
127
141
  constructor(afterScheduleName?: string);
@@ -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.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.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;
4
4
  const tslib_1 = require("tslib");
5
5
  /* eslint-disable @typescript-eslint/no-inferrable-types */
6
6
  require("reflect-metadata");
@@ -285,6 +285,7 @@ let ServerUserConfig = class ServerUserConfig extends ClientConfig_1.ClientUserC
285
285
  type: SearchQueryDTO_1.SearchQueryTypes.any_text,
286
286
  text: '',
287
287
  };
288
+ this.suppressDefUserWarn = false;
288
289
  }
289
290
  };
290
291
  exports.ServerUserConfig = ServerUserConfig;
@@ -328,6 +329,16 @@ tslib_1.__decorate([
328
329
  }),
329
330
  tslib_1.__metadata("design:type", Object)
330
331
  ], ServerUserConfig.prototype, "blockQuery", void 0);
332
+ tslib_1.__decorate([
333
+ (0, common_1.ConfigProperty)({
334
+ tags: {
335
+ name: $localize `Suppress default user warning`,
336
+ priority: ClientConfig_1.ConfigPriority.underTheHood
337
+ },
338
+ description: $localize `if true, the app won't show a warning for using the default user.`
339
+ }),
340
+ tslib_1.__metadata("design:type", Boolean)
341
+ ], ServerUserConfig.prototype, "suppressDefUserWarn", void 0);
331
342
  exports.ServerUserConfig = ServerUserConfig = tslib_1.__decorate([
332
343
  (0, common_1.SubConfigClass)({ softReadonly: true })
333
344
  ], ServerUserConfig);
@@ -649,8 +660,46 @@ tslib_1.__decorate([
649
660
  exports.ServerLogConfig = ServerLogConfig = tslib_1.__decorate([
650
661
  (0, common_1.SubConfigClass)({ softReadonly: true })
651
662
  ], ServerLogConfig);
652
- let NeverJobTriggerConfig = class NeverJobTriggerConfig {
663
+ /**
664
+ * This is a "Hack" for the typeconfig
665
+ * The config should contain all the fields that are settable,
666
+ * otherwise change detection won't work, and we can't save the config.
667
+ * WARN: Do not use this class directly, use the separate Trigger classes below
668
+ */
669
+ let JobTriggerConfigBase = class JobTriggerConfigBase {
670
+ constructor() {
671
+ this.type = JobScheduleDTO_1.JobTriggerType.never;
672
+ this.periodicity = 7; // 0-6: week days 7 every day
673
+ this.atTime = 0; // daytime
674
+ }
675
+ };
676
+ exports.JobTriggerConfigBase = JobTriggerConfigBase;
677
+ tslib_1.__decorate([
678
+ (0, common_1.ConfigProperty)({ type: JobScheduleDTO_1.JobTriggerType }),
679
+ tslib_1.__metadata("design:type", Number)
680
+ ], JobTriggerConfigBase.prototype, "type", void 0);
681
+ tslib_1.__decorate([
682
+ (0, common_1.ConfigProperty)({ type: 'unsignedInt' }),
683
+ tslib_1.__metadata("design:type", Number)
684
+ ], JobTriggerConfigBase.prototype, "time", void 0);
685
+ tslib_1.__decorate([
686
+ (0, common_1.ConfigProperty)({ type: 'unsignedInt', max: 7 }),
687
+ tslib_1.__metadata("design:type", Number)
688
+ ], JobTriggerConfigBase.prototype, "periodicity", void 0);
689
+ tslib_1.__decorate([
690
+ (0, common_1.ConfigProperty)({ type: 'unsignedInt', max: 23 * 60 + 59 }),
691
+ tslib_1.__metadata("design:type", Number)
692
+ ], JobTriggerConfigBase.prototype, "atTime", void 0);
693
+ tslib_1.__decorate([
694
+ (0, common_1.ConfigProperty)({ type: 'string' }),
695
+ tslib_1.__metadata("design:type", String)
696
+ ], JobTriggerConfigBase.prototype, "afterScheduleName", void 0);
697
+ exports.JobTriggerConfigBase = JobTriggerConfigBase = tslib_1.__decorate([
698
+ (0, common_1.SubConfigClass)({ softReadonly: true })
699
+ ], JobTriggerConfigBase);
700
+ let NeverJobTriggerConfig = class NeverJobTriggerConfig extends JobTriggerConfigBase {
653
701
  constructor() {
702
+ super(...arguments);
654
703
  this.type = JobScheduleDTO_1.JobTriggerType.never;
655
704
  }
656
705
  };
@@ -662,8 +711,9 @@ tslib_1.__decorate([
662
711
  exports.NeverJobTriggerConfig = NeverJobTriggerConfig = tslib_1.__decorate([
663
712
  (0, common_1.SubConfigClass)({ softReadonly: true })
664
713
  ], NeverJobTriggerConfig);
665
- let ScheduledJobTriggerConfig = class ScheduledJobTriggerConfig {
714
+ let ScheduledJobTriggerConfig = class ScheduledJobTriggerConfig extends JobTriggerConfigBase {
666
715
  constructor() {
716
+ super(...arguments);
667
717
  this.type = JobScheduleDTO_1.JobTriggerType.scheduled;
668
718
  }
669
719
  };
@@ -679,11 +729,12 @@ tslib_1.__decorate([
679
729
  exports.ScheduledJobTriggerConfig = ScheduledJobTriggerConfig = tslib_1.__decorate([
680
730
  (0, common_1.SubConfigClass)({ softReadonly: true })
681
731
  ], ScheduledJobTriggerConfig);
682
- let PeriodicJobTriggerConfig = class PeriodicJobTriggerConfig {
732
+ let PeriodicJobTriggerConfig = class PeriodicJobTriggerConfig extends JobTriggerConfigBase {
683
733
  constructor() {
734
+ super(...arguments);
684
735
  this.type = JobScheduleDTO_1.JobTriggerType.periodic;
685
736
  this.periodicity = 7; // 0-6: week days 7 every day
686
- this.atTime = 0; // day time
737
+ this.atTime = 0; // daytime
687
738
  }
688
739
  };
689
740
  exports.PeriodicJobTriggerConfig = PeriodicJobTriggerConfig;
@@ -702,8 +753,9 @@ tslib_1.__decorate([
702
753
  exports.PeriodicJobTriggerConfig = PeriodicJobTriggerConfig = tslib_1.__decorate([
703
754
  (0, common_1.SubConfigClass)({ softReadonly: true })
704
755
  ], PeriodicJobTriggerConfig);
705
- let AfterJobTriggerConfig = class AfterJobTriggerConfig {
756
+ let AfterJobTriggerConfig = class AfterJobTriggerConfig extends JobTriggerConfigBase {
706
757
  constructor(afterScheduleName) {
758
+ super();
707
759
  this.type = JobScheduleDTO_1.JobTriggerType.after;
708
760
  this.afterScheduleName = afterScheduleName;
709
761
  }
@@ -751,7 +803,7 @@ tslib_1.__decorate([
751
803
  ], JobScheduleConfig.prototype, "allowParallelRun", void 0);
752
804
  tslib_1.__decorate([
753
805
  (0, common_1.ConfigProperty)({
754
- type: NeverJobTriggerConfig,
806
+ type: JobTriggerConfigBase,
755
807
  typeBuilder: (v) => {
756
808
  const type = typeof v.type === 'number' ? v.type : JobScheduleDTO_1.JobTriggerType[v.type];
757
809
  switch (type) {
@@ -1093,7 +1145,7 @@ let ServerServiceConfig = class ServerServiceConfig extends ClientConfig_1.Clien
1093
1145
  super(...arguments);
1094
1146
  this.sessionSecret = [];
1095
1147
  this.sessionTimeout = 1000 * 60 * 60 * 24 * 7; // in ms
1096
- this.trustProxy = "false";
1148
+ this.trustProxy = 'false';
1097
1149
  this.port = 80;
1098
1150
  this.host = '0.0.0.0';
1099
1151
  this.Log = new ServerLogConfig();
@@ -111,25 +111,25 @@ export declare class MapLayers {
111
111
  darkLayer: boolean;
112
112
  }
113
113
  export declare class SVGIconConfig {
114
- constructor(viewBox?: string, items?: string);
115
114
  viewBox: string;
116
115
  items: string;
116
+ constructor(viewBox?: string, items?: string);
117
117
  }
118
118
  export declare class PathThemeConfig {
119
- constructor(color?: string, dashArray?: string, svgIcon?: SVGIconConfig);
120
119
  color: string;
121
120
  dashArray: string;
122
121
  svgIcon: SVGIconConfig;
122
+ constructor(color?: string, dashArray?: string, svgIcon?: SVGIconConfig);
123
123
  }
124
124
  export declare class MapPathGroupThemeConfig {
125
- constructor(matchers?: string[], theme?: PathThemeConfig);
126
125
  matchers: string[];
127
126
  theme: PathThemeConfig;
127
+ constructor(matchers?: string[], theme?: PathThemeConfig);
128
128
  }
129
129
  export declare class MapPathGroupConfig {
130
- constructor(name?: string, matchers?: MapPathGroupThemeConfig[]);
131
130
  name: string;
132
131
  matchers: MapPathGroupThemeConfig[];
132
+ constructor(name?: string, matchers?: MapPathGroupThemeConfig[]);
133
133
  }
134
134
  export declare class ClientMapConfig {
135
135
  enabled: boolean;
@@ -156,14 +156,14 @@ export declare class NavigationLinkConfig {
156
156
  constructor(type?: NavigationLinkTypes, name?: string, SearchQuery?: SearchQueryDTO, url?: string);
157
157
  }
158
158
  export declare class ClientSortingConfig implements SortingMethod {
159
- constructor(method?: number, ascending?: boolean);
160
159
  method: number;
161
160
  ascending: boolean;
161
+ constructor(method?: number, ascending?: boolean);
162
162
  }
163
163
  export declare class ClientGroupingConfig implements GroupingMethod {
164
- constructor(method?: number, ascending?: boolean);
165
164
  method: number;
166
165
  ascending: boolean;
166
+ constructor(method?: number, ascending?: boolean);
167
167
  }
168
168
  export declare class NavBarSortingAndGroupingConfig {
169
169
  defaultPhotoSortingMethod: ClientSortingConfig;
@@ -193,14 +193,15 @@ export declare class ClientLightboxConfig {
193
193
  captionAlwaysOn: boolean;
194
194
  facesAlwaysOn: boolean;
195
195
  loopVideos: boolean;
196
+ loopSlideshow: boolean;
196
197
  loadFullImageOnZoom: boolean;
197
198
  loadFullImageIfPreviewTooSmall: boolean;
198
199
  Titles: ClientLightboxTitleConfig;
199
200
  }
200
201
  export declare class ThemeConfig {
201
- constructor(name?: string, theme?: string);
202
202
  name: string;
203
203
  theme: string;
204
+ constructor(name?: string, theme?: string);
204
205
  }
205
206
  export declare class ThemesConfig {
206
207
  enabled: boolean;
@@ -231,6 +232,7 @@ export declare class ClientPhotoConfig {
231
232
  personThumbnailSize: number;
232
233
  thumbnailSizes: number[];
233
234
  concurrentThumbnailGenerations: number;
235
+ supportedFormats: string[];
234
236
  /**
235
237
  * Generates a map for bitwise operation from icon and normal thumbnails
236
238
  */
@@ -244,7 +246,6 @@ export declare class ClientPhotoConfig {
244
246
  size: number;
245
247
  bit: number;
246
248
  }[];
247
- supportedFormats: string[];
248
249
  }
249
250
  export declare class ClientGPXCompressingConfig {
250
251
  enabled: boolean;
@@ -1022,6 +1022,7 @@ let ClientLightboxConfig = class ClientLightboxConfig {
1022
1022
  this.captionAlwaysOn = false;
1023
1023
  this.facesAlwaysOn = false;
1024
1024
  this.loopVideos = false;
1025
+ this.loopSlideshow = false;
1025
1026
  this.loadFullImageOnZoom = true;
1026
1027
  this.loadFullImageIfPreviewTooSmall = true;
1027
1028
  this.Titles = new ClientLightboxTitleConfig();
@@ -1070,6 +1071,16 @@ tslib_1.__decorate([
1070
1071
  }),
1071
1072
  tslib_1.__metadata("design:type", Boolean)
1072
1073
  ], ClientLightboxConfig.prototype, "loopVideos", void 0);
1074
+ tslib_1.__decorate([
1075
+ (0, common_1.ConfigProperty)({
1076
+ tags: {
1077
+ name: $localize `Loop Slideshow`,
1078
+ priority: ConfigPriority.underTheHood,
1079
+ },
1080
+ description: $localize `If enabled, lightbox will start from the first photo when it reached the last one.`
1081
+ }),
1082
+ tslib_1.__metadata("design:type", Boolean)
1083
+ ], ClientLightboxConfig.prototype, "loopSlideshow", void 0);
1073
1084
  tslib_1.__decorate([
1074
1085
  (0, common_1.ConfigProperty)({
1075
1086
  tags: {
@@ -1392,7 +1403,7 @@ let ClientPhotoConfig = class ClientPhotoConfig {
1392
1403
  this.personThumbnailSize = 200;
1393
1404
  this.thumbnailSizes = [320, 540, 1080, 2160];
1394
1405
  this.concurrentThumbnailGenerations = 1;
1395
- this.supportedFormats = ['gif', 'jpeg', 'jpg', 'jpe', 'png', 'webp', 'svg', 'avif', 'heic', 'dng', 'arw'];
1406
+ this.supportedFormats = ['gif', 'jpeg', 'jpg', 'jpe', 'png', 'webp', 'svg', 'avif', 'heic', 'dng', 'arw', 'tiff'];
1396
1407
  }
1397
1408
  /**
1398
1409
  * Generates a map for bitwise operation from icon and normal thumbnails
@@ -16,3 +16,6 @@ export declare class ContentWrapper {
16
16
  static pack(cw: ContentWrapper): ContentWrapper;
17
17
  static unpack(cw: ContentWrapper): ContentWrapper;
18
18
  }
19
+ export declare class ContentWrapperWithError extends ContentWrapper {
20
+ error?: string;
21
+ }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.ContentWrapper = void 0;
3
+ exports.ContentWrapperWithError = exports.ContentWrapper = void 0;
4
4
  const Utils_1 = require("../Utils");
5
5
  const MediaDTO_1 = require("./MediaDTO");
6
6
  class ContentWrapper {
@@ -466,7 +466,7 @@ class ContentWrapper {
466
466
  faces: new Map(), keywords: new Map(),
467
467
  lens: new Map(), camera: new Map(), directories: new Map()
468
468
  };
469
- if (cw.directory) {
469
+ if (cw?.directory) {
470
470
  ContentWrapper.packDirectory(cw, cw.directory);
471
471
  }
472
472
  else if (cw.searchResult) {
@@ -487,7 +487,7 @@ class ContentWrapper {
487
487
  if (!cw || cw.notModified) {
488
488
  return cw;
489
489
  }
490
- if (cw.directory) {
490
+ if (cw?.directory) {
491
491
  ContentWrapper.unPackDirectory(cw, cw.directory);
492
492
  }
493
493
  else if (cw.searchResult) {
@@ -498,3 +498,6 @@ class ContentWrapper {
498
498
  }
499
499
  }
500
500
  exports.ContentWrapper = ContentWrapper;
501
+ class ContentWrapperWithError extends ContentWrapper {
502
+ }
503
+ exports.ContentWrapperWithError = ContentWrapperWithError;
@@ -12,7 +12,7 @@ export interface IClientSVGIconConfig {
12
12
  }
13
13
  export interface IClientMediaButtonPopupFields {
14
14
  /**
15
- * Id of the field. This how it will listed in the body.
15
+ * Id of the field. This how it will be listed in the body.
16
16
  */
17
17
  id: string;
18
18
  /**
@@ -62,20 +62,39 @@ export interface IClientMediaButtonConfig {
62
62
  name: string;
63
63
  /**
64
64
  * Icon of the button. This will be shown in the gallery and also in the lightbox.
65
+ * You can look for icons here: https://fontawesome.com
65
66
  */
66
67
  svgIcon: IClientSVGIconConfig;
67
68
  /**
68
- * If true, the button will be hidden if on photos
69
+ * If true, the button will be hidden on photos
69
70
  */
70
71
  skipPhotos?: boolean;
71
72
  /**
72
- * If true, the button will be hidden if on videos
73
+ * If true, the button will be hidden on videos
73
74
  */
74
75
  skipVideos?: boolean;
76
+ /**
77
+ * If set, the button will only be shown if the metadata matches this filter.
78
+ * example values:
79
+ * [
80
+ * {field: 'rating', comparator: '==', value: 4}, // matches if rating is 4
81
+ * {field: 'size.width', comparator: '>=', value: 400} // matches if width is >= 400px
82
+ * ]
83
+ */
84
+ metadataFilter?: {
85
+ field: string;
86
+ comparator: '>=' | '<=' | '==';
87
+ value: string | number;
88
+ }[];
89
+ /**
90
+ * If true, the button will always be visible, not only on hover.
91
+ */
92
+ alwaysVisible?: boolean;
75
93
  /**
76
94
  * Path to the server side function that will be called when the button is clicked.
95
+ * If it is not set, it will be a fake button. (i.e.: only shows up but does not do anything)
77
96
  */
78
- apiPath: string;
97
+ apiPath?: string;
79
98
  /**
80
99
  * Popup config. IF you want conformation before calling the apiPath or want to change media metedata, set this.
81
100
  */
@@ -1,9 +1,11 @@
1
1
  export declare class PageHelper {
2
+ private static readonly body;
2
3
  private static readonly supportPageOffset;
3
4
  private static readonly isCSS1Compat;
4
- private static readonly body;
5
5
  static get ScrollY(): number;
6
6
  static set ScrollY(value: number);
7
+ static get OverflowY(): string;
8
+ static set OverflowY(value: string);
7
9
  static get MaxScrollY(): number;
8
10
  static get ScrollX(): number;
9
11
  static showScrollY(): void;
@@ -4,11 +4,16 @@ import { BsModalService } from 'ngx-bootstrap/modal';
4
4
  import { TextSearch } from '../../../../common/entities/SearchQueryDTO';
5
5
  import { AuthenticationService } from '../../model/network/authentication.service';
6
6
  import { PiTitleService } from '../../model/pi-title.service';
7
+ import { ShareService } from '../gallery/share.service';
8
+ import { NavigationService } from '../../model/navigation.service';
7
9
  export declare class AlbumsComponent implements OnInit {
8
10
  albumsService: AlbumsService;
9
11
  private modalService;
10
12
  authenticationService: AuthenticationService;
11
13
  private piTitleService;
14
+ private shareService;
15
+ private authService;
16
+ private navigation;
12
17
  container: ElementRef;
13
18
  size: number;
14
19
  savedSearch: {
@@ -16,9 +21,9 @@ export declare class AlbumsComponent implements OnInit {
16
21
  searchQuery: TextSearch;
17
22
  };
18
23
  private modalRef;
19
- constructor(albumsService: AlbumsService, modalService: BsModalService, authenticationService: AuthenticationService, piTitleService: PiTitleService);
20
- ngOnInit(): void;
24
+ constructor(albumsService: AlbumsService, modalService: BsModalService, authenticationService: AuthenticationService, piTitleService: PiTitleService, shareService: ShareService, authService: AuthenticationService, navigation: NavigationService);
21
25
  get CanCreateAlbum(): boolean;
26
+ ngOnInit(): Promise<boolean>;
22
27
  openModal(template: TemplateRef<any>): Promise<void>;
23
28
  hideModal(): void;
24
29
  saveSearch(): Promise<void>;
@@ -4,9 +4,11 @@ import { Observable } from 'rxjs';
4
4
  export declare class GalleryBlogComponent implements OnChanges {
5
5
  blogService: BlogService;
6
6
  open: boolean;
7
+ /**
8
+ * Blog is inserted to the top (when date is null) and to all date groups, when date is set
9
+ */
7
10
  date: Date;
8
11
  openChange: EventEmitter<boolean>;
9
- markdowns: string[];
10
12
  mkObservable: Observable<GroupedMarkdown[]>;
11
13
  constructor(blogService: BlogService);
12
14
  ngOnChanges(): void;
@@ -7,13 +7,74 @@ export declare class BlogService {
7
7
  private networkService;
8
8
  private galleryService;
9
9
  private mdFilesFilterPipe;
10
- cache: {
11
- [key: string]: Promise<string> | string;
12
- };
13
10
  groupedMarkdowns: Observable<GroupedMarkdown[]>;
11
+ private cache;
14
12
  constructor(networkService: NetworkService, galleryService: ContentService, mdFilesFilterPipe: MDFilesFilterPipe);
13
+ /**
14
+ * Loads a Markdown file from the server and caches it
15
+ * @param file
16
+ * @private
17
+ */
18
+ private getMarkDown;
19
+ /**
20
+ * Splits a markdown file into date groups.
21
+ *
22
+ * Rules:
23
+ * - If a MD part does not have a date tag (date=null), it goes to the top
24
+ * if file.date === firstMedia, then it goes if date groups are ascending.
25
+ * if descending, goes to the last date group
26
+ * - If a MD part has a date tag, it goes to the closest date group.
27
+ * - Date groups span a full day (UTC midnight to midnight).
28
+ *
29
+ * Example with date groups for ascending: [2025-02-01, 2025-02-03, 2025-02-04, 2025-02-10]
30
+ * - MD part: no date → goes to null
31
+ * - MD part: 2025-02-01 00:00 → goes to 2025-02-01
32
+ * - MD part: 2025-02-02 00:00 → goes to 2025-02-01 (closest younger)
33
+ * - MD part: 2025-02-03 00:00 → goes to 2025-02-03
34
+ * - MD part: 2025-02-03 23:59 → goes to 2025-02-03
35
+ * - MD part: 2025-02-04 00:00 → goes to 2025-02-04
36
+ * Example with date groups for desc: [2025-02-10, 2025-02-04,2025-02-03, 2025-02-01]
37
+ * - MD part: no date, first file date of the MD's folder 2025-02-01 → goes to 2025-02-01
38
+ * - MD part: 2025-02-01 00:00 → goes to 2025-02-01
39
+ * - MD part: 2025-02-02 00:00 → goes to 2025-02-02 (closest oldest)
40
+ * - MD part: 2025-02-03 00:00 → goes to 2025-02-03
41
+ * - MD part: 2025-02-03 23:59 → goes to 2025-02-03
42
+ * - MD part: 2025-02-04 00:00 → goes to 2025-02-04
43
+ *
44
+ * @param file The markdown file to split
45
+ * @param dates Array of date group timestamps (in milliseconds, UTC midnight)
46
+ * @param firstMedia The timestamp of the first media in the current gallery view
47
+ * @private
48
+ */
15
49
  private splitMarkDown;
16
- getMarkDown(file: FileDTO): Promise<string>;
50
+ /**
51
+ * Parses a markdown file into sections based on date tags.
52
+ * Returns an array where each section has optional date and text content.
53
+ *
54
+ * @param markdown The raw markdown content
55
+ * @private
56
+ */
57
+ private parseMarkdownSections;
58
+ /**
59
+ * Finds the closest date group on or BEFORE the given timestamp if dates are ascending OR AFTER if descending.
60
+ * Works with both ascending and descending date arrays.
61
+ *
62
+ * @param timestamp The timestamp to find a date group for (in milliseconds)
63
+ * @param dates Array of date group timestamps (in original order from mediaGroups)
64
+ * @private
65
+ */
66
+ private findClosestDateGroup;
67
+ /**
68
+ * Groups markdown sections by their appropriate date groups and concatenates
69
+ * sections that belong to the same date group.
70
+ *
71
+ * @param sections Parsed markdown sections with optional dates
72
+ * @param file The markdown file being processed
73
+ * @param sortedDates Array of date group timestamps, sorted
74
+ * @param firstMedia The timestamp of the first media in the current gallery view
75
+ * @private
76
+ */
77
+ private groupSectionsByDate;
17
78
  }
18
79
  export interface GroupedMarkdown {
19
80
  date: number | null;
@@ -3,8 +3,7 @@ import { MediaDTO } from '../../../../common/entities/MediaDTO';
3
3
  import { GroupingMethod, SortingMethod } from '../../../../common/entities/SortingMethods';
4
4
  import { VersionService } from '../../model/version.service';
5
5
  import { SearchQueryDTO, SearchQueryTypes } from '../../../../common/entities/SearchQueryDTO';
6
- import { ContentWrapper } from '../../../../common/entities/ContentWrapper';
7
- import { ContentWrapperWithError } from './contentLoader.service';
6
+ import { ContentWrapper, ContentWrapperWithError } from '../../../../common/entities/ContentWrapper';
8
7
  import { ThemeModes } from '../../../../common/config/public/ClientConfig';
9
8
  import { GridSizes } from '../../../../common/entities/GridSizes';
10
9
  export declare class GalleryCacheService {
@@ -1,5 +1,5 @@
1
1
  import { NetworkService } from '../../model/network/network.service';
2
- import { ContentWrapper } from '../../../../common/entities/ContentWrapper';
2
+ import { ContentWrapperWithError } from '../../../../common/entities/ContentWrapper';
3
3
  import { SubDirectoryDTO } from '../../../../common/entities/DirectoryDTO';
4
4
  import { GalleryCacheService } from './cache.gallery.service';
5
5
  import { BehaviorSubject, Observable } from 'rxjs';
@@ -27,9 +27,6 @@ export declare class ContentLoaderService {
27
27
  isSearchResult(): boolean;
28
28
  reloadCurrentContent(): Promise<void>;
29
29
  }
30
- export declare class ContentWrapperWithError extends ContentWrapper {
31
- error?: string;
32
- }
33
30
  export interface DirectoryContent {
34
31
  directories: SubDirectoryDTO[];
35
32
  media: MediaDTO[];
@@ -10,7 +10,8 @@ import { FilterService } from './filter/filter.service';
10
10
  import { PiTitleService } from '../../model/pi-title.service';
11
11
  import { GPXFilesFilterPipe } from '../../pipes/GPXFilesFilterPipe';
12
12
  import { MDFilesFilterPipe } from '../../pipes/MDFilesFilterPipe';
13
- import { ContentLoaderService, ContentWrapperWithError } from './contentLoader.service';
13
+ import { ContentLoaderService } from './contentLoader.service';
14
+ import { ContentWrapperWithError } from '../../../../common/entities/ContentWrapper';
14
15
  export declare class GalleryComponent implements OnInit, OnDestroy {
15
16
  contentLoader: ContentLoaderService;
16
17
  galleryService: ContentService;
@@ -30,13 +30,7 @@ export declare class GalleryGridComponent implements OnInit, OnChanges, AfterVie
30
30
  route: Subscription;
31
31
  };
32
32
  delayedRenderUpToPhoto: string;
33
- private scrollListenerPhotos;
34
- private TARGET_COL_COUNT;
35
- private MIN_ROW_COUNT;
36
- private MAX_ROW_COUNT;
37
33
  IMAGE_MARGIN: number;
38
- private onScrollFired;
39
- private helperTime;
40
34
  renderDelayTimer: number;
41
35
  readonly GroupByTypes: {
42
36
  [x: number]: string;
@@ -48,17 +42,24 @@ export declare class GalleryGridComponent implements OnInit, OnChanges, AfterVie
48
42
  FileSize: import("../../../../../common/entities/SortingMethods").SortByDirectionalTypes.FileSize;
49
43
  };
50
44
  readonly blogOpen: boolean;
45
+ private scrollListenerPhotos;
46
+ private TARGET_COL_COUNT;
47
+ private MIN_ROW_COUNT;
48
+ private MAX_ROW_COUNT;
49
+ private onScrollFired;
50
+ private helperTime;
51
51
  constructor(overlayService: OverlayService, changeDetector: ChangeDetectorRef, queryService: QueryService, router: Router, sortingService: GallerySortingService, navigatorService: GalleryNavigatorService, route: ActivatedRoute);
52
52
  ngOnChanges(): void;
53
53
  ngOnInit(): void;
54
54
  ngOnDestroy(): void;
55
55
  onResize(): void;
56
- private renderMinimalPhotos;
57
56
  photoClicked(media: MediaDTO): void;
58
57
  ngAfterViewInit(): void;
59
58
  mergeNewPhotos(): void;
60
59
  renderARow(): number;
61
60
  onScroll(): void;
61
+ getNumberOfRenderedMedia(): number;
62
+ private renderMinimalPhotos;
62
63
  private getMaxRowHeight;
63
64
  /**
64
65
  * Makes sure that the photo with the given mediaString is visible on the screen
@@ -74,7 +75,6 @@ export declare class GalleryGridComponent implements OnInit, OnChanges, AfterVie
74
75
  private shouldRenderMore;
75
76
  private renderPhotos;
76
77
  private isMoreToRender;
77
- getNumberOfRenderedMedia(): number;
78
78
  private updateContainerDimensions;
79
79
  }
80
80
  interface GridMediaGroup {
@@ -34,6 +34,11 @@ export declare class GalleryPhotoComponent implements IRenderable, OnInit, OnDes
34
34
  get ScrollListener(): boolean;
35
35
  get Title(): string;
36
36
  updateMediaButtons(): void;
37
+ matchesMetadataFilter(filters: {
38
+ field: string;
39
+ comparator: '>=' | '<=' | '==';
40
+ value: string | number;
41
+ }[]): boolean;
37
42
  ngOnInit(): void;
38
43
  ngOnDestroy(): void;
39
44
  isInView(): boolean;
@@ -3,6 +3,7 @@ import { GalleryPhotoComponent } from '../grid/photo/photo.grid.gallery.componen
3
3
  import { Dimension } from '../../../model/IRenderable';
4
4
  import { FullScreenService } from '../fullscreen.service';
5
5
  import { OverlayService } from '../overlay.service';
6
+ import { WakeLockService } from '../wakelock.service';
6
7
  import { AnimationBuilder, AnimationPlayer } from '@angular/animations';
7
8
  import { GalleryLightboxMediaComponent } from './media/media.lightbox.gallery.component';
8
9
  import { ActivatedRoute, Router } from '@angular/router';
@@ -11,6 +12,7 @@ import { MediaDTO } from '../../../../../common/entities/MediaDTO';
11
12
  import { ControlsLightboxComponent } from './controls/controls.lightbox.gallery.component';
12
13
  import { GridMedia } from '../grid/GridMedia';
13
14
  import { PiTitleService } from '../../../model/pi-title.service';
15
+ import { LightboxService } from './lightbox.service';
14
16
  export declare enum LightboxStates {
15
17
  Open = 1,
16
18
  Opening = 2,
@@ -26,6 +28,8 @@ export declare class GalleryLightboxComponent implements OnDestroy, OnInit {
26
28
  private queryService;
27
29
  private route;
28
30
  private piTitleService;
31
+ private wakeLockService;
32
+ private lightboxService;
29
33
  mediaElement: GalleryLightboxMediaComponent;
30
34
  controls: ControlsLightboxComponent;
31
35
  lightboxElement: ElementRef;
@@ -39,7 +43,6 @@ export declare class GalleryLightboxComponent implements OnDestroy, OnInit {
39
43
  status: LightboxStates;
40
44
  infoPanelVisible: boolean;
41
45
  infoPanelWidth: number;
42
- private infoPanelMaxWidth;
43
46
  animating: boolean;
44
47
  photoFrameDim: {
45
48
  width: number;
@@ -48,6 +51,8 @@ export declare class GalleryLightboxComponent implements OnDestroy, OnInit {
48
51
  };
49
52
  videoSourceError: boolean;
50
53
  transcodeNeedVideos: string[];
54
+ slideShowRunning: boolean;
55
+ private infoPanelMaxWidth;
51
56
  private startPhotoDimension;
52
57
  private iPvisibilityTimer;
53
58
  private visibilityTimer;
@@ -55,14 +60,11 @@ export declare class GalleryLightboxComponent implements OnDestroy, OnInit {
55
60
  private activePhotoId;
56
61
  private gridPhotoQL;
57
62
  private subscription;
58
- slideShowRunning: boolean;
59
- constructor(fullScreenService: FullScreenService, changeDetector: ChangeDetectorRef, overlayService: OverlayService, builder: AnimationBuilder, router: Router, queryService: QueryService, route: ActivatedRoute, piTitleService: PiTitleService);
63
+ constructor(fullScreenService: FullScreenService, changeDetector: ChangeDetectorRef, overlayService: OverlayService, builder: AnimationBuilder, router: Router, queryService: QueryService, route: ActivatedRoute, piTitleService: PiTitleService, wakeLockService: WakeLockService, lightboxService: LightboxService);
60
64
  get Title(): string;
65
+ get NexGridMedia(): GridMedia;
61
66
  toggleFullscreen(): void;
62
- private updateInfoPanelWidth;
63
67
  ngOnInit(): void;
64
- private runSlideShow;
65
- private stopSlideShow;
66
68
  ngOnDestroy(): void;
67
69
  onNavigateTo(photoStringId: string): string;
68
70
  setGridPhotoQL(value: QueryList<GalleryPhotoComponent>): void;
@@ -80,6 +82,10 @@ export declare class GalleryLightboxComponent implements OnDestroy, OnInit {
80
82
  isVisible(): boolean;
81
83
  isOpen(): boolean;
82
84
  onVideoSourceError(): void;
85
+ togglePlayback(value: boolean): void;
86
+ private updateInfoPanelWidth;
87
+ private runSlideShow;
88
+ private stopSlideShow;
83
89
  private updatePhotoFrameDim;
84
90
  private navigateToPhoto;
85
91
  private showPhoto;
@@ -87,6 +93,4 @@ export declare class GalleryLightboxComponent implements OnDestroy, OnInit {
87
93
  private updateActivePhoto;
88
94
  private findPhotoComponent;
89
95
  private calcLightBoxPhotoDimension;
90
- get NexGridMedia(): GridMedia;
91
- togglePlayback(value: boolean): void;
92
96
  }
@@ -2,4 +2,5 @@ export declare class LightboxService {
2
2
  captionAlwaysOn: boolean;
3
3
  facesAlwaysOn: boolean;
4
4
  loopVideos: boolean;
5
+ loopSlideshow: boolean;
5
6
  }
@@ -9,8 +9,9 @@ import { Observable } from 'rxjs';
9
9
  import { GallerySortingService } from './sorting.service';
10
10
  import { BsDropdownDirective } from 'ngx-bootstrap/dropdown';
11
11
  import { FilterService } from '../filter/filter.service';
12
- import { ContentLoaderService, ContentWrapperWithError, DirectoryContent } from '../contentLoader.service';
12
+ import { ContentLoaderService, DirectoryContent } from '../contentLoader.service';
13
13
  import { GalleryNavigatorService } from './navigator.service';
14
+ import { ContentWrapperWithError } from '../../../../../common/entities/ContentWrapper';
14
15
  export declare class GalleryNavigatorComponent {
15
16
  authService: AuthenticationService;
16
17
  queryService: QueryService;
@@ -20,10 +20,10 @@ export declare class GallerySearchFieldBaseComponent implements ControlValueAcce
20
20
  key: SearchQueryTypes;
21
21
  }[];
22
22
  highlightedAutoCompleteItem: number;
23
+ inFocus: boolean;
23
24
  private cache;
24
25
  private autoCompleteItemsSubscription;
25
26
  private autoCompleteItems;
26
- inFocus: boolean;
27
27
  constructor(autoCompleteService: AutoCompleteService, router: Router);
28
28
  get SearchHint(): string;
29
29
  ngOnDestroy(): void;
@@ -0,0 +1,19 @@
1
+ export declare class WakeLockService {
2
+ private wakeLock;
3
+ /**
4
+ * Request a wake lock to prevent the screen from dimming or turning off
5
+ */
6
+ requestWakeLock(): Promise<void>;
7
+ /**
8
+ * Release the current wake lock
9
+ */
10
+ releaseWakeLock(): Promise<void>;
11
+ /**
12
+ * Check if wake lock is currently active
13
+ */
14
+ isWakeLockActive(): boolean;
15
+ /**
16
+ * Check if Wake Lock API is supported
17
+ */
18
+ isSupported(): boolean;
19
+ }
@@ -5,4 +5,6 @@ export declare class ExtensionInstallerService {
5
5
  constructor(networkService: NetworkService);
6
6
  getExtensions(): Promise<Array<ExtensionListItem>>;
7
7
  installExtension(extensionId: string): Promise<void>;
8
+ reloadExtension(extensionPath: string): Promise<void>;
9
+ deleteExtension(extensionPath: string): Promise<void>;
8
10
  }
@@ -10,6 +10,7 @@ import { UntypedFormControl } from '@angular/forms';
10
10
  import { IWebConfigClassPrivate } from 'typeconfig/src/decorators/class/IWebConfigClass';
11
11
  import { TAGS } from '../../../../../common/config/public/ClientConfig';
12
12
  import { ISettingsComponent } from './ISettingsComponent';
13
+ import { ExtensionInstallerService } from '../extension-installer/extension-installer.service';
13
14
  interface ConfigState {
14
15
  value: {
15
16
  [key: string]: RecursiveState;
@@ -45,6 +46,7 @@ export declare class TemplateComponent implements OnInit, OnChanges, OnDestroy,
45
46
  protected notification: NotificationService;
46
47
  settingsService: SettingsService;
47
48
  jobsService: ScheduledJobsService;
49
+ private extensionService;
48
50
  icon: string;
49
51
  ConfigPath: string;
50
52
  nestedConfigs: {
@@ -58,19 +60,19 @@ export declare class TemplateComponent implements OnInit, OnChanges, OnDestroy,
58
60
  error: string;
59
61
  changed: boolean;
60
62
  states: RecursiveState;
63
+ readonly ConfigStyle: typeof ConfigStyle;
61
64
  protected name: string;
65
+ protected sliceFN?: (s: IWebConfigClassPrivate<TAGS> & WebConfig) => ConfigState;
62
66
  private subscription;
63
67
  private settingsSubscription;
64
- protected sliceFN?: (s: IWebConfigClassPrivate<TAGS> & WebConfig) => ConfigState;
65
- readonly ConfigStyle: typeof ConfigStyle;
66
- constructor(authService: AuthenticationService, navigation: NavigationService, notification: NotificationService, settingsService: SettingsService, jobsService: ScheduledJobsService);
68
+ constructor(authService: AuthenticationService, navigation: NavigationService, notification: NotificationService, settingsService: SettingsService, jobsService: ScheduledJobsService, extensionService: ExtensionInstallerService);
69
+ get Name(): string;
70
+ get Changed(): boolean;
71
+ get HasAvailableSettings(): boolean;
67
72
  ngOnChanges(): void;
68
73
  ngOnInit(): void;
69
74
  ngOnDestroy(): void;
70
75
  setSliceFN(sliceFN?: (s: IWebConfigClassPrivate<TAGS> & WebConfig) => ConfigState): void;
71
- get Name(): string;
72
- get Changed(): boolean;
73
- get HasAvailableSettings(): boolean;
74
76
  onNewSettings: (s: IWebConfigClassPrivate<TAGS> & WebConfig) => void;
75
77
  onOptionChange: () => void;
76
78
  reset(): void;
@@ -81,11 +83,14 @@ export declare class TemplateComponent implements OnInit, OnChanges, OnDestroy,
81
83
  isExpandableConfig(c: ConfigState): boolean;
82
84
  isExpandableArrayConfig(c: ConfigState): boolean;
83
85
  save(): Promise<boolean>;
84
- private getSettings;
85
86
  getKeys(states: any): string[];
86
87
  getProgress(uiJob: {
87
88
  job: string;
88
89
  config?: any;
89
90
  }): JobProgressDTO;
91
+ protected isExtension(c: ConfigState): boolean;
92
+ protected removeExtension(c: ConfigState): Promise<void>;
93
+ protected reloadExtension(c: ConfigState): Promise<void>;
94
+ private getSettings;
90
95
  }
91
96
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pigallery2-extension-kit",
3
- "version": "2.5.0-edge8",
3
+ "version": "3.0.0",
4
4
  "description": "Interfaces for developing extensions for pigallery2",
5
5
  "author": "Patrik J. Braun",
6
6
  "homepage": "https://github.com/bpatrik/pigallery2",