diff --git a/alfa-client/libs/zustaendige-stelle-shared/.eslintrc.json b/alfa-client/libs/zustaendige-stelle-shared/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..b953e5d37d40148217ab14a01859ea0cb43d9ebc --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle-shared/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts"], + "extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], + "rules": { + "@angular-eslint/directive-selector": [ + "error", + { + "type": "attribute", + "prefix": "lib", + "style": "camelCase" + } + ], + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": "lib", + "style": "kebab-case" + } + ] + } + }, + { + "files": ["*.html"], + "extends": ["plugin:@nx/angular-template"], + "rules": {} + } + ] +} diff --git a/alfa-client/libs/zustaendige-stelle-shared/README.md b/alfa-client/libs/zustaendige-stelle-shared/README.md new file mode 100644 index 0000000000000000000000000000000000000000..746271b0090d56c3c5abbb2dfb34b7966d65a8e8 --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle-shared/README.md @@ -0,0 +1,7 @@ +# zustaendige-stelle-shared + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test zustaendige-stelle-shared` to execute the unit tests. diff --git a/alfa-client/libs/zustaendige-stelle-shared/jest.config.ts b/alfa-client/libs/zustaendige-stelle-shared/jest.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..97f146082b038daa9b2539267d9f2d562181427a --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle-shared/jest.config.ts @@ -0,0 +1,22 @@ +/* eslint-disable */ +export default { + displayName: 'zustaendige-stelle-shared', + preset: '../../jest.preset.js', + setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], + coverageDirectory: '../../coverage/libs/zustaendige-stelle-shared', + transform: { + '^.+\\.(ts|mjs|js|html)$': [ + 'jest-preset-angular', + { + tsconfig: '<rootDir>/tsconfig.spec.json', + stringifyContentPathRegex: '\\.(html|svg)$', + }, + ], + }, + transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], + snapshotSerializers: [ + 'jest-preset-angular/build/serializers/no-ng-attributes', + 'jest-preset-angular/build/serializers/ng-snapshot', + 'jest-preset-angular/build/serializers/html-comment', + ], +}; diff --git a/alfa-client/libs/zustaendige-stelle-shared/project.json b/alfa-client/libs/zustaendige-stelle-shared/project.json new file mode 100644 index 0000000000000000000000000000000000000000..16d8b42f87c70ddf052d1b6b4b4ae71a30eeae98 --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle-shared/project.json @@ -0,0 +1,20 @@ +{ + "name": "zustaendige-stelle-shared", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/zustaendige-stelle-shared/src", + "prefix": "lib", + "projectType": "library", + "tags": [], + "targets": { + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/zustaendige-stelle-shared/jest.config.ts" + } + }, + "lint": { + "executor": "@nx/eslint:lint" + } + } +} diff --git a/alfa-client/libs/zustaendige-stelle-shared/src/index.ts b/alfa-client/libs/zustaendige-stelle-shared/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/alfa-client/libs/zustaendige-stelle-shared/src/test-setup.ts b/alfa-client/libs/zustaendige-stelle-shared/src/test-setup.ts new file mode 100644 index 0000000000000000000000000000000000000000..ab1eeeb335d7890571dda105cf8bc1ea77086866 --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle-shared/src/test-setup.ts @@ -0,0 +1,8 @@ +// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment +globalThis.ngJest = { + testEnvironmentOptions: { + errorOnUnknownElements: true, + errorOnUnknownProperties: true, + }, +}; +import 'jest-preset-angular/setup-jest'; diff --git a/alfa-client/libs/zustaendige-stelle-shared/tsconfig.json b/alfa-client/libs/zustaendige-stelle-shared/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..92049739f65e6a89dcd34bca26e34e0cafefc690 --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle-shared/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "es2022", + "useDefineForClassFields": false, + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "extends": "../../tsconfig.base.json", + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/alfa-client/libs/zustaendige-stelle-shared/tsconfig.lib.json b/alfa-client/libs/zustaendige-stelle-shared/tsconfig.lib.json new file mode 100644 index 0000000000000000000000000000000000000000..4cab05d46338c6e9d4dfe6512fd7eb7f60340d3d --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle-shared/tsconfig.lib.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [] + }, + "exclude": ["src/**/*.spec.ts", "src/test-setup.ts", "jest.config.ts", "src/**/*.test.ts"], + "include": ["src/**/*.ts"] +} diff --git a/alfa-client/libs/zustaendige-stelle-shared/tsconfig.spec.json b/alfa-client/libs/zustaendige-stelle-shared/tsconfig.spec.json new file mode 100644 index 0000000000000000000000000000000000000000..7870b7c011681fb77d6114001f44d3eeca69975b --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle-shared/tsconfig.spec.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "target": "es2016", + "types": ["jest", "node"] + }, + "files": ["src/test-setup.ts"], + "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/alfa-client/libs/zustaendige-stelle/.eslintrc.json b/alfa-client/libs/zustaendige-stelle/.eslintrc.json new file mode 100644 index 0000000000000000000000000000000000000000..b953e5d37d40148217ab14a01859ea0cb43d9ebc --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle/.eslintrc.json @@ -0,0 +1,33 @@ +{ + "extends": ["../../.eslintrc.json"], + "ignorePatterns": ["!**/*"], + "overrides": [ + { + "files": ["*.ts"], + "extends": ["plugin:@nx/angular", "plugin:@angular-eslint/template/process-inline-templates"], + "rules": { + "@angular-eslint/directive-selector": [ + "error", + { + "type": "attribute", + "prefix": "lib", + "style": "camelCase" + } + ], + "@angular-eslint/component-selector": [ + "error", + { + "type": "element", + "prefix": "lib", + "style": "kebab-case" + } + ] + } + }, + { + "files": ["*.html"], + "extends": ["plugin:@nx/angular-template"], + "rules": {} + } + ] +} diff --git a/alfa-client/libs/zustaendige-stelle/README.md b/alfa-client/libs/zustaendige-stelle/README.md new file mode 100644 index 0000000000000000000000000000000000000000..79cdd47f94b5d289ef89c83fac63d412edf6b4e8 --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle/README.md @@ -0,0 +1,7 @@ +# zustaendige-stelle + +This library was generated with [Nx](https://nx.dev). + +## Running unit tests + +Run `nx test zustaendige-stelle` to execute the unit tests. diff --git a/alfa-client/libs/zustaendige-stelle/jest.config.ts b/alfa-client/libs/zustaendige-stelle/jest.config.ts new file mode 100644 index 0000000000000000000000000000000000000000..ab3acdae1b5402f061cb7eecf2d2c8fa38811f79 --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle/jest.config.ts @@ -0,0 +1,22 @@ +/* eslint-disable */ +export default { + displayName: 'zustaendige-stelle', + preset: '../../jest.preset.js', + setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'], + coverageDirectory: '../../coverage/libs/zustaendige-stelle', + transform: { + '^.+\\.(ts|mjs|js|html)$': [ + 'jest-preset-angular', + { + tsconfig: '<rootDir>/tsconfig.spec.json', + stringifyContentPathRegex: '\\.(html|svg)$', + }, + ], + }, + transformIgnorePatterns: ['node_modules/(?!.*\\.mjs$)'], + snapshotSerializers: [ + 'jest-preset-angular/build/serializers/no-ng-attributes', + 'jest-preset-angular/build/serializers/ng-snapshot', + 'jest-preset-angular/build/serializers/html-comment', + ], +}; diff --git a/alfa-client/libs/zustaendige-stelle/project.json b/alfa-client/libs/zustaendige-stelle/project.json new file mode 100644 index 0000000000000000000000000000000000000000..867f306a90142d3343259429b19dbedaa5d3259d --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle/project.json @@ -0,0 +1,20 @@ +{ + "name": "zustaendige-stelle", + "$schema": "../../node_modules/nx/schemas/project-schema.json", + "sourceRoot": "libs/zustaendige-stelle/src", + "prefix": "lib", + "projectType": "library", + "tags": [], + "targets": { + "test": { + "executor": "@nx/jest:jest", + "outputs": ["{workspaceRoot}/coverage/{projectRoot}"], + "options": { + "jestConfig": "libs/zustaendige-stelle/jest.config.ts" + } + }, + "lint": { + "executor": "@nx/eslint:lint" + } + } +} diff --git a/alfa-client/libs/zustaendige-stelle/src/index.ts b/alfa-client/libs/zustaendige-stelle/src/index.ts new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/alfa-client/libs/zustaendige-stelle/src/test-setup.ts b/alfa-client/libs/zustaendige-stelle/src/test-setup.ts new file mode 100644 index 0000000000000000000000000000000000000000..ab1eeeb335d7890571dda105cf8bc1ea77086866 --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle/src/test-setup.ts @@ -0,0 +1,8 @@ +// @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment +globalThis.ngJest = { + testEnvironmentOptions: { + errorOnUnknownElements: true, + errorOnUnknownProperties: true, + }, +}; +import 'jest-preset-angular/setup-jest'; diff --git a/alfa-client/libs/zustaendige-stelle/tsconfig.json b/alfa-client/libs/zustaendige-stelle/tsconfig.json new file mode 100644 index 0000000000000000000000000000000000000000..92049739f65e6a89dcd34bca26e34e0cafefc690 --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle/tsconfig.json @@ -0,0 +1,29 @@ +{ + "compilerOptions": { + "target": "es2022", + "useDefineForClassFields": false, + "forceConsistentCasingInFileNames": true, + "strict": true, + "noImplicitOverride": true, + "noPropertyAccessFromIndexSignature": true, + "noImplicitReturns": true, + "noFallthroughCasesInSwitch": true + }, + "files": [], + "include": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.spec.json" + } + ], + "extends": "../../tsconfig.base.json", + "angularCompilerOptions": { + "enableI18nLegacyMessageIdFormat": false, + "strictInjectionParameters": true, + "strictInputAccessModifiers": true, + "strictTemplates": true + } +} diff --git a/alfa-client/libs/zustaendige-stelle/tsconfig.lib.json b/alfa-client/libs/zustaendige-stelle/tsconfig.lib.json new file mode 100644 index 0000000000000000000000000000000000000000..4cab05d46338c6e9d4dfe6512fd7eb7f60340d3d --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle/tsconfig.lib.json @@ -0,0 +1,12 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "declaration": true, + "declarationMap": true, + "inlineSources": true, + "types": [] + }, + "exclude": ["src/**/*.spec.ts", "src/test-setup.ts", "jest.config.ts", "src/**/*.test.ts"], + "include": ["src/**/*.ts"] +} diff --git a/alfa-client/libs/zustaendige-stelle/tsconfig.spec.json b/alfa-client/libs/zustaendige-stelle/tsconfig.spec.json new file mode 100644 index 0000000000000000000000000000000000000000..7870b7c011681fb77d6114001f44d3eeca69975b --- /dev/null +++ b/alfa-client/libs/zustaendige-stelle/tsconfig.spec.json @@ -0,0 +1,11 @@ +{ + "extends": "./tsconfig.json", + "compilerOptions": { + "outDir": "../../dist/out-tsc", + "module": "commonjs", + "target": "es2016", + "types": ["jest", "node"] + }, + "files": ["src/test-setup.ts"], + "include": ["jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts"] +} diff --git a/alfa-client/nx.json b/alfa-client/nx.json index ef541a7eb5a1b147ff131218b9f498e2d295f344..d5846d9ce54ec894bf7601a95e7f626e1bfe360b 100644 --- a/alfa-client/nx.json +++ b/alfa-client/nx.json @@ -49,12 +49,7 @@ }, "build-storybook": { "cache": true, - "inputs": [ - "default", - "^production", - "{projectRoot}/.storybook/**/*", - "{projectRoot}/tsconfig.storybook.json" - ] + "inputs": ["default", "^production", "{projectRoot}/.storybook/**/*", "{projectRoot}/tsconfig.storybook.json"] }, "@nx/jest:jest": { "inputs": ["default", "^production", "{workspaceRoot}/jest.preset.js"], diff --git a/alfa-client/package.json b/alfa-client/package.json index 58ecf36fa50c0bd051217a43c8e9eccf7facb85a..b081dded54752bbfd6e7ccdd48e8736e41e34d44 100644 --- a/alfa-client/package.json +++ b/alfa-client/package.json @@ -120,6 +120,7 @@ "@storybook/core-server": "^8.1.4", "@swc-node/register": "1.9.1", "@swc/core": "~1.5.7", + "@swc/helpers": "~0.5.2", "@testing-library/jest-dom": "6.4.5", "@types/file-saver": "2.0.7", "@types/jest": "29.4.4", @@ -163,4 +164,4 @@ "ts-node": "10.9.1", "typescript": "5.4.5" } -} \ No newline at end of file +} diff --git a/alfa-client/tsconfig.base.json b/alfa-client/tsconfig.base.json index 040e181ce114beeca3c6842d2454527342586f25..0e55f9ba2974cc2f9e9bd9cbc2fee80e333ee1f4 100644 --- a/alfa-client/tsconfig.base.json +++ b/alfa-client/tsconfig.base.json @@ -41,6 +41,8 @@ "@alfa-client/navigation-shared": ["libs/navigation-shared/src/index.ts"], "@alfa-client/postfach": ["libs/postfach/src/index.ts"], "@alfa-client/postfach-shared": ["libs/postfach-shared/src/index.ts"], + "@alfa-client/resource-redirect": ["libs/resource-redirect/src/index.ts"], + "@alfa-client/resource-redirect-shared": ["libs/resource-redirect-shared/src/index.ts"], "@alfa-client/tech-shared": ["libs/tech-shared/src/index.ts"], "@alfa-client/test-utils": ["libs/test-utils/src/index.ts"], "@alfa-client/ui": ["libs/ui/src/index.ts"], @@ -55,11 +57,11 @@ "@alfa-client/vorgang-shared-ui": ["libs/vorgang-shared-ui/src/index.ts"], "@alfa-client/wiedervorlage": ["libs/wiedervorlage/src/index.ts"], "@alfa-client/wiedervorlage-shared": ["libs/wiedervorlage-shared/src/index.ts"], - "@alfa-client/resource-redirect": ["libs/resource-redirect/src/index.ts"], - "@alfa-client/resource-redirect-shared": ["libs/resource-redirect-shared/src/index.ts"], "@ods/component": ["libs/design-component/src/index.ts"], "@ods/system": ["libs/design-system/src/index.ts"], - "authentication": ["libs/authentication/src/index.ts"] + "authentication": ["libs/authentication/src/index.ts"], + "zustaendige-stelle": ["libs/zustaendige-stelle/src/index.ts"], + "zustaendige-stelle-shared": ["libs/zustaendige-stelle-shared/src/index.ts"] } }, "exclude": ["node_modules", "tmp"]