diff --git a/.travis.yml b/.travis.yml index 38fafb63d..37b152a23 100644 --- a/.travis.yml +++ b/.travis.yml @@ -90,10 +90,10 @@ jobs: cache: false - stage: Quality and Unit tests - name: 'Unit tests: ACA' + name: 'Unit tests: aca-content' script: - npm ci - - ng test content-ce $TEST_OPTS + - ng test aca-content $TEST_OPTS cache: false - stage: e2e diff --git a/angular.json b/angular.json index ed4343a10..8eefa7620 100644 --- a/angular.json +++ b/angular.json @@ -35,8 +35,7 @@ ], "stylePreprocessorOptions": { "includePaths": [ - "app/src/app/ui", - "app/src/app/content-plugin/ui", + "projects/aca-content/src/lib/ui", "node_modules" ] }, @@ -113,6 +112,7 @@ "app/src/assets/fonts/material-icons/material-icons.css", "app/src/assets/fonts/OpenSans/OpenSans.css", "node_modules/cropperjs/dist/cropper.min.css", + "projects/aca-content/src/lib/ui/application.scss", "app/src/styles.scss" ], "scripts": [ @@ -263,7 +263,7 @@ "polyfills": "app/src/polyfills.ts", "stylePreprocessorOptions": { "includePaths": [ - "app/src/app/content-plugin/ui", + "projects/aca-content/src/lib/ui/application.scss", "node_modules" ] }, @@ -276,7 +276,8 @@ "styles": [ "app/src/assets/fonts/material-icons/material-icons.css", "app/src/assets/fonts/OpenSans/OpenSans.css", - "app/src/styles.scss" + "app/src/styles.scss", + "projects/aca-content/src/lib/ui/application.scss" ], "assets": [ "app/src/assets", @@ -593,6 +594,40 @@ } } } + }, + "aca-content": { + "projectType": "library", + "root": "projects/aca-content", + "sourceRoot": "projects/aca-content/src", + "prefix": "lib", + "architect": { + "build": { + "builder": "@angular-devkit/build-angular:ng-packagr", + "options": { + "project": "projects/aca-content/ng-package.json" + }, + "configurations": { + "production": { + "tsConfig": "projects/aca-content/tsconfig.lib.prod.json" + }, + "development": { + "tsConfig": "projects/aca-content/tsconfig.lib.json" + } + }, + "defaultConfiguration": "production" + }, + "test": { + "builder": "@angular-devkit/build-angular:karma", + "options": { + "main": "projects/aca-content/src/test.ts", + "tsConfig": "projects/aca-content/tsconfig.spec.json", + "karmaConfig": "projects/aca-content/karma.conf.js", + "styles": [ + "projects/aca-content/src/lib/ui/application.scss" + ] + } + } + } } }, "schematics": { diff --git a/app/src/app/app.module.ts b/app/src/app/app.module.ts index b9631814d..2bb36f948 100644 --- a/app/src/app/app.module.ts +++ b/app/src/app/app.module.ts @@ -53,14 +53,17 @@ import localeSv from '@angular/common/locales/sv'; import { TranslateModule } from '@ngx-translate/core'; import { RouterModule } from '@angular/router'; import { AppComponent } from './app.components'; -import { CONTENT_LAYOUT_ROUTES } from './content-plugin/content.routes'; -import { ContentServiceExtensionModule } from './content-plugin/content-services-extension.module'; -import { CoreExtensionsModule } from './extensions/core.extensions.module'; -import { INITIAL_APP_STATE } from './content-plugin/store/initial-state'; +import { + ContentUrlService, + INITIAL_APP_STATE, + CONTENT_LAYOUT_ROUTES, + ContentServiceExtensionModule, + CoreExtensionsModule +} from '@alfresco/aca-content'; import { ContentVersionService } from '@alfresco/adf-content-services'; -import { ContentUrlService } from './content-plugin/services/content-url.service'; import { STORE_INITIAL_APP_DATA } from '@alfresco/aca-shared/store'; import { ShellModule, SHELL_APP_SERVICE, SHELL_AUTH_TOKEN } from '@alfresco/adf-core/shell'; +import { StoreDevtoolsModule } from '@ngrx/store-devtools'; registerLocaleData(localeFr); registerLocaleData(localeDe); @@ -87,6 +90,7 @@ registerLocaleData(localeSv); SharedModule.forRoot(), CoreExtensionsModule.forRoot(), environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule, + !environment.production ? StoreDevtoolsModule.instrument({ maxAge: 25 }) : [], RouterModule.forRoot([], { useHash: true, enableTracing: false, // enable for debug only diff --git a/app/src/styles.scss b/app/src/styles.scss index 581be0d33..e1c2e24e2 100644 --- a/app/src/styles.scss +++ b/app/src/styles.scss @@ -1,11 +1,7 @@ /* You can add global styles to this file, and also import other style files */ -@import 'app/content-plugin/ui/application'; -@import 'app/content-plugin/ui/variables/font-family'; - body, html { height: 100%; - font-family: $default-font-family; } body { diff --git a/projects/aca-content/README.md b/projects/aca-content/README.md new file mode 100644 index 000000000..1e93b688a --- /dev/null +++ b/projects/aca-content/README.md @@ -0,0 +1,24 @@ +# AcaContent + +This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 14.1.0. + +## Code scaffolding + +Run `ng generate component component-name --project aca-content` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aca-content`. +> Note: Don't forget to add `--project aca-content` or else it will be added to the default project in your `angular.json` file. + +## Build + +Run `ng build aca-content` to build the project. The build artifacts will be stored in the `dist/` directory. + +## Publishing + +After building your library with `ng build aca-content`, go to the dist folder `cd dist/aca-content` and run `npm publish`. + +## Running unit tests + +Run `ng test aca-content` to execute the unit tests via [Karma](https://karma-runner.github.io). + +## Further help + +To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI Overview and Command Reference](https://angular.io/cli) page. diff --git a/projects/aca-content/karma.conf.js b/projects/aca-content/karma.conf.js new file mode 100644 index 000000000..993ad4a1f --- /dev/null +++ b/projects/aca-content/karma.conf.js @@ -0,0 +1,32 @@ +// Karma configuration file, see link for more information +// https://karma-runner.github.io/1.0/config/configuration-file.html + +module.exports = function (config) { + config.set({ + basePath: '', + frameworks: ['jasmine', '@angular-devkit/build-angular'], + plugins: [ + require('karma-jasmine'), + require('karma-chrome-launcher'), + require('karma-jasmine-html-reporter'), + require('karma-coverage-istanbul-reporter'), + require('@angular-devkit/build-angular/plugins/karma') + ], + client: { + clearContext: false // leave Jasmine Spec Runner output visible in browser + }, + coverageIstanbulReporter: { + dir: require('path').join(__dirname, '../../coverage/aca-content'), + reports: ['html', 'lcovonly', 'text-summary'], + fixWebpackSourcePaths: true + }, + reporters: ['progress', 'kjhtml'], + port: 9876, + colors: true, + logLevel: config.LOG_INFO, + autoWatch: true, + browsers: ['Chrome'], + singleRun: true, + restartOnFileChange: true + }); +}; diff --git a/projects/aca-content/ng-package.json b/projects/aca-content/ng-package.json new file mode 100644 index 000000000..f8e1fe380 --- /dev/null +++ b/projects/aca-content/ng-package.json @@ -0,0 +1,10 @@ +{ + "$schema": "../../node_modules/ng-packagr/ng-package.schema.json", + "dest": "../../dist/aca-content", + "lib": { + "styleIncludePaths": [ + "projects/aca-content/src/lib/ui" + ], + "entryFile": "src/public-api.ts" + } +} diff --git a/projects/aca-content/package.json b/projects/aca-content/package.json new file mode 100644 index 000000000..83788d272 --- /dev/null +++ b/projects/aca-content/package.json @@ -0,0 +1,11 @@ +{ + "name": "aca-content", + "version": "0.0.1", + "peerDependencies": { + "@angular/common": "^14.1.0", + "@angular/core": "^14.1.0" + }, + "dependencies": { + "tslib": "^2.3.0" + } +} diff --git a/app/src/app/content-plugin/content-services-extension.module.ts b/projects/aca-content/src/lib/aca-content.module.ts similarity index 96% rename from app/src/app/content-plugin/content-services-extension.module.ts rename to projects/aca-content/src/lib/aca-content.module.ts index 71732a0f2..2f5bfe971 100644 --- a/app/src/app/content-plugin/content-services-extension.module.ts +++ b/projects/aca-content/src/lib/aca-content.module.ts @@ -23,9 +23,8 @@ * along with Alfresco. If not, see . */ -import { BrowserModule, HammerModule } from '@angular/platform-browser'; +import { HammerModule } from '@angular/platform-browser'; import { NgModule } from '@angular/core'; -import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { TRANSLATION_PROVIDER, @@ -54,8 +53,8 @@ import { FavoriteLibrariesComponent } from './components/favorite-libraries/favo import { ViewProfileModule } from './components/view-profile/view-profile.module'; import { AppStoreModule } from './store/app-store.module'; -import { MaterialModule } from '../material.module'; -import { CoreExtensionsModule } from '../extensions/core.extensions.module'; +import { MaterialModule } from './material.module'; +import { CoreExtensionsModule } from './extensions/core.extensions.module'; import { AppInfoDrawerModule } from './components/info-drawer/info.drawer.module'; import { DirectivesModule } from './directives/directives.module'; import { ContextMenuModule } from './components/context-menu/context-menu.module'; @@ -75,12 +74,11 @@ import { FavoritesComponent } from './components/favorites/favorites.component'; import { RecentFilesComponent } from './components/recent-files/recent-files.component'; import { SharedFilesComponent } from './components/shared-files/shared-files.component'; import { CreateFromTemplateDialogComponent } from './dialogs/node-template/create-from-template.dialog'; -import { environment } from '../../environments/environment'; import { DetailsComponent } from './components/details/details.component'; import { ContentUrlService } from './services/content-url.service'; import { HomeComponent } from './components/home/home.component'; -import { registerLocaleData } from '@angular/common'; +import { CommonModule, registerLocaleData } from '@angular/common'; import localeFr from '@angular/common/locales/fr'; import localeDe from '@angular/common/locales/de'; import localeIt from '@angular/common/locales/it'; @@ -115,7 +113,7 @@ import { ToggleInfoDrawerComponent } from './components/toolbar/toggle-info-draw import { ToggleJoinLibraryButtonComponent } from './components/toolbar/toggle-join-library/toggle-join-library-button.component'; import { ToggleJoinLibraryMenuComponent } from './components/toolbar/toggle-join-library/toggle-join-library-menu.component'; import { ViewNodeComponent } from './components/toolbar/view-node/view-node.component'; -import { CONTENT_ROUTES } from './content.routes'; +import { CONTENT_ROUTES } from './aca-content.routes'; import { RouterModule } from '@angular/router'; import { UploadFilesDialogComponent } from './components/upload-files-dialog/upload-files-dialog.component'; import { SidenavWrapperComponent } from './components/sidenav/sidenav-wrapper/sidenav-wrapper.component'; @@ -140,8 +138,7 @@ registerLocaleData(localeSv); @NgModule({ imports: [ - BrowserModule, - environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule, + CommonModule, FormsModule, ReactiveFormsModule, ContentModule.forRoot(), diff --git a/app/src/app/content-plugin/content.routes.ts b/projects/aca-content/src/lib/aca-content.routes.ts similarity index 100% rename from app/src/app/content-plugin/content.routes.ts rename to projects/aca-content/src/lib/aca-content.routes.ts diff --git a/app/src/app/content-plugin/components/common/common.module.ts b/projects/aca-content/src/lib/components/common/common.module.ts similarity index 100% rename from app/src/app/content-plugin/components/common/common.module.ts rename to projects/aca-content/src/lib/components/common/common.module.ts diff --git a/app/src/app/content-plugin/components/common/language-picker/language-picker.component.ts b/projects/aca-content/src/lib/components/common/language-picker/language-picker.component.ts similarity index 100% rename from app/src/app/content-plugin/components/common/language-picker/language-picker.component.ts rename to projects/aca-content/src/lib/components/common/language-picker/language-picker.component.ts diff --git a/app/src/app/content-plugin/components/common/location-link/location-link.component.ts b/projects/aca-content/src/lib/components/common/location-link/location-link.component.ts similarity index 100% rename from app/src/app/content-plugin/components/common/location-link/location-link.component.ts rename to projects/aca-content/src/lib/components/common/location-link/location-link.component.ts diff --git a/app/src/app/content-plugin/components/common/logout/logout.component.spec.ts b/projects/aca-content/src/lib/components/common/logout/logout.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/common/logout/logout.component.spec.ts rename to projects/aca-content/src/lib/components/common/logout/logout.component.spec.ts diff --git a/app/src/app/content-plugin/components/common/logout/logout.component.ts b/projects/aca-content/src/lib/components/common/logout/logout.component.ts similarity index 100% rename from app/src/app/content-plugin/components/common/logout/logout.component.ts rename to projects/aca-content/src/lib/components/common/logout/logout.component.ts diff --git a/app/src/app/content-plugin/components/common/toggle-shared/toggle-shared.component.html b/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.html similarity index 100% rename from app/src/app/content-plugin/components/common/toggle-shared/toggle-shared.component.html rename to projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.html diff --git a/app/src/app/content-plugin/components/common/toggle-shared/toggle-shared.component.spec.ts b/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/common/toggle-shared/toggle-shared.component.spec.ts rename to projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.spec.ts diff --git a/app/src/app/content-plugin/components/common/toggle-shared/toggle-shared.component.ts b/projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.ts similarity index 100% rename from app/src/app/content-plugin/components/common/toggle-shared/toggle-shared.component.ts rename to projects/aca-content/src/lib/components/common/toggle-shared/toggle-shared.component.ts diff --git a/app/src/app/content-plugin/components/context-menu/context-menu-item.component.html b/projects/aca-content/src/lib/components/context-menu/context-menu-item.component.html similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu-item.component.html rename to projects/aca-content/src/lib/components/context-menu/context-menu-item.component.html diff --git a/app/src/app/content-plugin/components/context-menu/context-menu-item.component.spec.ts b/projects/aca-content/src/lib/components/context-menu/context-menu-item.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu-item.component.spec.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu-item.component.spec.ts diff --git a/app/src/app/content-plugin/components/context-menu/context-menu-item.component.ts b/projects/aca-content/src/lib/components/context-menu/context-menu-item.component.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu-item.component.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu-item.component.ts diff --git a/app/src/app/content-plugin/components/context-menu/context-menu-outside-event.directive.spec.ts b/projects/aca-content/src/lib/components/context-menu/context-menu-outside-event.directive.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu-outside-event.directive.spec.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu-outside-event.directive.spec.ts diff --git a/app/src/app/content-plugin/components/context-menu/context-menu-outside-event.directive.ts b/projects/aca-content/src/lib/components/context-menu/context-menu-outside-event.directive.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu-outside-event.directive.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu-outside-event.directive.ts diff --git a/app/src/app/content-plugin/components/context-menu/context-menu-overlay.ts b/projects/aca-content/src/lib/components/context-menu/context-menu-overlay.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu-overlay.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu-overlay.ts diff --git a/app/src/app/content-plugin/components/context-menu/context-menu.component.html b/projects/aca-content/src/lib/components/context-menu/context-menu.component.html similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu.component.html rename to projects/aca-content/src/lib/components/context-menu/context-menu.component.html diff --git a/app/src/app/content-plugin/components/context-menu/context-menu.component.spec.ts b/projects/aca-content/src/lib/components/context-menu/context-menu.component.spec.ts similarity index 95% rename from app/src/app/content-plugin/components/context-menu/context-menu.component.spec.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu.component.spec.ts index 85f5898dc..4f07af9f4 100644 --- a/app/src/app/content-plugin/components/context-menu/context-menu.component.spec.ts +++ b/projects/aca-content/src/lib/components/context-menu/context-menu.component.spec.ts @@ -90,10 +90,10 @@ describe('ContextMenuComponent', () => { fixture.detectChanges(); await fixture.whenStable(); - const contextMenuElements = document.body.querySelector('.aca-context-menu').querySelectorAll('button'); + const contextMenuElements = document.body.querySelector('.aca-context-menu')?.querySelectorAll('button'); - expect(contextMenuElements.length).toBe(1); - expect(contextMenuElements[0].querySelector('span').innerText).toBe(contextItem.title); + expect(contextMenuElements?.length).toBe(1); + expect(contextMenuElements?.[0].querySelector('span')?.innerText).toBe(contextItem.title); }); it('should run action with provided action id and correct payload', () => { diff --git a/app/src/app/content-plugin/components/context-menu/context-menu.component.ts b/projects/aca-content/src/lib/components/context-menu/context-menu.component.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu.component.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu.component.ts diff --git a/app/src/app/content-plugin/components/context-menu/context-menu.module.ts b/projects/aca-content/src/lib/components/context-menu/context-menu.module.ts similarity index 96% rename from app/src/app/content-plugin/components/context-menu/context-menu.module.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu.module.ts index 72378becb..627a405f8 100644 --- a/app/src/app/content-plugin/components/context-menu/context-menu.module.ts +++ b/projects/aca-content/src/lib/components/context-menu/context-menu.module.ts @@ -30,7 +30,7 @@ import { MatButtonModule } from '@angular/material/button'; import { MatIconModule } from '@angular/material/icon'; import { MatListModule } from '@angular/material/list'; import { MatMenuModule } from '@angular/material/menu'; -import { CoreExtensionsModule } from '../../../extensions/core.extensions.module'; +import { CoreExtensionsModule } from '../../extensions/core.extensions.module'; import { AppCommonModule } from '../common/common.module'; import { ContextMenuItemComponent } from './context-menu-item.component'; import { OutsideEventDirective } from './context-menu-outside-event.directive'; diff --git a/app/src/app/content-plugin/components/context-menu/context-menu.service.spec.ts b/projects/aca-content/src/lib/components/context-menu/context-menu.service.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu.service.spec.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu.service.spec.ts diff --git a/app/src/app/content-plugin/components/context-menu/context-menu.service.ts b/projects/aca-content/src/lib/components/context-menu/context-menu.service.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/context-menu.service.ts rename to projects/aca-content/src/lib/components/context-menu/context-menu.service.ts diff --git a/app/src/app/content-plugin/components/context-menu/direction.token.ts b/projects/aca-content/src/lib/components/context-menu/direction.token.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/direction.token.ts rename to projects/aca-content/src/lib/components/context-menu/direction.token.ts diff --git a/app/src/app/content-plugin/components/context-menu/interfaces.ts b/projects/aca-content/src/lib/components/context-menu/interfaces.ts similarity index 100% rename from app/src/app/content-plugin/components/context-menu/interfaces.ts rename to projects/aca-content/src/lib/components/context-menu/interfaces.ts diff --git a/app/src/app/content-plugin/components/create-menu/create-menu.component.html b/projects/aca-content/src/lib/components/create-menu/create-menu.component.html similarity index 100% rename from app/src/app/content-plugin/components/create-menu/create-menu.component.html rename to projects/aca-content/src/lib/components/create-menu/create-menu.component.html diff --git a/app/src/app/content-plugin/components/create-menu/create-menu.component.scss b/projects/aca-content/src/lib/components/create-menu/create-menu.component.scss similarity index 100% rename from app/src/app/content-plugin/components/create-menu/create-menu.component.scss rename to projects/aca-content/src/lib/components/create-menu/create-menu.component.scss diff --git a/app/src/app/content-plugin/components/create-menu/create-menu.component.spec.ts b/projects/aca-content/src/lib/components/create-menu/create-menu.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/create-menu/create-menu.component.spec.ts rename to projects/aca-content/src/lib/components/create-menu/create-menu.component.spec.ts diff --git a/app/src/app/content-plugin/components/create-menu/create-menu.component.ts b/projects/aca-content/src/lib/components/create-menu/create-menu.component.ts similarity index 100% rename from app/src/app/content-plugin/components/create-menu/create-menu.component.ts rename to projects/aca-content/src/lib/components/create-menu/create-menu.component.ts diff --git a/app/src/app/content-plugin/components/create-menu/create-menu.module.ts b/projects/aca-content/src/lib/components/create-menu/create-menu.module.ts similarity index 100% rename from app/src/app/content-plugin/components/create-menu/create-menu.module.ts rename to projects/aca-content/src/lib/components/create-menu/create-menu.module.ts diff --git a/app/src/app/content-plugin/components/details/details.component.html b/projects/aca-content/src/lib/components/details/details.component.html similarity index 100% rename from app/src/app/content-plugin/components/details/details.component.html rename to projects/aca-content/src/lib/components/details/details.component.html diff --git a/app/src/app/content-plugin/components/details/details.component.scss b/projects/aca-content/src/lib/components/details/details.component.scss similarity index 100% rename from app/src/app/content-plugin/components/details/details.component.scss rename to projects/aca-content/src/lib/components/details/details.component.scss diff --git a/app/src/app/content-plugin/components/details/details.component.spec.ts b/projects/aca-content/src/lib/components/details/details.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/details/details.component.spec.ts rename to projects/aca-content/src/lib/components/details/details.component.spec.ts diff --git a/app/src/app/content-plugin/components/details/details.component.ts b/projects/aca-content/src/lib/components/details/details.component.ts similarity index 100% rename from app/src/app/content-plugin/components/details/details.component.ts rename to projects/aca-content/src/lib/components/details/details.component.ts diff --git a/app/src/app/content-plugin/components/dl-custom-components/document-list-custom-components.module.ts b/projects/aca-content/src/lib/components/dl-custom-components/document-list-custom-components.module.ts similarity index 96% rename from app/src/app/content-plugin/components/dl-custom-components/document-list-custom-components.module.ts rename to projects/aca-content/src/lib/components/dl-custom-components/document-list-custom-components.module.ts index 28aa8423f..e35445291 100644 --- a/app/src/app/content-plugin/components/dl-custom-components/document-list-custom-components.module.ts +++ b/projects/aca-content/src/lib/components/dl-custom-components/document-list-custom-components.module.ts @@ -28,7 +28,7 @@ import { NgModule } from '@angular/core'; import { CustomNameColumnComponent } from './name-column/name-column.component'; import { LockedByModule } from '@alfresco/aca-shared'; import { ContentModule } from '@alfresco/adf-content-services'; -import { MaterialModule } from '../../../material.module'; +import { MaterialModule } from '../../material.module'; import { CoreModule } from '@alfresco/adf-core'; import { ThumbnailColumnComponent } from './thumbnail-column/thumbnail-column.component'; diff --git a/app/src/app/content-plugin/components/dl-custom-components/name-column/name-column.component.html b/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.html similarity index 100% rename from app/src/app/content-plugin/components/dl-custom-components/name-column/name-column.component.html rename to projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.html diff --git a/app/src/app/content-plugin/components/dl-custom-components/name-column/name-column.component.scss b/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.scss similarity index 100% rename from app/src/app/content-plugin/components/dl-custom-components/name-column/name-column.component.scss rename to projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.scss diff --git a/app/src/app/content-plugin/components/dl-custom-components/name-column/name-column.component.spec.ts b/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/dl-custom-components/name-column/name-column.component.spec.ts rename to projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.spec.ts diff --git a/app/src/app/content-plugin/components/dl-custom-components/name-column/name-column.component.ts b/projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.ts similarity index 100% rename from app/src/app/content-plugin/components/dl-custom-components/name-column/name-column.component.ts rename to projects/aca-content/src/lib/components/dl-custom-components/name-column/name-column.component.ts diff --git a/app/src/app/content-plugin/components/dl-custom-components/thumbnail-column/thumbnail-column.component.html b/projects/aca-content/src/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.html similarity index 100% rename from app/src/app/content-plugin/components/dl-custom-components/thumbnail-column/thumbnail-column.component.html rename to projects/aca-content/src/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.html diff --git a/app/src/app/content-plugin/components/dl-custom-components/thumbnail-column/thumbnail-column.component.ts b/projects/aca-content/src/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.ts similarity index 100% rename from app/src/app/content-plugin/components/dl-custom-components/thumbnail-column/thumbnail-column.component.ts rename to projects/aca-content/src/lib/components/dl-custom-components/thumbnail-column/thumbnail-column.component.ts diff --git a/app/src/app/content-plugin/components/favorite-libraries/favorite-libraries.component.html b/projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.html similarity index 100% rename from app/src/app/content-plugin/components/favorite-libraries/favorite-libraries.component.html rename to projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.html diff --git a/app/src/app/content-plugin/components/favorite-libraries/favorite-libraries.component.spec.ts b/projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/favorite-libraries/favorite-libraries.component.spec.ts rename to projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.spec.ts diff --git a/app/src/app/content-plugin/components/favorite-libraries/favorite-libraries.component.ts b/projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.ts similarity index 100% rename from app/src/app/content-plugin/components/favorite-libraries/favorite-libraries.component.ts rename to projects/aca-content/src/lib/components/favorite-libraries/favorite-libraries.component.ts diff --git a/app/src/app/content-plugin/components/favorites/favorites.component.html b/projects/aca-content/src/lib/components/favorites/favorites.component.html similarity index 100% rename from app/src/app/content-plugin/components/favorites/favorites.component.html rename to projects/aca-content/src/lib/components/favorites/favorites.component.html diff --git a/app/src/app/content-plugin/components/favorites/favorites.component.spec.ts b/projects/aca-content/src/lib/components/favorites/favorites.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/favorites/favorites.component.spec.ts rename to projects/aca-content/src/lib/components/favorites/favorites.component.spec.ts diff --git a/app/src/app/content-plugin/components/favorites/favorites.component.ts b/projects/aca-content/src/lib/components/favorites/favorites.component.ts similarity index 100% rename from app/src/app/content-plugin/components/favorites/favorites.component.ts rename to projects/aca-content/src/lib/components/favorites/favorites.component.ts diff --git a/app/src/app/content-plugin/components/files/files.component.html b/projects/aca-content/src/lib/components/files/files.component.html similarity index 100% rename from app/src/app/content-plugin/components/files/files.component.html rename to projects/aca-content/src/lib/components/files/files.component.html diff --git a/app/src/app/content-plugin/components/files/files.component.spec.ts b/projects/aca-content/src/lib/components/files/files.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/files/files.component.spec.ts rename to projects/aca-content/src/lib/components/files/files.component.spec.ts diff --git a/app/src/app/content-plugin/components/files/files.component.ts b/projects/aca-content/src/lib/components/files/files.component.ts similarity index 100% rename from app/src/app/content-plugin/components/files/files.component.ts rename to projects/aca-content/src/lib/components/files/files.component.ts diff --git a/app/src/app/content-plugin/components/header/header.component.html b/projects/aca-content/src/lib/components/header/header.component.html similarity index 100% rename from app/src/app/content-plugin/components/header/header.component.html rename to projects/aca-content/src/lib/components/header/header.component.html diff --git a/app/src/app/content-plugin/components/header/header.component.scss b/projects/aca-content/src/lib/components/header/header.component.scss similarity index 100% rename from app/src/app/content-plugin/components/header/header.component.scss rename to projects/aca-content/src/lib/components/header/header.component.scss diff --git a/app/src/app/content-plugin/components/header/header.component.spec.ts b/projects/aca-content/src/lib/components/header/header.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/header/header.component.spec.ts rename to projects/aca-content/src/lib/components/header/header.component.spec.ts diff --git a/app/src/app/content-plugin/components/header/header.component.ts b/projects/aca-content/src/lib/components/header/header.component.ts similarity index 100% rename from app/src/app/content-plugin/components/header/header.component.ts rename to projects/aca-content/src/lib/components/header/header.component.ts diff --git a/app/src/app/content-plugin/components/header/header.module.ts b/projects/aca-content/src/lib/components/header/header.module.ts similarity index 100% rename from app/src/app/content-plugin/components/header/header.module.ts rename to projects/aca-content/src/lib/components/header/header.module.ts diff --git a/app/src/app/content-plugin/components/home/home.component.spec.ts b/projects/aca-content/src/lib/components/home/home.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/home/home.component.spec.ts rename to projects/aca-content/src/lib/components/home/home.component.spec.ts diff --git a/app/src/app/content-plugin/components/home/home.component.ts b/projects/aca-content/src/lib/components/home/home.component.ts similarity index 100% rename from app/src/app/content-plugin/components/home/home.component.ts rename to projects/aca-content/src/lib/components/home/home.component.ts diff --git a/app/src/app/content-plugin/components/info-drawer/comments-tab/comments-tab.component.spec.ts b/projects/aca-content/src/lib/components/info-drawer/comments-tab/comments-tab.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/comments-tab/comments-tab.component.spec.ts rename to projects/aca-content/src/lib/components/info-drawer/comments-tab/comments-tab.component.spec.ts diff --git a/app/src/app/content-plugin/components/info-drawer/comments-tab/comments-tab.component.ts b/projects/aca-content/src/lib/components/info-drawer/comments-tab/comments-tab.component.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/comments-tab/comments-tab.component.ts rename to projects/aca-content/src/lib/components/info-drawer/comments-tab/comments-tab.component.ts diff --git a/app/src/app/content-plugin/components/info-drawer/info.drawer.module.ts b/projects/aca-content/src/lib/components/info-drawer/info.drawer.module.ts similarity index 97% rename from app/src/app/content-plugin/components/info-drawer/info.drawer.module.ts rename to projects/aca-content/src/lib/components/info-drawer/info.drawer.module.ts index 34e7995ae..db5e36fb2 100644 --- a/app/src/app/content-plugin/components/info-drawer/info.drawer.module.ts +++ b/projects/aca-content/src/lib/components/info-drawer/info.drawer.module.ts @@ -29,7 +29,7 @@ import { ExtensionsModule } from '@alfresco/adf-extensions'; import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { DirectivesModule } from '../../directives/directives.module'; -import { MaterialModule } from '../../../material.module'; +import { MaterialModule } from '../../material.module'; import { CommentsTabComponent } from './comments-tab/comments-tab.component'; import { MetadataTabComponent } from './metadata-tab/metadata-tab.component'; import { LibraryMetadataTabComponent } from './library-metadata-tab/library-metadata-tab.component'; diff --git a/app/src/app/content-plugin/components/info-drawer/library-metadata-tab/library-metadata-form.component.html b/projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.html similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/library-metadata-tab/library-metadata-form.component.html rename to projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.html diff --git a/app/src/app/content-plugin/components/info-drawer/library-metadata-tab/library-metadata-form.component.spec.ts b/projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/library-metadata-tab/library-metadata-form.component.spec.ts rename to projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.spec.ts diff --git a/app/src/app/content-plugin/components/info-drawer/library-metadata-tab/library-metadata-form.component.ts b/projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/library-metadata-tab/library-metadata-form.component.ts rename to projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-form.component.ts diff --git a/app/src/app/content-plugin/components/info-drawer/library-metadata-tab/library-metadata-tab.component.ts b/projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-tab.component.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/library-metadata-tab/library-metadata-tab.component.ts rename to projects/aca-content/src/lib/components/info-drawer/library-metadata-tab/library-metadata-tab.component.ts diff --git a/app/src/app/content-plugin/components/info-drawer/metadata-tab/metadata-tab.component.spec.ts b/projects/aca-content/src/lib/components/info-drawer/metadata-tab/metadata-tab.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/metadata-tab/metadata-tab.component.spec.ts rename to projects/aca-content/src/lib/components/info-drawer/metadata-tab/metadata-tab.component.spec.ts diff --git a/app/src/app/content-plugin/components/info-drawer/metadata-tab/metadata-tab.component.ts b/projects/aca-content/src/lib/components/info-drawer/metadata-tab/metadata-tab.component.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/metadata-tab/metadata-tab.component.ts rename to projects/aca-content/src/lib/components/info-drawer/metadata-tab/metadata-tab.component.ts diff --git a/app/src/app/content-plugin/components/info-drawer/versions-tab/versions-tab.component.spec.ts b/projects/aca-content/src/lib/components/info-drawer/versions-tab/versions-tab.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/versions-tab/versions-tab.component.spec.ts rename to projects/aca-content/src/lib/components/info-drawer/versions-tab/versions-tab.component.spec.ts diff --git a/app/src/app/content-plugin/components/info-drawer/versions-tab/versions-tab.component.ts b/projects/aca-content/src/lib/components/info-drawer/versions-tab/versions-tab.component.ts similarity index 100% rename from app/src/app/content-plugin/components/info-drawer/versions-tab/versions-tab.component.ts rename to projects/aca-content/src/lib/components/info-drawer/versions-tab/versions-tab.component.ts diff --git a/app/src/app/content-plugin/components/layout/app-layout/app-layout.component.html b/projects/aca-content/src/lib/components/layout/app-layout/app-layout.component.html similarity index 100% rename from app/src/app/content-plugin/components/layout/app-layout/app-layout.component.html rename to projects/aca-content/src/lib/components/layout/app-layout/app-layout.component.html diff --git a/app/src/app/content-plugin/components/layout/app-layout/app-layout.component.scss b/projects/aca-content/src/lib/components/layout/app-layout/app-layout.component.scss similarity index 100% rename from app/src/app/content-plugin/components/layout/app-layout/app-layout.component.scss rename to projects/aca-content/src/lib/components/layout/app-layout/app-layout.component.scss diff --git a/app/src/app/content-plugin/components/layout/app-layout/app-layout.component.spec.ts b/projects/aca-content/src/lib/components/layout/app-layout/app-layout.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/layout/app-layout/app-layout.component.spec.ts rename to projects/aca-content/src/lib/components/layout/app-layout/app-layout.component.spec.ts diff --git a/app/src/app/content-plugin/components/layout/app-layout/app-layout.component.ts b/projects/aca-content/src/lib/components/layout/app-layout/app-layout.component.ts similarity index 100% rename from app/src/app/content-plugin/components/layout/app-layout/app-layout.component.ts rename to projects/aca-content/src/lib/components/layout/app-layout/app-layout.component.ts diff --git a/app/src/app/content-plugin/components/layout/layout.module.ts b/projects/aca-content/src/lib/components/layout/layout.module.ts similarity index 100% rename from app/src/app/content-plugin/components/layout/layout.module.ts rename to projects/aca-content/src/lib/components/layout/layout.module.ts diff --git a/app/src/app/content-plugin/components/libraries/libraries.component.html b/projects/aca-content/src/lib/components/libraries/libraries.component.html similarity index 100% rename from app/src/app/content-plugin/components/libraries/libraries.component.html rename to projects/aca-content/src/lib/components/libraries/libraries.component.html diff --git a/app/src/app/content-plugin/components/libraries/libraries.component.spec.ts b/projects/aca-content/src/lib/components/libraries/libraries.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/libraries/libraries.component.spec.ts rename to projects/aca-content/src/lib/components/libraries/libraries.component.spec.ts diff --git a/app/src/app/content-plugin/components/libraries/libraries.component.ts b/projects/aca-content/src/lib/components/libraries/libraries.component.ts similarity index 100% rename from app/src/app/content-plugin/components/libraries/libraries.component.ts rename to projects/aca-content/src/lib/components/libraries/libraries.component.ts diff --git a/app/src/app/content-plugin/components/login/login.component.html b/projects/aca-content/src/lib/components/login/login.component.html similarity index 100% rename from app/src/app/content-plugin/components/login/login.component.html rename to projects/aca-content/src/lib/components/login/login.component.html diff --git a/app/src/app/content-plugin/components/login/login.component.ts b/projects/aca-content/src/lib/components/login/login.component.ts similarity index 100% rename from app/src/app/content-plugin/components/login/login.component.ts rename to projects/aca-content/src/lib/components/login/login.component.ts diff --git a/app/src/app/content-plugin/components/login/login.module.ts b/projects/aca-content/src/lib/components/login/login.module.ts similarity index 100% rename from app/src/app/content-plugin/components/login/login.module.ts rename to projects/aca-content/src/lib/components/login/login.module.ts diff --git a/app/src/app/content-plugin/components/main-action/main-action.component.html b/projects/aca-content/src/lib/components/main-action/main-action.component.html similarity index 100% rename from app/src/app/content-plugin/components/main-action/main-action.component.html rename to projects/aca-content/src/lib/components/main-action/main-action.component.html diff --git a/app/src/app/content-plugin/components/main-action/main-action.component.scss b/projects/aca-content/src/lib/components/main-action/main-action.component.scss similarity index 100% rename from app/src/app/content-plugin/components/main-action/main-action.component.scss rename to projects/aca-content/src/lib/components/main-action/main-action.component.scss diff --git a/app/src/app/content-plugin/components/main-action/main-action.component.spec.ts b/projects/aca-content/src/lib/components/main-action/main-action.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/main-action/main-action.component.spec.ts rename to projects/aca-content/src/lib/components/main-action/main-action.component.spec.ts diff --git a/app/src/app/content-plugin/components/main-action/main-action.component.ts b/projects/aca-content/src/lib/components/main-action/main-action.component.ts similarity index 100% rename from app/src/app/content-plugin/components/main-action/main-action.component.ts rename to projects/aca-content/src/lib/components/main-action/main-action.component.ts diff --git a/app/src/app/content-plugin/components/main-action/main-action.module.ts b/projects/aca-content/src/lib/components/main-action/main-action.module.ts similarity index 100% rename from app/src/app/content-plugin/components/main-action/main-action.module.ts rename to projects/aca-content/src/lib/components/main-action/main-action.module.ts diff --git a/app/src/app/content-plugin/components/node-version/node-version-form.component.html b/projects/aca-content/src/lib/components/node-version/node-version-form.component.html similarity index 100% rename from app/src/app/content-plugin/components/node-version/node-version-form.component.html rename to projects/aca-content/src/lib/components/node-version/node-version-form.component.html diff --git a/app/src/app/content-plugin/components/node-version/node-version-form.component.scss b/projects/aca-content/src/lib/components/node-version/node-version-form.component.scss similarity index 100% rename from app/src/app/content-plugin/components/node-version/node-version-form.component.scss rename to projects/aca-content/src/lib/components/node-version/node-version-form.component.scss diff --git a/app/src/app/content-plugin/components/node-version/node-version-form.component.spec.ts b/projects/aca-content/src/lib/components/node-version/node-version-form.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/node-version/node-version-form.component.spec.ts rename to projects/aca-content/src/lib/components/node-version/node-version-form.component.spec.ts diff --git a/app/src/app/content-plugin/components/node-version/node-version-form.component.ts b/projects/aca-content/src/lib/components/node-version/node-version-form.component.ts similarity index 100% rename from app/src/app/content-plugin/components/node-version/node-version-form.component.ts rename to projects/aca-content/src/lib/components/node-version/node-version-form.component.ts diff --git a/app/src/app/content-plugin/components/node-version/node-version.module.ts b/projects/aca-content/src/lib/components/node-version/node-version.module.ts similarity index 100% rename from app/src/app/content-plugin/components/node-version/node-version.module.ts rename to projects/aca-content/src/lib/components/node-version/node-version.module.ts diff --git a/app/src/app/content-plugin/components/page.component.spec.ts b/projects/aca-content/src/lib/components/page.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/page.component.spec.ts rename to projects/aca-content/src/lib/components/page.component.spec.ts diff --git a/app/src/app/content-plugin/components/page.component.ts b/projects/aca-content/src/lib/components/page.component.ts similarity index 100% rename from app/src/app/content-plugin/components/page.component.ts rename to projects/aca-content/src/lib/components/page.component.ts diff --git a/app/src/app/content-plugin/components/preview/preview.component.html b/projects/aca-content/src/lib/components/preview/preview.component.html similarity index 100% rename from app/src/app/content-plugin/components/preview/preview.component.html rename to projects/aca-content/src/lib/components/preview/preview.component.html diff --git a/app/src/app/content-plugin/components/preview/preview.component.scss b/projects/aca-content/src/lib/components/preview/preview.component.scss similarity index 100% rename from app/src/app/content-plugin/components/preview/preview.component.scss rename to projects/aca-content/src/lib/components/preview/preview.component.scss diff --git a/app/src/app/content-plugin/components/preview/preview.component.spec.ts b/projects/aca-content/src/lib/components/preview/preview.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/preview/preview.component.spec.ts rename to projects/aca-content/src/lib/components/preview/preview.component.spec.ts diff --git a/app/src/app/content-plugin/components/preview/preview.component.ts b/projects/aca-content/src/lib/components/preview/preview.component.ts similarity index 100% rename from app/src/app/content-plugin/components/preview/preview.component.ts rename to projects/aca-content/src/lib/components/preview/preview.component.ts diff --git a/app/src/app/content-plugin/components/preview/preview.module.ts b/projects/aca-content/src/lib/components/preview/preview.module.ts similarity index 96% rename from app/src/app/content-plugin/components/preview/preview.module.ts rename to projects/aca-content/src/lib/components/preview/preview.module.ts index 324601522..80f879c53 100644 --- a/app/src/app/content-plugin/components/preview/preview.module.ts +++ b/projects/aca-content/src/lib/components/preview/preview.module.ts @@ -28,7 +28,7 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { Routes, RouterModule } from '@angular/router'; import { ContentDirectiveModule } from '@alfresco/adf-content-services'; -import { CoreExtensionsModule } from '../../../extensions/core.extensions.module'; +import { CoreExtensionsModule } from '../../extensions/core.extensions.module'; import { DirectivesModule } from '../../directives/directives.module'; import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module'; import { PreviewComponent } from './preview.component'; diff --git a/app/src/app/content-plugin/components/recent-files/recent-files.component.html b/projects/aca-content/src/lib/components/recent-files/recent-files.component.html similarity index 100% rename from app/src/app/content-plugin/components/recent-files/recent-files.component.html rename to projects/aca-content/src/lib/components/recent-files/recent-files.component.html diff --git a/app/src/app/content-plugin/components/recent-files/recent-files.component.spec.ts b/projects/aca-content/src/lib/components/recent-files/recent-files.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/recent-files/recent-files.component.spec.ts rename to projects/aca-content/src/lib/components/recent-files/recent-files.component.spec.ts diff --git a/app/src/app/content-plugin/components/recent-files/recent-files.component.ts b/projects/aca-content/src/lib/components/recent-files/recent-files.component.ts similarity index 100% rename from app/src/app/content-plugin/components/recent-files/recent-files.component.ts rename to projects/aca-content/src/lib/components/recent-files/recent-files.component.ts diff --git a/app/src/app/content-plugin/components/search/search-action-menu/search-action-menu.component.html b/projects/aca-content/src/lib/components/search/search-action-menu/search-action-menu.component.html similarity index 100% rename from app/src/app/content-plugin/components/search/search-action-menu/search-action-menu.component.html rename to projects/aca-content/src/lib/components/search/search-action-menu/search-action-menu.component.html diff --git a/app/src/app/content-plugin/components/search/search-action-menu/search-action-menu.component.spec.ts b/projects/aca-content/src/lib/components/search/search-action-menu/search-action-menu.component.spec.ts similarity index 81% rename from app/src/app/content-plugin/components/search/search-action-menu/search-action-menu.component.spec.ts rename to projects/aca-content/src/lib/components/search/search-action-menu/search-action-menu.component.spec.ts index dafd2167f..1c044ee4e 100644 --- a/app/src/app/content-plugin/components/search/search-action-menu/search-action-menu.component.spec.ts +++ b/projects/aca-content/src/lib/components/search/search-action-menu/search-action-menu.component.spec.ts @@ -81,18 +81,18 @@ describe('SearchActionMenuComponent', () => { await fixture.whenStable(); fixture.detectChanges(); - const sortingMenuButton: HTMLButtonElement = document.querySelector('#aca-button-sorting-menu'); - sortingMenuButton.dispatchEvent(new Event('click')); + const sortingMenuButton: HTMLButtonElement | null = document.querySelector('#aca-button-sorting-menu'); + sortingMenuButton?.dispatchEvent(new Event('click')); await fixture.whenStable(); fixture.detectChanges(); - const fieldAMenuButton: HTMLButtonElement = document.querySelector('#keyA-sorting-option'); - fieldAMenuButton.dispatchEvent(new Event('click')); + const fieldAMenuButton: HTMLButtonElement | null = document.querySelector('#keyA-sorting-option'); + fieldAMenuButton?.dispatchEvent(new Event('click')); await fixture.whenStable(); fixture.detectChanges(); - const directionButton: HTMLButtonElement = document.querySelector('#keyA-sorting-option-asc'); - directionButton.dispatchEvent(new Event('click')); + const directionButton: HTMLButtonElement | null = document.querySelector('#keyA-sorting-option-asc'); + directionButton?.dispatchEvent(new Event('click')); await fixture.whenStable(); fixture.detectChanges(); @@ -117,18 +117,18 @@ describe('SearchActionMenuComponent', () => { await fixture.whenStable(); fixture.detectChanges(); - const sortingMenuButton: HTMLButtonElement = document.querySelector('#aca-button-sorting-menu'); - sortingMenuButton.dispatchEvent(new Event('click')); + const sortingMenuButton: HTMLButtonElement | null = document.querySelector('#aca-button-sorting-menu'); + sortingMenuButton?.dispatchEvent(new Event('click')); await fixture.whenStable(); fixture.detectChanges(); - const fieldAMenuButton: HTMLButtonElement = document.querySelector('#keyB-sorting-option'); - fieldAMenuButton.dispatchEvent(new Event('click')); + const fieldAMenuButton: HTMLButtonElement | null = document.querySelector('#keyB-sorting-option'); + fieldAMenuButton?.dispatchEvent(new Event('click')); await fixture.whenStable(); fixture.detectChanges(); - const directionButton: HTMLButtonElement = document.querySelector('#keyB-sorting-option-desc'); - directionButton.dispatchEvent(new Event('click')); + const directionButton: HTMLButtonElement | null = document.querySelector('#keyB-sorting-option-desc'); + directionButton?.dispatchEvent(new Event('click')); await fixture.whenStable(); fixture.detectChanges(); diff --git a/app/src/app/content-plugin/components/search/search-action-menu/search-action-menu.component.ts b/projects/aca-content/src/lib/components/search/search-action-menu/search-action-menu.component.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-action-menu/search-action-menu.component.ts rename to projects/aca-content/src/lib/components/search/search-action-menu/search-action-menu.component.ts diff --git a/app/src/app/content-plugin/components/search/search-input-control/search-input-control.component.html b/projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.html similarity index 100% rename from app/src/app/content-plugin/components/search/search-input-control/search-input-control.component.html rename to projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.html diff --git a/app/src/app/content-plugin/components/search/search-input-control/search-input-control.component.scss b/projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.scss similarity index 100% rename from app/src/app/content-plugin/components/search/search-input-control/search-input-control.component.scss rename to projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.scss diff --git a/app/src/app/content-plugin/components/search/search-input-control/search-input-control.component.spec.ts b/projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-input-control/search-input-control.component.spec.ts rename to projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.spec.ts diff --git a/app/src/app/content-plugin/components/search/search-input-control/search-input-control.component.ts b/projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-input-control/search-input-control.component.ts rename to projects/aca-content/src/lib/components/search/search-input-control/search-input-control.component.ts diff --git a/app/src/app/content-plugin/components/search/search-input.module.ts b/projects/aca-content/src/lib/components/search/search-input.module.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-input.module.ts rename to projects/aca-content/src/lib/components/search/search-input.module.ts diff --git a/app/src/app/content-plugin/components/search/search-input/search-input.component.html b/projects/aca-content/src/lib/components/search/search-input/search-input.component.html similarity index 100% rename from app/src/app/content-plugin/components/search/search-input/search-input.component.html rename to projects/aca-content/src/lib/components/search/search-input/search-input.component.html diff --git a/app/src/app/content-plugin/components/search/search-input/search-input.component.scss b/projects/aca-content/src/lib/components/search/search-input/search-input.component.scss similarity index 100% rename from app/src/app/content-plugin/components/search/search-input/search-input.component.scss rename to projects/aca-content/src/lib/components/search/search-input/search-input.component.scss diff --git a/app/src/app/content-plugin/components/search/search-input/search-input.component.spec.ts b/projects/aca-content/src/lib/components/search/search-input/search-input.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-input/search-input.component.spec.ts rename to projects/aca-content/src/lib/components/search/search-input/search-input.component.spec.ts diff --git a/app/src/app/content-plugin/components/search/search-input/search-input.component.ts b/projects/aca-content/src/lib/components/search/search-input/search-input.component.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-input/search-input.component.ts rename to projects/aca-content/src/lib/components/search/search-input/search-input.component.ts diff --git a/app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-query-builder.service.spec.ts b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-query-builder.service.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-query-builder.service.spec.ts rename to projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-query-builder.service.spec.ts diff --git a/app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-query-builder.service.ts b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-query-builder.service.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-query-builder.service.ts rename to projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-query-builder.service.ts diff --git a/app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-results.component.html b/projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.html similarity index 100% rename from app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-results.component.html rename to projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.html diff --git a/app/src/app/content-plugin/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 similarity index 95% rename from app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-results.component.scss rename to projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.scss index 4ebf0b596..7fff474f1 100644 --- a/app/src/app/content-plugin/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,4 +1,4 @@ -@import 'mixins'; +@import '../../../ui/mixins'; .adf-search-results { @include flex-row; diff --git a/app/src/app/content-plugin/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 similarity index 100% rename from app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-results.component.spec.ts rename to projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.spec.ts diff --git a/app/src/app/content-plugin/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 similarity index 100% rename from app/src/app/content-plugin/components/search/search-libraries-results/search-libraries-results.component.ts rename to projects/aca-content/src/lib/components/search/search-libraries-results/search-libraries-results.component.ts diff --git a/app/src/app/content-plugin/components/search/search-results-row/search-results-row.component.html b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.html similarity index 100% rename from app/src/app/content-plugin/components/search/search-results-row/search-results-row.component.html rename to projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.html diff --git a/app/src/app/content-plugin/components/search/search-results-row/search-results-row.component.scss b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.scss similarity index 100% rename from app/src/app/content-plugin/components/search/search-results-row/search-results-row.component.scss rename to projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.scss diff --git a/app/src/app/content-plugin/components/search/search-results-row/search-results-row.component.ts b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-results-row/search-results-row.component.ts rename to projects/aca-content/src/lib/components/search/search-results-row/search-results-row.component.ts diff --git a/app/src/app/content-plugin/components/search/search-results-row/search-results-row.components.spec.ts b/projects/aca-content/src/lib/components/search/search-results-row/search-results-row.components.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-results-row/search-results-row.components.spec.ts rename to projects/aca-content/src/lib/components/search/search-results-row/search-results-row.components.spec.ts diff --git a/app/src/app/content-plugin/components/search/search-results.module.ts b/projects/aca-content/src/lib/components/search/search-results.module.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-results.module.ts rename to projects/aca-content/src/lib/components/search/search-results.module.ts diff --git a/app/src/app/content-plugin/components/search/search-results/search-results.component.html b/projects/aca-content/src/lib/components/search/search-results/search-results.component.html similarity index 100% rename from app/src/app/content-plugin/components/search/search-results/search-results.component.html rename to projects/aca-content/src/lib/components/search/search-results/search-results.component.html diff --git a/app/src/app/content-plugin/components/search/search-results/search-results.component.scss b/projects/aca-content/src/lib/components/search/search-results/search-results.component.scss similarity index 98% rename from app/src/app/content-plugin/components/search/search-results/search-results.component.scss rename to projects/aca-content/src/lib/components/search/search-results/search-results.component.scss index e3e5c4325..9a851b73a 100644 --- a/app/src/app/content-plugin/components/search/search-results/search-results.component.scss +++ b/projects/aca-content/src/lib/components/search/search-results/search-results.component.scss @@ -1,4 +1,4 @@ -@import 'mixins'; +@import '../../../ui/mixins'; $adf-chip-background: #efefef; $contrast-gray: #646569; diff --git a/app/src/app/content-plugin/components/search/search-results/search-results.component.spec.ts b/projects/aca-content/src/lib/components/search/search-results/search-results.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-results/search-results.component.spec.ts rename to projects/aca-content/src/lib/components/search/search-results/search-results.component.spec.ts diff --git a/app/src/app/content-plugin/components/search/search-results/search-results.component.ts b/projects/aca-content/src/lib/components/search/search-results/search-results.component.ts similarity index 100% rename from app/src/app/content-plugin/components/search/search-results/search-results.component.ts rename to projects/aca-content/src/lib/components/search/search-results/search-results.component.ts diff --git a/app/src/app/content-plugin/components/shared-files/shared-files.component.html b/projects/aca-content/src/lib/components/shared-files/shared-files.component.html similarity index 100% rename from app/src/app/content-plugin/components/shared-files/shared-files.component.html rename to projects/aca-content/src/lib/components/shared-files/shared-files.component.html diff --git a/app/src/app/content-plugin/components/shared-files/shared-files.component.spec.ts b/projects/aca-content/src/lib/components/shared-files/shared-files.component.spec.ts similarity index 99% rename from app/src/app/content-plugin/components/shared-files/shared-files.component.spec.ts rename to projects/aca-content/src/lib/components/shared-files/shared-files.component.spec.ts index 7a2647750..bd6b47593 100644 --- a/app/src/app/content-plugin/components/shared-files/shared-files.component.spec.ts +++ b/projects/aca-content/src/lib/components/shared-files/shared-files.component.spec.ts @@ -62,7 +62,6 @@ describe('SharedFilesComponent', () => { const customResourcesService = TestBed.inject(CustomResourcesService); spyOn(customResourcesService, 'loadSharedLinks').and.returnValue(of(page)); - fixture = TestBed.createComponent(SharedFilesComponent); }); diff --git a/app/src/app/content-plugin/components/shared-files/shared-files.component.ts b/projects/aca-content/src/lib/components/shared-files/shared-files.component.ts similarity index 100% rename from app/src/app/content-plugin/components/shared-files/shared-files.component.ts rename to projects/aca-content/src/lib/components/shared-files/shared-files.component.ts diff --git a/app/src/app/content-plugin/components/shared-link-view/shared-link-view.component.html b/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.html similarity index 100% rename from app/src/app/content-plugin/components/shared-link-view/shared-link-view.component.html rename to projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.html diff --git a/app/src/app/content-plugin/components/shared-link-view/shared-link-view.component.scss b/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.scss similarity index 100% rename from app/src/app/content-plugin/components/shared-link-view/shared-link-view.component.scss rename to projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.scss diff --git a/app/src/app/content-plugin/components/shared-link-view/shared-link-view.component.spec.ts b/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/shared-link-view/shared-link-view.component.spec.ts rename to projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.spec.ts diff --git a/app/src/app/content-plugin/components/shared-link-view/shared-link-view.component.ts b/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.ts similarity index 100% rename from app/src/app/content-plugin/components/shared-link-view/shared-link-view.component.ts rename to projects/aca-content/src/lib/components/shared-link-view/shared-link-view.component.ts diff --git a/app/src/app/content-plugin/components/shared-link-view/shared-link-view.module.ts b/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.module.ts similarity index 96% rename from app/src/app/content-plugin/components/shared-link-view/shared-link-view.module.ts rename to projects/aca-content/src/lib/components/shared-link-view/shared-link-view.module.ts index 7bb8e92e0..6c4b28bd9 100644 --- a/app/src/app/content-plugin/components/shared-link-view/shared-link-view.module.ts +++ b/projects/aca-content/src/lib/components/shared-link-view/shared-link-view.module.ts @@ -32,7 +32,7 @@ import { DirectivesModule } from '../../directives/directives.module'; import { AppCommonModule } from '../common/common.module'; import { AppToolbarModule } from '../toolbar/toolbar.module'; import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module'; -import { CoreExtensionsModule } from '../../../extensions/core.extensions.module'; +import { CoreExtensionsModule } from '../../extensions/core.extensions.module'; const routes: Routes = [ { diff --git a/app/src/app/content-plugin/components/sidenav/components/button-menu.component.html b/projects/aca-content/src/lib/components/sidenav/components/button-menu.component.html similarity index 100% rename from app/src/app/content-plugin/components/sidenav/components/button-menu.component.html rename to projects/aca-content/src/lib/components/sidenav/components/button-menu.component.html diff --git a/app/src/app/content-plugin/components/sidenav/components/button-menu.component.spec.ts b/projects/aca-content/src/lib/components/sidenav/components/button-menu.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/components/button-menu.component.spec.ts rename to projects/aca-content/src/lib/components/sidenav/components/button-menu.component.spec.ts diff --git a/app/src/app/content-plugin/components/sidenav/components/button-menu.component.ts b/projects/aca-content/src/lib/components/sidenav/components/button-menu.component.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/components/button-menu.component.ts rename to projects/aca-content/src/lib/components/sidenav/components/button-menu.component.ts diff --git a/app/src/app/content-plugin/components/sidenav/components/expand-menu.component.html b/projects/aca-content/src/lib/components/sidenav/components/expand-menu.component.html similarity index 100% rename from app/src/app/content-plugin/components/sidenav/components/expand-menu.component.html rename to projects/aca-content/src/lib/components/sidenav/components/expand-menu.component.html diff --git a/app/src/app/content-plugin/components/sidenav/components/expand-menu.component.spec.ts b/projects/aca-content/src/lib/components/sidenav/components/expand-menu.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/components/expand-menu.component.spec.ts rename to projects/aca-content/src/lib/components/sidenav/components/expand-menu.component.spec.ts diff --git a/app/src/app/content-plugin/components/sidenav/components/expand-menu.component.ts b/projects/aca-content/src/lib/components/sidenav/components/expand-menu.component.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/components/expand-menu.component.ts rename to projects/aca-content/src/lib/components/sidenav/components/expand-menu.component.ts diff --git a/app/src/app/content-plugin/components/sidenav/directives/action.directive.spec.ts b/projects/aca-content/src/lib/components/sidenav/directives/action.directive.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/directives/action.directive.spec.ts rename to projects/aca-content/src/lib/components/sidenav/directives/action.directive.spec.ts diff --git a/app/src/app/content-plugin/components/sidenav/directives/action.directive.ts b/projects/aca-content/src/lib/components/sidenav/directives/action.directive.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/directives/action.directive.ts rename to projects/aca-content/src/lib/components/sidenav/directives/action.directive.ts diff --git a/app/src/app/content-plugin/components/sidenav/directives/active-link.directive.spec.ts b/projects/aca-content/src/lib/components/sidenav/directives/active-link.directive.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/directives/active-link.directive.spec.ts rename to projects/aca-content/src/lib/components/sidenav/directives/active-link.directive.spec.ts diff --git a/app/src/app/content-plugin/components/sidenav/directives/active-link.directive.ts b/projects/aca-content/src/lib/components/sidenav/directives/active-link.directive.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/directives/active-link.directive.ts rename to projects/aca-content/src/lib/components/sidenav/directives/active-link.directive.ts diff --git a/app/src/app/content-plugin/components/sidenav/directives/expansion-panel.directive.spec.ts b/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/directives/expansion-panel.directive.spec.ts rename to projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.spec.ts diff --git a/app/src/app/content-plugin/components/sidenav/directives/expansion-panel.directive.ts b/projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/directives/expansion-panel.directive.ts rename to projects/aca-content/src/lib/components/sidenav/directives/expansion-panel.directive.ts diff --git a/app/src/app/content-plugin/components/sidenav/directives/menu-panel.directive.spec.ts b/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/directives/menu-panel.directive.spec.ts rename to projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.spec.ts diff --git a/app/src/app/content-plugin/components/sidenav/directives/menu-panel.directive.ts b/projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/directives/menu-panel.directive.ts rename to projects/aca-content/src/lib/components/sidenav/directives/menu-panel.directive.ts diff --git a/app/src/app/content-plugin/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.html b/projects/aca-content/src/lib/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.html similarity index 100% rename from app/src/app/content-plugin/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.html rename to projects/aca-content/src/lib/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.html diff --git a/app/src/app/content-plugin/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.ts b/projects/aca-content/src/lib/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.ts rename to projects/aca-content/src/lib/components/sidenav/sidenav-wrapper/sidenav-wrapper.component.ts diff --git a/app/src/app/content-plugin/components/sidenav/sidenav.component.html b/projects/aca-content/src/lib/components/sidenav/sidenav.component.html similarity index 100% rename from app/src/app/content-plugin/components/sidenav/sidenav.component.html rename to projects/aca-content/src/lib/components/sidenav/sidenav.component.html diff --git a/app/src/app/content-plugin/components/sidenav/sidenav.component.scss b/projects/aca-content/src/lib/components/sidenav/sidenav.component.scss similarity index 100% rename from app/src/app/content-plugin/components/sidenav/sidenav.component.scss rename to projects/aca-content/src/lib/components/sidenav/sidenav.component.scss diff --git a/app/src/app/content-plugin/components/sidenav/sidenav.component.spec.ts b/projects/aca-content/src/lib/components/sidenav/sidenav.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/sidenav.component.spec.ts rename to projects/aca-content/src/lib/components/sidenav/sidenav.component.spec.ts diff --git a/app/src/app/content-plugin/components/sidenav/sidenav.component.ts b/projects/aca-content/src/lib/components/sidenav/sidenav.component.ts similarity index 100% rename from app/src/app/content-plugin/components/sidenav/sidenav.component.ts rename to projects/aca-content/src/lib/components/sidenav/sidenav.component.ts diff --git a/app/src/app/content-plugin/components/sidenav/sidenav.module.ts b/projects/aca-content/src/lib/components/sidenav/sidenav.module.ts similarity index 97% rename from app/src/app/content-plugin/components/sidenav/sidenav.module.ts rename to projects/aca-content/src/lib/components/sidenav/sidenav.module.ts index 9141060c3..e47bdab22 100644 --- a/app/src/app/content-plugin/components/sidenav/sidenav.module.ts +++ b/projects/aca-content/src/lib/components/sidenav/sidenav.module.ts @@ -29,7 +29,7 @@ import { CommonModule } from '@angular/common'; import { CoreModule } from '@alfresco/adf-core'; import { RouterModule } from '@angular/router'; import { ExtensionsModule } from '@alfresco/adf-extensions'; -import { CoreExtensionsModule } from '../../../extensions/core.extensions.module'; +import { CoreExtensionsModule } from '../../extensions/core.extensions.module'; import { ExpansionPanelDirective } from './directives/expansion-panel.directive'; import { MenuPanelDirective } from './directives/menu-panel.directive'; import { SidenavComponent } from './sidenav.component'; diff --git a/app/src/app/content-plugin/components/toolbar/document-display-mode/document-display-mode.component.spec.ts b/projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/document-display-mode/document-display-mode.component.spec.ts rename to projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.spec.ts diff --git a/app/src/app/content-plugin/components/toolbar/document-display-mode/document-display-mode.component.ts b/projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/document-display-mode/document-display-mode.component.ts rename to projects/aca-content/src/lib/components/toolbar/document-display-mode/document-display-mode.component.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.spec.ts b/projects/aca-content/src/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.spec.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.spec.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.ts b/projects/aca-content/src/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-edit-offline/toggle-edit-offline.component.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.spec.ts b/projects/aca-content/src/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.spec.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.spec.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts b/projects/aca-content/src/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-favorite-library/toggle-favorite-library.component.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-favorite/toggle-favorite.component.spec.ts b/projects/aca-content/src/lib/components/toolbar/toggle-favorite/toggle-favorite.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-favorite/toggle-favorite.component.spec.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-favorite/toggle-favorite.component.spec.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-favorite/toggle-favorite.component.ts b/projects/aca-content/src/lib/components/toolbar/toggle-favorite/toggle-favorite.component.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-favorite/toggle-favorite.component.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-favorite/toggle-favorite.component.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.spec.ts b/projects/aca-content/src/lib/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.spec.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.spec.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.ts b/projects/aca-content/src/lib/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-info-drawer/toggle-info-drawer.component.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-join-library/toggle-join-library-button.component.ts b/projects/aca-content/src/lib/components/toolbar/toggle-join-library/toggle-join-library-button.component.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-join-library/toggle-join-library-button.component.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-join-library/toggle-join-library-button.component.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-join-library/toggle-join-library-menu.component.ts b/projects/aca-content/src/lib/components/toolbar/toggle-join-library/toggle-join-library-menu.component.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-join-library/toggle-join-library-menu.component.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-join-library/toggle-join-library-menu.component.ts diff --git a/app/src/app/content-plugin/components/toolbar/toggle-join-library/toggle-join-library.component.spec.ts b/projects/aca-content/src/lib/components/toolbar/toggle-join-library/toggle-join-library.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toggle-join-library/toggle-join-library.component.spec.ts rename to projects/aca-content/src/lib/components/toolbar/toggle-join-library/toggle-join-library.component.spec.ts diff --git a/app/src/app/content-plugin/components/toolbar/toolbar.module.ts b/projects/aca-content/src/lib/components/toolbar/toolbar.module.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/toolbar.module.ts rename to projects/aca-content/src/lib/components/toolbar/toolbar.module.ts diff --git a/app/src/app/content-plugin/components/toolbar/view-node/view-node.component.spec.ts b/projects/aca-content/src/lib/components/toolbar/view-node/view-node.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/view-node/view-node.component.spec.ts rename to projects/aca-content/src/lib/components/toolbar/view-node/view-node.component.spec.ts diff --git a/app/src/app/content-plugin/components/toolbar/view-node/view-node.component.ts b/projects/aca-content/src/lib/components/toolbar/view-node/view-node.component.ts similarity index 100% rename from app/src/app/content-plugin/components/toolbar/view-node/view-node.component.ts rename to projects/aca-content/src/lib/components/toolbar/view-node/view-node.component.ts diff --git a/app/src/app/content-plugin/components/trashcan/trashcan.component.html b/projects/aca-content/src/lib/components/trashcan/trashcan.component.html similarity index 100% rename from app/src/app/content-plugin/components/trashcan/trashcan.component.html rename to projects/aca-content/src/lib/components/trashcan/trashcan.component.html diff --git a/app/src/app/content-plugin/components/trashcan/trashcan.component.spec.ts b/projects/aca-content/src/lib/components/trashcan/trashcan.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/trashcan/trashcan.component.spec.ts rename to projects/aca-content/src/lib/components/trashcan/trashcan.component.spec.ts diff --git a/app/src/app/content-plugin/components/trashcan/trashcan.component.ts b/projects/aca-content/src/lib/components/trashcan/trashcan.component.ts similarity index 100% rename from app/src/app/content-plugin/components/trashcan/trashcan.component.ts rename to projects/aca-content/src/lib/components/trashcan/trashcan.component.ts diff --git a/app/src/app/content-plugin/components/trashcan/trashcan.module.ts b/projects/aca-content/src/lib/components/trashcan/trashcan.module.ts similarity index 100% rename from app/src/app/content-plugin/components/trashcan/trashcan.module.ts rename to projects/aca-content/src/lib/components/trashcan/trashcan.module.ts diff --git a/app/src/app/content-plugin/components/upload-files-dialog/upload-files-dialog.component.html b/projects/aca-content/src/lib/components/upload-files-dialog/upload-files-dialog.component.html similarity index 100% rename from app/src/app/content-plugin/components/upload-files-dialog/upload-files-dialog.component.html rename to projects/aca-content/src/lib/components/upload-files-dialog/upload-files-dialog.component.html diff --git a/app/src/app/content-plugin/components/upload-files-dialog/upload-files-dialog.component.ts b/projects/aca-content/src/lib/components/upload-files-dialog/upload-files-dialog.component.ts similarity index 100% rename from app/src/app/content-plugin/components/upload-files-dialog/upload-files-dialog.component.ts rename to projects/aca-content/src/lib/components/upload-files-dialog/upload-files-dialog.component.ts diff --git a/app/src/app/content-plugin/components/view-profile/view-profile.component.html b/projects/aca-content/src/lib/components/view-profile/view-profile.component.html similarity index 100% rename from app/src/app/content-plugin/components/view-profile/view-profile.component.html rename to projects/aca-content/src/lib/components/view-profile/view-profile.component.html diff --git a/app/src/app/content-plugin/components/view-profile/view-profile.component.scss b/projects/aca-content/src/lib/components/view-profile/view-profile.component.scss similarity index 100% rename from app/src/app/content-plugin/components/view-profile/view-profile.component.scss rename to projects/aca-content/src/lib/components/view-profile/view-profile.component.scss diff --git a/app/src/app/content-plugin/components/view-profile/view-profile.component.spec.ts b/projects/aca-content/src/lib/components/view-profile/view-profile.component.spec.ts similarity index 100% rename from app/src/app/content-plugin/components/view-profile/view-profile.component.spec.ts rename to projects/aca-content/src/lib/components/view-profile/view-profile.component.spec.ts diff --git a/app/src/app/content-plugin/components/view-profile/view-profile.component.ts b/projects/aca-content/src/lib/components/view-profile/view-profile.component.ts similarity index 100% rename from app/src/app/content-plugin/components/view-profile/view-profile.component.ts rename to projects/aca-content/src/lib/components/view-profile/view-profile.component.ts diff --git a/app/src/app/content-plugin/components/view-profile/view-profile.guard.ts b/projects/aca-content/src/lib/components/view-profile/view-profile.guard.ts similarity index 100% rename from app/src/app/content-plugin/components/view-profile/view-profile.guard.ts rename to projects/aca-content/src/lib/components/view-profile/view-profile.guard.ts diff --git a/app/src/app/content-plugin/components/view-profile/view-profile.module.ts b/projects/aca-content/src/lib/components/view-profile/view-profile.module.ts similarity index 100% rename from app/src/app/content-plugin/components/view-profile/view-profile.module.ts rename to projects/aca-content/src/lib/components/view-profile/view-profile.module.ts diff --git a/app/src/app/content-plugin/components/viewer/viewer.component.html b/projects/aca-content/src/lib/components/viewer/viewer.component.html similarity index 100% rename from app/src/app/content-plugin/components/viewer/viewer.component.html rename to projects/aca-content/src/lib/components/viewer/viewer.component.html diff --git a/app/src/app/content-plugin/components/viewer/viewer.component.scss b/projects/aca-content/src/lib/components/viewer/viewer.component.scss similarity index 100% rename from app/src/app/content-plugin/components/viewer/viewer.component.scss rename to projects/aca-content/src/lib/components/viewer/viewer.component.scss diff --git a/app/src/app/content-plugin/components/viewer/viewer.component.ts b/projects/aca-content/src/lib/components/viewer/viewer.component.ts similarity index 100% rename from app/src/app/content-plugin/components/viewer/viewer.component.ts rename to projects/aca-content/src/lib/components/viewer/viewer.component.ts diff --git a/app/src/app/content-plugin/components/viewer/viewer.module.ts b/projects/aca-content/src/lib/components/viewer/viewer.module.ts similarity index 96% rename from app/src/app/content-plugin/components/viewer/viewer.module.ts rename to projects/aca-content/src/lib/components/viewer/viewer.module.ts index f7c60b4cb..da783d3a3 100644 --- a/app/src/app/content-plugin/components/viewer/viewer.module.ts +++ b/projects/aca-content/src/lib/components/viewer/viewer.module.ts @@ -30,7 +30,7 @@ import { CoreModule } from '@alfresco/adf-core'; import { ContentDirectiveModule } from '@alfresco/adf-content-services'; import { DirectivesModule } from '../../directives/directives.module'; import { AppInfoDrawerModule } from '../info-drawer/info.drawer.module'; -import { CoreExtensionsModule } from '../../../extensions/core.extensions.module'; +import { CoreExtensionsModule } from '../../extensions/core.extensions.module'; import { AppToolbarModule } from '../toolbar/toolbar.module'; import { AppViewerComponent } from './viewer.component'; diff --git a/app/src/app/content-plugin/dialogs/node-template/create-from-template.dialog.html b/projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.html similarity index 100% rename from app/src/app/content-plugin/dialogs/node-template/create-from-template.dialog.html rename to projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.html diff --git a/app/src/app/content-plugin/dialogs/node-template/create-from-template.dialog.scss b/projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.scss similarity index 100% rename from app/src/app/content-plugin/dialogs/node-template/create-from-template.dialog.scss rename to projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.scss diff --git a/app/src/app/content-plugin/dialogs/node-template/create-from-template.dialog.spec.ts b/projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.spec.ts similarity index 100% rename from app/src/app/content-plugin/dialogs/node-template/create-from-template.dialog.spec.ts rename to projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.spec.ts diff --git a/app/src/app/content-plugin/dialogs/node-template/create-from-template.dialog.ts b/projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.ts similarity index 100% rename from app/src/app/content-plugin/dialogs/node-template/create-from-template.dialog.ts rename to projects/aca-content/src/lib/dialogs/node-template/create-from-template.dialog.ts diff --git a/app/src/app/content-plugin/directives/directives.module.ts b/projects/aca-content/src/lib/directives/directives.module.ts similarity index 100% rename from app/src/app/content-plugin/directives/directives.module.ts rename to projects/aca-content/src/lib/directives/directives.module.ts diff --git a/app/src/app/content-plugin/directives/document-list.directive.spec.ts b/projects/aca-content/src/lib/directives/document-list.directive.spec.ts similarity index 100% rename from app/src/app/content-plugin/directives/document-list.directive.spec.ts rename to projects/aca-content/src/lib/directives/document-list.directive.spec.ts diff --git a/app/src/app/content-plugin/directives/document-list.directive.ts b/projects/aca-content/src/lib/directives/document-list.directive.ts similarity index 100% rename from app/src/app/content-plugin/directives/document-list.directive.ts rename to projects/aca-content/src/lib/directives/document-list.directive.ts diff --git a/app/src/app/extensions/core.extensions.module.ts b/projects/aca-content/src/lib/extensions/core.extensions.module.ts similarity index 100% rename from app/src/app/extensions/core.extensions.module.ts rename to projects/aca-content/src/lib/extensions/core.extensions.module.ts diff --git a/projects/aca-content/src/lib/material.module.ts b/projects/aca-content/src/lib/material.module.ts new file mode 100644 index 000000000..85dfb8e1e --- /dev/null +++ b/projects/aca-content/src/lib/material.module.ts @@ -0,0 +1,46 @@ +/*! + * @license + * Alfresco Example Content Application + * + * Copyright (C) 2005 - 2020 Alfresco Software Limited + * + * 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 + * along with Alfresco. If not, see . + */ + +import { NgModule } from '@angular/core'; +import { MatMenuModule } from '@angular/material/menu'; +import { MatIconModule } from '@angular/material/icon'; +import { MatButtonModule } from '@angular/material/button'; +import { MatDialogModule, MAT_DIALOG_DEFAULT_OPTIONS } from '@angular/material/dialog'; +import { MatInputModule } from '@angular/material/input'; +import { MatSnackBarModule } from '@angular/material/snack-bar'; +import { MatProgressBarModule } from '@angular/material/progress-bar'; +import { MatCardModule } from '@angular/material/card'; + +@NgModule({ + imports: [MatMenuModule, MatIconModule, MatButtonModule, MatDialogModule, MatInputModule, MatSnackBarModule, MatProgressBarModule, MatCardModule], + exports: [MatMenuModule, MatIconModule, MatButtonModule, MatDialogModule, MatInputModule, MatSnackBarModule, MatProgressBarModule, MatCardModule], + providers: [ + { + provide: MAT_DIALOG_DEFAULT_OPTIONS, + useValue: { closeOnNavigation: true, hasBackdrop: true, autoFocus: true } + } + ] +}) +export class MaterialModule {} diff --git a/app/src/app/content-plugin/services/content-management.service.spec.ts b/projects/aca-content/src/lib/services/content-management.service.spec.ts similarity index 100% rename from app/src/app/content-plugin/services/content-management.service.spec.ts rename to projects/aca-content/src/lib/services/content-management.service.spec.ts diff --git a/app/src/app/content-plugin/services/content-management.service.ts b/projects/aca-content/src/lib/services/content-management.service.ts similarity index 100% rename from app/src/app/content-plugin/services/content-management.service.ts rename to projects/aca-content/src/lib/services/content-management.service.ts diff --git a/app/src/app/content-plugin/services/content-service-extension.service.spec.ts b/projects/aca-content/src/lib/services/content-service-extension.service.spec.ts similarity index 100% rename from app/src/app/content-plugin/services/content-service-extension.service.spec.ts rename to projects/aca-content/src/lib/services/content-service-extension.service.spec.ts diff --git a/app/src/app/content-plugin/services/content-service-extension.service.ts b/projects/aca-content/src/lib/services/content-service-extension.service.ts similarity index 100% rename from app/src/app/content-plugin/services/content-service-extension.service.ts rename to projects/aca-content/src/lib/services/content-service-extension.service.ts diff --git a/app/src/app/content-plugin/services/content-url.service.spec.ts b/projects/aca-content/src/lib/services/content-url.service.spec.ts similarity index 100% rename from app/src/app/content-plugin/services/content-url.service.spec.ts rename to projects/aca-content/src/lib/services/content-url.service.spec.ts diff --git a/app/src/app/content-plugin/services/content-url.service.ts b/projects/aca-content/src/lib/services/content-url.service.ts similarity index 100% rename from app/src/app/content-plugin/services/content-url.service.ts rename to projects/aca-content/src/lib/services/content-url.service.ts diff --git a/app/src/app/content-plugin/services/node-actions.service.spec.ts b/projects/aca-content/src/lib/services/node-actions.service.spec.ts similarity index 100% rename from app/src/app/content-plugin/services/node-actions.service.spec.ts rename to projects/aca-content/src/lib/services/node-actions.service.spec.ts diff --git a/app/src/app/content-plugin/services/node-actions.service.ts b/projects/aca-content/src/lib/services/node-actions.service.ts similarity index 100% rename from app/src/app/content-plugin/services/node-actions.service.ts rename to projects/aca-content/src/lib/services/node-actions.service.ts diff --git a/app/src/app/content-plugin/services/node-template.service.spec.ts b/projects/aca-content/src/lib/services/node-template.service.spec.ts similarity index 100% rename from app/src/app/content-plugin/services/node-template.service.spec.ts rename to projects/aca-content/src/lib/services/node-template.service.spec.ts diff --git a/app/src/app/content-plugin/services/node-template.service.ts b/projects/aca-content/src/lib/services/node-template.service.ts similarity index 100% rename from app/src/app/content-plugin/services/node-template.service.ts rename to projects/aca-content/src/lib/services/node-template.service.ts diff --git a/app/src/app/content-plugin/store/app-store.module.ts b/projects/aca-content/src/lib/store/app-store.module.ts similarity index 91% rename from app/src/app/content-plugin/store/app-store.module.ts rename to projects/aca-content/src/lib/store/app-store.module.ts index 0e9105fee..fa7104ef7 100644 --- a/app/src/app/content-plugin/store/app-store.module.ts +++ b/projects/aca-content/src/lib/store/app-store.module.ts @@ -28,8 +28,6 @@ import { StoreModule } from '@ngrx/store'; import { appReducer } from './reducers/app.reducer'; import { StoreRouterConnectingModule, FullRouterStateSerializer } from '@ngrx/router-store'; import { EffectsModule } from '@ngrx/effects'; -import { environment } from '../../../environments/environment'; -import { StoreDevtoolsModule } from '@ngrx/store-devtools'; import { SharedStoreModule } from '@alfresco/aca-shared/store'; import { AppEffects, @@ -73,8 +71,7 @@ import { INITIAL_STATE } from './initial-state'; FavoriteEffects, TemplateEffects, ContextMenuEffects - ]), - !environment.production ? StoreDevtoolsModule.instrument({ maxAge: 25 }) : [] + ]) ] }) export class AppStoreModule {} diff --git a/app/src/app/content-plugin/store/effects.ts b/projects/aca-content/src/lib/store/effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects.ts rename to projects/aca-content/src/lib/store/effects.ts diff --git a/app/src/app/content-plugin/store/effects/app.effects.ts b/projects/aca-content/src/lib/store/effects/app.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/app.effects.ts rename to projects/aca-content/src/lib/store/effects/app.effects.ts diff --git a/app/src/app/content-plugin/store/effects/contextmenu.effects.spec.ts b/projects/aca-content/src/lib/store/effects/contextmenu.effects.spec.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/contextmenu.effects.spec.ts rename to projects/aca-content/src/lib/store/effects/contextmenu.effects.spec.ts diff --git a/app/src/app/content-plugin/store/effects/contextmenu.effects.ts b/projects/aca-content/src/lib/store/effects/contextmenu.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/contextmenu.effects.ts rename to projects/aca-content/src/lib/store/effects/contextmenu.effects.ts diff --git a/app/src/app/content-plugin/store/effects/download.effects.spec.ts b/projects/aca-content/src/lib/store/effects/download.effects.spec.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/download.effects.spec.ts rename to projects/aca-content/src/lib/store/effects/download.effects.spec.ts diff --git a/app/src/app/content-plugin/store/effects/download.effects.ts b/projects/aca-content/src/lib/store/effects/download.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/download.effects.ts rename to projects/aca-content/src/lib/store/effects/download.effects.ts diff --git a/app/src/app/content-plugin/store/effects/favorite.effects.ts b/projects/aca-content/src/lib/store/effects/favorite.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/favorite.effects.ts rename to projects/aca-content/src/lib/store/effects/favorite.effects.ts diff --git a/app/src/app/content-plugin/store/effects/library.effects.ts b/projects/aca-content/src/lib/store/effects/library.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/library.effects.ts rename to projects/aca-content/src/lib/store/effects/library.effects.ts diff --git a/app/src/app/content-plugin/store/effects/node.effects.spec.ts b/projects/aca-content/src/lib/store/effects/node.effects.spec.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/node.effects.spec.ts rename to projects/aca-content/src/lib/store/effects/node.effects.spec.ts diff --git a/app/src/app/content-plugin/store/effects/node.effects.ts b/projects/aca-content/src/lib/store/effects/node.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/node.effects.ts rename to projects/aca-content/src/lib/store/effects/node.effects.ts diff --git a/app/src/app/content-plugin/store/effects/search.effects.spec.ts b/projects/aca-content/src/lib/store/effects/search.effects.spec.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/search.effects.spec.ts rename to projects/aca-content/src/lib/store/effects/search.effects.spec.ts diff --git a/app/src/app/content-plugin/store/effects/search.effects.ts b/projects/aca-content/src/lib/store/effects/search.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/search.effects.ts rename to projects/aca-content/src/lib/store/effects/search.effects.ts diff --git a/app/src/app/content-plugin/store/effects/template.effects.spec.ts b/projects/aca-content/src/lib/store/effects/template.effects.spec.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/template.effects.spec.ts rename to projects/aca-content/src/lib/store/effects/template.effects.spec.ts diff --git a/app/src/app/content-plugin/store/effects/template.effects.ts b/projects/aca-content/src/lib/store/effects/template.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/template.effects.ts rename to projects/aca-content/src/lib/store/effects/template.effects.ts diff --git a/app/src/app/content-plugin/store/effects/upload.effects.spec.ts b/projects/aca-content/src/lib/store/effects/upload.effects.spec.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/upload.effects.spec.ts rename to projects/aca-content/src/lib/store/effects/upload.effects.spec.ts diff --git a/app/src/app/content-plugin/store/effects/upload.effects.ts b/projects/aca-content/src/lib/store/effects/upload.effects.ts similarity index 99% rename from app/src/app/content-plugin/store/effects/upload.effects.ts rename to projects/aca-content/src/lib/store/effects/upload.effects.ts index c77888028..e8afbef98 100644 --- a/app/src/app/content-plugin/store/effects/upload.effects.ts +++ b/projects/aca-content/src/lib/store/effects/upload.effects.ts @@ -176,7 +176,7 @@ export class UploadEffects { } } - uploadAndUnlock(file: FileModel) { + uploadAndUnlock(file: FileModel | null) { if (!file) { return; } diff --git a/app/src/app/content-plugin/store/effects/viewer.effects.spec.ts b/projects/aca-content/src/lib/store/effects/viewer.effects.spec.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/viewer.effects.spec.ts rename to projects/aca-content/src/lib/store/effects/viewer.effects.spec.ts diff --git a/app/src/app/content-plugin/store/effects/viewer.effects.ts b/projects/aca-content/src/lib/store/effects/viewer.effects.ts similarity index 100% rename from app/src/app/content-plugin/store/effects/viewer.effects.ts rename to projects/aca-content/src/lib/store/effects/viewer.effects.ts diff --git a/app/src/app/content-plugin/store/initial-state.ts b/projects/aca-content/src/lib/store/initial-state.ts similarity index 100% rename from app/src/app/content-plugin/store/initial-state.ts rename to projects/aca-content/src/lib/store/initial-state.ts diff --git a/app/src/app/content-plugin/store/reducers/app.reducer.ts b/projects/aca-content/src/lib/store/reducers/app.reducer.ts similarity index 100% rename from app/src/app/content-plugin/store/reducers/app.reducer.ts rename to projects/aca-content/src/lib/store/reducers/app.reducer.ts diff --git a/app/src/app/content-plugin/testing/app-extension-service-mock.ts b/projects/aca-content/src/lib/testing/app-extension-service-mock.ts similarity index 100% rename from app/src/app/content-plugin/testing/app-extension-service-mock.ts rename to projects/aca-content/src/lib/testing/app-extension-service-mock.ts diff --git a/app/src/app/content-plugin/testing/app-testing.module.ts b/projects/aca-content/src/lib/testing/app-testing.module.ts similarity index 94% rename from app/src/app/content-plugin/testing/app-testing.module.ts rename to projects/aca-content/src/lib/testing/app-testing.module.ts index 8c02380f1..a6b11970b 100644 --- a/app/src/app/content-plugin/testing/app-testing.module.ts +++ b/projects/aca-content/src/lib/testing/app-testing.module.ts @@ -41,7 +41,7 @@ import { StoreModule } from '@ngrx/store'; import { appReducer } from '../store/reducers/app.reducer'; import { RouterTestingModule } from '@angular/router/testing'; import { EffectsModule } from '@ngrx/effects'; -import { MaterialModule } from '../../material.module'; +import { MaterialModule } from '../material.module'; import { INITIAL_STATE } from '../store/initial-state'; import { TranslatePipeMock } from './translate-pipe.directive'; import { TranslateServiceMock } from '@alfresco/aca-shared'; @@ -76,7 +76,7 @@ import { BehaviorSubject, Observable, of } from 'rxjs'; { provide: DiscoveryApiService, useValue: { - ecmProductInfo$: new BehaviorSubject(null), + ecmProductInfo$: new BehaviorSubject(null), getEcmProductInfo: (): Observable => of(new RepositoryInfo({ version: '10.0.0' })) } }, @@ -84,7 +84,7 @@ import { BehaviorSubject, Observable, of } from 'rxjs'; provide: AuthenticationService, useValue: { isEcmLoggedIn: (): boolean => true, - getRedirect: (): string => null, + getRedirect: (): string | null => null, setRedirect() {}, isOauth: (): boolean => false, isOAuthWithoutSilentLogin: (): boolean => false diff --git a/app/src/app/content-plugin/testing/content-action-ref.ts b/projects/aca-content/src/lib/testing/content-action-ref.ts similarity index 100% rename from app/src/app/content-plugin/testing/content-action-ref.ts rename to projects/aca-content/src/lib/testing/content-action-ref.ts diff --git a/app/src/app/content-plugin/testing/translate-pipe.directive.ts b/projects/aca-content/src/lib/testing/translate-pipe.directive.ts similarity index 100% rename from app/src/app/content-plugin/testing/translate-pipe.directive.ts rename to projects/aca-content/src/lib/testing/translate-pipe.directive.ts diff --git a/app/src/app/content-plugin/ui/application.scss b/projects/aca-content/src/lib/ui/application.scss similarity index 100% rename from app/src/app/content-plugin/ui/application.scss rename to projects/aca-content/src/lib/ui/application.scss diff --git a/app/src/app/content-plugin/ui/colors.scss b/projects/aca-content/src/lib/ui/colors.scss similarity index 100% rename from app/src/app/content-plugin/ui/colors.scss rename to projects/aca-content/src/lib/ui/colors.scss diff --git a/app/src/app/content-plugin/ui/custom-theme.scss b/projects/aca-content/src/lib/ui/custom-theme.scss similarity index 100% rename from app/src/app/content-plugin/ui/custom-theme.scss rename to projects/aca-content/src/lib/ui/custom-theme.scss diff --git a/app/src/app/content-plugin/ui/dynamic-theme/custom-background-color.scss b/projects/aca-content/src/lib/ui/dynamic-theme/custom-background-color.scss similarity index 100% rename from app/src/app/content-plugin/ui/dynamic-theme/custom-background-color.scss rename to projects/aca-content/src/lib/ui/dynamic-theme/custom-background-color.scss diff --git a/app/src/app/content-plugin/ui/dynamic-theme/custom-palette-creator.scss b/projects/aca-content/src/lib/ui/dynamic-theme/custom-palette-creator.scss similarity index 100% rename from app/src/app/content-plugin/ui/dynamic-theme/custom-palette-creator.scss rename to projects/aca-content/src/lib/ui/dynamic-theme/custom-palette-creator.scss diff --git a/app/src/app/content-plugin/ui/dynamic-theme/custom-text-color.scss b/projects/aca-content/src/lib/ui/dynamic-theme/custom-text-color.scss similarity index 100% rename from app/src/app/content-plugin/ui/dynamic-theme/custom-text-color.scss rename to projects/aca-content/src/lib/ui/dynamic-theme/custom-text-color.scss diff --git a/app/src/app/content-plugin/ui/dynamic-theme/custom-theme-palettes.scss b/projects/aca-content/src/lib/ui/dynamic-theme/custom-theme-palettes.scss similarity index 100% rename from app/src/app/content-plugin/ui/dynamic-theme/custom-theme-palettes.scss rename to projects/aca-content/src/lib/ui/dynamic-theme/custom-theme-palettes.scss diff --git a/app/src/app/content-plugin/ui/dynamic-theme/custom-theme.scss.tpl b/projects/aca-content/src/lib/ui/dynamic-theme/custom-theme.scss.tpl similarity index 100% rename from app/src/app/content-plugin/ui/dynamic-theme/custom-theme.scss.tpl rename to projects/aca-content/src/lib/ui/dynamic-theme/custom-theme.scss.tpl diff --git a/app/src/app/content-plugin/ui/dynamic-theme/index.scss b/projects/aca-content/src/lib/ui/dynamic-theme/index.scss similarity index 100% rename from app/src/app/content-plugin/ui/dynamic-theme/index.scss rename to projects/aca-content/src/lib/ui/dynamic-theme/index.scss diff --git a/app/src/app/content-plugin/ui/dynamic-theme/theme-configuration.scss.tpl b/projects/aca-content/src/lib/ui/dynamic-theme/theme-configuration.scss.tpl similarity index 100% rename from app/src/app/content-plugin/ui/dynamic-theme/theme-configuration.scss.tpl rename to projects/aca-content/src/lib/ui/dynamic-theme/theme-configuration.scss.tpl diff --git a/app/src/app/content-plugin/ui/dynamic-theme/typography.scss b/projects/aca-content/src/lib/ui/dynamic-theme/typography.scss similarity index 100% rename from app/src/app/content-plugin/ui/dynamic-theme/typography.scss rename to projects/aca-content/src/lib/ui/dynamic-theme/typography.scss diff --git a/app/src/app/content-plugin/ui/mixins.scss b/projects/aca-content/src/lib/ui/mixins.scss similarity index 100% rename from app/src/app/content-plugin/ui/mixins.scss rename to projects/aca-content/src/lib/ui/mixins.scss diff --git a/app/src/app/content-plugin/ui/overrides/adf-about.theme.scss b/projects/aca-content/src/lib/ui/overrides/adf-about.theme.scss similarity index 100% rename from app/src/app/content-plugin/ui/overrides/adf-about.theme.scss rename to projects/aca-content/src/lib/ui/overrides/adf-about.theme.scss diff --git a/app/src/app/content-plugin/ui/overrides/adf-pagination.theme.scss b/projects/aca-content/src/lib/ui/overrides/adf-pagination.theme.scss similarity index 100% rename from app/src/app/content-plugin/ui/overrides/adf-pagination.theme.scss rename to projects/aca-content/src/lib/ui/overrides/adf-pagination.theme.scss diff --git a/app/src/app/content-plugin/ui/overrides/adf-style-fixes.theme.scss b/projects/aca-content/src/lib/ui/overrides/adf-style-fixes.theme.scss similarity index 100% rename from app/src/app/content-plugin/ui/overrides/adf-style-fixes.theme.scss rename to projects/aca-content/src/lib/ui/overrides/adf-style-fixes.theme.scss diff --git a/app/src/app/content-plugin/ui/overrides/ay11.scss b/projects/aca-content/src/lib/ui/overrides/ay11.scss similarity index 100% rename from app/src/app/content-plugin/ui/overrides/ay11.scss rename to projects/aca-content/src/lib/ui/overrides/ay11.scss diff --git a/app/src/app/content-plugin/ui/theme.scss b/projects/aca-content/src/lib/ui/theme.scss similarity index 100% rename from app/src/app/content-plugin/ui/theme.scss rename to projects/aca-content/src/lib/ui/theme.scss diff --git a/app/src/app/content-plugin/ui/variables/font-family.scss b/projects/aca-content/src/lib/ui/variables/font-family.scss similarity index 100% rename from app/src/app/content-plugin/ui/variables/font-family.scss rename to projects/aca-content/src/lib/ui/variables/font-family.scss diff --git a/app/src/app/content-plugin/ui/variables/variables.scss b/projects/aca-content/src/lib/ui/variables/variables.scss similarity index 100% rename from app/src/app/content-plugin/ui/variables/variables.scss rename to projects/aca-content/src/lib/ui/variables/variables.scss diff --git a/projects/aca-content/src/public-api.ts b/projects/aca-content/src/public-api.ts new file mode 100644 index 000000000..500bd5f49 --- /dev/null +++ b/projects/aca-content/src/public-api.ts @@ -0,0 +1,9 @@ +/* + * Public API Surface of aca-content + */ + +export * from './lib/aca-content.module'; +export * from './lib/aca-content.routes'; +export * from './lib/extensions/core.extensions.module'; +export * from './lib/store/initial-state'; +export * from './lib/services/content-url.service'; diff --git a/projects/aca-content/src/test.ts b/projects/aca-content/src/test.ts new file mode 100644 index 000000000..97b739a00 --- /dev/null +++ b/projects/aca-content/src/test.ts @@ -0,0 +1,26 @@ +// This file is required by karma.conf.js and loads recursively all the .spec and framework files + +import 'zone.js'; +import 'zone.js/testing'; +import { getTestBed } from '@angular/core/testing'; +import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; + +declare const require: { + context( + path: string, + deep?: boolean, + filter?: RegExp + ): { + keys(): string[]; + (id: string): T; + }; +}; + +// First, initialize the Angular testing environment. +getTestBed().initTestEnvironment(BrowserDynamicTestingModule, platformBrowserDynamicTesting(), { + teardown: { destroyAfterEach: false } +}); +// Then we find all the tests. +const context = require.context('./', true, /\.spec\.ts$/); +// And load the modules. +context.keys().forEach(context); diff --git a/projects/aca-content/tsconfig.lib.json b/projects/aca-content/tsconfig.lib.json new file mode 100644 index 000000000..b77b13c01 --- /dev/null +++ b/projects/aca-content/tsconfig.lib.json @@ -0,0 +1,15 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/lib", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [] + }, + "exclude": [ + "src/test.ts", + "**/*.spec.ts" + ] +} diff --git a/projects/aca-content/tsconfig.lib.prod.json b/projects/aca-content/tsconfig.lib.prod.json new file mode 100644 index 000000000..06de549e1 --- /dev/null +++ b/projects/aca-content/tsconfig.lib.prod.json @@ -0,0 +1,10 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "./tsconfig.lib.json", + "compilerOptions": { + "declarationMap": false + }, + "angularCompilerOptions": { + "compilationMode": "partial" + } +} diff --git a/projects/aca-content/tsconfig.spec.json b/projects/aca-content/tsconfig.spec.json new file mode 100644 index 000000000..715dd0a5d --- /dev/null +++ b/projects/aca-content/tsconfig.spec.json @@ -0,0 +1,17 @@ +/* To learn more about this file see: https://angular.io/config/tsconfig. */ +{ + "extends": "../../tsconfig.json", + "compilerOptions": { + "outDir": "../../out-tsc/spec", + "types": [ + "jasmine" + ] + }, + "files": [ + "src/test.ts" + ], + "include": [ + "**/*.spec.ts", + "**/*.d.ts" + ] +} diff --git a/tsconfig.json b/tsconfig.json index e485c4d72..f1733695d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -27,7 +27,12 @@ "@alfresco/aca-testing-shared": ["projects/aca-testing-shared"], "@alfresco/aca-about": ["projects/aca-about/src/public-api.ts"], "@alfresco/aca-settings": ["projects/aca-settings/src/public-api.ts"], - "@alfresco/aca-folder-rules": ["projects/aca-folder-rules/src/public-api.ts"], + "@alfresco/aca-folder-rules": [ + "projects/aca-folder-rules/src/public-api.ts" + ], + "@alfresco/aca-content": [ + "projects/aca-content/src/public-api.ts" + ], "package.json": ["package.json"] } },