[ADF-5410] code fixes and updates prior to Angular 12 upgrade (#7177)

* package fixes

* upgrade stylelint config

* upgrade configuration and stats

* code fixes based on Angular upgrade

* rework scss-bundle usage

* use node 14 with travis (lts)

* fix production builds

* fix node sass version
This commit is contained in:
Denys Vuika
2021-07-15 12:48:23 +01:00
committed by GitHub
parent 182021a127
commit c1860f0c1f
54 changed files with 168 additions and 324 deletions

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { ComponentFixture, TestBed, tick, fakeAsync, async, discardPeriodicTasks } from '@angular/core/testing';
import { ComponentFixture, TestBed, tick, fakeAsync, discardPeriodicTasks } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { CardViewTextItemModel } from '../../models/card-view-textitem.model';
import { CardViewUpdateService } from '../../services/card-view-update.service';
@@ -600,7 +600,7 @@ describe('CardViewTextItemComponent', () => {
expect(component.property.value).toBe(component.editedValue);
});
it('should render the default as value if the value is empty, clickable is true and displayEmpty is true', async(async (done) => {
it('should render the default as value if the value is empty, clickable is true and displayEmpty is true', fakeAsync(async (done) => {
const functionTestClick = () => done();
component.property = new CardViewTextItemModel({

View File

@@ -29,7 +29,6 @@ import { DynamicTableModel } from './dynamic-table.widget.model';
@Component({
selector: 'dynamic-table-widget',
templateUrl: './dynamic-table.widget.html',
styleUrls: ['./dynamic-table.widget.scss'],
host: {
'(click)': 'event($event)',
'(blur)': 'event($event)',

View File

@@ -16,7 +16,8 @@
"moment": "moment",
"moment-es6": "moment-es6",
"moment/src/moment": "moment/src/moment",
"@ngx-translate/core": "@ngx-translate/core"
"@ngx-translate/core": "@ngx-translate/core",
"cropperjs": "cropperjs"
}
}
}

View File

@@ -29,3 +29,5 @@ export * from './time-ago.pipe';
export * from './user-initial.pipe';
export * from './localized-role.pipe';
export * from './pipe.module';
export * from './moment-date.pipe';
export * from './moment-datetime.pipe';

View File

@@ -0,0 +1,10 @@
{
"bundlerOptions": {
"entryFile": "./lib/core/styles/_index.scss",
"rootDir": ".",
"project": "../../",
"outFile": "./lib/dist/core/_theming.scss",
"ignoreImports": ["~@angular/.*"],
"logLevel": "info"
}
}

View File

@@ -2,6 +2,7 @@
"extends": "../tsconfig.json",
"compilerOptions": {
"outDir": "../dist/core/",
"declarationMap": true,
"baseUrl": "./",
"paths": {
"@alfresco/adf-extensions": ["../dist/extensions"],

View File

@@ -1,6 +1,9 @@
{
"extends": "./tsconfig.lib.json",
"compilerOptions": {
"declarationMap": false
},
"angularCompilerOptions": {
"enableIvy": false
}
}
}

View File

@@ -35,7 +35,7 @@ export class FileUtils {
} else {
iterations.push(Promise.all(entries.map((entry) => {
if (entry.isFile) {
return new Promise((resolveFile) => {
return new Promise<void>((resolveFile) => {
entry.file(function (file: File) {
files.push({
entry: entry,

View File

@@ -23,8 +23,7 @@ declare const pdfjsLib: any;
@Component({
selector: 'adf-pdf-viewer-password-dialog',
templateUrl: './pdf-viewer-password-dialog.html',
styleUrls: [ './pdf-viewer-password-dialog.scss' ]
templateUrl: './pdf-viewer-password-dialog.html'
})
export class PdfPasswordDialogComponent implements OnInit {
passwordFormControl: FormControl;