@alfresco/aca-content 8.0.0-28239430264 → 8.0.0-28369290339

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.
@@ -8,7 +8,7 @@ import { DocumentListService, ContentVersionService, DownloadZipDialogComponent,
8
8
  import { ContentApiService, NodePermissionService, AppHookService, AppSettingsService, AppExtensionService, isLocked, LockedByComponent, UserProfileService, AutoDownloadService, PageComponent, GenericErrorComponent, ContextActionsDirective, InfoDrawerComponent, PaginationDirective, PageLayoutComponent, ToolbarComponent, AppService, AppSharedRuleGuard, PluginEnabledGuard, ExtensionsDataLoaderGuard, NavigationHistoryService, ToolbarMenuItemComponent, DocumentBasePageService, provideContentAppExtensions } from '@alfresco/aca-shared';
9
9
  import * as rules from '@alfresco/aca-shared/rules';
10
10
  import { Store, createSelector, provideStore } from '@ngrx/store';
11
- import { INITIAL_APP_STATE, AppActionTypes, NodeActionTypes, getRepositoryStatus, getAppSelection, getCurrentVersion, SetSelectedNodesAction, UnlockWriteAction, NavigateRouteAction, NavigateToParentFolder, ViewNodeVersionAction, RefreshPreviewAction, ShowLoaderAction, getCurrentFolder, SetInfoDrawerStateAction, NavigateUrlAction, ViewerActionTypes, SearchActionTypes, SearchOptionIds, LibraryActionTypes, isAdmin, UploadActionTypes, CreateFromTemplate, TemplateActionTypes, CreateFromTemplateSuccess, ContextMenuActionTypes, SearchAiActionTypes, RouterEffects, ShareNodeAction, UpdateLibraryAction, infoDrawerMetadataAspect, EditOfflineAction, DownloadNodesAction, isInfoDrawerOpened, ToggleInfoDrawerAction, ViewNodeAction, SearchByTermAiAction, ToggleAISearchInput, showLoaderSelector, SetCurrentFolderAction, UploadFileVersionAction, NavigateLibraryAction, SearchByTermAction, getSearchItemsTotalCount, infoDrawerPreview, SetSearchItemsTotalCountAction, NavigateToFolder, ShowInfoDrawerPreviewAction, SetInfoDrawerPreviewStateAction, NavigateToPreviousPage, getFileUploadingDialog, getSideNavState } from '@alfresco/aca-shared/store';
11
+ import { INITIAL_APP_STATE, AppActionTypes, NodeActionTypes, getRepositoryStatus, getAppSelection, getCurrentVersion, SetSelectedNodesAction, UnlockWriteAction, NavigateRouteAction, NavigateToParentFolder, ViewNodeVersionAction, RefreshPreviewAction, ShowLoaderAction, getCurrentFolder, SetInfoDrawerStateAction, NavigateUrlAction, getNodeContentSource, ViewerActionTypes, SearchActionTypes, SearchOptionIds, LibraryActionTypes, isAdmin, UploadActionTypes, CreateFromTemplate, TemplateActionTypes, CreateFromTemplateSuccess, ContextMenuActionTypes, SearchAiActionTypes, RouterEffects, ShareNodeAction, UpdateLibraryAction, infoDrawerMetadataAspect, EditOfflineAction, DownloadNodesAction, isInfoDrawerOpened, ToggleInfoDrawerAction, ViewNodeAction, SearchByTermAiAction, ToggleAISearchInput, showLoaderSelector, SetCurrentFolderAction, UploadFileVersionAction, NavigateLibraryAction, SearchByTermAction, getSearchItemsTotalCount, infoDrawerPreview, SetSearchItemsTotalCountAction, NavigateToFolder, ShowInfoDrawerPreviewAction, SetInfoDrawerPreviewStateAction, NavigateToPreviousPage, getFileUploadingDialog, getSideNavState } from '@alfresco/aca-shared/store';
12
12
  export { INITIAL_APP_STATE } from '@alfresco/aca-shared/store';
13
13
  import { provideRouterStore, FullRouterStateSerializer } from '@ngrx/router-store';
14
14
  import { Actions, createEffect, ofType, provideEffects } from '@ngrx/effects';
@@ -657,6 +657,12 @@ class NodeActionsService {
657
657
  guid: '-mysites-',
658
658
  title: this.translation.instant('APP.BROWSE.LIBRARIES.MENU.MY_LIBRARIES.SIDENAV_LINK.LABEL')
659
659
  }
660
+ },
661
+ {
662
+ entry: {
663
+ guid: '-root-',
664
+ title: this.translation.instant('APP.BROWSE.REPOSITORY_VIEW.TITLE')
665
+ }
660
666
  }
661
667
  ]
662
668
  }
@@ -2452,7 +2458,7 @@ class NodeEffects {
2452
2458
  .pipe(first((event) => event instanceof NavigationEnd))
2453
2459
  .subscribe(() => this.store.dispatch(new SetInfoDrawerStateAction(true)));
2454
2460
  if (action?.payload) {
2455
- const route = 'personal-files/details';
2461
+ const route = this.getDetailsRoute(action.payload.entry);
2456
2462
  this.store.dispatch(new NavigateUrlAction([route, action.payload.entry.id, 'permissions'].join('/')));
2457
2463
  }
2458
2464
  else {
@@ -2461,7 +2467,7 @@ class NodeEffects {
2461
2467
  .pipe(take(1))
2462
2468
  .subscribe((selection) => {
2463
2469
  if (selection && !selection.isEmpty) {
2464
- const route = 'personal-files/details';
2470
+ const route = this.getDetailsRoute(selection.last.entry);
2465
2471
  this.store.dispatch(new NavigateUrlAction([route, selection.last.entry.id, 'permissions'].join('/')));
2466
2472
  }
2467
2473
  });
@@ -2474,8 +2480,8 @@ class NodeEffects {
2474
2480
  this.activatedRoute.queryParams.pipe(take(1)).subscribe((params) => {
2475
2481
  const location = params.location || this.router.url;
2476
2482
  const sanitizedLocation = this.sanitizer.sanitize(SecurityContext.URL, location);
2477
- const route = 'personal-files/details';
2478
2483
  if (action?.payload) {
2484
+ const route = this.getDetailsRoute(action.payload.entry, location);
2479
2485
  this.store.dispatch(new NavigateUrlAction([route, action.payload.entry.id].join('/') + `?location=${sanitizedLocation}`));
2480
2486
  }
2481
2487
  else {
@@ -2484,6 +2490,7 @@ class NodeEffects {
2484
2490
  .pipe(take(1))
2485
2491
  .subscribe((selection) => {
2486
2492
  if (selection && !selection.isEmpty) {
2493
+ const route = this.getDetailsRoute(selection.last.entry, location);
2487
2494
  this.store.dispatch(new NavigateUrlAction([route, selection.last.entry.id].join('/') + `?location=${sanitizedLocation}`));
2488
2495
  }
2489
2496
  });
@@ -2591,6 +2598,10 @@ class NodeEffects {
2591
2598
  }
2592
2599
  }
2593
2600
  }
2601
+ getDetailsRoute(entry, location = this.router.url) {
2602
+ const isRepository = location?.includes('/repository') || getNodeContentSource(entry?.path) === 'repository';
2603
+ return `${isRepository ? 'repository' : 'personal-files'}/details`;
2604
+ }
2594
2605
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NodeEffects, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
2595
2606
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.9", ngImport: i0, type: NodeEffects }); }
2596
2607
  }
@@ -4543,7 +4554,7 @@ class LocationLinkComponent {
4543
4554
  const elements = path.elements.map((e) => e.name);
4544
4555
  // for admin users
4545
4556
  if (elements.length === 1 && elements[0] === 'Company Home') {
4546
- return of('APP.BROWSE.PERSONAL.TITLE');
4557
+ return of('APP.BROWSE.REPOSITORY_VIEW.TITLE');
4547
4558
  }
4548
4559
  // for non-admin users
4549
4560
  if (elements.length === 3 && elements[0] === 'Company Home' && elements[1] === 'User Homes') {
@@ -4570,13 +4581,15 @@ class LocationLinkComponent {
4570
4581
  return;
4571
4582
  }
4572
4583
  let result = null;
4584
+ const contentSource = getNodeContentSource(path);
4573
4585
  const elements = path.elements.map((e) => {
4574
4586
  return { ...e };
4575
4587
  });
4576
4588
  const personalFiles = this.translationService.instant('APP.BROWSE.PERSONAL.TITLE');
4577
4589
  const fileLibraries = this.translationService.instant('APP.BROWSE.LIBRARIES.TITLE');
4590
+ const repository = this.translationService.instant('APP.BROWSE.REPOSITORY_VIEW.TITLE');
4578
4591
  if (elements[0].name === 'Company Home') {
4579
- elements[0].name = personalFiles;
4592
+ elements[0].name = contentSource === 'repository' ? repository : personalFiles;
4580
4593
  if (elements.length > 2) {
4581
4594
  if (elements[1].name === 'Sites') {
4582
4595
  const fragment = elements[2];
@@ -9980,6 +9993,26 @@ const CONTENT_LAYOUT_ROUTES = [
9980
9993
  defaultNodeId: '-root-'
9981
9994
  }
9982
9995
  },
9996
+ {
9997
+ path: 'details/:nodeId',
9998
+ children: [
9999
+ {
10000
+ path: '',
10001
+ component: DetailsComponent,
10002
+ data: {
10003
+ navigateSource: 'repository'
10004
+ }
10005
+ },
10006
+ {
10007
+ path: ':activeTab',
10008
+ component: DetailsComponent,
10009
+ data: {
10010
+ title: 'APP.BROWSE.PERSONAL.PERMISSIONS.TITLE',
10011
+ navigateSource: 'repository'
10012
+ }
10013
+ }
10014
+ ]
10015
+ },
9983
10016
  ...createViewRoutes('repository')
9984
10017
  ]
9985
10018
  },