mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-05-12 17:04:46 +00:00
[MNT-21386] move settings to a separate project (#1676)
* move settings to a separate project * rework theming
This commit is contained in:
parent
3db18f7d1d
commit
88e94a4ec9
@ -68,6 +68,11 @@ jobs:
|
|||||||
script: npm ci && ng test aca-about --watch=false
|
script: npm ci && ng test aca-about --watch=false
|
||||||
cache: false
|
cache: false
|
||||||
|
|
||||||
|
- stage: Quality and Unit tests
|
||||||
|
name: 'Unit tests: aca-settings'
|
||||||
|
script: npm ci && ng test aca-settings --watch=false
|
||||||
|
cache: false
|
||||||
|
|
||||||
- stage: Quality and Unit tests
|
- stage: Quality and Unit tests
|
||||||
name: 'Unit tests: ACA'
|
name: 'Unit tests: ACA'
|
||||||
script:
|
script:
|
||||||
|
40
angular.json
40
angular.json
@ -423,6 +423,46 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"aca-settings": {
|
||||||
|
"projectType": "library",
|
||||||
|
"root": "projects/aca-settings",
|
||||||
|
"sourceRoot": "projects/aca-settings/src",
|
||||||
|
"prefix": "lib",
|
||||||
|
"architect": {
|
||||||
|
"build": {
|
||||||
|
"builder": "@angular-devkit/build-ng-packagr:build",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": "projects/aca-settings/tsconfig.lib.json",
|
||||||
|
"project": "projects/aca-settings/ng-package.json"
|
||||||
|
},
|
||||||
|
"configurations": {
|
||||||
|
"production": {
|
||||||
|
"tsConfig": "projects/aca-settings/tsconfig.lib.prod.json"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"builder": "@angular-devkit/build-angular:karma",
|
||||||
|
"options": {
|
||||||
|
"main": "projects/aca-settings/src/test.ts",
|
||||||
|
"tsConfig": "projects/aca-settings/tsconfig.spec.json",
|
||||||
|
"karmaConfig": "projects/aca-settings/karma.conf.js"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"builder": "@angular-devkit/build-angular:tslint",
|
||||||
|
"options": {
|
||||||
|
"tsConfig": [
|
||||||
|
"projects/aca-settings/tsconfig.lib.json",
|
||||||
|
"projects/aca-settings/tsconfig.spec.json"
|
||||||
|
],
|
||||||
|
"exclude": [
|
||||||
|
"**/node_modules/**"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultProject": "app",
|
"defaultProject": "app",
|
||||||
|
24
projects/aca-settings/README.md
Normal file
24
projects/aca-settings/README.md
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
# AcaSettings
|
||||||
|
|
||||||
|
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 10.0.14.
|
||||||
|
|
||||||
|
## Code scaffolding
|
||||||
|
|
||||||
|
Run `ng generate component component-name --project aca-settings` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project aca-settings`.
|
||||||
|
> Note: Don't forget to add `--project aca-settings` or else it will be added to the default project in your `angular.json` file.
|
||||||
|
|
||||||
|
## Build
|
||||||
|
|
||||||
|
Run `ng build aca-settings` to build the project. The build artifacts will be stored in the `dist/` directory.
|
||||||
|
|
||||||
|
## Publishing
|
||||||
|
|
||||||
|
After building your library with `ng build aca-settings`, go to the dist folder `cd dist/aca-settings` and run `npm publish`.
|
||||||
|
|
||||||
|
## Running unit tests
|
||||||
|
|
||||||
|
Run `ng test aca-settings` 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 README](https://github.com/angular/angular-cli/blob/master/README.md).
|
32
projects/aca-settings/karma.conf.js
Normal file
32
projects/aca-settings/karma.conf.js
Normal file
@ -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-settings'),
|
||||||
|
reports: ['html', 'lcovonly', 'text-summary'],
|
||||||
|
fixWebpackSourcePaths: true
|
||||||
|
},
|
||||||
|
reporters: ['progress', 'kjhtml'],
|
||||||
|
port: 9876,
|
||||||
|
colors: true,
|
||||||
|
logLevel: config.LOG_INFO,
|
||||||
|
autoWatch: true,
|
||||||
|
browsers: ['Chrome'],
|
||||||
|
singleRun: false,
|
||||||
|
restartOnFileChange: true
|
||||||
|
});
|
||||||
|
};
|
7
projects/aca-settings/ng-package.json
Normal file
7
projects/aca-settings/ng-package.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../../node_modules/ng-packagr/ng-package.schema.json",
|
||||||
|
"dest": "../../dist/aca-settings",
|
||||||
|
"lib": {
|
||||||
|
"entryFile": "src/public-api.ts"
|
||||||
|
}
|
||||||
|
}
|
11
projects/aca-settings/package.json
Normal file
11
projects/aca-settings/package.json
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
{
|
||||||
|
"name": "@alfresco/aca-settings",
|
||||||
|
"version": "0.0.1",
|
||||||
|
"peerDependencies": {
|
||||||
|
"@angular/common": "^10.0.14",
|
||||||
|
"@angular/core": "^10.0.14"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"tslib": "^2.0.0"
|
||||||
|
}
|
||||||
|
}
|
@ -1,10 +1,6 @@
|
|||||||
<adf-toolbar class="app-menu" [style.background-color]="headerColor$ | async">
|
<adf-toolbar class="app-menu" [style.background-color]="headerColor$ | async">
|
||||||
<adf-toolbar-title>
|
<adf-toolbar-title>
|
||||||
<a
|
<a class="app-menu__title" title="{{ appName$ | async }}" [routerLink]="['/']">
|
||||||
class="app-menu__title"
|
|
||||||
title="{{ appName$ | async }}"
|
|
||||||
[routerLink]="['/']"
|
|
||||||
>
|
|
||||||
<img [src]="logo" alt="{{ appName$ | async }}" />
|
<img [src]="logo" alt="{{ appName$ | async }}" />
|
||||||
</a>
|
</a>
|
||||||
</adf-toolbar-title>
|
</adf-toolbar-title>
|
||||||
@ -13,15 +9,9 @@
|
|||||||
<mat-accordion multi="true" displayMode="flat">
|
<mat-accordion multi="true" displayMode="flat">
|
||||||
<mat-expansion-panel>
|
<mat-expansion-panel>
|
||||||
<mat-expansion-panel-header>
|
<mat-expansion-panel-header>
|
||||||
<mat-panel-title>{{
|
<mat-panel-title>{{ 'APP.SETTINGS.REPOSITORY-SETTINGS' | translate }}</mat-panel-title>
|
||||||
'APP.SETTINGS.REPOSITORY-SETTINGS' | translate
|
|
||||||
}}</mat-panel-title>
|
|
||||||
</mat-expansion-panel-header>
|
</mat-expansion-panel-header>
|
||||||
<form
|
<form [formGroup]="form" novalidate (ngSubmit)="apply(form.value, form.valid)">
|
||||||
[formGroup]="form"
|
|
||||||
novalidate
|
|
||||||
(ngSubmit)="apply(form.value, form.valid)"
|
|
||||||
>
|
|
||||||
<div>
|
<div>
|
||||||
<mat-form-field class="settings-input" appearance="outline">
|
<mat-form-field class="settings-input" appearance="outline">
|
||||||
<mat-label>ACS Repository URL</mat-label>
|
<mat-label>ACS Repository URL</mat-label>
|
||||||
@ -56,12 +46,7 @@
|
|||||||
<button mat-button (click)="reset()">
|
<button mat-button (click)="reset()">
|
||||||
{{ 'APP.SETTINGS.RESET' | translate }}
|
{{ 'APP.SETTINGS.RESET' | translate }}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button mat-button color="primary" type="submit" [disabled]="!form.valid">
|
||||||
mat-button
|
|
||||||
color="primary"
|
|
||||||
type="submit"
|
|
||||||
[disabled]="!form.valid"
|
|
||||||
>
|
|
||||||
{{ 'APP.SETTINGS.APPLY' | translate }}
|
{{ 'APP.SETTINGS.APPLY' | translate }}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
@ -77,11 +62,9 @@
|
|||||||
<ng-container *ngFor="let param of group.parameters">
|
<ng-container *ngFor="let param of group.parameters">
|
||||||
<ng-container [ngSwitch]="param.type">
|
<ng-container [ngSwitch]="param.type">
|
||||||
<ng-container *ngSwitchCase="'boolean'">
|
<ng-container *ngSwitchCase="'boolean'">
|
||||||
<mat-checkbox
|
<mat-checkbox [checked]="getBooleanParamValue(param)" (change)="setParamValue(param, $event.checked)">{{
|
||||||
[checked]="getBooleanParamValue(param)"
|
param.name | translate
|
||||||
(change)="setParamValue(param, $event.checked)"
|
}}</mat-checkbox>
|
||||||
>{{ param.name | translate }}</mat-checkbox
|
|
||||||
>
|
|
||||||
</ng-container>
|
</ng-container>
|
||||||
|
|
||||||
<ng-container *ngSwitchCase="'string'">
|
<ng-container *ngSwitchCase="'string'">
|
77
projects/aca-settings/src/lib/settings.component.scss
Normal file
77
projects/aca-settings/src/lib/settings.component.scss
Normal file
@ -0,0 +1,77 @@
|
|||||||
|
$app-menu-height: 64px;
|
||||||
|
|
||||||
|
.aca-settings-parameter-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.aca-settings {
|
||||||
|
&-extensions-list {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-input {
|
||||||
|
width: 50%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.settings-buttons {
|
||||||
|
text-align: right;
|
||||||
|
|
||||||
|
.mat-button {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-menu {
|
||||||
|
height: $app-menu-height;
|
||||||
|
|
||||||
|
&.adf-toolbar {
|
||||||
|
.mat-toolbar {
|
||||||
|
background-color: inherit;
|
||||||
|
font-family: inherit;
|
||||||
|
min-height: $app-menu-height;
|
||||||
|
height: $app-menu-height;
|
||||||
|
|
||||||
|
.mat-toolbar-layout {
|
||||||
|
height: $app-menu-height;
|
||||||
|
|
||||||
|
.mat-toolbar-row {
|
||||||
|
height: $app-menu-height;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.adf-toolbar-divider {
|
||||||
|
margin-left: 5px;
|
||||||
|
margin-right: 5px;
|
||||||
|
|
||||||
|
& > div {
|
||||||
|
background-color: var(--theme-card-background-color);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.adf-toolbar-title {
|
||||||
|
color: var(--theme-card-background-color);
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-menu__title {
|
||||||
|
width: 100px;
|
||||||
|
height: 50px;
|
||||||
|
margin-left: 40px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: stretch;
|
||||||
|
|
||||||
|
& > img {
|
||||||
|
width: 100%;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -25,12 +25,10 @@
|
|||||||
|
|
||||||
import { SettingsComponent } from './settings.component';
|
import { SettingsComponent } from './settings.component';
|
||||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
import { setupTestBed, StorageService } from '@alfresco/adf-core';
|
import { CoreModule, setupTestBed, StorageService } from '@alfresco/adf-core';
|
||||||
import { AppSettingsModule } from './settings.module';
|
import { AcaSettingsModule } from './settings.module';
|
||||||
import { AppTestingModule } from '../../testing/app-testing.module';
|
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { TranslateModule, TranslateLoader, TranslateFakeLoader } from '@ngx-translate/core';
|
import { AppExtensionService, SettingsParameterRef, LibTestingModule } from '@alfresco/aca-shared';
|
||||||
import { AppExtensionService, SettingsParameterRef } from '@alfresco/aca-shared';
|
|
||||||
|
|
||||||
describe('SettingsComponent', () => {
|
describe('SettingsComponent', () => {
|
||||||
let fixture: ComponentFixture<SettingsComponent>;
|
let fixture: ComponentFixture<SettingsComponent>;
|
||||||
@ -42,13 +40,7 @@ describe('SettingsComponent', () => {
|
|||||||
let boolParam: SettingsParameterRef;
|
let boolParam: SettingsParameterRef;
|
||||||
|
|
||||||
setupTestBed({
|
setupTestBed({
|
||||||
imports: [
|
imports: [CoreModule.forRoot(), AcaSettingsModule, LibTestingModule]
|
||||||
AppSettingsModule,
|
|
||||||
AppTestingModule,
|
|
||||||
TranslateModule.forRoot({
|
|
||||||
loader: { provide: TranslateLoader, useClass: TranslateFakeLoader }
|
|
||||||
})
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
@ -41,6 +41,7 @@ interface RepositoryConfig {
|
|||||||
@Component({
|
@Component({
|
||||||
selector: 'aca-settings',
|
selector: 'aca-settings',
|
||||||
templateUrl: './settings.component.html',
|
templateUrl: './settings.component.html',
|
||||||
|
styleUrls: ['./settings.component.scss'],
|
||||||
encapsulation: ViewEncapsulation.None,
|
encapsulation: ViewEncapsulation.None,
|
||||||
host: { class: 'aca-settings' }
|
host: { class: 'aca-settings' }
|
||||||
})
|
})
|
@ -24,23 +24,21 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { SettingsComponent } from './settings.component';
|
import { ExtensionService } from '@alfresco/adf-extensions';
|
||||||
import { Routes, RouterModule } from '@angular/router';
|
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
|
|
||||||
const routes: Routes = [
|
import { SettingsComponent } from './settings.component';
|
||||||
{
|
import { RouterModule } from '@angular/router';
|
||||||
path: '',
|
|
||||||
component: SettingsComponent,
|
|
||||||
data: {
|
|
||||||
title: 'Settings'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
];
|
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [CommonModule, CoreModule.forChild(), RouterModule.forChild(routes)],
|
imports: [CommonModule, RouterModule, CoreModule.forChild()],
|
||||||
declarations: [SettingsComponent]
|
declarations: [SettingsComponent]
|
||||||
})
|
})
|
||||||
export class AppSettingsModule {}
|
export class AcaSettingsModule {
|
||||||
|
constructor(extensions: ExtensionService) {
|
||||||
|
extensions.setComponents({
|
||||||
|
'app.settings.component': SettingsComponent
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
27
projects/aca-settings/src/public-api.ts
Normal file
27
projects/aca-settings/src/public-api.ts
Normal file
@ -0,0 +1,27 @@
|
|||||||
|
/*!
|
||||||
|
* @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 <http://www.gnu.org/licenses/>.
|
||||||
|
*/
|
||||||
|
|
||||||
|
export * from './lib/settings.component';
|
||||||
|
export * from './lib/settings.module';
|
49
projects/aca-settings/src/test.ts
Normal file
49
projects/aca-settings/src/test.ts
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
/*!
|
||||||
|
* @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 <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/dist/zone';
|
||||||
|
import 'zone.js/dist/zone-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());
|
||||||
|
// Then we find all the tests.
|
||||||
|
const context = require.context('./', true, /\.spec\.ts$/);
|
||||||
|
// And load the modules.
|
||||||
|
context.keys().map(context);
|
24
projects/aca-settings/tsconfig.lib.json
Normal file
24
projects/aca-settings/tsconfig.lib.json
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../out-tsc/lib",
|
||||||
|
"target": "es2015",
|
||||||
|
"declaration": true,
|
||||||
|
"inlineSources": true,
|
||||||
|
"types": [],
|
||||||
|
"lib": [
|
||||||
|
"dom",
|
||||||
|
"es2018"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"skipTemplateCodegen": true,
|
||||||
|
"strictMetadataEmit": true,
|
||||||
|
"enableResourceInlining": true
|
||||||
|
},
|
||||||
|
"exclude": [
|
||||||
|
"src/test.ts",
|
||||||
|
"**/*.spec.ts"
|
||||||
|
]
|
||||||
|
}
|
7
projects/aca-settings/tsconfig.lib.prod.json
Normal file
7
projects/aca-settings/tsconfig.lib.prod.json
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||||
|
{
|
||||||
|
"extends": "./tsconfig.lib.json",
|
||||||
|
"angularCompilerOptions": {
|
||||||
|
"enableIvy": false
|
||||||
|
}
|
||||||
|
}
|
17
projects/aca-settings/tsconfig.spec.json
Normal file
17
projects/aca-settings/tsconfig.spec.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
/* To learn more about this file see: https://angular.io/config/tsconfig. */
|
||||||
|
{
|
||||||
|
"extends": "../../tsconfig.base.json",
|
||||||
|
"compilerOptions": {
|
||||||
|
"outDir": "../../out-tsc/spec",
|
||||||
|
"types": [
|
||||||
|
"jasmine"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"files": [
|
||||||
|
"src/test.ts"
|
||||||
|
],
|
||||||
|
"include": [
|
||||||
|
"**/*.spec.ts",
|
||||||
|
"**/*.d.ts"
|
||||||
|
]
|
||||||
|
}
|
17
projects/aca-settings/tslint.json
Normal file
17
projects/aca-settings/tslint.json
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
{
|
||||||
|
"extends": "../../tslint.json",
|
||||||
|
"rules": {
|
||||||
|
"directive-selector": [
|
||||||
|
true,
|
||||||
|
"attribute",
|
||||||
|
["lib", "aca", "app", "adf"],
|
||||||
|
"camelCase"
|
||||||
|
],
|
||||||
|
"component-selector": [
|
||||||
|
true,
|
||||||
|
"element",
|
||||||
|
["lib", "aca", "app", "adf"],
|
||||||
|
"kebab-case"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -39,6 +39,7 @@ import { RouterTestingModule } from '@angular/router/testing';
|
|||||||
import { EffectsModule } from '@ngrx/effects';
|
import { EffectsModule } from '@ngrx/effects';
|
||||||
import { StoreModule } from '@ngrx/store';
|
import { StoreModule } from '@ngrx/store';
|
||||||
import { provideMockStore } from '@ngrx/store/testing';
|
import { provideMockStore } from '@ngrx/store/testing';
|
||||||
|
import { CommonModule } from '@angular/common';
|
||||||
|
|
||||||
export const initialState = {
|
export const initialState = {
|
||||||
app: {
|
app: {
|
||||||
@ -78,6 +79,7 @@ export const initialState = {
|
|||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
imports: [
|
||||||
NoopAnimationsModule,
|
NoopAnimationsModule,
|
||||||
|
CommonModule,
|
||||||
HttpClientModule,
|
HttpClientModule,
|
||||||
RouterTestingModule,
|
RouterTestingModule,
|
||||||
StoreModule,
|
StoreModule,
|
||||||
|
@ -60,3 +60,4 @@ export * from './lib/services/router.extension.service';
|
|||||||
|
|
||||||
export * from './lib/utils/node.utils';
|
export * from './lib/utils/node.utils';
|
||||||
export * from './lib/shared.module';
|
export * from './lib/shared.module';
|
||||||
|
export * from './lib/testing/lib-testing-module';
|
||||||
|
@ -45,10 +45,6 @@ export const APP_ROUTES: Routes = [
|
|||||||
title: 'APP.SIGN_IN'
|
title: 'APP.SIGN_IN'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: 'settings',
|
|
||||||
loadChildren: () => import('./components/settings/settings.module').then((m) => m.AppSettingsModule)
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
path: 'preview/s/:id',
|
path: 'preview/s/:id',
|
||||||
loadChildren: () => import('./components/shared-link-view/shared-link-view.module').then((m) => m.AppSharedLinkViewModule)
|
loadChildren: () => import('./components/shared-link-view/shared-link-view.module').then((m) => m.AppSharedLinkViewModule)
|
||||||
|
@ -1,80 +0,0 @@
|
|||||||
@mixin aca-settings-theme($theme) {
|
|
||||||
$background: map-get($theme, background);
|
|
||||||
$app-menu-height: 64px;
|
|
||||||
|
|
||||||
.aca-settings-parameter-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.aca-settings {
|
|
||||||
&-extensions-list {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
}
|
|
||||||
|
|
||||||
.settings-input {
|
|
||||||
width: 50%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.settings-buttons {
|
|
||||||
text-align: right;
|
|
||||||
|
|
||||||
.mat-button {
|
|
||||||
text-transform: uppercase;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-menu {
|
|
||||||
height: $app-menu-height;
|
|
||||||
|
|
||||||
&.adf-toolbar {
|
|
||||||
.mat-toolbar {
|
|
||||||
background-color: inherit;
|
|
||||||
font-family: inherit;
|
|
||||||
min-height: $app-menu-height;
|
|
||||||
height: $app-menu-height;
|
|
||||||
|
|
||||||
.mat-toolbar-layout {
|
|
||||||
height: $app-menu-height;
|
|
||||||
|
|
||||||
.mat-toolbar-row {
|
|
||||||
height: $app-menu-height;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.adf-toolbar-divider {
|
|
||||||
margin-left: 5px;
|
|
||||||
margin-right: 5px;
|
|
||||||
|
|
||||||
& > div {
|
|
||||||
background-color: mat-color($background, card);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.adf-toolbar-title {
|
|
||||||
color: mat-color($background, card);
|
|
||||||
display: flex;
|
|
||||||
flex-direction: row;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.app-menu__title {
|
|
||||||
width: 100px;
|
|
||||||
height: 50px;
|
|
||||||
margin-left: 40px;
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: stretch;
|
|
||||||
|
|
||||||
& > img {
|
|
||||||
width: 100%;
|
|
||||||
object-fit: contain;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
@ -26,11 +26,12 @@
|
|||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { AosExtensionModule } from '@alfresco/adf-office-services-ext';
|
import { AosExtensionModule } from '@alfresco/adf-office-services-ext';
|
||||||
import { AcaAboutModule } from '@alfresco/aca-about';
|
import { AcaAboutModule } from '@alfresco/aca-about';
|
||||||
|
import { AcaSettingsModule } from '@alfresco/aca-settings';
|
||||||
|
|
||||||
// Main entry point for external extensions only.
|
// Main entry point for external extensions only.
|
||||||
// For any application-specific code use CoreExtensionsModule instead.
|
// For any application-specific code use CoreExtensionsModule instead.
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [AosExtensionModule, AcaAboutModule]
|
imports: [AosExtensionModule, AcaAboutModule, AcaSettingsModule]
|
||||||
})
|
})
|
||||||
export class AppExtensionsModule {}
|
export class AppExtensionsModule {}
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
@import '../components/sidenav/sidenav.component.theme';
|
@import '../components/sidenav/sidenav.component.theme';
|
||||||
@import '../components/search/search-input/search-input.component.theme';
|
@import '../components/search/search-input/search-input.component.theme';
|
||||||
@import '../components/search/search-results-row/search-results-row.component.scss';
|
@import '../components/search/search-results-row/search-results-row.component.scss';
|
||||||
@import '../components/settings/settings.component.theme';
|
|
||||||
@import '../components/current-user/current-user.component.theme';
|
@import '../components/current-user/current-user.component.theme';
|
||||||
@import '../components/permissions/permission-manager/permission-manager.component.theme';
|
@import '../components/permissions/permission-manager/permission-manager.component.theme';
|
||||||
@import '../components/context-menu/context-menu.component.theme';
|
@import '../components/context-menu/context-menu.component.theme';
|
||||||
@ -25,12 +24,9 @@
|
|||||||
$custom-theme-primary: mat-palette($aca-primary-blue, A100);
|
$custom-theme-primary: mat-palette($aca-primary-blue, A100);
|
||||||
$custom-theme-accent: mat-palette($aca-accent-green, A200);
|
$custom-theme-accent: mat-palette($aca-accent-green, A200);
|
||||||
$custom-theme-warn: mat-palette($aca-warn, A100);
|
$custom-theme-warn: mat-palette($aca-warn, A100);
|
||||||
$custom-theme: mat-light-theme(
|
$custom-theme: mat-light-theme($custom-theme-primary, $custom-theme-accent, $custom-theme-warn);
|
||||||
$custom-theme-primary,
|
|
||||||
$custom-theme-accent,
|
|
||||||
$custom-theme-warn
|
|
||||||
);
|
|
||||||
$foreground: map-get($custom-theme, foreground);
|
$foreground: map-get($custom-theme, foreground);
|
||||||
|
$background: map-get($custom-theme, background);
|
||||||
$warn: map-get($custom-theme, warn);
|
$warn: map-get($custom-theme, warn);
|
||||||
|
|
||||||
@mixin custom-theme($theme) {
|
@mixin custom-theme($theme) {
|
||||||
@ -43,7 +39,6 @@ $warn: map-get($custom-theme, warn);
|
|||||||
@include aca-result-row-theme($theme);
|
@include aca-result-row-theme($theme);
|
||||||
@include app-permission-manager-theme($theme);
|
@include app-permission-manager-theme($theme);
|
||||||
@include aca-node-versions-dialog-theme($theme);
|
@include aca-node-versions-dialog-theme($theme);
|
||||||
@include aca-settings-theme($theme);
|
|
||||||
@include snackbar-theme($theme);
|
@include snackbar-theme($theme);
|
||||||
@include sidenav-component-theme($theme);
|
@include sidenav-component-theme($theme);
|
||||||
@include aca-current-user-theme($theme);
|
@include aca-current-user-theme($theme);
|
||||||
@ -92,7 +87,8 @@ $defaults: (
|
|||||||
--theme-title-color: mat-color($foreground, text, 0.87),
|
--theme-title-color: mat-color($foreground, text, 0.87),
|
||||||
--theme-text-disabled-color: mat-color($foreground, text, 0.38),
|
--theme-text-disabled-color: mat-color($foreground, text, 0.38),
|
||||||
--theme-border-color: mat-color($foreground, text, 0.07),
|
--theme-border-color: mat-color($foreground, text, 0.07),
|
||||||
--header-background-image: url('/assets/images/mastHead-bg-shapesPattern.svg')
|
--header-background-image: url('/assets/images/mastHead-bg-shapesPattern.svg'),
|
||||||
|
--theme-card-background-color: mat-color($background, card)
|
||||||
);
|
);
|
||||||
|
|
||||||
// propagates SCSS variables into the CSS variables scope
|
// propagates SCSS variables into the CSS variables scope
|
||||||
|
@ -7,7 +7,12 @@
|
|||||||
"$license": "LGPL-3.0",
|
"$license": "LGPL-3.0",
|
||||||
"$runtime": "1.7.0",
|
"$runtime": "1.7.0",
|
||||||
"$description": "Core application extensions and features",
|
"$description": "Core application extensions and features",
|
||||||
"$references": ["aos.plugin.json", "app.header.json", "app.about.json"],
|
"$references": [
|
||||||
|
"aos.plugin.json",
|
||||||
|
"app.header.json",
|
||||||
|
"app.about.json",
|
||||||
|
"app.settings.json"
|
||||||
|
],
|
||||||
|
|
||||||
"settings": [
|
"settings": [
|
||||||
{
|
{
|
||||||
|
46
src/assets/plugins/app.settings.json
Normal file
46
src/assets/plugins/app.settings.json
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
{
|
||||||
|
"$schema": "../../../extension.schema.json",
|
||||||
|
"$id": "app.settings",
|
||||||
|
"$name": "app.settings",
|
||||||
|
"$version": "1.0.0",
|
||||||
|
"$vendor": "Alfresco Software, Ltd.",
|
||||||
|
"$license": "LGPL-3.0",
|
||||||
|
"$description": "Application Settings Screen",
|
||||||
|
|
||||||
|
"actions": [
|
||||||
|
{
|
||||||
|
"id": "app.actions.settings",
|
||||||
|
"type": "NAVIGATE_URL",
|
||||||
|
"payload": "/settings"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"routes": [
|
||||||
|
{
|
||||||
|
"id": "app.settings",
|
||||||
|
"path": "settings",
|
||||||
|
"layout": "blank",
|
||||||
|
"component": "app.settings.component"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
|
||||||
|
"features": {
|
||||||
|
"header": [
|
||||||
|
{
|
||||||
|
"id": "app.header.more",
|
||||||
|
"children": [
|
||||||
|
{
|
||||||
|
"id": "app.header.settings",
|
||||||
|
"order": 110,
|
||||||
|
"title": "APP.SETTINGS.TITLE",
|
||||||
|
"description": "APP.SETTINGS.TITLE",
|
||||||
|
"icon": "info",
|
||||||
|
"actions": {
|
||||||
|
"click": "app.actions.settings"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
@ -26,6 +26,7 @@
|
|||||||
"@alfresco/adf-office-services-ext": ["projects/adf-office-services-ext/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"],
|
"@alfresco/aca-testing-shared": ["projects/aca-testing-shared"],
|
||||||
"@alfresco/aca-about": ["projects/aca-about/src/public-api.ts"],
|
"@alfresco/aca-about": ["projects/aca-about/src/public-api.ts"],
|
||||||
|
"@alfresco/aca-settings": ["projects/aca-settings/src/public-api.ts"],
|
||||||
"package.json": ["package.json"]
|
"package.json": ["package.json"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -36,6 +36,12 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"path": "./projects/aca-about/tsconfig.spec.json"
|
"path": "./projects/aca-about/tsconfig.spec.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./projects/aca-settings/tsconfig.lib.json"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"path": "./projects/aca-settings/tsconfig.spec.json"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user