Skip to content

AB#93838 - angular update from 15v to 16v #2223

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 14 commits into
base: beta
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nrwl/nx"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nrwl/nx/enforce-module-boundaries": [
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
Expand All @@ -29,14 +29,21 @@
// "deprecation"
],
"extends": [
"plugin:@nrwl/nx/typescript",
"plugin:@nx/typescript",
"prettier",
"plugin:jsdoc/recommended"
],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"checkDynamicDependenciesExceptions": ["@oort-front/shared"]
}
],
"no-case-declarations": 0,
"@typescript-eslint/no-explicit-any": 0, // todo: set to 1
"prettier/prettier": 2,
"@typescript-eslint/no-inferrable-types": "off",
"@typescript-eslint/naming-convention": [
1,
{
Expand Down Expand Up @@ -85,7 +92,7 @@
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nrwl/nx/javascript"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
Expand Down
2 changes: 1 addition & 1 deletion apps/back-office-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';

export default defineConfig({
e2e: nxE2EPreset(__dirname),
Expand Down
4 changes: 2 additions & 2 deletions apps/back-office-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/back-office-e2e/cypress.config.ts",
"devServerTarget": "back-office:serve:development",
Expand All @@ -18,7 +18,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/back-office-e2e/**/*.{js,ts}"]
Expand Down
4 changes: 2 additions & 2 deletions apps/back-office/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
]
},
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
20 changes: 9 additions & 11 deletions apps/back-office/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,17 @@ export default {
preset: '../../jest.preset.js',
setupFiles: [`../../jest-shim.ts`],
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../coverage/apps/back-office',
testPathIgnorePatterns: [
"/node_modules/",
"<rootDir>/src/app/__mocks__/"
],
testPathIgnorePatterns: ['/node_modules/', '<rootDir>/src/app/__mocks__/'],
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: [
'node_modules/(?!.*\\.mjs$)',
Expand Down
4 changes: 2 additions & 2 deletions apps/back-office/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
Expand All @@ -334,7 +334,7 @@
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/back-office/jest.config.ts",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -323,37 +323,41 @@ <h1 class="overflow-hidden whitespace-nowrap text-ellipsis mb-0">
<button
kendoButton
class="text-center"
icon="edit"
[look]="'flat'"
(click)="toggleInlineEditor(dataItem)"
[uiTooltip]="'common.edit' | translate"
></button>
>
<kendo-icon name="edit"></kendo-icon>
</button>
<button
kendoButton
class="text-center"
icon="delete"
[look]="'flat'"
(click)="onRemoveField(dataItem)"
[uiTooltip]="'common.remove' | translate"
></button>
>
<kendo-icon name="delete"></kendo-icon>
</button>
</div>
<div [ngClass]="{ hidden: currEditingField !== dataItem }">
<button
kendoButton
class="text-center"
icon="save"
[look]="'flat'"
(click)="toggleInlineEditor(null)"
[uiTooltip]="'common.save' | translate"
></button>
>
<kendo-icon name="save"></kendo-icon>
</button>
<button
kendoButton
class="text-center"
icon="cancel"
[look]="'flat'"
(click)="currEditingField = null"
[uiTooltip]="'common.cancel' | translate"
></button>
>
<kendo-icon name="cancel"></kendo-icon>
</button>
</div>
</ng-template>
</kendo-grid-column>
Expand All @@ -366,9 +370,9 @@ <h1 class="overflow-hidden whitespace-nowrap text-ellipsis mb-0">
<button
kendoButton
class="text-center mt-2"
icon="add"
(click)="addField()"
>
<kendo-icon name="add"></kendo-icon>
{{ 'components.referenceData.fields.add' | translate }}
</button>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import { MonacoEditorModule } from 'ngx-monaco-editor-v2';
import { InputsModule } from '@progress/kendo-angular-inputs';
import { DropDownsModule } from '@progress/kendo-angular-dropdowns';
import { ResizableModule } from 'angular-resizable-element';
import { IconsModule } from '@progress/kendo-angular-icons';

/**
* Reference Data page module.
Expand Down Expand Up @@ -58,6 +59,7 @@ import { ResizableModule } from 'angular-resizable-element';
DropDownsModule,
ToggleModule,
ResizableModule,
IconsModule,
AsyncMonacoEditorDirective,
],
})
Expand Down
2 changes: 1 addition & 1 deletion apps/front-office-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';

export default defineConfig({
e2e: nxE2EPreset(__dirname),
Expand Down
4 changes: 2 additions & 2 deletions apps/front-office-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/front-office-e2e/cypress.config.ts",
"devServerTarget": "front-office:serve:development",
Expand All @@ -18,7 +18,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/front-office-e2e/**/*.{js,ts}"]
Expand Down
4 changes: 2 additions & 2 deletions apps/front-office/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
]
},
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
15 changes: 8 additions & 7 deletions apps/front-office/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ export default {
preset: '../../jest.preset.js',
setupFiles: [`../../jest-shim.ts`],
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../coverage/apps/front-office',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: [
'node_modules/(?!.*\\.mjs$)',
Expand Down
4 changes: 2 additions & 2 deletions apps/front-office/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
Expand All @@ -322,7 +322,7 @@
}
},
"test": {
"executor": "@nrwl/jest:jest",
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/front-office/jest.config.ts",
Expand Down
2 changes: 1 addition & 1 deletion apps/web-widgets-e2e/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig } from 'cypress';
import { nxE2EPreset } from '@nrwl/cypress/plugins/cypress-preset';
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';

export default defineConfig({
e2e: nxE2EPreset(__dirname),
Expand Down
4 changes: 2 additions & 2 deletions apps/web-widgets-e2e/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"projectType": "application",
"targets": {
"e2e": {
"executor": "@nrwl/cypress:cypress",
"executor": "@nx/cypress:cypress",
"options": {
"cypressConfig": "apps/web-widgets-e2e/cypress.config.ts",
"devServerTarget": "web-widgets:serve:development",
Expand All @@ -18,7 +18,7 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": ["apps/web-widgets-e2e/**/*.{js,ts}"]
Expand Down
4 changes: 2 additions & 2 deletions apps/web-widgets/.eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,13 @@
]
},
"extends": [
"plugin:@nrwl/nx/angular",
"plugin:@nx/angular",
"plugin:@angular-eslint/template/process-inline-templates"
]
},
{
"files": ["*.html"],
"extends": ["plugin:@nrwl/nx/angular-template"],
"extends": ["plugin:@nx/angular-template"],
"rules": {}
}
]
Expand Down
15 changes: 8 additions & 7 deletions apps/web-widgets/jest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,16 @@ export default {
preset: '../../jest.preset.js',
setupFiles: [`../../jest-shim.ts`],
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
},
globals: {},
coverageDirectory: '../../coverage/apps/web-widgets',
transform: {
'^.+\\.(ts|mjs|js|html)$': 'jest-preset-angular',
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
{
tsconfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
},
],
},
transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'],
snapshotSerializers: [
Expand Down
12 changes: 4 additions & 8 deletions apps/web-widgets/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,8 @@
}
},
"lint": {
"executor": "@nrwl/linter:eslint",
"outputs": [
"{options.outputFile}"
],
"executor": "@nx/linter:eslint",
"outputs": ["{options.outputFile}"],
"options": {
"lintFilePatterns": [
"apps/web-widgets/**/*.ts",
Expand All @@ -260,10 +258,8 @@
}
},
"test": {
"executor": "@nrwl/jest:jest",
"outputs": [
"{workspaceRoot}/coverage/{projectRoot}"
],
"executor": "@nx/jest:jest",
"outputs": ["{workspaceRoot}/coverage/{projectRoot}"],
"options": {
"jestConfig": "apps/web-widgets/jest.config.ts",
"passWithNoTests": true
Expand Down
4 changes: 2 additions & 2 deletions apps/web-widgets/src/app/styles/_ui.scss
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
overflow: hidden;
}

// Even if the fonts are loaded in the document, the class should be explicitly placed inside the shadow dom in order to make the icons work
// https://github.com/google/material-design-icons/issues/1165#issuecomment-1030705931
/* Even if the fonts are loaded in the document, the class should be explicitly placed inside the shadow dom in order to make the icons work
https://github.com/google/material-design-icons/issues/1165#issuecomment-1030705931 */
i {
&.material-icons {
font-family: 'Material Icons';
Expand Down
Loading
Loading