mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[ACS-4539] Make ms-office as secondary point of aca-content (#3180)
* [ACS-4539] Make ms-office as secondary point of aca-content * [ACA-4539] Fix tsconfig path * [ACS-4539] Run ms-office unit tests as part of aca-content
This commit is contained in:
parent
6794ea58ac
commit
3ca4a91389
1
.github/actions/publish-libs/npm-publish.sh
vendored
1
.github/actions/publish-libs/npm-publish.sh
vendored
@ -13,7 +13,6 @@ fi
|
||||
export PROJECTS=(
|
||||
'aca-content'
|
||||
'aca-folder-rules'
|
||||
'adf-office-services-ext'
|
||||
'aca-preview'
|
||||
'aca-shared'
|
||||
'aca-viewer'
|
||||
|
@ -12,7 +12,6 @@ fi
|
||||
export PROJECTS=(
|
||||
'aca-content'
|
||||
'aca-folder-rules'
|
||||
'adf-office-services-ext'
|
||||
'aca-preview'
|
||||
'aca-shared'
|
||||
'aca-viewer'
|
||||
|
1
.github/workflows/pull-request.yml
vendored
1
.github/workflows/pull-request.yml
vendored
@ -95,7 +95,6 @@ jobs:
|
||||
matrix:
|
||||
unit-tests:
|
||||
- name: "aca-content"
|
||||
- name: "adf-office-services-ext"
|
||||
- name: "aca-shared"
|
||||
- name: "aca-folder-rules"
|
||||
- name: "aca-preview"
|
||||
|
@ -59,17 +59,17 @@
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "node_modules/@alfresco/adf-office-services-ext/assets",
|
||||
"output": "./assets/adf-office-services-ext"
|
||||
"input": "node_modules/@alfresco/aca-content/ms-office/assets",
|
||||
"output": "./assets/ms-office"
|
||||
},
|
||||
{
|
||||
"glob": "**/*",
|
||||
"input": "projects/adf-office-services-ext/assets",
|
||||
"output": "./assets/adf-office-services-ext"
|
||||
"input": "projects/aca-content/ms-office/assets",
|
||||
"output": "./assets/ms-office"
|
||||
},
|
||||
{
|
||||
"glob": "aos.plugin.json",
|
||||
"input": "projects/adf-office-services-ext/assets",
|
||||
"input": "projects/aca-content/ms-office/assets",
|
||||
"output": "./assets/plugins"
|
||||
},
|
||||
{
|
||||
|
@ -23,7 +23,7 @@
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AosExtensionModule } from '@alfresco/adf-office-services-ext';
|
||||
import { AosExtensionModule } from '@alfresco/aca-content/ms-office';
|
||||
import { AcaAboutModule } from '@alfresco/aca-content/about';
|
||||
import { AcaFolderRulesModule } from '@alfresco/aca-folder-rules';
|
||||
import { environment } from '../environments/environment';
|
||||
|
53667
package-lock.json
generated
53667
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -1,5 +1,5 @@
|
||||
{
|
||||
"$schema": "../../../extension.schema.json",
|
||||
"$schema": "../../../../extension.schema.json",
|
||||
"$id": "9a635542-d87a-4558-ae64-ffa199d1a364",
|
||||
"$version": "0.0.10",
|
||||
"$name": "Edit in Office",
|
5
projects/aca-content/ms-office/ng-package.json
Normal file
5
projects/aca-content/ms-office/ng-package.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
}
|
||||
}
|
@ -36,7 +36,7 @@ import { canOpenWithOffice } from '@alfresco/aca-shared/rules';
|
||||
})
|
||||
export class AosExtensionModule {
|
||||
constructor(extensions: ExtensionService, translation: TranslationService, aosService: AlfrescoOfficeExtensionService) {
|
||||
translation.addTranslationFolder('adf-office-services-ext', 'assets/adf-office-services-ext');
|
||||
translation.addTranslationFolder('ms-office', 'assets/ms-office');
|
||||
extensions.setEvaluators({
|
||||
'aos.canOpenWithOffice': (context) => aosService.isAosPluginEnabled() && canOpenWithOffice(context)
|
||||
});
|
@ -22,8 +22,8 @@
|
||||
* from Hyland Software. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
export * from './lib/aos-extension.service';
|
||||
export * from './lib/actions/aos.actions';
|
||||
export * from './lib/effects/aos.effects';
|
||||
export * from './aos-extension.service';
|
||||
export * from './actions/aos.actions';
|
||||
export * from './effects/aos.effects';
|
||||
|
||||
export * from './lib/aos-extension.module';
|
||||
export * from './aos-extension.module';
|
@ -12,6 +12,7 @@
|
||||
"output": "ui"
|
||||
},
|
||||
"about/assets",
|
||||
"ms-office/assets",
|
||||
"assets"
|
||||
]
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "aca-content",
|
||||
"projectType": "library",
|
||||
"sourceRoot": "projects/aca-content/src",
|
||||
"sourceRoot": "projects/aca-content",
|
||||
"prefix": "lib",
|
||||
"targets": {
|
||||
"build": {
|
||||
@ -27,7 +27,7 @@
|
||||
"executor": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"codeCoverage": true,
|
||||
"main": "projects/aca-content/src/test.ts",
|
||||
"main": "projects/aca-content/test.ts",
|
||||
"tsConfig": "projects/aca-content/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/aca-content/karma.conf.js",
|
||||
"styles": [
|
||||
|
@ -9,7 +9,7 @@
|
||||
"types": []
|
||||
},
|
||||
"exclude": [
|
||||
"src/test.ts",
|
||||
"test.ts",
|
||||
"**/*.spec.ts"
|
||||
]
|
||||
}
|
||||
|
@ -7,7 +7,7 @@
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts"
|
||||
"test.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
|
@ -8,7 +8,7 @@
|
||||
]
|
||||
},
|
||||
"files": [
|
||||
"src/test.ts"
|
||||
"test.ts"
|
||||
],
|
||||
"include": [
|
||||
"**/*.spec.ts",
|
||||
|
@ -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,80 +0,0 @@
|
||||
# Alfresco Office Services Extension
|
||||
|
||||
An extension module for the Alfresco Content Application that enables "Edit in Microsoft Office" feature.
|
||||
|
||||
Integrates with:
|
||||
|
||||
- Context Menus
|
||||
- Toolbars
|
||||
- Viewer / Open With
|
||||
|
||||
## Automated Installation
|
||||
|
||||
Install the `ngi` as a global tool:
|
||||
|
||||
```sh
|
||||
npm i -g @ngstack/install
|
||||
```
|
||||
|
||||
In the project root:
|
||||
|
||||
```sh
|
||||
ngi @alfresco/adf-office-services-ext --module=extensions
|
||||
```
|
||||
|
||||
Update `app.extensions.json` and append a reference to the plugin definition:
|
||||
|
||||
```json
|
||||
{
|
||||
"$references": ["aos.plugin.json"]
|
||||
}
|
||||
```
|
||||
|
||||
## Manual Installation
|
||||
|
||||
Install the extension library
|
||||
|
||||
```sh
|
||||
npm i @alfresco/adf-office-services-ext
|
||||
```
|
||||
|
||||
Update the `extensions.module.ts` and import corresponding module.
|
||||
|
||||
```ts
|
||||
import { NgModule } from '@angular/core';
|
||||
import { AosExtensionModule } from '@alfresco/adf-office-services-ext';
|
||||
|
||||
// Main entry point for external extensions only.
|
||||
// For any application-specific code use CoreExtensionsModule instead.
|
||||
|
||||
@NgModule({
|
||||
imports: [AosExtensionModule]
|
||||
})
|
||||
export class AppExtensionsModule {}
|
||||
```
|
||||
|
||||
Setup the resource references in the `angular.json` assets section:
|
||||
|
||||
```json
|
||||
{
|
||||
"glob": "**/*.json",
|
||||
"input": "node_modules/@alfresco/adf-office-services-ext/assets",
|
||||
"output": "./assets/plugins"
|
||||
}
|
||||
```
|
||||
|
||||
Update `app.extensions.json` and append a reference to the plugin definition:
|
||||
|
||||
```json
|
||||
{
|
||||
"$references": ["aos.plugin.json"]
|
||||
}
|
||||
```
|
||||
|
||||
## Disable and Enable the extension after it is installed
|
||||
|
||||
There's an environment that can disable or enable the installed extension.
|
||||
|
||||
In the `app.config.json` file there's a `aosPlugin` boolean variable where you can toggle the value `false` or `true` if you want to hide or show the extension.
|
||||
|
||||
The extension is enabled by default.
|
@ -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-office-services-ext'),
|
||||
},
|
||||
});
|
||||
};
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"dest": "../../dist/@alfresco/adf-office-services-ext",
|
||||
"lib": {
|
||||
"entryFile": "src/public-api.ts"
|
||||
},
|
||||
"assets": ["assets"]
|
||||
}
|
@ -1,13 +0,0 @@
|
||||
{
|
||||
"name": "@alfresco/adf-office-services-ext",
|
||||
"version": "2.0.1",
|
||||
"license": "LGPL-3.0",
|
||||
"main": "src/index.ts",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/Alfresco/alfresco-content-app.git"
|
||||
}
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
{
|
||||
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
||||
"name": "adf-office-services-ext",
|
||||
"sourceRoot": "projects/adf-office-services-ext/src",
|
||||
"projectType": "library",
|
||||
"prefix": "lib",
|
||||
"targets": {
|
||||
"build": {
|
||||
"executor": "@angular-devkit/build-angular:ng-packagr",
|
||||
"options": {
|
||||
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.json",
|
||||
"project": "projects/adf-office-services-ext/ng-package.json"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"tsConfig": "projects/adf-office-services-ext/tsconfig.lib.prod.json"
|
||||
}
|
||||
},
|
||||
"defaultConfiguration": "production",
|
||||
"outputs": [
|
||||
"{workspaceRoot}/dist/@alfresco/adf-office-services-ext"
|
||||
]
|
||||
},
|
||||
"test": {
|
||||
"executor": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"codeCoverage": true,
|
||||
"main": "projects/adf-office-services-ext/src/test.ts",
|
||||
"tsConfig": "projects/adf-office-services-ext/tsconfig.spec.json",
|
||||
"karmaConfig": "projects/adf-office-services-ext/karma.conf.js"
|
||||
},
|
||||
"configurations": {
|
||||
"adfprod": {
|
||||
"tsConfig": "projects/adf-office-services-ext/tsconfig.spec.adf.json"
|
||||
}
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"executor": "@angular-eslint/builder:lint",
|
||||
"options": {
|
||||
"lintFilePatterns": [
|
||||
"projects/adf-office-services-ext/**/*.ts",
|
||||
"projects/adf-office-services-ext/**/*.html"
|
||||
],
|
||||
"cache": true,
|
||||
"cacheLocation": ".eslintcache",
|
||||
"ignorePath": ".eslintignore"
|
||||
},
|
||||
"outputs": [
|
||||
"{options.outputFile}"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
@ -1,41 +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: any;
|
||||
|
||||
// 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,26 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/lib",
|
||||
"declarationMap": true,
|
||||
"target": "es2020",
|
||||
"module": "es2015",
|
||||
"moduleResolution": "node",
|
||||
"declaration": true,
|
||||
"sourceMap": true,
|
||||
"inlineSources": true,
|
||||
"emitDecoratorMetadata": true,
|
||||
"experimentalDecorators": true,
|
||||
"importHelpers": true,
|
||||
"types": [],
|
||||
"lib": ["dom", "es2018"]
|
||||
},
|
||||
"angularCompilerOptions": {
|
||||
"skipTemplateCodegen": true,
|
||||
"strictMetadataEmit": true,
|
||||
"fullTemplateTypeCheck": true,
|
||||
"strictInjectionParameters": true,
|
||||
"enableResourceInlining": true
|
||||
},
|
||||
"exclude": ["src/test.ts", "**/*.spec.ts"]
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"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,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.adf.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/spec",
|
||||
"types": ["jasmine", "node"]
|
||||
},
|
||||
"files": ["src/test.ts"],
|
||||
"include": ["**/*.spec.ts", "**/*.d.ts"]
|
||||
}
|
@ -1,9 +0,0 @@
|
||||
{
|
||||
"extends": "../../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../../out-tsc/spec",
|
||||
"types": ["jasmine", "node"]
|
||||
},
|
||||
"files": ["src/test.ts"],
|
||||
"include": ["**/*.spec.ts", "**/*.d.ts"]
|
||||
}
|
@ -83,7 +83,6 @@ update() {
|
||||
update_dependency "@alfresco/aca-preview"
|
||||
update_dependency "@alfresco/aca-viewer"
|
||||
update_dependency "@alfresco/aca-folder-rules"
|
||||
update_dependency "@alfresco/adf-office-services-ext"
|
||||
|
||||
if [ "$BRANCH_CREATED" = true ]; then
|
||||
git push origin $BRANCH_TO_CREATE
|
||||
|
@ -36,7 +36,7 @@
|
||||
"@alfresco/aca-shared": ["projects/aca-shared/src/public-api.ts"],
|
||||
"@alfresco/aca-shared/store": ["projects/aca-shared/store/src/public-api.ts"],
|
||||
"@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-content/ms-office": ["projects/aca-content/ms-office/src/public-api.ts"],
|
||||
"@alfresco/aca-testing-shared": ["projects/aca-testing-shared/src/index.ts"],
|
||||
"@alfresco/aca-folder-rules": ["projects/aca-folder-rules/src/public-api.ts"],
|
||||
"@alfresco/aca-content": ["projects/aca-content/src/public-api.ts"],
|
||||
|
@ -24,7 +24,7 @@
|
||||
"@alfresco/aca-shared": ["projects/aca-shared/src/public-api.ts"],
|
||||
"@alfresco/aca-shared/store": ["projects/aca-shared/store/src/public-api.ts"],
|
||||
"@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-content/ms-office": ["projects/aca-content/ms-office/src/public-api.ts"],
|
||||
"@alfresco/aca-testing-shared": ["projects/aca-testing-shared/src/index.ts"],
|
||||
"@alfresco/aca-folder-rules": ["projects/aca-folder-rules/src/public-api.ts"],
|
||||
"@alfresco/aca-content": ["projects/aca-content/src/public-api.ts"],
|
||||
|
Loading…
x
Reference in New Issue
Block a user