mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACS-4537] Make aca-about secondary entry of aca-content (#3179)
* break dependency on core module * convert about to secondary entry * Fixes after rebase * [ACS-4537] - Copy about assets --------- Co-authored-by: Denys Vuika <denys.vuika@gmail.com>
This commit is contained in:
parent
23814e1e76
commit
6794ea58ac
1
.github/actions/publish-libs/npm-publish.sh
vendored
1
.github/actions/publish-libs/npm-publish.sh
vendored
@ -11,7 +11,6 @@ if [[ -z "$TAG" ]]; then
|
||||
fi
|
||||
|
||||
export PROJECTS=(
|
||||
'aca-about'
|
||||
'aca-content'
|
||||
'aca-folder-rules'
|
||||
'adf-office-services-ext'
|
||||
|
@ -10,7 +10,6 @@ if [[ -z "$VERSION" ]]; then
|
||||
fi
|
||||
|
||||
export PROJECTS=(
|
||||
'aca-about'
|
||||
'aca-content'
|
||||
'aca-folder-rules'
|
||||
'adf-office-services-ext'
|
||||
|
@ -74,7 +74,7 @@
|
||||
},
|
||||
{
|
||||
"glob": "about.plugin.json",
|
||||
"input": "projects/aca-about/assets",
|
||||
"input": "projects/aca-content/about/assets",
|
||||
"output": "./assets/plugins"
|
||||
},
|
||||
{
|
||||
|
@ -24,7 +24,7 @@
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AosExtensionModule } from '@alfresco/adf-office-services-ext';
|
||||
import { AcaAboutModule } from '@alfresco/aca-about';
|
||||
import { AcaAboutModule } from '@alfresco/aca-content/about';
|
||||
import { AcaFolderRulesModule } from '@alfresco/aca-folder-rules';
|
||||
import { environment } from '../environments/environment';
|
||||
import packageJson from 'package.json';
|
||||
|
@ -1,23 +0,0 @@
|
||||
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": {
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -1,68 +0,0 @@
|
||||
# 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.
|
@ -1,15 +0,0 @@
|
||||
// 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'),
|
||||
},
|
||||
});
|
||||
};
|
@ -1,11 +0,0 @@
|
||||
{
|
||||
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||
"dest": "../../dist/@alfresco/aca-about",
|
||||
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
},
|
||||
"assets": [
|
||||
"assets"
|
||||
]
|
||||
}
|
@ -1,19 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
@ -1,49 +0,0 @@
|
||||
{
|
||||
"$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}"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,50 +0,0 @@
|
||||
/*!
|
||||
* 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);
|
@ -1,25 +0,0 @@
|
||||
/* 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"
|
||||
]
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
/* 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"
|
||||
}
|
||||
}
|
@ -1,17 +0,0 @@
|
||||
/* 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"
|
||||
]
|
||||
}
|
@ -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",
|
5
projects/aca-content/about/ng-package.json
Normal file
5
projects/aca-content/about/ng-package.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
4
projects/aca-content/about/src/about.component.scss
Normal file
4
projects/aca-content/about/src/about.component.scss
Normal file
@ -0,0 +1,4 @@
|
||||
adf-about {
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
}
|
@ -25,16 +25,17 @@
|
||||
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, CoreModule.forChild(), SharedModule, PageLayoutModule],
|
||||
imports: [CommonModule, RouterModule, TranslateModule, SharedModule, PageLayoutModule, AboutModule],
|
||||
declarations: [AboutComponent],
|
||||
providers: [provideExtensionConfig(['about.plugin.json'])]
|
||||
})
|
@ -22,6 +22,7 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export * from './lib/about.component';
|
||||
export * from './lib/aca-about.module';
|
||||
export * from './lib/package-json.token';
|
||||
export * from './about.component';
|
||||
export * from './aca-about.module';
|
||||
export * from './dev-mode.tokens';
|
||||
export * from './package-json.token';
|
@ -11,6 +11,7 @@
|
||||
"input": "./src/lib/ui/",
|
||||
"output": "ui"
|
||||
},
|
||||
"about/assets",
|
||||
"assets"
|
||||
]
|
||||
}
|
||||
|
@ -80,7 +80,6 @@ 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"
|
||||
|
@ -38,9 +38,9 @@
|
||||
"@alfresco/aca-shared/rules": ["projects/aca-shared/rules/src/public-api.ts"],
|
||||
"@alfresco/adf-office-services-ext": ["projects/adf-office-services-ext/src/public-api.ts"],
|
||||
"@alfresco/aca-testing-shared": ["projects/aca-testing-shared/src/index.ts"],
|
||||
"@alfresco/aca-about": ["projects/aca-about/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"],
|
||||
"@alfresco/aca-content/about": ["projects/aca-content/about/src/public-api.ts"],
|
||||
"@alfresco/aca-viewer": ["projects/aca-viewer/src/public-api.ts"],
|
||||
"@alfresco/aca-preview": ["projects/aca-preview/src/public-api.ts"],
|
||||
"package.json": ["package.json"],
|
||||
|
@ -13,7 +13,6 @@
|
||||
"experimentalDecorators": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedLocals": true,
|
||||
"skipLibCheck": true,
|
||||
"noUnusedParameters": true,
|
||||
"noImplicitReturns": true,
|
||||
"target": "es2020",
|
||||
@ -27,9 +26,9 @@
|
||||
"@alfresco/aca-shared/rules": ["projects/aca-shared/rules/src/public-api.ts"],
|
||||
"@alfresco/adf-office-services-ext": ["projects/adf-office-services-ext/src/public-api.ts"],
|
||||
"@alfresco/aca-testing-shared": ["projects/aca-testing-shared/src/index.ts"],
|
||||
"@alfresco/aca-about": ["projects/aca-about/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"],
|
||||
"@alfresco/aca-content/about": ["projects/aca-content/about/src/public-api.ts"],
|
||||
"@alfresco/aca-viewer": ["projects/aca-viewer/src/public-api.ts"],
|
||||
"@alfresco/aca-preview": ["projects/aca-preview/src/public-api.ts"],
|
||||
"@alfresco/playwright-shared": ["e2e/playwright/shared/index.ts"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user