mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2026-09-09 18:03:21 +00:00
[MIGRATION] - Build fix and lint skipped rule
This commit is contained in:
@@ -9,3 +9,5 @@ scripts
|
|||||||
/angular.json
|
/angular.json
|
||||||
docs/**/*.md
|
docs/**/*.md
|
||||||
lib/js-api/docs/**/*.md
|
lib/js-api/docs/**/*.md
|
||||||
|
webpack.config.js
|
||||||
|
.storybook
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ module.exports = {
|
|||||||
rules: {
|
rules: {
|
||||||
// Uncomment this to enable prettier checks as part of the ESLint
|
// Uncomment this to enable prettier checks as part of the ESLint
|
||||||
// 'prettier/prettier': 'error',
|
// 'prettier/prettier': 'error',
|
||||||
|
|
||||||
'ban/ban': [
|
'ban/ban': [
|
||||||
'error',
|
'error',
|
||||||
{ name: 'eval', message: 'Calls to eval is not allowed.' },
|
{ name: 'eval', message: 'Calls to eval is not allowed.' },
|
||||||
@@ -74,6 +75,7 @@ module.exports = {
|
|||||||
'@angular-eslint/no-input-prefix': 'error',
|
'@angular-eslint/no-input-prefix': 'error',
|
||||||
'@typescript-eslint/consistent-type-definitions': 'error',
|
'@typescript-eslint/consistent-type-definitions': 'error',
|
||||||
'@typescript-eslint/dot-notation': 'off',
|
'@typescript-eslint/dot-notation': 'off',
|
||||||
|
'@typescript-eslint/no-empty-function': 'off',
|
||||||
'@typescript-eslint/explicit-member-accessibility': [
|
'@typescript-eslint/explicit-member-accessibility': [
|
||||||
'off',
|
'off',
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ export const parameters = {
|
|||||||
docs: { inlineStories: true },
|
docs: { inlineStories: true },
|
||||||
controls: { expanded: true }
|
controls: { expanded: true }
|
||||||
};
|
};
|
||||||
export const tags = ['autodocs'];
|
export const tags = ['autodocs', 'autodocs', 'autodocs'];
|
||||||
|
|||||||
@@ -173,26 +173,26 @@
|
|||||||
"serve": {
|
"serve": {
|
||||||
"executor": "@angular-devkit/build-angular:dev-server",
|
"executor": "@angular-devkit/build-angular:dev-server",
|
||||||
"options": {
|
"options": {
|
||||||
"browserTarget": "demoshell:build",
|
|
||||||
"host": "0.0.0.0",
|
"host": "0.0.0.0",
|
||||||
"port": 3000,
|
"port": 3000,
|
||||||
"proxyConfig": "demo-shell/proxy.conf.js",
|
"proxyConfig": "demo-shell/proxy.conf.js",
|
||||||
"disableHostCheck": true
|
"disableHostCheck": true,
|
||||||
|
"buildTarget": "demoshell:build"
|
||||||
},
|
},
|
||||||
"configurations": {
|
"configurations": {
|
||||||
"production": {
|
"production": {
|
||||||
"browserTarget": "demoshell:build:production"
|
"buildTarget": "demoshell:build:production"
|
||||||
},
|
},
|
||||||
"canary": {
|
"canary": {
|
||||||
"browserTarget": "demoshell:build:canary"
|
"buildTarget": "demoshell:build:canary"
|
||||||
},
|
},
|
||||||
"e2e": {
|
"e2e": {
|
||||||
"browserTarget": "demoshell:build:e2e"
|
"buildTarget": "demoshell:build:e2e"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["demo-shell/**/*.ts", "demo-shell/**/*.html"]
|
"lintFilePatterns": ["demo-shell/**/*.ts", "demo-shell/**/*.html"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
import { BrowserModule } from '@angular/platform-browser';
|
import { BrowserModule } from '@angular/platform-browser';
|
||||||
import { NgModule } from '@angular/core';
|
import { NgModule } from '@angular/core';
|
||||||
import { NgChartsModule } from 'ng2-charts';
|
import { NgChartsModule } from 'ng2-charts';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { BrowserAnimationsModule, NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
import { AppConfigService, DebugAppConfigService, CoreModule, AuthModule, provideTranslations } from '@alfresco/adf-core';
|
import { AppConfigService, DebugAppConfigService, CoreModule, AuthModule, provideTranslations } from '@alfresco/adf-core';
|
||||||
@@ -34,12 +34,13 @@ import { RouterModule } from '@angular/router';
|
|||||||
import { CoreAutomationService } from '../testing/automation.service';
|
import { CoreAutomationService } from '../testing/automation.service';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
declarations: [AppComponent],
|
||||||
|
bootstrap: [AppComponent],
|
||||||
imports: [
|
imports: [
|
||||||
BrowserModule,
|
BrowserModule,
|
||||||
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
|
environment.e2e ? NoopAnimationsModule : BrowserAnimationsModule,
|
||||||
RouterModule.forRoot(appRoutes, { useHash: true }),
|
RouterModule.forRoot(appRoutes, { useHash: true }),
|
||||||
AuthModule.forRoot({ useHash: true }),
|
AuthModule.forRoot({ useHash: true }),
|
||||||
HttpClientModule,
|
|
||||||
TranslateModule.forRoot(),
|
TranslateModule.forRoot(),
|
||||||
CoreModule.forRoot(),
|
CoreModule.forRoot(),
|
||||||
ContentModule.forRoot(),
|
ContentModule.forRoot(),
|
||||||
@@ -49,13 +50,12 @@ import { CoreAutomationService } from '../testing/automation.service';
|
|||||||
NgChartsModule,
|
NgChartsModule,
|
||||||
MonacoEditorModule.forRoot()
|
MonacoEditorModule.forRoot()
|
||||||
],
|
],
|
||||||
declarations: [AppComponent],
|
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production
|
{ provide: AppConfigService, useClass: DebugAppConfigService }, // not use this service in production
|
||||||
provideTranslations('app', 'resources'),
|
provideTranslations('app', 'resources'),
|
||||||
provideTranslations('adf-insights', 'assets/adf-insights')
|
provideTranslations('adf-insights', 'assets/adf-insights'),
|
||||||
],
|
provideHttpClient(withInterceptorsFromDi())
|
||||||
bootstrap: [AppComponent]
|
]
|
||||||
})
|
})
|
||||||
export class AppModule {
|
export class AppModule {
|
||||||
constructor(automationService: CoreAutomationService) {
|
constructor(automationService: CoreAutomationService) {
|
||||||
|
|||||||
@@ -64,7 +64,7 @@
|
|||||||
<br>
|
<br>
|
||||||
<div *ngIf="selectedContextAction">
|
<div *ngIf="selectedContextAction">
|
||||||
<span>Process Instance ID: {{ selectedContextAction.id }}</span><br>
|
<span>Process Instance ID: {{ selectedContextAction.id }}</span><br>
|
||||||
<span>Action Type}: {{ selectedContextAction.actionType }}</span>
|
<span>Action Type: {{ selectedContextAction.actionType }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -4,10 +4,10 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-accent-orange);
|
$primary: mat.m2-define-palette($alfresco-accent-orange);
|
||||||
$accent: mat.define-palette($alfresco-accent-purple);
|
$accent: mat.m2-define-palette($alfresco-accent-purple);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
|
|||||||
@@ -3,14 +3,14 @@
|
|||||||
@include mat.all-component-typographies($alfresco-typography);
|
@include mat.all-component-typographies($alfresco-typography);
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-accent-orange);
|
$primary: mat.m2-define-palette($alfresco-accent-orange);
|
||||||
$accent: mat.define-palette($alfresco-accent-purple);
|
$accent: mat.m2-define-palette($alfresco-accent-purple);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/cli/**/*.ts", "lib/cli/**/*.html"]
|
"lintFilePatterns": ["lib/cli/**/*.ts", "lib/cli/**/*.html"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const parameters = {
|
export const parameters = {
|
||||||
docs: { inlineStories: true },
|
docs: { inlineStories: true },
|
||||||
controls: { expanded: true }
|
controls: { expanded: true }
|
||||||
};
|
};
|
||||||
export const tags = ["autodocs"];
|
export const tags = ['autodocs', 'autodocs'];
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/content-services/**/*.ts", "lib/content-services/**/*.html"]
|
"lintFilePatterns": ["lib/content-services/**/*.ts", "lib/content-services/**/*.html"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -27,7 +27,8 @@ import { AspectEntry, Node } from '@alfresco/js-api';
|
|||||||
import { NodesApiService } from '../common/services/nodes-api.service';
|
import { NodesApiService } from '../common/services/nodes-api.service';
|
||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { AspectListComponent } from './aspect-list.component';
|
import { AspectListComponent } from './aspect-list.component';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
const aspectListMock: AspectEntry[] = [
|
const aspectListMock: AspectEntry[] = [
|
||||||
{
|
{
|
||||||
@@ -114,7 +115,7 @@ describe('AspectListDialogComponent', () => {
|
|||||||
excludedAspects: []
|
excludedAspects: []
|
||||||
};
|
};
|
||||||
await TestBed.configureTestingModule({
|
await TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule, ContentTestingModule, MatDialogModule],
|
imports: [ContentTestingModule, MatDialogModule],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: MAT_DIALOG_DATA, useValue: data },
|
{ provide: MAT_DIALOG_DATA, useValue: data },
|
||||||
{
|
{
|
||||||
@@ -124,7 +125,9 @@ describe('AspectListDialogComponent', () => {
|
|||||||
backdropClick: () => of(null),
|
backdropClick: () => of(null),
|
||||||
close: jasmine.createSpy('close')
|
close: jasmine.createSpy('close')
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
]
|
]
|
||||||
}).compileComponents();
|
}).compileComponents();
|
||||||
fixture = TestBed.createComponent(AspectListDialogComponent);
|
fixture = TestBed.createComponent(AspectListDialogComponent);
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import { TestBed } from '@angular/core/testing';
|
|||||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||||
import { AspectListService } from './aspect-list.service';
|
import { AspectListService } from './aspect-list.service';
|
||||||
import { AspectPaging, AspectsApi, AspectEntry } from '@alfresco/js-api';
|
import { AspectPaging, AspectsApi, AspectEntry } from '@alfresco/js-api';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
const stdAspect1: AspectEntry = { entry: { id: 'std:standardAspectOne', description: 'Standard Aspect One', title: 'StandardAspectOne' } };
|
const stdAspect1: AspectEntry = { entry: { id: 'std:standardAspectOne', description: 'Standard Aspect One', title: 'StandardAspectOne' } };
|
||||||
const stdAspect2: AspectEntry = { entry: { id: 'std:standardAspectTwo', description: 'Standard Aspect Two', title: 'StandardAspectTwo' } };
|
const stdAspect2: AspectEntry = { entry: { id: 'std:standardAspectTwo', description: 'Standard Aspect Two', title: 'StandardAspectTwo' } };
|
||||||
@@ -38,7 +39,8 @@ describe('AspectListService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule]
|
imports: [],
|
||||||
|
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
});
|
});
|
||||||
|
|
||||||
aspectListService = TestBed.inject(AspectListService);
|
aspectListService = TestBed.inject(AspectListService);
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ import { ContentService } from './content.service';
|
|||||||
import { AppConfigService, AuthenticationService, RedirectAuthService, StorageService } from '@alfresco/adf-core';
|
import { AppConfigService, AuthenticationService, RedirectAuthService, StorageService } from '@alfresco/adf-core';
|
||||||
import { Node, PermissionsInfo } from '@alfresco/js-api';
|
import { Node, PermissionsInfo } from '@alfresco/js-api';
|
||||||
import { EMPTY, of } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('ContentService', () => {
|
describe('ContentService', () => {
|
||||||
let contentService: ContentService;
|
let contentService: ContentService;
|
||||||
@@ -29,8 +30,14 @@ describe('ContentService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [ContentService, AuthenticationService, { provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }]
|
providers: [
|
||||||
|
ContentService,
|
||||||
|
AuthenticationService,
|
||||||
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
|
]
|
||||||
});
|
});
|
||||||
authService = TestBed.inject(AuthenticationService);
|
authService = TestBed.inject(AuthenticationService);
|
||||||
contentService = TestBed.inject(ContentService);
|
contentService = TestBed.inject(ContentService);
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ import { AlfrescoApiService, AlfrescoApiServiceMock, RedirectAuthService } from
|
|||||||
import { PeopleContentQueryRequestModel, PeopleContentService } from './people-content.service';
|
import { PeopleContentQueryRequestModel, PeopleContentService } from './people-content.service';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { PersonPaging } from '@alfresco/js-api';
|
import { PersonPaging } from '@alfresco/js-api';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { EMPTY, of } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
export const fakeEcmUser2 = {
|
export const fakeEcmUser2 = {
|
||||||
id: 'another-fake-id',
|
id: 'another-fake-id',
|
||||||
@@ -68,11 +69,13 @@ describe('PeopleContentService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [
|
providers: [
|
||||||
PeopleContentService,
|
PeopleContentService,
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -23,7 +23,8 @@ import { RepositoryInfo } from '@alfresco/js-api';
|
|||||||
import { BehaviorSubject } from 'rxjs';
|
import { BehaviorSubject } from 'rxjs';
|
||||||
import { DiscoveryApiService } from '../../common/services/discovery-api.service';
|
import { DiscoveryApiService } from '../../common/services/discovery-api.service';
|
||||||
import { FileModel, FileUploadStatus } from '../../common/models/file.model';
|
import { FileModel, FileUploadStatus } from '../../common/models/file.model';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@@ -36,7 +37,7 @@ describe('UploadService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [AppConfigModule, HttpClientTestingModule],
|
imports: [AppConfigModule],
|
||||||
providers: [
|
providers: [
|
||||||
UploadService,
|
UploadService,
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
@@ -46,7 +47,9 @@ describe('UploadService', () => {
|
|||||||
useValue: {
|
useValue: {
|
||||||
ecmProductInfo$: mockProductInfo
|
ecmProductInfo$: mockProductInfo
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
appConfigService = TestBed.inject(AppConfigService);
|
appConfigService = TestBed.inject(AppConfigService);
|
||||||
|
|||||||
+7
-11
@@ -22,25 +22,24 @@ import { AspectOrientedConfigService } from './aspect-oriented-config.service';
|
|||||||
import { LayoutOrientedConfigService } from './layout-oriented-config.service';
|
import { LayoutOrientedConfigService } from './layout-oriented-config.service';
|
||||||
import { ContentMetadataConfigFactory } from './content-metadata-config.factory';
|
import { ContentMetadataConfigFactory } from './content-metadata-config.factory';
|
||||||
import { ContentMetadataConfig } from '../../interfaces/content-metadata.interfaces';
|
import { ContentMetadataConfig } from '../../interfaces/content-metadata.interfaces';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('ContentMetadataConfigFactory', () => {
|
describe('ContentMetadataConfigFactory', () => {
|
||||||
|
|
||||||
let factory: ContentMetadataConfigFactory;
|
let factory: ContentMetadataConfigFactory;
|
||||||
let appConfig: AppConfigService;
|
let appConfig: AppConfigService;
|
||||||
let config: ContentMetadataConfig;
|
let config: ContentMetadataConfig;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [],
|
||||||
HttpClientModule
|
|
||||||
],
|
|
||||||
providers: [
|
providers: [
|
||||||
{
|
{
|
||||||
provide: LogService, useValue: {
|
provide: LogService,
|
||||||
|
useValue: {
|
||||||
error: () => {}
|
error: () => {}
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
provideHttpClient(withInterceptorsFromDi())
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
factory = TestBed.inject(ContentMetadataConfigFactory);
|
factory = TestBed.inject(ContentMetadataConfigFactory);
|
||||||
@@ -48,7 +47,6 @@ describe('ContentMetadataConfigFactory', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('get', () => {
|
describe('get', () => {
|
||||||
|
|
||||||
let logService: LogService;
|
let logService: LogService;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
@@ -57,7 +55,6 @@ describe('ContentMetadataConfigFactory', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('get', () => {
|
describe('get', () => {
|
||||||
|
|
||||||
it('should get back to default preset if no preset is provided as parameter', () => {
|
it('should get back to default preset if no preset is provided as parameter', () => {
|
||||||
config = factory.get();
|
config = factory.get();
|
||||||
|
|
||||||
@@ -85,7 +82,6 @@ describe('ContentMetadataConfigFactory', () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
describe('set', () => {
|
describe('set', () => {
|
||||||
|
|
||||||
const setConfig = (presetName: string, presetConfig: any) => {
|
const setConfig = (presetName: string, presetConfig: any) => {
|
||||||
appConfig.config['content-metadata'] = {
|
appConfig.config['content-metadata'] = {
|
||||||
presets: {
|
presets: {
|
||||||
@@ -118,5 +114,5 @@ describe('ContentMetadataConfigFactory', () => {
|
|||||||
expect(config).toEqual(jasmine.any(LayoutOrientedConfigService));
|
expect(config).toEqual(jasmine.any(LayoutOrientedConfigService));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -22,7 +22,8 @@ import { TestBed } from '@angular/core/testing';
|
|||||||
import { NodeAllowableOperationSubject } from '../interfaces/node-allowable-operation-subject.interface';
|
import { NodeAllowableOperationSubject } from '../interfaces/node-allowable-operation-subject.interface';
|
||||||
import { RedirectAuthService } from '@alfresco/adf-core';
|
import { RedirectAuthService } from '@alfresco/adf-core';
|
||||||
import { EMPTY, of } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'adf-text-subject',
|
selector: 'adf-text-subject',
|
||||||
@@ -37,8 +38,12 @@ describe('CheckAllowableOperationDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }]
|
providers: [
|
||||||
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
|
]
|
||||||
});
|
});
|
||||||
changeDetectorMock = { detectChanges: () => {} } as ChangeDetectorRef;
|
changeDetectorMock = { detectChanges: () => {} } as ChangeDetectorRef;
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import { Component, ViewChild } from '@angular/core';
|
|||||||
import { LibraryFavoriteDirective } from './library-favorite.directive';
|
import { LibraryFavoriteDirective } from './library-favorite.directive';
|
||||||
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||||
import { LibraryEntity } from '../interfaces/library-entity.interface';
|
import { LibraryEntity } from '../interfaces/library-entity.interface';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
standalone: true,
|
standalone: true,
|
||||||
@@ -41,7 +42,8 @@ describe('LibraryFavoriteDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule, TestComponent, LibraryFavoriteDirective]
|
imports: [TestComponent, LibraryFavoriteDirective],
|
||||||
|
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ import { SimpleChange } from '@angular/core';
|
|||||||
import { of, throwError, Subject } from 'rxjs';
|
import { of, throwError, Subject } from 'rxjs';
|
||||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
||||||
import { SitesService } from '../common/services/sites.service';
|
import { SitesService } from '../common/services/sites.service';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('LibraryMembershipDirective', () => {
|
describe('LibraryMembershipDirective', () => {
|
||||||
let alfrescoApiService: AlfrescoApiService;
|
let alfrescoApiService: AlfrescoApiService;
|
||||||
@@ -37,8 +38,13 @@ describe('LibraryMembershipDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [SitesService, { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
providers: [
|
||||||
|
SitesService,
|
||||||
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
testSiteEntry = {
|
testSiteEntry = {
|
||||||
|
|||||||
@@ -21,8 +21,9 @@ import { MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|||||||
import { Component, DebugElement, ViewChild } from '@angular/core';
|
import { Component, DebugElement, ViewChild } from '@angular/core';
|
||||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
||||||
import { NodeDownloadDirective } from './node-download.directive';
|
import { NodeDownloadDirective } from './node-download.directive';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { ContentApi } from '@alfresco/js-api';
|
import { ContentApi } from '@alfresco/js-api';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
standalone: true,
|
standalone: true,
|
||||||
@@ -56,8 +57,12 @@ describe('NodeDownloadDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule, MatDialogModule, TestComponent],
|
imports: [MatDialogModule, TestComponent],
|
||||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
providers: [
|
||||||
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
|
]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
component = fixture.componentInstance;
|
component = fixture.componentInstance;
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import { SimpleChange } from '@angular/core';
|
|||||||
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
|
import { fakeAsync, TestBed, tick } from '@angular/core/testing';
|
||||||
import { NodeFavoriteDirective } from './node-favorite.directive';
|
import { NodeFavoriteDirective } from './node-favorite.directive';
|
||||||
import { AlfrescoApiService, AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock } from '@alfresco/adf-core';
|
import { AlfrescoApiService, AlfrescoApiServiceMock, AppConfigService, AppConfigServiceMock } from '@alfresco/adf-core';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('NodeFavoriteDirective', () => {
|
describe('NodeFavoriteDirective', () => {
|
||||||
let directive: NodeFavoriteDirective;
|
let directive: NodeFavoriteDirective;
|
||||||
@@ -27,10 +28,12 @@ describe('NodeFavoriteDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
{ provide: AppConfigService, useClass: AppConfigServiceMock }
|
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
alfrescoApiService = TestBed.inject(AlfrescoApiService);
|
alfrescoApiService = TestBed.inject(AlfrescoApiService);
|
||||||
|
|||||||
@@ -20,8 +20,9 @@ import { LockService } from './lock.service';
|
|||||||
import { AuthenticationService, RedirectAuthService } from '@alfresco/adf-core';
|
import { AuthenticationService, RedirectAuthService } from '@alfresco/adf-core';
|
||||||
import { Node } from '@alfresco/js-api';
|
import { Node } from '@alfresco/js-api';
|
||||||
import { addDays, subDays } from 'date-fns';
|
import { addDays, subDays } from 'date-fns';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { EMPTY, of } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('LockService', () => {
|
describe('LockService', () => {
|
||||||
let service: LockService;
|
let service: LockService;
|
||||||
@@ -33,8 +34,12 @@ describe('LockService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }]
|
providers: [
|
||||||
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
|
]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(LockService);
|
service = TestBed.inject(LockService);
|
||||||
authenticationService = TestBed.inject(AuthenticationService);
|
authenticationService = TestBed.inject(AuthenticationService);
|
||||||
|
|||||||
@@ -19,8 +19,9 @@ import { TestBed } from '@angular/core/testing';
|
|||||||
import { AlfrescoApiService, AlfrescoApiServiceMock, CommentModel, RedirectAuthService } from '@alfresco/adf-core';
|
import { AlfrescoApiService, AlfrescoApiServiceMock, CommentModel, RedirectAuthService } from '@alfresco/adf-core';
|
||||||
import { fakeContentComment, fakeContentComments } from '../mocks/node-comments.mock';
|
import { fakeContentComment, fakeContentComments } from '../mocks/node-comments.mock';
|
||||||
import { NodeCommentsService } from './node-comments.service';
|
import { NodeCommentsService } from './node-comments.service';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { EMPTY, of } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
declare let jasmine: any;
|
declare let jasmine: any;
|
||||||
|
|
||||||
@@ -29,10 +30,12 @@ describe('NodeCommentsService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(NodeCommentsService);
|
service = TestBed.inject(NodeCommentsService);
|
||||||
|
|||||||
@@ -19,15 +19,16 @@ import { TestBed } from '@angular/core/testing';
|
|||||||
import { mockError, fakeSearch } from '../mocks/search.service.mock';
|
import { mockError, fakeSearch } from '../mocks/search.service.mock';
|
||||||
import { SearchService } from './search.service';
|
import { SearchService } from './search.service';
|
||||||
import { NodePaging } from '@alfresco/js-api';
|
import { NodePaging } from '@alfresco/js-api';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('SearchService', () => {
|
describe('SearchService', () => {
|
||||||
let service: SearchService;
|
let service: SearchService;
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [SearchService]
|
providers: [SearchService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(SearchService);
|
service = TestBed.inject(SearchService);
|
||||||
});
|
});
|
||||||
|
|||||||
+8
-3
@@ -23,8 +23,9 @@ import { VersionCompatibilityService } from './version-compatibility.service';
|
|||||||
import { VersionInfo } from '@alfresco/js-api';
|
import { VersionInfo } from '@alfresco/js-api';
|
||||||
import { RedirectAuthService } from '@alfresco/adf-core';
|
import { RedirectAuthService } from '@alfresco/adf-core';
|
||||||
import { EMPTY, of } from 'rxjs';
|
import { EMPTY, of } from 'rxjs';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { VersionCompatibilityDirective } from '@alfresco/adf-content-services';
|
import { VersionCompatibilityDirective } from '@alfresco/adf-content-services';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
template: `
|
template: `
|
||||||
@@ -51,9 +52,13 @@ describe('VersionCompatibilityDirective', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [VersionCompatibilityDirective, HttpClientTestingModule],
|
|
||||||
declarations: [TestComponent],
|
declarations: [TestComponent],
|
||||||
providers: [{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } }]
|
imports: [VersionCompatibilityDirective],
|
||||||
|
providers: [
|
||||||
|
{ provide: RedirectAuthService, useValue: { onLogin: EMPTY, onTokenReceived: of() } },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
|
]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(TestComponent);
|
fixture = TestBed.createComponent(TestComponent);
|
||||||
versionCompatibilityService = TestBed.inject(VersionCompatibilityService);
|
versionCompatibilityService = TestBed.inject(VersionCompatibilityService);
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
"@typescript-eslint/consistent-type-assertions": "warn",
|
"@typescript-eslint/consistent-type-assertions": "warn",
|
||||||
"@typescript-eslint/prefer-for-of": "off",
|
"@typescript-eslint/prefer-for-of": "off",
|
||||||
"@typescript-eslint/member-ordering": "off",
|
"@typescript-eslint/member-ordering": "off",
|
||||||
|
"@typescript-eslint/no-empty-function": "off",
|
||||||
"no-underscore-dangle": [
|
"no-underscore-dangle": [
|
||||||
"error",
|
"error",
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,4 +3,4 @@ const rootPreview = require('../../../.storybook/preview');
|
|||||||
export const parameters = {
|
export const parameters = {
|
||||||
...rootPreview.preview
|
...rootPreview.preview
|
||||||
};
|
};
|
||||||
export const tags = ['autodocs'];
|
export const tags = ['autodocs', 'autodocs'];
|
||||||
|
|||||||
@@ -16,8 +16,8 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { Emitters, RequestOptions, ResultListDataRepresentationTaskRepresentation, SecurityOptions } from '@alfresco/js-api';
|
import { Emitters, RequestOptions, ResultListDataRepresentationTaskRepresentation, SecurityOptions } from '@alfresco/js-api';
|
||||||
import { HttpParams } from '@angular/common/http';
|
import { HttpParams, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
|
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { AdfHttpClient } from './adf-http-client.service';
|
import { AdfHttpClient } from './adf-http-client.service';
|
||||||
import { AlfrescoApiResponseError } from './alfresco-api/alfresco-api.response-error';
|
import { AlfrescoApiResponseError } from './alfresco-api/alfresco-api.response-error';
|
||||||
@@ -58,8 +58,8 @@ describe('AdfHttpClient', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [AdfHttpClient]
|
providers: [AdfHttpClient, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
});
|
});
|
||||||
angularHttpClient = TestBed.inject(AdfHttpClient);
|
angularHttpClient = TestBed.inject(AdfHttpClient);
|
||||||
controller = TestBed.inject(HttpTestingController);
|
controller = TestBed.inject(HttpTestingController);
|
||||||
|
|||||||
@@ -17,15 +17,7 @@
|
|||||||
|
|
||||||
import { SHOULD_ADD_AUTH_TOKEN } from '@alfresco/adf-core/auth';
|
import { SHOULD_ADD_AUTH_TOKEN } from '@alfresco/adf-core/auth';
|
||||||
import { Emitters as JsApiEmitters, HttpClient as JsApiHttpClient } from '@alfresco/js-api';
|
import { Emitters as JsApiEmitters, HttpClient as JsApiHttpClient } from '@alfresco/js-api';
|
||||||
import {
|
import { HttpClient, HttpContext, HttpErrorResponse, HttpEvent, HttpHeaders, HttpParams, HttpResponse } from '@angular/common/http';
|
||||||
HttpClient,
|
|
||||||
HttpContext,
|
|
||||||
HttpErrorResponse,
|
|
||||||
HttpEvent,
|
|
||||||
HttpHeaders,
|
|
||||||
HttpParams,
|
|
||||||
HttpResponse
|
|
||||||
} from '@angular/common/http';
|
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import { Observable, of, Subject, throwError } from 'rxjs';
|
import { Observable, of, Subject, throwError } from 'rxjs';
|
||||||
import { catchError, map, takeUntil } from 'rxjs/operators';
|
import { catchError, map, takeUntil } from 'rxjs/operators';
|
||||||
@@ -52,8 +44,7 @@ export interface Emitters {
|
|||||||
@Injectable({
|
@Injectable({
|
||||||
providedIn: 'root'
|
providedIn: 'root'
|
||||||
})
|
})
|
||||||
export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
export class AdfHttpClient implements ee.Emitter, JsApiHttpClient {
|
||||||
|
|
||||||
on: ee.EmitterMethod;
|
on: ee.EmitterMethod;
|
||||||
off: ee.EmitterMethod;
|
off: ee.EmitterMethod;
|
||||||
once: ee.EmitterMethod;
|
once: ee.EmitterMethod;
|
||||||
@@ -107,47 +98,43 @@ export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
|||||||
const params = getQueryParamsWithCustomEncoder(options.queryParams, new AlfrescoApiParamEncoder());
|
const params = getQueryParamsWithCustomEncoder(options.queryParams, new AlfrescoApiParamEncoder());
|
||||||
const responseType = AdfHttpClient.getResponseType(options);
|
const responseType = AdfHttpClient.getResponseType(options);
|
||||||
const context = new HttpContext().set(SHOULD_ADD_AUTH_TOKEN, true);
|
const context = new HttpContext().set(SHOULD_ADD_AUTH_TOKEN, true);
|
||||||
const security: SecurityOptions = {...this.defaultSecurityOptions, ...sc};
|
const security: SecurityOptions = { ...this.defaultSecurityOptions, ...sc };
|
||||||
const headers = this.getHeaders(options);
|
const headers = this.getHeaders(options);
|
||||||
if (!emitters) {
|
if (!emitters) {
|
||||||
emitters = this.getEventEmitters();
|
emitters = this.getEventEmitters();
|
||||||
}
|
}
|
||||||
|
|
||||||
const request = this.httpClient.request(
|
const request = this.httpClient.request(options.httpMethod, url, {
|
||||||
options.httpMethod,
|
context,
|
||||||
url,
|
...(body && { body }),
|
||||||
{
|
...(responseType && { responseType }),
|
||||||
context,
|
...security,
|
||||||
...(body && {body}),
|
...(params && { params }),
|
||||||
...(responseType && {responseType}),
|
headers,
|
||||||
...security,
|
observe: 'events',
|
||||||
...(params && {params}),
|
reportProgress: true
|
||||||
headers,
|
});
|
||||||
observe: 'events',
|
|
||||||
reportProgress: true
|
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
return this.requestWithLegacyEventEmitters<T>(request, emitters, options.returnType);
|
return this.requestWithLegacyEventEmitters<T>(request, emitters, options.returnType);
|
||||||
}
|
}
|
||||||
|
|
||||||
post<T = any>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T> {
|
post<T = any>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T> {
|
||||||
return this.request<T>(url, {...options, httpMethod: 'POST'}, sc, emitters);
|
return this.request<T>(url, { ...options, httpMethod: 'POST' }, sc, emitters);
|
||||||
}
|
}
|
||||||
|
|
||||||
put<T = any>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T> {
|
put<T = any>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T> {
|
||||||
return this.request<T>(url, {...options, httpMethod: 'PUT'}, sc, emitters);
|
return this.request<T>(url, { ...options, httpMethod: 'PUT' }, sc, emitters);
|
||||||
}
|
}
|
||||||
|
|
||||||
get<T = any>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T> {
|
get<T = any>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T> {
|
||||||
return this.request<T>(url, {...options, httpMethod: 'GET'}, sc, emitters);
|
return this.request<T>(url, { ...options, httpMethod: 'GET' }, sc, emitters);
|
||||||
}
|
}
|
||||||
|
|
||||||
delete<T = void>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T> {
|
delete<T = void>(url: string, options?: RequestOptions, sc?: SecurityOptions, emitters?: JsApiEmitters): Promise<T> {
|
||||||
return this.request<T>(url, {...options, httpMethod: 'DELETE'}, sc, emitters);
|
return this.request<T>(url, { ...options, httpMethod: 'DELETE' }, sc, emitters);
|
||||||
}
|
}
|
||||||
|
|
||||||
private addPromiseListeners<T = any>(promise: Promise<T>, eventEmitter: any) {
|
private addPromiseListeners<T = any>(promise: Promise<T>, eventEmitter: any) {
|
||||||
const eventPromise = Object.assign(promise, {
|
const eventPromise = Object.assign(promise, {
|
||||||
on() {
|
on() {
|
||||||
// eslint-disable-next-line prefer-spread, prefer-rest-params
|
// eslint-disable-next-line prefer-spread, prefer-rest-params
|
||||||
@@ -189,58 +176,59 @@ export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private requestWithLegacyEventEmitters<T = any>(request$: Observable<HttpEvent<T>>, emitters: JsApiEmitters, returnType: any): Promise<T> {
|
private requestWithLegacyEventEmitters<T = any>(request$: Observable<HttpEvent<T>>, emitters: JsApiEmitters, returnType: any): Promise<T> {
|
||||||
|
|
||||||
const abort$ = new Subject<void>();
|
const abort$ = new Subject<void>();
|
||||||
const {eventEmitter, apiClientEmitter} = emitters;
|
const { eventEmitter, apiClientEmitter } = emitters;
|
||||||
|
|
||||||
const promise = request$.pipe(
|
const promise = request$
|
||||||
map((res) => {
|
.pipe(
|
||||||
if (isHttpUploadProgressEvent(res)) {
|
map((res) => {
|
||||||
const percent = Math.round((res.loaded / res.total) * 100);
|
if (isHttpUploadProgressEvent(res)) {
|
||||||
eventEmitter.emit('progress', {loaded: res.loaded, total: res.total, percent});
|
const percent = Math.round((res.loaded / res.total) * 100);
|
||||||
}
|
eventEmitter.emit('progress', { loaded: res.loaded, total: res.total, percent });
|
||||||
|
}
|
||||||
|
|
||||||
if (isHttpResponseEvent(res)) {
|
if (isHttpResponseEvent(res)) {
|
||||||
eventEmitter.emit('success', res.body);
|
eventEmitter.emit('success', res.body);
|
||||||
return AdfHttpClient.deserialize(res, returnType);
|
return AdfHttpClient.deserialize(res, returnType);
|
||||||
}
|
}
|
||||||
}),
|
}),
|
||||||
catchError((err: HttpErrorResponse): Observable<AlfrescoApiResponseError> => {
|
catchError((err: HttpErrorResponse): Observable<AlfrescoApiResponseError> => {
|
||||||
|
// since we can't always determinate ahead of time if the response is going to be xml or plain text response
|
||||||
|
// we need to handle false positive cases here.
|
||||||
|
|
||||||
// since we can't always determinate ahead of time if the response is going to be xml or plain text response
|
if (err.status === 200) {
|
||||||
// we need to handle false positive cases here.
|
eventEmitter.emit('success', err.error.text);
|
||||||
|
return of(err.error.text);
|
||||||
|
}
|
||||||
|
|
||||||
if (err.status === 200) {
|
eventEmitter.emit('error', err);
|
||||||
eventEmitter.emit('success', err.error.text);
|
apiClientEmitter.emit('error', { ...err, response: { req: err } });
|
||||||
return of(err.error.text);
|
|
||||||
}
|
|
||||||
|
|
||||||
eventEmitter.emit('error', err);
|
if (err.status === 401) {
|
||||||
apiClientEmitter.emit('error', { ...err, response: { req: err } });
|
eventEmitter.emit('unauthorized');
|
||||||
|
apiClientEmitter.emit('unauthorized');
|
||||||
|
}
|
||||||
|
|
||||||
if (err.status === 401) {
|
// for backwards compatibility we need to convert it to error class as the HttpErrorResponse only implements Error interface, not extending it,
|
||||||
eventEmitter.emit('unauthorized');
|
// and we need to be able to correctly pass instanceof Error conditions used inside repository
|
||||||
apiClientEmitter.emit('unauthorized');
|
// we also need to pass error as Stringify string as we are detecting statusCodes using JSON.parse(error.message) in some places
|
||||||
}
|
const msg = typeof err.error === 'string' ? err.error : JSON.stringify(err.error);
|
||||||
|
|
||||||
// for backwards compatibility we need to convert it to error class as the HttpErrorResponse only implements Error interface, not extending it,
|
// for backwards compatibility to handle cases in code where we try read response.error.response.body;
|
||||||
// and we need to be able to correctly pass instanceof Error conditions used inside repository
|
|
||||||
// we also need to pass error as Stringify string as we are detecting statusCodes using JSON.parse(error.message) in some places
|
|
||||||
const msg = typeof err.error === 'string' ? err.error : JSON.stringify(err.error);
|
|
||||||
|
|
||||||
// for backwards compatibility to handle cases in code where we try read response.error.response.body;
|
const error = {
|
||||||
|
...err,
|
||||||
|
body: err.error
|
||||||
|
};
|
||||||
|
|
||||||
const error = {
|
const alfrescoApiError = new AlfrescoApiResponseError(msg, err.status, error);
|
||||||
...err, body: err.error
|
return throwError(alfrescoApiError);
|
||||||
};
|
}),
|
||||||
|
takeUntil(abort$)
|
||||||
|
)
|
||||||
|
.toPromise();
|
||||||
|
|
||||||
const alfrescoApiError = new AlfrescoApiResponseError(msg, err.status, error);
|
(promise as any).abort = function () {
|
||||||
return throwError(alfrescoApiError);
|
|
||||||
}),
|
|
||||||
takeUntil(abort$)
|
|
||||||
).toPromise();
|
|
||||||
|
|
||||||
(promise as any).abort = function() {
|
|
||||||
eventEmitter.emit('abort');
|
eventEmitter.emit('abort');
|
||||||
abort$.next();
|
abort$.next();
|
||||||
abort$.complete();
|
abort$.complete();
|
||||||
@@ -261,7 +249,7 @@ export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (isFormUrlEncoded) {
|
if (isFormUrlEncoded) {
|
||||||
return new HttpParams({fromObject: removeNilValues(options.formParams)});
|
return new HttpParams({ fromObject: removeNilValues(options.formParams) });
|
||||||
}
|
}
|
||||||
|
|
||||||
return body;
|
return body;
|
||||||
@@ -273,8 +261,8 @@ export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
|||||||
|
|
||||||
const optionsHeaders = {
|
const optionsHeaders = {
|
||||||
...options.headerParams,
|
...options.headerParams,
|
||||||
...(accept && {Accept: accept}),
|
...(accept && { Accept: accept }),
|
||||||
...((contentType) && {'Content-Type': contentType})
|
...(contentType && { 'Content-Type': contentType })
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!this.disableCsrf) {
|
if (!this.disableCsrf) {
|
||||||
@@ -319,7 +307,6 @@ export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
|||||||
return Boolean(contentType?.match(/^application\/json(;.*)?$/i));
|
return Boolean(contentType?.match(/^application\/json(;.*)?$/i));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private setCsrfToken(optionsHeaders: any) {
|
private setCsrfToken(optionsHeaders: any) {
|
||||||
const token = this.createCSRFToken();
|
const token = this.createCSRFToken();
|
||||||
optionsHeaders['X-CSRF-TOKEN'] = token;
|
optionsHeaders['X-CSRF-TOKEN'] = token;
|
||||||
@@ -337,7 +324,6 @@ export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static getResponseType(options: RequestOptions): 'blob' | 'json' | 'text' {
|
private static getResponseType(options: RequestOptions): 'blob' | 'json' | 'text' {
|
||||||
|
|
||||||
const isBlobType = options.returnType?.toString().toLowerCase() === 'blob' || options.responseType?.toString().toLowerCase() === 'blob';
|
const isBlobType = options.returnType?.toString().toLowerCase() === 'blob' || options.responseType?.toString().toLowerCase() === 'blob';
|
||||||
|
|
||||||
if (isBlobType) {
|
if (isBlobType) {
|
||||||
@@ -359,7 +345,6 @@ export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
|||||||
* @returns deserialized object
|
* @returns deserialized object
|
||||||
*/
|
*/
|
||||||
private static deserialize<T>(response: HttpResponse<T>, returnType?: Constructor<unknown> | 'blob'): any {
|
private static deserialize<T>(response: HttpResponse<T>, returnType?: Constructor<unknown> | 'blob'): any {
|
||||||
|
|
||||||
if (response === null) {
|
if (response === null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -390,9 +375,7 @@ export class AdfHttpClient implements ee.Emitter,JsApiHttpClient {
|
|||||||
return new returnType(body);
|
return new returnType(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private static deserializeBlobResponse(response: HttpResponse<Blob>) {
|
private static deserializeBlobResponse(response: HttpResponse<Blob>) {
|
||||||
return new Blob([response.body], {type: response.headers.get('Content-Type')});
|
return new Blob([response.body], { type: response.headers.get('Content-Type') });
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -36,42 +36,37 @@ export const SHOULD_ADD_AUTH_TOKEN = new HttpContextToken<boolean>(() => false);
|
|||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class AuthenticationInterceptor implements HttpInterceptor {
|
export class AuthenticationInterceptor implements HttpInterceptor {
|
||||||
|
constructor(private authService: Authentication) {}
|
||||||
|
|
||||||
constructor( private authService: Authentication) { }
|
intercept(
|
||||||
|
req: HttpRequest<any>,
|
||||||
|
next: HttpHandler
|
||||||
|
): Observable<HttpSentEvent | HttpHeaderResponse | HttpProgressEvent | HttpResponse<any> | HttpUserEvent<any>> {
|
||||||
|
if (req.context.get(SHOULD_ADD_AUTH_TOKEN)) {
|
||||||
|
return this.authService.addTokenToHeader(req.url, req.headers).pipe(
|
||||||
|
mergeMap((headersWithBearer) => {
|
||||||
|
const headerWithContentType = this.appendJsonContentType(headersWithBearer);
|
||||||
|
const kcReq = req.clone({ headers: headerWithContentType });
|
||||||
|
return next.handle(kcReq).pipe(catchError((error) => observableThrowError(error)));
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
intercept(req: HttpRequest<any>, next: HttpHandler):
|
return next.handle(req).pipe(catchError((error) => observableThrowError(error)));
|
||||||
Observable<HttpSentEvent | HttpHeaderResponse | HttpProgressEvent | HttpResponse<any> | HttpUserEvent<any>> {
|
|
||||||
|
|
||||||
if (req.context.get(SHOULD_ADD_AUTH_TOKEN)) {
|
|
||||||
return this.authService.addTokenToHeader(req.url, req.headers).pipe(
|
|
||||||
mergeMap((headersWithBearer) => {
|
|
||||||
const headerWithContentType = this.appendJsonContentType(headersWithBearer);
|
|
||||||
const kcReq = req.clone({ headers: headerWithContentType});
|
|
||||||
return next.handle(kcReq)
|
|
||||||
.pipe(
|
|
||||||
catchError((error) => observableThrowError(error))
|
|
||||||
);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return next.handle(req).pipe(catchError((error) => observableThrowError(error)));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private appendJsonContentType(headers: HttpHeaders): HttpHeaders {
|
private appendJsonContentType(headers: HttpHeaders): HttpHeaders {
|
||||||
|
// prevent adding any content type, to properly handle formData with boundary browser generated value,
|
||||||
|
// as adding any Content-Type its going to break the upload functionality
|
||||||
|
|
||||||
// prevent adding any content type, to properly handle formData with boundary browser generated value,
|
if (headers.get('Content-Type') === 'multipart/form-data') {
|
||||||
// as adding any Content-Type its going to break the upload functionality
|
return headers.delete('Content-Type');
|
||||||
|
}
|
||||||
|
|
||||||
if (headers.get('Content-Type') === 'multipart/form-data') {
|
if (!headers.get('Content-Type')) {
|
||||||
return headers.delete('Content-Type');
|
return headers.set('Content-Type', 'application/json;charset=UTF-8');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!headers.get('Content-Type')) {
|
return headers;
|
||||||
return headers.set('Content-Type', 'application/json;charset=UTF-8');
|
|
||||||
}
|
|
||||||
|
|
||||||
return headers;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,15 +2,15 @@
|
|||||||
@use '@angular/material' as mat;
|
@use '@angular/material' as mat;
|
||||||
|
|
||||||
@mixin adf-breadcrumb-theme($theme) {
|
@mixin adf-breadcrumb-theme($theme) {
|
||||||
$config: mat.get-color-config($theme);
|
$config: mat.m2-get-color-config($theme);
|
||||||
$foreground-palette: map.get($config, foreground);
|
$foreground-palette: map.get($config, foreground);
|
||||||
$primary-palette: map.get($config, primary);
|
$primary-palette: map.get($config, primary);
|
||||||
$text-color: mat.get-color-from-palette($foreground-palette, text);
|
$text-color: mat.m2-get-color-from-palette($foreground-palette, text);
|
||||||
$primary: mat.get-color-from-palette($primary-palette, text);
|
$primary: mat.m2-get-color-from-palette($primary-palette, text);
|
||||||
|
|
||||||
adf-breadcrumb {
|
adf-breadcrumb {
|
||||||
.adf-breadcrumb__show-all-button-icon--rotate {
|
.adf-breadcrumb__show-all-button-icon--rotate {
|
||||||
color: mat.get-color-from-palette($primary-palette, 500);
|
color: mat.m2-get-color-from-palette($primary-palette, 500);
|
||||||
}
|
}
|
||||||
|
|
||||||
.adf-breadcrumb__item-wrapper {
|
.adf-breadcrumb__item-wrapper {
|
||||||
|
|||||||
@@ -1,31 +1,27 @@
|
|||||||
@use '@angular/material' as mat;
|
@use '@angular/material' as mat;
|
||||||
@import './default-colors.scss';
|
@import './default-colors';
|
||||||
@import './custom-palette-creator.scss';
|
@import './custom-palette-creator';
|
||||||
|
|
||||||
@function get-mat-palettes($primary-color, $accent-color) {
|
@function get-mat-palettes($primary-color, $accent-color) {
|
||||||
$mat-primary-palette: null;
|
$mat-primary-palette: null;
|
||||||
|
|
||||||
@if ($primary-color) {
|
@if ($primary-color) {
|
||||||
$custom-theme-primary-palette: create-color-palette($primary-color, 'primary');
|
$custom-theme-primary-palette: create-color-palette($primary-color, 'primary');
|
||||||
$mat-primary-palette: mat.define-palette($custom-theme-primary-palette, 500);
|
$mat-primary-palette: mat.m2-define-palette($custom-theme-primary-palette, 500);
|
||||||
} @else {
|
} @else {
|
||||||
$mat-primary-palette: mat.define-palette($default-primary, A100);
|
$mat-primary-palette: mat.m2-define-palette($default-primary, A100);
|
||||||
}
|
}
|
||||||
|
|
||||||
$mat-accent-palette: null;
|
$mat-accent-palette: null;
|
||||||
|
|
||||||
@if ($accent-color) {
|
@if ($accent-color) {
|
||||||
$custom-theme-accent-palette: create-color-palette($accent-color, 'accent');
|
$custom-theme-accent-palette: create-color-palette($accent-color, 'accent');
|
||||||
$mat-accent-palette: mat.define-palette($custom-theme-accent-palette, 500);
|
$mat-accent-palette: mat.m2-define-palette($custom-theme-accent-palette, 500);
|
||||||
} @else {
|
} @else {
|
||||||
$mat-accent-palette: mat.define-palette($default-accent);
|
$mat-accent-palette: mat.m2-define-palette($default-accent);
|
||||||
}
|
}
|
||||||
|
|
||||||
$mat-warn-palette: mat.define-palette($default-warn, A100);
|
$mat-warn-palette: mat.m2-define-palette($default-warn, A100);
|
||||||
|
|
||||||
@return (
|
@return (primary: $mat-primary-palette, accent: $mat-accent-palette, warning: $mat-warn-palette);
|
||||||
primary: $mat-primary-palette,
|
|
||||||
accent: $mat-accent-palette,
|
|
||||||
warning: $mat-warn-palette,
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -21,6 +21,6 @@
|
|||||||
|
|
||||||
@use '@angular/material' as mat;
|
@use '@angular/material' as mat;
|
||||||
|
|
||||||
$default-primary: mat.$indigo-palette;
|
$default-primary: mat.$m2-indigo-palette;
|
||||||
$default-accent: mat.$pink-palette;
|
$default-accent: mat.$m2-pink-palette;
|
||||||
$default-warn: mat.$red-palette;
|
$default-warn: mat.$m2-red-palette;
|
||||||
|
|||||||
@@ -3,37 +3,37 @@
|
|||||||
@import '../variables/font-family';
|
@import '../variables/font-family';
|
||||||
|
|
||||||
@function get-mat-typography($base-font-size, $font-family) {
|
@function get-mat-typography($base-font-size, $font-family) {
|
||||||
$custom-typography: mat.define-typography-config(
|
$custom-typography: mat.m2-define-typography-config(
|
||||||
$font-family: 'Muli, Roboto, "Helvetica Neue", sans-serif',
|
$font-family: 'Muli, Roboto, "Helvetica Neue", sans-serif',
|
||||||
$headline-1: mat.define-typography-level(112px, 112px, 300),
|
$headline-1: mat.m2-define-typography-level(112px, 112px, 300),
|
||||||
$headline-2: mat.define-typography-level(56px, 56px, 400),
|
$headline-2: mat.m2-define-typography-level(56px, 56px, 400),
|
||||||
$headline-3: mat.define-typography-level(45px, 48px, 400),
|
$headline-3: mat.m2-define-typography-level(45px, 48px, 400),
|
||||||
$headline-4: mat.define-typography-level(34px, 40px, 400),
|
$headline-4: mat.m2-define-typography-level(34px, 40px, 400),
|
||||||
$headline-5: mat.define-typography-level(24px, 32px, 400),
|
$headline-5: mat.m2-define-typography-level(24px, 32px, 400),
|
||||||
$headline-6: mat.define-typography-level(20px, 32px, 500),
|
$headline-6: mat.m2-define-typography-level(20px, 32px, 500),
|
||||||
$subtitle-1: mat.define-typography-level(16px, 28px, 400),
|
$subtitle-1: mat.m2-define-typography-level(16px, 28px, 400),
|
||||||
$body-1: mat.define-typography-level(15px, 24px, 400),
|
$body-1: mat.m2-define-typography-level(15px, 24px, 400),
|
||||||
$subtitle-2: mat.define-typography-level(14px, 24px, 500),
|
$subtitle-2: mat.m2-define-typography-level(14px, 24px, 500),
|
||||||
$body-2: mat.define-typography-level(14px, 20px, 400),
|
$body-2: mat.m2-define-typography-level(14px, 20px, 400),
|
||||||
$caption: mat.define-typography-level(12px, 20px, 400),
|
$caption: mat.m2-define-typography-level(12px, 20px, 400),
|
||||||
$button: mat.define-typography-level(14px, 14px, 500),
|
$button: mat.m2-define-typography-level(14px, 14px, 500),
|
||||||
// Line-height must be unit-less fraction of the font-size.
|
// Line-height must be unit-less fraction of the font-size.
|
||||||
);
|
);
|
||||||
|
|
||||||
@if $base-font-size {
|
@if $base-font-size {
|
||||||
$custom-typography: mat.define-typography-config(
|
$custom-typography: mat.m2-define-typography-config(
|
||||||
$headline-1: mat.define-typography-level(8rem, 8rem, 300),
|
$headline-1: mat.m2-define-typography-level(8rem, 8rem, 300),
|
||||||
$headline-2: mat.define-typography-level(4rem, 4rem, 400),
|
$headline-2: mat.m2-define-typography-level(4rem, 4rem, 400),
|
||||||
$headline-3: mat.define-typography-level(3.21rem, 3.21rem, 400),
|
$headline-3: mat.m2-define-typography-level(3.21rem, 3.21rem, 400),
|
||||||
$headline-4: mat.define-typography-level(2.42rem, 2.85rem, 400),
|
$headline-4: mat.m2-define-typography-level(2.42rem, 2.85rem, 400),
|
||||||
$headline-5: mat.define-typography-level(1.71rem, 2.28rem, 400),
|
$headline-5: mat.m2-define-typography-level(1.71rem, 2.28rem, 400),
|
||||||
$headline-6: mat.define-typography-level(1.42rem, 2.28rem, 500),
|
$headline-6: mat.m2-define-typography-level(1.42rem, 2.28rem, 500),
|
||||||
$subtitle-1: mat.define-typography-level(1.14rem, 2rem, 400),
|
$subtitle-1: mat.m2-define-typography-level(1.14rem, 2rem, 400),
|
||||||
$body-1: mat.define-typography-level(1.07rem, 1.71rem, 400),
|
$body-1: mat.m2-define-typography-level(1.07rem, 1.71rem, 400),
|
||||||
$subtitle-2: mat.define-typography-level(1rem, 1.71rem, 500),
|
$subtitle-2: mat.m2-define-typography-level(1rem, 1.71rem, 500),
|
||||||
$body-2: mat.define-typography-level(1rem, 1.42rem, 400),
|
$body-2: mat.m2-define-typography-level(1rem, 1.42rem, 400),
|
||||||
$caption: mat.define-typography-level(0.86rem, 1.42rem, 400),
|
$caption: mat.m2-define-typography-level(0.86rem, 1.42rem, 400),
|
||||||
$button: mat.define-typography-level(1rem, 1rem, 500),
|
$button: mat.m2-define-typography-level(1rem, 1rem, 500),
|
||||||
$font-family: $default-font-family
|
$font-family: $default-font-family
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,7 +38,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": [
|
"lintFilePatterns": [
|
||||||
"lib/core/**/*.ts",
|
"lib/core/**/*.ts",
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ import { of, Subject } from 'rxjs';
|
|||||||
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
import { ExtensionsModule } from '@alfresco/adf-extensions';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { ShellAppService, SHELL_APP_SERVICE } from '../../services/shell-app.service';
|
import { ShellAppService, SHELL_APP_SERVICE } from '../../services/shell-app.service';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
import { TranslateModule } from '@ngx-translate/core';
|
import { TranslateModule } from '@ngx-translate/core';
|
||||||
|
|
||||||
@@ -58,10 +58,10 @@ describe('AppLayoutComponent', () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
|
schemas: [NO_ERRORS_SCHEMA],
|
||||||
imports: [
|
imports: [
|
||||||
CommonModule,
|
CommonModule,
|
||||||
NoopAnimationsModule,
|
NoopAnimationsModule,
|
||||||
HttpClientModule,
|
|
||||||
...LAYOUT_DIRECTIVES,
|
...LAYOUT_DIRECTIVES,
|
||||||
ExtensionsModule,
|
ExtensionsModule,
|
||||||
RouterModule.forChild([]),
|
RouterModule.forChild([]),
|
||||||
@@ -76,9 +76,9 @@ describe('AppLayoutComponent', () => {
|
|||||||
{
|
{
|
||||||
provide: SHELL_APP_SERVICE,
|
provide: SHELL_APP_SERVICE,
|
||||||
useValue: shellService
|
useValue: shellService
|
||||||
}
|
},
|
||||||
],
|
provideHttpClient(withInterceptorsFromDi())
|
||||||
schemas: [NO_ERRORS_SCHEMA]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
fixture = TestBed.createComponent(ShellLayoutComponent);
|
fixture = TestBed.createComponent(ShellLayoutComponent);
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { HttpClient, HttpClientModule } from '@angular/common/http';
|
import { HttpClient, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { AppConfigService } from './app-config.service';
|
import { AppConfigService } from './app-config.service';
|
||||||
import { ExtensionConfig, ExtensionService } from '@alfresco/adf-extensions';
|
import { ExtensionConfig, ExtensionService } from '@alfresco/adf-extensions';
|
||||||
@@ -49,8 +49,8 @@ describe('AppConfigService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientModule],
|
imports: [],
|
||||||
providers: [{ provide: ExtensionService, useClass: TestExtensionService }]
|
providers: [{ provide: ExtensionService, useClass: TestExtensionService }, provideHttpClient(withInterceptorsFromDi())]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -18,8 +18,15 @@
|
|||||||
import { throwError as observableThrowError, Observable } from 'rxjs';
|
import { throwError as observableThrowError, Observable } from 'rxjs';
|
||||||
import { Injectable } from '@angular/core';
|
import { Injectable } from '@angular/core';
|
||||||
import {
|
import {
|
||||||
HttpHandler, HttpInterceptor, HttpRequest,
|
HttpHandler,
|
||||||
HttpSentEvent, HttpHeaderResponse, HttpProgressEvent, HttpResponse, HttpUserEvent, HttpHeaders
|
HttpInterceptor,
|
||||||
|
HttpRequest,
|
||||||
|
HttpSentEvent,
|
||||||
|
HttpHeaderResponse,
|
||||||
|
HttpProgressEvent,
|
||||||
|
HttpResponse,
|
||||||
|
HttpUserEvent,
|
||||||
|
HttpHeaders
|
||||||
} from '@angular/common/http';
|
} from '@angular/common/http';
|
||||||
import { catchError, mergeMap } from 'rxjs/operators';
|
import { catchError, mergeMap } from 'rxjs/operators';
|
||||||
import { AuthenticationService } from '../services/authentication.service';
|
import { AuthenticationService } from '../services/authentication.service';
|
||||||
@@ -30,61 +37,52 @@ export class AuthBearerInterceptor implements HttpInterceptor {
|
|||||||
|
|
||||||
private excludedUrlsRegex: RegExp[];
|
private excludedUrlsRegex: RegExp[];
|
||||||
|
|
||||||
constructor(private authenticationService: AuthenticationService) { }
|
constructor(private authenticationService: AuthenticationService) {}
|
||||||
|
|
||||||
private loadExcludedUrlsRegex() {
|
private loadExcludedUrlsRegex() {
|
||||||
const excludedUrls = this.bearerExcludedUrls;
|
const excludedUrls = this.bearerExcludedUrls;
|
||||||
this.excludedUrlsRegex = excludedUrls.map((urlPattern) => new RegExp(`^https?://[^/]+/${urlPattern}`, 'i')) || [];
|
this.excludedUrlsRegex = excludedUrls.map((urlPattern) => new RegExp(`^https?://[^/]+/${urlPattern}`, 'i')) || [];
|
||||||
}
|
|
||||||
|
|
||||||
intercept(req: HttpRequest<any>, next: HttpHandler):
|
|
||||||
Observable<HttpSentEvent | HttpHeaderResponse | HttpProgressEvent | HttpResponse<any> | HttpUserEvent<any>> {
|
|
||||||
|
|
||||||
|
|
||||||
if (!this.excludedUrlsRegex) {
|
|
||||||
this.loadExcludedUrlsRegex();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const requestUrl = req.url;
|
intercept(
|
||||||
const shallPass: boolean = this.excludedUrlsRegex.some((regex) => regex.test(requestUrl));
|
req: HttpRequest<any>,
|
||||||
if (shallPass) {
|
next: HttpHandler
|
||||||
return next.handle(req)
|
): Observable<HttpSentEvent | HttpHeaderResponse | HttpProgressEvent | HttpResponse<any> | HttpUserEvent<any>> {
|
||||||
.pipe(
|
if (!this.excludedUrlsRegex) {
|
||||||
catchError((error) => observableThrowError(error))
|
this.loadExcludedUrlsRegex();
|
||||||
|
}
|
||||||
|
|
||||||
|
const requestUrl = req.url;
|
||||||
|
const shallPass: boolean = this.excludedUrlsRegex.some((regex) => regex.test(requestUrl));
|
||||||
|
if (shallPass) {
|
||||||
|
return next.handle(req).pipe(catchError((error) => observableThrowError(error)));
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.authenticationService.addTokenToHeader(requestUrl, req.headers).pipe(
|
||||||
|
mergeMap((headersWithBearer) => {
|
||||||
|
const headerWithContentType = this.appendJsonContentType(headersWithBearer, req.body);
|
||||||
|
const kcReq = req.clone({ headers: headerWithContentType });
|
||||||
|
return next.handle(kcReq).pipe(catchError((error) => observableThrowError(error)));
|
||||||
|
})
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
return this.authenticationService.addTokenToHeader(requestUrl, req.headers)
|
private appendJsonContentType(headers: HttpHeaders, reqBody: any): HttpHeaders {
|
||||||
.pipe(
|
// prevent adding any content type, to properly handle formData with boundary browser generated value,
|
||||||
mergeMap((headersWithBearer) => {
|
// as adding any Content-Type its going to break the upload functionality
|
||||||
const headerWithContentType = this.appendJsonContentType(headersWithBearer, req.body);
|
|
||||||
const kcReq = req.clone({ headers: headerWithContentType});
|
|
||||||
return next.handle(kcReq)
|
|
||||||
.pipe(
|
|
||||||
catchError((error) => observableThrowError(error))
|
|
||||||
);
|
|
||||||
})
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
private appendJsonContentType(headers: HttpHeaders, reqBody: any): HttpHeaders {
|
if (headers.get('Content-Type') === 'multipart/form-data' && !(reqBody instanceof FormData)) {
|
||||||
|
return headers.delete('Content-Type');
|
||||||
|
}
|
||||||
|
|
||||||
// prevent adding any content type, to properly handle formData with boundary browser generated value,
|
if (!headers.get('Content-Type') && !(reqBody instanceof FormData)) {
|
||||||
// as adding any Content-Type its going to break the upload functionality
|
return headers.set('Content-Type', 'application/json;charset=UTF-8');
|
||||||
|
}
|
||||||
|
|
||||||
if (headers.get('Content-Type') === 'multipart/form-data' && !(reqBody instanceof FormData)) {
|
return headers;
|
||||||
return headers.delete('Content-Type');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!headers.get('Content-Type') && !(reqBody instanceof FormData)) {
|
|
||||||
return headers.set('Content-Type', 'application/json;charset=UTF-8');
|
|
||||||
}
|
|
||||||
|
|
||||||
return headers;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected get bearerExcludedUrls(): readonly string[] {
|
protected get bearerExcludedUrls(): readonly string[] {
|
||||||
return this._bearerExcludedUrls;
|
return this._bearerExcludedUrls;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,13 +15,14 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { EMPTY } from 'rxjs';
|
import { EMPTY } from 'rxjs';
|
||||||
import { AppConfigService } from '../../app-config/app-config.service';
|
import { AppConfigService } from '../../app-config/app-config.service';
|
||||||
import { AUTH_MODULE_CONFIG } from './auth-config';
|
import { AUTH_MODULE_CONFIG } from './auth-config';
|
||||||
import { AuthConfigService } from './auth-config.service';
|
import { AuthConfigService } from './auth-config.service';
|
||||||
import { OauthConfigModel } from '../models/oauth-config.model';
|
import { OauthConfigModel } from '../models/oauth-config.model';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('AuthConfigService', () => {
|
describe('AuthConfigService', () => {
|
||||||
let service: AuthConfigService;
|
let service: AuthConfigService;
|
||||||
@@ -95,8 +96,12 @@ describe('AuthConfigService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [{ provide: AUTH_MODULE_CONFIG, useValue: { useHash: true } }]
|
providers: [
|
||||||
|
{ provide: AUTH_MODULE_CONFIG, useValue: { useHash: true } },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
|
]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(AuthConfigService);
|
service = TestBed.inject(AuthConfigService);
|
||||||
spyOn<any>(service, 'getLocationOrigin').and.returnValue('http://localhost:3000');
|
spyOn<any>(service, 'getLocationOrigin').and.returnValue('http://localhost:3000');
|
||||||
|
|||||||
@@ -15,27 +15,37 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { HttpClientModule, HttpErrorResponse, HttpResponse } from '@angular/common/http';
|
import { HttpErrorResponse, HttpResponse, provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { of, throwError } from 'rxjs';
|
import { of, throwError } from 'rxjs';
|
||||||
import { IdentityRoleResponseModel, IdentityRoleService } from './identity-role.service';
|
import { IdentityRoleResponseModel, IdentityRoleService } from './identity-role.service';
|
||||||
|
|
||||||
export const mockIdentityRole1 = {
|
export const mockIdentityRole1 = {
|
||||||
id: 'mock-id-1', name: 'Mock_Role_1', description: 'Mock desc1', clientRole: true, composite: false
|
id: 'mock-id-1',
|
||||||
|
name: 'Mock_Role_1',
|
||||||
|
description: 'Mock desc1',
|
||||||
|
clientRole: true,
|
||||||
|
composite: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockIdentityRole2 = {
|
export const mockIdentityRole2 = {
|
||||||
id: 'mock-id-2', name: 'Mock_Role_2', description: 'Mock desc2', clientRole: false, composite: true
|
id: 'mock-id-2',
|
||||||
|
name: 'Mock_Role_2',
|
||||||
|
description: 'Mock desc2',
|
||||||
|
clientRole: false,
|
||||||
|
composite: true
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockIdentityRole3 = {
|
export const mockIdentityRole3 = {
|
||||||
id: 'mock-id-3', name: 'Mock_Role_3', description: 'Mock desc3', clientRole: false, composite: false
|
id: 'mock-id-3',
|
||||||
|
name: 'Mock_Role_3',
|
||||||
|
description: 'Mock desc3',
|
||||||
|
clientRole: false,
|
||||||
|
composite: false
|
||||||
};
|
};
|
||||||
|
|
||||||
export const mockIdentityRoles = {
|
export const mockIdentityRoles = {
|
||||||
entries: [
|
entries: [mockIdentityRole1, mockIdentityRole2, mockIdentityRole3],
|
||||||
mockIdentityRole1, mockIdentityRole2, mockIdentityRole3
|
|
||||||
],
|
|
||||||
pagination: {
|
pagination: {
|
||||||
skipCount: 1,
|
skipCount: 1,
|
||||||
maxItems: 5,
|
maxItems: 5,
|
||||||
@@ -50,9 +60,8 @@ describe('IdentityRoleService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [],
|
||||||
HttpClientModule
|
providers: [provideHttpClient(withInterceptorsFromDi())]
|
||||||
]
|
|
||||||
});
|
});
|
||||||
service = TestBed.inject(IdentityRoleService);
|
service = TestBed.inject(IdentityRoleService);
|
||||||
});
|
});
|
||||||
@@ -75,31 +84,29 @@ describe('IdentityRoleService', () => {
|
|||||||
statusText: 'Created'
|
statusText: 'Created'
|
||||||
});
|
});
|
||||||
spyOn(service, 'addRole').and.returnValue(of(response));
|
spyOn(service, 'addRole').and.returnValue(of(response));
|
||||||
service.addRole(mockIdentityRole1).subscribe(
|
service.addRole(mockIdentityRole1).subscribe((res: any) => {
|
||||||
(res: any) => {
|
expect(res).toBeDefined();
|
||||||
expect(res).toBeDefined();
|
expect(res.status).toEqual(201);
|
||||||
expect(res.status).toEqual(201);
|
expect(res.statusText).toEqual('Created');
|
||||||
expect(res.statusText).toEqual('Created');
|
done();
|
||||||
done();
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should not add role if error occurred', () => {
|
it('Should not add role if error occurred', () => {
|
||||||
const errorResponse = new HttpErrorResponse({
|
const errorResponse = new HttpErrorResponse({
|
||||||
error: 'test 404 error',
|
error: 'test 404 error',
|
||||||
status: 404, statusText: 'Not Found'
|
status: 404,
|
||||||
|
statusText: 'Not Found'
|
||||||
});
|
});
|
||||||
spyOn(service, 'addRole').and.returnValue(throwError(errorResponse));
|
spyOn(service, 'addRole').and.returnValue(throwError(errorResponse));
|
||||||
service.addRole(mockIdentityRole1)
|
service.addRole(mockIdentityRole1).subscribe(
|
||||||
.subscribe(
|
() => fail('expected an error'),
|
||||||
() => fail('expected an error'),
|
(error) => {
|
||||||
(error) => {
|
expect(error.status).toEqual(404);
|
||||||
expect(error.status).toEqual(404);
|
expect(error.statusText).toEqual('Not Found');
|
||||||
expect(error.statusText).toEqual('Not Found');
|
expect(error.error).toEqual('test 404 error');
|
||||||
expect(error.error).toEqual('test 404 error');
|
}
|
||||||
}
|
);
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should be able to delete role', (done) => {
|
it('should be able to delete role', (done) => {
|
||||||
@@ -109,30 +116,28 @@ describe('IdentityRoleService', () => {
|
|||||||
statusText: 'No Content'
|
statusText: 'No Content'
|
||||||
});
|
});
|
||||||
spyOn(service, 'deleteRole').and.returnValue(of(response));
|
spyOn(service, 'deleteRole').and.returnValue(of(response));
|
||||||
service.deleteRole(mockIdentityRole1).subscribe(
|
service.deleteRole(mockIdentityRole1).subscribe((res: any) => {
|
||||||
(res: any) => {
|
expect(res).toBeDefined();
|
||||||
expect(res).toBeDefined();
|
expect(res.status).toEqual(204);
|
||||||
expect(res.status).toEqual(204);
|
expect(res.statusText).toEqual('No Content');
|
||||||
expect(res.statusText).toEqual('No Content');
|
done();
|
||||||
done();
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
it('Should not delete role if error occurred', () => {
|
it('Should not delete role if error occurred', () => {
|
||||||
const errorResponse = new HttpErrorResponse({
|
const errorResponse = new HttpErrorResponse({
|
||||||
error: 'test 404 error',
|
error: 'test 404 error',
|
||||||
status: 404, statusText: 'Not Found'
|
status: 404,
|
||||||
|
statusText: 'Not Found'
|
||||||
});
|
});
|
||||||
spyOn(service, 'deleteRole').and.returnValue(throwError(errorResponse));
|
spyOn(service, 'deleteRole').and.returnValue(throwError(errorResponse));
|
||||||
service.deleteRole(mockIdentityRole1)
|
service.deleteRole(mockIdentityRole1).subscribe(
|
||||||
.subscribe(
|
() => fail('expected an error'),
|
||||||
() => fail('expected an error'),
|
(error) => {
|
||||||
(error) => {
|
expect(error.status).toEqual(404);
|
||||||
expect(error.status).toEqual(404);
|
expect(error.statusText).toEqual('Not Found');
|
||||||
expect(error.statusText).toEqual('Not Found');
|
expect(error.error).toEqual('test 404 error');
|
||||||
expect(error.error).toEqual('test 404 error');
|
}
|
||||||
}
|
);
|
||||||
);
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -19,7 +19,8 @@ import { TestBed } from '@angular/core/testing';
|
|||||||
import { UserAccessService } from './user-access.service';
|
import { UserAccessService } from './user-access.service';
|
||||||
import { JwtHelperService } from './jwt-helper.service';
|
import { JwtHelperService } from './jwt-helper.service';
|
||||||
import { AppConfigService } from '../../app-config';
|
import { AppConfigService } from '../../app-config';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('UserAccessService', () => {
|
describe('UserAccessService', () => {
|
||||||
let userAccessService: UserAccessService;
|
let userAccessService: UserAccessService;
|
||||||
@@ -28,8 +29,8 @@ describe('UserAccessService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [UserAccessService]
|
providers: [UserAccessService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
});
|
});
|
||||||
userAccessService = TestBed.inject(UserAccessService);
|
userAccessService = TestBed.inject(UserAccessService);
|
||||||
jwtHelperService = TestBed.inject(JwtHelperService);
|
jwtHelperService = TestBed.inject(JwtHelperService);
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
/* eslint-disable no-console */
|
/* eslint-disable no-console */
|
||||||
|
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { Component } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
||||||
import { AppConfigService } from '../../app-config/app-config.service';
|
import { AppConfigService } from '../../app-config/app-config.service';
|
||||||
@@ -61,9 +61,9 @@ describe('LogService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientModule],
|
|
||||||
declarations: [ProvidesLogComponent],
|
declarations: [ProvidesLogComponent],
|
||||||
providers: [LogService, AppConfigService]
|
imports: [],
|
||||||
|
providers: [LogService, AppConfigService, provideHttpClient(withInterceptorsFromDi())]
|
||||||
});
|
});
|
||||||
appConfigService = TestBed.inject(AppConfigService);
|
appConfigService = TestBed.inject(AppConfigService);
|
||||||
providesLogComponent = TestBed.createComponent(ProvidesLogComponent);
|
providesLogComponent = TestBed.createComponent(ProvidesLogComponent);
|
||||||
@@ -166,11 +166,9 @@ describe('LogService', () => {
|
|||||||
it('message Observable', fakeAsync(() => {
|
it('message Observable', fakeAsync(() => {
|
||||||
appConfigService.config['logLevel'] = 'trace';
|
appConfigService.config['logLevel'] = 'trace';
|
||||||
|
|
||||||
providesLogComponent.componentInstance.logService.onMessage.subscribe(
|
providesLogComponent.componentInstance.logService.onMessage.subscribe((message) => {
|
||||||
(message) => {
|
expect(message).toEqual({ text: 'Test message', type: 'LOG' });
|
||||||
expect(message).toEqual({ text: 'Test message', type: 'LOG' });
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
|
|
||||||
providesLogComponent.componentInstance.log();
|
providesLogComponent.componentInstance.log();
|
||||||
}));
|
}));
|
||||||
|
|||||||
@@ -44,7 +44,7 @@ import { DirectionalityConfigService } from './common/services/directionality-co
|
|||||||
import { SEARCH_TEXT_INPUT_DIRECTIVES } from './search-text/search-text-input.module';
|
import { SEARCH_TEXT_INPUT_DIRECTIVES } from './search-text/search-text-input.module';
|
||||||
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
||||||
import { AuthenticationInterceptor, Authentication } from '@alfresco/adf-core/auth';
|
import { AuthenticationInterceptor, Authentication } from '@alfresco/adf-core/auth';
|
||||||
import { HttpClientModule, HttpClientXsrfModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
import { HTTP_INTERCEPTORS, provideHttpClient, withInterceptorsFromDi, withXsrfConfiguration } from '@angular/common/http';
|
||||||
import { AuthenticationService } from './auth/services/authentication.service';
|
import { AuthenticationService } from './auth/services/authentication.service';
|
||||||
import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
|
import { MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
|
||||||
import { loadAppConfig } from './app-config/app-config.loader';
|
import { loadAppConfig } from './app-config/app-config.loader';
|
||||||
@@ -61,43 +61,6 @@ import { UnsavedChangesDialogComponent } from './dialogs';
|
|||||||
import { MaterialModule } from './material.module';
|
import { MaterialModule } from './material.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
|
||||||
TranslateModule,
|
|
||||||
...ABOUT_DIRECTIVES,
|
|
||||||
...VIEWER_DIRECTIVES,
|
|
||||||
...LAYOUT_DIRECTIVES,
|
|
||||||
...CORE_PIPES,
|
|
||||||
IdentityUserInfoComponent,
|
|
||||||
...CORE_DIRECTIVES,
|
|
||||||
AppConfigPipe,
|
|
||||||
...PAGINATION_DIRECTIVES,
|
|
||||||
...TOOLBAR_DIRECTIVES,
|
|
||||||
...CONTEXT_MENU_DIRECTIVES,
|
|
||||||
...CARD_VIEW_DIRECTIVES,
|
|
||||||
FormBaseModule,
|
|
||||||
CommentsComponent,
|
|
||||||
CommentListComponent,
|
|
||||||
...CLIPBOARD_DIRECTIVES,
|
|
||||||
...LOGIN_DIRECTIVES,
|
|
||||||
...LANGUAGE_MENU_DIRECTIVES,
|
|
||||||
...INFO_DRAWER_DIRECTIVES,
|
|
||||||
...DATATABLE_DIRECTIVES,
|
|
||||||
...TEMPLATE_DIRECTIVES,
|
|
||||||
IconComponent,
|
|
||||||
SortingPickerComponent,
|
|
||||||
...NOTIFICATION_HISTORY_DIRECTIVES,
|
|
||||||
...SEARCH_TEXT_INPUT_DIRECTIVES,
|
|
||||||
BlankPageComponent,
|
|
||||||
UnsavedChangesDialogComponent,
|
|
||||||
DynamicChipListComponent,
|
|
||||||
HttpClientModule,
|
|
||||||
HttpClientXsrfModule.withOptions({
|
|
||||||
cookieName: 'CSRF-TOKEN',
|
|
||||||
headerName: 'X-CSRF-TOKEN'
|
|
||||||
}),
|
|
||||||
MaterialModule
|
|
||||||
],
|
|
||||||
providers: [...CORE_PIPES],
|
|
||||||
exports: [
|
exports: [
|
||||||
...ABOUT_DIRECTIVES,
|
...ABOUT_DIRECTIVES,
|
||||||
...VIEWER_DIRECTIVES,
|
...VIEWER_DIRECTIVES,
|
||||||
@@ -128,6 +91,47 @@ import { MaterialModule } from './material.module';
|
|||||||
UnsavedChangesDialogComponent,
|
UnsavedChangesDialogComponent,
|
||||||
DynamicChipListComponent,
|
DynamicChipListComponent,
|
||||||
MaterialModule
|
MaterialModule
|
||||||
|
],
|
||||||
|
imports: [
|
||||||
|
TranslateModule,
|
||||||
|
...ABOUT_DIRECTIVES,
|
||||||
|
...VIEWER_DIRECTIVES,
|
||||||
|
...LAYOUT_DIRECTIVES,
|
||||||
|
...CORE_PIPES,
|
||||||
|
IdentityUserInfoComponent,
|
||||||
|
...CORE_DIRECTIVES,
|
||||||
|
AppConfigPipe,
|
||||||
|
...PAGINATION_DIRECTIVES,
|
||||||
|
...TOOLBAR_DIRECTIVES,
|
||||||
|
...CONTEXT_MENU_DIRECTIVES,
|
||||||
|
...CARD_VIEW_DIRECTIVES,
|
||||||
|
FormBaseModule,
|
||||||
|
CommentsComponent,
|
||||||
|
CommentListComponent,
|
||||||
|
...CLIPBOARD_DIRECTIVES,
|
||||||
|
...LOGIN_DIRECTIVES,
|
||||||
|
...LANGUAGE_MENU_DIRECTIVES,
|
||||||
|
...INFO_DRAWER_DIRECTIVES,
|
||||||
|
...DATATABLE_DIRECTIVES,
|
||||||
|
...TEMPLATE_DIRECTIVES,
|
||||||
|
IconComponent,
|
||||||
|
SortingPickerComponent,
|
||||||
|
...NOTIFICATION_HISTORY_DIRECTIVES,
|
||||||
|
...SEARCH_TEXT_INPUT_DIRECTIVES,
|
||||||
|
BlankPageComponent,
|
||||||
|
UnsavedChangesDialogComponent,
|
||||||
|
DynamicChipListComponent,
|
||||||
|
MaterialModule
|
||||||
|
],
|
||||||
|
providers: [
|
||||||
|
...CORE_PIPES,
|
||||||
|
provideHttpClient(
|
||||||
|
withInterceptorsFromDi(),
|
||||||
|
withXsrfConfiguration({
|
||||||
|
cookieName: 'CSRF-TOKEN',
|
||||||
|
headerName: 'X-CSRF-TOKEN'
|
||||||
|
})
|
||||||
|
)
|
||||||
]
|
]
|
||||||
})
|
})
|
||||||
export class CoreModule {
|
export class CoreModule {
|
||||||
|
|||||||
@@ -28,7 +28,12 @@ import { MatDialogModule } from '@angular/material/dialog';
|
|||||||
import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimepicker/core';
|
import { MatDatetimepickerModule, MatNativeDatetimeModule } from '@mat-datetimepicker/core';
|
||||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||||
|
<<<<<<< HEAD
|
||||||
import { NoopTranslateModule } from '@alfresco/adf-core';
|
import { NoopTranslateModule } from '@alfresco/adf-core';
|
||||||
|
=======
|
||||||
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
>>>>>>> dda0cdf98 ([MIGRATION] - Build fix and lint skipped rule)
|
||||||
|
|
||||||
describe('DateTimeWidgetComponent', () => {
|
describe('DateTimeWidgetComponent', () => {
|
||||||
let loader: HarnessLoader;
|
let loader: HarnessLoader;
|
||||||
@@ -40,14 +45,19 @@ describe('DateTimeWidgetComponent', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
|
<<<<<<< HEAD
|
||||||
NoopTranslateModule,
|
NoopTranslateModule,
|
||||||
|
=======
|
||||||
|
TranslateModule.forRoot(),
|
||||||
|
>>>>>>> dda0cdf98 ([MIGRATION] - Build fix and lint skipped rule)
|
||||||
NoopAnimationsModule,
|
NoopAnimationsModule,
|
||||||
MatDialogModule,
|
MatDialogModule,
|
||||||
MatNativeDatetimeModule,
|
MatNativeDatetimeModule,
|
||||||
MatDatepickerModule,
|
MatDatepickerModule,
|
||||||
MatDatetimepickerModule,
|
MatDatetimepickerModule,
|
||||||
DateTimeWidgetComponent
|
DateTimeWidgetComponent
|
||||||
]
|
],
|
||||||
|
providers: [provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
});
|
});
|
||||||
fixture = TestBed.createComponent(DateTimeWidgetComponent);
|
fixture = TestBed.createComponent(DateTimeWidgetComponent);
|
||||||
|
|
||||||
|
|||||||
@@ -11,59 +11,59 @@
|
|||||||
$background: map-get($theme, background);
|
$background: map-get($theme, background);
|
||||||
|
|
||||||
$defaults: (
|
$defaults: (
|
||||||
--adf-card-view-background: mat.get-color-from-palette($background, card),
|
--adf-card-view-background: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-card-view-border: $adf-ref-card-border,
|
--adf-card-view-border: $adf-ref-card-border,
|
||||||
--adf-card-view-border-color: mat.get-color-from-palette($foreground, divider),
|
--adf-card-view-border-color: mat.m2-get-color-from-palette($foreground, divider),
|
||||||
--adf-card-view-border-radius: $adf-ref-card-border-radius-slim,
|
--adf-card-view-border-radius: $adf-ref-card-border-radius-slim,
|
||||||
--adf-card-view-array-item-background: mat.get-color-from-palette($background, card),
|
--adf-card-view-array-item-background: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-card-view-array-item-border: $adf-ref-card-border,
|
--adf-card-view-array-item-border: $adf-ref-card-border,
|
||||||
--adf-card-view-array-item-border-color: mat.get-color-from-palette($foreground, divider),
|
--adf-card-view-array-item-border-color: mat.m2-get-color-from-palette($foreground, divider),
|
||||||
--adf-card-view-array-item-border-radius: $adf-ref-card-border-radius-slim,
|
--adf-card-view-array-item-border-radius: $adf-ref-card-border-radius-slim,
|
||||||
--adf-edit-task-and-service-filter-header-title-color: mat.get-color-from-palette($foreground, text),
|
--adf-edit-task-and-service-filter-header-title-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-edit-task-and-service-filter-header-description-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-edit-task-and-service-filter-header-description-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-edit-task-and-service-filter-content-text-label-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-edit-task-and-service-filter-content-text-label-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-edit-task-and-service-filter-content-select-label-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-edit-task-and-service-filter-content-select-label-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-edit-task-and-service-filter-header-height: $adf-ref-height-48,
|
--adf-edit-task-and-service-filter-header-height: $adf-ref-height-48,
|
||||||
--adf-about-panel-header-height: $adf-ref-height-48,
|
--adf-about-panel-header-height: $adf-ref-height-48,
|
||||||
--adf-about-panel-header-title-color: mat.get-color-from-palette($foreground, text),
|
--adf-about-panel-header-title-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-edit-process-filter-header-height: $adf-ref-height-48,
|
--adf-edit-process-filter-header-height: $adf-ref-height-48,
|
||||||
--adf-edit-process-filter-header-title-color: mat.get-color-from-palette($foreground, text),
|
--adf-edit-process-filter-header-title-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-edit-process-filter-header-description-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-edit-process-filter-header-description-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-edit-process-filter-content-text-label-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-edit-process-filter-content-text-label-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-edit-process-filter-content-select-label-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-edit-process-filter-content-select-label-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-about-server-settings-background: mat.get-color-from-palette($background, card),
|
--adf-about-server-settings-background: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-about-server-settings-color: mat.get-color-from-palette($foreground, text),
|
--adf-about-server-settings-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-about-server-settings-border-radius: $adf-ref-card-border-radius-normal,
|
--adf-about-server-settings-border-radius: $adf-ref-card-border-radius-normal,
|
||||||
--adf-about-server-settings-padding: $adf-ref-card-padding,
|
--adf-about-server-settings-padding: $adf-ref-card-padding,
|
||||||
--adf-package-list-table-background: mat.get-color-from-palette($background, card),
|
--adf-package-list-table-background: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-package-list-table-header-min-height: $adf-ref-table-header-min-height,
|
--adf-package-list-table-header-min-height: $adf-ref-table-header-min-height,
|
||||||
--adf-package-list-table-header-cell-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-package-list-table-header-cell-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-package-list-table-row-min-height: $adf-ref-table-row-min-height,
|
--adf-package-list-table-row-min-height: $adf-ref-table-row-min-height,
|
||||||
--adf-package-list-table-row-cell-color: mat.get-color-from-palette($foreground, text),
|
--adf-package-list-table-row-cell-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-identity-user-info-background: var(--adf-theme-primary-300),
|
--adf-identity-user-info-background: var(--adf-theme-primary-300),
|
||||||
--adf-identity-user-info-height: $adf-ref-height,
|
--adf-identity-user-info-height: $adf-ref-height,
|
||||||
--adf-identity-user-info-width: $adf-ref-width,
|
--adf-identity-user-info-width: $adf-ref-width,
|
||||||
--adf-identity-user-info-line-height: $adf-ref-line-height,
|
--adf-identity-user-info-line-height: $adf-ref-line-height,
|
||||||
--adf-identity-user-info-font-size: var(--theme-adf-picture-1-font-size),
|
--adf-identity-user-info-font-size: var(--theme-adf-picture-1-font-size),
|
||||||
--adf-user-info-container-margin-right: $adf-ref-margin-right,
|
--adf-user-info-container-margin-right: $adf-ref-margin-right,
|
||||||
--adf-info-drawer-tab-default-color: mat.get-color-from-palette($accent),
|
--adf-info-drawer-tab-default-color: mat.m2-get-color-from-palette($accent),
|
||||||
--adf-info-drawer-tab-default-background: mat.get-color-from-palette($background, card),
|
--adf-info-drawer-tab-default-background: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-info-drawer-tab-default-bottom-line: $adf-ref-tab-bottom-line-default,
|
--adf-info-drawer-tab-default-bottom-line: $adf-ref-tab-bottom-line-default,
|
||||||
--adf-info-drawer-tab-hover-color: mat.get-color-from-palette($accent),
|
--adf-info-drawer-tab-hover-color: mat.m2-get-color-from-palette($accent),
|
||||||
--adf-info-drawer-tab-hover-background: mat.get-color-from-palette($background, card),
|
--adf-info-drawer-tab-hover-background: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-info-drawer-tab-hover-bottom-line: $adf-ref-tab-bottom-line-default,
|
--adf-info-drawer-tab-hover-bottom-line: $adf-ref-tab-bottom-line-default,
|
||||||
--adf-info-drawer-tab-active-unfocused-color: mat.get-color-from-palette($primary),
|
--adf-info-drawer-tab-active-unfocused-color: mat.m2-get-color-from-palette($primary),
|
||||||
--adf-info-drawer-tab-active-unfocused-background: mat.get-color-from-palette($background, card),
|
--adf-info-drawer-tab-active-unfocused-background: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-info-drawer-tab-active-unfocused-bottom-line: $adf-ref-tab-bottom-line-default,
|
--adf-info-drawer-tab-active-unfocused-bottom-line: $adf-ref-tab-bottom-line-default,
|
||||||
--adf-info-drawer-tab-active-focused-color: mat.get-color-from-palette($foreground, text),
|
--adf-info-drawer-tab-active-focused-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-info-drawer-tab-active-focused-background: mat.get-color-from-palette($primary),
|
--adf-info-drawer-tab-active-focused-background: mat.m2-get-color-from-palette($primary),
|
||||||
--adf-info-drawer-tab-active-focused-bottom-line: $adf-ref-tab-bottom-line-active,
|
--adf-info-drawer-tab-active-focused-bottom-line: $adf-ref-tab-bottom-line-active,
|
||||||
|
|
||||||
--adf-people-cloud-input-label-default-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-people-cloud-input-label-default-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-people-cloud-input-label-focus-color: mat.get-color-from-palette($primary),
|
--adf-people-cloud-input-label-focus-color: mat.m2-get-color-from-palette($primary),
|
||||||
--adf-people-cloud-autosuggest-result-active-color: mat.get-color-from-palette($foreground, text),
|
--adf-people-cloud-autosuggest-result-active-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-people-cloud-autosuggest-result-disabled-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-people-cloud-autosuggest-result-disabled-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-people-cloud-input-caption-error-color: mat.get-color-from-palette($warn),
|
--adf-people-cloud-input-caption-error-color: mat.m2-get-color-from-palette($warn),
|
||||||
--adf-metadata-property-panel-border-color: $adf-ref-metadata-property-panel-border-color,
|
--adf-metadata-property-panel-border-color: $adf-ref-metadata-property-panel-border-color,
|
||||||
--adf-metadata-buttons-background-color: $adf-ref-metadata-buttons-background-color,
|
--adf-metadata-buttons-background-color: $adf-ref-metadata-buttons-background-color,
|
||||||
--adf-metadata-action-button-clear-color: $adf-ref-metadata-action-button-clear-color,
|
--adf-metadata-action-button-clear-color: $adf-ref-metadata-action-button-clear-color,
|
||||||
@@ -71,16 +71,16 @@
|
|||||||
--adf-metadata-property-panel-label-color: $adf-ref-metadata-property-panel-label-color,
|
--adf-metadata-property-panel-label-color: $adf-ref-metadata-property-panel-label-color,
|
||||||
--adf-metadata-property-panel-title-color: $adf-ref-metadata-property-panel-title-color,
|
--adf-metadata-property-panel-title-color: $adf-ref-metadata-property-panel-title-color,
|
||||||
|
|
||||||
--adf-group-cloud-input-label-default-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-group-cloud-input-label-default-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-group-cloud-input-label-focus-color: mat.get-color-from-palette($primary),
|
--adf-group-cloud-input-label-focus-color: mat.m2-get-color-from-palette($primary),
|
||||||
--adf-group-cloud-autosuggest-result-active-color: mat.get-color-from-palette($foreground, text),
|
--adf-group-cloud-autosuggest-result-active-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-group-cloud-autosuggest-result-disabled-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-group-cloud-autosuggest-result-disabled-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-group-cloud-input-caption-error-color: mat.get-color-from-palette($warn),
|
--adf-group-cloud-input-caption-error-color: mat.m2-get-color-from-palette($warn),
|
||||||
--adf-task-assignment-filter-option-default-color: mat.get-color-from-palette($foreground, text),
|
--adf-task-assignment-filter-option-default-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-task-assignment-filter-option-selected-color: mat.get-color-from-palette($primary),
|
--adf-task-assignment-filter-option-selected-color: mat.m2-get-color-from-palette($primary),
|
||||||
--adf-task-assignment-filter-label-default-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-task-assignment-filter-label-default-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-task-assignment-filter-label-focus-color: mat.get-color-from-palette($primary),
|
--adf-task-assignment-filter-label-focus-color: mat.m2-get-color-from-palette($primary),
|
||||||
--adf-process-header-cloud-card-background: mat.get-color-from-palette($background, card),
|
--adf-process-header-cloud-card-background: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-header-icon-button-default-color: $adf-ref-header-icon-color,
|
--adf-header-icon-button-default-color: $adf-ref-header-icon-color,
|
||||||
--adf-header-icon-button-default-border-radius: $adf-ref-header-icon-border-radius,
|
--adf-header-icon-button-default-border-radius: $adf-ref-header-icon-border-radius,
|
||||||
--adf-header-icon-button-hover-color: $adf-ref-header-icon-color,
|
--adf-header-icon-button-hover-color: $adf-ref-header-icon-color,
|
||||||
@@ -89,7 +89,7 @@
|
|||||||
--adf-danger-button-background: $adf-danger-button-background,
|
--adf-danger-button-background: $adf-danger-button-background,
|
||||||
--adf-secondary-button-background: $adf-secondary-button-background,
|
--adf-secondary-button-background: $adf-secondary-button-background,
|
||||||
|
|
||||||
--adf-display-external-property-widget-preview-selection-color: mat.get-color-from-palette($foreground, secondary-text)
|
--adf-display-external-property-widget-preview-selection-color: mat.m2-get-color-from-palette($foreground, secondary-text)
|
||||||
);
|
);
|
||||||
|
|
||||||
// propagates SCSS variables into the CSS variables scope
|
// propagates SCSS variables into the CSS variables scope
|
||||||
|
|||||||
@@ -28,77 +28,69 @@
|
|||||||
// map SCSS variables to expose as CSS variables
|
// map SCSS variables to expose as CSS variables
|
||||||
$defaults: (
|
$defaults: (
|
||||||
// theme colors
|
// theme colors
|
||||||
--theme-primary-color: mat.get-color-from-palette($primary),
|
--theme-primary-color: mat.m2-get-color-from-palette($primary),
|
||||||
--theme-primary-color-default-contrast: mat.get-color-from-palette($primary, default-contrast),
|
--theme-primary-color-default-contrast: mat.m2-get-color-from-palette($primary, default-contrast),
|
||||||
--theme-header-text-color: mat.get-color-from-palette($primary, default-contrast),
|
--theme-header-text-color: mat.m2-get-color-from-palette($primary, default-contrast),
|
||||||
--adf-theme-primary-50:mat.get-color-from-palette($primary, 50),
|
--adf-theme-primary-50: mat.m2-get-color-from-palette($primary, 50),
|
||||||
--adf-theme-primary-100:mat.get-color-from-palette($primary, 100),
|
--adf-theme-primary-100: mat.m2-get-color-from-palette($primary, 100),
|
||||||
--adf-theme-primary-300:mat.get-color-from-palette($primary, 300),
|
--adf-theme-primary-300: mat.m2-get-color-from-palette($primary, 300),
|
||||||
--adf-theme-primary-900:mat.get-color-from-palette($primary, 900),
|
--adf-theme-primary-900: mat.m2-get-color-from-palette($primary, 900),
|
||||||
|
--theme-warn-color: mat.m2-get-color-from-palette($warn),
|
||||||
--theme-warn-color: mat.get-color-from-palette($warn),
|
--theme-warn-color-a700: mat.m2-get-color-from-palette($warn, A700),
|
||||||
--theme-warn-color-a700: mat.get-color-from-palette($warn, A700),
|
--theme-warn-color-default-contrast: mat.m2-get-color-from-palette($warn, default-contrast),
|
||||||
--theme-warn-color-default-contrast: mat.get-color-from-palette($warn, default-contrast),
|
--theme-accent-color: mat.m2-get-color-from-palette($accent),
|
||||||
|
--theme-accent-color-a200: mat.m2-get-color-from-palette($accent, A200),
|
||||||
--theme-accent-color: mat.get-color-from-palette($accent),
|
--theme-accent-color-default-contrast: mat.m2-get-color-from-palette($accent, default-contrast),
|
||||||
--theme-accent-color-a200: mat.get-color-from-palette($accent, A200),
|
--theme-accent-500: mat.m2-get-color-from-palette($accent, 500),
|
||||||
--theme-accent-color-default-contrast: mat.get-color-from-palette($accent, default-contrast),
|
--adf-theme-foreground-base-color: mat.m2-get-color-from-palette($foreground, base),
|
||||||
--theme-accent-500:mat.get-color-from-palette($accent, 500),
|
--adf-theme-foreground-base-color-065: mat.m2-get-color-from-palette($foreground, base, 0.65),
|
||||||
|
--adf-theme-foreground-base-color-045: mat.m2-get-color-from-palette($foreground, base, 0.45),
|
||||||
--adf-theme-foreground-base-color: mat.get-color-from-palette($foreground, base),
|
--adf-theme-foreground-disabled-text-color: mat.m2-get-color-from-palette($foreground, disabled-text),
|
||||||
--adf-theme-foreground-base-color-065: mat.get-color-from-palette($foreground, base, 0.65),
|
--adf-theme-foreground-divider-color: mat.m2-get-color-from-palette($foreground, divider),
|
||||||
--adf-theme-foreground-base-color-045: mat.get-color-from-palette($foreground, base, 0.45),
|
--adf-theme-foreground-icon-color: mat.m2-get-color-from-palette($foreground, icon),
|
||||||
--adf-theme-foreground-disabled-text-color: mat.get-color-from-palette($foreground, disabled-text),
|
--adf-theme-foreground-icon-color-054: mat.m2-get-color-from-palette($foreground, icon, 0.54),
|
||||||
--adf-theme-foreground-divider-color: mat.get-color-from-palette($foreground, divider),
|
--adf-theme-foreground-secondary-text-color: mat.m2-get-color-from-palette($foreground, secondary-text),
|
||||||
--adf-theme-foreground-icon-color: mat.get-color-from-palette($foreground, icon),
|
--adf-theme-foreground-text-color: mat.m2-get-color-from-palette($foreground, text),
|
||||||
--adf-theme-foreground-icon-color-054: mat.get-color-from-palette($foreground, icon, 0.54),
|
--adf-theme-foreground-text-color-087: mat.m2-get-color-from-palette($foreground, text, 0.87),
|
||||||
--adf-theme-foreground-secondary-text-color: mat.get-color-from-palette($foreground, secondary-text),
|
--adf-theme-foreground-text-color-075: mat.m2-get-color-from-palette($foreground, text, 0.75),
|
||||||
--adf-theme-foreground-text-color: mat.get-color-from-palette($foreground, text),
|
--adf-theme-foreground-text-color-064: mat.m2-get-color-from-palette($foreground, text, 0.64),
|
||||||
--adf-theme-foreground-text-color-087: mat.get-color-from-palette($foreground, text, 0.87),
|
--adf-theme-foreground-text-color-054: mat.m2-get-color-from-palette($foreground, text, 0.54),
|
||||||
--adf-theme-foreground-text-color-075: mat.get-color-from-palette($foreground, text, 0.75),
|
--adf-theme-foreground-text-color-040: mat.m2-get-color-from-palette($foreground, text, 0.4),
|
||||||
--adf-theme-foreground-text-color-064: mat.get-color-from-palette($foreground, text, 0.64),
|
--adf-theme-foreground-text-color-027: mat.m2-get-color-from-palette($foreground, text, 0.27),
|
||||||
--adf-theme-foreground-text-color-054: mat.get-color-from-palette($foreground, text, 0.54),
|
--adf-theme-foreground-text-color-025: mat.m2-get-color-from-palette($foreground, text, 0.25),
|
||||||
--adf-theme-foreground-text-color-040: mat.get-color-from-palette($foreground, text, 0.4),
|
--adf-theme-foreground-text-color-014: mat.m2-get-color-from-palette($foreground, text, 0.14),
|
||||||
--adf-theme-foreground-text-color-027: mat.get-color-from-palette($foreground, text, 0.27),
|
--adf-theme-foreground-text-color-007: mat.m2-get-color-from-palette($foreground, text, 0.07),
|
||||||
--adf-theme-foreground-text-color-025: mat.get-color-from-palette($foreground, text, 0.25),
|
--adf-theme-background-card-color: mat.m2-get-color-from-palette($background, card),
|
||||||
--adf-theme-foreground-text-color-014: mat.get-color-from-palette($foreground, text, 0.14),
|
--adf-theme-background-card-color-087: mat.m2-get-color-from-palette($background, card, 0.87),
|
||||||
--adf-theme-foreground-text-color-007: mat.get-color-from-palette($foreground, text, 0.07),
|
--theme-background-color: mat.m2-get-color-from-palette($background, background),
|
||||||
|
--adf-theme-background-dialog-color: mat.m2-get-color-from-palette($background, dialog),
|
||||||
--adf-theme-background-card-color: mat.get-color-from-palette($background, card),
|
--adf-theme-background-hover-color: mat.m2-get-color-from-palette($background, hover),
|
||||||
--adf-theme-background-card-color-087: mat.get-color-from-palette($background, card, 0.87),
|
--adf-theme-background-selected-button-color: mat.m2-get-color-from-palette($background, selected-button),
|
||||||
--theme-background-color: mat.get-color-from-palette($background, background),
|
--adf-theme-background-status-bar-color: mat.m2-get-color-from-palette($background, status-bar),
|
||||||
--adf-theme-background-dialog-color: mat.get-color-from-palette($background, dialog),
|
--adf-theme-background-unselected-chip-color: mat.m2-get-color-from-palette($background, unselected-chip),
|
||||||
--adf-theme-background-hover-color: mat.get-color-from-palette($background, hover),
|
|
||||||
--adf-theme-background-selected-button-color: mat.get-color-from-palette($background, selected-button),
|
|
||||||
--adf-theme-background-status-bar-color: mat.get-color-from-palette($background, status-bar),
|
|
||||||
--adf-theme-background-unselected-chip-color: mat.get-color-from-palette($background, unselected-chip),
|
|
||||||
|
|
||||||
// typography
|
// typography
|
||||||
--theme-font-family: mat.font-family($typography),
|
--theme-font-family: mat.m2-font-family($typography),
|
||||||
--theme-body-1-font-size: mat.font-size($typography, body-2),
|
--theme-body-1-font-size: mat.m2-font-size($typography, body-2),
|
||||||
--theme-body-2-font-size: mat.font-size($typography, subtitle-2),
|
--theme-body-2-font-size: mat.m2-font-size($typography, subtitle-2),
|
||||||
--theme-body-1-line-height: mat.line-height($typography, body-2),
|
--theme-body-1-line-height: mat.m2-line-height($typography, body-2),
|
||||||
--theme-display-1-font-size: mat.font-size($typography, headline-4),
|
--theme-display-1-font-size: mat.m2-font-size($typography, headline-4),
|
||||||
--theme-display-3-font-size: mat.font-size($typography, headline-2),
|
--theme-display-3-font-size: mat.m2-font-size($typography, headline-2),
|
||||||
--theme-display-4-font-size: mat.font-size($typography, headline-1),
|
--theme-display-4-font-size: mat.m2-font-size($typography, headline-1),
|
||||||
--theme-caption-font-size: mat.font-size($typography, caption),
|
--theme-caption-font-size: mat.m2-font-size($typography, caption),
|
||||||
--theme-title-font-size: mat.font-size($typography, headline-6),
|
--theme-title-font-size: mat.m2-font-size($typography, headline-6),
|
||||||
--theme-subheading-1-font-size: mat.font-size($typography, body-1),
|
--theme-subheading-1-font-size: mat.m2-font-size($typography, body-1),
|
||||||
--theme-subheading-2-font-size: mat.font-size($typography, subtitle-1),
|
--theme-subheading-2-font-size: mat.m2-font-size($typography, subtitle-1),
|
||||||
--theme-button-font-size: mat.font-size($typography, button),
|
--theme-button-font-size: mat.m2-font-size($typography, button),
|
||||||
--theme-headline-font-size: mat.font-size($typography, headline-5),
|
--theme-headline-font-size: mat.m2-font-size($typography, headline-5),
|
||||||
--theme-headline-line-height: mat.line-height($typography, headline-5),
|
--theme-headline-line-height: mat.m2-line-height($typography, headline-5),
|
||||||
|
|
||||||
--theme-adf-icon-1-font-size: map-get($custom-css-variables, 'theme-adf-icon-1-font-size'),
|
--theme-adf-icon-1-font-size: map-get($custom-css-variables, 'theme-adf-icon-1-font-size'),
|
||||||
--theme-adf-picture-1-font-size: map-get($custom-css-variables, 'theme-adf-picture-1-font-size'),
|
--theme-adf-picture-1-font-size: map-get($custom-css-variables, 'theme-adf-picture-1-font-size'),
|
||||||
--theme-adf-task-footer-font-size: map-get($custom-css-variables, 'theme-adf-task-footer-font-size'),
|
--theme-adf-task-footer-font-size: map-get($custom-css-variables, 'theme-adf-task-footer-font-size'),
|
||||||
--theme-adf-task-title-font-size: map-get($custom-css-variables, 'theme-adf-task-title-font-size'),
|
--theme-adf-task-title-font-size: map-get($custom-css-variables, 'theme-adf-task-title-font-size'),
|
||||||
|
|
||||||
// specific colors
|
// specific colors
|
||||||
--adf-theme-mat-grey-color-a200: mat.get-color-from-palette(mat.$grey-palette, A200),
|
--adf-theme-mat-grey-color-a200: mat.m2-get-color-from-palette(mat.$m2-grey-palette, A200),
|
||||||
--adf-theme-mat-grey-color-a400: mat.get-color-from-palette(mat.$grey-palette, A400),
|
--adf-theme-mat-grey-color-a400: mat.m2-get-color-from-palette(mat.$m2-grey-palette, A400),
|
||||||
--adf-theme-mat-grey-color-50: mat.get-color-from-palette(mat.$grey-palette, 50),
|
--adf-theme-mat-grey-color-50: mat.m2-get-color-from-palette(mat.$m2-grey-palette, 50),
|
||||||
|
|
||||||
// spacing
|
// spacing
|
||||||
--adf-theme-spacing: map-get($custom-css-variables, 'theme-adf-spacing')
|
--adf-theme-spacing: map-get($custom-css-variables, 'theme-adf-spacing')
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,18 +1,18 @@
|
|||||||
@use '@angular/material' as mat;
|
@use '@angular/material' as mat;
|
||||||
|
|
||||||
$alfresco-typography: mat.define-typography-config(
|
$alfresco-typography: mat.m2-define-typography-config(
|
||||||
$font-family: 'Muli, Roboto, "Helvetica Neue", sans-serif',
|
$font-family: 'Muli, Roboto, "Helvetica Neue", sans-serif',
|
||||||
$headline-1: mat.define-typography-level(112px, 112px, 300),
|
$headline-1: mat.m2-define-typography-level(112px, 112px, 300),
|
||||||
$headline-2: mat.define-typography-level(56px, 56px, 400),
|
$headline-2: mat.m2-define-typography-level(56px, 56px, 400),
|
||||||
$headline-3: mat.define-typography-level(45px, 48px, 400),
|
$headline-3: mat.m2-define-typography-level(45px, 48px, 400),
|
||||||
$headline-4: mat.define-typography-level(34px, 40px, 400),
|
$headline-4: mat.m2-define-typography-level(34px, 40px, 400),
|
||||||
$headline-5: mat.define-typography-level(24px, 32px, 400),
|
$headline-5: mat.m2-define-typography-level(24px, 32px, 400),
|
||||||
$headline-6: mat.define-typography-level(20px, 32px, 500),
|
$headline-6: mat.m2-define-typography-level(20px, 32px, 500),
|
||||||
$subtitle-1: mat.define-typography-level(16px, 28px, 400),
|
$subtitle-1: mat.m2-define-typography-level(16px, 28px, 400),
|
||||||
$body-1: mat.define-typography-level(15px, 24px, 400),
|
$body-1: mat.m2-define-typography-level(15px, 24px, 400),
|
||||||
$subtitle-2: mat.define-typography-level(14px, 24px, 500),
|
$subtitle-2: mat.m2-define-typography-level(14px, 24px, 500),
|
||||||
$body-2: mat.define-typography-level(14px, 20px, 400),
|
$body-2: mat.m2-define-typography-level(14px, 20px, 400),
|
||||||
$caption: mat.define-typography-level(12px, 20px, 400),
|
$caption: mat.m2-define-typography-level(12px, 20px, 400),
|
||||||
$button: mat.define-typography-level(14px, 14px, 500),
|
$button: mat.m2-define-typography-level(14px, 14px, 500),
|
||||||
// Line-height must be unit-less fraction of the font-size.
|
// Line-height must be unit-less fraction of the font-size.
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-ecm-blue);
|
$primary: mat.m2-define-palette($alfresco-ecm-blue);
|
||||||
$accent: mat.define-palette($alfresco-accent-orange);
|
$accent: mat.m2-define-palette($alfresco-accent-orange);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette(mat.$pink-palette, 700, 500, 900);
|
$primary: mat.m2-define-palette(mat.$m2-pink-palette, 700, 500, 900);
|
||||||
$accent: mat.define-palette($alfresco-accent-purple);
|
$accent: mat.m2-define-palette($alfresco-accent-purple);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-ecm-cyan);
|
$primary: mat.m2-define-palette($alfresco-ecm-cyan);
|
||||||
$accent: mat.define-palette($alfresco-accent-orange);
|
$accent: mat.m2-define-palette($alfresco-accent-orange);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-ecm-cyan);
|
$primary: mat.m2-define-palette($alfresco-ecm-cyan);
|
||||||
$accent: mat.define-palette($alfresco-accent-purple);
|
$accent: mat.m2-define-palette($alfresco-accent-purple);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-bpm-green);
|
$primary: mat.m2-define-palette($alfresco-bpm-green);
|
||||||
$accent: mat.define-palette($alfresco-accent-orange);
|
$accent: mat.m2-define-palette($alfresco-accent-orange);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -4,14 +4,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette($alfresco-bpm-green);
|
$primary: mat.m2-define-palette($alfresco-bpm-green);
|
||||||
$accent: mat.define-palette($alfresco-accent-purple);
|
$accent: mat.m2-define-palette($alfresco-accent-purple);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette(mat.$indigo-palette);
|
$primary: mat.m2-define-palette(mat.$m2-indigo-palette);
|
||||||
$accent: mat.define-palette(mat.$pink-palette, A200, A100, A400);
|
$accent: mat.m2-define-palette(mat.$m2-pink-palette, A200, A100, A400);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-light-theme(
|
$theme: mat.m2-define-light-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette(mat.$pink-palette, 700, 500, 900);
|
$primary: mat.m2-define-palette(mat.$m2-pink-palette, 700, 500, 900);
|
||||||
$accent: mat.define-palette(mat.$blue-grey-palette, A200, A100, A400);
|
$accent: mat.m2-define-palette(mat.$m2-blue-grey-palette, A200, A100, A400);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-dark-theme(
|
$theme: mat.m2-define-dark-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -5,14 +5,14 @@
|
|||||||
@include mat.all-component-typographies;
|
@include mat.all-component-typographies;
|
||||||
@include mat.core;
|
@include mat.core;
|
||||||
|
|
||||||
$primary: mat.define-palette(mat.$purple-palette, 700, 500, 800);
|
$primary: mat.m2-define-palette(mat.$m2-purple-palette, 700, 500, 800);
|
||||||
$accent: mat.define-palette(mat.$green-palette, A200, A100, A400);
|
$accent: mat.m2-define-palette(mat.$m2-green-palette, A200, A100, A400);
|
||||||
$warn: mat.define-palette($alfresco-warn);
|
$warn: mat.m2-define-palette($alfresco-warn);
|
||||||
$theme: mat.define-dark-theme(
|
$theme: mat.m2-define-dark-theme(
|
||||||
(
|
(
|
||||||
color: (
|
color: (
|
||||||
primary: $primary,
|
primary: $primary,
|
||||||
accent: $accent,
|
accent: $accent
|
||||||
),
|
),
|
||||||
typography: $alfresco-typography
|
typography: $alfresco-typography
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { Injector } from '@angular/core';
|
import { Injector } from '@angular/core';
|
||||||
import { getTestBed, TestBed } from '@angular/core/testing';
|
import { getTestBed, TestBed } from '@angular/core/testing';
|
||||||
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
import { TranslateLoader, TranslateModule } from '@ngx-translate/core';
|
||||||
@@ -36,7 +36,6 @@ describe('TranslationService', () => {
|
|||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [
|
||||||
HttpClientModule,
|
|
||||||
TranslateModule.forRoot({
|
TranslateModule.forRoot({
|
||||||
loader: {
|
loader: {
|
||||||
provide: TranslateLoader,
|
provide: TranslateLoader,
|
||||||
@@ -47,7 +46,8 @@ describe('TranslationService', () => {
|
|||||||
providers: [
|
providers: [
|
||||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||||
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||||
provideTranslations('@alfresco/adf-core', 'assets/ng2-alfresco-core')
|
provideTranslations('@alfresco/adf-core', 'assets/ng2-alfresco-core'),
|
||||||
|
provideHttpClient(withInterceptorsFromDi())
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -70,7 +70,7 @@ describe('TranslationService', () => {
|
|||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||||
status: 200,
|
status: 200,
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
responseText: JSON.stringify({TEST: 'This is a test', TEST2: 'This is another test'})
|
responseText: JSON.stringify({ TEST: 'This is a test', TEST2: 'This is another test' })
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -82,7 +82,7 @@ describe('TranslationService', () => {
|
|||||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||||
status: 200,
|
status: 200,
|
||||||
contentType: 'application/json',
|
contentType: 'application/json',
|
||||||
responseText: JSON.stringify({TEST: 'This is a test', TEST2: 'This is another test'})
|
responseText: JSON.stringify({ TEST: 'This is a test', TEST2: 'This is another test' })
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -16,9 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { AppExtensionService } from '@alfresco/adf-extensions';
|
import { AppExtensionService } from '@alfresco/adf-extensions';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { TestBed } from '@angular/core/testing';
|
import { TestBed } from '@angular/core/testing';
|
||||||
import { ViewUtilService } from './view-util.service';
|
import { ViewUtilService } from './view-util.service';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('ViewUtilService', () => {
|
describe('ViewUtilService', () => {
|
||||||
let viewUtilService: ViewUtilService;
|
let viewUtilService: ViewUtilService;
|
||||||
@@ -27,8 +28,8 @@ describe('ViewUtilService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [AppExtensionService]
|
providers: [AppExtensionService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
});
|
});
|
||||||
|
|
||||||
viewUtilService = TestBed.inject(ViewUtilService);
|
viewUtilService = TestBed.inject(ViewUtilService);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
"main": "lib/eslint-angular/index.ts",
|
"main": "lib/eslint-angular/index.ts",
|
||||||
"generatePackageJson": true,
|
"generatePackageJson": true,
|
||||||
"tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json",
|
"tsConfig": "lib/eslint-angular/tsconfig.lib.prod.json",
|
||||||
|
"webpackConfig": "lib/eslint-angular/webpack.config.js",
|
||||||
"stylePreprocessorOptions": {
|
"stylePreprocessorOptions": {
|
||||||
"includePaths": ["lib", "lib/core/src/lib"]
|
"includePaths": ["lib", "lib/core/src/lib"]
|
||||||
},
|
},
|
||||||
@@ -31,7 +32,7 @@
|
|||||||
"defaultConfiguration": "production"
|
"defaultConfiguration": "production"
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/eslint-angular/**/*.ts"]
|
"lintFilePatterns": ["lib/eslint-angular/**/*.ts"]
|
||||||
}
|
}
|
||||||
|
|||||||
+5
-5
@@ -33,7 +33,7 @@ const messages = {
|
|||||||
|
|
||||||
type MessageIds = keyof typeof messages;
|
type MessageIds = keyof typeof messages;
|
||||||
|
|
||||||
const filetypeErrors: {regexp: RegExp; messageId: MessageIds}[] = [
|
const filetypeErrors: { regexp: RegExp; messageId: MessageIds }[] = [
|
||||||
{
|
{
|
||||||
regexp: /.*\.spec\.ts/,
|
regexp: /.*\.spec\.ts/,
|
||||||
messageId: 'useAngularMaterialTestingHarness'
|
messageId: 'useAngularMaterialTestingHarness'
|
||||||
@@ -53,7 +53,7 @@ export default createESLintRule<unknown[], MessageIds>({
|
|||||||
type: 'suggestion',
|
type: 'suggestion',
|
||||||
docs: {
|
docs: {
|
||||||
description: 'Disallows using Angular Material internal selectors',
|
description: 'Disallows using Angular Material internal selectors',
|
||||||
recommended: 'error'
|
recommended: 'recommended'
|
||||||
},
|
},
|
||||||
hasSuggestions: true,
|
hasSuggestions: true,
|
||||||
schema: [],
|
schema: [],
|
||||||
@@ -63,9 +63,9 @@ export default createESLintRule<unknown[], MessageIds>({
|
|||||||
create(context) {
|
create(context) {
|
||||||
return {
|
return {
|
||||||
[ASTSelectors.join(',')](node: TSESTree.Literal | TSESTree.TemplateLiteral) {
|
[ASTSelectors.join(',')](node: TSESTree.Literal | TSESTree.TemplateLiteral) {
|
||||||
const message = filetypeErrors.find((fileTypeError) =>
|
const message = filetypeErrors.find((fileTypeError) => context.getFilename().match(fileTypeError.regexp)) || {
|
||||||
context.getFilename().match(fileTypeError.regexp)
|
messageId: 'noAngularMaterialSelectors'
|
||||||
) || { messageId: 'noAngularMaterialSelectors' };
|
};
|
||||||
|
|
||||||
context.report({
|
context.report({
|
||||||
node,
|
node,
|
||||||
|
|||||||
+5
-14
@@ -21,7 +21,7 @@ import { createESLintRule } from '../../utils/create-eslint-rule/create-eslint-r
|
|||||||
|
|
||||||
export const RULE_NAME = 'use-none-component-view-encapsulation';
|
export const RULE_NAME = 'use-none-component-view-encapsulation';
|
||||||
|
|
||||||
type MessageIds = 'useNoneComponentViewEncapsulation'| 'suggestAddViewEncapsulationNone';
|
type MessageIds = 'useNoneComponentViewEncapsulation' | 'suggestAddViewEncapsulationNone';
|
||||||
type DecoratorForClass = TSESTree.Decorator & {
|
type DecoratorForClass = TSESTree.Decorator & {
|
||||||
parent: TSESTree.ClassDeclaration;
|
parent: TSESTree.ClassDeclaration;
|
||||||
};
|
};
|
||||||
@@ -54,7 +54,7 @@ export default createESLintRule<unknown[], MessageIds>({
|
|||||||
type: 'suggestion',
|
type: 'suggestion',
|
||||||
docs: {
|
docs: {
|
||||||
description: `Disallows using other encapsulation than \`${viewEncapsulationNone}\``,
|
description: `Disallows using other encapsulation than \`${viewEncapsulationNone}\``,
|
||||||
recommended: false
|
recommended: 'recommended'
|
||||||
},
|
},
|
||||||
hasSuggestions: true,
|
hasSuggestions: true,
|
||||||
schema: [],
|
schema: [],
|
||||||
@@ -65,18 +65,13 @@ export default createESLintRule<unknown[], MessageIds>({
|
|||||||
},
|
},
|
||||||
defaultOptions: [],
|
defaultOptions: [],
|
||||||
create(context) {
|
create(context) {
|
||||||
const encapsulationProperty = Selectors.metadataProperty(
|
const encapsulationProperty = Selectors.metadataProperty(metadataPropertyName);
|
||||||
metadataPropertyName
|
|
||||||
);
|
|
||||||
const withoutEncapsulationProperty =
|
const withoutEncapsulationProperty =
|
||||||
`${Selectors.COMPONENT_CLASS_DECORATOR}:matches([expression.arguments.length=0], [expression.arguments.0.type='ObjectExpression']:not(:has(${encapsulationProperty})))` as const;
|
`${Selectors.COMPONENT_CLASS_DECORATOR}:matches([expression.arguments.length=0], [expression.arguments.0.type='ObjectExpression']:not(:has(${encapsulationProperty})))` as const;
|
||||||
const nonNoneViewEncapsulationNoneProperty =
|
const nonNoneViewEncapsulationNoneProperty =
|
||||||
`${Selectors.COMPONENT_CLASS_DECORATOR} > CallExpression > ObjectExpression > ` +
|
`${Selectors.COMPONENT_CLASS_DECORATOR} > CallExpression > ObjectExpression > ` +
|
||||||
`${encapsulationProperty}:matches([value.type='Identifier'][value.name='undefined'], [value.object.name='ViewEncapsulation'][value.property.name!='None'])`;
|
`${encapsulationProperty}:matches([value.type='Identifier'][value.name='undefined'], [value.object.name='ViewEncapsulation'][value.property.name!='None'])`;
|
||||||
const selectors = [
|
const selectors = [withoutEncapsulationProperty, nonNoneViewEncapsulationNoneProperty].join(',');
|
||||||
withoutEncapsulationProperty,
|
|
||||||
nonNoneViewEncapsulationNoneProperty
|
|
||||||
].join(',');
|
|
||||||
return {
|
return {
|
||||||
[selectors](node: DecoratorForClass | PropertyInClassDecorator) {
|
[selectors](node: DecoratorForClass | PropertyInClassDecorator) {
|
||||||
context.report({
|
context.report({
|
||||||
@@ -107,11 +102,7 @@ export default createESLintRule<unknown[], MessageIds>({
|
|||||||
moduleName: '@angular/core',
|
moduleName: '@angular/core',
|
||||||
node: node.parent
|
node: node.parent
|
||||||
}),
|
}),
|
||||||
RuleFixes.getDecoratorPropertyAddFix(
|
RuleFixes.getDecoratorPropertyAddFix(node, fixer, `${metadataPropertyName}: ${viewEncapsulationNone}`)
|
||||||
node,
|
|
||||||
fixer,
|
|
||||||
`${metadataPropertyName}: ${viewEncapsulationNone}`
|
|
||||||
)
|
|
||||||
].filter(isNotNullOrUndefined);
|
].filter(isNotNullOrUndefined);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
|
||||||
|
const { join } = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
output: {
|
||||||
|
path: join(__dirname, '../../dist/libs/eslint-angular')
|
||||||
|
},
|
||||||
|
devServer: {
|
||||||
|
port: 4200
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new NxAppWebpackPlugin({
|
||||||
|
main: './index.ts',
|
||||||
|
tsConfig: './tsconfig.lib.json',
|
||||||
|
index: './index.ts',
|
||||||
|
outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
|
||||||
|
optimization: process.env['NODE_ENV'] === 'production'
|
||||||
|
})
|
||||||
|
]
|
||||||
|
};
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/extensions/**/*.ts", "lib/extensions/**/*.html"]
|
"lintFilePatterns": ["lib/extensions/**/*.ts", "lib/extensions/**/*.html"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|||||||
import { By } from '@angular/platform-browser';
|
import { By } from '@angular/platform-browser';
|
||||||
import { DynamicExtensionComponent } from './dynamic.component';
|
import { DynamicExtensionComponent } from './dynamic.component';
|
||||||
import { ComponentRegisterService } from '../../services/component-register.service';
|
import { ComponentRegisterService } from '../../services/component-register.service';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'test-component',
|
selector: 'test-component',
|
||||||
@@ -48,8 +48,8 @@ describe('DynamicExtensionComponent', () => {
|
|||||||
componentRegister.setComponents({ 'test-component': TestComponent });
|
componentRegister.setComponents({ 'test-component': TestComponent });
|
||||||
|
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientModule, DynamicExtensionComponent, TestComponent],
|
imports: [DynamicExtensionComponent, TestComponent],
|
||||||
providers: [{ provide: ComponentRegisterService, useValue: componentRegister }]
|
providers: [{ provide: ComponentRegisterService, useValue: componentRegister }, provideHttpClient(withInterceptorsFromDi())]
|
||||||
});
|
});
|
||||||
|
|
||||||
TestBed.compileComponents();
|
TestBed.compileComponents();
|
||||||
|
|||||||
@@ -16,9 +16,10 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
import { TestBed, fakeAsync, flushMicrotasks, tick } from '@angular/core/testing';
|
import { TestBed, fakeAsync, flushMicrotasks, tick } from '@angular/core/testing';
|
||||||
import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing';
|
import { HttpTestingController, provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { ExtensionConfig } from '../config/extension.config';
|
import { ExtensionConfig } from '../config/extension.config';
|
||||||
import { ExtensionLoaderService } from './extension-loader.service';
|
import { ExtensionLoaderService } from './extension-loader.service';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('ExtensionLoaderService', () => {
|
describe('ExtensionLoaderService', () => {
|
||||||
let extensionLoaderService: ExtensionLoaderService;
|
let extensionLoaderService: ExtensionLoaderService;
|
||||||
@@ -35,10 +36,8 @@ describe('ExtensionLoaderService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule],
|
imports: [],
|
||||||
providers: [
|
providers: [ExtensionLoaderService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
ExtensionLoaderService
|
|
||||||
]
|
|
||||||
});
|
});
|
||||||
extensionLoaderService = TestBed.inject(ExtensionLoaderService);
|
extensionLoaderService = TestBed.inject(ExtensionLoaderService);
|
||||||
httpMock = TestBed.inject(HttpTestingController);
|
httpMock = TestBed.inject(HttpTestingController);
|
||||||
@@ -85,10 +84,12 @@ describe('ExtensionLoaderService', () => {
|
|||||||
it('should load only extensions defined by $references', fakeAsync(() => {
|
it('should load only extensions defined by $references', fakeAsync(() => {
|
||||||
appExtensionsConfig.$references = ['test.extension.1.json'];
|
appExtensionsConfig.$references = ['test.extension.1.json'];
|
||||||
|
|
||||||
extensionLoaderService.load('assets/app.extensions.json', 'assets/plugins', ['test.extension.2.json, test.extension.3.json']).then((config: ExtensionConfig) => {
|
extensionLoaderService
|
||||||
const pluginsReference = config.$references.map((entry: ExtensionConfig) => entry.$name);
|
.load('assets/app.extensions.json', 'assets/plugins', ['test.extension.2.json, test.extension.3.json'])
|
||||||
expect(pluginsReference).toEqual(['test.extension.1']);
|
.then((config: ExtensionConfig) => {
|
||||||
});
|
const pluginsReference = config.$references.map((entry: ExtensionConfig) => entry.$name);
|
||||||
|
expect(pluginsReference).toEqual(['test.extension.1']);
|
||||||
|
});
|
||||||
|
|
||||||
httpMock.expectOne('assets/app.extensions.json').flush(appExtensionsConfig);
|
httpMock.expectOne('assets/app.extensions.json').flush(appExtensionsConfig);
|
||||||
tick();
|
tick();
|
||||||
@@ -98,20 +99,20 @@ describe('ExtensionLoaderService', () => {
|
|||||||
flushMicrotasks();
|
flushMicrotasks();
|
||||||
}));
|
}));
|
||||||
|
|
||||||
it('should load extensions from passed extension value',fakeAsync(() => {
|
it('should load extensions from passed extension value', fakeAsync(() => {
|
||||||
appExtensionsConfig.$references = ['test.extension.1.json'];
|
appExtensionsConfig.$references = ['test.extension.1.json'];
|
||||||
|
|
||||||
extensionLoaderService.load(
|
extensionLoaderService
|
||||||
'assets/app.extensions.json',
|
.load('assets/app.extensions.json', 'assets/plugins', undefined, [
|
||||||
'assets/plugins',
|
{
|
||||||
undefined,
|
$id: 'extension-value-id',
|
||||||
[{
|
$license: 'license',
|
||||||
$id: 'extension-value-id',
|
$name: 'name',
|
||||||
$license: 'license',
|
$version: 'version',
|
||||||
$name: 'name',
|
$vendor: 'vendor'
|
||||||
$version:'version',
|
}
|
||||||
$vendor: 'vendor'
|
])
|
||||||
}]).then((config: ExtensionConfig) => {
|
.then((config: ExtensionConfig) => {
|
||||||
const hasExtensionValue = config.$references.some((entry: ExtensionConfig) => entry.$id === 'extension-value-id');
|
const hasExtensionValue = config.$references.some((entry: ExtensionConfig) => entry.$id === 'extension-value-id');
|
||||||
expect(hasExtensionValue).toBe(true);
|
expect(hasExtensionValue).toBe(true);
|
||||||
});
|
});
|
||||||
@@ -122,17 +123,17 @@ describe('ExtensionLoaderService', () => {
|
|||||||
}));
|
}));
|
||||||
|
|
||||||
it('should load extensions if only extension value was passed', fakeAsync(() => {
|
it('should load extensions if only extension value was passed', fakeAsync(() => {
|
||||||
extensionLoaderService.load(
|
extensionLoaderService
|
||||||
'assets/app.extensions.json',
|
.load('assets/app.extensions.json', 'assets/plugins', undefined, [
|
||||||
'assets/plugins',
|
{
|
||||||
undefined,
|
$id: 'extension-value-id',
|
||||||
[{
|
$license: 'license',
|
||||||
$id: 'extension-value-id',
|
$name: 'name',
|
||||||
$license: 'license',
|
$version: 'version',
|
||||||
$name: 'name',
|
$vendor: 'vendor'
|
||||||
$version:'version',
|
}
|
||||||
$vendor: 'vendor'
|
])
|
||||||
}]).then((config: ExtensionConfig) => {
|
.then((config: ExtensionConfig) => {
|
||||||
const hasExtensionValue = config.$references.some((entry: ExtensionConfig) => entry.$id === 'extension-value-id');
|
const hasExtensionValue = config.$references.some((entry: ExtensionConfig) => entry.$id === 'extension-value-id');
|
||||||
expect(hasExtensionValue).toBe(true);
|
expect(hasExtensionValue).toBe(true);
|
||||||
});
|
});
|
||||||
@@ -144,23 +145,24 @@ describe('ExtensionLoaderService', () => {
|
|||||||
it('should load extensions with multiple extension values', fakeAsync(() => {
|
it('should load extensions with multiple extension values', fakeAsync(() => {
|
||||||
appExtensionsConfig.$references = ['test.extension.1.json'];
|
appExtensionsConfig.$references = ['test.extension.1.json'];
|
||||||
|
|
||||||
extensionLoaderService.load(
|
extensionLoaderService
|
||||||
'assets/app.extensions.json',
|
.load('assets/app.extensions.json', 'assets/plugins', undefined, [
|
||||||
'assets/plugins',
|
{
|
||||||
undefined,
|
$id: 'extension-value-id-1',
|
||||||
[{
|
$license: 'license',
|
||||||
$id: 'extension-value-id-1',
|
$name: 'name',
|
||||||
$license: 'license',
|
$version: 'version',
|
||||||
$name: 'name',
|
$vendor: 'vendor'
|
||||||
$version:'version',
|
},
|
||||||
$vendor: 'vendor'
|
{
|
||||||
},{
|
$id: 'extension-value-id-2',
|
||||||
$id: 'extension-value-id-2',
|
$license: 'license',
|
||||||
$license: 'license',
|
$name: 'name',
|
||||||
$name: 'name',
|
$version: 'version',
|
||||||
$version:'version',
|
$vendor: 'vendor'
|
||||||
$vendor: 'vendor'
|
}
|
||||||
}]).then((config: ExtensionConfig) => {
|
])
|
||||||
|
.then((config: ExtensionConfig) => {
|
||||||
const hasFirstExtensionValue = config.$references.some((entry: ExtensionConfig) => entry.$id === 'extension-value-id-1');
|
const hasFirstExtensionValue = config.$references.some((entry: ExtensionConfig) => entry.$id === 'extension-value-id-1');
|
||||||
expect(hasFirstExtensionValue).toBe(true);
|
expect(hasFirstExtensionValue).toBe(true);
|
||||||
const hasSecondExtensionValue = config.$references.some((entry: ExtensionConfig) => entry.$id === 'extension-value-id-2');
|
const hasSecondExtensionValue = config.$references.some((entry: ExtensionConfig) => entry.$id === 'extension-value-id-2');
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/insights/**/*.ts", "lib/insights/**/*.html"]
|
"lintFilePatterns": ["lib/insights/**/*.ts", "lib/insights/**/*.html"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -76,7 +76,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"outputs": ["{options.outputFile}"],
|
"outputs": ["{options.outputFile}"],
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/js-api/**/*.ts"]
|
"lintFilePatterns": ["lib/js-api/**/*.ts"]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
export const parameters = {
|
export const parameters = {
|
||||||
docs: { inlineStories: true },
|
docs: { inlineStories: true },
|
||||||
controls: { expanded: true }
|
controls: { expanded: true }
|
||||||
};
|
};
|
||||||
export const tags = ['autodocs'];
|
export const tags = ['autodocs', 'autodocs'];
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/process-services-cloud/**/*.ts", "lib/process-services-cloud/**/*.html"]
|
"lintFilePatterns": ["lib/process-services-cloud/**/*.ts", "lib/process-services-cloud/**/*.html"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ import {
|
|||||||
} from '../mock/identity-group.service.mock';
|
} from '../mock/identity-group.service.mock';
|
||||||
import { mockFoodGroups } from '../mock/group-cloud.mock';
|
import { mockFoodGroups } from '../mock/group-cloud.mock';
|
||||||
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
import { AdfHttpClient } from '@alfresco/adf-core/api';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('IdentityGroupService', () => {
|
describe('IdentityGroupService', () => {
|
||||||
let service: IdentityGroupService;
|
let service: IdentityGroupService;
|
||||||
@@ -35,8 +36,8 @@ describe('IdentityGroupService', () => {
|
|||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [TranslateModule.forRoot(), HttpClientTestingModule],
|
imports: [TranslateModule.forRoot()],
|
||||||
providers: [IdentityGroupService]
|
providers: [IdentityGroupService, provideHttpClient(withInterceptorsFromDi()), provideHttpClientTesting()]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(IdentityGroupService);
|
service = TestBed.inject(IdentityGroupService);
|
||||||
adfHttpClient = TestBed.inject(AdfHttpClient);
|
adfHttpClient = TestBed.inject(AdfHttpClient);
|
||||||
|
|||||||
+5
-14
@@ -21,7 +21,7 @@ import { FormsModule, ReactiveFormsModule } from '@angular/forms';
|
|||||||
import { ProcessFiltersCloudComponent } from './components/process-filters-cloud.component';
|
import { ProcessFiltersCloudComponent } from './components/process-filters-cloud.component';
|
||||||
import { MaterialModule } from '../../material.module';
|
import { MaterialModule } from '../../material.module';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { EditProcessFilterCloudComponent } from './components/edit-process-filter-cloud.component';
|
import { EditProcessFilterCloudComponent } from './components/edit-process-filter-cloud.component';
|
||||||
import { ProcessFilterDialogCloudComponent } from './components/process-filter-dialog-cloud.component';
|
import { ProcessFilterDialogCloudComponent } from './components/process-filter-dialog-cloud.component';
|
||||||
import { AppListCloudModule } from './../../app/app-list-cloud.module';
|
import { AppListCloudModule } from './../../app/app-list-cloud.module';
|
||||||
@@ -29,18 +29,9 @@ import { ProcessCommonModule } from '../../common/process-common.module';
|
|||||||
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
imports: [
|
|
||||||
FormsModule,
|
|
||||||
ReactiveFormsModule,
|
|
||||||
HttpClientModule,
|
|
||||||
CommonModule,
|
|
||||||
MaterialModule,
|
|
||||||
AppListCloudModule,
|
|
||||||
CoreModule,
|
|
||||||
ProcessCommonModule,
|
|
||||||
PeopleCloudModule
|
|
||||||
],
|
|
||||||
declarations: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent],
|
declarations: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent],
|
||||||
exports: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent]
|
exports: [ProcessFiltersCloudComponent, EditProcessFilterCloudComponent, ProcessFilterDialogCloudComponent],
|
||||||
|
imports: [FormsModule, ReactiveFormsModule, CommonModule, MaterialModule, AppListCloudModule, CoreModule, ProcessCommonModule, PeopleCloudModule],
|
||||||
|
providers: [provideHttpClient(withInterceptorsFromDi())]
|
||||||
})
|
})
|
||||||
export class ProcessFiltersCloudModule { }
|
export class ProcessFiltersCloudModule {}
|
||||||
|
|||||||
+22
-11
@@ -30,12 +30,13 @@ import {
|
|||||||
} from '../mock/task-filters-cloud.mock';
|
} from '../mock/task-filters-cloud.mock';
|
||||||
import { UserPreferenceCloudService } from '../../../services/user-preference-cloud.service';
|
import { UserPreferenceCloudService } from '../../../services/user-preference-cloud.service';
|
||||||
import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface';
|
import { PreferenceCloudServiceInterface } from '../../../services/preference-cloud.interface';
|
||||||
import { HttpClientTestingModule } from '@angular/common/http/testing';
|
import { provideHttpClientTesting } from '@angular/common/http/testing';
|
||||||
import { NotificationCloudService } from '../../../services/notification-cloud.service';
|
import { NotificationCloudService } from '../../../services/notification-cloud.service';
|
||||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||||
import { IdentityUserService } from '../../../people/services/identity-user.service';
|
import { IdentityUserService } from '../../../people/services/identity-user.service';
|
||||||
import { ApolloModule } from 'apollo-angular';
|
import { ApolloModule } from 'apollo-angular';
|
||||||
import { StorageService } from '@alfresco/adf-core';
|
import { StorageService } from '@alfresco/adf-core';
|
||||||
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
|
|
||||||
describe('TaskFilterCloudService', () => {
|
describe('TaskFilterCloudService', () => {
|
||||||
let service: TaskFilterCloudService;
|
let service: TaskFilterCloudService;
|
||||||
@@ -46,17 +47,20 @@ describe('TaskFilterCloudService', () => {
|
|||||||
let createPreferenceSpy: jasmine.Spy;
|
let createPreferenceSpy: jasmine.Spy;
|
||||||
let getCurrentUserInfoSpy: jasmine.Spy;
|
let getCurrentUserInfoSpy: jasmine.Spy;
|
||||||
|
|
||||||
const identityUserMock = { username: 'fakeusername', firstName: 'fake-identity-first-name', lastName: 'fake-identity-last-name', email: 'fakeIdentity@email.com' };
|
const identityUserMock = {
|
||||||
|
username: 'fakeusername',
|
||||||
|
firstName: 'fake-identity-first-name',
|
||||||
|
lastName: 'fake-identity-last-name',
|
||||||
|
email: 'fakeIdentity@email.com'
|
||||||
|
};
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [
|
imports: [ProcessServiceCloudTestingModule, ApolloModule],
|
||||||
HttpClientTestingModule,
|
|
||||||
ProcessServiceCloudTestingModule,
|
|
||||||
ApolloModule
|
|
||||||
],
|
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService }
|
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: UserPreferenceCloudService },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(TaskFilterCloudService);
|
service = TestBed.inject(TaskFilterCloudService);
|
||||||
@@ -245,13 +249,20 @@ describe('Inject [LocalPreferenceCloudService] into the TaskFilterCloudService',
|
|||||||
let getPreferencesSpy: jasmine.Spy;
|
let getPreferencesSpy: jasmine.Spy;
|
||||||
let storageService: StorageService;
|
let storageService: StorageService;
|
||||||
|
|
||||||
const identityUserMock = { username: 'fakeusername', firstName: 'fake-identity-first-name', lastName: 'fake-identity-last-name', email: 'fakeIdentity@email.com' };
|
const identityUserMock = {
|
||||||
|
username: 'fakeusername',
|
||||||
|
firstName: 'fake-identity-first-name',
|
||||||
|
lastName: 'fake-identity-last-name',
|
||||||
|
email: 'fakeIdentity@email.com'
|
||||||
|
};
|
||||||
|
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
TestBed.configureTestingModule({
|
TestBed.configureTestingModule({
|
||||||
imports: [HttpClientTestingModule, ProcessServiceCloudTestingModule, ApolloModule],
|
imports: [ProcessServiceCloudTestingModule, ApolloModule],
|
||||||
providers: [
|
providers: [
|
||||||
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }
|
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService },
|
||||||
|
provideHttpClient(withInterceptorsFromDi()),
|
||||||
|
provideHttpClientTesting()
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
service = TestBed.inject(TaskFilterCloudService);
|
service = TestBed.inject(TaskFilterCloudService);
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ import { CommonModule } from '@angular/common';
|
|||||||
import { TaskFiltersCloudComponent } from './components/task-filters-cloud.component';
|
import { TaskFiltersCloudComponent } from './components/task-filters-cloud.component';
|
||||||
import { MaterialModule } from '../../material.module';
|
import { MaterialModule } from '../../material.module';
|
||||||
import { CoreModule } from '@alfresco/adf-core';
|
import { CoreModule } from '@alfresco/adf-core';
|
||||||
import { HttpClientModule } from '@angular/common/http';
|
import { provideHttpClient, withInterceptorsFromDi } from '@angular/common/http';
|
||||||
import { AppListCloudModule } from './../../app/app-list-cloud.module';
|
import { AppListCloudModule } from './../../app/app-list-cloud.module';
|
||||||
import { ProcessCommonModule } from '../../common/process-common.module';
|
import { ProcessCommonModule } from '../../common/process-common.module';
|
||||||
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
import { PeopleCloudModule } from '../../people/people-cloud.module';
|
||||||
@@ -34,10 +34,18 @@ import { GroupCloudModule } from '../../group/group-cloud.module';
|
|||||||
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
||||||
|
|
||||||
@NgModule({
|
@NgModule({
|
||||||
|
declarations: [
|
||||||
|
TaskFiltersCloudComponent,
|
||||||
|
ServiceTaskFiltersCloudComponent,
|
||||||
|
EditTaskFilterCloudComponent,
|
||||||
|
EditServiceTaskFilterCloudComponent,
|
||||||
|
TaskFilterDialogCloudComponent,
|
||||||
|
TaskAssignmentFilterCloudComponent
|
||||||
|
],
|
||||||
|
exports: [TaskFiltersCloudComponent, ServiceTaskFiltersCloudComponent, EditTaskFilterCloudComponent, EditServiceTaskFilterCloudComponent],
|
||||||
imports: [
|
imports: [
|
||||||
FormsModule,
|
FormsModule,
|
||||||
ReactiveFormsModule,
|
ReactiveFormsModule,
|
||||||
HttpClientModule,
|
|
||||||
CommonModule,
|
CommonModule,
|
||||||
MaterialModule,
|
MaterialModule,
|
||||||
AppListCloudModule,
|
AppListCloudModule,
|
||||||
@@ -47,14 +55,6 @@ import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|||||||
PeopleCloudModule,
|
PeopleCloudModule,
|
||||||
MatProgressSpinnerModule
|
MatProgressSpinnerModule
|
||||||
],
|
],
|
||||||
declarations: [
|
providers: [provideHttpClient(withInterceptorsFromDi())]
|
||||||
TaskFiltersCloudComponent,
|
|
||||||
ServiceTaskFiltersCloudComponent,
|
|
||||||
EditTaskFilterCloudComponent,
|
|
||||||
EditServiceTaskFilterCloudComponent,
|
|
||||||
TaskFilterDialogCloudComponent,
|
|
||||||
TaskAssignmentFilterCloudComponent
|
|
||||||
],
|
|
||||||
exports: [TaskFiltersCloudComponent, ServiceTaskFiltersCloudComponent, EditTaskFilterCloudComponent, EditServiceTaskFilterCloudComponent]
|
|
||||||
})
|
})
|
||||||
export class TaskFiltersCloudModule {}
|
export class TaskFiltersCloudModule {}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/process-services/**/*.ts", "lib/process-services/**/*.html"]
|
"lintFilePatterns": ["lib/process-services/**/*.ts", "lib/process-services/**/*.html"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,4 +2,4 @@ export const parameters = {
|
|||||||
docs: { inlineStories: true },
|
docs: { inlineStories: true },
|
||||||
controls: { expanded: true }
|
controls: { expanded: true }
|
||||||
};
|
};
|
||||||
export const tags = ["autodocs"];
|
export const tags = ['autodocs', 'autodocs'];
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
"projectRoot": "lib/testing",
|
"projectRoot": "lib/testing",
|
||||||
"outputPath": "dist/libs/testing",
|
"outputPath": "dist/libs/testing",
|
||||||
"main": "lib/testing/index.ts",
|
"main": "lib/testing/index.ts",
|
||||||
"generatePackageJson": true,
|
|
||||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json",
|
"tsConfig": "lib/testing/tsconfig.lib.prod.json",
|
||||||
|
"webpackConfig": "lib/testing/webpack.config.js",
|
||||||
"stylePreprocessorOptions": {
|
"stylePreprocessorOptions": {
|
||||||
"includePaths": ["lib", "lib/core/src/lib"]
|
"includePaths": ["lib", "lib/core/src/lib"]
|
||||||
},
|
},
|
||||||
@@ -24,14 +24,14 @@
|
|||||||
"projectRoot": "lib/testing",
|
"projectRoot": "lib/testing",
|
||||||
"outputPath": "dist/libs/testing",
|
"outputPath": "dist/libs/testing",
|
||||||
"main": "lib/testing/index.ts",
|
"main": "lib/testing/index.ts",
|
||||||
"generatePackageJson": true,
|
"tsConfig": "lib/testing/tsconfig.lib.prod.json",
|
||||||
"tsConfig": "lib/testing/tsconfig.lib.prod.json"
|
"webpackConfig": "lib/testing/webpack.config.js"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"defaultConfiguration": "production"
|
"defaultConfiguration": "production"
|
||||||
},
|
},
|
||||||
"lint": {
|
"lint": {
|
||||||
"executor": "@nrwl/linter:eslint",
|
"executor": "@nx/eslint:lint:eslint",
|
||||||
"options": {
|
"options": {
|
||||||
"lintFilePatterns": ["lib/testing/**/*.ts", "lib/testing/**/*.html"]
|
"lintFilePatterns": ["lib/testing/**/*.ts", "lib/testing/**/*.html"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,20 @@
|
|||||||
|
const { NxAppWebpackPlugin } = require('@nx/webpack/app-plugin');
|
||||||
|
const { join } = require('path');
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
output: {
|
||||||
|
path: join(__dirname, '../../dist/libs/testing')
|
||||||
|
},
|
||||||
|
devServer: {
|
||||||
|
port: 4200
|
||||||
|
},
|
||||||
|
plugins: [
|
||||||
|
new NxAppWebpackPlugin({
|
||||||
|
main: './src/index.ts',
|
||||||
|
tsConfig: './tsconfig.lib.json',
|
||||||
|
index: './src/index.ts',
|
||||||
|
outputHashing: process.env['NODE_ENV'] === 'production' ? 'all' : 'none',
|
||||||
|
optimization: process.env['NODE_ENV'] === 'production'
|
||||||
|
})
|
||||||
|
]
|
||||||
|
};
|
||||||
+204
-208
@@ -2,311 +2,307 @@
|
|||||||
"migrations": [
|
"migrations": [
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.0",
|
"version": "17.0.0-beta.1",
|
||||||
"description": "Remove @nrwl/cli.",
|
"description": "Updates the default cache directory to .nx/cache",
|
||||||
"implementation": "./src/migrations/update-16-0-0/remove-nrwl-cli",
|
"implementation": "./src/migrations/update-17-0-0/move-cache-directory",
|
||||||
"package": "nx",
|
"package": "nx",
|
||||||
"name": "16.0.0-remove-nrwl-cli"
|
"name": "17.0.0-move-cache-directory"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.9",
|
"version": "17.0.0-beta.3",
|
||||||
"description": "Replace `dependsOn.projects` and `inputs` definitions with new configuration format.",
|
"description": "Use minimal config for tasksRunnerOptions",
|
||||||
"implementation": "./src/migrations/update-16-0-0/update-depends-on-to-tokens",
|
"implementation": "./src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options",
|
||||||
"package": "nx",
|
"package": "nx",
|
||||||
"name": "16.0.0-tokens-for-depends-on"
|
"name": "17.0.0-use-minimal-config-for-tasks-runner-options"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"version": "17.0.0-rc.1",
|
||||||
"version": "16.0.0-beta.0",
|
"description": "Migration for v17.0.0-rc.1",
|
||||||
"description": "Replace @nrwl/nx-cloud with nx-cloud",
|
"implementation": "./src/migrations/update-17-0-0/rm-default-collection-npm-scope",
|
||||||
"implementation": "./src/migrations/update-16-0-0/update-nx-cloud-runner",
|
|
||||||
"package": "nx",
|
"package": "nx",
|
||||||
"name": "16.0.0-update-nx-cloud-runner"
|
"name": "rm-default-collection-npm-scope"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.2.0-beta.0",
|
"version": "17.3.0-beta.6",
|
||||||
"description": "Remove outputPath from run commands",
|
"description": "Updates the nx wrapper.",
|
||||||
"implementation": "./src/migrations/update-16-2-0/remove-run-commands-output-path",
|
"implementation": "./src/migrations/update-17-3-0/update-nxw",
|
||||||
"package": "nx",
|
"package": "nx",
|
||||||
"name": "16.2.0-remove-output-path-from-run-commands"
|
"name": "17.3.0-update-nx-wrapper"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.6.0-beta.6",
|
"version": "18.0.0-beta.2",
|
||||||
"description": "Prefix outputs with {workspaceRoot}/{projectRoot} if needed",
|
"description": "Updates nx.json to disabled adding plugins when generating projects in an existing Nx workspace",
|
||||||
"implementation": "./src/migrations/update-15-0-0/prefix-outputs",
|
"implementation": "./src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces",
|
||||||
|
"x-repair-skip": true,
|
||||||
"package": "nx",
|
"package": "nx",
|
||||||
"name": "16.6.0-prefix-outputs"
|
"name": "18.0.0-disable-adding-plugins-for-existing-workspaces"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"version": "18.1.0-beta.3",
|
||||||
"version": "16.8.0-beta.3",
|
"description": "Moves affected.defaultBase to defaultBase in `nx.json`",
|
||||||
"description": "Escape $ in env variables",
|
"implementation": "./src/migrations/update-17-2-0/move-default-base",
|
||||||
"implementation": "./src/migrations/update-16-8-0/escape-dollar-sign-env-variables",
|
|
||||||
"package": "nx",
|
"package": "nx",
|
||||||
"name": "16.8.0-escape-dollar-sign-env"
|
"name": "move-default-base-to-nx-json-root"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.1",
|
"version": "19.2.0-beta.2",
|
||||||
"description": "Replace @nx/workspace with @nx/workspace",
|
"description": "Updates the default workspace data directory to .nx/workspace-data",
|
||||||
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
|
"implementation": "./src/migrations/update-19-2-0/move-workspace-data-directory",
|
||||||
"package": "@nx/workspace",
|
"package": "nx",
|
||||||
"name": "update-16-0-0-add-nx-packages"
|
"name": "19-2-0-move-graph-cache-directory"
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "16.0.0-beta.4",
|
|
||||||
"description": "Generates a plugin called 'workspace-plugin' containing your workspace generators.",
|
|
||||||
"cli": "nx",
|
|
||||||
"implementation": "./src/migrations/update-16-0-0/move-workspace-generators-to-local-plugin",
|
|
||||||
"package": "@nx/workspace",
|
|
||||||
"name": "16-0-0-move-workspace-generators-into-local-plugin"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"version": "16.0.0-beta.9",
|
|
||||||
"description": "Fix .babelrc presets if it contains an invalid entry for @nx/web/babel.",
|
|
||||||
"cli": "nx",
|
|
||||||
"implementation": "./src/migrations/update-16-0-0/fix-invalid-babelrc",
|
|
||||||
"package": "@nx/workspace",
|
|
||||||
"name": "16-0-0-fix-invalid-babelrc"
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.1",
|
"version": "19.2.2-beta.0",
|
||||||
"description": "Replace @nx/js with @nx/js",
|
"description": "Updates the nx wrapper.",
|
||||||
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
|
"implementation": "./src/migrations/update-17-3-0/update-nxw",
|
||||||
|
"package": "nx",
|
||||||
|
"name": "19-2-2-update-nx-wrapper"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "19.2.4-beta.0",
|
||||||
|
"description": "Set project name in nx.json explicitly",
|
||||||
|
"implementation": "./src/migrations/update-19-2-4/set-project-name",
|
||||||
|
"x-repair-skip": true,
|
||||||
|
"package": "nx",
|
||||||
|
"name": "19-2-4-set-project-name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cli": "nx",
|
||||||
|
"version": "19.6.0-beta.0",
|
||||||
|
"description": "Update workspace to use Storybook v8",
|
||||||
|
"implementation": "./src/migrations/update-19-6-0/update-sb-8",
|
||||||
|
"package": "@nx/storybook",
|
||||||
|
"name": "update-19-6-0-add-nx-packages"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cli": "nx",
|
||||||
|
"version": "17.0.2",
|
||||||
|
"description": "Remove deprecated build options",
|
||||||
|
"implementation": "./src/migrations/update-17-0-0/remove-deprecated-build-options",
|
||||||
"package": "@nx/js",
|
"package": "@nx/js",
|
||||||
"name": "update-16-0-0-add-nx-packages"
|
"name": "update-17-0-0-remove-deprecated-build-options"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.6.0-beta.0",
|
"version": "17.2.6-beta.1",
|
||||||
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
|
"description": "Rename workspace rules from @nx/workspace/name to @nx/workspace-name",
|
||||||
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
|
"implementation": "./src/migrations/update-17-2-6-rename-workspace-rules/rename-workspace-rules",
|
||||||
"package": "@nx/js",
|
|
||||||
"name": "explicitly-set-projects-to-update-buildable-deps"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.8.2-beta.0",
|
|
||||||
"description": "Remove invalid options (strict, noInterop) for ES6 type modules.",
|
|
||||||
"factory": "./src/migrations/update-16-8-2/update-swcrc",
|
|
||||||
"package": "@nx/js",
|
|
||||||
"name": "16-8-2-update-swcrc"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.0.0-beta.1",
|
|
||||||
"description": "Replace @nx/storybook with @nx/storybook",
|
|
||||||
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
|
|
||||||
"package": "@nx/storybook",
|
|
||||||
"name": "update-16-0-0-add-nx-packages"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.0.0-beta.1",
|
|
||||||
"description": "Update workspace to use Storybook v7",
|
|
||||||
"implementation": "./src/migrations/update-16-0-0/update-sb-7",
|
|
||||||
"package": "@nx/storybook",
|
|
||||||
"name": "update-16-0-0-migrate-7"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.1.0-beta.0",
|
|
||||||
"description": "Ignore @nx/react/plugins/storybook in Storybook eslint rules.",
|
|
||||||
"factory": "./src/migrations/update-16-1-0/eslint-ignore-react-plugin",
|
|
||||||
"package": "@nx/storybook",
|
|
||||||
"name": "update-16-1-0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.5.0-beta.0",
|
|
||||||
"description": "Move .storybook/tsconfig.json to tsconfig.storybook.json for non-Angular projects.",
|
|
||||||
"factory": "./src/migrations/update-16-5-0/move-storybook-tsconfig",
|
|
||||||
"package": "@nx/storybook",
|
|
||||||
"name": "update-16-5-0"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.0.0-beta.1",
|
|
||||||
"description": "Replace @nx/eslint-plugin with @nx/eslint-plugin",
|
|
||||||
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
|
|
||||||
"package": "@nx/eslint-plugin",
|
"package": "@nx/eslint-plugin",
|
||||||
"name": "update-16-0-0-add-nx-packages"
|
"name": "update-17-2-6-rename-workspace-rules"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.1",
|
"version": "19.1.0-beta.6",
|
||||||
"description": "Replace @nx/node with @nx/node",
|
"description": "Migrate no-extra-semi rules into user config, out of nx extendable configs",
|
||||||
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
|
"implementation": "./src/migrations/update-19-1-0-migrate-no-extra-semi/migrate-no-extra-semi",
|
||||||
"package": "@nx/node",
|
"package": "@nx/eslint-plugin",
|
||||||
"name": "update-16-0-0-add-nx-packages"
|
"name": "update-19-1-0-rename-no-extra-semi"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.5",
|
"version": "17.1.0-beta.5",
|
||||||
"description": "Replace @nx/node:webpack with @nx/node:webpack",
|
"requires": { "@angular/core": ">=17.0.0" },
|
||||||
"implementation": "./src/migrations/update-16-0-0/update-webpack-executor",
|
"description": "Update the @angular/cli package version to ~17.0.0.",
|
||||||
"package": "@nx/node",
|
"factory": "./src/migrations/update-17-1-0/update-angular-cli",
|
||||||
"name": "update-16-0-0-update-executor"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.3.1-beta.0",
|
|
||||||
"description": "Replace @nx/node:webpack and @nx/node:webpack with @nx/webpack:webpack for all project targets",
|
|
||||||
"implementation": "./src/migrations/update-16-3-1/update-webpack-executor",
|
|
||||||
"package": "@nx/node",
|
|
||||||
"name": "update-16-3-1-update-executor"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.4.0-beta.8",
|
|
||||||
"description": "Replace @nx/node:node with @nx/js:node for all project targets",
|
|
||||||
"implementation": "./src/migrations/update-16-4-0/replace-node-executor",
|
|
||||||
"package": "@nx/node",
|
|
||||||
"name": "update-16-4-0-replace-node-executor"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"cli": "nx",
|
|
||||||
"version": "16.0.0-beta.1",
|
|
||||||
"description": "Replace the deprecated library generator 'simpleModuleName' option from generator defaults with 'simpleName'",
|
|
||||||
"factory": "./src/migrations/update-16-0-0/remove-library-generator-simple-module-name-option",
|
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "remove-library-generator-simple-module-name-option"
|
"name": "update-angular-cli-version-17-0-0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.1",
|
"version": "17.1.0-beta.5",
|
||||||
"description": "Replace @nx/angular with @nx/angular",
|
"requires": { "@angular/core": ">=17.0.0" },
|
||||||
"implementation": "./src/migrations/update-16-0-0-add-nx-packages/update-16-0-0-add-nx-packages",
|
"description": "Rename 'browserTarget' to 'buildTarget'.",
|
||||||
|
"factory": "./src/migrations/update-17-1-0/browser-target-to-build-target",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "update-16-0-0-add-nx-packages"
|
"name": "rename-browser-target-to-build-target"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.6",
|
"version": "17.1.0-beta.5",
|
||||||
"description": "Remove protractor as default e2eTestRunner from nxJson and project configurations",
|
"requires": { "@angular/core": ">=17.0.0" },
|
||||||
"implementation": "./src/migrations/update-16-0-0/remove-protractor-defaults",
|
"description": "Replace usages of '@nguniversal/builders' with '@angular-devkit/build-angular'.",
|
||||||
|
"factory": "./src/migrations/update-17-1-0/replace-nguniversal-builders",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "remove-protractor-defaults-from-generators"
|
"name": "replace-nguniversal-builders"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.0.0-beta.6",
|
"version": "17.1.0-beta.5",
|
||||||
"description": "Remove karma as default unitTestRunner from nxJson and project configurations",
|
"requires": { "@angular/core": ">=17.0.0" },
|
||||||
"implementation": "./src/migrations/update-16-0-0/remove-karma-defaults",
|
"description": "Replace usages of '@nguniversal/' packages with '@angular/ssr'.",
|
||||||
|
"factory": "./src/migrations/update-17-1-0/replace-nguniversal-engines",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "remove-karma-defaults-from-generators"
|
"name": "replace-nguniversal-engines"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.1.0-beta.1",
|
"version": "17.1.0-beta.5",
|
||||||
"requires": { "@angular/core": ">=15.0.0" },
|
"requires": { "@angular/core": ">=17.0.0" },
|
||||||
"description": "Remove exported `@angular/platform-server` `renderModule` method. The `renderModule` method is now exported by the Angular CLI.",
|
"description": "Replace the deep imports from 'zone.js/dist/zone' and 'zone.js/dist/zone-testing' with 'zone.js' and 'zone.js/testing'.",
|
||||||
"factory": "./src/migrations/update-16-1-0/remove-render-module-platform-server-exports",
|
"factory": "./src/migrations/update-17-1-0/update-zone-js-deep-import",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "remove-render-module-platform-server-exports"
|
"name": "update-zone-js-deep-import"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.1.0-beta.1",
|
"version": "17.2.0-beta.2",
|
||||||
"requires": { "@angular/core": ">=16.0.0-rc.4" },
|
"description": "Rename '@nx/angular:webpack-dev-server' executor to '@nx/angular:dev-server'",
|
||||||
"description": "Remove 'ngcc' invocation if exists from the 'postinstall' script in package.json.",
|
"factory": "./src/migrations/update-17-2-0/rename-webpack-dev-server",
|
||||||
"factory": "./src/migrations/update-16-1-0/remove-ngcc-invocation",
|
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "remove-ngcc-invocation"
|
"name": "rename-webpack-dev-server-executor"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.1.0-beta.1",
|
"version": "17.3.0-beta.10",
|
||||||
"requires": { "@angular/core": ">=16.0.0-rc.4" },
|
"requires": { "@angular/core": ">=17.1.0" },
|
||||||
"description": "Extract the app config for standalone apps",
|
"description": "Update the @angular/cli package version to ~17.1.0.",
|
||||||
"factory": "./src/migrations/update-16-1-0/extract-standalone-config-from-bootstrap",
|
"factory": "./src/migrations/update-17-3-0/update-angular-cli",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "extract-app-config-for-standalone"
|
"name": "update-angular-cli-version-17-1-0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.1.0-beta.1",
|
"version": "17.3.0-beta.10",
|
||||||
"requires": { "@angular/core": ">=16.0.0-rc.4" },
|
"requires": { "@angular/core": ">=17.1.0" },
|
||||||
"description": "Update server executors' configuration to disable 'buildOptimizer' for non optimized builds.",
|
"description": "Add 'browser-sync' as dev dependency when '@angular-devkit/build-angular:ssr-dev-server' or '@nx/angular:module-federation-dev-ssr' is used.",
|
||||||
"factory": "./src/migrations/update-16-1-0/update-server-executor-config",
|
"factory": "./src/migrations/update-17-3-0/add-browser-sync-dependency",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "update-server-executor-config"
|
"name": "add-browser-sync-dependency"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.1.0-beta.1",
|
"version": "17.3.0-beta.10",
|
||||||
"requires": { "@angular/core": ">=16.0.0" },
|
"requires": { "@angular/core": ">=17.1.0" },
|
||||||
"description": "Update the @angular/cli package version to ~16.0.0.",
|
"description": "Add 'autoprefixer' as dev dependency when '@nx/angular:ng-packagr-lite' or '@nx/angular:package` is used.",
|
||||||
"factory": "./src/migrations/update-16-1-0/update-angular-cli",
|
"factory": "./src/migrations/update-17-3-0/add-autoprefixer-dependency",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "update-angular-cli-version-16-0-0"
|
"name": "add-autoprefixer-dependency"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.4.0-beta.6",
|
"version": "18.0.0-beta.0",
|
||||||
"requires": { "@angular-eslint/eslint-plugin-template": ">=16.0.0" },
|
"description": "Add NX_MF_DEV_SERVER_STATIC_REMOTES to inputs for task hashing when '@nx/angular:webpack-browser' is used for Module Federation.",
|
||||||
"description": "Remove the 'accessibility-' prefix from '@angular-eslint/eslint-plugin-template' rules.",
|
"factory": "./src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults",
|
||||||
"factory": "./src/migrations/update-16-4-0/rename-angular-eslint-accesibility-rules",
|
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "rename-angular-eslint-accesibility-rules"
|
"name": "add-module-federation-env-var-to-target-defaults"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.4.0-beta.11",
|
"version": "18.1.0-beta.1",
|
||||||
"requires": { "@angular/core": ">=16.1.0" },
|
"requires": { "@angular/core": ">=17.2.0" },
|
||||||
"description": "Update the @angular/cli package version to ~16.1.0.",
|
"description": "Update the @angular/cli package version to ~17.2.0.",
|
||||||
"factory": "./src/migrations/update-16-4-0/update-angular-cli",
|
"factory": "./src/migrations/update-18-1-0/update-angular-cli",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "update-angular-cli-version-16-1-0"
|
"name": "update-angular-cli-version-17-2-0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.6.0-beta.0",
|
"version": "18.1.1-beta.0",
|
||||||
"description": "Explicitly set 'updateBuildableProjectDepsInPackageJson' to 'true' in targets that rely on that value as the default.",
|
"description": "Ensure targetDefaults inputs for task hashing when '@nx/angular:webpack-browser' is used are correct for Module Federation.",
|
||||||
"factory": "./src/migrations/update-16-6-0/explicitly-set-projects-to-update-buildable-deps",
|
"factory": "./src/migrations/update-18-1-1/fix-target-defaults-inputs",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "explicitly-set-projects-to-update-buildable-deps"
|
"name": "fix-target-defaults-for-webpack-browser"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"cli": "nx",
|
"cli": "nx",
|
||||||
"version": "16.7.0-beta.6",
|
"version": "18.2.0-beta.0",
|
||||||
"requires": { "@angular/core": ">=16.2.0" },
|
"requires": { "@angular/core": ">=17.3.0" },
|
||||||
"description": "Update the @angular/cli package version to ~16.2.0.",
|
"description": "Update the @angular/cli package version to ~17.3.0.",
|
||||||
"factory": "./src/migrations/update-16-7-0/update-angular-cli",
|
"factory": "./src/migrations/update-18-2-0/update-angular-cli",
|
||||||
"package": "@nx/angular",
|
"package": "@nx/angular",
|
||||||
"name": "update-angular-cli-version-16-2-0"
|
"name": "update-angular-cli-version-17-3-0"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "16.0.0",
|
"cli": "nx",
|
||||||
"description": "As of Angular v16, the `moduleId` property of `@Component` is deprecated as it no longer has any effect.",
|
"version": "19.1.0-beta.2",
|
||||||
"factory": "./migrations/remove-module-id/bundle",
|
"requires": { "@angular/core": ">=18.0.0" },
|
||||||
|
"description": "Update the @angular/cli package version to ~18.0.0.",
|
||||||
|
"factory": "./src/migrations/update-19-1-0/update-angular-cli",
|
||||||
|
"package": "@nx/angular",
|
||||||
|
"name": "update-angular-cli-version-18-0-0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cli": "nx",
|
||||||
|
"version": "19.2.1-beta.0",
|
||||||
|
"requires": { "@angular-eslint/eslint-plugin": ">=18.0.0" },
|
||||||
|
"description": "Installs the '@typescript-eslint/utils' package when having installed '@angular-eslint/eslint-plugin' or '@angular-eslint/eslint-plugin-template' with version >=18.0.0.",
|
||||||
|
"factory": "./src/migrations/update-19-2-1/add-typescript-eslint-utils",
|
||||||
|
"package": "@nx/angular",
|
||||||
|
"name": "add-typescript-eslint-utils"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cli": "nx",
|
||||||
|
"version": "19.5.0-beta.1",
|
||||||
|
"requires": { "@angular/core": ">=18.1.0" },
|
||||||
|
"description": "Update the @angular/cli package version to ~18.1.0.",
|
||||||
|
"factory": "./src/migrations/update-19-5-0/update-angular-cli",
|
||||||
|
"package": "@nx/angular",
|
||||||
|
"name": "update-angular-cli-version-18-1-0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cli": "nx",
|
||||||
|
"version": "19.6.0-beta.4",
|
||||||
|
"description": "Ensure Module Federation DTS is turned off by default.",
|
||||||
|
"factory": "./src/migrations/update-19-6-0/turn-off-dts-by-default",
|
||||||
|
"package": "@nx/angular",
|
||||||
|
"name": "update-19-6-0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cli": "nx",
|
||||||
|
"version": "19.6.0-beta.7",
|
||||||
|
"requires": { "@angular/core": ">=18.2.0" },
|
||||||
|
"description": "Update the @angular/cli package version to ~18.2.0.",
|
||||||
|
"factory": "./src/migrations/update-19-6-0/update-angular-cli",
|
||||||
|
"package": "@nx/angular",
|
||||||
|
"name": "update-angular-cli-version-18-2-0"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"cli": "nx",
|
||||||
|
"version": "19.6.1-beta.0",
|
||||||
|
"description": "Ensure Target Defaults are set correctly for Module Federation.",
|
||||||
|
"factory": "./src/migrations/update-19-6-1/ensure-depends-on-for-mf",
|
||||||
|
"package": "@nx/angular",
|
||||||
|
"name": "update-19-6-1-ensure-module-federation-target-defaults"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "18.0.0",
|
||||||
|
"description": "Updates two-way bindings that have an invalid expression to use the longform expression instead.",
|
||||||
|
"factory": "./migrations/invalid-two-way-bindings/bundle",
|
||||||
"package": "@angular/core",
|
"package": "@angular/core",
|
||||||
"name": "migration-v16-remove-module-id"
|
"name": "invalid-two-way-bindings"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "16.0.0",
|
"version": "18.0.0",
|
||||||
"description": "In Angular version 15.2, the guard and resolver interfaces (CanActivate, Resolve, etc) were deprecated. This migration removes imports and 'implements' clauses that contain them.",
|
"description": "Replace deprecated HTTP related modules with provider functions",
|
||||||
"factory": "./migrations/guard-and-resolve-interfaces/bundle",
|
"factory": "./migrations/http-providers/bundle",
|
||||||
"package": "@angular/core",
|
"package": "@angular/core",
|
||||||
"name": "migration-v16-guard-and-resolve-interfaces"
|
"name": "migration-http-providers"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "16.0.0-0",
|
"version": "18.1.0",
|
||||||
"description": "Updates the Angular Material to v16",
|
"description": "Updates calls to afterRender with an explicit phase to the new API",
|
||||||
"factory": "./ng-update/index_bundled#updateToV16",
|
"factory": "./migrations/after-render-phase/bundle",
|
||||||
|
"package": "@angular/core",
|
||||||
|
"name": "migration-after-render-phase"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"version": "18.0.0-0",
|
||||||
|
"description": "Updates Angular Material to v18",
|
||||||
|
"factory": "./ng-update/index_bundled#updateToV18",
|
||||||
"package": "@angular/material",
|
"package": "@angular/material",
|
||||||
"name": "migration-v16"
|
"name": "migration-v18"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"version": "16.0.0-0",
|
"version": "18.0.0-0",
|
||||||
"description": "Updates the Angular CDK to v16",
|
"description": "Updates the Angular CDK to v18",
|
||||||
"factory": "./ng-update/index#updateToV16",
|
"factory": "./ng-update/index#updateToV18",
|
||||||
"package": "@angular/cdk",
|
"package": "@angular/cdk",
|
||||||
"name": "migration-v16"
|
"name": "migration-v18"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,25 +1,28 @@
|
|||||||
{
|
{
|
||||||
"npmScope": "adf",
|
|
||||||
"defaultProject": "demoshell",
|
"defaultProject": "demoshell",
|
||||||
"affected": {
|
|
||||||
"defaultBase": "develop"
|
|
||||||
},
|
|
||||||
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
"$schema": "./node_modules/nx/schemas/nx-schema.json",
|
||||||
"targetDefaults": {
|
"targetDefaults": {
|
||||||
"build": {
|
"build": {
|
||||||
"dependsOn": ["^build"],
|
"dependsOn": ["^build"],
|
||||||
"inputs": ["production", "^production"]
|
"inputs": ["production", "^production"],
|
||||||
|
"cache": true
|
||||||
},
|
},
|
||||||
"build-storybook": {
|
"build-storybook": {
|
||||||
"inputs": ["default", "^production", "{projectRoot}/.storybook/**/*", "{projectRoot}/tsconfig.storybook.json"]
|
"inputs": ["default", "^production", "{projectRoot}/.storybook/**/*", "{projectRoot}/tsconfig.storybook.json"]
|
||||||
|
},
|
||||||
|
"lint": {
|
||||||
|
"cache": true
|
||||||
|
},
|
||||||
|
"test": {
|
||||||
|
"cache": true
|
||||||
|
},
|
||||||
|
"stylelint": {
|
||||||
|
"cache": true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tasksRunnerOptions": {
|
"tasksRunnerOptions": {
|
||||||
"default": {
|
"default": {
|
||||||
"runner": "nx/tasks-runners/default",
|
|
||||||
"options": {
|
"options": {
|
||||||
"cacheableOperations": ["build", "lint", "test", "stylelint"],
|
|
||||||
"cacheDirectory": "nxcache",
|
|
||||||
"runtimeCacheInputs": ["node -v"]
|
"runtimeCacheInputs": ["node -v"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,5 +44,8 @@
|
|||||||
"!{projectRoot}/karma.conf.js",
|
"!{projectRoot}/karma.conf.js",
|
||||||
"!{projectRoot}/tsconfig.storybook.json"
|
"!{projectRoot}/tsconfig.storybook.json"
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
"cacheDirectory": "nxcache",
|
||||||
|
"useInferencePlugins": false,
|
||||||
|
"defaultBase": "develop"
|
||||||
}
|
}
|
||||||
|
|||||||
Generated
+6419
-8930
File diff suppressed because it is too large
Load Diff
+50
-48
@@ -51,26 +51,27 @@
|
|||||||
"process services-cloud"
|
"process services-cloud"
|
||||||
],
|
],
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@angular/animations": "16.2.9",
|
"@angular/animations": "18.2.2",
|
||||||
"@angular/cdk": "16.2.9",
|
"@angular/cdk": "18.2.2",
|
||||||
"@angular/common": "16.2.9",
|
"@angular/common": "18.2.2",
|
||||||
"@angular/compiler": "16.2.9",
|
"@angular/compiler": "18.2.2",
|
||||||
"@angular/core": "16.2.9",
|
"@angular/core": "18.2.2",
|
||||||
"@angular/forms": "16.2.9",
|
"@angular/forms": "18.2.2",
|
||||||
"@angular/material": "16.2.9",
|
"@angular/material": "18.2.2",
|
||||||
"@angular/material-date-fns-adapter": "16.2.9",
|
"@angular/material-date-fns-adapter": "18.2.2",
|
||||||
"@angular/platform-browser": "16.2.9",
|
"@angular/platform-browser": "18.2.2",
|
||||||
"@angular/platform-browser-dynamic": "16.2.9",
|
"@angular/platform-browser-dynamic": "18.2.2",
|
||||||
"@angular/router": "16.2.9",
|
"@angular/router": "18.2.2",
|
||||||
"@apollo/client": "^3.10.2",
|
"@apollo/client": "^3.10.2",
|
||||||
"@cspell/eslint-plugin": "^7.3.6",
|
"@cspell/eslint-plugin": "^7.3.6",
|
||||||
"@mat-datetimepicker/core": "12.0.1",
|
"@mat-datetimepicker/core": "14.0.0",
|
||||||
"@ngx-translate/core": "^14.0.0",
|
"@ngx-translate/core": "^14.0.0",
|
||||||
"@storybook/core-server": "^8.2.7",
|
"@storybook/addon-interactions": "^8.2.9",
|
||||||
"@storybook/theming": "^8.2.7",
|
"@storybook/core-server": "^8.2.9",
|
||||||
|
"@storybook/theming": "^8.2.9",
|
||||||
"angular-oauth2-oidc": "^13.0.1",
|
"angular-oauth2-oidc": "^13.0.1",
|
||||||
"angular-oauth2-oidc-jwks": "^17.0.2",
|
"angular-oauth2-oidc-jwks": "^17.0.2",
|
||||||
"apollo-angular": "^5.0.2",
|
"apollo-angular": "7.1.2",
|
||||||
"chart.js": "^4.3.0",
|
"chart.js": "^4.3.0",
|
||||||
"cropperjs": "1.6.2",
|
"cropperjs": "1.6.2",
|
||||||
"date-fns": "^2.30.0",
|
"date-fns": "^2.30.0",
|
||||||
@@ -78,29 +79,29 @@
|
|||||||
"event-emitter": "^0.3.5",
|
"event-emitter": "^0.3.5",
|
||||||
"material-icons": "^1.13.12",
|
"material-icons": "^1.13.12",
|
||||||
"minimatch-browser": "1.0.0",
|
"minimatch-browser": "1.0.0",
|
||||||
"monaco-editor": "0.41.0",
|
"monaco-editor": "0.50.0",
|
||||||
"ng2-charts": "^4.1.1",
|
"ng2-charts": "^4.1.1",
|
||||||
"ngx-monaco-editor-v2": "16.0.1",
|
"ngx-monaco-editor-v2": "18.1.0",
|
||||||
"pdfjs-dist": "3.3.122",
|
"pdfjs-dist": "3.3.122",
|
||||||
"raphael": "2.3.0",
|
"raphael": "2.3.0",
|
||||||
"rxjs": "7.8.1",
|
"rxjs": "7.8.1",
|
||||||
"subscriptions-transport-ws": "^0.11.0",
|
"subscriptions-transport-ws": "^0.11.0",
|
||||||
"superagent": "^9.0.1",
|
"superagent": "^9.0.1",
|
||||||
"tslib": "^2.6.2",
|
"tslib": "^2.6.2",
|
||||||
"zone.js": "0.13.3"
|
"zone.js": "0.14.10"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@alfresco/eslint-plugin-eslint-angular": "file:lib/eslint-angular",
|
"@alfresco/eslint-plugin-eslint-angular": "file:lib/eslint-angular",
|
||||||
"@angular-devkit/architect": "0.1602.9",
|
"@angular-devkit/architect": "0.1802.1",
|
||||||
"@angular-devkit/build-angular": "16.2.9",
|
"@angular-devkit/build-angular": "18.2.1",
|
||||||
"@angular-devkit/core": "16.2.9",
|
"@angular-devkit/core": "18.2.1",
|
||||||
"@angular-devkit/schematics": "16.2.9",
|
"@angular-devkit/schematics": "18.2.1",
|
||||||
"@angular-eslint/eslint-plugin": "16.0.3",
|
"@angular-eslint/eslint-plugin": "18.3.0",
|
||||||
"@angular-eslint/eslint-plugin-template": "16.0.3",
|
"@angular-eslint/eslint-plugin-template": "18.3.0",
|
||||||
"@angular-eslint/template-parser": "16.0.3",
|
"@angular-eslint/template-parser": "18.3.0",
|
||||||
"@angular/cli": "~16.2.0",
|
"@angular/cli": "~18.2.0",
|
||||||
"@angular/compiler-cli": "16.2.9",
|
"@angular/compiler-cli": "18.2.2",
|
||||||
"@chromatic-com/storybook": "^1.6.1",
|
"@chromatic-com/storybook": "^1.8.0",
|
||||||
"@editorjs/code": "2.9.0",
|
"@editorjs/code": "2.9.0",
|
||||||
"@editorjs/editorjs": "^2.29.0",
|
"@editorjs/editorjs": "^2.29.0",
|
||||||
"@editorjs/header": "2.8.1",
|
"@editorjs/header": "2.8.1",
|
||||||
@@ -108,17 +109,20 @@
|
|||||||
"@editorjs/list": "1.9.0",
|
"@editorjs/list": "1.9.0",
|
||||||
"@editorjs/marker": "1.4.0",
|
"@editorjs/marker": "1.4.0",
|
||||||
"@editorjs/underline": "1.1.0",
|
"@editorjs/underline": "1.1.0",
|
||||||
"@nx/js": "16.10.0",
|
"@nx/angular": "19.6.4",
|
||||||
"@nx/storybook": "^19.5.6",
|
"@nx/eslint-plugin": "19.6.4",
|
||||||
"@nx/workspace": "16.10.0",
|
"@nx/js": "19.6.4",
|
||||||
|
"@nx/node": "19.6.4",
|
||||||
|
"@nx/storybook": "19.6.4",
|
||||||
|
"@nx/workspace": "19.6.4",
|
||||||
"@paperist/types-remark": "0.1.3",
|
"@paperist/types-remark": "0.1.3",
|
||||||
"@playwright/test": "^1.35.1",
|
"@playwright/test": "^1.35.1",
|
||||||
"@quanzo/change-font-size": "1.0.0",
|
"@quanzo/change-font-size": "1.0.0",
|
||||||
"@schematics/angular": "16.2.9",
|
"@schematics/angular": "18.2.1",
|
||||||
"@storybook/addon-essentials": "^8.2.7",
|
"@storybook/addon-essentials": "^8.2.9",
|
||||||
"@storybook/angular": "^8.2.7",
|
"@storybook/angular": "^8.2.9",
|
||||||
"@storybook/core-server": "^8.2.7",
|
"@storybook/core-server": "^8.2.9",
|
||||||
"@storybook/manager-api": "^8.2.7",
|
"@storybook/manager-api": "^8.2.9",
|
||||||
"@types/ejs": "^3.1.5",
|
"@types/ejs": "^3.1.5",
|
||||||
"@types/event-emitter": "^0.3.3",
|
"@types/event-emitter": "^0.3.3",
|
||||||
"@types/jasmine": "4.0.3",
|
"@types/jasmine": "4.0.3",
|
||||||
@@ -126,14 +130,15 @@
|
|||||||
"@types/jsdom": "^21.1.5",
|
"@types/jsdom": "^21.1.5",
|
||||||
"@types/minimatch": "^3.0.3",
|
"@types/minimatch": "^3.0.3",
|
||||||
"@types/mocha": "^10.0.6",
|
"@types/mocha": "^10.0.6",
|
||||||
"@types/node": "^20.10.0",
|
"@types/node": "^18.16.9",
|
||||||
"@types/pdfjs-dist": "^2.10.378",
|
"@types/pdfjs-dist": "^2.10.378",
|
||||||
"@types/selenium-webdriver": "^4.1.17",
|
"@types/selenium-webdriver": "^4.1.17",
|
||||||
"@types/shelljs": "^0.8.15",
|
"@types/shelljs": "^0.8.15",
|
||||||
"@types/superagent": "^4.1.22",
|
"@types/superagent": "^4.1.22",
|
||||||
"@typescript-eslint/eslint-plugin": "5.59.8",
|
"@typescript-eslint/eslint-plugin": "7.18.0",
|
||||||
"@typescript-eslint/parser": "5.62.0",
|
"@typescript-eslint/parser": "7.10.0",
|
||||||
"@typescript-eslint/typescript-estree": "7.1.1",
|
"@typescript-eslint/typescript-estree": "7.1.1",
|
||||||
|
"@typescript-eslint/utils": "^7.16.0",
|
||||||
"ajv": "^8.12.0",
|
"ajv": "^8.12.0",
|
||||||
"commander": "12.0.0",
|
"commander": "12.0.0",
|
||||||
"css-loader": "^6.10.0",
|
"css-loader": "^6.10.0",
|
||||||
@@ -143,7 +148,7 @@
|
|||||||
"editorjs-text-color-plugin": "1.13.1",
|
"editorjs-text-color-plugin": "1.13.1",
|
||||||
"ejs": "^3.1.10",
|
"ejs": "^3.1.10",
|
||||||
"eslint": "^8.47.0",
|
"eslint": "^8.47.0",
|
||||||
"eslint-config-prettier": "^8.10.0",
|
"eslint-config-prettier": "9.1.0",
|
||||||
"eslint-plugin-ban": "^1.6.0",
|
"eslint-plugin-ban": "^1.6.0",
|
||||||
"eslint-plugin-import": "2.29.1",
|
"eslint-plugin-import": "2.29.1",
|
||||||
"eslint-plugin-jsdoc": "40.1.0",
|
"eslint-plugin-jsdoc": "40.1.0",
|
||||||
@@ -175,10 +180,10 @@
|
|||||||
"mini-css-extract-plugin": "^2.7.6",
|
"mini-css-extract-plugin": "^2.7.6",
|
||||||
"mocha": "^10.2.0",
|
"mocha": "^10.2.0",
|
||||||
"moment": "^2.29.4",
|
"moment": "^2.29.4",
|
||||||
"ng-packagr": "16.2.3",
|
"ng-packagr": "18.2.1",
|
||||||
"nock": "^13.3.8",
|
"nock": "^13.3.8",
|
||||||
"npm-run-all": "^4.1.5",
|
"npm-run-all": "^4.1.5",
|
||||||
"nx": "16.10.0",
|
"nx": "19.6.4",
|
||||||
"postcss": "^8.4.31",
|
"postcss": "^8.4.31",
|
||||||
"postcss-sass": "^0.5.0",
|
"postcss-sass": "^0.5.0",
|
||||||
"prettier": "2.8.8",
|
"prettier": "2.8.8",
|
||||||
@@ -191,18 +196,15 @@
|
|||||||
"selenium-webdriver": "^4.14.0",
|
"selenium-webdriver": "^4.14.0",
|
||||||
"shelljs": "^0.8.5",
|
"shelljs": "^0.8.5",
|
||||||
"spdx-license-list": "^6.9.0",
|
"spdx-license-list": "^6.9.0",
|
||||||
"storybook": "^8.2.7",
|
"storybook": "^8.2.9",
|
||||||
"stylelint": "^16.3.1",
|
"stylelint": "^16.3.1",
|
||||||
"stylelint-config-standard-scss": "^13.1.0",
|
"stylelint-config-standard-scss": "^13.1.0",
|
||||||
"ts-node": "^10.9.2",
|
"ts-node": "^10.9.2",
|
||||||
"tsconfig-paths": "^4.1.1",
|
"tsconfig-paths": "^4.1.1",
|
||||||
"typescript": "5.1.6",
|
"typescript": "5.5.4",
|
||||||
"webdriver-manager": "12.1.9",
|
"webdriver-manager": "12.1.9",
|
||||||
"webpack": "^5.90.3",
|
"webpack": "^5.90.3",
|
||||||
"webpack-cli": "^5.1.4",
|
"webpack-cli": "^5.1.4"
|
||||||
"@nx/eslint-plugin": "16.10.0",
|
|
||||||
"@nx/node": "16.10.0",
|
|
||||||
"@nx/angular": "16.10.0"
|
|
||||||
},
|
},
|
||||||
"license": "Apache-2.0",
|
"license": "Apache-2.0",
|
||||||
"bundlesize": [
|
"bundlesize": [
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Storybook 7 Migration Summary
|
# Storybook 8 Migration Summary
|
||||||
|
|
||||||
## Upgrade Storybook packages
|
## Upgrade Storybook packages
|
||||||
|
|
||||||
@@ -8,26 +8,19 @@ The following command was ran to upgrade the Storybook packages:
|
|||||||
npx storybook@latest upgrade
|
npx storybook@latest upgrade
|
||||||
```
|
```
|
||||||
|
|
||||||
## Your `.storybook/main.js|ts` files were prepared for Storybook's automigration scripts
|
|
||||||
|
|
||||||
Some adjustments were made to your `.storybook/main.js|ts` files so that
|
|
||||||
the Storybook automigration scripts could run successfully. The changes that were made are as follows:
|
|
||||||
|
|
||||||
- Remove the `as StorybookConfig` typecast from the main.ts files, if any,
|
|
||||||
since it is not needed any more.
|
|
||||||
- Remove the `path.resolve` calls from the Next.js Storybook configuration, if any, since it breaks the Storybook automigration scripts.
|
|
||||||
|
|
||||||
## The Storybook automigration scripts were ran
|
## The Storybook automigration scripts were ran
|
||||||
|
|
||||||
The following commands ran successfully and your Storybook configuration was successfully migrated to the latest version 7:
|
The following commands ran successfully and your Storybook configuration was successfully migrated to the latest version 7:
|
||||||
|
|
||||||
- `npx storybook@latest automigrate --config-dir lib/content-services/.storybook --renderer @storybook/angular`
|
- `npx storybook@latest automigrate --config-dir .storybook`
|
||||||
|
|
||||||
- `npx storybook@latest automigrate --config-dir lib/core/.storybook --renderer @storybook/angular`
|
- `npx storybook@latest automigrate --config-dir lib/content-services/.storybook`
|
||||||
|
|
||||||
- `npx storybook@latest automigrate --config-dir lib/process-services-cloud/.storybook --renderer @storybook/angular`
|
- `npx storybook@latest automigrate --config-dir lib/core/.storybook`
|
||||||
|
|
||||||
- `npx storybook@latest automigrate --config-dir lib/stories/.storybook --renderer @storybook/angular`
|
- `npx storybook@latest automigrate --config-dir lib/process-services-cloud/.storybook`
|
||||||
|
|
||||||
|
- `npx storybook@latest automigrate --config-dir lib/stories/.storybook`
|
||||||
|
|
||||||
Please make sure to check the results yourself and make sure that everything is working as expected.
|
Please make sure to check the results yourself and make sure that everything is working as expected.
|
||||||
|
|
||||||
@@ -35,19 +28,6 @@ Also, we may have missed something. Please make sure to check the logs of the St
|
|||||||
the `❌ Failed trying to evaluate` message or `❌ The migration failed to update` message. This will indicate if a command was
|
the `❌ Failed trying to evaluate` message or `❌ The migration failed to update` message. This will indicate if a command was
|
||||||
unsuccessful, and will help you run the migration again, manually.
|
unsuccessful, and will help you run the migration again, manually.
|
||||||
|
|
||||||
## Final adjustments
|
|
||||||
|
|
||||||
After the Storybook automigration scripts have run, some additional adjustments were made to your
|
|
||||||
workspace, to make sure that everything is working as expected. These adjustments are as follows:
|
|
||||||
|
|
||||||
- The `vite-tsconfig-paths` plugin was removed from the Storybook configuration files since it's no longer needed.
|
|
||||||
- The `viteConfigPath` option was added to the Storybook builder, where needed.
|
|
||||||
- The import package for the `StorybookConfig` type was changed to be framework specific.
|
|
||||||
- The `uiFramework` option was removed from your project's Storybook targets.
|
|
||||||
- The `lit` package was added to your workspace, if you are using the
|
|
||||||
Web Components `@storybook/web-components` package. Please note that the `lit-html` package is
|
|
||||||
no longer needed by Storybook v7. So, if you are not using it anywhere else, you can safely remove it.
|
|
||||||
|
|
||||||
## Next steps
|
## Next steps
|
||||||
|
|
||||||
You can make sure everything is working as expected by trying
|
You can make sure everything is working as expected by trying
|
||||||
@@ -61,8 +41,6 @@ npx nx build-storybook project-name
|
|||||||
npx nx storybook project-name
|
npx nx storybook project-name
|
||||||
```
|
```
|
||||||
|
|
||||||
Please read the [Storybook 7.0.0 release article](https://storybook.js.org/blog/storybook-7-0/) and the
|
Please read the [Storybook 8.0.0 release article](https://storybook.js.org/blog/storybook-8/) and the
|
||||||
official [Storybook 7.0.0 migration guide](https://storybook.js.org/docs/react/migration-guide)
|
official [Storybook 8.0.0 migration guide](https://storybook.js.org/docs/react/migration-guide)
|
||||||
for more information.
|
for more information.
|
||||||
|
|
||||||
You can also read the docs for the [@nx/storybook:migrate-7 generator](https://nx.dev/nx-api/storybook/generators/migrate-7) and our [Storybook 7 setup guide](https://nx.dev/nx-api/storybook/documents/storybook-7-setup).
|
|
||||||
|
|||||||
Reference in New Issue
Block a user