diff --git a/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.scss b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.scss
index fb8decd0f..215a23036 100644
--- a/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.scss
+++ b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.scss
@@ -1,8 +1,8 @@
@import '../../../ui/mixins';
aca-search-results {
- .aca-search-toolbar-spacer {
- width: 100%;
+ .aca-search-results__toolbar-actions {
+ margin-left: 8px;
}
.adf-search-results {
diff --git a/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.spec.ts b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.spec.ts
index 6875e9654..9c6a0bc66 100644
--- a/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.spec.ts
+++ b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.spec.ts
@@ -75,12 +75,6 @@ describe('SearchLibrariesResultsComponent', () => {
expect(component.onSearchResultLoaded).toHaveBeenCalledWith(emptyPage);
});
- it('should collapsed sidenav by default', () => {
- component.ngOnInit();
-
- expect(appServiceMock.setAppNavbarMode).toHaveBeenCalledWith('collapsed');
- });
-
it('should extract searched word from query params', (done) => {
route.queryParams = of({ q: encodeQuery({ userQuery: 'cm:name:"test*"' }) });
route.queryParams.subscribe(() => {
diff --git a/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts
index 381a4c0c3..e9ef2dceb 100644
--- a/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts
+++ b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts
@@ -29,7 +29,6 @@ import { ActivatedRoute, Params } from '@angular/router';
import { SearchLibrariesQueryBuilderService } from './search-libraries-query-builder.service';
import {
AppHookService,
- AppService,
ContextActionsDirective,
InfoDrawerComponent,
PageComponent,
@@ -81,10 +80,9 @@ export class SearchLibrariesResultsComponent extends PageComponent implements On
columns: DocumentListPresetRef[] = [];
constructor(
- private librariesQueryBuilder: SearchLibrariesQueryBuilderService,
- private route: ActivatedRoute,
- private appHookService: AppHookService,
- private appService: AppService
+ private readonly librariesQueryBuilder: SearchLibrariesQueryBuilderService,
+ private readonly route: ActivatedRoute,
+ private readonly appHookService: AppHookService
) {
super();
@@ -95,7 +93,6 @@ export class SearchLibrariesResultsComponent extends PageComponent implements On
}
ngOnInit() {
- this.appService.setAppNavbarMode('collapsed');
super.ngOnInit();
this.columns = this.extensions.documentListPresets.searchLibraries || [];
diff --git a/projects/aca-content/src/lib/components/search/search-navigation.service.ts b/projects/aca-content/src/lib/components/search/search-navigation.service.ts
index ace058717..a4c816af1 100644
--- a/projects/aca-content/src/lib/components/search/search-navigation.service.ts
+++ b/projects/aca-content/src/lib/components/search/search-navigation.service.ts
@@ -23,7 +23,8 @@
*/
import { Injectable } from '@angular/core';
-import { Router } from '@angular/router';
+import { PRIMARY_OUTLET, Router, UrlSegment, UrlSegmentGroup, UrlTree } from '@angular/router';
+import { extractSearchedWordFromEncodedQuery } from '../../utils/aca-search-utils';
@Injectable({
providedIn: 'root'
@@ -35,6 +36,14 @@ export class SearchNavigationService {
return this._previousRoute;
}
+ get onLibrariesSearchResults(): boolean {
+ return this.router?.url.indexOf('/search-libraries') === 0;
+ }
+
+ get onSearchResults(): boolean {
+ return !this.onLibrariesSearchResults && this.router?.url.indexOf('/search') === 0;
+ }
+
constructor(private router: Router) {}
saveRoute(route: string): void {
@@ -53,4 +62,24 @@ export class SearchNavigationService {
this.saveRoute(this.router.url);
this.router.navigate(['/search']);
}
+
+ getUrlSearchTerm(): string {
+ if (!this.onSearchResults && !this.onLibrariesSearchResults) {
+ return '';
+ }
+
+ const urlTree: UrlTree = this.router.parseUrl(this.router.url);
+ const urlSegmentGroup: UrlSegmentGroup = urlTree.root.children[PRIMARY_OUTLET];
+
+ if (urlSegmentGroup) {
+ const urlSegments: UrlSegment[] = urlSegmentGroup.segments;
+ return extractSearchedWordFromEncodedQuery(urlSegments[0].parameters['q']);
+ }
+
+ return '';
+ }
+
+ isSameSearchTerm(searchedWord: string): boolean {
+ return searchedWord === this.getUrlSearchTerm();
+ }
}
diff --git a/projects/aca-content/src/lib/components/search/search-results/search-results.component.html b/projects/aca-content/src/lib/components/search/search-results/search-results.component.html
index db351cf86..11e27a06a 100644
--- a/projects/aca-content/src/lib/components/search/search-results/search-results.component.html
+++ b/projects/aca-content/src/lib/components/search/search-results/search-results.component.html
@@ -4,8 +4,7 @@
diff --git a/projects/aca-content/src/lib/components/search/search-results/search-results.component.scss b/projects/aca-content/src/lib/components/search/search-results/search-results.component.scss
index 46f802b39..5f3fcd5ca 100644
--- a/projects/aca-content/src/lib/components/search/search-results/search-results.component.scss
+++ b/projects/aca-content/src/lib/components/search/search-results/search-results.component.scss
@@ -8,8 +8,8 @@ aca-search-results {
}
}
- .aca-search-toolbar-spacer {
- width: 100%;
+ .aca-search-results__toolbar-actions {
+ margin-left: 8px;
}
.adf-search-results {
diff --git a/projects/aca-content/src/lib/ui/theme.scss b/projects/aca-content/src/lib/ui/theme.scss
index 2cc235fdd..09988f8c5 100644
--- a/projects/aca-content/src/lib/ui/theme.scss
+++ b/projects/aca-content/src/lib/ui/theme.scss
@@ -30,6 +30,17 @@
subscript-text-size: 12px
)
);
+
+ #{ms.$mat-radio-button} {
+ @include mat.radio-overrides(
+ (
+ selected-icon-color: var(--theme-blue-checkbox-color),
+ selected-hover-icon-color: var(--theme-blue-checkbox-color),
+ selected-focus-icon-color: var(--theme-blue-checkbox-color),
+ selected-pressed-icon-color: var(--theme-blue-checkbox-color)
+ )
+ );
+ }
}
.adf-search-properties-form,
diff --git a/projects/aca-content/src/lib/ui/variables/variables.scss b/projects/aca-content/src/lib/ui/variables/variables.scss
index d4af1824a..6e5f80795 100644
--- a/projects/aca-content/src/lib/ui/variables/variables.scss
+++ b/projects/aca-content/src/lib/ui/variables/variables.scss
@@ -59,7 +59,6 @@ $app-blue-folder: #2a7de1;
// CSS Variables
$defaults: (
--theme-background-color: $background-color,
- --theme-search-background-color: darken($background-color, 1),
--theme-text-color: mat.m2-get-color-from-palette($foreground, text, 0.54),
--theme-sidenav-text-color: mat.m2-get-color-from-palette($foreground, text),
--theme-sidenav-hovered-text-color: mat.m2-get-color-from-palette($foreground, text),
@@ -71,7 +70,6 @@ $defaults: (
--theme-foreground-text-color: mat.m2-get-color-from-palette($foreground, text, 0.72),
--theme-foreground-text-bold-color: mat.m2-get-color-from-palette($foreground, text, 0.87),
--theme-secondary-text-color: mat.m2-get-color-from-palette($foreground, secondary-text),
- --theme-divider-color: mat.m2-get-color-from-palette($foreground, divider, 0.07),
--theme-dialog-background-color: mat.m2-get-color-from-palette($background, dialog),
--theme-header-text-color: mat.m2-get-color-from-palette($foreground, text, 0.87),
--new-button-font-size: 0.9rem,
diff --git a/projects/aca-playwright-shared/src/base-config/playwright.config.ts b/projects/aca-playwright-shared/src/base-config/playwright.config.ts
index 81613238d..68f4bbf62 100644
--- a/projects/aca-playwright-shared/src/base-config/playwright.config.ts
+++ b/projects/aca-playwright-shared/src/base-config/playwright.config.ts
@@ -167,7 +167,7 @@ export const getGlobalConfig: PlaywrightTestConfig = {
testMatch: ['**/*.e2e.ts'],
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
- actionTimeout: 0,
+ actionTimeout: 40 * 1000,
/* Base URL to use in actions like `await page.goto('/')`. */
baseURL: env.PLAYWRIGHT_E2E_HOST,
headless: env.PLAYWRIGHT_HEADLESS === 'true' || !!env.CI,
diff --git a/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules.component.ts b/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules.component.ts
index e433b7b1e..28ae5b974 100644
--- a/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules.component.ts
+++ b/projects/aca-playwright-shared/src/page-objects/components/manageRules/manage-rules.component.ts
@@ -34,7 +34,7 @@ export class ManageRules extends BaseComponent {
public ruleDetailsDeleteButton = this.getChild('#delete-rule-btn');
public ruleDetailsEditButton = this.getChild('#edit-rule-btn');
public ruleDetailsPerformActionsDiv = this.getChild('adf-card-view-selectitem [data-automation-id="select-box"]');
- public rulesEmptyListTitle = this.getChild('.adf-empty-content__title');
+ public rulesEmptyList = this.getChild('adf-empty-content');
public ruleActions = this.getChild('aca-rule-action');
public ruleConditionsInGroup = this.getChild('aca-rule-composite-condition aca-rule-simple-condition');
public ruleDescription = this.getChild('.aca-manage-rules__container__rule-details__header__title__description');
@@ -51,7 +51,7 @@ export class ManageRules extends BaseComponent {
}
async checkIfRuleListEmpty(): Promise {
- return this.rulesEmptyListTitle.isVisible();
+ return this.rulesEmptyList.isVisible();
}
async checkIfRuleIsOnTheList(ruleName: string): Promise {
diff --git a/projects/aca-playwright-shared/src/page-objects/components/search/index.ts b/projects/aca-playwright-shared/src/page-objects/components/search/index.ts
index 3b6091902..456549f3b 100644
--- a/projects/aca-playwright-shared/src/page-objects/components/search/index.ts
+++ b/projects/aca-playwright-shared/src/page-objects/components/search/index.ts
@@ -26,5 +26,4 @@ export * from './search-filters';
export * from './search-filters.component';
export * from './search-input.component';
export * from './search-menu-card.component';
-export * from './search-overlay.components';
export * from './search-sorting-picker.components';
diff --git a/projects/aca-playwright-shared/src/page-objects/components/search/search-in-dialog.components.ts b/projects/aca-playwright-shared/src/page-objects/components/search/search-in-dialog.components.ts
new file mode 100644
index 000000000..80cde302f
--- /dev/null
+++ b/projects/aca-playwright-shared/src/page-objects/components/search/search-in-dialog.components.ts
@@ -0,0 +1,88 @@
+/*!
+ * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
+ *
+ * Alfresco Example Content Application
+ *
+ * This file is part of the Alfresco Example Content Application.
+ * If the software was purchased under a paid Alfresco license, the terms of
+ * the paid license agreement will prevail. Otherwise, the software is
+ * provided under the following open source license terms:
+ *
+ * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * The Alfresco Example Content Application is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * from Hyland Software. If not, see .
+ */
+
+import { Page } from '@playwright/test';
+import { BaseComponent } from '../base.component';
+
+export class SearchInDialogComponent extends BaseComponent {
+ private static readonly rootElement = '.aca-search-in-panel';
+
+ public filesAndFoldersRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Files and folders');
+ public librariesRadioButton = this.getChild('.aca-search-in-panel__radio label').getByText('Libraries');
+ public filesCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Files');
+ public foldersCheckbox = this.getChild('.aca-search-in-panel__checkboxes').getByLabel('Folders');
+ public applyButton = this.getChild('button', { hasText: 'Apply' });
+ readonly resetButton = this.getChild('button', { hasText: 'Reset' });
+
+ constructor(page: Page, rootElement = SearchInDialogComponent.rootElement) {
+ super(page, rootElement);
+ }
+
+ async isFoldersOptionChecked() {
+ return this.foldersCheckbox.isChecked();
+ }
+
+ async isFilesOptionChecked() {
+ return this.filesCheckbox.isChecked();
+ }
+
+ async resetOptions() {
+ await this.resetButton.click();
+ }
+
+ async checkOnlyFolders(): Promise {
+ await this.resetOptions();
+ if (await this.isFilesOptionChecked()) {
+ await this.filesCheckbox.click();
+ }
+ if (!(await this.isFoldersOptionChecked())) {
+ await this.foldersCheckbox.click();
+ }
+ }
+
+ async checkOnlyFiles(): Promise {
+ await this.resetOptions();
+ if (await this.isFoldersOptionChecked()) {
+ await this.foldersCheckbox.click();
+ }
+ if (!(await this.isFilesOptionChecked())) {
+ await this.filesCheckbox.click();
+ }
+ }
+
+ async checkLibraries(): Promise {
+ await this.resetOptions();
+ await this.librariesRadioButton.click();
+ }
+
+ async checkFilesAndFolders(): Promise {
+ await this.resetOptions();
+ if (!(await this.isFilesOptionChecked())) {
+ await this.filesCheckbox.click();
+ }
+ if (!(await this.isFoldersOptionChecked())) {
+ await this.foldersCheckbox.click();
+ }
+ }
+}
diff --git a/projects/aca-playwright-shared/src/page-objects/components/search/search-input.component.ts b/projects/aca-playwright-shared/src/page-objects/components/search/search-input.component.ts
index 83c530566..e13b7cd46 100644
--- a/projects/aca-playwright-shared/src/page-objects/components/search/search-input.component.ts
+++ b/projects/aca-playwright-shared/src/page-objects/components/search/search-input.component.ts
@@ -24,12 +24,13 @@
import { Locator, Page } from '@playwright/test';
import { BaseComponent } from '.././base.component';
-import { timeouts } from '../../../utils';
export class SearchInputComponent extends BaseComponent {
private static rootElement = 'aca-page-layout';
+ public searchInput = this.getChild('aca-search-input input');
public searchButton = this.page.locator('.aca-search-input--search-button');
public searchCloseButton = this.page.locator('.aca-search-input--close-button');
+ public searchInButton = this.getChild('aca-search-in-menu button');
/**
* Method used in cases where user have possibility to navigate "inside" the element (it's clickable and has link attribute).
@@ -43,9 +44,8 @@ export class SearchInputComponent extends BaseComponent {
super(page, rootElement);
}
- async performDoubleClickFolderOrFileToOpen(name: string): Promise {
- await this.getCellLinkByName(name).waitFor({ state: 'visible', timeout: timeouts.medium });
- await this.getCellLinkByName(name).dblclick();
- await this.spinnerWaitForReload();
+ async searchFor(searchText: string): Promise {
+ await this.searchInput.fill(searchText);
+ await this.searchButton.click();
}
}
diff --git a/projects/aca-playwright-shared/src/page-objects/components/search/search-overlay.components.ts b/projects/aca-playwright-shared/src/page-objects/components/search/search-overlay.components.ts
deleted file mode 100644
index 14e5afd45..000000000
--- a/projects/aca-playwright-shared/src/page-objects/components/search/search-overlay.components.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-/*!
- * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * from Hyland Software. If not, see .
- */
-
-import { Page } from '@playwright/test';
-import { BaseComponent } from '.././base.component';
-
-export class SearchOverlayComponent extends BaseComponent {
- private static rootElement = '.cdk-overlay-pane';
-
- public searchFilesOption = this.getChild('input#content-input');
- public searchFoldersOption = this.getChild('input#folder-input');
- public searchLibrariesOption = this.getChild('input#libraries-input');
- public searchInput = this.page.locator('#app-control-input');
- public searchButton = this.page.locator('app-search-input-control button[title="Search"]');
- public searchInputControl = this.page.locator('.app-search-control');
- public searchOptions = this.page.locator('.app-search-options');
-
- constructor(page: Page, rootElement = SearchOverlayComponent.rootElement) {
- super(page, rootElement);
- }
-
- async isFoldersOptionChecked() {
- return this.searchFoldersOption.isChecked();
- }
-
- async isFilesOptionChecked() {
- return this.searchFilesOption.isChecked();
- }
-
- async isLibrariesOptionChecked() {
- return this.searchLibrariesOption.isChecked();
- }
-
- async clearOptions() {
- if (await this.isFilesOptionChecked()) {
- await this.searchFilesOption.click();
- }
- if (await this.isFoldersOptionChecked()) {
- await this.searchFoldersOption.click();
- }
- if (await this.isLibrariesOptionChecked()) {
- await this.searchLibrariesOption.click();
- }
- }
-
- async checkOnlyFolders(): Promise {
- await this.clearOptions();
- await this.searchFoldersOption.click();
- }
-
- async checkOnlyFiles(): Promise {
- await this.clearOptions();
- await this.searchFilesOption.click();
- }
-
- async checkLibraries(): Promise {
- await this.clearOptions();
- await this.searchLibrariesOption.click();
- }
-
- async checkFilesAndFolders(): Promise {
- await this.clearOptions();
- await this.searchFilesOption.click();
- await this.searchFoldersOption.click();
- }
-
- async searchFor(input: string): Promise {
- await this.searchInput.clear();
- await this.searchInput.fill(input);
- await this.searchButton.click({ force: true });
- }
-}
diff --git a/projects/aca-playwright-shared/src/page-objects/pages/search.page.ts b/projects/aca-playwright-shared/src/page-objects/pages/search.page.ts
index c1511845b..fad6d7221 100644
--- a/projects/aca-playwright-shared/src/page-objects/pages/search.page.ts
+++ b/projects/aca-playwright-shared/src/page-objects/pages/search.page.ts
@@ -26,24 +26,24 @@ import { Page } from '@playwright/test';
import { BasePage } from './base.page';
import {
DataTableComponent,
+ FolderInformationDialogComponent,
MatMenuComponent,
- ViewerComponent,
- SearchInputComponent,
- SearchOverlayComponent,
- SidenavComponent,
- SearchSortingPicker,
SearchFilters,
- SearchFiltersTags,
SearchFiltersCategories,
SearchFiltersDate,
SearchFiltersLocation,
SearchFiltersLogic,
SearchFiltersProperties,
- FolderInformationDialogComponent,
- SearchMenuCard
+ SearchFiltersTags,
+ SearchInputComponent,
+ SearchMenuCard,
+ SearchSortingPicker,
+ SidenavComponent,
+ ViewerComponent
} from '../components';
import { AcaHeader } from '../components/aca-header.component';
-import { AdfConfirmDialogComponent, AdfFolderDialogComponent, UploadNewVersionDialog, ManageVersionsDialog } from '../components/dialogs';
+import { AdfConfirmDialogComponent, AdfFolderDialogComponent, ManageVersionsDialog, UploadNewVersionDialog } from '../components/dialogs';
+import { SearchInDialogComponent } from '../components/search/search-in-dialog.components';
export type SearchType = 'files' | 'folders' | 'filesAndFolders' | 'libraries';
@@ -59,8 +59,8 @@ export class SearchPage extends BasePage {
public folderDialog = new AdfFolderDialogComponent(this.page);
public dataTable = new DataTableComponent(this.page);
public viewer = new ViewerComponent(this.page);
- public searchInput = new SearchInputComponent(this.page);
- public searchOverlay = new SearchOverlayComponent(this.page);
+ public searchInputComponent = new SearchInputComponent(this.page);
+ public searchInDialog = new SearchInDialogComponent(this.page);
public searchSortingPicker = new SearchSortingPicker(this.page);
public searchFilters = new SearchFilters(this.page);
public searchFiltersTags = new SearchFiltersTags(this.page);
@@ -77,29 +77,33 @@ export class SearchPage extends BasePage {
public searchMenuCard = new SearchMenuCard(this.page);
async searchWithin(searchText: string, searchType?: SearchType): Promise {
- await this.acaHeader.searchButton.click();
- await this.clickSearchButton();
+ if (!(await this.searchInputComponent.searchInput.isVisible())) {
+ await this.acaHeader.searchButton.click();
+ }
+ await this.searchInputComponent.searchInButton.click();
switch (searchType) {
case 'files':
- await this.searchOverlay.checkOnlyFiles();
+ await this.searchInDialog.checkOnlyFiles();
break;
case 'folders':
- await this.searchOverlay.checkOnlyFolders();
+ await this.searchInDialog.checkOnlyFolders();
break;
case 'filesAndFolders':
- await this.searchOverlay.checkFilesAndFolders();
+ await this.searchInDialog.checkFilesAndFolders();
break;
case 'libraries':
- await this.searchOverlay.checkLibraries();
+ await this.searchInDialog.checkLibraries();
break;
default:
break;
}
- await this.searchOverlay.searchFor(searchText);
+ await this.searchInDialog.applyButton.click();
+ await this.clickSearchButton();
+ await this.searchInputComponent.searchFor(searchText);
await this.dataTable.progressBarWaitForReload();
}
async clickSearchButton() {
- await this.searchInput.searchButton.click({ force: true });
+ await this.searchInputComponent.searchButton.click({ force: true });
}
}
diff --git a/projects/aca-shared/src/lib/components/toolbar/toolbar.component.scss b/projects/aca-shared/src/lib/components/toolbar/toolbar.component.scss
index bda89910a..030348a23 100644
--- a/projects/aca-shared/src/lib/components/toolbar/toolbar.component.scss
+++ b/projects/aca-shared/src/lib/components/toolbar/toolbar.component.scss
@@ -1,6 +1,6 @@
aca-toolbar {
.aca-toolbar {
- min-height: 48px;
+ height: 56px;
color: var(--adf-theme-foreground-text-color-064);
background-color: inherit;
border: none;
diff --git a/projects/aca-shared/src/lib/services/app.service.ts b/projects/aca-shared/src/lib/services/app.service.ts
index a3e0470e7..11fc80f8a 100644
--- a/projects/aca-shared/src/lib/services/app.service.ts
+++ b/projects/aca-shared/src/lib/services/app.service.ts
@@ -24,14 +24,14 @@
import { inject, Injectable } from '@angular/core';
import {
- AuthenticationService,
AppConfigService,
- PageTitleService,
- UserPreferencesService,
+ AuthenticationService,
NotificationService,
- StorageService
+ PageTitleService,
+ StorageService,
+ UserPreferencesService
} from '@alfresco/adf-core';
-import { Observable, BehaviorSubject, Subject } from 'rxjs';
+import { BehaviorSubject, Observable, Subject } from 'rxjs';
import {
AlfrescoApiService,
FileUploadErrorEvent,
@@ -72,7 +72,7 @@ export class AppService implements ShellAppService {
toggleAppNavBar$ = new Subject();
hideSidenavConditions = ['/preview/'];
- minimizeSidenavConditions = ['/search'];
+ minimizeSidenavConditions = [];
/**
* Whether `withCredentials` mode is enabled.
diff --git a/projects/aca-shared/src/lib/validators/no-leading-trailing-operators.validator.spec.ts b/projects/aca-shared/src/lib/validators/no-leading-trailing-operators.validator.spec.ts
deleted file mode 100644
index 9e6a2d7f9..000000000
--- a/projects/aca-shared/src/lib/validators/no-leading-trailing-operators.validator.spec.ts
+++ /dev/null
@@ -1,70 +0,0 @@
-/*!
- * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * from Hyland Software. If not, see .
- */
-
-import { FormControl } from '@angular/forms';
-import { noLeadingTrailingOperatorsValidator } from './no-leading-trailing-operators.validator';
-
-describe('noLeadingTrailingOperatorsValidator', () => {
- const validatorFn = noLeadingTrailingOperatorsValidator();
-
- it('should return null for valid input without operators', () => {
- const control = new FormControl('valid input');
- expect(validatorFn(control)).toBeNull();
- });
-
- it('should return null for empty input', () => {
- const control = new FormControl('');
- expect(validatorFn(control)).toBeNull();
- });
-
- it('should return null for valid input with operators', () => {
- const control = new FormControl('valid AND input OR phrase');
- expect(validatorFn(control)).toBeNull();
- });
-
- it('should return error for input with leading AND operator', () => {
- const control = new FormControl('AND input');
- expect(validatorFn(control)).toEqual({ operators: true });
- });
-
- it('should return error for input with leading OR operator', () => {
- const control = new FormControl('OR input');
- expect(validatorFn(control)).toEqual({ operators: true });
- });
-
- it('should return error for input with trailing AND operator', () => {
- const control = new FormControl('input AND');
- expect(validatorFn(control)).toEqual({ operators: true });
- });
-
- it('should return error for input with trailing OR operator', () => {
- const control = new FormControl('input OR');
- expect(validatorFn(control)).toEqual({ operators: true });
- });
-
- it('should return error for input with only operator', () => {
- const control = new FormControl('AND OR');
- expect(validatorFn(control)).toEqual({ operators: true });
- });
-});
diff --git a/projects/aca-shared/src/lib/validators/no-leading-trailing-operators.validator.ts b/projects/aca-shared/src/lib/validators/no-leading-trailing-operators.validator.ts
deleted file mode 100644
index 255bdc0f2..000000000
--- a/projects/aca-shared/src/lib/validators/no-leading-trailing-operators.validator.ts
+++ /dev/null
@@ -1,43 +0,0 @@
-/*!
- * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * from Hyland Software. If not, see .
- */
-
-import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
-
-const isOperator = (word: string): boolean => {
- const operators = ['AND', 'OR'];
- return operators.includes(word.trim());
-};
-
-export const noLeadingTrailingOperatorsValidator = (): ValidatorFn => {
- return (control: AbstractControl): ValidationErrors | null => {
- const rawValue = control.value;
- if (!rawValue) {
- return null;
- }
-
- const words = rawValue.trim().split(/\s+/);
-
- return isOperator(words[0]) || isOperator(words[words.length - 1]) ? { operators: true } : null;
- };
-};
diff --git a/projects/aca-shared/src/lib/validators/no-whitespace.validator.spec.ts b/projects/aca-shared/src/lib/validators/no-whitespace.validator.spec.ts
deleted file mode 100644
index 4454834f2..000000000
--- a/projects/aca-shared/src/lib/validators/no-whitespace.validator.spec.ts
+++ /dev/null
@@ -1,50 +0,0 @@
-/*!
- * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * from Hyland Software. If not, see .
- */
-
-import { FormControl } from '@angular/forms';
-import { noWhitespaceValidator } from './no-whitespace.validator';
-
-describe('noWhitespaceValidator', () => {
- const validatorFn = noWhitespaceValidator();
-
- it('should return null for valid non-whitespace input', () => {
- const control = new FormControl('valid input');
- expect(validatorFn(control)).toBeNull();
- });
-
- it('should return error for input with only spaces', () => {
- const control = new FormControl(' ');
- expect(validatorFn(control)).toEqual({ whitespace: true });
- });
-
- it('should return error for empty string', () => {
- const control = new FormControl('');
- expect(validatorFn(control)).toBeNull();
- });
-
- it('should return null for input with leading and trailing spaces but valid content inside', () => {
- const control = new FormControl(' valid ');
- expect(validatorFn(control)).toBeNull();
- });
-});
diff --git a/projects/aca-shared/src/lib/validators/no-whitespace.validator.ts b/projects/aca-shared/src/lib/validators/no-whitespace.validator.ts
deleted file mode 100644
index 2e48d1479..000000000
--- a/projects/aca-shared/src/lib/validators/no-whitespace.validator.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-/*!
- * Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
- *
- * Alfresco Example Content Application
- *
- * This file is part of the Alfresco Example Content Application.
- * If the software was purchased under a paid Alfresco license, the terms of
- * the paid license agreement will prevail. Otherwise, the software is
- * provided under the following open source license terms:
- *
- * The Alfresco Example Content Application is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * The Alfresco Example Content Application is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * from Hyland Software. If not, see .
- */
-
-import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms';
-
-export const noWhitespaceValidator = (): ValidatorFn => {
- return (control: AbstractControl): ValidationErrors | null => {
- const rawValue = control.value;
- if (!rawValue) {
- return null;
- }
-
- const trimmedValue = rawValue.toString().trim();
- return trimmedValue.length === 0 ? { whitespace: true } : null;
- };
-};
diff --git a/projects/aca-shared/src/public-api.ts b/projects/aca-shared/src/public-api.ts
index 9ee7a54eb..20754a2ec 100644
--- a/projects/aca-shared/src/public-api.ts
+++ b/projects/aca-shared/src/public-api.ts
@@ -64,6 +64,3 @@ export * from './lib/services/navigation-history.service';
export * from './lib/testing/lib-testing-module';
export * from './lib/utils/node.utils';
-
-export * from './lib/validators/no-whitespace.validator';
-export * from './lib/validators/no-leading-trailing-operators.validator';