feat(export): Added export deltagare. (TV-872)

Squashed commit of the following:

commit 9c06b7f1d44a4b48d7f31a22b6bfbd233e09d2f7
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 15:07:15 2021 +0100

    Updated api endpoint

commit f9bfbecda6d03b70d87febbada920d0eca798b1f
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 15:01:13 2021 +0100

    Updated libs

commit 9edb413d537288fa0708b8a04eb54f801ebc23a0
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 14:58:13 2021 +0100

    Added @types/file-saver

commit 624affac55ce771fd58e2770a0d4a98233a8e9ba
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 14:42:29 2021 +0100

    Updated libs

commit 65dae1d906bbcec474581692b2aced9e47d2484c
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 14:36:42 2021 +0100

    Added utils lib config

commit 223bd59724663523bdbaf87b5502396156ddb9eb
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 14:06:13 2021 +0100

    Added validation

commit 166dfcf0448155ac21c0eaa904b4ce1271f73193
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 13:25:35 2021 +0100

    Changed styling and removed some fake data

commit 3906f2793dd52b626b95c13e115495451332c894
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 13:18:52 2021 +0100

    Added digi-ng datepicker

commit de0d51434d15cac5476303d4b417c591da16fd8f
Author: Erik Tiekstra <erik.tiekstra@arbetsformedlingen.se>
Date:   Tue Nov 2 12:31:48 2021 +0100

    Added checkbox
This commit is contained in:
Erik Tiekstra
2021-11-03 09:18:25 +01:00
parent e8791556cb
commit c11b0c1463
59 changed files with 1000 additions and 1159 deletions

22
libs/utils/.eslintrc.json Normal file
View File

@@ -0,0 +1,22 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts"],
"extends": ["plugin:@nrwl/nx/angular", "plugin:@angular-eslint/template/process-inline-templates"],
"parserOptions": { "project": ["libs/utils/tsconfig.*?.json"] },
"rules": {
"@angular-eslint/directive-selector": [
"error",
{ "type": "attribute", "prefix": "mina-sidor-fa-web", "style": "camelCase" }
],
"@angular-eslint/component-selector": [
"error",
{ "type": "element", "prefix": "mina-sidor-fa-web", "style": "kebab-case" }
]
}
},
{ "files": ["*.html"], "extends": ["plugin:@nrwl/nx/angular-template"], "rules": {} }
]
}

7
libs/utils/README.md Normal file
View File

@@ -0,0 +1,7 @@
# utils
This library was generated with [Nx](https://nx.dev).
## Running unit tests
Run `nx test utils` to execute the unit tests.

23
libs/utils/jest.config.js Normal file
View File

@@ -0,0 +1,23 @@
module.exports = {
displayName: 'utils',
preset: '../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
globals: {
'ts-jest': {
tsConfig: '<rootDir>/tsconfig.spec.json',
stringifyContentPathRegex: '\\.(html|svg)$',
astTransformers: {
before: [
'jest-preset-angular/build/InlineFilesTransformer',
'jest-preset-angular/build/StripStylesTransformer',
],
},
},
},
coverageDirectory: '../../coverage/libs/utils',
snapshotSerializers: [
'jest-preset-angular/build/AngularNoNgAttributesSnapshotSerializer.js',
'jest-preset-angular/build/AngularSnapshotSerializer.js',
'jest-preset-angular/build/HTMLCommentSerializer.js',
],
};

View File

@@ -0,0 +1 @@
import 'jest-preset-angular';

View File

@@ -0,0 +1,8 @@
// From https://stackoverflow.com/questions/105034/how-to-create-a-guid-uuid
export function uuid(): string {
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
const r = (Math.random() * 16) | 0,
v = c == 'x' ? r : (r & 0x3) | 0x8;
return v.toString(16);
});
}

13
libs/utils/tsconfig.json Normal file
View File

@@ -0,0 +1,13 @@
{
"extends": "../../tsconfig.base.json",
"files": [],
"include": [],
"references": [
{
"path": "./tsconfig.lib.json"
},
{
"path": "./tsconfig.spec.json"
}
]
}

View File

@@ -0,0 +1,19 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"target": "es2015",
"declaration": true,
"declarationMap": true,
"inlineSources": true,
"types": [],
"lib": ["dom", "es2018"]
},
"angularCompilerOptions": {
"skipTemplateCodegen": true,
"strictMetadataEmit": true,
"enableResourceInlining": true
},
"exclude": ["src/test-setup.ts", "**/*.spec.ts"],
"include": ["**/*.ts"]
}

View File

@@ -0,0 +1,10 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"module": "commonjs",
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"include": ["**/*.spec.ts", "**/*.d.ts"]
}