@alfresco/aca-content 4.1.0 → 4.2.0-5542991658

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 (43) hide show
  1. package/assets/app.extensions.json +3 -3
  2. package/esm2020/lib/aca-content.module.mjs +2 -2
  3. package/esm2020/lib/aca-content.routes.mjs +27 -27
  4. package/esm2020/lib/extensions/core.extensions.module.mjs +2 -3
  5. package/esm2020/lib/services/node-template.service.mjs +1 -1
  6. package/esm2020/ms-office/aos-extension.module.mjs +7 -9
  7. package/esm2020/preview/alfresco-aca-content-preview.mjs +5 -0
  8. package/esm2020/preview/lib/components/preview.component.mjs +406 -0
  9. package/esm2020/preview/lib/preview.module.mjs +84 -0
  10. package/esm2020/preview/public-api.mjs +29 -0
  11. package/esm2020/viewer/alfresco-aca-content-viewer.mjs +5 -0
  12. package/esm2020/viewer/lib/components/viewer/viewer.component.mjs +402 -0
  13. package/esm2020/viewer/lib/viewer.module.mjs +81 -0
  14. package/esm2020/viewer/public-api.mjs +29 -0
  15. package/fesm2015/alfresco-aca-content-ms-office.mjs +4 -5
  16. package/fesm2015/alfresco-aca-content-ms-office.mjs.map +1 -1
  17. package/fesm2015/alfresco-aca-content-preview.mjs +495 -0
  18. package/fesm2015/alfresco-aca-content-preview.mjs.map +1 -0
  19. package/fesm2015/alfresco-aca-content-viewer.mjs +491 -0
  20. package/fesm2015/alfresco-aca-content-viewer.mjs.map +1 -0
  21. package/fesm2015/alfresco-aca-content.mjs +28 -86
  22. package/fesm2015/alfresco-aca-content.mjs.map +1 -1
  23. package/fesm2020/alfresco-aca-content-ms-office.mjs +4 -5
  24. package/fesm2020/alfresco-aca-content-ms-office.mjs.map +1 -1
  25. package/fesm2020/alfresco-aca-content-preview.mjs +511 -0
  26. package/fesm2020/alfresco-aca-content-preview.mjs.map +1 -0
  27. package/fesm2020/alfresco-aca-content-viewer.mjs +504 -0
  28. package/fesm2020/alfresco-aca-content-viewer.mjs.map +1 -0
  29. package/fesm2020/alfresco-aca-content.mjs +28 -86
  30. package/fesm2020/alfresco-aca-content.mjs.map +1 -1
  31. package/lib/services/node-template.service.d.ts +1 -1
  32. package/ms-office/aos-extension.module.d.ts +1 -2
  33. package/package.json +21 -5
  34. package/preview/index.d.ts +5 -0
  35. package/preview/lib/components/preview.component.d.ts +115 -0
  36. package/preview/lib/preview.module.d.ts +13 -0
  37. package/preview/public-api.d.ts +25 -0
  38. package/viewer/index.d.ts +5 -0
  39. package/viewer/lib/components/viewer/viewer.component.d.ts +111 -0
  40. package/viewer/lib/viewer.module.d.ts +13 -0
  41. package/viewer/public-api.d.ts +25 -0
  42. package/esm2020/lib/services/content-service-extension.service.mjs +0 -63
  43. package/lib/services/content-service-extension.service.d.ts +0 -11
@@ -0,0 +1,495 @@
1
+ import { __awaiter } from 'tslib';
2
+ import * as i0 from '@angular/core';
3
+ import { Component, ViewEncapsulation, HostListener, NgModule } from '@angular/core';
4
+ import * as i3 from '@angular/router';
5
+ import { PRIMARY_OUTLET, RouterModule } from '@angular/router';
6
+ import { takeUntil, debounceTime, map } from 'rxjs/operators';
7
+ import * as i2 from '@alfresco/adf-core';
8
+ import { ObjectUtils, CoreModule } from '@alfresco/adf-core';
9
+ import { ViewerActionTypes, SetSelectedNodesAction } from '@alfresco/aca-shared/store';
10
+ import * as i1 from '@alfresco/aca-shared';
11
+ import { PageComponent, SharedDirectivesModule, SharedToolbarModule, InfoDrawerComponent } from '@alfresco/aca-shared';
12
+ import { from } from 'rxjs';
13
+ import * as i5 from '@ngrx/effects';
14
+ import { ofType } from '@ngrx/effects';
15
+ import * as i4 from '@alfresco/adf-content-services';
16
+ import { ContentModule, ContentDirectiveModule } from '@alfresco/adf-content-services';
17
+ import * as i6 from '@angular/common';
18
+ import { CommonModule } from '@angular/common';
19
+ import { ExtensionsModule } from '@alfresco/adf-extensions';
20
+
21
+ class PreviewComponent extends PageComponent {
22
+ constructor(contentApi, preferences, route, nodesApiService, actions$, location, appHookService) {
23
+ super();
24
+ this.contentApi = contentApi;
25
+ this.preferences = preferences;
26
+ this.route = route;
27
+ this.nodesApiService = nodesApiService;
28
+ this.actions$ = actions$;
29
+ this.location = location;
30
+ this.appHookService = appHookService;
31
+ this.previewLocation = null;
32
+ this.routesSkipNavigation = ['shared', 'recent-files', 'favorites'];
33
+ this.navigateSource = null;
34
+ this.navigationSources = ['favorites', 'libraries', 'personal-files', 'recent-files', 'shared'];
35
+ this.folderId = null;
36
+ this.nodeId = null;
37
+ this.navigateMultiple = false;
38
+ this.openWith = [];
39
+ this.contentExtensions = [];
40
+ this.showRightSide = false;
41
+ this.navigateBackAsClose = false;
42
+ this.simplestMode = false;
43
+ this.recentFileFilters = [
44
+ 'TYPE:"content"',
45
+ '-PNAME:"0/wiki"',
46
+ '-TYPE:"app:filelink"',
47
+ '-TYPE:"fm:post"',
48
+ '-TYPE:"cm:thumbnail"',
49
+ '-TYPE:"cm:failedThumbnail"',
50
+ '-TYPE:"cm:rating"',
51
+ '-TYPE:"dl:dataList"',
52
+ '-TYPE:"dl:todoList"',
53
+ '-TYPE:"dl:issue"',
54
+ '-TYPE:"dl:contact"',
55
+ '-TYPE:"dl:eventAgenda"',
56
+ '-TYPE:"dl:event"',
57
+ '-TYPE:"dl:task"',
58
+ '-TYPE:"dl:simpletask"',
59
+ '-TYPE:"dl:meetingAgenda"',
60
+ '-TYPE:"dl:location"',
61
+ '-TYPE:"fm:topic"',
62
+ '-TYPE:"fm:post"',
63
+ '-TYPE:"ia:calendarEvent"',
64
+ '-TYPE:"lnk:link"'
65
+ ];
66
+ this.containersSkipNavigation = ['adf-viewer__sidebar', 'cdk-overlay-container', 'adf-image-viewer'];
67
+ }
68
+ ngOnInit() {
69
+ super.ngOnInit();
70
+ from(this.infoDrawerOpened$)
71
+ .pipe(takeUntil(this.onDestroy$))
72
+ .subscribe((val) => {
73
+ this.showRightSide = val;
74
+ });
75
+ this.previewLocation = this.router.url.substr(0, this.router.url.indexOf('/', 1)).replace(/\//g, '');
76
+ const routeData = this.route.snapshot.data;
77
+ this.navigateBackAsClose = !!routeData.navigateBackAsClose;
78
+ this.simplestMode = !!routeData.simplestMode;
79
+ if (routeData.navigateMultiple) {
80
+ this.navigateMultiple = true;
81
+ }
82
+ if (routeData.navigateSource) {
83
+ const source = routeData.navigateSource.toLowerCase();
84
+ if (this.navigationSources.includes(source)) {
85
+ this.navigateSource = routeData.navigateSource;
86
+ }
87
+ }
88
+ this.route.params.subscribe((params) => {
89
+ this.folderId = params.folderId;
90
+ const id = params.nodeId;
91
+ if (id) {
92
+ this.displayNode(id);
93
+ }
94
+ });
95
+ this.subscriptions = this.subscriptions.concat([
96
+ this.appHookService.nodesDeleted.subscribe(() => this.navigateToFileLocation(true)),
97
+ this.uploadService.fileUploadDeleted.subscribe(() => this.navigateToFileLocation(true)),
98
+ this.uploadService.fileUploadComplete.pipe(debounceTime(300)).subscribe((file) => this.nodesApiService.nodeUpdated.next(file.data.entry)),
99
+ this.actions$
100
+ .pipe(ofType(ViewerActionTypes.ClosePreview), map(() => this.navigateToFileLocation(true)))
101
+ .subscribe(() => { })
102
+ ]);
103
+ this.extensions
104
+ .getOpenWithActions()
105
+ .pipe(takeUntil(this.onDestroy$))
106
+ .subscribe((actions) => {
107
+ this.openWith = actions;
108
+ });
109
+ }
110
+ ngOnDestroy() {
111
+ super.ngOnDestroy();
112
+ }
113
+ /**
114
+ * Loads the particular node into the Viewer
115
+ *
116
+ * @param id Unique identifier for the Node to display
117
+ */
118
+ displayNode(id) {
119
+ return __awaiter(this, void 0, void 0, function* () {
120
+ if (id) {
121
+ try {
122
+ this.node = yield this.contentApi.getNodeInfo(id).toPromise();
123
+ this.store.dispatch(new SetSelectedNodesAction([{ entry: this.node }]));
124
+ if (this.node && this.node.isFile) {
125
+ const nearest = yield this.getNearestNodes(this.node.id, this.node.parentId);
126
+ this.previousNodeId = nearest.left;
127
+ this.nextNodeId = nearest.right;
128
+ this.nodeId = this.node.id;
129
+ return;
130
+ }
131
+ yield this.router.navigate([this.previewLocation, id]);
132
+ }
133
+ catch (err) {
134
+ if (!err || err.status !== 401) {
135
+ yield this.router.navigate([this.previewLocation, id]);
136
+ }
137
+ }
138
+ }
139
+ });
140
+ }
141
+ handleKeyboardEvent(event) {
142
+ const key = event.keyCode;
143
+ const rightArrow = 39;
144
+ const leftArrow = 37;
145
+ if (key === rightArrow || key === leftArrow) {
146
+ event.preventDefault();
147
+ event.stopImmediatePropagation();
148
+ }
149
+ }
150
+ /**
151
+ * Handles the visibility change of the Viewer component.
152
+ *
153
+ * @param isVisible Indicator whether Viewer is visible or hidden.
154
+ */
155
+ onVisibilityChanged(isVisible) {
156
+ const shouldNavigate = !isVisible;
157
+ this.navigateToFileLocation(shouldNavigate);
158
+ }
159
+ navigateToFileLocation(shouldNavigate) {
160
+ if (shouldNavigate) {
161
+ if (this.navigateBackAsClose) {
162
+ this.location.back();
163
+ }
164
+ else {
165
+ const shouldSkipNavigation = this.routesSkipNavigation.includes(this.previewLocation);
166
+ const route = this.getNavigationCommands(this.previewLocation);
167
+ if (!shouldSkipNavigation && this.folderId) {
168
+ route.push(this.folderId);
169
+ }
170
+ this.router.navigate(route);
171
+ }
172
+ }
173
+ }
174
+ /** Handles navigation to a previous document */
175
+ onNavigateBefore(event) {
176
+ if (event.type !== 'click' && this.shouldNavigate(event.target)) {
177
+ return;
178
+ }
179
+ if (this.previousNodeId) {
180
+ this.router.navigate(this.getPreviewPath(this.folderId, this.previousNodeId));
181
+ }
182
+ }
183
+ /** Handles navigation to a next document */
184
+ onNavigateNext(event) {
185
+ if (event.type !== 'click' && this.shouldNavigate(event.target)) {
186
+ return;
187
+ }
188
+ if (this.nextNodeId) {
189
+ this.router.navigate(this.getPreviewPath(this.folderId, this.nextNodeId));
190
+ }
191
+ }
192
+ /**
193
+ * Generates a node preview route based on folder and node IDs.
194
+ *
195
+ * @param folderId Folder ID
196
+ * @param nodeId Node ID
197
+ */
198
+ getPreviewPath(folderId, nodeId) {
199
+ const route = [this.previewLocation];
200
+ if (folderId) {
201
+ route.push(folderId);
202
+ }
203
+ if (nodeId) {
204
+ route.push('preview', nodeId);
205
+ }
206
+ return route;
207
+ }
208
+ /**
209
+ * Retrieves nearest node information for the given node and folder.
210
+ *
211
+ * @param nodeId Unique identifier of the document node
212
+ * @param folderId Unique identifier of the containing folder node.
213
+ */
214
+ getNearestNodes(nodeId, folderId) {
215
+ return __awaiter(this, void 0, void 0, function* () {
216
+ const empty = {
217
+ left: null,
218
+ right: null
219
+ };
220
+ if (nodeId && folderId) {
221
+ try {
222
+ const ids = yield this.getFileIds(this.navigateSource, folderId);
223
+ const idx = ids.indexOf(nodeId);
224
+ if (idx >= 0) {
225
+ return {
226
+ left: ids[idx - 1] || null,
227
+ right: ids[idx + 1] || null
228
+ };
229
+ }
230
+ else {
231
+ return empty;
232
+ }
233
+ }
234
+ catch (_a) {
235
+ return empty;
236
+ }
237
+ }
238
+ else {
239
+ return empty;
240
+ }
241
+ });
242
+ }
243
+ /**
244
+ * Retrieves a list of node identifiers for the folder and data source.
245
+ *
246
+ * @param source Data source name. Allowed values are: personal-files, libraries, favorites, shared, recent-files.
247
+ * @param folderId Containing folder node identifier for 'personal-files' and 'libraries' sources.
248
+ */
249
+ getFileIds(source, folderId) {
250
+ return __awaiter(this, void 0, void 0, function* () {
251
+ if ((source === 'personal-files' || source === 'libraries') && folderId) {
252
+ const sortKey = this.preferences.get('personal-files.sorting.key') || 'modifiedAt';
253
+ const sortDirection = this.preferences.get('personal-files.sorting.direction') || 'desc';
254
+ const nodes = yield this.contentApi
255
+ .getNodeChildren(folderId, {
256
+ // orderBy: `${sortKey} ${sortDirection}`,
257
+ fields: ['id', this.getRootField(sortKey)],
258
+ where: '(isFile=true)'
259
+ })
260
+ .toPromise();
261
+ const entries = nodes.list.entries.map((obj) => obj.entry);
262
+ this.sort(entries, sortKey, sortDirection);
263
+ return entries.map((obj) => obj.id);
264
+ }
265
+ if (source === 'favorites') {
266
+ const nodes = yield this.contentApi
267
+ .getFavorites('-me-', {
268
+ where: '(EXISTS(target/file))',
269
+ fields: ['target']
270
+ })
271
+ .toPromise();
272
+ const sortKey = this.preferences.get('favorites.sorting.key') || 'modifiedAt';
273
+ const sortDirection = this.preferences.get('favorites.sorting.direction') || 'desc';
274
+ const files = nodes.list.entries.map((obj) => obj.entry.target.file);
275
+ this.sort(files, sortKey, sortDirection);
276
+ return files.map((f) => f.id);
277
+ }
278
+ if (source === 'shared') {
279
+ const sortingKey = this.preferences.get('shared.sorting.key') || 'modifiedAt';
280
+ const sortingDirection = this.preferences.get('shared.sorting.direction') || 'desc';
281
+ const nodes = yield this.contentApi
282
+ .findSharedLinks({
283
+ fields: ['nodeId', this.getRootField(sortingKey)]
284
+ })
285
+ .toPromise();
286
+ const entries = nodes.list.entries.map((obj) => obj.entry);
287
+ this.sort(entries, sortingKey, sortingDirection);
288
+ return entries.map((obj) => obj.nodeId);
289
+ }
290
+ if (source === 'recent-files') {
291
+ const person = yield this.contentApi.getPerson('-me-').toPromise();
292
+ const username = person.entry.id;
293
+ const sortingKey = this.preferences.get('recent-files.sorting.key') || 'modifiedAt';
294
+ const sortingDirection = this.preferences.get('recent-files.sorting.direction') || 'desc';
295
+ const query = {
296
+ query: {
297
+ query: '*',
298
+ language: 'afts'
299
+ },
300
+ filterQueries: [
301
+ { query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },
302
+ { query: `cm:modifier:${username} OR cm:creator:${username}` },
303
+ {
304
+ query: this.recentFileFilters.join(' AND ')
305
+ }
306
+ ],
307
+ fields: ['id', this.getRootField(sortingKey)],
308
+ include: ['path', 'properties', 'allowableOperations'],
309
+ sort: [
310
+ {
311
+ type: 'FIELD',
312
+ field: 'cm:modified',
313
+ ascending: false
314
+ }
315
+ ]
316
+ };
317
+ const nodes = yield this.contentApi.search(query).toPromise();
318
+ const entries = nodes.list.entries.map((obj) => obj.entry);
319
+ this.sort(entries, sortingKey, sortingDirection);
320
+ return entries.map((obj) => obj.id);
321
+ }
322
+ return [];
323
+ });
324
+ }
325
+ sort(items, key, direction) {
326
+ const options = {};
327
+ if (key.includes('sizeInBytes') || key === 'name') {
328
+ options.numeric = true;
329
+ }
330
+ items.sort((a, b) => {
331
+ let left = ObjectUtils.getValue(a, key);
332
+ if (left) {
333
+ left = left instanceof Date ? left.valueOf().toString() : left.toString();
334
+ }
335
+ else {
336
+ left = '';
337
+ }
338
+ let right = ObjectUtils.getValue(b, key);
339
+ if (right) {
340
+ right = right instanceof Date ? right.valueOf().toString() : right.toString();
341
+ }
342
+ else {
343
+ right = '';
344
+ }
345
+ return direction === 'asc' ? left.localeCompare(right, undefined, options) : right.localeCompare(left, undefined, options);
346
+ });
347
+ }
348
+ /**
349
+ * Get the root field name from the property path.
350
+ * Example: 'property1.some.child.property' => 'property1'
351
+ *
352
+ * @param path Property path
353
+ */
354
+ getRootField(path) {
355
+ if (path) {
356
+ return path.split('.')[0];
357
+ }
358
+ return path;
359
+ }
360
+ getNavigationCommands(url) {
361
+ const urlTree = this.router.parseUrl(url);
362
+ const urlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];
363
+ if (!urlSegmentGroup) {
364
+ return [url];
365
+ }
366
+ const urlSegments = urlSegmentGroup.segments;
367
+ return urlSegments.reduce(function (acc, item) {
368
+ acc.push(item.path, item.parameters);
369
+ return acc;
370
+ }, []);
371
+ }
372
+ shouldNavigate(element) {
373
+ let currentElement = element.parentElement;
374
+ while (currentElement && !this.isChild(currentElement.classList)) {
375
+ currentElement = currentElement.parentElement;
376
+ }
377
+ return !!currentElement;
378
+ }
379
+ isChild(list) {
380
+ return Array.from(list).some((className) => this.containersSkipNavigation.includes(className));
381
+ }
382
+ }
383
+ PreviewComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PreviewComponent, deps: [{ token: i1.ContentApiService }, { token: i2.UserPreferencesService }, { token: i3.ActivatedRoute }, { token: i4.NodesApiService }, { token: i5.Actions }, { token: i6.Location }, { token: i1.AppHookService }], target: i0.ɵɵFactoryTarget.Component });
384
+ PreviewComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.1.3", type: PreviewComponent, selector: "app-preview", host: { listeners: { "document:keydown": "handleKeyboardEvent($event)" }, classAttribute: "app-preview" }, usesInheritance: true, ngImport: i0, template: "<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'right_side--hide': !showRightSide\n }\"\n [nodeId]=\"nodeId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n [overlayMode]=\"true\"\n (showViewerChange)=\"onVisibilityChanged($event)\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions *ngIf=\"!simplestMode\">\n <ng-container *ngFor=\"let action of viewerToolbarActions; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"action\"></aca-toolbar-action>\n </ng-container>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n", styles: [".app-preview{width:100%;height:100%}.adf-viewer-toolbar .adf-toolbar-divider{display:none}.adf-viewer-toolbar-actions{display:flex;flex-direction:row;align-items:center}.adf-viewer-toolbar-actions .adf-toolbar-divider{display:inline}.adf-viewer-toolbar .mat-toolbar>button:last-child{display:none}.adf-alfresco-viewer.right_side--hide .adf-viewer__sidebar__right{width:0}\n"], dependencies: [{ kind: "directive", type: i6.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i6.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i6.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.ViewerSidebarComponent, selector: "adf-viewer-sidebar" }, { kind: "component", type: i2.ViewerOpenWithComponent, selector: "adf-viewer-open-with" }, { kind: "component", type: i2.ViewerToolbarActionsComponent, selector: "adf-viewer-toolbar-actions" }, { kind: "component", type: i4.AlfrescoViewerComponent, selector: "adf-alfresco-viewer", inputs: ["nodeId", "versionId", "sharedLinkId", "showViewer", "maxRetries", "allowGoBack", "showToolbar", "overlayMode", "allowNavigate", "canNavigateBefore", "canNavigateNext", "allowLeftSidebar", "allowRightSidebar", "showRightSidebar", "showLeftSidebar", "allowDownload", "allowPrint", "allowFullScreen", "sidebarRightTemplate", "sidebarLeftTemplate"], outputs: ["invalidSharedLink", "navigateBefore", "navigateNext", "showViewerChange"] }, { kind: "component", type: i1.ToolbarActionComponent, selector: "aca-toolbar-action", inputs: ["data", "type", "color", "actionRef"] }, { kind: "component", type: i1.ToolbarMenuItemComponent, selector: "app-toolbar-menu-item", inputs: ["actionRef", "menuId"] }, { kind: "component", type: i1.InfoDrawerComponent, selector: "aca-info-drawer", inputs: ["nodeId", "node"] }, { kind: "pipe", type: i6.AsyncPipe, name: "async" }], encapsulation: i0.ViewEncapsulation.None });
385
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PreviewComponent, decorators: [{
386
+ type: Component,
387
+ args: [{ selector: 'app-preview', encapsulation: ViewEncapsulation.None, host: { class: 'app-preview' }, template: "<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'right_side--hide': !showRightSide\n }\"\n [nodeId]=\"nodeId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n [overlayMode]=\"true\"\n (showViewerChange)=\"onVisibilityChanged($event)\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions *ngIf=\"!simplestMode\">\n <ng-container *ngFor=\"let action of viewerToolbarActions; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"action\"></aca-toolbar-action>\n </ng-container>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n", styles: [".app-preview{width:100%;height:100%}.adf-viewer-toolbar .adf-toolbar-divider{display:none}.adf-viewer-toolbar-actions{display:flex;flex-direction:row;align-items:center}.adf-viewer-toolbar-actions .adf-toolbar-divider{display:inline}.adf-viewer-toolbar .mat-toolbar>button:last-child{display:none}.adf-alfresco-viewer.right_side--hide .adf-viewer__sidebar__right{width:0}\n"] }]
388
+ }], ctorParameters: function () { return [{ type: i1.ContentApiService }, { type: i2.UserPreferencesService }, { type: i3.ActivatedRoute }, { type: i4.NodesApiService }, { type: i5.Actions }, { type: i6.Location }, { type: i1.AppHookService }]; }, propDecorators: { handleKeyboardEvent: [{
389
+ type: HostListener,
390
+ args: ['document:keydown', ['$event']]
391
+ }] } });
392
+
393
+ /*!
394
+ * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
395
+ *
396
+ * Alfresco Example Content Application
397
+ *
398
+ * This file is part of the Alfresco Example Content Application.
399
+ * If the software was purchased under a paid Alfresco license, the terms of
400
+ * the paid license agreement will prevail. Otherwise, the software is
401
+ * provided under the following open source license terms:
402
+ *
403
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
404
+ * it under the terms of the GNU Lesser General Public License as published by
405
+ * the Free Software Foundation, either version 3 of the License, or
406
+ * (at your option) any later version.
407
+ *
408
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
409
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
410
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
411
+ * GNU Lesser General Public License for more details.
412
+ *
413
+ * You should have received a copy of the GNU Lesser General Public License
414
+ * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
415
+ */
416
+ const routes = [
417
+ {
418
+ path: '',
419
+ component: PreviewComponent,
420
+ data: {
421
+ title: 'APP.PREVIEW.TITLE',
422
+ navigateMultiple: true
423
+ }
424
+ }
425
+ ];
426
+ class PreviewModule {
427
+ }
428
+ PreviewModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PreviewModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
429
+ PreviewModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.1.3", ngImport: i0, type: PreviewModule, declarations: [PreviewComponent], imports: [CommonModule, i3.RouterModule, i2.CoreModule, ExtensionsModule,
430
+ ContentModule,
431
+ ContentDirectiveModule,
432
+ SharedDirectivesModule,
433
+ ContentDirectiveModule,
434
+ SharedToolbarModule,
435
+ InfoDrawerComponent], exports: [PreviewComponent] });
436
+ PreviewModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PreviewModule, imports: [CommonModule,
437
+ RouterModule.forChild(routes),
438
+ CoreModule.forChild(),
439
+ ExtensionsModule,
440
+ ContentModule,
441
+ ContentDirectiveModule,
442
+ SharedDirectivesModule,
443
+ ContentDirectiveModule,
444
+ SharedToolbarModule,
445
+ InfoDrawerComponent] });
446
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.1.3", ngImport: i0, type: PreviewModule, decorators: [{
447
+ type: NgModule,
448
+ args: [{
449
+ imports: [
450
+ CommonModule,
451
+ RouterModule.forChild(routes),
452
+ CoreModule.forChild(),
453
+ ExtensionsModule,
454
+ ContentModule,
455
+ ContentDirectiveModule,
456
+ SharedDirectivesModule,
457
+ ContentDirectiveModule,
458
+ SharedToolbarModule,
459
+ InfoDrawerComponent
460
+ ],
461
+ declarations: [PreviewComponent],
462
+ exports: [PreviewComponent]
463
+ }]
464
+ }] });
465
+
466
+ /*!
467
+ * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
468
+ *
469
+ * Alfresco Example Content Application
470
+ *
471
+ * This file is part of the Alfresco Example Content Application.
472
+ * If the software was purchased under a paid Alfresco license, the terms of
473
+ * the paid license agreement will prevail. Otherwise, the software is
474
+ * provided under the following open source license terms:
475
+ *
476
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
477
+ * it under the terms of the GNU Lesser General Public License as published by
478
+ * the Free Software Foundation, either version 3 of the License, or
479
+ * (at your option) any later version.
480
+ *
481
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
482
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
483
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
484
+ * GNU Lesser General Public License for more details.
485
+ *
486
+ * You should have received a copy of the GNU Lesser General Public License
487
+ * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
488
+ */
489
+
490
+ /**
491
+ * Generated bundle index. Do not edit.
492
+ */
493
+
494
+ export { PreviewComponent, PreviewModule };
495
+ //# sourceMappingURL=alfresco-aca-content-preview.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"alfresco-aca-content-preview.mjs","sources":["../../../../projects/aca-content/preview/src/lib/components/preview.component.ts","../../../../projects/aca-content/preview/src/lib/components/preview.component.html","../../../../projects/aca-content/preview/src/lib/preview.module.ts","../../../../projects/aca-content/preview/src/public-api.ts","../../../../projects/aca-content/preview/src/alfresco-aca-content-preview.ts"],"sourcesContent":["/*!\n * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Alfresco Example Content Application\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Component, OnInit, OnDestroy, ViewEncapsulation, HostListener } from '@angular/core';\nimport { Location } from '@angular/common';\nimport { ActivatedRoute, UrlTree, UrlSegmentGroup, UrlSegment, PRIMARY_OUTLET } from '@angular/router';\nimport { debounceTime, map, takeUntil } from 'rxjs/operators';\nimport { UserPreferencesService, ObjectUtils } from '@alfresco/adf-core';\nimport { ClosePreviewAction, ViewerActionTypes, SetSelectedNodesAction } from '@alfresco/aca-shared/store';\nimport { PageComponent, AppHookService, ContentApiService } from '@alfresco/aca-shared';\nimport { ContentActionRef, ViewerExtensionRef } from '@alfresco/adf-extensions';\nimport { SearchRequest } from '@alfresco/js-api';\nimport { from } from 'rxjs';\nimport { Actions, ofType } from '@ngrx/effects';\nimport { NodesApiService } from '@alfresco/adf-content-services';\n\n@Component({\n selector: 'app-preview',\n templateUrl: './preview.component.html',\n styleUrls: ['./preview.component.scss'],\n encapsulation: ViewEncapsulation.None,\n host: { class: 'app-preview' }\n})\nexport class PreviewComponent extends PageComponent implements OnInit, OnDestroy {\n previewLocation: string = null;\n routesSkipNavigation = ['shared', 'recent-files', 'favorites'];\n navigateSource: string = null;\n navigationSources = ['favorites', 'libraries', 'personal-files', 'recent-files', 'shared'];\n folderId: string = null;\n nodeId: string = null;\n previousNodeId: string;\n nextNodeId: string;\n navigateMultiple = false;\n openWith: Array<ContentActionRef> = [];\n contentExtensions: Array<ViewerExtensionRef> = [];\n showRightSide = false;\n navigateBackAsClose = false;\n simplestMode = false;\n\n recentFileFilters = [\n 'TYPE:\"content\"',\n '-PNAME:\"0/wiki\"',\n '-TYPE:\"app:filelink\"',\n '-TYPE:\"fm:post\"',\n '-TYPE:\"cm:thumbnail\"',\n '-TYPE:\"cm:failedThumbnail\"',\n '-TYPE:\"cm:rating\"',\n '-TYPE:\"dl:dataList\"',\n '-TYPE:\"dl:todoList\"',\n '-TYPE:\"dl:issue\"',\n '-TYPE:\"dl:contact\"',\n '-TYPE:\"dl:eventAgenda\"',\n '-TYPE:\"dl:event\"',\n '-TYPE:\"dl:task\"',\n '-TYPE:\"dl:simpletask\"',\n '-TYPE:\"dl:meetingAgenda\"',\n '-TYPE:\"dl:location\"',\n '-TYPE:\"fm:topic\"',\n '-TYPE:\"fm:post\"',\n '-TYPE:\"ia:calendarEvent\"',\n '-TYPE:\"lnk:link\"'\n ];\n\n private containersSkipNavigation = ['adf-viewer__sidebar', 'cdk-overlay-container', 'adf-image-viewer'];\n\n constructor(\n private contentApi: ContentApiService,\n private preferences: UserPreferencesService,\n private route: ActivatedRoute,\n private nodesApiService: NodesApiService,\n private actions$: Actions,\n private location: Location,\n private appHookService: AppHookService\n ) {\n super();\n }\n\n ngOnInit() {\n super.ngOnInit();\n\n from(this.infoDrawerOpened$)\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((val) => {\n this.showRightSide = val;\n });\n\n this.previewLocation = this.router.url.substr(0, this.router.url.indexOf('/', 1)).replace(/\\//g, '');\n\n const routeData = this.route.snapshot.data;\n this.navigateBackAsClose = !!routeData.navigateBackAsClose;\n this.simplestMode = !!routeData.simplestMode;\n\n if (routeData.navigateMultiple) {\n this.navigateMultiple = true;\n }\n\n if (routeData.navigateSource) {\n const source = routeData.navigateSource.toLowerCase();\n if (this.navigationSources.includes(source)) {\n this.navigateSource = routeData.navigateSource;\n }\n }\n\n this.route.params.subscribe((params) => {\n this.folderId = params.folderId;\n const id = params.nodeId;\n if (id) {\n this.displayNode(id);\n }\n });\n\n this.subscriptions = this.subscriptions.concat([\n this.appHookService.nodesDeleted.subscribe(() => this.navigateToFileLocation(true)),\n\n this.uploadService.fileUploadDeleted.subscribe(() => this.navigateToFileLocation(true)),\n\n this.uploadService.fileUploadComplete.pipe(debounceTime(300)).subscribe((file) => this.nodesApiService.nodeUpdated.next(file.data.entry)),\n\n this.actions$\n .pipe(\n ofType<ClosePreviewAction>(ViewerActionTypes.ClosePreview),\n map(() => this.navigateToFileLocation(true))\n )\n .subscribe(() => {})\n ]);\n\n this.extensions\n .getOpenWithActions()\n .pipe(takeUntil(this.onDestroy$))\n .subscribe((actions) => {\n this.openWith = actions;\n });\n }\n\n ngOnDestroy() {\n super.ngOnDestroy();\n }\n\n /**\n * Loads the particular node into the Viewer\n *\n * @param id Unique identifier for the Node to display\n */\n async displayNode(id: string) {\n if (id) {\n try {\n this.node = await this.contentApi.getNodeInfo(id).toPromise();\n this.store.dispatch(new SetSelectedNodesAction([{ entry: this.node }]));\n\n if (this.node && this.node.isFile) {\n const nearest = await this.getNearestNodes(this.node.id, this.node.parentId);\n\n this.previousNodeId = nearest.left;\n this.nextNodeId = nearest.right;\n this.nodeId = this.node.id;\n return;\n }\n await this.router.navigate([this.previewLocation, id]);\n } catch (err) {\n if (!err || err.status !== 401) {\n await this.router.navigate([this.previewLocation, id]);\n }\n }\n }\n }\n\n @HostListener('document:keydown', ['$event'])\n handleKeyboardEvent(event: KeyboardEvent) {\n const key = event.keyCode;\n const rightArrow = 39;\n const leftArrow = 37;\n\n if (key === rightArrow || key === leftArrow) {\n event.preventDefault();\n event.stopImmediatePropagation();\n }\n }\n\n /**\n * Handles the visibility change of the Viewer component.\n *\n * @param isVisible Indicator whether Viewer is visible or hidden.\n */\n onVisibilityChanged(isVisible: boolean): void {\n const shouldNavigate = !isVisible;\n this.navigateToFileLocation(shouldNavigate);\n }\n\n navigateToFileLocation(shouldNavigate: boolean) {\n if (shouldNavigate) {\n if (this.navigateBackAsClose) {\n this.location.back();\n } else {\n const shouldSkipNavigation = this.routesSkipNavigation.includes(this.previewLocation);\n const route = this.getNavigationCommands(this.previewLocation);\n\n if (!shouldSkipNavigation && this.folderId) {\n route.push(this.folderId);\n }\n this.router.navigate(route);\n }\n }\n }\n\n /** Handles navigation to a previous document */\n onNavigateBefore(event: MouseEvent | KeyboardEvent): void {\n if (event.type !== 'click' && this.shouldNavigate(event.target as HTMLElement)) {\n return;\n }\n\n if (this.previousNodeId) {\n this.router.navigate(this.getPreviewPath(this.folderId, this.previousNodeId));\n }\n }\n\n /** Handles navigation to a next document */\n onNavigateNext(event: MouseEvent | KeyboardEvent): void {\n if (event.type !== 'click' && this.shouldNavigate(event.target as HTMLElement)) {\n return;\n }\n\n if (this.nextNodeId) {\n this.router.navigate(this.getPreviewPath(this.folderId, this.nextNodeId));\n }\n }\n\n /**\n * Generates a node preview route based on folder and node IDs.\n *\n * @param folderId Folder ID\n * @param nodeId Node ID\n */\n getPreviewPath(folderId: string, nodeId: string): any[] {\n const route = [this.previewLocation];\n\n if (folderId) {\n route.push(folderId);\n }\n\n if (nodeId) {\n route.push('preview', nodeId);\n }\n\n return route;\n }\n\n /**\n * Retrieves nearest node information for the given node and folder.\n *\n * @param nodeId Unique identifier of the document node\n * @param folderId Unique identifier of the containing folder node.\n */\n async getNearestNodes(nodeId: string, folderId: string): Promise<{ left: string; right: string }> {\n const empty = {\n left: null,\n right: null\n };\n\n if (nodeId && folderId) {\n try {\n const ids = await this.getFileIds(this.navigateSource, folderId);\n const idx = ids.indexOf(nodeId);\n\n if (idx >= 0) {\n return {\n left: ids[idx - 1] || null,\n right: ids[idx + 1] || null\n };\n } else {\n return empty;\n }\n } catch {\n return empty;\n }\n } else {\n return empty;\n }\n }\n\n /**\n * Retrieves a list of node identifiers for the folder and data source.\n *\n * @param source Data source name. Allowed values are: personal-files, libraries, favorites, shared, recent-files.\n * @param folderId Containing folder node identifier for 'personal-files' and 'libraries' sources.\n */\n async getFileIds(source: string, folderId?: string): Promise<string[]> {\n if ((source === 'personal-files' || source === 'libraries') && folderId) {\n const sortKey = this.preferences.get('personal-files.sorting.key') || 'modifiedAt';\n const sortDirection = this.preferences.get('personal-files.sorting.direction') || 'desc';\n const nodes = await this.contentApi\n .getNodeChildren(folderId, {\n // orderBy: `${sortKey} ${sortDirection}`,\n fields: ['id', this.getRootField(sortKey)],\n where: '(isFile=true)'\n })\n .toPromise();\n\n const entries = nodes.list.entries.map((obj) => obj.entry);\n this.sort(entries, sortKey, sortDirection);\n\n return entries.map((obj) => obj.id);\n }\n\n if (source === 'favorites') {\n const nodes = await this.contentApi\n .getFavorites('-me-', {\n where: '(EXISTS(target/file))',\n fields: ['target']\n })\n .toPromise();\n\n const sortKey = this.preferences.get('favorites.sorting.key') || 'modifiedAt';\n const sortDirection = this.preferences.get('favorites.sorting.direction') || 'desc';\n const files = nodes.list.entries.map((obj) => obj.entry.target.file);\n this.sort(files, sortKey, sortDirection);\n\n return files.map((f) => f.id);\n }\n\n if (source === 'shared') {\n const sortingKey = this.preferences.get('shared.sorting.key') || 'modifiedAt';\n const sortingDirection = this.preferences.get('shared.sorting.direction') || 'desc';\n\n const nodes = await this.contentApi\n .findSharedLinks({\n fields: ['nodeId', this.getRootField(sortingKey)]\n })\n .toPromise();\n\n const entries = nodes.list.entries.map((obj) => obj.entry);\n this.sort(entries, sortingKey, sortingDirection);\n\n return entries.map((obj) => obj.nodeId);\n }\n\n if (source === 'recent-files') {\n const person = await this.contentApi.getPerson('-me-').toPromise();\n const username = person.entry.id;\n const sortingKey = this.preferences.get('recent-files.sorting.key') || 'modifiedAt';\n const sortingDirection = this.preferences.get('recent-files.sorting.direction') || 'desc';\n\n const query: SearchRequest = {\n query: {\n query: '*',\n language: 'afts'\n },\n filterQueries: [\n { query: `cm:modified:[NOW/DAY-30DAYS TO NOW/DAY+1DAY]` },\n { query: `cm:modifier:${username} OR cm:creator:${username}` },\n {\n query: this.recentFileFilters.join(' AND ')\n }\n ],\n fields: ['id', this.getRootField(sortingKey)],\n include: ['path', 'properties', 'allowableOperations'],\n sort: [\n {\n type: 'FIELD',\n field: 'cm:modified',\n ascending: false\n }\n ]\n };\n const nodes = await this.contentApi.search(query).toPromise();\n\n const entries = nodes.list.entries.map((obj) => obj.entry);\n this.sort(entries, sortingKey, sortingDirection);\n\n return entries.map((obj) => obj.id);\n }\n\n return [];\n }\n\n private sort(items: any[], key: string, direction: string) {\n const options: Intl.CollatorOptions = {};\n\n if (key.includes('sizeInBytes') || key === 'name') {\n options.numeric = true;\n }\n\n items.sort((a: any, b: any) => {\n let left = ObjectUtils.getValue(a, key);\n if (left) {\n left = left instanceof Date ? left.valueOf().toString() : left.toString();\n } else {\n left = '';\n }\n\n let right = ObjectUtils.getValue(b, key);\n if (right) {\n right = right instanceof Date ? right.valueOf().toString() : right.toString();\n } else {\n right = '';\n }\n\n return direction === 'asc' ? left.localeCompare(right, undefined, options) : right.localeCompare(left, undefined, options);\n });\n }\n\n /**\n * Get the root field name from the property path.\n * Example: 'property1.some.child.property' => 'property1'\n *\n * @param path Property path\n */\n getRootField(path: string) {\n if (path) {\n return path.split('.')[0];\n }\n return path;\n }\n\n private getNavigationCommands(url: string): any[] {\n const urlTree: UrlTree = this.router.parseUrl(url);\n const urlSegmentGroup: UrlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];\n\n if (!urlSegmentGroup) {\n return [url];\n }\n\n const urlSegments: UrlSegment[] = urlSegmentGroup.segments;\n\n return urlSegments.reduce(function (acc, item) {\n acc.push(item.path, item.parameters);\n return acc;\n }, []);\n }\n\n private shouldNavigate(element: HTMLElement): boolean {\n let currentElement = element.parentElement;\n\n while (currentElement && !this.isChild(currentElement.classList)) {\n currentElement = currentElement.parentElement;\n }\n\n return !!currentElement;\n }\n\n private isChild(list: DOMTokenList): boolean {\n return Array.from(list).some((className: string) => this.containersSkipNavigation.includes(className));\n }\n}\n","<ng-container *ngIf=\"nodeId\">\n <adf-alfresco-viewer\n [ngClass]=\"{\n 'right_side--hide': !showRightSide\n }\"\n [nodeId]=\"nodeId\"\n [allowNavigate]=\"navigateMultiple\"\n [allowRightSidebar]=\"true\"\n [allowPrint]=\"false\"\n [showRightSidebar]=\"true\"\n [allowDownload]=\"false\"\n [allowFullScreen]=\"false\"\n [canNavigateBefore]=\"!!previousNodeId\"\n [canNavigateNext]=\"!!nextNodeId\"\n [overlayMode]=\"true\"\n (showViewerChange)=\"onVisibilityChanged($event)\"\n (navigateBefore)=\"onNavigateBefore($event)\"\n (navigateNext)=\"onNavigateNext($event)\"\n >\n <adf-viewer-sidebar *ngIf=\"infoDrawerOpened$ | async\">\n <aca-info-drawer [node]=\"selection.file\"></aca-info-drawer>\n </adf-viewer-sidebar>\n\n <adf-viewer-open-with *ngIf=\"openWith.length\">\n <ng-container *ngFor=\"let action of openWith; trackBy: trackByActionId\">\n <app-toolbar-menu-item [actionRef]=\"action\"></app-toolbar-menu-item>\n </ng-container>\n </adf-viewer-open-with>\n\n <adf-viewer-toolbar-actions *ngIf=\"!simplestMode\">\n <ng-container *ngFor=\"let action of viewerToolbarActions; trackBy: trackByActionId\">\n <aca-toolbar-action [actionRef]=\"action\"></aca-toolbar-action>\n </ng-container>\n </adf-viewer-toolbar-actions>\n </adf-alfresco-viewer>\n</ng-container>\n","/*!\n * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Alfresco Example Content Application\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { CoreModule } from '@alfresco/adf-core';\nimport { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { Routes, RouterModule } from '@angular/router';\nimport { ContentDirectiveModule, ContentModule } from '@alfresco/adf-content-services';\nimport { SharedDirectivesModule, SharedToolbarModule, InfoDrawerComponent } from '@alfresco/aca-shared';\nimport { ExtensionsModule } from '@alfresco/adf-extensions';\nimport { PreviewComponent } from './components/preview.component';\n\nconst routes: Routes = [\n {\n path: '',\n component: PreviewComponent,\n data: {\n title: 'APP.PREVIEW.TITLE',\n navigateMultiple: true\n }\n }\n];\n\n@NgModule({\n imports: [\n CommonModule,\n RouterModule.forChild(routes),\n CoreModule.forChild(),\n ExtensionsModule,\n ContentModule,\n ContentDirectiveModule,\n SharedDirectivesModule,\n ContentDirectiveModule,\n SharedToolbarModule,\n InfoDrawerComponent\n ],\n declarations: [PreviewComponent],\n exports: [PreviewComponent]\n})\nexport class PreviewModule {}\n","/*!\n * Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.\n *\n * Alfresco Example Content Application\n *\n * This file is part of the Alfresco Example Content Application.\n * If the software was purchased under a paid Alfresco license, the terms of\n * the paid license agreement will prevail. Otherwise, the software is\n * provided under the following open source license terms:\n *\n * The Alfresco Example Content Application is free software: you can redistribute it and/or modify\n * it under the terms of the GNU Lesser General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * The Alfresco Example Content Application is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU Lesser General Public License for more details.\n *\n * You should have received a copy of the GNU Lesser General Public License\n * from Hyland Software. If not, see <http://www.gnu.org/licenses/>.\n */\n\n/*\n * Public API Surface of aca-preview\n */\n\nexport * from './lib/components/preview.component';\nexport * from './lib/preview.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AA4CM,MAAO,gBAAiB,SAAQ,aAAa,CAAA;AA0CjD,IAAA,WAAA,CACU,UAA6B,EAC7B,WAAmC,EACnC,KAAqB,EACrB,eAAgC,EAChC,QAAiB,EACjB,QAAkB,EAClB,cAA8B,EAAA;AAEtC,QAAA,KAAK,EAAE,CAAC;AARA,QAAA,IAAU,CAAA,UAAA,GAAV,UAAU,CAAmB;AAC7B,QAAA,IAAW,CAAA,WAAA,GAAX,WAAW,CAAwB;AACnC,QAAA,IAAK,CAAA,KAAA,GAAL,KAAK,CAAgB;AACrB,QAAA,IAAe,CAAA,eAAA,GAAf,eAAe,CAAiB;AAChC,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAS;AACjB,QAAA,IAAQ,CAAA,QAAA,GAAR,QAAQ,CAAU;AAClB,QAAA,IAAc,CAAA,cAAA,GAAd,cAAc,CAAgB;AAhDxC,QAAA,IAAe,CAAA,eAAA,GAAW,IAAI,CAAC;QAC/B,IAAoB,CAAA,oBAAA,GAAG,CAAC,QAAQ,EAAE,cAAc,EAAE,WAAW,CAAC,CAAC;AAC/D,QAAA,IAAc,CAAA,cAAA,GAAW,IAAI,CAAC;AAC9B,QAAA,IAAA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