Skip to content

Commit

Permalink
Revert "[ACS-4537] Make aca-about secondary entry of aca-content (#3170
Browse files Browse the repository at this point in the history
…)" (#3172)

This reverts commit 222f487.
  • Loading branch information
DenysVuika committed May 5, 2023
1 parent 2b90a66 commit df33a41
Show file tree
Hide file tree
Showing 26 changed files with 306 additions and 21 deletions.
1 change: 1 addition & 0 deletions .github/actions/publish-libs/npm-publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ if [[ -z "$TAG" ]]; then
fi

export PROJECTS=(
'aca-about'
'aca-content'
'aca-folder-rules'
'adf-office-services-ext'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ if [[ -z "$VERSION" ]]; then
fi

export PROJECTS=(
'aca-about'
'aca-content'
'aca-folder-rules'
'adf-office-services-ext'
Expand Down
2 changes: 1 addition & 1 deletion app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
},
{
"glob": "about.plugin.json",
"input": "projects/aca-content/about/assets",
"input": "projects/aca-about/assets",
"output": "./assets/plugins"
},
{
Expand Down
2 changes: 1 addition & 1 deletion app/src/app/extensions.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

import { NgModule } from '@angular/core';
import { AosExtensionModule } from '@alfresco/adf-office-services-ext';
import { AcaAboutModule } from '@alfresco/aca-content/about';
import { AcaAboutModule } from '@alfresco/aca-about';
import { AcaFolderRulesModule } from '@alfresco/aca-folder-rules';
import { environment } from '../environments/environment';
import packageJson from 'package.json';
Expand Down
23 changes: 23 additions & 0 deletions projects/aca-about/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
path = require("path");
module.exports = {
"extends": "../../.eslintrc.json",
"ignorePatterns": [
"!**/*"
],
"overrides": [
{
"files": [
"*.ts"
],
"parserOptions": {
"project": [
path.join(__dirname, "tsconfig.lib.json"),
path.join(__dirname, "tsconfig.spec.json")
],
"createDefaultProgram": true
},
"rules": {
}
}
]
}
68 changes: 68 additions & 0 deletions projects/aca-about/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# About Plugin for Alfresco Content App

Provides the "About" page for ACA and ACA-based apps.

## Installing

Import the module into the application:

```ts
// src/app/extensions.module.ts

import { AcaAboutModule } from '@alfresco/aca-about';

@NgModule({
imports: [
// other modules
AcaAboutModule
]
})
export class AcaAboutModule {}
```

Update the `app.extensions.json` extension configuration to enable extra routes and components:

```json
{
"actions": [
{
"id": "app.actions.about",
"type": "NAVIGATE_URL",
"payload": "/about"
}
],

"routes": [
{
"id": "app.about",
"path": "about",
"layout": "app.layout.main",
"component": "app.about.component"
}
],

"features": {
"header": [
{
"id": "app.header.more",
"children": [
{
"id": "app.header.about",
"order": 100,
"title": "APP.BROWSE.ABOUT.TITLE",
"description": "APP.BROWSE.ABOUT.TITLE",
"icon": "info",
"actions": {
"click": "app.actions.about"
}
}
]
}
]
}
}
```

Alternatively, you can use the `assets/about.plugin.json` file.

Compile and distribute/run the application.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"$schema": "../../../../extension.schema.json",
"$schema": "../../../extension.schema.json",
"$id": "14157f82-6489-4187-9b68-1a5e38fadeca",
"$name": "About Plugin",
"$version": "0.0.1",
Expand Down
15 changes: 15 additions & 0 deletions projects/aca-about/karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
const { join } = require('path');
const getBaseKarmaConfig = require('../../karma.conf');

module.exports = function (config) {
const baseConfig = getBaseKarmaConfig();
config.set({
...baseConfig,
coverageReporter: {
...baseConfig.coverageReporter,
dir: join(__dirname, '../../coverage/aca-about'),
},
});
};
11 changes: 11 additions & 0 deletions projects/aca-about/ng-package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../dist/@alfresco/aca-about",

"lib": {
"entryFile": "src/public-api.ts"
},
"assets": [
"assets"
]
}
19 changes: 19 additions & 0 deletions projects/aca-about/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"name": "@alfresco/aca-about",
"version": "0.0.1",
"license": "LGPL-3.0",
"peerDependencies": {
"@angular/common": "^14.1.0",
"@angular/core": "^14.1.0"
},
"dependencies": {
"tslib": "^2.3.0"
},
"publishConfig": {
"access": "public"
},
"repository": {
"type": "git",
"url": "https://github.com/Alfresco/alfresco-content-app.git"
}
}
49 changes: 49 additions & 0 deletions projects/aca-about/project.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
{
"$schema": "../../node_modules/nx/schemas/project-schema.json",
"name": "aca-about",
"projectType": "library",
"sourceRoot": "projects/aca-about/src",
"prefix": "lib",
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:ng-packagr",
"options": {
"tsConfig": "projects/aca-about/tsconfig.lib.json",
"project": "projects/aca-about/ng-package.json"
},
"configurations": {
"production": {
"tsConfig": "projects/aca-about/tsconfig.lib.prod.json"
}
},
"defaultConfiguration": "production",
"outputs": [
"{workspaceRoot}/dist/@alfresco/aca-about"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
"options": {
"codeCoverage": true,
"main": "projects/aca-about/src/test.ts",
"tsConfig": "projects/aca-about/tsconfig.spec.json",
"karmaConfig": "projects/aca-about/karma.conf.js"
}
},
"lint": {
"executor": "@angular-eslint/builder:lint",
"options": {
"lintFilePatterns": [
"projects/aca-about/**/*.ts",
"projects/aca-about/**/*.html"
],
"cache": true,
"cacheLocation": ".eslintcache",
"ignorePath": ".eslintignore"
},
"outputs": [
"{options.outputFile}"
]
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,16 @@
import { ModuleWithProviders, NgModule, Provider } from '@angular/core';
import { AboutComponent } from './about.component';
import { CommonModule } from '@angular/common';
import { CoreModule } from '@alfresco/adf-core';
import { SharedModule, PageLayoutModule } from '@alfresco/aca-shared';

import { ExtensionService, provideExtensionConfig } from '@alfresco/adf-extensions';
import { DEV_MODE_TOKEN } from './dev-mode.tokens';
import { PACKAGE_JSON } from './package-json.token';
import { AboutModule } from '@alfresco/adf-core';
import { TranslateModule } from '@ngx-translate/core';
import { RouterModule } from '@angular/router';

@NgModule({
imports: [CommonModule, RouterModule, TranslateModule, SharedModule, PageLayoutModule, AboutModule],
imports: [CommonModule, RouterModule, CoreModule.forChild(), SharedModule, PageLayoutModule],
declarations: [AboutComponent],
providers: [provideExtensionConfig(['about.plugin.json'])]
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/

export * from './about.component';
export * from './aca-about.module';
export * from './dev-mode.tokens';
export * from './package-json.token';
export * from './lib/about.component';
export * from './lib/aca-about.module';
export * from './lib/package-json.token';
50 changes: 50 additions & 0 deletions projects/aca-about/src/test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*!
* Copyright © 2005-2023 Hyland Software, Inc. and its affiliates. All rights reserved.
*
* Alfresco Example Content Application
*
* This file is part of the Alfresco Example Content Application.
* If the software was purchased under a paid Alfresco license, the terms of
* the paid license agreement will prevail. Otherwise, the software is
* provided under the following open source license terms:
*
* The Alfresco Example Content Application is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* The Alfresco Example Content Application is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
*/

// 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[];
<T>(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().map(context);
25 changes: 25 additions & 0 deletions projects/aca-about/tsconfig.lib.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"outDir": "../../out-tsc/lib",
"declarationMap": true,
"target": "es2020",
"declaration": true,
"inlineSources": true,
"types": [],
"lib": [
"dom",
"es2018"
]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": [
"src/test.ts",
"**/*.spec.ts"
]
}
15 changes: 15 additions & 0 deletions projects/aca-about/tsconfig.lib.prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
/* To learn more about this file see: https://angular.io/config/tsconfig. */
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false,
"paths": {
"@alfresco/aca-shared": ["dist/@alfresco/aca-shared"],
"@alfresco/aca-shared/store": ["dist/@alfresco/aca-shared/store"],
"@alfresco/aca-shared/rules": ["dist/@alfresco/aca-shared/rules"]
}
},
"angularCompilerOptions": {
"compilationMode": "partial"
}
}
17 changes: 17 additions & 0 deletions projects/aca-about/tsconfig.spec.json
Original file line number Diff line number Diff line change
@@ -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"
]
}
5 changes: 0 additions & 5 deletions projects/aca-content/about/ng-package.json

This file was deleted.

4 changes: 0 additions & 4 deletions projects/aca-content/about/src/about.component.scss

This file was deleted.

1 change: 1 addition & 0 deletions scripts/gh/update/update-project.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ update() {

update_dependency "@alfresco/aca-shared"
update_dependency "@alfresco/aca-content"
update_dependency "@alfresco/aca-about"
update_dependency "@alfresco/aca-preview"
update_dependency "@alfresco/aca-viewer"
update_dependency "@alfresco/aca-folder-rules"
Expand Down

0 comments on commit df33a41

Please sign in to comment.