From 74aed1faac07fe8a8f40139e70fef4ac395dc22b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 20 Dec 2021 14:03:36 +0000 Subject: [PATCH 001/148] build(deps): bump codemirror from 5.64.0 to 5.65.0 Bumps [codemirror](https://github.com/codemirror/CodeMirror) from 5.64.0 to 5.65.0. - [Release notes](https://github.com/codemirror/CodeMirror/releases) - [Changelog](https://github.com/codemirror/CodeMirror/blob/master/CHANGELOG.md) - [Commits](https://github.com/codemirror/CodeMirror/compare/5.64.0...5.65.0) --- updated-dependencies: - dependency-name: codemirror dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0da7bfd252..84ed573596 100644 --- a/package.json +++ b/package.json @@ -92,7 +92,7 @@ "@kolkov/ngx-gallery": "^1.2.3", "@ng-bootstrap/ng-bootstrap": "^11.0.0", "bootstrap": "^4.6.1", - "codemirror": "^5.64.0", + "codemirror": "^5.65.0", "core-js": "^3.19.1", "d3-drag": "^3.0.0", "d3-force": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 09354ae9da..5d872eada6 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4529,10 +4529,10 @@ code-point-at@^1.0.0: resolved "https://registry.yarnpkg.com/code-point-at/-/code-point-at-1.1.0.tgz#0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77" integrity sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c= -codemirror@^5.64.0: - version "5.64.0" - resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.64.0.tgz#182eec65b62178e3cd1de8f9d88ab819cfe5f625" - integrity sha512-fqr6CtDQdJ6iNMbD8NX2gH2G876nNDk+TO1rrYkgWnqQdO3O1Xa9tK6q+psqhJJgE5SpbaDcgdfLmukoUVE8pg== +codemirror@^5.65.0: + version "5.65.0" + resolved "https://registry.yarnpkg.com/codemirror/-/codemirror-5.65.0.tgz#50344359393579f526ca53797e510ff75477117f" + integrity sha512-gWEnHKEcz1Hyz7fsQWpK7P0sPI2/kSkRX2tc7DFA6TmZuDN75x/1ejnH/Pn8adYKrLEA1V2ww6L00GudHZbSKw== color-convert@^1.9.0: version "1.9.3" From 01fec23cd5b3c523c4dac2e867afa9f79a09989b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 28 Dec 2021 14:10:53 +0000 Subject: [PATCH 002/148] build(deps): bump actions/setup-node from 2.5.0 to 2.5.1 Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.0 to 2.5.1. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2.5.0...v2.5.1) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- .github/workflows/ci_workflow.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index cfee42d403..f70cce94e9 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -28,7 +28,7 @@ jobs: fetch-depth: 0 # Get all history and branches - name: Set up node ${{ matrix.node-version}} - uses: actions/setup-node@v2.5.0 + uses: actions/setup-node@v2.5.1 with: node-version: ${{ matrix.node-version }} cache: 'yarn' @@ -85,7 +85,7 @@ jobs: uses: actions/checkout@v2 - name: Set up node ${{ matrix.node-version}} - uses: actions/setup-node@v2.5.0 + uses: actions/setup-node@v2.5.1 with: node-version: ${{ matrix.node-version }} cache: 'yarn' From c8e8c4ea28c0b0c4eb184198acb2e0b098f65a38 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 10 Jan 2022 14:04:22 +0000 Subject: [PATCH 003/148] build(deps-dev): bump lint-staged from 12.1.2 to 12.1.7 Bumps [lint-staged](https://github.com/okonet/lint-staged) from 12.1.2 to 12.1.7. - [Release notes](https://github.com/okonet/lint-staged/releases) - [Commits](https://github.com/okonet/lint-staged/compare/v12.1.2...v12.1.7) --- updated-dependencies: - dependency-name: lint-staged dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 74 ++++++++++++++++++++-------------------------------- 2 files changed, 29 insertions(+), 47 deletions(-) diff --git a/package.json b/package.json index 0da7bfd252..a2a5f146b4 100644 --- a/package.json +++ b/package.json @@ -143,7 +143,7 @@ "karma-coverage": "^2.1.0", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.7.0", - "lint-staged": "^12.1.2", + "lint-staged": "^12.1.7", "prettier": "^2.5.1", "pretty-quick": "^3.1.2", "source-map-explorer": "^2.5.2", diff --git a/yarn.lock b/yarn.lock index 09354ae9da..52d50ae830 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4507,11 +4507,6 @@ clone@^1.0.2, clone@^1.0.4: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -clone@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -5228,14 +5223,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.6.8, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@~4.3.1, debug@~4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - -debug@4.3.3, debug@^4.3.2, debug@^4.3.3: +debug@4, debug@4.3.3, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@~4.3.1, debug@~4.3.2: version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== @@ -5654,7 +5642,7 @@ enhanced-resolve@^5.8.3: graceful-fs "^4.2.4" tapable "^2.2.0" -enquirer@^2.3.5, enquirer@^2.3.6, enquirer@~2.3.6: +enquirer@^2.3.5, enquirer@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -8157,37 +8145,36 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -lint-staged@^12.1.2: - version "12.1.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.1.2.tgz#90c571927e1371fc133e720671dd7989eab53f74" - integrity sha512-bSMcQVqMW98HLLLR2c2tZ+vnDCnx4fd+0QJBQgN/4XkdspGRPc8DGp7UuOEBe1ApCfJ+wXXumYnJmU+wDo7j9A== +lint-staged@^12.1.7: + version "12.1.7" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.1.7.tgz#fe9137992ac18a456422bb8484dd30be0140629f" + integrity sha512-bltv/ejiLWtowExpjU+s5z8j1Byjg9AlmaAjMmqNbIicY69u6sYIwXGg0dCn0TlkrrY2CphtHIXAkbZ+1VoWQQ== dependencies: cli-truncate "^3.1.0" colorette "^2.0.16" commander "^8.3.0" - debug "^4.3.2" - enquirer "^2.3.6" + debug "^4.3.3" execa "^5.1.1" lilconfig "2.0.4" - listr2 "^3.13.3" + listr2 "^3.13.5" micromatch "^4.0.4" normalize-path "^3.0.0" - object-inspect "^1.11.0" + object-inspect "^1.11.1" string-argv "^0.3.1" - supports-color "^9.0.2" + supports-color "^9.2.1" yaml "^1.10.2" -listr2@^3.13.3: - version "3.13.3" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.13.3.tgz#d8f6095c9371b382c9b1c2bc33c5941d8e177f11" - integrity sha512-VqAgN+XVfyaEjSaFewGPcDs5/3hBbWVaX1VgWv2f52MF7US45JuARlArULctiB44IIcEk3JF7GtoFCLqEdeuPA== +listr2@^3.13.5: + version "3.14.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" + integrity sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g== dependencies: cli-truncate "^2.1.0" - clone "^2.1.2" colorette "^2.0.16" log-update "^4.0.0" p-map "^4.0.0" - rxjs "^7.4.0" + rfdc "^1.3.0" + rxjs "^7.5.1" through "^2.3.8" wrap-ansi "^7.0.0" @@ -9123,15 +9110,10 @@ object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@late resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-inspect@^1.10.3, object-inspect@^1.9.0: - version "1.10.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" - integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== - -object-inspect@^1.11.0, object-inspect@^1.6.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== +object-inspect@^1.10.3, object-inspect@^1.11.0, object-inspect@^1.11.1, object-inspect@^1.6.0, object-inspect@^1.9.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" + integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== object-is@^1.0.1, object-is@^1.1.4: version "1.1.5" @@ -10561,7 +10543,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rfdc@^1.1.4: +rfdc@^1.1.4, rfdc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== @@ -10618,12 +10600,12 @@ rxjs@^7.2.0: dependencies: tslib "~2.1.0" -rxjs@^7.4.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.4.0.tgz#a12a44d7eebf016f5ff2441b87f28c9a51cebc68" - integrity sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w== +rxjs@^7.5.1: + version "7.5.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.1.tgz#af73df343cbcab37628197f43ea0c8256f54b157" + integrity sha512-KExVEeZWxMZnZhUZtsJcFwz8IvPvgu4G2Z2QyqjZQzUGr32KDYuSxrEYO4w3tFFNbfLozcrKUTvTPi+E9ywJkQ== dependencies: - tslib "~2.1.0" + tslib "^2.1.0" safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" @@ -11480,7 +11462,7 @@ supports-color@^8.0.0: dependencies: has-flag "^4.0.0" -supports-color@^9.0.2: +supports-color@^9.2.1: version "9.2.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.1.tgz#599dc9d45acf74c6176e0d880bab1d7d718fe891" integrity sha512-Obv7ycoCTG51N7y175StI9BlAXrmgZrFhZOb0/PyjHBher/NmsdBgbbQ1Inhq+gIhz6+7Gb+jWF2Vqi7Mf1xnQ== @@ -11760,7 +11742,7 @@ tsconfig-paths@^3.11.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@2.3.1, tslib@^2, tslib@^2.3.0, tslib@^2.3.1: +tslib@2.3.1, tslib@^2, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== From d4273c98c490f83032c8ee0f32fe4f9a4ffc65db Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jan 2022 10:16:52 +0000 Subject: [PATCH 004/148] build(deps-dev): bump @commitlint/config-angular from 15.0.0 to 16.0.0 Bumps [@commitlint/config-angular](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/config-angular) from 15.0.0 to 16.0.0. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/config-angular/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v16.0.0/@commitlint/config-angular) --- updated-dependencies: - dependency-name: "@commitlint/config-angular" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 4 +-- yarn.lock | 92 +++++++++++++++++++++------------------------------- 2 files changed, 39 insertions(+), 57 deletions(-) diff --git a/package.json b/package.json index 84ed573596..8fd1fcf85d 100644 --- a/package.json +++ b/package.json @@ -119,7 +119,7 @@ "@angular/cli": "~13.1.2", "@angular/compiler-cli": "~13.1.1", "@commitlint/cli": "^15.0.0", - "@commitlint/config-angular": "^15.0.0", + "@commitlint/config-angular": "^16.0.0", "@compodoc/compodoc": "^1.1.16", "@types/d3": "^7.1.0", "@types/jasmine": "~3.10.2", @@ -143,7 +143,7 @@ "karma-coverage": "^2.1.0", "karma-jasmine": "~4.0.1", "karma-jasmine-html-reporter": "^1.7.0", - "lint-staged": "^12.1.2", + "lint-staged": "^12.1.7", "prettier": "^2.5.1", "pretty-quick": "^3.1.2", "source-map-explorer": "^2.5.2", diff --git a/yarn.lock b/yarn.lock index 5d872eada6..17f0507392 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1619,17 +1619,17 @@ resolve-global "1.0.0" yargs "^17.0.0" -"@commitlint/config-angular-type-enum@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-angular-type-enum/-/config-angular-type-enum-15.0.0.tgz#52a2b6c90e577d0cd794231d9ee24fc6d96bf675" - integrity sha512-KBGoII2yo76KtbKbeCym5PxCt5CZvti7YbCEGOF5GiyZd/9AaJur/UhbzX3pcoLMgXd9u3Ru+qydm79TlRLuJA== +"@commitlint/config-angular-type-enum@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-angular-type-enum/-/config-angular-type-enum-16.0.0.tgz#a1e136fa380499fb39ca64be138fc41d6e54dbbd" + integrity sha512-6Gn/Wh7tFiVHUK+bxiVMUZg6X7N6ArJLgaH39/23qK3/PkC0Y4FSJZf63YIS+EA/n5USHaBgBV88iduSTJU9rQ== -"@commitlint/config-angular@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/config-angular/-/config-angular-15.0.0.tgz#e6f174ae46a7d122fa628a58c867a2a93082c8f0" - integrity sha512-1gpyAZkGB+v9hTvw4G8AGU7vzq49/pANifShUsoyuSLAmHzxC3YgE+ZyqlVoB+T6gjE90NXjUQbLmNpi/7ZFYg== +"@commitlint/config-angular@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-angular/-/config-angular-16.0.0.tgz#a66a90e3b80778e50de39e8a2623129cc7274da3" + integrity sha512-UmH3D/BjqhIueM29w9G8mR8wHI0ncUrNFqX6OgDhsIgLS1Sgf6L3ad+oasTWfJ+KjKl544cjoayyWY0eX3wrIg== dependencies: - "@commitlint/config-angular-type-enum" "^15.0.0" + "@commitlint/config-angular-type-enum" "^16.0.0" "@commitlint/ensure@^15.0.0": version "15.0.0" @@ -4507,11 +4507,6 @@ clone@^1.0.2, clone@^1.0.4: resolved "https://registry.yarnpkg.com/clone/-/clone-1.0.4.tgz#da309cc263df15994c688ca902179ca3c7cd7c7e" integrity sha1-2jCcwmPfFZlMaIypAheco8fNfH4= -clone@^2.1.2: - version "2.1.2" - resolved "https://registry.yarnpkg.com/clone/-/clone-2.1.2.tgz#1b7f4b9f591f1e8f83670401600345a02887435f" - integrity sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18= - co@^4.6.0: version "4.6.0" resolved "https://registry.yarnpkg.com/co/-/co-4.6.0.tgz#6ea6bdf3d853ae54ccb8e47bfa0bf3f9031fb184" @@ -5228,14 +5223,7 @@ debug@2.6.9, debug@^2.2.0, debug@^2.6.8, debug@^2.6.9: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@~4.3.1, debug@~4.3.2: - version "4.3.2" - resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b" - integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw== - dependencies: - ms "2.1.2" - -debug@4.3.3, debug@^4.3.2, debug@^4.3.3: +debug@4, debug@4.3.3, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.3, debug@~4.3.1, debug@~4.3.2: version "4.3.3" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.3.tgz#04266e0b70a98d4462e6e288e38259213332b664" integrity sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q== @@ -5654,7 +5642,7 @@ enhanced-resolve@^5.8.3: graceful-fs "^4.2.4" tapable "^2.2.0" -enquirer@^2.3.5, enquirer@^2.3.6, enquirer@~2.3.6: +enquirer@^2.3.5, enquirer@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.3.6.tgz#2a7fe5dd634a1e4125a975ec994ff5456dc3734d" integrity sha512-yjNnPr315/FjS4zIsUxYguYUPP2e1NK4d7E7ZOLiyYCcbFBiTMyID+2wvm2w6+pZ/odMA7cRkjhsPbltwBOrLg== @@ -8157,37 +8145,36 @@ lines-and-columns@^1.1.6: resolved "https://registry.yarnpkg.com/lines-and-columns/-/lines-and-columns-1.1.6.tgz#1c00c743b433cd0a4e80758f7b64a57440d9ff00" integrity sha1-HADHQ7QzzQpOgHWPe2SldEDZ/wA= -lint-staged@^12.1.2: - version "12.1.2" - resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.1.2.tgz#90c571927e1371fc133e720671dd7989eab53f74" - integrity sha512-bSMcQVqMW98HLLLR2c2tZ+vnDCnx4fd+0QJBQgN/4XkdspGRPc8DGp7UuOEBe1ApCfJ+wXXumYnJmU+wDo7j9A== +lint-staged@^12.1.7: + version "12.1.7" + resolved "https://registry.yarnpkg.com/lint-staged/-/lint-staged-12.1.7.tgz#fe9137992ac18a456422bb8484dd30be0140629f" + integrity sha512-bltv/ejiLWtowExpjU+s5z8j1Byjg9AlmaAjMmqNbIicY69u6sYIwXGg0dCn0TlkrrY2CphtHIXAkbZ+1VoWQQ== dependencies: cli-truncate "^3.1.0" colorette "^2.0.16" commander "^8.3.0" - debug "^4.3.2" - enquirer "^2.3.6" + debug "^4.3.3" execa "^5.1.1" lilconfig "2.0.4" - listr2 "^3.13.3" + listr2 "^3.13.5" micromatch "^4.0.4" normalize-path "^3.0.0" - object-inspect "^1.11.0" + object-inspect "^1.11.1" string-argv "^0.3.1" - supports-color "^9.0.2" + supports-color "^9.2.1" yaml "^1.10.2" -listr2@^3.13.3: - version "3.13.3" - resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.13.3.tgz#d8f6095c9371b382c9b1c2bc33c5941d8e177f11" - integrity sha512-VqAgN+XVfyaEjSaFewGPcDs5/3hBbWVaX1VgWv2f52MF7US45JuARlArULctiB44IIcEk3JF7GtoFCLqEdeuPA== +listr2@^3.13.5: + version "3.14.0" + resolved "https://registry.yarnpkg.com/listr2/-/listr2-3.14.0.tgz#23101cc62e1375fd5836b248276d1d2b51fdbe9e" + integrity sha512-TyWI8G99GX9GjE54cJ+RrNMcIFBfwMPxc3XTFiAYGN4s10hWROGtOg7+O6u6LE3mNkyld7RSLE6nrKBvTfcs3g== dependencies: cli-truncate "^2.1.0" - clone "^2.1.2" colorette "^2.0.16" log-update "^4.0.0" p-map "^4.0.0" - rxjs "^7.4.0" + rfdc "^1.3.0" + rxjs "^7.5.1" through "^2.3.8" wrap-ansi "^7.0.0" @@ -9123,15 +9110,10 @@ object-assign@^4, object-assign@^4.0.1, object-assign@^4.1.0, object-assign@late resolved "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863" integrity sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM= -object-inspect@^1.10.3, object-inspect@^1.9.0: - version "1.10.3" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.10.3.tgz#c2aa7d2d09f50c99375704f7a0adf24c5782d369" - integrity sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw== - -object-inspect@^1.11.0, object-inspect@^1.6.0: - version "1.11.0" - resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.11.0.tgz#9dceb146cedd4148a0d9e51ab88d34cf509922b1" - integrity sha512-jp7ikS6Sd3GxQfZJPyH3cjcbJF6GZPClgdV+EFygjFLQ5FmW/dRUnTd9PQ9k0JhoNDabWFbpF1yCdSWCC6gexg== +object-inspect@^1.10.3, object-inspect@^1.11.0, object-inspect@^1.11.1, object-inspect@^1.6.0, object-inspect@^1.9.0: + version "1.12.0" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0" + integrity sha512-Ho2z80bVIvJloH+YzRmpZVQe87+qASmBUKZDWgx9cu+KDrX2ZDH/3tMy+gXbZETVGs2M8YdxObOh7XAtim9Y0g== object-is@^1.0.1, object-is@^1.1.4: version "1.1.5" @@ -10561,7 +10543,7 @@ reusify@^1.0.4: resolved "https://registry.yarnpkg.com/reusify/-/reusify-1.0.4.tgz#90da382b1e126efc02146e90845a88db12925d76" integrity sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw== -rfdc@^1.1.4: +rfdc@^1.1.4, rfdc@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/rfdc/-/rfdc-1.3.0.tgz#d0b7c441ab2720d05dc4cf26e01c89631d9da08b" integrity sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA== @@ -10618,12 +10600,12 @@ rxjs@^7.2.0: dependencies: tslib "~2.1.0" -rxjs@^7.4.0: - version "7.4.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.4.0.tgz#a12a44d7eebf016f5ff2441b87f28c9a51cebc68" - integrity sha512-7SQDi7xeTMCJpqViXh8gL/lebcwlp3d831F05+9B44A4B0WfsEwUQHR64gsH1kvJ+Ep/J9K2+n1hVl1CsGN23w== +rxjs@^7.5.1: + version "7.5.1" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.1.tgz#af73df343cbcab37628197f43ea0c8256f54b157" + integrity sha512-KExVEeZWxMZnZhUZtsJcFwz8IvPvgu4G2Z2QyqjZQzUGr32KDYuSxrEYO4w3tFFNbfLozcrKUTvTPi+E9ywJkQ== dependencies: - tslib "~2.1.0" + tslib "^2.1.0" safe-buffer@5.1.2, safe-buffer@~5.1.0, safe-buffer@~5.1.1: version "5.1.2" @@ -11480,7 +11462,7 @@ supports-color@^8.0.0: dependencies: has-flag "^4.0.0" -supports-color@^9.0.2: +supports-color@^9.2.1: version "9.2.1" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-9.2.1.tgz#599dc9d45acf74c6176e0d880bab1d7d718fe891" integrity sha512-Obv7ycoCTG51N7y175StI9BlAXrmgZrFhZOb0/PyjHBher/NmsdBgbbQ1Inhq+gIhz6+7Gb+jWF2Vqi7Mf1xnQ== @@ -11760,7 +11742,7 @@ tsconfig-paths@^3.11.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@2.3.1, tslib@^2, tslib@^2.3.0, tslib@^2.3.1: +tslib@2.3.1, tslib@^2, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== From 09ddcce68ff0e12439261196556b6fbf567e4585 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 12 Jan 2022 18:56:05 +0000 Subject: [PATCH 005/148] build(deps-dev): bump @commitlint/cli from 15.0.0 to 16.0.2 Bumps [@commitlint/cli](https://github.com/conventional-changelog/commitlint/tree/HEAD/@commitlint/cli) from 15.0.0 to 16.0.2. - [Release notes](https://github.com/conventional-changelog/commitlint/releases) - [Changelog](https://github.com/conventional-changelog/commitlint/blob/master/@commitlint/cli/CHANGELOG.md) - [Commits](https://github.com/conventional-changelog/commitlint/commits/v16.0.2/@commitlint/cli) --- updated-dependencies: - dependency-name: "@commitlint/cli" dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 292 ++++++++++++++++++++++++++++----------------------- 2 files changed, 160 insertions(+), 134 deletions(-) diff --git a/package.json b/package.json index 8fd1fcf85d..d3ead0263b 100644 --- a/package.json +++ b/package.json @@ -118,7 +118,7 @@ "@angular-eslint/template-parser": "^13.0.1", "@angular/cli": "~13.1.2", "@angular/compiler-cli": "~13.1.1", - "@commitlint/cli": "^15.0.0", + "@commitlint/cli": "^16.0.2", "@commitlint/config-angular": "^16.0.0", "@compodoc/compodoc": "^1.1.16", "@types/d3": "^7.1.0", diff --git a/yarn.lock b/yarn.lock index 17f0507392..1e4bbd4fde 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1604,16 +1604,16 @@ "@babel/helper-validator-identifier" "^7.15.7" to-fast-properties "^2.0.0" -"@commitlint/cli@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-15.0.0.tgz#8e78e86ee2b6955c1a5d140e734a6c171ce367ee" - integrity sha512-Y5xmDCweytqzo4N4lOI2YRiuX35xTjcs8n5hUceBH8eyK0YbwtgWX50BJOH2XbkwEmII9blNhlBog6AdQsqicg== - dependencies: - "@commitlint/format" "^15.0.0" - "@commitlint/lint" "^15.0.0" - "@commitlint/load" "^15.0.0" - "@commitlint/read" "^15.0.0" - "@commitlint/types" "^15.0.0" +"@commitlint/cli@^16.0.2": + version "16.0.2" + resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-16.0.2.tgz#393b03793fc59b93e5f4dd7dd535a6cc5a7413ca" + integrity sha512-Jt7iaBjoLGC5Nq4dHPTvTYnqPGkElFPBtTXTvBpTgatZApczyjI2plE0oG4GYWPp1suHIS/VdVDOMpPZjGVusg== + dependencies: + "@commitlint/format" "^16.0.0" + "@commitlint/lint" "^16.0.0" + "@commitlint/load" "^16.0.0" + "@commitlint/read" "^16.0.0" + "@commitlint/types" "^16.0.0" lodash "^4.17.19" resolve-from "5.0.0" resolve-global "1.0.0" @@ -1631,121 +1631,132 @@ dependencies: "@commitlint/config-angular-type-enum" "^16.0.0" -"@commitlint/ensure@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-15.0.0.tgz#06a63738e2393970a085b428e6cf80fa1fe76f48" - integrity sha512-7DV4iNIald3vycwaWBNGk5FbonaNzOlU8nBe5m5AgU2dIeNKuXwLm+zzJzG27j0Ho56rgz//3F6RIvmsoxY9ZA== +"@commitlint/config-validator@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/config-validator/-/config-validator-16.0.0.tgz#61dd84895e5dcab6066ff5e21e2b9a96b0ed6323" + integrity sha512-i80DGlo1FeC5jZpuoNV9NIjQN/m2dDV3jYGWg+1Wr+KldptkUHXj+6GY1Akll66lJ3D8s6aUGi3comPLHPtWHg== + dependencies: + "@commitlint/types" "^16.0.0" + ajv "^6.12.6" + +"@commitlint/ensure@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/ensure/-/ensure-16.0.0.tgz#fdac1e60a944a1993deb33b5e8454c559abe9866" + integrity sha512-WdMySU8DCTaq3JPf0tZFCKIUhqxaL54mjduNhu8v4D2AMUVIIQKYMGyvXn94k8begeW6iJkTf9cXBArayskE7Q== dependencies: - "@commitlint/types" "^15.0.0" + "@commitlint/types" "^16.0.0" lodash "^4.17.19" -"@commitlint/execute-rule@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-15.0.0.tgz#6bff7962df38e89ff9fdbc00abd79b8849c7e9f9" - integrity sha512-pyE4ApxjbWhb1TXz5vRiGwI2ssdMMgZbaaheZq1/7WC0xRnqnIhE1yUC1D2q20qPtvkZPstTYvMiRVtF+DvjUg== +"@commitlint/execute-rule@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/execute-rule/-/execute-rule-16.0.0.tgz#824e11ba5b208c214a474ae52a51780d32d31ebc" + integrity sha512-8edcCibmBb386x5JTHSPHINwA5L0xPkHQFY8TAuDEt5QyRZY/o5DF8OPHSa5Hx2xJvGaxxuIz4UtAT6IiRDYkw== -"@commitlint/format@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-15.0.0.tgz#10935180913de9384bea4c9217f4c6c5ee100ab3" - integrity sha512-bPhAfqwRhPk92WiuY0ktEJNpRRHSCd+Eg1MdhGyL9Bl3U25E5zvuInA+dNctnzZiOBSH/37ZaD0eOKCpQE6acg== +"@commitlint/format@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/format/-/format-16.0.0.tgz#6a6fb2c1e6460aff63cc6eca30a7807a96b0ce73" + integrity sha512-9yp5NCquXL1jVMKL0ZkRwJf/UHdebvCcMvICuZV00NQGYSAL89O398nhqrqxlbjBhM5EZVq0VGcV5+7r3D4zAA== dependencies: - "@commitlint/types" "^15.0.0" + "@commitlint/types" "^16.0.0" chalk "^4.0.0" -"@commitlint/is-ignored@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-15.0.0.tgz#382bf9f6f8d810f2ffc59ccc527f4389eadd7949" - integrity sha512-edtnkf2QZ/7e/YCJDgn1WDw9wfF1WfOitW5YEoSOb4SxjJEb/oE87kxNPZ2j8mnDMuunspcMfGHeg6fRlwaEWg== +"@commitlint/is-ignored@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/is-ignored/-/is-ignored-16.0.0.tgz#5ab4c4a9c7444c1a8540f50a0f1a907dfd78eb70" + integrity sha512-gmAQcwIGC/R/Lp0CEb2b5bfGC7MT5rPe09N8kOGjO/NcdNmfFSZMquwrvNJsq9hnAP0skRdHIsqwlkENkN4Lag== dependencies: - "@commitlint/types" "^15.0.0" + "@commitlint/types" "^16.0.0" semver "7.3.5" -"@commitlint/lint@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-15.0.0.tgz#a93b8896fb25b05ab2ed0246d365f4908654588d" - integrity sha512-hUi2+Im/2dJ5FBvWnodypTkg+5haCgsDzB0fyMApWLUA1IucYUAqRCQCW5em1Mhk9Crw1pd5YzFNikhIclkqCw== - dependencies: - "@commitlint/is-ignored" "^15.0.0" - "@commitlint/parse" "^15.0.0" - "@commitlint/rules" "^15.0.0" - "@commitlint/types" "^15.0.0" - -"@commitlint/load@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-15.0.0.tgz#5bd391c1387aafe92b54cf2a86b76a5228fcf4ef" - integrity sha512-Ak1YPeOhvxmY3ioe0o6m1yLGvUAYb4BdfGgShU8jiTCmU3Mnmms0Xh/kfQz8AybhezCC3AmVTyBLaBZxOHR8kg== - dependencies: - "@commitlint/execute-rule" "^15.0.0" - "@commitlint/resolve-extends" "^15.0.0" - "@commitlint/types" "^15.0.0" - "@endemolshinegroup/cosmiconfig-typescript-loader" "^3.0.2" +"@commitlint/lint@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/lint/-/lint-16.0.0.tgz#87151a935941073027907fd4752a2e3c83cebbfe" + integrity sha512-HNl15bRC0h+pLzbMzQC3tM0j1aESXsLYhElqKnXcf5mnCBkBkHzu6WwJW8rZbfxX+YwJmNljN62cPhmdBo8x0A== + dependencies: + "@commitlint/is-ignored" "^16.0.0" + "@commitlint/parse" "^16.0.0" + "@commitlint/rules" "^16.0.0" + "@commitlint/types" "^16.0.0" + +"@commitlint/load@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/load/-/load-16.0.0.tgz#4ab9f8502d0521209ce54d7cce58d419b8c35b48" + integrity sha512-7WhrGCkP6K/XfjBBguLkkI2XUdiiIyMGlNsSoSqgRNiD352EiffhFEApMy1/XOU+viwBBm/On0n5p0NC7e9/4A== + dependencies: + "@commitlint/config-validator" "^16.0.0" + "@commitlint/execute-rule" "^16.0.0" + "@commitlint/resolve-extends" "^16.0.0" + "@commitlint/types" "^16.0.0" chalk "^4.0.0" cosmiconfig "^7.0.0" + cosmiconfig-typescript-loader "^1.0.0" lodash "^4.17.19" resolve-from "^5.0.0" typescript "^4.4.3" -"@commitlint/message@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-15.0.0.tgz#98a38aca1b3cd996a0fcdbd9ad67e9039df60b0a" - integrity sha512-L8euabzboKavPuDJsdIYAY2wx97LbiGEYsckMo6NmV8pOun50c8hQx6ouXFSAx4pp+mX9yUGmMiVqfrk2LKDJQ== +"@commitlint/message@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/message/-/message-16.0.0.tgz#4a467341fc6bc49e5a3ead005dd6aa36fa856b87" + integrity sha512-CmK2074SH1Ws6kFMEKOKH/7hMekGVbOD6vb4alCOo2+33ZSLUIX8iNkDYyrw38Jwg6yWUhLjyQLUxREeV+QIUA== -"@commitlint/parse@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-15.0.0.tgz#cac77b7514748b8d01d00c0e67d5e54c695c302c" - integrity sha512-7fweM67tZfBNS7zw1KTuuT5K2u9nGytUJqFqT/1Ln3Na9cBCsoAqR47mfsNOTlRCgGwakm4xiQ7BpS2gN0OGuw== +"@commitlint/parse@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/parse/-/parse-16.0.0.tgz#5ce05af14edff806effc702ba910fcb32fcb192a" + integrity sha512-F9EjFlMw4MYgBEqoRrWZZKQBzdiJzPBI0qFDFqwUvfQsMmXEREZ242T4R5bFwLINWaALFLHEIa/FXEPa6QxCag== dependencies: - "@commitlint/types" "^15.0.0" + "@commitlint/types" "^16.0.0" conventional-changelog-angular "^5.0.11" conventional-commits-parser "^3.2.2" -"@commitlint/read@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-15.0.0.tgz#da839f3b4d49b05586a9cd2666cc8c4a36b9ec91" - integrity sha512-5yI1o2HKZFVe7RTjL7IhuhHMKar/MDNY34vEHqqz9gMI7BK/rdP8uVb4Di1efl2V0UPnwID0nPKWESjQ8Ti0gw== +"@commitlint/read@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/read/-/read-16.0.0.tgz#92fab45d4e0e4d7d049427306500270b3e459221" + integrity sha512-H4T2zsfmYQK9B+JtoQaCXWBHUhgIJyOzWZjSfuIV9Ce69/OgHoffNpLZPF2lX6yKuDrS1SQFhI/kUCjVc/e4ew== dependencies: - "@commitlint/top-level" "^15.0.0" - "@commitlint/types" "^15.0.0" + "@commitlint/top-level" "^16.0.0" + "@commitlint/types" "^16.0.0" fs-extra "^10.0.0" git-raw-commits "^2.0.0" -"@commitlint/resolve-extends@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-15.0.0.tgz#baf21227e2ac52cef546ec35dd6732e9b0b6e57c" - integrity sha512-7apfRJjgJsKja7lHsPfEFixKjA/fk/UeD3owkOw1174yYu4u8xBDLSeU3IinGPdMuF9m245eX8wo7vLUy+EBSg== +"@commitlint/resolve-extends@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/resolve-extends/-/resolve-extends-16.0.0.tgz#2136f01d81bccc29091f2720b42c8c96aa59c56e" + integrity sha512-Z/w9MAQUcxeawpCLtjmkVNXAXOmB2nhW+LYmHEZcx9O6UTauF/1+uuZ2/r0MtzTe1qw2JD+1QHVhEWYHVPlkdA== dependencies: + "@commitlint/config-validator" "^16.0.0" + "@commitlint/types" "^16.0.0" import-fresh "^3.0.0" lodash "^4.17.19" resolve-from "^5.0.0" resolve-global "^1.0.0" -"@commitlint/rules@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-15.0.0.tgz#326370abc004492fcb5543198d1d55b14e25e3c8" - integrity sha512-SqXfp6QUlwBS+0IZm4FEA/NmmAwcFQIkG3B05BtemOVWXQdZ8j1vV6hDwvA9oMPCmUSrrGpHOtZK7HaHhng2yA== +"@commitlint/rules@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/rules/-/rules-16.0.0.tgz#79d28c3678d2d1f7f1cdbedaedb30b01a86ee75b" + integrity sha512-AOl0y2SBTdJ1bvIv8nwHvQKRT/jC1xb09C5VZwzHoT8sE8F54KDeEzPCwHQFgUcWdGLyS10kkOTAH2MyA8EIlg== dependencies: - "@commitlint/ensure" "^15.0.0" - "@commitlint/message" "^15.0.0" - "@commitlint/to-lines" "^15.0.0" - "@commitlint/types" "^15.0.0" + "@commitlint/ensure" "^16.0.0" + "@commitlint/message" "^16.0.0" + "@commitlint/to-lines" "^16.0.0" + "@commitlint/types" "^16.0.0" execa "^5.0.0" -"@commitlint/to-lines@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-15.0.0.tgz#b86ac98f319688990ecc2e09227fadf591b65c92" - integrity sha512-mY3MNA9ujPqVpiJjTYG9MDsYCobue5PJFO0MfcIzS1mCVvngH8ZFTPAh1fT5t+t1h876boS88+9WgqjRvbYItw== +"@commitlint/to-lines@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/to-lines/-/to-lines-16.0.0.tgz#799980a89072302445baf595e20092fb86f0a58a" + integrity sha512-iN/qU38TCKU7uKOg6RXLpD49wNiuI0TqMqybHbjefUeP/Jmzxa8ishryj0uLyVdrAl1ZjGeD1ukXGMTtvqz8iA== -"@commitlint/top-level@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-15.0.0.tgz#467ec8377e81dfc916e1a20a27558862be1a4254" - integrity sha512-7Gz3t7xcuuUw1d1Nou6YLaztzp2Em+qZ6YdCzrqYc+aquca3Vt0O696nuiBDU/oE+tls4Hx2CNpAbWhTgEwB5A== +"@commitlint/top-level@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/top-level/-/top-level-16.0.0.tgz#7c2efc33cc37df839b3de558c0bc2eaddb64efe6" + integrity sha512-/Jt6NLxyFkpjL5O0jxurZPCHURZAm7cQCqikgPCwqPAH0TLgwqdHjnYipl8J+AGnAMGDip4FNLoYrtgIpZGBYw== dependencies: find-up "^5.0.0" -"@commitlint/types@^15.0.0": - version "15.0.0" - resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-15.0.0.tgz#46fa7bda3e6340caf3e3a2e415bcb78ff0195eed" - integrity sha512-OMSLX+QJnyNoTwws54ULv9sOvuw9GdVezln76oyUd4YbMMJyaav62aSXDuCdWyL2sm9hTkSzyEi52PNaIj/vqw== +"@commitlint/types@^16.0.0": + version "16.0.0" + resolved "https://registry.yarnpkg.com/@commitlint/types/-/types-16.0.0.tgz#3c133f106d36132756c464071a7f2290966727a3" + integrity sha512-+0FvYOAS39bJ4aKjnYn/7FD4DfWkmQ6G/06I4F0Gvu4KS5twirEg8mIcLhmeRDOOKn4Tp8PwpLwBiSA6npEMQA== dependencies: chalk "^4.0.0" @@ -1827,6 +1838,18 @@ dot "^1.1.3" fs-extra "^9.0.1" +"@cspotcode/source-map-consumer@0.8.0": + version "0.8.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-consumer/-/source-map-consumer-0.8.0.tgz#33bf4b7b39c178821606f669bbc447a6a629786b" + integrity sha512-41qniHzTU8yAGbCp04ohlmSrZf8bkf/iJsl3V0dRGsQN/5GFfx+LbCSsCpp2gqrqjTVg/K6O8ycoV35JIwAzAg== + +"@cspotcode/source-map-support@0.7.0": + version "0.7.0" + resolved "https://registry.yarnpkg.com/@cspotcode/source-map-support/-/source-map-support-0.7.0.tgz#4789840aa859e46d2f3173727ab707c66bf344f5" + integrity sha512-X4xqRHqN8ACt2aHVe51OxeA2HjbcL4MqFqXkrmQszJ1NOUuUu5u6Vqx/0lZSVNku7velL5FC/s5uEAj1lsBMhA== + dependencies: + "@cspotcode/source-map-consumer" "0.8.0" + "@csstools/convert-colors@^1.4.0": version "1.4.0" resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" @@ -1845,16 +1868,6 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.6.tgz#d5e0706cf8c6acd8c6032f8d54070af261bbbb2f" integrity sha512-ws57AidsDvREKrZKYffXddNkyaF14iHNHm8VQnZH6t99E8gczjNN0GpvcGny0imC80yQ0tHz1xVUKk/KFQSUyA== -"@endemolshinegroup/cosmiconfig-typescript-loader@^3.0.2": - version "3.0.2" - resolved "https://registry.yarnpkg.com/@endemolshinegroup/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-3.0.2.tgz#eea4635828dde372838b0909693ebd9aafeec22d" - integrity sha512-QRVtqJuS1mcT56oHpVegkKBlgtWjXw/gHNWO3eL9oyB5Sc7HBoc2OLG/nYpVfT/Jejvo3NUrD0Udk7XgoyDKkA== - dependencies: - lodash.get "^4" - make-error "^1" - ts-node "^9" - tslib "^2" - "@es-joy/jsdoccomment@0.13.0": version "0.13.0" resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.13.0.tgz#90ffe2006981ff66d3f4fd2f05949487f0fca089" @@ -2177,6 +2190,26 @@ mkdirp "^1.0.4" path-browserify "^1.0.1" +"@tsconfig/node10@^1.0.7": + version "1.0.8" + resolved "https://registry.yarnpkg.com/@tsconfig/node10/-/node10-1.0.8.tgz#c1e4e80d6f964fbecb3359c43bd48b40f7cadad9" + integrity sha512-6XFfSQmMgq0CFLY1MslA/CPUfhIL919M1rMsa5lP2P097N2Wd1sSX0tx1u4olM16fLNhtHZpRhedZJphNJqmZg== + +"@tsconfig/node12@^1.0.7": + version "1.0.9" + resolved "https://registry.yarnpkg.com/@tsconfig/node12/-/node12-1.0.9.tgz#62c1f6dee2ebd9aead80dc3afa56810e58e1a04c" + integrity sha512-/yBMcem+fbvhSREH+s14YJi18sp7J9jpuhYByADT2rypfajMZZN4WQ6zBGgBKp53NKmqI36wFYDb3yaMPurITw== + +"@tsconfig/node14@^1.0.0": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@tsconfig/node14/-/node14-1.0.1.tgz#95f2d167ffb9b8d2068b0b235302fafd4df711f2" + integrity sha512-509r2+yARFfHHE7T6Puu2jjkoycftovhXRqW328PDXTVGKihlb1P8Z9mMZH04ebyajfRY7dedfGynlrFHJUQCg== + +"@tsconfig/node16@^1.0.2": + version "1.0.2" + resolved "https://registry.yarnpkg.com/@tsconfig/node16/-/node16-1.0.2.tgz#423c77877d0569db20e1fc80885ac4118314010e" + integrity sha512-eZxlbI8GZscaGS7kkc/trHTT5xgrjH3/1n2JDwusC9iahPKWMRvRjJSAN5mCXviuTGQ/lHnhvv8Q1YTpnfz9gA== + "@types/codemirror@^5.60.5": version "5.60.5" resolved "https://registry.yarnpkg.com/@types/codemirror/-/codemirror-5.60.5.tgz#5b989a3b4bbe657458cf372c92b6bfda6061a2b7" @@ -2821,6 +2854,11 @@ acorn-walk@^8.0.0: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.1.1.tgz#3ddab7f84e4a7e2313f6c414c5b7dac85f4e3ebc" integrity sha512-FbJdceMlPHEAWJOILDk1fXD8lnTlEIWFkqtfk+MvmL5q/qlHfN7GEHcsFZWt/Tea9jRNPWUZG4G976nqAAmU9w== +acorn-walk@^8.1.1: + version "8.2.0" + resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" + integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== + acorn@^7.0.0: version "7.4.1" resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" @@ -2910,7 +2948,7 @@ ajv@^4.9.1: co "^4.6.0" json-stable-stringify "^1.0.1" -ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5: +ajv@^6.10.0, ajv@^6.12.3, ajv@^6.12.4, ajv@^6.12.5, ajv@^6.12.6: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -4950,7 +4988,15 @@ cors@latest, cors@~2.8.5: object-assign "^4" vary "^1" -cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: +cosmiconfig-typescript-loader@^1.0.0: + version "1.0.3" + resolved "https://registry.yarnpkg.com/cosmiconfig-typescript-loader/-/cosmiconfig-typescript-loader-1.0.3.tgz#528f2bb3e6b6705020dc42df659f24837e75b611" + integrity sha512-ARo21VjxdacJUcHxgVMEYNIoVPYiuKOEwWBIYej4M22+pEbe3LzKgmht2UPM+0u7/T/KnZf2r/5IzHv2Nwz+/w== + dependencies: + cosmiconfig "^7" + ts-node "^10.4.0" + +cosmiconfig@^7, cosmiconfig@^7.0.0, cosmiconfig@^7.0.1: version "7.0.1" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.1.tgz#714d756522cace867867ccb4474c5d01bbae5d6d" integrity sha512-a1YWNUV2HwGimB7dU2s1wUMurNKjpx60HxBB6xUM8Re+2s1g1IIfJvFR0/iCF+XHdE0GMTKTuLR32UQff4TEyQ== @@ -8251,11 +8297,6 @@ lodash.debounce@^4.0.8: resolved "https://registry.yarnpkg.com/lodash.debounce/-/lodash.debounce-4.0.8.tgz#82d79bff30a67c4005ffd5e2515300ad9ca4d7af" integrity sha1-gteb/zCmfEAF/9XiUVMArZyk168= -lodash.get@^4: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" - integrity sha1-LRd/ZS+jHpObRDjVNBSZ36OCXpk= - lodash.ismatch@^4.4.0: version "4.4.0" resolved "https://registry.yarnpkg.com/lodash.ismatch/-/lodash.ismatch-4.4.0.tgz#756cb5150ca3ba6f11085a78849645f188f85f37" @@ -8371,7 +8412,7 @@ make-dir@^3.0.0, make-dir@^3.0.2, make-dir@^3.1.0: dependencies: semver "^6.0.0" -make-error@^1, make-error@^1.1.1: +make-error@^1.1.1: version "1.3.6" resolved "https://registry.yarnpkg.com/make-error/-/make-error-1.3.6.tgz#2eb2e37ea9b67c4891f684a1394799af484cf7a2" integrity sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw== @@ -11043,14 +11084,6 @@ source-map-support@^0.4.15: dependencies: source-map "^0.5.6" -source-map-support@^0.5.17: - version "0.5.20" - resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.20.tgz#12166089f8f5e5e8c56926b377633392dd2cb6c9" - integrity sha512-n1lZZ8Ve4ksRqizaBQgxXDgKwttHDhyfQjA6YZZn8+AroHbsIz+JjwxQDxbp+7y5OYCI8t1Yk7etjD9CRd2hIw== - dependencies: - buffer-from "^1.0.0" - source-map "^0.6.0" - source-map-support@^0.5.5, source-map-support@~0.5.19: version "0.5.19" resolved "https://registry.yarnpkg.com/source-map-support/-/source-map-support-0.5.19.tgz#a98b62f86dcaf4f67399648c085291ab9e8fed61" @@ -11720,16 +11753,22 @@ ts-morph@^13.0.1: "@ts-morph/common" "~0.12.2" code-block-writer "^11.0.0" -ts-node@^9: - version "9.1.1" - resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-9.1.1.tgz#51a9a450a3e959401bda5f004a72d54b936d376d" - integrity sha512-hPlt7ZACERQGf03M253ytLY3dHbGNGrAq9qIHWUY9XHYl1z7wYngSr3OQ5xmui8o2AaxsONxIzjafLUiWBo1Fg== +ts-node@^10.4.0: + version "10.4.0" + resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.4.0.tgz#680f88945885f4e6cf450e7f0d6223dd404895f7" + integrity sha512-g0FlPvvCXSIO1JDF6S232P5jPYqBkRL9qly81ZgAOSU7rwI0stphCgd2kLiCrU9DjQCrJMWEqcNSjQL02s6d8A== dependencies: + "@cspotcode/source-map-support" "0.7.0" + "@tsconfig/node10" "^1.0.7" + "@tsconfig/node12" "^1.0.7" + "@tsconfig/node14" "^1.0.0" + "@tsconfig/node16" "^1.0.2" + acorn "^8.4.1" + acorn-walk "^8.1.1" arg "^4.1.0" create-require "^1.1.0" diff "^4.0.1" make-error "^1.1.1" - source-map-support "^0.5.17" yn "3.1.1" tsconfig-paths@^3.11.0: @@ -11742,7 +11781,7 @@ tsconfig-paths@^3.11.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@2.3.1, tslib@^2, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1: +tslib@2.3.1, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== @@ -12420,20 +12459,7 @@ yargs@^16.0.0, yargs@^16.1.1, yargs@^16.2.0: y18n "^5.0.5" yargs-parser "^20.2.2" -yargs@^17.0.0: - version "17.2.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.2.1.tgz#e2c95b9796a0e1f7f3bf4427863b42e0418191ea" - integrity sha512-XfR8du6ua4K6uLGm5S6fA+FIJom/MdJcFNVY8geLlp2v8GYbOXD4EB1tPNZsRn4vBzKGMgb5DRZMeWuFc2GO8Q== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^17.2.1: +yargs@^17.0.0, yargs@^17.2.1: version "17.3.0" resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.3.0.tgz#295c4ffd0eef148ef3e48f7a2e0f58d0e4f26b1c" integrity sha512-GQl1pWyDoGptFPJx9b9L6kmR33TGusZvXIZUT+BOz9f7X2L94oeAskFYLEg/FkhV06zZPBYLvLZRWeYId29lew== From 7b36633478059fbce60adca2d53ec78de4c80016 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 14 Jan 2022 11:28:42 +0000 Subject: [PATCH 006/148] build(deps-dev): bump @compodoc/compodoc from 1.1.16 to 1.1.18 Bumps [@compodoc/compodoc](https://github.com/compodoc/compodoc) from 1.1.16 to 1.1.18. - [Release notes](https://github.com/compodoc/compodoc/releases) - [Changelog](https://github.com/compodoc/compodoc/blob/develop/CHANGELOG.md) - [Commits](https://github.com/compodoc/compodoc/compare/1.1.16...1.1.18) --- updated-dependencies: - dependency-name: "@compodoc/compodoc" dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 1105 ++++++++++++++++++++++++++++++++++++++------------ 2 files changed, 856 insertions(+), 251 deletions(-) diff --git a/package.json b/package.json index d3ead0263b..77f89dd725 100644 --- a/package.json +++ b/package.json @@ -120,7 +120,7 @@ "@angular/compiler-cli": "~13.1.1", "@commitlint/cli": "^16.0.2", "@commitlint/config-angular": "^16.0.0", - "@compodoc/compodoc": "^1.1.16", + "@compodoc/compodoc": "^1.1.18", "@types/d3": "^7.1.0", "@types/jasmine": "~3.10.2", "@types/node": "^15.14.9", diff --git a/yarn.lock b/yarn.lock index 1e4bbd4fde..e9cb635844 100644 --- a/yarn.lock +++ b/yarn.lock @@ -115,6 +115,18 @@ rxjs "6.6.7" source-map "0.7.3" +"@angular-devkit/core@13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-13.1.3.tgz#d1f8a6b4ad4326732a160a7549fccca1369fd108" + integrity sha512-o14jGDk4h14dVYYQafOn+2rq9CDmDMbDV6logqKYCLzTDRlK8gccDnqJM/QKAlfWCzbllZqcHDmg6FyoRLO9RQ== + dependencies: + ajv "8.8.2" + ajv-formats "2.1.1" + fast-json-stable-stringify "2.1.0" + magic-string "0.25.7" + rxjs "6.6.7" + source-map "0.7.3" + "@angular-devkit/schematics@13.1.2": version "13.1.2" resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-13.1.2.tgz#4e6d25e1b2a3360f5a7ef434615ed895ce0bb8de" @@ -126,6 +138,17 @@ ora "5.4.1" rxjs "6.6.7" +"@angular-devkit/schematics@^13.1.2": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-13.1.3.tgz#2328f9cf63d6f556392d96b73af794fc52bfc87f" + integrity sha512-TvjThB/pFXNFM0j0WX5yg0L2/3xNsqawQuWhkDJ05MBDEnSxbgv5hmOzNL8SNIEMgP0VbSTHtSg5kZvmNiH7vg== + dependencies: + "@angular-devkit/core" "13.1.3" + jsonc-parser "3.0.0" + magic-string "0.25.7" + ora "5.4.1" + rxjs "6.6.7" + "@angular-eslint/builder@^13.0.1": version "13.0.1" resolved "https://registry.yarnpkg.com/@angular-eslint/builder/-/builder-13.0.1.tgz#568bf7df41b7ff4fcf51d2d2188b372da6152bcd" @@ -325,6 +348,13 @@ dependencies: "@babel/highlight" "^7.16.0" +"@babel/code-frame@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" + integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== + dependencies: + "@babel/highlight" "^7.16.7" + "@babel/compat-data@^7.13.11", "@babel/compat-data@^7.14.5": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.7.tgz#7b047d7a3a89a67d2258dc61f604f098f1bc7e08" @@ -335,6 +365,11 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.4.tgz#081d6bbc336ec5c2435c6346b2ae1fb98b5ac68e" integrity sha512-1o/jo7D+kC9ZjHX5v+EHrdjl3PhxMrLSOTGsOdHJ+KL8HCaEK6ehrVL2RS6oHDZp+L7xLirLrPmQtEng769J/Q== +"@babel/compat-data@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.16.8.tgz#31560f9f29fdf1868de8cb55049538a1b9732a60" + integrity sha512-m7OkX0IdKLKPpBlJtF561YJal5y/jyI5fNfWbPxh2D/nbzzGI4qRyrD8xO2jB24u7l+5I2a43scCG2IrfjC50Q== + "@babel/core@7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.0.tgz#c4ff44046f5fe310525cc9eb4ef5147f0c5374d4" @@ -377,41 +412,20 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/core@^7.12.3", "@babel/core@^7.16.0": - version "7.16.5" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.5.tgz#924aa9e1ae56e1e55f7184c8bf073a50d8677f5c" - integrity sha512-wUcenlLzuWMZ9Zt8S0KmFwGlH6QKRh3vsm/dhDA3CHkiTA45YuG1XkHRcNRl73EFPXDp/d5kVOU0/y7x2w6OaQ== - dependencies: - "@babel/code-frame" "^7.16.0" - "@babel/generator" "^7.16.5" - "@babel/helper-compilation-targets" "^7.16.3" - "@babel/helper-module-transforms" "^7.16.5" - "@babel/helpers" "^7.16.5" - "@babel/parser" "^7.16.5" - "@babel/template" "^7.16.0" - "@babel/traverse" "^7.16.5" - "@babel/types" "^7.16.0" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.1.2" - semver "^6.3.0" - source-map "^0.5.0" - -"@babel/core@^7.7.5", "@babel/core@^7.8.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.14.6.tgz#e0814ec1a950032ff16c13a2721de39a8416fcab" - integrity sha512-gJnOEWSqTk96qG5BoIrl5bVtc23DCycmIePPYnamY9RboYdI4nFy5vAQMSl81O5K/W0sLDWfGysnOECC+KUUCA== - dependencies: - "@babel/code-frame" "^7.14.5" - "@babel/generator" "^7.14.5" - "@babel/helper-compilation-targets" "^7.14.5" - "@babel/helper-module-transforms" "^7.14.5" - "@babel/helpers" "^7.14.6" - "@babel/parser" "^7.14.6" - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" +"@babel/core@^7.12.3", "@babel/core@^7.16.7", "@babel/core@^7.7.5", "@babel/core@^7.8.6": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.16.7.tgz#db990f931f6d40cb9b87a0dc7d2adc749f1dcbcf" + integrity sha512-aeLaqcqThRNZYmbMqtulsetOQZ/5gbR/dWruUCJcpas4Qoyy+QeagfDsPdMrqwsPRDNxJvBlRiZxxX7THO7qtA== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.16.7" + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helpers" "^7.16.7" + "@babel/parser" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.16.7" + "@babel/types" "^7.16.7" convert-source-map "^1.7.0" debug "^4.1.0" gensync "^1.0.0-beta.2" @@ -446,6 +460,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.16.7", "@babel/generator@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.8.tgz#359d44d966b8cd059d543250ce79596f792f2ebe" + integrity sha512-1ojZwE9+lOXzcWdWmO6TbUzDfqLD39CmEhN8+2cX9XkDo5yW1OpgfejfliysR2AWLpMamTiOiAp/mtroaymhpw== + dependencies: + "@babel/types" "^7.16.8" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/helper-annotate-as-pure@7.16.0", "@babel/helper-annotate-as-pure@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz#9a1f0ebcda53d9a2d00108c4ceace6a5d5f1f08d" @@ -460,6 +483,13 @@ dependencies: "@babel/types" "^7.14.5" +"@babel/helper-annotate-as-pure@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.7.tgz#bb2339a7534a9c128e3102024c60760a3a7f3862" + integrity sha512-s6t2w/IPQVTAET1HitoowRGXooX8mCgtuP5195wD/QJPV6wYjpujCGF7JuMODVX2ZAJOf1GT6DT9MHEZvLOFSw== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-builder-binary-assignment-operator-visitor@^7.16.5": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.5.tgz#a8429d064dce8207194b8bf05a70a9ea828746af" @@ -468,7 +498,15 @@ "@babel/helper-explode-assignable-expression" "^7.16.0" "@babel/types" "^7.16.0" -"@babel/helper-compilation-targets@^7.13.0", "@babel/helper-compilation-targets@^7.14.5": +"@babel/helper-builder-binary-assignment-operator-visitor@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.16.7.tgz#38d138561ea207f0f69eb1626a418e4f7e6a580b" + integrity sha512-C6FdbRaxYjwVu/geKW4ZeQ0Q31AftgRcdSnZ5/jsH6BzCJbtvXvhpfkbkThYSuutZA7nCXpPR6AD9zd1dprMkA== + dependencies: + "@babel/helper-explode-assignable-expression" "^7.16.7" + "@babel/types" "^7.16.7" + +"@babel/helper-compilation-targets@^7.13.0": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.14.5.tgz#7a99c5d0967911e972fe2c3411f7d5b498498ecf" integrity sha512-v+QtZqXEiOnpO6EYvlImB6zCD2Lel06RzOPzmkz/D/XgQiUu3C/Jb1LOqSt/AIA34TYi/Q+KlT8vTQrgdxkbLw== @@ -488,6 +526,16 @@ browserslist "^4.17.5" semver "^6.3.0" +"@babel/helper-compilation-targets@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.16.7.tgz#06e66c5f299601e6c7da350049315e83209d551b" + integrity sha512-mGojBwIWcwGD6rfqgRXVlVYmPAv7eOpIemUG3dGnDdCY4Pae70ROij3XmfrH6Fa1h1aiDylpglbZyktfzyo/hA== + dependencies: + "@babel/compat-data" "^7.16.4" + "@babel/helper-validator-option" "^7.16.7" + browserslist "^4.17.5" + semver "^6.3.0" + "@babel/helper-create-class-features-plugin@^7.16.5": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.5.tgz#5d1bcd096792c1ebec6249eebc6358eec55d0cad" @@ -501,6 +549,19 @@ "@babel/helper-replace-supers" "^7.16.5" "@babel/helper-split-export-declaration" "^7.16.0" +"@babel/helper-create-class-features-plugin@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.7.tgz#9c5b34b53a01f2097daf10678d65135c1b9f84ba" + integrity sha512-kIFozAvVfK05DM4EVQYKK+zteWvY85BFdGBRQBytRyY3y+6PX0DkDOn/CZ3lEuczCfrCxEzwt0YtP/87YPTWSw== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.16.7" + "@babel/helper-member-expression-to-functions" "^7.16.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-create-regexp-features-plugin@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz#c7d5ac5e9cf621c26057722fb7a8a4c5889358c4" @@ -517,6 +578,14 @@ "@babel/helper-annotate-as-pure" "^7.16.0" regexpu-core "^4.7.1" +"@babel/helper-create-regexp-features-plugin@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.16.7.tgz#0cb82b9bac358eb73bfbd73985a776bfa6b14d48" + integrity sha512-fk5A6ymfp+O5+p2yCkXAu5Kyj6v0xh0RBeNcAkYUMDvvAAoxvSKXn+Jb37t/yWFiQVDFK1ELpUTD8/aLhCPu+g== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + regexpu-core "^4.7.1" + "@babel/helper-define-polyfill-provider@^0.3.0": version "0.3.0" resolved "https://registry.yarnpkg.com/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.3.0.tgz#c5b10cf4b324ff840140bb07e05b8564af2ae971" @@ -538,6 +607,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-environment-visitor@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.16.7.tgz#ff484094a839bde9d89cd63cba017d7aae80ecd7" + integrity sha512-SLLb0AAn6PkUeAfKJCCOl9e1R53pQlGAfc4y4XuMRZfqeMYLE0dM1LMhqbGAlGQY0lfw5/ohoYWAe9V1yibRag== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-explode-assignable-expression@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.0.tgz#753017337a15f46f9c09f674cff10cee9b9d7778" @@ -545,6 +621,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-explode-assignable-expression@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.16.7.tgz#12a6d8522fdd834f194e868af6354e8650242b7a" + integrity sha512-KyUenhWMC8VrxzkGP0Jizjo4/Zx+1nNZhgocs+gLzyZyB8SHidhoq9KK/8Ato4anhwsivfkBLftky7gvzbZMtQ== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-function-name@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.14.5.tgz#89e2c474972f15d8e233b52ee8c480e2cfcd50c4" @@ -563,6 +646,15 @@ "@babel/template" "^7.16.0" "@babel/types" "^7.16.0" +"@babel/helper-function-name@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.7.tgz#f1ec51551fb1c8956bc8dd95f38523b6cf375f8f" + integrity sha512-QfDfEnIUyyBSR3HtrtGECuZ6DAyCkYFp7GHl75vFtTnn6pjKeK0T1DB5lLkFvBea8MdaiUABx3osbgLyInoejA== + dependencies: + "@babel/helper-get-function-arity" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/types" "^7.16.7" + "@babel/helper-get-function-arity@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.14.5.tgz#25fbfa579b0937eee1f3b805ece4ce398c431815" @@ -577,6 +669,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-get-function-arity@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.7.tgz#ea08ac753117a669f1508ba06ebcc49156387419" + integrity sha512-flc+RLSOBXzNzVhcLu6ujeHUrD6tANAOU5ojrRx/as+tbzf8+stUCj7+IfRRoAbEZqj/ahXEMsjhOhgeZsrnTw== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-hoist-variables@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.14.5.tgz#e0dd27c33a78e577d7c8884916a3e7ef1f7c7f8d" @@ -591,12 +690,12 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-member-expression-to-functions@^7.14.5": - version "7.14.7" - resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.14.7.tgz#97e56244beb94211fe277bd818e3a329c66f7970" - integrity sha512-TMUt4xKxJn6ccjcOW7c4hlwyJArizskAhoSTOCkA0uZ+KghIaci0Qg9R043kUMWI9mtQfgny+NQ5QATnZ+paaA== +"@babel/helper-hoist-variables@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.7.tgz#86bcb19a77a509c7b77d0e22323ef588fa58c246" + integrity sha512-m04d/0Op34H5v7pbZw6pSKP7weA6lsMvfiIAMeIvkY/R4xQtBSMFEigu9QTZ2qB/9l22vsxtM8a+Q8CzD255fg== dependencies: - "@babel/types" "^7.14.5" + "@babel/types" "^7.16.7" "@babel/helper-member-expression-to-functions@^7.16.5": version "7.16.5" @@ -605,7 +704,14 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-module-imports@^7.12.13", "@babel/helper-module-imports@^7.14.5": +"@babel/helper-member-expression-to-functions@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.7.tgz#42b9ca4b2b200123c3b7e726b0ae5153924905b0" + integrity sha512-VtJ/65tYiU/6AbMTDwyoXGPKHgTsfRarivm+YbB5uAzKUyuPjgZSgAFeG87FCigc7KNHu2Pegh1XIT3lXjvz3Q== + dependencies: + "@babel/types" "^7.16.7" + +"@babel/helper-module-imports@^7.12.13": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.14.5.tgz#6d1a44df6a38c957aa7c312da076429f11b422f3" integrity sha512-SwrNHu5QWS84XlHwGYPDtCxcA0hrSlL2yhWYLgeOc0w7ccOl2qv4s/nARI0aYZW+bSwAL5CukeXA47B/1NKcnQ== @@ -619,19 +725,12 @@ dependencies: "@babel/types" "^7.16.0" -"@babel/helper-module-transforms@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.14.5.tgz#7de42f10d789b423eb902ebd24031ca77cb1e10e" - integrity sha512-iXpX4KW8LVODuAieD7MzhNjmM6dzYY5tfRqT+R9HDXWl0jPn/djKmA+G9s/2C2T9zggw5tK1QNqZ70USfedOwA== +"@babel/helper-module-imports@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.16.7.tgz#25612a8091a999704461c8a222d0efec5d091437" + integrity sha512-LVtS6TqjJHFc+nYeITRo6VLXve70xmq7wPhWTqDJusJEgGmkAACWwMiTNrvfoQo6hEhFwAIixNkvB0jPXDL8Wg== dependencies: - "@babel/helper-module-imports" "^7.14.5" - "@babel/helper-replace-supers" "^7.14.5" - "@babel/helper-simple-access" "^7.14.5" - "@babel/helper-split-export-declaration" "^7.14.5" - "@babel/helper-validator-identifier" "^7.14.5" - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/types" "^7.16.7" "@babel/helper-module-transforms@^7.16.0", "@babel/helper-module-transforms@^7.16.5": version "7.16.5" @@ -647,12 +746,19 @@ "@babel/traverse" "^7.16.5" "@babel/types" "^7.16.0" -"@babel/helper-optimise-call-expression@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.14.5.tgz#f27395a8619e0665b3f0364cddb41c25d71b499c" - integrity sha512-IqiLIrODUOdnPU9/F8ib1Fx2ohlgDhxnIDU7OEVi+kAbEZcyiF7BLU8W6PfvPi9LzztjS7kcbzbmL7oG8kD6VA== +"@babel/helper-module-transforms@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.16.7.tgz#7665faeb721a01ca5327ddc6bba15a5cb34b6a41" + integrity sha512-gaqtLDxJEFCeQbYp9aLAefjhkKdjKcdh6DB7jniIGU3Pz52WAmP268zK0VgPz9hUNkMSYeH976K2/Y6yPadpng== dependencies: - "@babel/types" "^7.14.5" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-simple-access" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-validator-identifier" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.16.7" + "@babel/types" "^7.16.7" "@babel/helper-optimise-call-expression@^7.16.0": version "7.16.0" @@ -661,6 +767,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-optimise-call-expression@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.7.tgz#a34e3560605abbd31a18546bd2aad3e6d9a174f2" + integrity sha512-EtgBhg7rd/JcnpZFXpBy0ze1YRfdm7BnBX4uKMBd3ixa3RGAE002JZB66FJyNH7g0F38U05pXmA5P8cBh7z+1w== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-plugin-utils@^7.0.0", "@babel/helper-plugin-utils@^7.10.4", "@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.14.5", "@babel/helper-plugin-utils@^7.8.0", "@babel/helper-plugin-utils@^7.8.3": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz#5ac822ce97eec46741ab70a517971e443a70c5a9" @@ -671,6 +784,11 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.5.tgz#afe37a45f39fce44a3d50a7958129ea5b1a5c074" integrity sha512-59KHWHXxVA9K4HNF4sbHCf+eJeFe0Te/ZFGqBT4OjXhrwvA04sGfaEGsVTdsjoszq0YTP49RC9UKe5g8uN2RwQ== +"@babel/helper-plugin-utils@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.16.7.tgz#aa3a8ab4c3cceff8e65eb9e73d87dc4ff320b2f5" + integrity sha512-Qg3Nk7ZxpgMrsox6HreY1ZNKdBq7K72tDSliA6dCl5f007jR4ne8iD5UzuNnCJH2xBf2BEEVGr+/OL6Gdp7RxA== + "@babel/helper-remap-async-to-generator@^7.16.0", "@babel/helper-remap-async-to-generator@^7.16.4", "@babel/helper-remap-async-to-generator@^7.16.5": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.5.tgz#e706646dc4018942acb4b29f7e185bc246d65ac3" @@ -680,15 +798,14 @@ "@babel/helper-wrap-function" "^7.16.5" "@babel/types" "^7.16.0" -"@babel/helper-replace-supers@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.5.tgz#0ecc0b03c41cd567b4024ea016134c28414abb94" - integrity sha512-3i1Qe9/8x/hCHINujn+iuHy+mMRLoc77b2nI9TB0zjH1hvn9qGlXjWlggdwUcju36PkPCy/lpM7LLUdcTyH4Ow== +"@babel/helper-remap-async-to-generator@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.16.8.tgz#29ffaade68a367e2ed09c90901986918d25e57e3" + integrity sha512-fm0gH7Flb8H51LqJHy3HJ3wnE1+qtYR2A99K06ahwrawLdOFsCEWjZOrYricXJHoPSudNKxrMBUPEIPxiIIvBw== dependencies: - "@babel/helper-member-expression-to-functions" "^7.14.5" - "@babel/helper-optimise-call-expression" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-wrap-function" "^7.16.8" + "@babel/types" "^7.16.8" "@babel/helper-replace-supers@^7.16.5": version "7.16.5" @@ -701,12 +818,16 @@ "@babel/traverse" "^7.16.5" "@babel/types" "^7.16.0" -"@babel/helper-simple-access@^7.14.5": - version "7.14.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.14.5.tgz#66ea85cf53ba0b4e588ba77fc813f53abcaa41c4" - integrity sha512-nfBN9xvmCt6nrMZjfhkl7i0oTV3yxR4/FztsbOASyTvVcoYd0TRHh7eMLdlEcCqobydC0LAF3LtC92Iwxo0wyw== +"@babel/helper-replace-supers@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.7.tgz#e9f5f5f32ac90429c1a4bdec0f231ef0c2838ab1" + integrity sha512-y9vsWilTNaVnVh6xiJfABzsNpgDPKev9HnAgz6Gb1p6UUwf9NepdlsV7VXGCftJM+jqD5f7JIEubcpLjZj5dBw== dependencies: - "@babel/types" "^7.14.5" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-member-expression-to-functions" "^7.16.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/traverse" "^7.16.7" + "@babel/types" "^7.16.7" "@babel/helper-simple-access@^7.16.0": version "7.16.0" @@ -715,6 +836,13 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-simple-access@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.16.7.tgz#d656654b9ea08dbb9659b69d61063ccd343ff0f7" + integrity sha512-ZIzHVyoeLMvXMN/vok/a4LWRy8G2v205mNP0XOuf9XRLyX5/u9CnVulUtDgUTama3lT+bf/UqucuZjqiGuTS1g== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-skip-transparent-expression-wrappers@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.16.0.tgz#0ee3388070147c3ae051e487eca3ebb0e2e8bb09" @@ -736,16 +864,33 @@ dependencies: "@babel/types" "^7.16.0" +"@babel/helper-split-export-declaration@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.7.tgz#0b648c0c42da9d3920d85ad585f2778620b8726b" + integrity sha512-xbWoy/PFoxSWazIToT9Sif+jJTlrMcndIsaOKvTA6u7QEo7ilkRZpjew18/W3c7nm8fXdUDXh02VXTbZ0pGDNw== + dependencies: + "@babel/types" "^7.16.7" + "@babel/helper-validator-identifier@^7.14.5", "@babel/helper-validator-identifier@^7.15.7": version "7.15.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== +"@babel/helper-validator-identifier@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" + integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== + "@babel/helper-validator-option@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== +"@babel/helper-validator-option@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" + integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== + "@babel/helper-wrap-function@^7.16.5": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.16.5.tgz#0158fca6f6d0889c3fee8a6ed6e5e07b9b54e41f" @@ -756,16 +901,17 @@ "@babel/traverse" "^7.16.5" "@babel/types" "^7.16.0" -"@babel/helpers@^7.14.6": - version "7.14.6" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.14.6.tgz#5b58306b95f1b47e2a0199434fa8658fa6c21635" - integrity sha512-yesp1ENQBiLI+iYHSJdoZKUtRpfTlL1grDIX9NRlAVppljLw/4tTyYupIB7uIYmC3stW/imAv8EqaKaS/ibmeA== +"@babel/helper-wrap-function@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.16.8.tgz#58afda087c4cd235de92f7ceedebca2c41274200" + integrity sha512-8RpyRVIAW1RcDDGTA+GpPAwV22wXCfKOoM9bet6TLkGIFTkRQSkH1nMQ5Yet4MpoXe1ZwHPVtNasc2w0uZMqnw== dependencies: - "@babel/template" "^7.14.5" - "@babel/traverse" "^7.14.5" - "@babel/types" "^7.14.5" + "@babel/helper-function-name" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.16.8" + "@babel/types" "^7.16.8" -"@babel/helpers@^7.16.0", "@babel/helpers@^7.16.5", "@babel/helpers@^7.8.4": +"@babel/helpers@^7.16.0", "@babel/helpers@^7.8.4": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.5.tgz#29a052d4b827846dd76ece16f565b9634c554ebd" integrity sha512-TLgi6Lh71vvMZGEkFuIxzaPsyeYCHQ5jJOOX1f0xXn0uciFuE8cEk0wyBquMcCxBXZ5BJhE2aUB7pnWTD150Tw== @@ -774,6 +920,15 @@ "@babel/traverse" "^7.16.5" "@babel/types" "^7.16.0" +"@babel/helpers@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.16.7.tgz#7e3504d708d50344112767c3542fc5e357fffefc" + integrity sha512-9ZDoqtfY7AuEOt3cxchfii6C7GDyyMBffktR5B2jvWv8u2+efwvpnVKXMWzNehqy68tKgAfSwfdw/lWpthS2bw== + dependencies: + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.16.7" + "@babel/types" "^7.16.7" + "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" @@ -792,7 +947,16 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.14.5", "@babel/parser@^7.14.6", "@babel/parser@^7.14.7": +"@babel/highlight@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.7.tgz#81a01d7d675046f0d96f82450d9d9578bdfd6b0b" + integrity sha512-aKpPMfLvGO3Q97V0qhw/V2SWNWlwfJknuwAunU7wZLSfrM4xTBvg7E5opUVi1kJTBKihE38CPg4nBiqX83PWYw== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + chalk "^2.0.0" + js-tokens "^4.0.0" + +"@babel/parser@^7.14.5", "@babel/parser@^7.14.7": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.7.tgz#6099720c8839ca865a2637e6c85852ead0bdb595" integrity sha512-X67Z5y+VBJuHB/RjwECp8kSl5uYi0BvRbNeWqkaJCVh+LiTPl19WBUfG627psSgp9rSf6ojuXghQM3ha6qHHdA== @@ -802,6 +966,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.6.tgz#8f194828193e8fa79166f34a4b4e52f3e769a314" integrity sha512-Gr86ujcNuPDnNOY8mi383Hvi8IYrJVJYuf3XcuBM/Dgd+bINn/7tHqsj+tKkoreMbmGsFLsltI/JJd8fOFWGDQ== +"@babel/parser@^7.16.7", "@babel/parser@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.8.tgz#61c243a3875f7d0b0962b0543a33ece6ff2f1f17" + integrity sha512-i7jDUfrVBWc+7OKcBzEe5n7fbv3i2fWtxKzzCvOjnzSxMfWMigAhtfJ7qzZNGFNMsCCd67+uz553dYKWXPvCKw== + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.2": version "7.16.2" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.2.tgz#2977fca9b212db153c195674e57cfab807733183" @@ -809,6 +978,13 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" +"@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.16.7.tgz#4eda6d6c2a0aa79c70fa7b6da67763dfe2141050" + integrity sha512-anv/DObl7waiGEnC24O9zqL0pSuI9hljihqiDuFHC8d7/bjr/4RLGPWuc8rYOff/QPzbEPSkzG8wGG9aDuhHRg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.0.tgz#358972eaab006f5eb0826183b0c93cbcaf13e1e2" @@ -818,6 +994,15 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-proposal-optional-chaining" "^7.16.0" +"@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.16.7.tgz#cc001234dfc139ac45f6bcf801866198c8c72ff9" + integrity sha512-di8vUHRdf+4aJ7ltXhaDbPoszdkh59AQtJM5soLsuHpQJdFQZOA4uGj0V2u/CZ8bJ/u8ULDL5yq6FO/bCXnKHw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + "@babel/plugin-proposal-optional-chaining" "^7.16.7" + "@babel/plugin-proposal-async-generator-functions@7.16.4": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.4.tgz#e606eb6015fec6fa5978c940f315eae4e300b081" @@ -827,7 +1012,7 @@ "@babel/helper-remap-async-to-generator" "^7.16.4" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-async-generator-functions@^7.16.4", "@babel/plugin-proposal-async-generator-functions@^7.16.5": +"@babel/plugin-proposal-async-generator-functions@^7.16.4": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.5.tgz#fd3bd7e0d98404a3d4cbca15a72d533f8c9a2f67" integrity sha512-C/FX+3HNLV6sz7AqbTQqEo1L9/kfrKjxcVtgyBCmvIgOjvuBVUWooDoi7trsLxOzCEo5FccjRvKHkfDsJFZlfA== @@ -836,7 +1021,16 @@ "@babel/helper-remap-async-to-generator" "^7.16.5" "@babel/plugin-syntax-async-generators" "^7.8.4" -"@babel/plugin-proposal-class-properties@^7.16.0", "@babel/plugin-proposal-class-properties@^7.16.5": +"@babel/plugin-proposal-async-generator-functions@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.16.8.tgz#3bdd1ebbe620804ea9416706cd67d60787504bc8" + integrity sha512-71YHIvMuiuqWJQkebWJtdhQTfd4Q4mF76q2IX37uZPkG9+olBxsX+rH1vkhFto4UeJZ9dPY2s+mDvhDm1u2BGQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-remap-async-to-generator" "^7.16.8" + "@babel/plugin-syntax-async-generators" "^7.8.4" + +"@babel/plugin-proposal-class-properties@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.5.tgz#3269f44b89122110f6339806e05d43d84106468a" integrity sha512-pJD3HjgRv83s5dv1sTnDbZOaTjghKEz8KUn1Kbh2eAIRhGuyQ1XSeI4xVXU3UlIEVA3DAyIdxqT1eRn7Wcn55A== @@ -844,7 +1038,15 @@ "@babel/helper-create-class-features-plugin" "^7.16.5" "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-proposal-class-static-block@^7.16.0", "@babel/plugin-proposal-class-static-block@^7.16.5": +"@babel/plugin-proposal-class-properties@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.16.7.tgz#925cad7b3b1a2fcea7e59ecc8eb5954f961f91b0" + integrity sha512-IobU0Xme31ewjYOShSIqd/ZGM/r/cuOz2z0MDbNrhF5FW+ZVgi0f2lyeoj9KFPDOAqsYxmLWZte1WOwlvY9aww== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-proposal-class-static-block@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.5.tgz#df58ab015a7d3b0963aafc8f20792dcd834952a9" integrity sha512-EEFzuLZcm/rNJ8Q5krK+FRKdVkd6FjfzT9tuSZql9sQn64K0hHA2KLJ0DqVot9/iV6+SsuadC5yI39zWnm+nmQ== @@ -853,7 +1055,16 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-class-static-block" "^7.14.5" -"@babel/plugin-proposal-dynamic-import@^7.16.0", "@babel/plugin-proposal-dynamic-import@^7.16.5": +"@babel/plugin-proposal-class-static-block@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.16.7.tgz#712357570b612106ef5426d13dc433ce0f200c2a" + integrity sha512-dgqJJrcZoG/4CkMopzhPJjGxsIe9A8RlkQLnL/Vhhx8AA9ZuaRwGSlscSh42hazc7WSrya/IK7mTeoF0DP9tEw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-class-static-block" "^7.14.5" + +"@babel/plugin-proposal-dynamic-import@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.5.tgz#2e0d19d5702db4dcb9bc846200ca02f2e9d60e9e" integrity sha512-P05/SJZTTvHz79LNYTF8ff5xXge0kk5sIIWAypcWgX4BTRUgyHc8wRxJ/Hk+mU0KXldgOOslKaeqnhthcDJCJQ== @@ -861,7 +1072,15 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-dynamic-import" "^7.8.3" -"@babel/plugin-proposal-export-namespace-from@^7.16.0", "@babel/plugin-proposal-export-namespace-from@^7.16.5": +"@babel/plugin-proposal-dynamic-import@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.16.7.tgz#c19c897eaa46b27634a00fee9fb7d829158704b2" + integrity sha512-I8SW9Ho3/8DRSdmDdH3gORdyUuYnk1m4cMxUAdu5oy4n3OfN8flDEH+d60iG7dUfi0KkYwSvoalHzzdRzpWHTg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-dynamic-import" "^7.8.3" + +"@babel/plugin-proposal-export-namespace-from@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.5.tgz#3b4dd28378d1da2fea33e97b9f25d1c2f5bf1ac9" integrity sha512-i+sltzEShH1vsVydvNaTRsgvq2vZsfyrd7K7vPLUU/KgS0D5yZMe6uipM0+izminnkKrEfdUnz7CxMRb6oHZWw== @@ -869,7 +1088,15 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-export-namespace-from" "^7.8.3" -"@babel/plugin-proposal-json-strings@^7.16.0", "@babel/plugin-proposal-json-strings@^7.16.5": +"@babel/plugin-proposal-export-namespace-from@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.16.7.tgz#09de09df18445a5786a305681423ae63507a6163" + integrity sha512-ZxdtqDXLRGBL64ocZcs7ovt71L3jhC1RGSyR996svrCi3PYqHNkb3SwPJCs8RIzD86s+WPpt2S73+EHCGO+NUA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-export-namespace-from" "^7.8.3" + +"@babel/plugin-proposal-json-strings@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.5.tgz#1e726930fca139caab6b084d232a9270d9d16f9c" integrity sha512-QQJueTFa0y9E4qHANqIvMsuxM/qcLQmKttBACtPCQzGUEizsXDACGonlPiSwynHfOa3vNw0FPMVvQzbuXwh4SQ== @@ -877,7 +1104,15 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-json-strings" "^7.8.3" -"@babel/plugin-proposal-logical-assignment-operators@^7.16.0", "@babel/plugin-proposal-logical-assignment-operators@^7.16.5": +"@babel/plugin-proposal-json-strings@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.16.7.tgz#9732cb1d17d9a2626a08c5be25186c195b6fa6e8" + integrity sha512-lNZ3EEggsGY78JavgbHsK9u5P3pQaW7k4axlgFLYkMd7UBsiNahCITShLjNQschPyjtO6dADrL24757IdhBrsQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-json-strings" "^7.8.3" + +"@babel/plugin-proposal-logical-assignment-operators@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.5.tgz#df1f2e4b5a0ec07abf061d2c18e53abc237d3ef5" integrity sha512-xqibl7ISO2vjuQM+MzR3rkd0zfNWltk7n9QhaD8ghMmMceVguYrNDt7MikRyj4J4v3QehpnrU8RYLnC7z/gZLA== @@ -885,7 +1120,15 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" -"@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0", "@babel/plugin-proposal-nullish-coalescing-operator@^7.16.5": +"@babel/plugin-proposal-logical-assignment-operators@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.16.7.tgz#be23c0ba74deec1922e639832904be0bea73cdea" + integrity sha512-K3XzyZJGQCr00+EtYtrDjmwX7o7PLK6U9bi1nCwkQioRFVUv6dJoxbQjtWVtP+bCPy82bONBKG8NPyQ4+i6yjg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-logical-assignment-operators" "^7.10.4" + +"@babel/plugin-proposal-nullish-coalescing-operator@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.5.tgz#652555bfeeeee2d2104058c6225dc6f75e2d0f07" integrity sha512-YwMsTp/oOviSBhrjwi0vzCUycseCYwoXnLiXIL3YNjHSMBHicGTz7GjVU/IGgz4DtOEXBdCNG72pvCX22ehfqg== @@ -893,7 +1136,15 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" -"@babel/plugin-proposal-numeric-separator@^7.16.0", "@babel/plugin-proposal-numeric-separator@^7.16.5": +"@babel/plugin-proposal-nullish-coalescing-operator@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.16.7.tgz#141fc20b6857e59459d430c850a0011e36561d99" + integrity sha512-aUOrYU3EVtjf62jQrCj63pYZ7k6vns2h/DQvHPWGmsJRYzWXZ6/AsfgpiRy6XiuIDADhJzP2Q9MwSMKauBQ+UQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-nullish-coalescing-operator" "^7.8.3" + +"@babel/plugin-proposal-numeric-separator@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.5.tgz#edcb6379b6cf4570be64c45965d8da7a2debf039" integrity sha512-DvB9l/TcsCRvsIV9v4jxR/jVP45cslTVC0PMVHvaJhhNuhn2Y1SOhCSFlPK777qLB5wb8rVDaNoqMTyOqtY5Iw== @@ -901,7 +1152,15 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-numeric-separator" "^7.10.4" -"@babel/plugin-proposal-object-rest-spread@^7.16.0", "@babel/plugin-proposal-object-rest-spread@^7.16.5": +"@babel/plugin-proposal-numeric-separator@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.16.7.tgz#d6b69f4af63fb38b6ca2558442a7fb191236eba9" + integrity sha512-vQgPMknOIgiuVqbokToyXbkY/OmmjAzr/0lhSIbG/KmnzXPGwW/AdhdKpi+O4X/VkWiWjnkKOBiqJrTaC98VKw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-numeric-separator" "^7.10.4" + +"@babel/plugin-proposal-object-rest-spread@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.5.tgz#f30f80dacf7bc1404bf67f99c8d9c01665e830ad" integrity sha512-UEd6KpChoyPhCoE840KRHOlGhEZFutdPDMGj+0I56yuTTOaT51GzmnEl/0uT41fB/vD2nT+Pci2KjezyE3HmUw== @@ -912,7 +1171,18 @@ "@babel/plugin-syntax-object-rest-spread" "^7.8.3" "@babel/plugin-transform-parameters" "^7.16.5" -"@babel/plugin-proposal-optional-catch-binding@^7.16.0", "@babel/plugin-proposal-optional-catch-binding@^7.16.5": +"@babel/plugin-proposal-object-rest-spread@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.16.7.tgz#94593ef1ddf37021a25bdcb5754c4a8d534b01d8" + integrity sha512-3O0Y4+dw94HA86qSg9IHfyPktgR7q3gpNVAeiKQd+8jBKFaU5NQS1Yatgo4wY+UFNuLjvxcSmzcsHqrhgTyBUA== + dependencies: + "@babel/compat-data" "^7.16.4" + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-object-rest-spread" "^7.8.3" + "@babel/plugin-transform-parameters" "^7.16.7" + +"@babel/plugin-proposal-optional-catch-binding@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.5.tgz#1a5405765cf589a11a33a1fd75b2baef7d48b74e" integrity sha512-ihCMxY1Iljmx4bWy/PIMJGXN4NS4oUj1MKynwO07kiKms23pNvIn1DMB92DNB2R0EA882sw0VXIelYGdtF7xEQ== @@ -920,7 +1190,15 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" -"@babel/plugin-proposal-optional-chaining@^7.16.0", "@babel/plugin-proposal-optional-chaining@^7.16.5": +"@babel/plugin-proposal-optional-catch-binding@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.16.7.tgz#c623a430674ffc4ab732fd0a0ae7722b67cb74cf" + integrity sha512-eMOH/L4OvWSZAE1VkHbr1vckLG1WUcHGJSLqqQwl2GaUqG6QjddvrOaTUMNYiv77H5IKPMZ9U9P7EaHwvAShfA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-optional-catch-binding" "^7.8.3" + +"@babel/plugin-proposal-optional-chaining@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.5.tgz#a5fa61056194d5059366c0009cb9a9e66ed75c1f" integrity sha512-kzdHgnaXRonttiTfKYnSVafbWngPPr2qKw9BWYBESl91W54e+9R5pP70LtWxV56g0f05f/SQrwHYkfvbwcdQ/A== @@ -929,7 +1207,16 @@ "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" "@babel/plugin-syntax-optional-chaining" "^7.8.3" -"@babel/plugin-proposal-private-methods@^7.16.0", "@babel/plugin-proposal-private-methods@^7.16.5": +"@babel/plugin-proposal-optional-chaining@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.16.7.tgz#7cd629564724816c0e8a969535551f943c64c39a" + integrity sha512-eC3xy+ZrUcBtP7x+sq62Q/HYd674pPTb/77XZMb5wbDPGWIdUbSr4Agr052+zaUPSb+gGRnjxXfKFvx5iMJ+DA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + "@babel/plugin-syntax-optional-chaining" "^7.8.3" + +"@babel/plugin-proposal-private-methods@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.5.tgz#2086f7d78c1b0c712d49b5c3fbc2d1ca21a7ee12" integrity sha512-+yFMO4BGT3sgzXo+lrq7orX5mAZt57DwUK6seqII6AcJnJOIhBJ8pzKH47/ql/d426uQ7YhN8DpUFirQzqYSUA== @@ -937,7 +1224,15 @@ "@babel/helper-create-class-features-plugin" "^7.16.5" "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-proposal-private-property-in-object@^7.16.0", "@babel/plugin-proposal-private-property-in-object@^7.16.5": +"@babel/plugin-proposal-private-methods@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.16.7.tgz#e418e3aa6f86edd6d327ce84eff188e479f571e0" + integrity sha512-7twV3pzhrRxSwHeIvFE6coPgvo+exNDOiGUMg39o2LiLo1Y+4aKpfkcLGcg1UHonzorCt7SNXnoMyCnnIOA8Sw== + dependencies: + "@babel/helper-create-class-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-proposal-private-property-in-object@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.5.tgz#a42d4b56005db3d405b12841309dbca647e7a21b" integrity sha512-+YGh5Wbw0NH3y/E5YMu6ci5qTDmAEVNoZ3I54aB6nVEOZ5BQ7QJlwKq5pYVucQilMByGn/bvX0af+uNaPRCabA== @@ -947,7 +1242,17 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" -"@babel/plugin-proposal-unicode-property-regex@^7.16.0", "@babel/plugin-proposal-unicode-property-regex@^7.16.5": +"@babel/plugin-proposal-private-property-in-object@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.16.7.tgz#b0b8cef543c2c3d57e59e2c611994861d46a3fce" + integrity sha512-rMQkjcOFbm+ufe3bTZLyOfsOUOxyvLXZJCTARhJr+8UMSoZmqTe1K1BgkFcrW37rAchWg57yI69ORxiWvUINuQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-create-class-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-syntax-private-property-in-object" "^7.14.5" + +"@babel/plugin-proposal-unicode-property-regex@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.5.tgz#35fe753afa7c572f322bd068ff3377bde0f37080" integrity sha512-s5sKtlKQyFSatt781HQwv1hoM5BQ9qRH30r+dK56OLDsHmV74mzwJNX7R1yMuE7VZKG5O6q/gmOGSAO6ikTudg== @@ -955,6 +1260,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.16.5" +"@babel/plugin-proposal-unicode-property-regex@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.16.7.tgz#635d18eb10c6214210ffc5ff4932552de08188a2" + integrity sha512-QRK0YI/40VLhNVGIjRNAAQkEHws0cswSdFFjpFyt943YmJIU1da9uW63Iu6NFV6CxTZW5eTDCrwZUstBWgp/Rg== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-proposal-unicode-property-regex@^7.4.4": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz#0f95ee0e757a5d647f378daa0eca7e93faa8bbe8" @@ -1061,13 +1374,20 @@ dependencies: "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-arrow-functions@^7.16.0", "@babel/plugin-transform-arrow-functions@^7.16.5": +"@babel/plugin-transform-arrow-functions@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.5.tgz#04c18944dd55397b521d9d7511e791acea7acf2d" integrity sha512-8bTHiiZyMOyfZFULjsCnYOWG059FVMes0iljEHSfARhNgFfpsqE92OrCffv3veSw9rwMkYcFe9bj0ZoXU2IGtQ== dependencies: "@babel/helper-plugin-utils" "^7.16.5" +"@babel/plugin-transform-arrow-functions@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.16.7.tgz#44125e653d94b98db76369de9c396dc14bef4154" + integrity sha512-9ffkFFMbvzTvv+7dTp/66xvZAWASuPD5Tl9LK3Z9vhOmANo6j94rik+5YMBt4CwHVMWLWpMsriIc2zsa3WW3xQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-transform-async-to-generator@7.16.0": version "7.16.0" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.0.tgz#df12637f9630ddfa0ef9d7a11bc414d629d38604" @@ -1077,7 +1397,7 @@ "@babel/helper-plugin-utils" "^7.14.5" "@babel/helper-remap-async-to-generator" "^7.16.0" -"@babel/plugin-transform-async-to-generator@^7.16.0", "@babel/plugin-transform-async-to-generator@^7.16.5": +"@babel/plugin-transform-async-to-generator@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.5.tgz#89c9b501e65bb14c4579a6ce9563f859de9b34e4" integrity sha512-TMXgfioJnkXU+XRoj7P2ED7rUm5jbnDWwlCuFVTpQboMfbSya5WrmubNBAMlk7KXvywpo8rd8WuYZkis1o2H8w== @@ -1086,21 +1406,44 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/helper-remap-async-to-generator" "^7.16.5" -"@babel/plugin-transform-block-scoped-functions@^7.16.0", "@babel/plugin-transform-block-scoped-functions@^7.16.5": +"@babel/plugin-transform-async-to-generator@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.16.8.tgz#b83dff4b970cf41f1b819f8b49cc0cfbaa53a808" + integrity sha512-MtmUmTJQHCnyJVrScNzNlofQJ3dLFuobYn3mwOTKHnSCMtbNsqvF71GQmJfFjdrXSsAA7iysFmYWw4bXZ20hOg== + dependencies: + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-remap-async-to-generator" "^7.16.8" + +"@babel/plugin-transform-block-scoped-functions@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.5.tgz#af087494e1c387574260b7ee9b58cdb5a4e9b0b0" integrity sha512-BxmIyKLjUGksJ99+hJyL/HIxLIGnLKtw772zYDER7UuycDZ+Xvzs98ZQw6NGgM2ss4/hlFAaGiZmMNKvValEjw== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-block-scoping@^7.16.0", "@babel/plugin-transform-block-scoping@^7.16.5": +"@babel/plugin-transform-block-scoped-functions@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.16.7.tgz#4d0d57d9632ef6062cdf354bb717102ee042a620" + integrity sha512-JUuzlzmF40Z9cXyytcbZEZKckgrQzChbQJw/5PuEHYeqzCsvebDx0K0jWnIIVcmmDOAVctCgnYs0pMcrYj2zJg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-block-scoping@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.5.tgz#b91f254fe53e210eabe4dd0c40f71c0ed253c5e7" integrity sha512-JxjSPNZSiOtmxjX7PBRBeRJTUKTyJ607YUYeT0QJCNdsedOe+/rXITjP08eG8xUpsLfPirgzdCFN+h0w6RI+pQ== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-classes@^7.16.0", "@babel/plugin-transform-classes@^7.16.5": +"@babel/plugin-transform-block-scoping@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.16.7.tgz#f50664ab99ddeaee5bc681b8f3a6ea9d72ab4f87" + integrity sha512-ObZev2nxVAYA4bhyusELdo9hb3H+A56bxH3FZMbEImZFiEDYVHXQSJ1hQKFlDnlt8G9bBrCZ5ZpURZUrV4G5qQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-classes@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.5.tgz#6acf2ec7adb50fb2f3194dcd2909dbd056dcf216" integrity sha512-DzJ1vYf/7TaCYy57J3SJ9rV+JEuvmlnvvyvYKFbk5u46oQbBvuB9/0w+YsVsxkOv8zVWKpDmUoj4T5ILHoXevA== @@ -1114,21 +1457,49 @@ "@babel/helper-split-export-declaration" "^7.16.0" globals "^11.1.0" -"@babel/plugin-transform-computed-properties@^7.16.0", "@babel/plugin-transform-computed-properties@^7.16.5": +"@babel/plugin-transform-classes@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-classes/-/plugin-transform-classes-7.16.7.tgz#8f4b9562850cd973de3b498f1218796eb181ce00" + integrity sha512-WY7og38SFAGYRe64BrjKf8OrE6ulEHtr5jEYaZMwox9KebgqPi67Zqz8K53EKk1fFEJgm96r32rkKZ3qA2nCWQ== + dependencies: + "@babel/helper-annotate-as-pure" "^7.16.7" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.16.7" + "@babel/helper-optimise-call-expression" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + globals "^11.1.0" + +"@babel/plugin-transform-computed-properties@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.5.tgz#2af91ebf0cceccfcc701281ada7cfba40a9b322a" integrity sha512-n1+O7xtU5lSLraRzX88CNcpl7vtGdPakKzww74bVwpAIRgz9JVLJJpOLb0uYqcOaXVM0TL6X0RVeIJGD2CnCkg== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-destructuring@^7.16.0", "@babel/plugin-transform-destructuring@^7.16.5": +"@babel/plugin-transform-computed-properties@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.16.7.tgz#66dee12e46f61d2aae7a73710f591eb3df616470" + integrity sha512-gN72G9bcmenVILj//sv1zLNaPyYcOzUho2lIJBMh/iakJ9ygCo/hEF9cpGb61SCMEDxbbyBoVQxrt+bWKu5KGw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-destructuring@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.5.tgz#89ebc87499ac4a81b897af53bb5d3eed261bd568" integrity sha512-GuRVAsjq+c9YPK6NeTkRLWyQskDC099XkBSVO+6QzbnOnH2d/4mBVXYStaPrZD3dFRfg00I6BFJ9Atsjfs8mlg== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-dotall-regex@^7.16.0", "@babel/plugin-transform-dotall-regex@^7.16.5": +"@babel/plugin-transform-destructuring@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.16.7.tgz#ca9588ae2d63978a4c29d3f33282d8603f618e23" + integrity sha512-VqAwhTHBnu5xBVDCvrvqJbtLUa++qZaWC0Fgr2mqokBlulZARGyIvZDoqbPlPaKImQ9dKAcCzbv+ul//uqu70A== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-dotall-regex@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.5.tgz#b40739c00b6686820653536d6d143e311de67936" integrity sha512-iQiEMt8Q4/5aRGHpGVK2Zc7a6mx7qEAO7qehgSug3SDImnuMzgmm/wtJALXaz25zUj1PmnNHtShjFgk4PDx4nw== @@ -1136,6 +1507,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.16.5" +"@babel/plugin-transform-dotall-regex@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.16.7.tgz#6b2d67686fab15fb6a7fd4bd895d5982cfc81241" + integrity sha512-Lyttaao2SjZF6Pf4vk1dVKv8YypMpomAbygW+mU5cYP3S5cWTfCJjG8xV6CFdzGFlfWK81IjL9viiTvpb6G7gQ== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-transform-dotall-regex@^7.4.4": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz#2f6bf76e46bdf8043b4e7e16cf24532629ba0c7a" @@ -1144,14 +1523,21 @@ "@babel/helper-create-regexp-features-plugin" "^7.14.5" "@babel/helper-plugin-utils" "^7.14.5" -"@babel/plugin-transform-duplicate-keys@^7.16.0", "@babel/plugin-transform-duplicate-keys@^7.16.5": +"@babel/plugin-transform-duplicate-keys@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.5.tgz#2450f2742325412b746d7d005227f5e8973b512a" integrity sha512-81tijpDg2a6I1Yhj4aWY1l3O1J4Cg/Pd7LfvuaH2VVInAkXtzibz9+zSPdUM1WvuUi128ksstAP0hM5w48vQgg== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-exponentiation-operator@^7.16.0", "@babel/plugin-transform-exponentiation-operator@^7.16.5": +"@babel/plugin-transform-duplicate-keys@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.16.7.tgz#2207e9ca8f82a0d36a5a67b6536e7ef8b08823c9" + integrity sha512-03DvpbRfvWIXyK0/6QiR1KMTWeT6OcQ7tbhjrXyFS02kjuX/mu5Bvnh5SDSWHxyawit2g5aWhKwI86EE7GUnTw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-exponentiation-operator@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.5.tgz#36e261fa1ab643cfaf30eeab38e00ed1a76081e2" integrity sha512-12rba2HwemQPa7BLIKCzm1pT2/RuQHtSFHdNl41cFiC6oi4tcrp7gjB07pxQvFpcADojQywSjblQth6gJyE6CA== @@ -1159,14 +1545,29 @@ "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.5" "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-for-of@^7.16.0", "@babel/plugin-transform-for-of@^7.16.5": +"@babel/plugin-transform-exponentiation-operator@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.16.7.tgz#efa9862ef97e9e9e5f653f6ddc7b665e8536fe9b" + integrity sha512-8UYLSlyLgRixQvlYH3J2ekXFHDFLQutdy7FfFAMm3CPZ6q9wHCwnUyiXpQCe3gVVnQlHc5nsuiEVziteRNTXEA== + dependencies: + "@babel/helper-builder-binary-assignment-operator-visitor" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-for-of@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.5.tgz#9b544059c6ca11d565457c0ff1f08e13ce225261" integrity sha512-+DpCAJFPAvViR17PIMi9x2AE34dll5wNlXO43wagAX2YcRGgEVHCNFC4azG85b4YyyFarvkc/iD5NPrz4Oneqw== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-function-name@^7.16.0", "@babel/plugin-transform-function-name@^7.16.5": +"@babel/plugin-transform-for-of@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.16.7.tgz#649d639d4617dff502a9a158c479b3b556728d8c" + integrity sha512-/QZm9W92Ptpw7sjI9Nx1mbcsWz33+l8kuMIQnDwgQBG5s3fAfQvkRjQ7NqXhtNcKOnPkdICmUHyCaWW06HCsqg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-function-name@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.5.tgz#6896ebb6a5538a75d6a4086a277752f655a7bd15" integrity sha512-Fuec/KPSpVLbGo6z1RPw4EE1X+z9gZk1uQmnYy7v4xr4TO9p41v1AoUuXEtyqAI7H+xNJYSICzRqZBhDEkd3kQ== @@ -1174,21 +1575,44 @@ "@babel/helper-function-name" "^7.16.0" "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-literals@^7.16.0", "@babel/plugin-transform-literals@^7.16.5": +"@babel/plugin-transform-function-name@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.16.7.tgz#5ab34375c64d61d083d7d2f05c38d90b97ec65cf" + integrity sha512-SU/C68YVwTRxqWj5kgsbKINakGag0KTgq9f2iZEXdStoAbOzLHEBRYzImmA6yFo8YZhJVflvXmIHUO7GWHmxxA== + dependencies: + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-function-name" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-literals@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.5.tgz#af392b90e3edb2bd6dc316844cbfd6b9e009d320" integrity sha512-B1j9C/IfvshnPcklsc93AVLTrNVa69iSqztylZH6qnmiAsDDOmmjEYqOm3Ts2lGSgTSywnBNiqC949VdD0/gfw== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-member-expression-literals@^7.16.0", "@babel/plugin-transform-member-expression-literals@^7.16.5": +"@babel/plugin-transform-literals@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-literals/-/plugin-transform-literals-7.16.7.tgz#254c9618c5ff749e87cb0c0cef1a0a050c0bdab1" + integrity sha512-6tH8RTpTWI0s2sV6uq3e/C9wPo4PTqqZps4uF0kzQ9/xPLFQtipynvmT1g/dOfEJ+0EQsHhkQ/zyRId8J2b8zQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-member-expression-literals@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.5.tgz#4bd6ecdc11932361631097b779ca5c7570146dd5" integrity sha512-d57i3vPHWgIde/9Y8W/xSFUndhvhZN5Wu2TjRrN1MVz5KzdUihKnfDVlfP1U7mS5DNj/WHHhaE4/tTi4hIyHwQ== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-modules-amd@^7.16.0", "@babel/plugin-transform-modules-amd@^7.16.5": +"@babel/plugin-transform-member-expression-literals@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.16.7.tgz#6e5dcf906ef8a098e630149d14c867dd28f92384" + integrity sha512-mBruRMbktKQwbxaJof32LT9KLy2f3gH+27a5XSuXo6h7R3vqltl0PgZ80C8ZMKw98Bf8bqt6BEVi3svOh2PzMw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-modules-amd@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.5.tgz#92c0a3e83f642cb7e75fada9ab497c12c2616527" integrity sha512-oHI15S/hdJuSCfnwIz+4lm6wu/wBn7oJ8+QrkzPPwSFGXk8kgdI/AIKcbR/XnD1nQVMg/i6eNaXpszbGuwYDRQ== @@ -1197,7 +1621,16 @@ "@babel/helper-plugin-utils" "^7.16.5" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-commonjs@^7.16.0", "@babel/plugin-transform-modules-commonjs@^7.16.5": +"@babel/plugin-transform-modules-amd@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.16.7.tgz#b28d323016a7daaae8609781d1f8c9da42b13186" + integrity sha512-KaaEtgBL7FKYwjJ/teH63oAmE3lP34N3kshz8mm4VMAw7U3PxjVwwUmxEFksbgsNUaO3wId9R2AVQYSEGRa2+g== + dependencies: + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-commonjs@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.5.tgz#4ee03b089536f076b2773196529d27c32b9d7bde" integrity sha512-ABhUkxvoQyqhCWyb8xXtfwqNMJD7tx+irIRnUh6lmyFud7Jln1WzONXKlax1fg/ey178EXbs4bSGNd6PngO+SQ== @@ -1207,7 +1640,17 @@ "@babel/helper-simple-access" "^7.16.0" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-systemjs@^7.16.0", "@babel/plugin-transform-modules-systemjs@^7.16.5": +"@babel/plugin-transform-modules-commonjs@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.16.8.tgz#cdee19aae887b16b9d331009aa9a219af7c86afe" + integrity sha512-oflKPvsLT2+uKQopesJt3ApiaIS2HW+hzHFcwRNtyDGieAeC/dIHZX8buJQ2J2X1rxGPy4eRcUijm3qcSPjYcA== + dependencies: + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-simple-access" "^7.16.7" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-systemjs@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.5.tgz#07078ba2e3cc94fbdd06836e355c246e98ad006b" integrity sha512-53gmLdScNN28XpjEVIm7LbWnD/b/TpbwKbLk6KV4KqC9WyU6rq1jnNmVG6UgAdQZVVGZVoik3DqHNxk4/EvrjA== @@ -1218,7 +1661,18 @@ "@babel/helper-validator-identifier" "^7.15.7" babel-plugin-dynamic-import-node "^2.3.3" -"@babel/plugin-transform-modules-umd@^7.16.0", "@babel/plugin-transform-modules-umd@^7.16.5": +"@babel/plugin-transform-modules-systemjs@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.16.7.tgz#887cefaef88e684d29558c2b13ee0563e287c2d7" + integrity sha512-DuK5E3k+QQmnOqBR9UkusByy5WZWGRxfzV529s9nPra1GE7olmxfqO2FHobEOYSPIjPBTr4p66YDcjQnt8cBmw== + dependencies: + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-validator-identifier" "^7.16.7" + babel-plugin-dynamic-import-node "^2.3.3" + +"@babel/plugin-transform-modules-umd@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.5.tgz#caa9c53d636fb4e3c99fd35a4c9ba5e5cd7e002e" integrity sha512-qTFnpxHMoenNHkS3VoWRdwrcJ3FhX567GvDA3hRZKF0Dj8Fmg0UzySZp3AP2mShl/bzcywb/UWAMQIjA1bhXvw== @@ -1226,21 +1680,43 @@ "@babel/helper-module-transforms" "^7.16.5" "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-named-capturing-groups-regex@^7.16.0", "@babel/plugin-transform-named-capturing-groups-regex@^7.16.5": +"@babel/plugin-transform-modules-umd@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.16.7.tgz#23dad479fa585283dbd22215bff12719171e7618" + integrity sha512-EMh7uolsC8O4xhudF2F6wedbSHm1HHZ0C6aJ7K67zcDNidMzVcxWdGr+htW9n21klm+bOn+Rx4CBsAntZd3rEQ== + dependencies: + "@babel/helper-module-transforms" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-named-capturing-groups-regex@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.5.tgz#4afd8cdee377ce3568f4e8a9ee67539b69886a3c" integrity sha512-/wqGDgvFUeKELW6ex6QB7dLVRkd5ehjw34tpXu1nhKC0sFfmaLabIswnpf8JgDyV2NeDmZiwoOb0rAmxciNfjA== dependencies: "@babel/helper-create-regexp-features-plugin" "^7.16.0" -"@babel/plugin-transform-new-target@^7.16.0", "@babel/plugin-transform-new-target@^7.16.5": +"@babel/plugin-transform-named-capturing-groups-regex@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.16.8.tgz#7f860e0e40d844a02c9dcf9d84965e7dfd666252" + integrity sha512-j3Jw+n5PvpmhRR+mrgIh04puSANCk/T/UA3m3P1MjJkhlK906+ApHhDIqBQDdOgL/r1UYpz4GNclTXxyZrYGSw== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + +"@babel/plugin-transform-new-target@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.5.tgz#759ea9d6fbbc20796056a5d89d13977626384416" integrity sha512-ZaIrnXF08ZC8jnKR4/5g7YakGVL6go6V9ql6Jl3ecO8PQaQqFE74CuM384kezju7Z9nGCCA20BqZaR1tJ/WvHg== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-object-super@^7.16.0", "@babel/plugin-transform-object-super@^7.16.5": +"@babel/plugin-transform-new-target@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.16.7.tgz#9967d89a5c243818e0800fdad89db22c5f514244" + integrity sha512-xiLDzWNMfKoGOpc6t3U+etCE2yRnn3SM09BXqWPIZOBpL2gvVrBWUKnsJx0K/ADi5F5YC5f8APFfWrz25TdlGg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-object-super@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.5.tgz#8ccd9a1bcd3e7732ff8aa1702d067d8cd70ce380" integrity sha512-tded+yZEXuxt9Jdtkc1RraW1zMF/GalVxaVVxh41IYwirdRgyAxxxCKZ9XB7LxZqmsjfjALxupNE1MIz9KH+Zg== @@ -1248,6 +1724,14 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/helper-replace-supers" "^7.16.5" +"@babel/plugin-transform-object-super@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.16.7.tgz#ac359cf8d32cf4354d27a46867999490b6c32a94" + integrity sha512-14J1feiQVWaGvRxj2WjyMuXS2jsBkgB3MdSN5HuC2G5nRspa5RK9COcs82Pwy5BuGcjb+fYaUj94mYcOj7rCvw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-replace-supers" "^7.16.7" + "@babel/plugin-transform-parameters@^7.16.3", "@babel/plugin-transform-parameters@^7.16.5": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.5.tgz#4fc74b18a89638bd90aeec44a11793ecbe031dde" @@ -1255,27 +1739,55 @@ dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-property-literals@^7.16.0", "@babel/plugin-transform-property-literals@^7.16.5": +"@babel/plugin-transform-parameters@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.16.7.tgz#a1721f55b99b736511cb7e0152f61f17688f331f" + integrity sha512-AT3MufQ7zZEhU2hwOA11axBnExW0Lszu4RL/tAlUJBuNoRak+wehQW8h6KcXOcgjY42fHtDxswuMhMjFEuv/aw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-property-literals@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.5.tgz#58f1465a7202a2bb2e6b003905212dd7a79abe3f" integrity sha512-+IRcVW71VdF9pEH/2R/Apab4a19LVvdVsr/gEeotH00vSDVlKD+XgfSIw+cgGWsjDB/ziqGv/pGoQZBIiQVXHg== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-regenerator@^7.16.0", "@babel/plugin-transform-regenerator@^7.16.5": +"@babel/plugin-transform-property-literals@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.16.7.tgz#2dadac85155436f22c696c4827730e0fe1057a55" + integrity sha512-z4FGr9NMGdoIl1RqavCqGG+ZuYjfZ/hkCIeuH6Do7tXmSm0ls11nYVSJqFEUOSJbDab5wC6lRE/w6YjVcr6Hqw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-regenerator@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.5.tgz#704cc6d8dd3dd4758267621ab7b36375238cef13" integrity sha512-2z+it2eVWU8TtQQRauvGUqZwLy4+7rTfo6wO4npr+fvvN1SW30ZF3O/ZRCNmTuu4F5MIP8OJhXAhRV5QMJOuYg== dependencies: regenerator-transform "^0.14.2" -"@babel/plugin-transform-reserved-words@^7.16.0", "@babel/plugin-transform-reserved-words@^7.16.5": +"@babel/plugin-transform-regenerator@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.16.7.tgz#9e7576dc476cb89ccc5096fff7af659243b4adeb" + integrity sha512-mF7jOgGYCkSJagJ6XCujSQg+6xC1M77/03K2oBmVJWoFGNUtnVJO4WHKJk3dnPC8HCcj4xBQP1Egm8DWh3Pb3Q== + dependencies: + regenerator-transform "^0.14.2" + +"@babel/plugin-transform-reserved-words@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.5.tgz#db95e98799675e193dc2b47d3e72a7c0651d0c30" integrity sha512-aIB16u8lNcf7drkhXJRoggOxSTUAuihTSTfAcpynowGJOZiGf+Yvi7RuTwFzVYSYPmWyARsPqUGoZWWWxLiknw== dependencies: "@babel/helper-plugin-utils" "^7.16.5" +"@babel/plugin-transform-reserved-words@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.16.7.tgz#1d798e078f7c5958eec952059c460b220a63f586" + integrity sha512-KQzzDnZ9hWQBjwi5lpY5v9shmm6IVG0U9pB18zvMu2i4H90xpT4gmqwPYsn8rObiadYe2M0gmgsiOIF5A/2rtg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/plugin-transform-runtime@7.16.4": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.16.4.tgz#f9ba3c7034d429c581e1bd41b4952f3db3c2c7e8" @@ -1288,14 +1800,21 @@ babel-plugin-polyfill-regenerator "^0.3.0" semver "^6.3.0" -"@babel/plugin-transform-shorthand-properties@^7.16.0", "@babel/plugin-transform-shorthand-properties@^7.16.5": +"@babel/plugin-transform-shorthand-properties@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.5.tgz#ccb60b1a23b799f5b9a14d97c5bc81025ffd96d7" integrity sha512-ZbuWVcY+MAXJuuW7qDoCwoxDUNClfZxoo7/4swVbOW1s/qYLOMHlm9YRWMsxMFuLs44eXsv4op1vAaBaBaDMVg== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-spread@^7.16.0", "@babel/plugin-transform-spread@^7.16.5": +"@babel/plugin-transform-shorthand-properties@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.16.7.tgz#e8549ae4afcf8382f711794c0c7b6b934c5fbd2a" + integrity sha512-hah2+FEnoRoATdIb05IOXf+4GzXYTq75TVhIn1PewihbpyrNWUt2JbudKQOETWw6QpLe+AIUpJ5MVLYTQbeeUg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-spread@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.5.tgz#912b06cff482c233025d3e69cf56d3e8fa166c29" integrity sha512-5d6l/cnG7Lw4tGHEoga4xSkYp1euP7LAtrah1h1PgJ3JY7yNsjybsxQAnVK4JbtReZ/8z6ASVmd3QhYYKLaKZw== @@ -1303,35 +1822,71 @@ "@babel/helper-plugin-utils" "^7.16.5" "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" -"@babel/plugin-transform-sticky-regex@^7.16.0", "@babel/plugin-transform-sticky-regex@^7.16.5": +"@babel/plugin-transform-spread@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-spread/-/plugin-transform-spread-7.16.7.tgz#a303e2122f9f12e0105daeedd0f30fb197d8ff44" + integrity sha512-+pjJpgAngb53L0iaA5gU/1MLXJIfXcYepLgXB3esVRf4fqmj8f2cxM3/FKaHsZms08hFQJkFccEWuIpm429TXg== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-skip-transparent-expression-wrappers" "^7.16.0" + +"@babel/plugin-transform-sticky-regex@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.5.tgz#593579bb2b5a8adfbe02cb43823275d9098f75f9" integrity sha512-usYsuO1ID2LXxzuUxifgWtJemP7wL2uZtyrTVM4PKqsmJycdS4U4mGovL5xXkfUheds10Dd2PjoQLXw6zCsCbg== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-template-literals@^7.16.0", "@babel/plugin-transform-template-literals@^7.16.5": +"@babel/plugin-transform-sticky-regex@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.16.7.tgz#c84741d4f4a38072b9a1e2e3fd56d359552e8660" + integrity sha512-NJa0Bd/87QV5NZZzTuZG5BPJjLYadeSZ9fO6oOUoL4iQx+9EEuw/eEM92SrsT19Yc2jgB1u1hsjqDtH02c3Drw== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-template-literals@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.5.tgz#343651385fd9923f5aa2275ca352c5d9183e1773" integrity sha512-gnyKy9RyFhkovex4BjKWL3BVYzUDG6zC0gba7VMLbQoDuqMfJ1SDXs8k/XK41Mmt1Hyp4qNAvGFb9hKzdCqBRQ== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-typeof-symbol@^7.16.0", "@babel/plugin-transform-typeof-symbol@^7.16.5": +"@babel/plugin-transform-template-literals@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.16.7.tgz#f3d1c45d28967c8e80f53666fc9c3e50618217ab" + integrity sha512-VwbkDDUeenlIjmfNeDX/V0aWrQH2QiVyJtwymVQSzItFDTpxfyJh3EVaQiS0rIN/CqbLGr0VcGmuwyTdZtdIsA== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-typeof-symbol@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.5.tgz#a1d1bf2c71573fe30965d0e4cd6a3291202e20ed" integrity sha512-ldxCkW180qbrvyCVDzAUZqB0TAeF8W/vGJoRcaf75awm6By+PxfJKvuqVAnq8N9wz5Xa6mSpM19OfVKKVmGHSQ== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-unicode-escapes@^7.16.0", "@babel/plugin-transform-unicode-escapes@^7.16.5": +"@babel/plugin-transform-typeof-symbol@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.16.7.tgz#9cdbe622582c21368bd482b660ba87d5545d4f7e" + integrity sha512-p2rOixCKRJzpg9JB4gjnG4gjWkWa89ZoYUnl9snJ1cWIcTH/hvxZqfO+WjG6T8DRBpctEol5jw1O5rA8gkCokQ== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-unicode-escapes@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.5.tgz#80507c225af49b4f4ee647e2a0ce53d2eeff9e85" integrity sha512-shiCBHTIIChGLdyojsKQjoAyB8MBwat25lKM7MJjbe1hE0bgIppD+LX9afr41lLHOhqceqeWl4FkLp+Bgn9o1Q== dependencies: "@babel/helper-plugin-utils" "^7.16.5" -"@babel/plugin-transform-unicode-regex@^7.16.0", "@babel/plugin-transform-unicode-regex@^7.16.5": +"@babel/plugin-transform-unicode-escapes@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.16.7.tgz#da8717de7b3287a2c6d659750c964f302b31ece3" + integrity sha512-TAV5IGahIz3yZ9/Hfv35TV2xEm+kaBDaZQCn2S/hG9/CZ0DktxJv9eKfPc7yYCvOYR4JGx1h8C+jcSOvgaaI/Q== + dependencies: + "@babel/helper-plugin-utils" "^7.16.7" + +"@babel/plugin-transform-unicode-regex@^7.16.0": version "7.16.5" resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.5.tgz#ac84d6a1def947d71ffb832426aa53b83d7ed49e" integrity sha512-GTJ4IW012tiPEMMubd7sD07iU9O/LOo8Q/oU4xNhcaq0Xn8+6TcUQaHtC8YxySo1T+ErQ8RaWogIEeFhKGNPzw== @@ -1339,6 +1894,14 @@ "@babel/helper-create-regexp-features-plugin" "^7.16.0" "@babel/helper-plugin-utils" "^7.16.5" +"@babel/plugin-transform-unicode-regex@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.16.7.tgz#0f7aa4a501198976e25e82702574c34cfebe9ef2" + integrity sha512-oC5tYYKw56HO75KZVLQ+R/Nl3Hro9kf8iG0hXoaHP7tjAyCpvqBiSNe6vGrZni1Z6MggmUOC6A7VP7AVmw225Q== + dependencies: + "@babel/helper-create-regexp-features-plugin" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/preset-env@7.16.4": version "7.16.4" resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.16.4.tgz#4f6ec33b2a3fe72d6bfdcdf3859500232563a2e3" @@ -1419,32 +1982,32 @@ core-js-compat "^3.19.1" semver "^6.3.0" -"@babel/preset-env@^7.16.4": - version "7.16.5" - resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.16.5.tgz#2e94d922f4a890979af04ffeb6a6b4e44ba90847" - integrity sha512-MiJJW5pwsktG61NDxpZ4oJ1CKxM1ncam9bzRtx9g40/WkLRkxFP6mhpkYV0/DxcciqoiHicx291+eUQrXb/SfQ== - dependencies: - "@babel/compat-data" "^7.16.4" - "@babel/helper-compilation-targets" "^7.16.3" - "@babel/helper-plugin-utils" "^7.16.5" - "@babel/helper-validator-option" "^7.14.5" - "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.16.2" - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.16.0" - "@babel/plugin-proposal-async-generator-functions" "^7.16.5" - "@babel/plugin-proposal-class-properties" "^7.16.5" - "@babel/plugin-proposal-class-static-block" "^7.16.5" - "@babel/plugin-proposal-dynamic-import" "^7.16.5" - "@babel/plugin-proposal-export-namespace-from" "^7.16.5" - "@babel/plugin-proposal-json-strings" "^7.16.5" - "@babel/plugin-proposal-logical-assignment-operators" "^7.16.5" - "@babel/plugin-proposal-nullish-coalescing-operator" "^7.16.5" - "@babel/plugin-proposal-numeric-separator" "^7.16.5" - "@babel/plugin-proposal-object-rest-spread" "^7.16.5" - "@babel/plugin-proposal-optional-catch-binding" "^7.16.5" - "@babel/plugin-proposal-optional-chaining" "^7.16.5" - "@babel/plugin-proposal-private-methods" "^7.16.5" - "@babel/plugin-proposal-private-property-in-object" "^7.16.5" - "@babel/plugin-proposal-unicode-property-regex" "^7.16.5" +"@babel/preset-env@^7.16.7": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.16.8.tgz#e682fa0bcd1cf49621d64a8956318ddfb9a05af9" + integrity sha512-9rNKgVCdwHb3z1IlbMyft6yIXIeP3xz6vWvGaLHrJThuEIqWfHb0DNBH9VuTgnDfdbUDhkmkvMZS/YMCtP7Elg== + dependencies: + "@babel/compat-data" "^7.16.8" + "@babel/helper-compilation-targets" "^7.16.7" + "@babel/helper-plugin-utils" "^7.16.7" + "@babel/helper-validator-option" "^7.16.7" + "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression" "^7.16.7" + "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining" "^7.16.7" + "@babel/plugin-proposal-async-generator-functions" "^7.16.8" + "@babel/plugin-proposal-class-properties" "^7.16.7" + "@babel/plugin-proposal-class-static-block" "^7.16.7" + "@babel/plugin-proposal-dynamic-import" "^7.16.7" + "@babel/plugin-proposal-export-namespace-from" "^7.16.7" + "@babel/plugin-proposal-json-strings" "^7.16.7" + "@babel/plugin-proposal-logical-assignment-operators" "^7.16.7" + "@babel/plugin-proposal-nullish-coalescing-operator" "^7.16.7" + "@babel/plugin-proposal-numeric-separator" "^7.16.7" + "@babel/plugin-proposal-object-rest-spread" "^7.16.7" + "@babel/plugin-proposal-optional-catch-binding" "^7.16.7" + "@babel/plugin-proposal-optional-chaining" "^7.16.7" + "@babel/plugin-proposal-private-methods" "^7.16.7" + "@babel/plugin-proposal-private-property-in-object" "^7.16.7" + "@babel/plugin-proposal-unicode-property-regex" "^7.16.7" "@babel/plugin-syntax-async-generators" "^7.8.4" "@babel/plugin-syntax-class-properties" "^7.12.13" "@babel/plugin-syntax-class-static-block" "^7.14.5" @@ -1459,44 +2022,44 @@ "@babel/plugin-syntax-optional-chaining" "^7.8.3" "@babel/plugin-syntax-private-property-in-object" "^7.14.5" "@babel/plugin-syntax-top-level-await" "^7.14.5" - "@babel/plugin-transform-arrow-functions" "^7.16.5" - "@babel/plugin-transform-async-to-generator" "^7.16.5" - "@babel/plugin-transform-block-scoped-functions" "^7.16.5" - "@babel/plugin-transform-block-scoping" "^7.16.5" - "@babel/plugin-transform-classes" "^7.16.5" - "@babel/plugin-transform-computed-properties" "^7.16.5" - "@babel/plugin-transform-destructuring" "^7.16.5" - "@babel/plugin-transform-dotall-regex" "^7.16.5" - "@babel/plugin-transform-duplicate-keys" "^7.16.5" - "@babel/plugin-transform-exponentiation-operator" "^7.16.5" - "@babel/plugin-transform-for-of" "^7.16.5" - "@babel/plugin-transform-function-name" "^7.16.5" - "@babel/plugin-transform-literals" "^7.16.5" - "@babel/plugin-transform-member-expression-literals" "^7.16.5" - "@babel/plugin-transform-modules-amd" "^7.16.5" - "@babel/plugin-transform-modules-commonjs" "^7.16.5" - "@babel/plugin-transform-modules-systemjs" "^7.16.5" - "@babel/plugin-transform-modules-umd" "^7.16.5" - "@babel/plugin-transform-named-capturing-groups-regex" "^7.16.5" - "@babel/plugin-transform-new-target" "^7.16.5" - "@babel/plugin-transform-object-super" "^7.16.5" - "@babel/plugin-transform-parameters" "^7.16.5" - "@babel/plugin-transform-property-literals" "^7.16.5" - "@babel/plugin-transform-regenerator" "^7.16.5" - "@babel/plugin-transform-reserved-words" "^7.16.5" - "@babel/plugin-transform-shorthand-properties" "^7.16.5" - "@babel/plugin-transform-spread" "^7.16.5" - "@babel/plugin-transform-sticky-regex" "^7.16.5" - "@babel/plugin-transform-template-literals" "^7.16.5" - "@babel/plugin-transform-typeof-symbol" "^7.16.5" - "@babel/plugin-transform-unicode-escapes" "^7.16.5" - "@babel/plugin-transform-unicode-regex" "^7.16.5" + "@babel/plugin-transform-arrow-functions" "^7.16.7" + "@babel/plugin-transform-async-to-generator" "^7.16.8" + "@babel/plugin-transform-block-scoped-functions" "^7.16.7" + "@babel/plugin-transform-block-scoping" "^7.16.7" + "@babel/plugin-transform-classes" "^7.16.7" + "@babel/plugin-transform-computed-properties" "^7.16.7" + "@babel/plugin-transform-destructuring" "^7.16.7" + "@babel/plugin-transform-dotall-regex" "^7.16.7" + "@babel/plugin-transform-duplicate-keys" "^7.16.7" + "@babel/plugin-transform-exponentiation-operator" "^7.16.7" + "@babel/plugin-transform-for-of" "^7.16.7" + "@babel/plugin-transform-function-name" "^7.16.7" + "@babel/plugin-transform-literals" "^7.16.7" + "@babel/plugin-transform-member-expression-literals" "^7.16.7" + "@babel/plugin-transform-modules-amd" "^7.16.7" + "@babel/plugin-transform-modules-commonjs" "^7.16.8" + "@babel/plugin-transform-modules-systemjs" "^7.16.7" + "@babel/plugin-transform-modules-umd" "^7.16.7" + "@babel/plugin-transform-named-capturing-groups-regex" "^7.16.8" + "@babel/plugin-transform-new-target" "^7.16.7" + "@babel/plugin-transform-object-super" "^7.16.7" + "@babel/plugin-transform-parameters" "^7.16.7" + "@babel/plugin-transform-property-literals" "^7.16.7" + "@babel/plugin-transform-regenerator" "^7.16.7" + "@babel/plugin-transform-reserved-words" "^7.16.7" + "@babel/plugin-transform-shorthand-properties" "^7.16.7" + "@babel/plugin-transform-spread" "^7.16.7" + "@babel/plugin-transform-sticky-regex" "^7.16.7" + "@babel/plugin-transform-template-literals" "^7.16.7" + "@babel/plugin-transform-typeof-symbol" "^7.16.7" + "@babel/plugin-transform-unicode-escapes" "^7.16.7" + "@babel/plugin-transform-unicode-regex" "^7.16.7" "@babel/preset-modules" "^0.1.5" - "@babel/types" "^7.16.0" + "@babel/types" "^7.16.8" babel-plugin-polyfill-corejs2 "^0.3.0" - babel-plugin-polyfill-corejs3 "^0.4.0" + babel-plugin-polyfill-corejs3 "^0.5.0" babel-plugin-polyfill-regenerator "^0.3.0" - core-js-compat "^3.19.1" + core-js-compat "^3.20.2" semver "^6.3.0" "@babel/preset-modules@^0.1.5": @@ -1557,7 +2120,16 @@ "@babel/parser" "^7.14.5" "@babel/types" "^7.14.5" -"@babel/traverse@^7.13.0", "@babel/traverse@^7.14.5": +"@babel/template@^7.16.7": + version "7.16.7" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" + integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/parser" "^7.16.7" + "@babel/types" "^7.16.7" + +"@babel/traverse@^7.13.0": version "7.14.7" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.14.7.tgz#64007c9774cfdc3abd23b0780bc18a3ce3631753" integrity sha512-9vDr5NzHu27wgwejuKL7kIOm4bwEtaPQ4Z6cpCmjSuaRqpH/7xc4qcGEscwMqlkwgcXl6MvqoAjZkQ24uSdIZQ== @@ -1588,6 +2160,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.16.7", "@babel/traverse@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.8.tgz#bab2f2b09a5fe8a8d9cad22cbfe3ba1d126fef9c" + integrity sha512-xe+H7JlvKsDQwXRsBhSnq1/+9c+LlQcCK3Tn/l5sbx02HYns/cn7ibp9+RV1sIUqu7hKg91NWsgHurO9dowITQ== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.16.8" + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-function-name" "^7.16.7" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.16.8" + "@babel/types" "^7.16.8" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.14.5", "@babel/types@^7.4.4", "@babel/types@^7.8.6": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.14.5.tgz#3bb997ba829a2104cedb20689c4a5b8121d383ff" @@ -1604,6 +2192,14 @@ "@babel/helper-validator-identifier" "^7.15.7" to-fast-properties "^2.0.0" +"@babel/types@^7.16.7", "@babel/types@^7.16.8": + version "7.16.8" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.8.tgz#0ba5da91dd71e0a4e7781a30f22770831062e3c1" + integrity sha512-smN2DQc5s4M7fntyjGtyIPbRJv6wW4rU/94fmYJ7PKQuZkC0qGMHXJbg6sNGt12JmVr4k5YaptI/XtiLJBnmIg== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + "@commitlint/cli@^16.0.2": version "16.0.2" resolved "https://registry.yarnpkg.com/@commitlint/cli/-/cli-16.0.2.tgz#393b03793fc59b93e5f4dd7dd535a6cc5a7413ca" @@ -1760,61 +2356,63 @@ dependencies: chalk "^4.0.0" -"@compodoc/compodoc@^1.1.16": - version "1.1.16" - resolved "https://registry.yarnpkg.com/@compodoc/compodoc/-/compodoc-1.1.16.tgz#a7b03be50b20f5515048ee0ceace2195de68d87e" - integrity sha512-4zfjOaumS9E6QwoI8s5LF9B71h7zcLMElFUrElpqT83HGpRKBhzNrkEfdODNlS/ySYYpqwX81yUgQXsOWTRTjg== +"@compodoc/compodoc@^1.1.18": + version "1.1.18" + resolved "https://registry.yarnpkg.com/@compodoc/compodoc/-/compodoc-1.1.18.tgz#1e340c56dc0844bd446126f3ddbc9384e93b8bc9" + integrity sha512-+AFtcj2U3AJq6r8a2+PTdajIlS7m3pgvDhqgoYZJ4Rg/Zp9xvuDvUJU+5oHu8iHCAWwda3NoLUDjOZMNR8uIKg== dependencies: - "@babel/core" "^7.16.0" - "@babel/preset-env" "^7.16.4" - "@compodoc/live-server" "^1.2.2" + "@angular-devkit/schematics" "^13.1.2" + "@babel/core" "^7.16.7" + "@babel/preset-env" "^7.16.7" + "@compodoc/live-server" "^1.2.3" "@compodoc/ngd-transformer" "^2.1.0" chalk "^4.1.2" cheerio "^1.0.0-rc.10" chokidar "^3.5.2" - colors "^1.4.0" + colors "1.4.0" commander "^8.3.0" cosmiconfig "^7.0.1" - decache "^4.6.0" - fancy-log "^1.3.3" + decache "^4.6.1" + fancy-log "^2.0.0" findit2 "^2.2.3" fs-extra "^10.0.0" glob "^7.2.0" handlebars "^4.7.7" html-entities "^2.3.2" - i18next "^21.5.2" + i18next "^21.6.5" inside "^1.0.0" json5 "^2.2.0" lodash "^4.17.21" loglevel "^1.8.0" loglevel-plugin-prefix "^0.8.4" lunr "^2.3.9" - marked "^4.0.4" + marked "^4.0.9" minimist "^1.2.5" opencollective-postinstall "^2.0.3" os-name "4.0.1" + pdfjs-dist "^2.12.313" pdfmake "^0.2.4" semver "^7.3.5" traverse "^0.6.6" - ts-morph "^13.0.1" + ts-morph "^13.0.2" uuid "^8.3.2" -"@compodoc/live-server@^1.2.2": - version "1.2.2" - resolved "https://registry.yarnpkg.com/@compodoc/live-server/-/live-server-1.2.2.tgz#25aa1695ad7d2a2687b0702b5686d8e713e258c9" - integrity sha512-TaLC0IfrXc74B/csSaEQhQ2aZrHOC5lSiGT30UqGJ+vBaS9M+JSji0eYCLXScgbp7fSohQA56p0quNmHnHlXUw== +"@compodoc/live-server@^1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@compodoc/live-server/-/live-server-1.2.3.tgz#2e4b5920091a35e4b821cb99387123e3dfa30a63" + integrity sha512-hDmntVCyjjaxuJzPzBx68orNZ7TW4BtHWMnXlIVn5dqhK7vuFF/11hspO1cMmc+2QTYgqde1TBcb3127S7Zrow== dependencies: chokidar "^3.5.2" - colors latest + colors "1.4.0" connect "^3.7.0" cors latest event-stream "4.0.1" faye-websocket "0.11.x" - http-auth "4.1.7" + http-auth "4.1.9" http-auth-connect "^1.0.5" morgan "^1.10.0" object-assign latest - open "8.2.1" + open "8.4.0" proxy-middleware latest send latest serve-index "^1.9.1" @@ -3543,6 +4141,14 @@ babel-plugin-polyfill-corejs3@^0.4.0: "@babel/helper-define-polyfill-provider" "^0.3.0" core-js-compat "^3.18.0" +babel-plugin-polyfill-corejs3@^0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.5.0.tgz#f81371be3fe499d39e074e272a1ef86533f3d268" + integrity sha512-Hcrgnmkf+4JTj73GbK3bBhlVPiLL47owUAnoJIf69Hakl3q+KfodbDXiZWGMM7iqCZTxCG3Z2VRfPNYES4rXqQ== + dependencies: + "@babel/helper-define-polyfill-provider" "^0.3.0" + core-js-compat "^3.20.0" + babel-plugin-polyfill-regenerator@^0.3.0: version "0.3.0" resolved "https://registry.yarnpkg.com/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.3.0.tgz#9ebbcd7186e1a33e21c5e20cae4e7983949533be" @@ -4606,7 +5212,7 @@ colorette@^2.0.10, colorette@^2.0.16: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== -colors@^1.4.0, colors@latest: +colors@1.4.0, colors@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -4950,6 +5556,14 @@ core-js-compat@^3.18.0, core-js-compat@^3.19.1: browserslist "^4.19.1" semver "7.0.0" +core-js-compat@^3.20.0, core-js-compat@^3.20.2: + version "3.20.2" + resolved "https://registry.yarnpkg.com/core-js-compat/-/core-js-compat-3.20.2.tgz#d1ff6936c7330959b46b2e08b122a8b14e26140b" + integrity sha512-qZEzVQ+5Qh6cROaTPFLNS4lkvQ6mBzE3R6A6EEpssj7Zr2egMHgsy4XapdifqJDGC9CBiNv7s+ejI96rLNQFdg== + dependencies: + browserslist "^4.19.1" + semver "7.0.0" + core-js-pure@^3.15.0: version "3.15.2" resolved "https://registry.yarnpkg.com/core-js-pure/-/core-js-pure-3.15.2.tgz#c8e0874822705f3385d3197af9348f7c9ae2e3ce" @@ -5290,10 +5904,10 @@ debug@~3.1.0: dependencies: ms "2.0.0" -decache@^4.6.0: - version "4.6.0" - resolved "https://registry.yarnpkg.com/decache/-/decache-4.6.0.tgz#87026bc6e696759e82d57a3841c4e251a30356e8" - integrity sha512-PppOuLiz+DFeaUvFXEYZjLxAkKiMYH/do/b/MxpDe/8AgKBi5GhZxridoVIbBq72GDbL36e4p0Ce2jTGUwwU+w== +decache@^4.6.1: + version "4.6.1" + resolved "https://registry.yarnpkg.com/decache/-/decache-4.6.1.tgz#5928bfab97a6fcf22a65047a3d07999af36efaf0" + integrity sha512-ohApBM8u9ygepJCjgBrEZSSxPjc0T/PJkD+uNyxXPkqudyUpdXpwJYp0VISm2WrPVzASU6DZyIi6BWdyw7uJ2Q== dependencies: callsite "^1.0.0" @@ -6399,6 +7013,13 @@ fancy-log@^1.3.3: parse-node-version "^1.0.0" time-stamp "^1.0.0" +fancy-log@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-2.0.0.tgz#cad207b8396d69ae4796d74d17dff5f68b2f7343" + integrity sha512-9CzxZbACXMUXW13tS0tI8XsGGmxWzO2DmYrGuBJOJ8k8q2K7hwfJA5qHjuPPe8wtsco33YR9wc+Rlr5wYFvhSA== + dependencies: + color-support "^1.1.3" + fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: version "3.1.3" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz#3a7d56b559d6cbc3eb512325244e619a65c6c525" @@ -6884,7 +7505,7 @@ glob-to-regexp@^0.4.1: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.4.1.tgz#c75297087c851b9a578bd217dd59a92f59fe546e" integrity sha512-lkX1HJXwyMcprw/5YUZc2s7DrpAiHB21/V+E1rHUrVNokkvB6bqMzT0VfV6/86ZNabt1k14YOIaT7nDvOX3Iiw== -glob@7.2.0, glob@^7.1.3, glob@^7.1.7, glob@^7.2.0: +glob@7.2.0, glob@^7.0.3, glob@^7.1.3, glob@^7.1.4, glob@^7.1.6, glob@^7.1.7, glob@^7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" integrity sha512-lmLf6gtyrPq8tTjSmrO94wBeQbFR3HbLHbuyD69wuyQkImp2hWqMGB47OX65FBkPffO641IP9jWa1z4ivqG26Q== @@ -6896,18 +7517,6 @@ glob@7.2.0, glob@^7.1.3, glob@^7.1.7, glob@^7.2.0: once "^1.3.0" path-is-absolute "^1.0.0" -glob@^7.0.3, glob@^7.1.4, glob@^7.1.6: - version "7.1.7" - resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.7.tgz#3b193e9233f01d42d0b3f78294bbeeb418f94a90" - integrity sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ== - dependencies: - fs.realpath "^1.0.0" - inflight "^1.0.4" - inherits "2" - minimatch "^3.0.4" - once "^1.3.0" - path-is-absolute "^1.0.0" - global-dirs@^0.1.1: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -7171,15 +7780,15 @@ http-auth-connect@^1.0.5: resolved "https://registry.yarnpkg.com/http-auth-connect/-/http-auth-connect-1.0.5.tgz#7796d361f9ac56d80ada8ff54c61aa857768335f" integrity sha512-zykAOKpVAXyzhOLm6+xyB/RtRcfN3uDfH4Al73DIfeSb6B7nr0WToLI6UyyM6ohtcLmbBPksWXzVbEDStz8ObQ== -http-auth@4.1.7: - version "4.1.7" - resolved "https://registry.yarnpkg.com/http-auth/-/http-auth-4.1.7.tgz#0b8119c83813bd7ac4a934c04a2f8c568b2107ee" - integrity sha512-LdftJKxCOpEE56ESgg8uODQ+f+P+0ZHN+PZblIT3YX+c1hDINiI6eNDZ/jm+ji+oqeP+RAW7RuIvt76vqiOLnQ== +http-auth@4.1.9: + version "4.1.9" + resolved "https://registry.yarnpkg.com/http-auth/-/http-auth-4.1.9.tgz#9f3204422a1d6ee53122c041711e61e8303a323e" + integrity sha512-kvPYxNGc9EKGTXvOMnTBQw2RZfuiSihK/mLw/a4pbtRueTE45S55Lw/3k5CktIf7Ak0veMKEIteDj4YkNmCzmQ== dependencies: apache-crypt "^1.1.2" apache-md5 "^1.0.6" bcryptjs "^2.4.3" - uuid "^3.4.0" + uuid "^8.3.2" http-cache-semantics@^4.1.0: version "4.1.0" @@ -7305,10 +7914,10 @@ husky@^7.0.4: resolved "https://registry.yarnpkg.com/husky/-/husky-7.0.4.tgz#242048245dc49c8fb1bf0cc7cfb98dd722531535" integrity sha512-vbaCKN2QLtP/vD4yvs6iz6hBEo6wkSzs8HpRah1Z6aGmF2KW5PdYuAd7uX5a+OyBZHBhd+TFLqgjUgytQr4RvQ== -i18next@^21.5.2: - version "21.6.2" - resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.6.2.tgz#3bfc35fc3ac32541a2a5b80f1dc5306c994dd14f" - integrity sha512-S1zSTrs2lgPH8iG68pMWh3P7OzQMcs3+Qr5F39JTyGbe/xl5cW4cF8MTPKSy6F25tFTcKBq915IoEZUWewkldg== +i18next@^21.6.5: + version "21.6.6" + resolved "https://registry.yarnpkg.com/i18next/-/i18next-21.6.6.tgz#65db9a32e4746d145b3ab3f12c59fc02ad7b5101" + integrity sha512-K1Pw8K+nHVco56PO6UrqNq4K/ZVbb2eqBQwPqmzYDm4tGQYXBjdz8jrnvuNvV5STaE8oGpWKQMxHOvh2zhVE7Q== dependencies: "@babel/runtime" "^7.12.0" @@ -8476,10 +9085,10 @@ map-stream@0.0.7: resolved "https://registry.yarnpkg.com/map-stream/-/map-stream-0.0.7.tgz#8a1f07896d82b10926bd3744a2420009f88974a8" integrity sha1-ih8HiW2CsQkmvTdEokIACfiJdKg= -marked@^4.0.4: - version "4.0.7" - resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.7.tgz#596a0826e7a8c6b4119eacd00b0220ddaee7fc71" - integrity sha512-mQrRvV2vRk7DHZsWsYJfAjmBo+lSYPhTJPThaaGpkEfmC+4oefeug2txZniQTieDS0CFpokfVhd7JuS5GtnHhA== +marked@^4.0.9: + version "4.0.10" + resolved "https://registry.yarnpkg.com/marked/-/marked-4.0.10.tgz#423e295385cc0c3a70fa495e0df68b007b879423" + integrity sha512-+QvuFj0nGgO970fySghXGmuw+Fd0gD2x3+MqCWLIPf5oxdv1Ka6b2q+z9RP01P/IaKPMEramy+7cNy/Lw8c3hw== media-typer@0.3.0: version "0.3.0" @@ -9219,15 +9828,6 @@ onetime@^5.1.0, onetime@^5.1.2: dependencies: mimic-fn "^2.1.0" -open@8.2.1: - version "8.2.1" - resolved "https://registry.yarnpkg.com/open/-/open-8.2.1.tgz#82de42da0ccbf429bc12d099dad2e0975e14e8af" - integrity sha512-rXILpcQlkF/QuFez2BJDf3GsqpjGKbkUUToAIGo9A0Q6ZkoSGogZJulrUdwRkrAsoQvoZsrjCYt8+zblOk7JQQ== - dependencies: - define-lazy-prop "^2.0.0" - is-docker "^2.1.1" - is-wsl "^2.2.0" - open@8.4.0, open@^8.0.9: version "8.4.0" resolved "https://registry.yarnpkg.com/open/-/open-8.4.0.tgz#345321ae18f8138f82565a910fdc6b39e8c244f8" @@ -9545,6 +10145,11 @@ pause-stream@^0.0.11: dependencies: through "~2.3" +pdfjs-dist@^2.12.313: + version "2.12.313" + resolved "https://registry.yarnpkg.com/pdfjs-dist/-/pdfjs-dist-2.12.313.tgz#62f2273737bb956267ae2e02cdfaddcb1099819c" + integrity sha512-1x6iXO4Qnv6Eb+YFdN5JdUzt4pAkxSp3aLAYPX93eQCyg/m7QFzXVWJHJVtoW48CI8HCXju4dSkhQZwoheL5mA== + pdfmake@^0.2.4: version "0.2.4" resolved "https://registry.yarnpkg.com/pdfmake/-/pdfmake-0.2.4.tgz#7d58d64b59f8e9b9ed0b2494b17a9d94c575825b" @@ -11745,7 +12350,7 @@ trim-right@^1.0.1: resolved "https://registry.yarnpkg.com/trim-right/-/trim-right-1.0.1.tgz#cb2e1203067e0c8de1f614094b9fe45704ea6003" integrity sha1-yy4SAwZ+DI3h9hQJS5/kVwTqYAM= -ts-morph@^13.0.1: +ts-morph@^13.0.2: version "13.0.2" resolved "https://registry.yarnpkg.com/ts-morph/-/ts-morph-13.0.2.tgz#55546023493ef82389d9e4f28848a556c784bac4" integrity sha512-SjeeHaRf/mFsNeR3KTJnx39JyEOzT4e+DX28gQx5zjzEOuFs2eGrqeN2PLKs/+AibSxPmzV7RD8nJVKmFJqtLA== From c1ca56e6574949141cab0e40c587c076a280f684 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Jan 2022 12:48:22 +0000 Subject: [PATCH 007/148] build(deps-dev): bump pretty-quick from 3.1.2 to 3.1.3 Bumps [pretty-quick](https://github.com/azz/pretty-quick) from 3.1.2 to 3.1.3. - [Release notes](https://github.com/azz/pretty-quick/releases) - [Commits](https://github.com/azz/pretty-quick/compare/v3.1.2...v3.1.3) --- updated-dependencies: - dependency-name: pretty-quick dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 15 +++++---------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index ed72261304..16b4da159e 100644 --- a/package.json +++ b/package.json @@ -145,7 +145,7 @@ "karma-jasmine-html-reporter": "^1.7.0", "lint-staged": "^12.1.7", "prettier": "^2.5.1", - "pretty-quick": "^3.1.2", + "pretty-quick": "^3.1.3", "source-map-explorer": "^2.5.2", "standard-version": "^9.3.2", "typescript": "~4.5.4", diff --git a/yarn.lock b/yarn.lock index 103964c7f2..e71ffc3341 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7959,7 +7959,7 @@ ignore-walk@^4.0.1: dependencies: minimatch "^3.0.4" -ignore@5.1.9: +ignore@5.1.9, ignore@^5.0.4, ignore@^5.1.4, ignore@^5.1.8: version "5.1.9" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.9.tgz#9ec1a5cbe8e1446ec60d4420060d43aa6e7382fb" integrity sha512-2zeMQpbKz5dhZ9IwL0gbxSW5w0NK/MSAMtNuhgIHEPmaU3vPdKPL0UdvUCXs5SS4JAwsBxysK5sFMW8ocFiVjQ== @@ -7969,11 +7969,6 @@ ignore@^4.0.6: resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== -ignore@^5.0.4, ignore@^5.1.4, ignore@^5.1.8: - version "5.1.8" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.1.8.tgz#f150a8b50a34289b33e22f5889abd4d8016f0e57" - integrity sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw== - image-size@~0.5.0: version "0.5.5" resolved "https://registry.yarnpkg.com/image-size/-/image-size-0.5.5.tgz#09dfd4ab9d20e29eb1c3e80b8990378df9e3cb9c" @@ -10657,10 +10652,10 @@ pretty-bytes@^5.3.0: resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== -pretty-quick@^3.1.2: - version "3.1.2" - resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.2.tgz#89d8741af7122cbd7f34182df746c5a7ea360b5c" - integrity sha512-T+fpTJrDjTzewql4p3lKrRA7z3MrNyjBK1MKeaBm5PpKwATgVm885TpY7TgY8KFt5Q1Qn3QDseRQcyX9AKTKkA== +pretty-quick@^3.1.3: + version "3.1.3" + resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.3.tgz#15281108c0ddf446675157ca40240099157b638e" + integrity sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA== dependencies: chalk "^3.0.0" execa "^4.0.0" From 0b3fc99f1a9b940dbe66c8cc8971d73b8805b00d Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Sat, 15 Jan 2022 13:52:55 +0100 Subject: [PATCH 008/148] build(core): enable ng cli cache --- angular.json | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/angular.json b/angular.json index 905f3211b9..c10d56bb01 100644 --- a/angular.json +++ b/angular.json @@ -171,6 +171,11 @@ }, "defaultProject": "awg-app", "cli": { - "defaultCollection": "@angular-eslint/schematics" + "defaultCollection": "@angular-eslint/schematics", + "cache": { + "enabled": true, + "path": ".cache", + "environment": "all" + } } } From 17f1d1924f46a1d62fca2026f978f81b3bc3e688 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Jan 2022 12:56:49 +0000 Subject: [PATCH 009/148] build(deps): bump rxjs from 6.6.7 to 7.5.2 Bumps [rxjs](https://github.com/reactivex/rxjs) from 6.6.7 to 7.5.2. - [Release notes](https://github.com/reactivex/rxjs/releases) - [Changelog](https://github.com/ReactiveX/rxjs/blob/master/CHANGELOG.md) - [Commits](https://github.com/reactivex/rxjs/compare/6.6.7...7.5.2) --- updated-dependencies: - dependency-name: rxjs dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 29 ++++++----------------------- 2 files changed, 7 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index ed72261304..2303bf91cc 100644 --- a/package.json +++ b/package.json @@ -104,7 +104,7 @@ "ngx-json-viewer": "^3.0.2", "ngx-order-pipe": "^2.2.0", "rdfstore": "^0.9.17", - "rxjs": "~6.6.7", + "rxjs": "~7.5.2", "snapsvg": "^0.5.1", "tslib": "^2.3.1", "zone.js": "~0.11.4" diff --git a/yarn.lock b/yarn.lock index 103964c7f2..349cb7e844 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11232,24 +11232,17 @@ rxjs-for-await@0.0.2: resolved "https://registry.yarnpkg.com/rxjs-for-await/-/rxjs-for-await-0.0.2.tgz#26598a1d6167147cc192172970e7eed4e620384b" integrity sha512-IJ8R/ZCFMHOcDIqoABs82jal00VrZx8Xkgfe7TOKoaRPAW5nH/VFlG23bXpeGdrmtqI9UobFPgUKgCuFc7Lncw== -rxjs@6.6.7, rxjs@^6.5.4, rxjs@~6.6.7: +rxjs@6.6.7, rxjs@^6.5.4: version "6.6.7" resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.6.7.tgz#90ac018acabf491bf65044235d5863c4dab804c9" integrity sha512-hTdwr+7yYNIT5n4AMYp85KA6yw2Va0FLa3Rguvbpa4W3I5xynaBZo41cM3XM+4Q6fRMj3sBYIR1VAmZMXYJvRQ== dependencies: tslib "^1.9.0" -rxjs@^7.2.0: - version "7.3.0" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.3.0.tgz#39fe4f3461dc1e50be1475b2b85a0a88c1e938c6" - integrity sha512-p2yuGIg9S1epc3vrjKf6iVb3RCaAYjYskkO+jHIaV0IjOPlJop4UnodOoFb2xeNwlguqLYvGw1b1McillYb5Gw== - dependencies: - tslib "~2.1.0" - -rxjs@^7.5.1: - version "7.5.1" - resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.1.tgz#af73df343cbcab37628197f43ea0c8256f54b157" - integrity sha512-KExVEeZWxMZnZhUZtsJcFwz8IvPvgu4G2Z2QyqjZQzUGr32KDYuSxrEYO4w3tFFNbfLozcrKUTvTPi+E9ywJkQ== +rxjs@^7.2.0, rxjs@^7.5.1, rxjs@~7.5.2: + version "7.5.2" + resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-7.5.2.tgz#11e4a3a1dfad85dbf7fb6e33cbba17668497490b" + integrity sha512-PwDt186XaL3QN5qXj/H9DGyHhP3/RYYgZZwqBv9Tv8rsAaiwFH1IsJJlcgD37J7UW5a6O67qX0KWKS3/pu0m4w== dependencies: tslib "^2.1.0" @@ -12386,7 +12379,7 @@ tsconfig-paths@^3.11.0: minimist "^1.2.0" strip-bom "^3.0.0" -tslib@2.3.1, tslib@^2.1.0, tslib@^2.3.0, tslib@^2.3.1: +tslib@2.3.1, tslib@^2.0.0, tslib@^2.1.0, tslib@^2.2.0, tslib@^2.3.0, tslib@^2.3.1: version "2.3.1" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01" integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw== @@ -12396,16 +12389,6 @@ tslib@^1.8.1, tslib@^1.9.0: resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== -tslib@^2.0.0, tslib@^2.2.0: - version "2.3.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.0.tgz#803b8cdab3e12ba581a4ca41c8839bbb0dacb09e" - integrity sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg== - -tslib@~2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.1.0.tgz#da60860f1c2ecaa5703ab7d39bc05b6bf988b97a" - integrity sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A== - tsutils@^3.21.0: version "3.21.0" resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" From 3eab2a8efaee94b2c933ce4e4f67ecfd96706ef2 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Sat, 15 Jan 2022 15:34:42 +0100 Subject: [PATCH 010/148] fix(core): ignore angular cache files --- .eslintignore | 2 ++ .gitignore | 1 + .prettierignore | 2 ++ angular.json | 2 +- 4 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.eslintignore b/.eslintignore index 33ce966b54..3639912003 100644 --- a/.eslintignore +++ b/.eslintignore @@ -1,4 +1,6 @@ # Ignore miscellaneous folders +.angular/ +.cache/ .github/ .idea/ .husky/ diff --git a/.gitignore b/.gitignore index 0fd6af84a4..115d38e4a1 100644 --- a/.gitignore +++ b/.gitignore @@ -42,6 +42,7 @@ speed-measure-plugin*.json # misc /.angular/cache +/.cache/ /.sass-cache /connect.lock /coverage diff --git a/.prettierignore b/.prettierignore index d104a9c9d1..ee30abd12e 100644 --- a/.prettierignore +++ b/.prettierignore @@ -36,6 +36,8 @@ speed-measure-plugin*.json .history/* # misc +/.angular/cache +/.cache/ /.sass-cache /connect.lock /coverage diff --git a/angular.json b/angular.json index c10d56bb01..bc794b4045 100644 --- a/angular.json +++ b/angular.json @@ -174,7 +174,7 @@ "defaultCollection": "@angular-eslint/schematics", "cache": { "enabled": true, - "path": ".cache", + "path": ".angular/cache", "environment": "all" } } From 1ae7b2547bb7c53a4ab80ac2ab497e0c28dbbaf7 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Sat, 15 Jan 2022 15:39:04 +0100 Subject: [PATCH 011/148] fix(edition): fix type errors after RxJS update --- .../edition-report/edition-report.component.ts | 2 +- src/app/views/edition-view/services/edition-data.service.ts | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-report/edition-report.component.ts b/src/app/views/edition-view/edition-outlets/edition-report/edition-report.component.ts index ea32b1c9f7..70d9a930a2 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/edition-report.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-report/edition-report.component.ts @@ -39,7 +39,7 @@ export class EditionReportComponent implements OnInit { * * Observable that keeps the report data. */ - editionReportData$: Observable<[SourceList, SourceDescriptionList, SourceEvaluationList, TextcriticsList]>; + editionReportData$: Observable<(SourceList | SourceDescriptionList | SourceEvaluationList | TextcriticsList)[]>; /** * Public variable: errorObject. diff --git a/src/app/views/edition-view/services/edition-data.service.ts b/src/app/views/edition-view/services/edition-data.service.ts index 3ca168e848..78b347da3f 100644 --- a/src/app/views/edition-view/services/edition-data.service.ts +++ b/src/app/views/edition-view/services/edition-data.service.ts @@ -64,7 +64,7 @@ export class EditionDataService { */ getEditionDetailData( editionWork: EditionWork - ): Observable<[FolioConvoluteList, EditionSvgSheetList, TextcriticsList]> { + ): Observable<(FolioConvoluteList | EditionSvgSheetList | TextcriticsList)[]> { this._setAssetWorkPath(editionWork); const folioData$: Observable = this._getFolioConvoluteData(); @@ -140,7 +140,7 @@ export class EditionDataService { */ getEditionReportData( editionWork: EditionWork - ): Observable<[SourceList, SourceDescriptionList, SourceEvaluationList, TextcriticsList]> { + ): Observable<(SourceList | SourceDescriptionList | SourceEvaluationList | TextcriticsList)[]> { this._setAssetWorkPath(editionWork); const sourceListData$: Observable = this._getSourceListData(); const sourceDescriptionListData$: Observable = this._getSourceDescriptionListData(); From c419532af1d284dca65cf7e0253951634e6eb31b Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Sat, 15 Jan 2022 15:50:24 +0100 Subject: [PATCH 012/148] build(core): update node version to 14 --- .github/workflows/ci_workflow.yml | 11 ++--------- package.json | 2 +- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci_workflow.yml b/.github/workflows/ci_workflow.yml index f70cce94e9..815d522953 100644 --- a/.github/workflows/ci_workflow.yml +++ b/.github/workflows/ci_workflow.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ubuntu-latest] - node-version: [12, 14.17, 16] + node-version: [14.17, 16, 17] steps: - name: Checkout repo @@ -55,17 +55,10 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - - name: Test build for GH Pages (Node < v16) - if: matrix.node-version != 16 + - name: Test build for GH Pages run: | yarn run build:gh - # Workaround for build path issue with node 16: - # https://github.com/angular/angular-cli/issues/21202 - - name: Test build for GH Pages (Node == v16) - if: matrix.node-version == 16 - run: | - yarn build:prod --delete-output-path false --base-href $npm_package_homepage && yarn gzip:dist && yarn doc:build deploy: diff --git a/package.json b/package.json index 2303bf91cc..20d247bc24 100644 --- a/package.json +++ b/package.json @@ -152,7 +152,7 @@ "webpack-bundle-analyzer": "^4.5.0" }, "engines": { - "node": ">= 12.14.1", + "node": ">= 14.17.0", "npm": ">= 6.14.0", "yarn": "^1.22.0" } From a6e40484aaa3e17325d72cb0fc947a598ddd1e08 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Sat, 15 Jan 2022 16:08:41 +0100 Subject: [PATCH 013/148] test(edition): fix type errors after RxJS update --- .../services/edition-data.service.spec.ts | 37 ++++++++++++------- 1 file changed, 23 insertions(+), 14 deletions(-) diff --git a/src/app/views/edition-view/services/edition-data.service.spec.ts b/src/app/views/edition-view/services/edition-data.service.spec.ts index f89b53994a..7560793015 100644 --- a/src/app/views/edition-view/services/edition-data.service.spec.ts +++ b/src/app/views/edition-view/services/edition-data.service.spec.ts @@ -294,6 +294,10 @@ describe('EditionDataService (DONE)', () => { // Call service function (success) editionDataService.getEditionDetailData(expectedEditionWork).subscribe( res => { + const resFcl = res[0] as FolioConvoluteList; + const resEsl = res[1] as EditionSvgSheetList; + const resTcl = res[2] as TextcriticsList; + expect(res).toBeTruthy(); expect(res.length as number).toEqual( expectedResult.length, @@ -301,25 +305,25 @@ describe('EditionDataService (DONE)', () => { ); expect(res).toEqual(expectedResult, `should equal ${expectedResult}`); - expect(res[0]).toEqual( + expect(resFcl).toEqual( expectedResult[0] as FolioConvoluteList, `should equal ${expectedResult[0]}` ); - expect(res[1]).toEqual( + expect(resEsl).toEqual( expectedResult[1] as EditionSvgSheetList, `should equal ${expectedResult[1]}` ); - expect(res[2]).toEqual( + expect(resTcl).toEqual( expectedResult[2] as TextcriticsList, `should equal ${expectedResult[2]}` ); - expect(res[0].convolutes[0].convoluteId).toBe( + expect(resFcl.convolutes[0].convoluteId).toBe( 'test-convolute-id', 'should be test-convolute-id' ); - expect(res[1].sheets[0].id).toBe('test-svg-sheets-id', 'should be test-svg-sheet-id'); - expect(res[2].textcritics[0].id).toBe( + expect(resEsl.sheets[0].id).toBe('test-svg-sheets-id', 'should be test-svg-sheet-id'); + expect(resTcl.textcritics[0].id).toBe( 'test-textcritics-id', 'should be test-textcritics-id' ); @@ -1051,6 +1055,11 @@ describe('EditionDataService (DONE)', () => { // Call service function (success) editionDataService.getEditionReportData(expectedEditionWork).subscribe( res => { + const resSl = res[0] as SourceList; + const resSdl = res[1] as SourceDescriptionList; + const resSel = res[2] as SourceEvaluationList; + const resTcl = res[3] as TextcriticsList; + expect(res).toBeTruthy(); expect(res.length as number).toEqual( expectedResult.length, @@ -1058,33 +1067,33 @@ describe('EditionDataService (DONE)', () => { ); expect(res).toEqual(expectedResult, `should equal ${expectedResult}`); - expect(res[0]).toEqual( + expect(resSl).toEqual( expectedResult[0] as SourceList, `should equal ${expectedResult[0]}` ); - expect(res[1]).toEqual( + expect(resSdl).toEqual( expectedResult[1] as SourceDescriptionList, `should equal ${expectedResult[1]}` ); - expect(res[2]).toEqual( + expect(resSel).toEqual( expectedResult[2] as SourceEvaluationList, `should equal ${expectedResult[2]}` ); - expect(res[3]).toEqual( + expect(resTcl).toEqual( expectedResult[3] as TextcriticsList, `should equal ${expectedResult[3]}` ); - expect(res[0].sources[0].siglum).toBe('test-sources-id', 'should be test-sources-id'); - expect(res[1].sources[0].id).toBe( + expect(resSl.sources[0].siglum).toBe('test-sources-id', 'should be test-sources-id'); + expect(resSdl.sources[0].id).toBe( 'test-source-description-id', 'should be test-source-description-id' ); - expect(res[2].sources[0].id).toBe( + expect(resSel.sources[0].id).toBe( 'test-source-evaluation-id', 'should be test-source-evaluation-id' ); - expect(res[3].textcritics[0].id).toBe( + expect(resTcl.textcritics[0].id).toBe( 'test-textcritics-id', 'should be test-textcritics-id' ); From 60a63fbe7e5213a047f12ae42ca38d20376dc81b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 15 Jan 2022 15:20:50 +0000 Subject: [PATCH 014/148] build(deps-dev): bump gzipper from 6.0.0 to 6.2.1 Bumps [gzipper](https://github.com/gios/gzipper) from 6.0.0 to 6.2.1. - [Release notes](https://github.com/gios/gzipper/releases) - [Changelog](https://github.com/gios/gzipper/blob/master/CHANGELOG.md) - [Commits](https://github.com/gios/gzipper/compare/v6.0.0...v6.2.1) --- updated-dependencies: - dependency-name: gzipper dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 226 +++++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 213 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 20d247bc24..f07cc04f4d 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "eslint-plugin-import": "^2.25.3", "eslint-plugin-jsdoc": "^37.2.2", "eslint-plugin-prettier": "^4.0.0", - "gzipper": "^6.0.0", + "gzipper": "^6.2.1", "husky": "^7.0.4", "jasmine-core": "~3.10.1", "karma": "~6.3.9", diff --git a/yarn.lock b/yarn.lock index 349cb7e844..289445534a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4700,7 +4700,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bl@^4.1.0: +bl@^4.0.3, bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== @@ -5229,7 +5229,7 @@ commander@^2.18.0, commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^3.0.0-0: +commander@^3.0.0, commander@^3.0.0-0: version "3.0.2" resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== @@ -5929,6 +5929,13 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= +decompress-response@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" + integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== + dependencies: + mimic-response "^2.0.0" + deep-equal@^1.0.0, deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" @@ -6054,7 +6061,7 @@ detect-indent@^6.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== -detect-libc@^1.0.2: +detect-libc@^1.0.2, detect-libc@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= @@ -6190,6 +6197,11 @@ dotgitignore@^2.1.0: find-up "^3.0.0" minimatch "^3.0.4" +duplex-maker@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/duplex-maker/-/duplex-maker-1.0.0.tgz#1604f8b943cb0063a6d3e1fe42aa65113a79da4a" + integrity sha1-FgT4uUPLAGOm0+H+QqplETp52ko= + duplexer2@~0.1.4: version "0.1.4" resolved "https://registry.yarnpkg.com/duplexer2/-/duplexer2-0.1.4.tgz#8b12dab878c0d69e3e7891051662a32fc6bddcc1" @@ -6202,6 +6214,16 @@ duplexer@^0.1.1, duplexer@^0.1.2, duplexer@~0.1.1: resolved "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6" integrity sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg== +duplexify@^3.5.0: + version "3.7.1" + resolved "https://registry.yarnpkg.com/duplexify/-/duplexify-3.7.1.tgz#2a4df5317f6ccfd91f86d6fd25d8d8a103b88309" + integrity sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g== + dependencies: + end-of-stream "^1.0.0" + inherits "^2.0.1" + readable-stream "^2.0.0" + stream-shift "^1.0.0" + ecc-jsbn@~0.1.1: version "0.1.2" resolved "https://registry.yarnpkg.com/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz#3a83a904e54353287874c564b7549386849a98c9" @@ -6264,7 +6286,7 @@ encoding@^0.1.12: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.1.0: +end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -6936,6 +6958,11 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= +expand-template@^2.0.3: + version "2.0.3" + resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" + integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== + express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -7258,6 +7285,11 @@ fs-access@^1.0.1: dependencies: null-check "^1.0.0" +fs-constants@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" + integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== + fs-extra@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" @@ -7486,6 +7518,11 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" +github-from-package@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" + integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= + glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -7593,13 +7630,15 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" -gzipper@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/gzipper/-/gzipper-6.0.0.tgz#2b8b5029c16aa8afd753071bf37d575bdfdf6b90" - integrity sha512-48rB8e5boI2cGjti7nscwN13/bdFEqV+8IUciVacy6akGOq3mGJySf2gXLqpoYGyHUwmP0JFsSPciXC6uolb8A== +gzipper@^6.2.1: + version "6.2.1" + resolved "https://registry.yarnpkg.com/gzipper/-/gzipper-6.2.1.tgz#2fe460fd674f7885bea448102d17be8d8ba1c4a5" + integrity sha512-HGCFv3hZy87B+AHRuDpbyRbvOdaJllyGB+OTqDqKy54e8M1RDgF64QN/buyqpqhvSXWePNIE0jqbHpcjCWG6YQ== dependencies: commander "^7.2.0" deep-equal "^2.0.5" + node-zopfli "^2.1.4" + simple-zstd "^1.4.0" uuid "^8.3.2" handle-thing@^2.0.0: @@ -8378,6 +8417,11 @@ is-wsl@^2.1.1, is-wsl@^2.2.0: dependencies: is-docker "^2.0.0" +is-zst@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/is-zst/-/is-zst-1.0.0.tgz#97462bb1a376dabba561e249ea754801e9b90fe0" + integrity sha512-ZA5lvshKAl8z30dX7saXLpVhpsq3d2EHK9uf7qtUjnOtdw4XBpAoWb2RvZ5kyoaebdoidnGI0g2hn9Z7ObPbww== + isarray@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" @@ -9193,6 +9237,11 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== +mimic-response@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" + integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== + min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -9226,7 +9275,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: +minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -9308,6 +9357,11 @@ minizlib@^2.0.0, minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" +mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: + version "0.5.3" + resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" + integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== + "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -9418,6 +9472,11 @@ nanoid@^3.1.30: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== +napi-build-utils@^1.0.1: + version "1.0.2" + resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" + integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== + natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -9469,6 +9528,18 @@ nice-napi@^1.0.2: node-addon-api "^3.0.0" node-gyp-build "^4.2.2" +node-abi@^2.7.0: + version "2.30.1" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" + integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== + dependencies: + semver "^5.4.1" + +node-addon-api@^1.7.2: + version "1.7.2" + resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" + integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== + node-addon-api@^3.0.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" @@ -9561,6 +9632,21 @@ node-releases@^2.0.1: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== +node-zopfli@^2.1.4: + version "2.1.4" + resolved "https://registry.yarnpkg.com/node-zopfli/-/node-zopfli-2.1.4.tgz#fb7f43ce622251ba11451b3e4dac5318d2e5bd61" + integrity sha512-5kxbPxNQHbORFBNNf083V7h0dTFy6+C1W4ZA4qTXjpCQqEMzxAQFAOfi6BlCmXAkC/+Vr8d6h0XOmdjvp+9FNw== + dependencies: + commander "^3.0.0" + defaults "^1.0.3" + node-addon-api "^1.7.2" + prebuild-install "^5.3.5" + +noop-logger@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" + integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= + "nopt@2 || 3": version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -9689,7 +9775,7 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.2: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.1, npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -10160,6 +10246,15 @@ pdfmake@^0.2.4: iconv-lite "^0.6.3" xmldoc "^1.1.2" +peek-stream@^1.1.3: + version "1.1.3" + resolved "https://registry.yarnpkg.com/peek-stream/-/peek-stream-1.1.3.tgz#3b35d84b7ccbbd262fff31dc10da56856ead6d67" + integrity sha512-FhJ+YbOSBb9/rIl2ZeE/QHEsWn7PqNYt8ARAY3kIgNGOk13g9FGyIY6JIl/xB/3TFRVoTv5as0l11weORrTekA== + dependencies: + buffer-from "^1.0.0" + duplexify "^3.5.0" + through2 "^2.0.3" + performance-now@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/performance-now/-/performance-now-0.2.0.tgz#33ef30c5c77d4ea21c5a53869d91b56d8f2555e5" @@ -10630,6 +10725,27 @@ postcss@^8.3.7: picocolors "^1.0.0" source-map-js "^0.6.2" +prebuild-install@^5.3.5: + version "5.3.6" + resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.6.tgz#7c225568d864c71d89d07f8796042733a3f54291" + integrity sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg== + dependencies: + detect-libc "^1.0.3" + expand-template "^2.0.3" + github-from-package "0.0.0" + minimist "^1.2.3" + mkdirp-classic "^0.5.3" + napi-build-utils "^1.0.1" + node-abi "^2.7.0" + noop-logger "^0.1.1" + npmlog "^4.0.1" + pump "^3.0.0" + rc "^1.2.7" + simple-get "^3.0.3" + tar-fs "^2.0.0" + tunnel-agent "^0.6.0" + which-pm-runs "^1.0.0" + prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -10679,6 +10795,15 @@ process-nextick-args@~2.0.0: resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2" integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag== +process-streams@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/process-streams/-/process-streams-1.0.1.tgz#e22c2aadbf788ef0c5754ea5e057e985c87dd691" + integrity sha1-4iwqrb94jvDFdU6l4Ffphch91pE= + dependencies: + duplex-maker "^1.0.0" + quotemeta "0.0.0" + tempfile "^1.1.0" + progress@^2.0.0: version "2.0.3" resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" @@ -10797,6 +10922,11 @@ quote-stream@^1.0.1: minimist "^1.1.3" through2 "^2.0.0" +quotemeta@0.0.0: + version "0.0.0" + resolved "https://registry.yarnpkg.com/quotemeta/-/quotemeta-0.0.0.tgz#51d3a06ee0fcd6e3b501dbd28904351ad7a5a38c" + integrity sha1-UdOgbuD81uO1AdvSiQQ1Gtelo4w= + randombytes@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/randombytes/-/randombytes-2.1.0.tgz#df6f84372f0270dc65cdf6291349ab7a473d4f2a" @@ -10891,7 +11021,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -10900,7 +11030,7 @@ readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stre string_decoder "^1.1.1" util-deprecate "^1.0.1" -readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2, readable-stream@~2.3.3, readable-stream@~2.3.6: +readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.6, readable-stream@^2.1.4, readable-stream@^2.2.2, readable-stream@~2.3.3, readable-stream@~2.3.6: version "2.3.7" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57" integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw== @@ -11492,6 +11622,30 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.5.tgz#9e3e8cc0c75a99472b44321033a7702e7738252f" integrity sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ== +simple-concat@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" + integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== + +simple-get@^3.0.3: + version "3.1.0" + resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" + integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== + dependencies: + decompress-response "^4.2.0" + once "^1.3.1" + simple-concat "^1.0.0" + +simple-zstd@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/simple-zstd/-/simple-zstd-1.4.0.tgz#b8fba1b1b41aa43183263f4c960a9c63899d4cb6" + integrity sha512-9zBNnu7MkwRiZm7voFUX7ehCcLO2d1FmJ2RWEVsN8Exw2tVYK9k/0/8WjPUmSmtoHOyoFTkHHaOLuPSwkgFmrA== + dependencies: + is-zst "^1.0.0" + peek-stream "^1.1.3" + process-streams "^1.0.1" + through2 "^4.0.2" + sirv@^1.0.7: version "1.0.12" resolved "https://registry.yarnpkg.com/sirv/-/sirv-1.0.12.tgz#d816c882b35489b3c63290e2f455ae3eccd5f652" @@ -11886,6 +12040,11 @@ stream-combiner@^0.2.2: duplexer "~0.1.1" through "~2.3.4" +stream-shift@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/stream-shift/-/stream-shift-1.0.1.tgz#d7088281559ab2778424279b0877da3c392d5a3d" + integrity sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ== + streamroller@^2.2.4: version "2.2.4" resolved "https://registry.yarnpkg.com/streamroller/-/streamroller-2.2.4.tgz#c198ced42db94086a6193608187ce80a5f2b0e53" @@ -12108,6 +12267,16 @@ tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== +tar-fs@^2.0.0: + version "2.1.1" + resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" + integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== + dependencies: + chownr "^1.1.1" + mkdirp-classic "^0.5.2" + pump "^3.0.0" + tar-stream "^2.1.4" + tar-pack@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" @@ -12122,6 +12291,17 @@ tar-pack@^3.4.0: tar "^2.2.1" uid-number "^0.0.6" +tar-stream@^2.1.4: + version "2.2.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" + integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== + dependencies: + bl "^4.0.3" + end-of-stream "^1.4.1" + fs-constants "^1.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" + tar@^2.0.0, tar@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40" @@ -12176,6 +12356,14 @@ temp@^0.9.4: mkdirp "^0.5.1" rimraf "~2.6.2" +tempfile@^1.1.0: + version "1.1.1" + resolved "https://registry.yarnpkg.com/tempfile/-/tempfile-1.1.1.tgz#5bcc4eaecc4ab2c707d8bc11d99ccc9a2cb287f2" + integrity sha1-W8xOrsxKsscH2LwR2ZzMmiyyh/I= + dependencies: + os-tmpdir "^1.0.0" + uuid "^2.0.1" + terser-webpack-plugin@^5.1.3: version "5.1.4" resolved "https://registry.yarnpkg.com/terser-webpack-plugin/-/terser-webpack-plugin-5.1.4.tgz#c369cf8a47aa9922bd0d8a94fe3d3da11a7678a1" @@ -12225,7 +12413,7 @@ text-table@0.2.0, text-table@^0.2.0: resolved "https://registry.yarnpkg.com/text-table/-/text-table-0.2.0.tgz#7f5ee823ae805207c00af2df4a84ec3fcfa570b4" integrity sha1-f17oI66AUgfACvLfSoTsP8+lcLQ= -through2@^2.0.0, through2@~2.0.3: +through2@^2.0.0, through2@^2.0.3, through2@~2.0.3: version "2.0.5" resolved "https://registry.yarnpkg.com/through2/-/through2-2.0.5.tgz#01c1e39eb31d07cb7d03a96a70823260b23132cd" integrity sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ== @@ -12233,7 +12421,7 @@ through2@^2.0.0, through2@~2.0.3: readable-stream "~2.3.6" xtend "~4.0.1" -through2@^4.0.0: +through2@^4.0.0, through2@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/through2/-/through2-4.0.2.tgz#a7ce3ac2a7a8b0b966c80e7c49f0484c3b239764" integrity sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw== @@ -12628,6 +12816,11 @@ uuid@8.3.2, uuid@^8.3.2: resolved "https://registry.yarnpkg.com/uuid/-/uuid-8.3.2.tgz#80d5b5ced271bb9af6c445f21a1a04c606cefbe2" integrity sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg== +uuid@^2.0.1: + version "2.0.3" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-2.0.3.tgz#67e2e863797215530dff318e5bf9dcebfd47b21a" + integrity sha1-Z+LoY3lyFVMN/zGOW/nc6/1Hsho= + uuid@^3.0.0, uuid@^3.3.2, uuid@^3.4.0: version "3.4.0" resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee" @@ -12841,6 +13034,11 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= +which-pm-runs@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" + integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= + which-typed-array@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" From 3f3b9a317ad314e314817edf81a8caa64fee3727 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Sat, 15 Jan 2022 16:43:44 +0100 Subject: [PATCH 015/148] build(deps-dev): bump eslint related packages to latest version --- package.json | 10 +-- yarn.lock | 181 ++++++++++++++++++++++++++++----------------------- 2 files changed, 103 insertions(+), 88 deletions(-) diff --git a/package.json b/package.json index 02e3f7936d..99b8382f6d 100644 --- a/package.json +++ b/package.json @@ -124,16 +124,16 @@ "@types/d3": "^7.1.0", "@types/jasmine": "~3.10.2", "@types/node": "^15.14.9", - "@typescript-eslint/eslint-plugin": "^5.7.0", - "@typescript-eslint/parser": "^5.7.0", + "@typescript-eslint/eslint-plugin": "^5.9.1", + "@typescript-eslint/parser": "^5.9.1", "angular-cli-ghpages": "^1.0.0", "conventional-recommended-bump": "^6.1.0", "cross-var": "^1.1.0", - "eslint": "^8.4.1", + "eslint": "^8.6.0", "eslint-config-prettier": "^8.3.0", "eslint-plugin-angular": "^4.1.0", - "eslint-plugin-import": "^2.25.3", - "eslint-plugin-jsdoc": "^37.2.2", + "eslint-plugin-import": "^2.25.4", + "eslint-plugin-jsdoc": "^37.6.1", "eslint-plugin-prettier": "^4.0.0", "gzipper": "^6.2.1", "husky": "^7.0.4", diff --git a/yarn.lock b/yarn.lock index 719c31753a..00e3ea0af0 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2466,14 +2466,14 @@ resolved "https://registry.yarnpkg.com/@discoveryjs/json-ext/-/json-ext-0.5.6.tgz#d5e0706cf8c6acd8c6032f8d54070af261bbbb2f" integrity sha512-ws57AidsDvREKrZKYffXddNkyaF14iHNHm8VQnZH6t99E8gczjNN0GpvcGny0imC80yQ0tHz1xVUKk/KFQSUyA== -"@es-joy/jsdoccomment@0.13.0": - version "0.13.0" - resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.13.0.tgz#90ffe2006981ff66d3f4fd2f05949487f0fca089" - integrity sha512-APVqbVPGOprb4BmjEnwbSzV+V2e/6DVIUnZG3zdW5uWXWkN0DKMCpiIy2TdBauoANKYO7RQpO8cTjIYNVSKwUA== +"@es-joy/jsdoccomment@~0.17.0": + version "0.17.0" + resolved "https://registry.yarnpkg.com/@es-joy/jsdoccomment/-/jsdoccomment-0.17.0.tgz#e6dcfeefdd070b317d572ec38e791b9602f506f2" + integrity sha512-B8DIIWE194KyQFPojUs+THa2XX+1vulwTBjirw6GqcxjtNE60Rreex26svBnV9SNLTuz92ctZx5XQE1H7yOxgA== dependencies: comment-parser "1.3.0" esquery "^1.4.0" - jsdoc-type-pratt-parser "2.0.0" + jsdoc-type-pratt-parser "~2.2.1" "@eslint/eslintrc@^1.0.5": version "1.0.5" @@ -3145,13 +3145,14 @@ dependencies: "@types/estree" "*" -"@typescript-eslint/eslint-plugin@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.7.0.tgz#12d54709f8ea1da99a01d8a992cd0474ad0f0aa9" - integrity sha512-8RTGBpNn5a9M628wBPrCbJ+v3YTEOE2qeZb7TDkGKTDXSj36KGRg92SpFFaR/0S3rSXQxM0Og/kV9EyadsYSBg== +"@typescript-eslint/eslint-plugin@^5.9.1": + version "5.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.9.1.tgz#e5a86d7e1f9dc0b3df1e6d94feaf20dd838d066c" + integrity sha512-Xv9tkFlyD4MQGpJgTo6wqDqGvHIRmRgah/2Sjz1PUnJTawjHWIwBivUE9x0QtU2WVii9baYgavo/bHjrZJkqTw== dependencies: - "@typescript-eslint/experimental-utils" "5.7.0" - "@typescript-eslint/scope-manager" "5.7.0" + "@typescript-eslint/experimental-utils" "5.9.1" + "@typescript-eslint/scope-manager" "5.9.1" + "@typescript-eslint/type-utils" "5.9.1" debug "^4.3.2" functional-red-black-tree "^1.0.1" ignore "^5.1.8" @@ -3171,26 +3172,26 @@ eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/experimental-utils@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.7.0.tgz#2b1633e6613c3238036156f70c32634843ad034f" - integrity sha512-u57eZ5FbEpzN5kSjmVrSesovWslH2ZyNPnaXQMXWgH57d5+EVHEt76W75vVuI9qKZ5BMDKNfRN+pxcPEjQjb2A== +"@typescript-eslint/experimental-utils@5.9.1": + version "5.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-5.9.1.tgz#8c407c4dd5ffe522329df6e4c9c2b52206d5f7f1" + integrity sha512-cb1Njyss0mLL9kLXgS/eEY53SZQ9sT519wpX3i+U457l2UXRDuo87hgKfgRazmu9/tQb0x2sr3Y0yrU+Zz0y+w== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.7.0" - "@typescript-eslint/types" "5.7.0" - "@typescript-eslint/typescript-estree" "5.7.0" + "@typescript-eslint/scope-manager" "5.9.1" + "@typescript-eslint/types" "5.9.1" + "@typescript-eslint/typescript-estree" "5.9.1" eslint-scope "^5.1.1" eslint-utils "^3.0.0" -"@typescript-eslint/parser@^5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.7.0.tgz#4dca6de463d86f02d252e681136a67888ea3b181" - integrity sha512-m/gWCCcS4jXw6vkrPQ1BjZ1vomP01PArgzvauBqzsoZ3urLbsRChexB8/YV8z9HwE3qlJM35FxfKZ1nfP/4x8g== +"@typescript-eslint/parser@^5.9.1": + version "5.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-5.9.1.tgz#b114011010a87e17b3265ca715e16c76a9834cef" + integrity sha512-PLYO0AmwD6s6n0ZQB5kqPgfvh73p0+VqopQQLuNfi7Lm0EpfKyDalchpVwkE+81k5HeiRrTV/9w1aNHzjD7C4g== dependencies: - "@typescript-eslint/scope-manager" "5.7.0" - "@typescript-eslint/types" "5.7.0" - "@typescript-eslint/typescript-estree" "5.7.0" + "@typescript-eslint/scope-manager" "5.9.1" + "@typescript-eslint/types" "5.9.1" + "@typescript-eslint/typescript-estree" "5.9.1" debug "^4.3.2" "@typescript-eslint/scope-manager@5.3.0": @@ -3201,23 +3202,32 @@ "@typescript-eslint/types" "5.3.0" "@typescript-eslint/visitor-keys" "5.3.0" -"@typescript-eslint/scope-manager@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.7.0.tgz#70adf960e5a58994ad50438ba60d98ecadd79452" - integrity sha512-7mxR520DGq5F7sSSgM0HSSMJ+TFUymOeFRMfUfGFAVBv8BR+Jv1vHgAouYUvWRZeszVBJlLcc9fDdktxb5kmxA== +"@typescript-eslint/scope-manager@5.9.1": + version "5.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.9.1.tgz#6c27be89f1a9409f284d95dfa08ee3400166fe69" + integrity sha512-8BwvWkho3B/UOtzRyW07ffJXPaLSUKFBjpq8aqsRvu6HdEuzCY57+ffT7QoV4QXJXWSU1+7g3wE4AlgImmQ9pQ== + dependencies: + "@typescript-eslint/types" "5.9.1" + "@typescript-eslint/visitor-keys" "5.9.1" + +"@typescript-eslint/type-utils@5.9.1": + version "5.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.9.1.tgz#c6832ffe655b9b1fec642d36db1a262d721193de" + integrity sha512-tRSpdBnPRssjlUh35rE9ug5HrUvaB9ntREy7gPXXKwmIx61TNN7+l5YKgi1hMKxo5NvqZCfYhA5FvyuJG6X6vg== dependencies: - "@typescript-eslint/types" "5.7.0" - "@typescript-eslint/visitor-keys" "5.7.0" + "@typescript-eslint/experimental-utils" "5.9.1" + debug "^4.3.2" + tsutils "^3.21.0" "@typescript-eslint/types@5.3.0": version "5.3.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.3.0.tgz#af29fd53867c2df0028c57c36a655bd7e9e05416" integrity sha512-fce5pG41/w8O6ahQEhXmMV+xuh4+GayzqEogN24EK+vECA3I6pUwKuLi5QbXO721EMitpQne5VKXofPonYlAQg== -"@typescript-eslint/types@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.7.0.tgz#2d4cae0105ba7d08bffa69698197a762483ebcbe" - integrity sha512-5AeYIF5p2kAneIpnLFve8g50VyAjq7udM7ApZZ9JYjdPjkz0LvODfuSHIDUVnIuUoxafoWzpFyU7Sqbxgi79mA== +"@typescript-eslint/types@5.9.1": + version "5.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.9.1.tgz#1bef8f238a2fb32ebc6ff6d75020d9f47a1593c6" + integrity sha512-SsWegWudWpkZCwwYcKoDwuAjoZXnM1y2EbEerTHho19Hmm+bQ56QG4L4jrtCu0bI5STaRTvRTZmjprWlTw/5NQ== "@typescript-eslint/typescript-estree@5.3.0": version "5.3.0" @@ -3232,13 +3242,13 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/typescript-estree@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.7.0.tgz#968fad899050ccce4f08a40cd5fabc0798525006" - integrity sha512-aO1Ql+izMrTnPj5aFFlEJkpD4jRqC4Gwhygu2oHK2wfVQpmOPbyDSveJ+r/NQo+PWV43M6uEAeLVbTi09dFLhg== +"@typescript-eslint/typescript-estree@5.9.1": + version "5.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.9.1.tgz#d5b996f49476495070d2b8dd354861cf33c005d6" + integrity sha512-gL1sP6A/KG0HwrahVXI9fZyeVTxEYV//6PmcOn1tD0rw8VhUWYeZeuWHwwhnewnvEMcHjhnJLOBhA9rK4vmb8A== dependencies: - "@typescript-eslint/types" "5.7.0" - "@typescript-eslint/visitor-keys" "5.7.0" + "@typescript-eslint/types" "5.9.1" + "@typescript-eslint/visitor-keys" "5.9.1" debug "^4.3.2" globby "^11.0.4" is-glob "^4.0.3" @@ -3253,12 +3263,12 @@ "@typescript-eslint/types" "5.3.0" eslint-visitor-keys "^3.0.0" -"@typescript-eslint/visitor-keys@5.7.0": - version "5.7.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.7.0.tgz#e05164239eb7cb8aa9fa06c516ede480ce260178" - integrity sha512-hdohahZ4lTFcglZSJ3DGdzxQHBSxsLVqHzkiOmKi7xVAWC4y2c1bIMKmPJSrA4aOEoRUPOKQ87Y/taC7yVHpFg== +"@typescript-eslint/visitor-keys@5.9.1": + version "5.9.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.9.1.tgz#f52206f38128dd4f675cf28070a41596eee985b7" + integrity sha512-Xh37pNz9e9ryW4TVdwiFzmr4hloty8cFj8GTWMXh3Z8swGwyQWeCcNgF0hm6t09iZd6eiZmIf4zHedQVP6TVtg== dependencies: - "@typescript-eslint/types" "5.7.0" + "@typescript-eslint/types" "5.9.1" eslint-visitor-keys "^3.0.0" "@webassemblyjs/ast@1.11.1": @@ -3472,6 +3482,11 @@ acorn@^8.6.0: resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.6.0.tgz#e3692ba0eb1a0c83eaa4f37f5fa7368dd7142895" integrity sha512-U1riIR+lBSNi3IbxtaHOIKdH8sLFv3NYfNv8sg7ZsNhcfl4HF2++BfqqrNAxoCLQW1iiylOj76ecnaUxz+z9yw== +acorn@^8.7.0: + version "8.7.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.7.0.tgz#90951fde0f8f09df93549481e5fc141445b791cf" + integrity sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ== + add-stream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/add-stream/-/add-stream-1.0.0.tgz#6a7990437ca736d5e1288db92bd3266d5f5cb2aa" @@ -6672,50 +6687,48 @@ eslint-import-resolver-node@^0.3.6: debug "^3.2.7" resolve "^1.20.0" -eslint-module-utils@^2.7.1: - version "2.7.1" - resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.1.tgz#b435001c9f8dd4ab7f6d0efcae4b9696d4c24b7c" - integrity sha512-fjoetBXQZq2tSTWZ9yWVl2KuFrTZZH3V+9iD1V1RfpDgxzJR+mPd/KZmMiA8gbPqdBzpNiEHOuT7IYEWxrH0zQ== +eslint-module-utils@^2.7.2: + version "2.7.2" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.7.2.tgz#1d0aa455dcf41052339b63cada8ab5fd57577129" + integrity sha512-zquepFnWCY2ISMFwD/DqzaM++H+7PDzOpUvotJWm/y1BAFt5R4oeULgdrTejKqLkz7MA/tgstsUMNYc7wNdTrg== dependencies: debug "^3.2.7" find-up "^2.1.0" - pkg-dir "^2.0.0" eslint-plugin-angular@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/eslint-plugin-angular/-/eslint-plugin-angular-4.1.0.tgz#53d03d829edff50d517e81f862782e3efa591953" integrity sha512-dacledMPxVOZA3T0xcYFuvrMCy5dHxg0ZTMWUaHqSBQef3/XLyXJ9s1LNj0NikJ/dYx6OhqlnnNpKmrJhEUB+Q== -eslint-plugin-import@^2.25.3: - version "2.25.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.3.tgz#a554b5f66e08fb4f6dc99221866e57cfff824766" - integrity sha512-RzAVbby+72IB3iOEL8clzPLzL3wpDrlwjsTBAQXgyp5SeTqqY+0bFubwuo+y/HLhNZcXV4XqTBO4LGsfyHIDXg== +eslint-plugin-import@^2.25.4: + version "2.25.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.25.4.tgz#322f3f916a4e9e991ac7af32032c25ce313209f1" + integrity sha512-/KJBASVFxpu0xg1kIBn9AUa8hQVnszpwgE7Ld0lKAlx7Ie87yzEzCgSkekt+le/YVhiaosO4Y14GDAOc41nfxA== dependencies: array-includes "^3.1.4" array.prototype.flat "^1.2.5" debug "^2.6.9" doctrine "^2.1.0" eslint-import-resolver-node "^0.3.6" - eslint-module-utils "^2.7.1" + eslint-module-utils "^2.7.2" has "^1.0.3" is-core-module "^2.8.0" is-glob "^4.0.3" minimatch "^3.0.4" object.values "^1.1.5" resolve "^1.20.0" - tsconfig-paths "^3.11.0" + tsconfig-paths "^3.12.0" -eslint-plugin-jsdoc@^37.2.2: - version "37.2.2" - resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.2.2.tgz#70b487f281ec2d8b25bf5a0a739cf3e708e393fc" - integrity sha512-ChNYa4JBfEgyx7Fuy3obZM0w1jxd1DFdkMDk9QVrLfdZubtXCVK5Lvx+GKExeCxKLU33wLnOOBoImUL2/16JWQ== +eslint-plugin-jsdoc@^37.6.1: + version "37.6.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-37.6.1.tgz#3d2a18d2535618d3f9d26c3c7eccfb15b6db20d4" + integrity sha512-Y9UhH9BQD40A9P1NOxj59KrSLZb9qzsqYkLCZv30bNeJ7C9eaumTWhh9beiGqvK7m821Hj1dTsZ5LOaFIUTeTg== dependencies: - "@es-joy/jsdoccomment" "0.13.0" + "@es-joy/jsdoccomment" "~0.17.0" comment-parser "1.3.0" debug "^4.3.3" escape-string-regexp "^4.0.0" esquery "^1.4.0" - jsdoc-type-pratt-parser "^2.0.0" regextras "^0.8.0" semver "^7.3.5" spdx-expression-parse "^3.0.1" @@ -6765,10 +6778,10 @@ eslint-visitor-keys@^3.1.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.1.0.tgz#eee4acea891814cda67a7d8812d9647dd0179af2" integrity sha512-yWJFpu4DtjsWKkt5GeNBBuZMlNcYVs6vRCLoCVEJrTjaSB6LC98gFipNK/erM2Heg/E8mIK+hXG/pJMLK+eRZA== -eslint@^8.4.1: - version "8.4.1" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.4.1.tgz#d6531bbf3e598dffd7c0c7d35ec52a0b30fdfa2d" - integrity sha512-TxU/p7LB1KxQ6+7aztTnO7K0i+h0tDi81YRY9VzB6Id71kNz+fFYnf5HD5UOQmxkzcoa0TlVZf9dpMtUv0GpWg== +eslint@^8.6.0: + version "8.6.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.6.0.tgz#4318c6a31c5584838c1a2e940c478190f58d558e" + integrity sha512-UvxdOJ7mXFlw7iuHZA4jmzPaUqIw54mZrv+XPYKNbKdLR0et4rf60lIZUU9kiNtnzzMzGWxMV+tQ7uG7JG8DPw== dependencies: "@eslint/eslintrc" "^1.0.5" "@humanwhocodes/config-array" "^0.9.2" @@ -6782,7 +6795,7 @@ eslint@^8.4.1: eslint-scope "^7.1.0" eslint-utils "^3.0.0" eslint-visitor-keys "^3.1.0" - espree "^9.2.0" + espree "^9.3.0" esquery "^1.4.0" esutils "^2.0.2" fast-deep-equal "^3.1.3" @@ -6818,6 +6831,15 @@ espree@^9.2.0: acorn-jsx "^5.3.1" eslint-visitor-keys "^3.1.0" +espree@^9.3.0: + version "9.3.0" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.3.0.tgz#c1240d79183b72aaee6ccfa5a90bc9111df085a8" + integrity sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ== + dependencies: + acorn "^8.7.0" + acorn-jsx "^5.3.1" + eslint-visitor-keys "^3.1.0" + esprima@^4.0.0, esprima@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" @@ -8563,10 +8585,10 @@ jsbn@~0.1.0: resolved "https://registry.yarnpkg.com/jsbn/-/jsbn-0.1.1.tgz#a5e654c2e5a2deb5f201d96cefbca80c0ef2f513" integrity sha1-peZUwuWi3rXyAdls77yoDA7y9RM= -jsdoc-type-pratt-parser@2.0.0, jsdoc-type-pratt-parser@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-2.0.0.tgz#ec739a0868922515fcb179852e990e89b52b9044" - integrity sha512-sUuj2j48wxrEpbFjDp1sAesAxPiLT+z0SWVmMafyIINs6Lj5gIPKh3VrkBZu4E/Dv+wHpOot0m6H8zlHQjwqeQ== +jsdoc-type-pratt-parser@~2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/jsdoc-type-pratt-parser/-/jsdoc-type-pratt-parser-2.2.1.tgz#08c6d1740a9e468ac6993985ae1d0d6981c50537" + integrity sha512-rkbaDZw3IPwd/ZPXob4XqQwVDKN/qeC2Dd7jL8EEGLEHLRmkPJgGAPw6OIIVmnwJrdcDh3vMR83/fc7lR5YpqA== jsesc@^1.3.0: version "1.3.0" @@ -10308,13 +10330,6 @@ piscina@3.1.0: optionalDependencies: nice-napi "^1.0.2" -pkg-dir@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-2.0.0.tgz#f6d5d1109e19d63edf428e0bd57e12777615334b" - integrity sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s= - dependencies: - find-up "^2.1.0" - pkg-dir@^4.1.0: version "4.2.0" resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-4.2.0.tgz#f099133df7ede422e81d1d8448270eeb3e4261f3" @@ -12552,10 +12567,10 @@ ts-node@^10.4.0: make-error "^1.1.1" yn "3.1.1" -tsconfig-paths@^3.11.0: - version "3.11.0" - resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.11.0.tgz#954c1fe973da6339c78e06b03ce2e48810b65f36" - integrity sha512-7ecdYDnIdmv639mmDwslG6KQg1Z9STTz1j7Gcz0xa+nshh/gKDAHcPxRbWOsA3SPp0tXP2leTcY9Kw+NAkfZzA== +tsconfig-paths@^3.12.0: + version "3.12.0" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.12.0.tgz#19769aca6ee8f6a1a341e38c8fa45dd9fb18899b" + integrity sha512-e5adrnOYT6zqVnWqZu7i/BQ3BnhzvGbjEjejFXO20lKIKpwTaupkCPgEfv4GZK1IBciJUEhYs3J3p75FdaTFVg== dependencies: "@types/json5" "^0.0.29" json5 "^1.0.1" From ea7298062ac7ad1367868168be0a878e1aaa2d93 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 14:04:20 +0000 Subject: [PATCH 016/148] build(deps): bump @kolkov/ngx-gallery from 1.2.3 to 2.0.0 Bumps [@kolkov/ngx-gallery](https://github.com/kolkov/ngx-gallery) from 1.2.3 to 2.0.0. - [Release notes](https://github.com/kolkov/ngx-gallery/releases) - [Changelog](https://github.com/kolkov/ngx-gallery/blob/master/CHANGELOG.md) - [Commits](https://github.com/kolkov/ngx-gallery/compare/v1.2.3...v2.0.0) --- updated-dependencies: - dependency-name: "@kolkov/ngx-gallery" dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 99b8382f6d..882a714839 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@fortawesome/angular-fontawesome": "^0.10.1", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-solid-svg-icons": "^5.15.4", - "@kolkov/ngx-gallery": "^1.2.3", + "@kolkov/ngx-gallery": "^2.0.0", "@ng-bootstrap/ng-bootstrap": "^11.0.0", "bootstrap": "^4.6.1", "codemirror": "^5.65.0", diff --git a/yarn.lock b/yarn.lock index 00e3ea0af0..f3020e07bf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2601,10 +2601,12 @@ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-1.0.0.tgz#3fdf5798f0b49e90155896f6291df186eac06c83" integrity sha512-9oLAnygRMi8Q5QkYEU4XWK04B+nuoXoxjRvRxgjuChkLZFBja0YPSgdZ7dZtwhncLBcQe/I/E+fLuk5qxcYVJA== -"@kolkov/ngx-gallery@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@kolkov/ngx-gallery/-/ngx-gallery-1.2.3.tgz#bb15d4b64a5c03905677aa4ca741835aabe41f43" - integrity sha512-Dpnhwq3DGPSXrNt65gexo+/Smb2L0bne14A0WONN04+racETtcY33fqFvNWfRw5Nvk2Eza+sq95eEA0NbgF/6g== +"@kolkov/ngx-gallery@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@kolkov/ngx-gallery/-/ngx-gallery-2.0.0.tgz#be6840467345733b2bcb6d1ea4e64a845bd201f3" + integrity sha512-0zwZIVZXgc61urkI5r7h7BftDQ1wtrFevljgyZGFgIJYu6NpfUiH7tGrMzSQyl0bJf0sWq+A7Z7acCJH9FArZw== + dependencies: + tslib "^2.3.0" "@ng-bootstrap/ng-bootstrap@^11.0.0": version "11.0.0" From 953cd6a82955db7e5f48712950f87fd6d5870895 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 17:42:41 +0000 Subject: [PATCH 017/148] build(deps-dev): bump karma from 6.3.9 to 6.3.11 Bumps [karma](https://github.com/karma-runner/karma) from 6.3.9 to 6.3.11. - [Release notes](https://github.com/karma-runner/karma/releases) - [Changelog](https://github.com/karma-runner/karma/blob/master/CHANGELOG.md) - [Commits](https://github.com/karma-runner/karma/compare/v6.3.9...v6.3.11) --- updated-dependencies: - dependency-name: karma dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 19 +++++++------------ 2 files changed, 8 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index 882a714839..807b2b0906 100644 --- a/package.json +++ b/package.json @@ -138,7 +138,7 @@ "gzipper": "^6.2.1", "husky": "^7.0.4", "jasmine-core": "~3.10.1", - "karma": "~6.3.9", + "karma": "~6.3.11", "karma-chrome-launcher": "~3.1.0", "karma-coverage": "^2.1.0", "karma-jasmine": "~4.0.1", diff --git a/yarn.lock b/yarn.lock index f3020e07bf..ec4d1341d7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5229,7 +5229,7 @@ colorette@^2.0.10, colorette@^2.0.16: resolved "https://registry.yarnpkg.com/colorette/-/colorette-2.0.16.tgz#713b9af84fdb000139f04546bd4a93f62a5085da" integrity sha512-hUewv7oMjCp+wkBv5Rm0v87eJhq4woh5rSR+42YSQJKecCqgIqNkZ6lAlQms/BwHPJA5NKMRlpxPRv0n8HQW6g== -colors@1.4.0, colors@^1.4.0: +colors@1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78" integrity sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA== @@ -7637,16 +7637,11 @@ globby@^6.1.0: pify "^2.0.0" pinkie-promise "^2.0.0" -graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.6: +graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.4, graceful-fs@^4.2.6: version "4.2.8" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.8.tgz#e412b8d33f5e006593cbd3cee6df9f2cebbe802a" integrity sha512-qkIilPUYcNhJpd33n0GBXTB1MMPp14TxEsEs0pTrsSVucApsYzW5V+Q8Qxhik6KU3evy+qkAAowTByymK0avdg== -graceful-fs@^4.2.4: - version "4.2.6" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" - integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== - gzip-size@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/gzip-size/-/gzip-size-6.0.0.tgz#065367fd50c239c0671cbcbad5be3e2eeb10e462" @@ -8762,15 +8757,15 @@ karma-source-map-support@1.4.0: dependencies: source-map-support "^0.5.5" -karma@~6.3.9: - version "6.3.9" - resolved "https://registry.yarnpkg.com/karma/-/karma-6.3.9.tgz#cc309607f0fcdb58a88643184f3e4ba8bff26751" - integrity sha512-E/MqdLM9uVIhfuyVnrhlGBu4miafBdXEAEqCmwdEMh3n17C7UWC/8Kvm3AYKr91gc7scutekZ0xv6rxRaUCtnw== +karma@~6.3.11: + version "6.3.11" + resolved "https://registry.yarnpkg.com/karma/-/karma-6.3.11.tgz#2c2fb09f1a9f52e1a0739adeedace2a68d4c0d34" + integrity sha512-QGUh4yXgizzDNPLB5nWTvP+wysKexngbyLVWFOyikB661hpa2RZLf5anZQzqliWtAQuYVep0ot0D1U7UQKpsxQ== dependencies: body-parser "^1.19.0" braces "^3.0.2" chokidar "^3.5.1" - colors "^1.4.0" + colors "1.4.0" connect "^3.7.0" di "^0.0.1" dom-serialize "^2.2.1" From ea412284b1556bfb142ef251e61314fdc906fddc Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 17 Jan 2022 18:29:02 +0000 Subject: [PATCH 018/148] build(deps-dev): bump gzipper from 6.2.1 to 7.0.0 Bumps [gzipper](https://github.com/gios/gzipper) from 6.2.1 to 7.0.0. - [Release notes](https://github.com/gios/gzipper/releases) - [Changelog](https://github.com/gios/gzipper/blob/master/CHANGELOG.md) - [Commits](https://github.com/gios/gzipper/compare/v6.2.1...v7.0.0) --- updated-dependencies: - dependency-name: gzipper dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- package.json | 2 +- yarn.lock | 156 +++++++-------------------------------------------- 2 files changed, 20 insertions(+), 138 deletions(-) diff --git a/package.json b/package.json index 807b2b0906..46c5e184a2 100644 --- a/package.json +++ b/package.json @@ -135,7 +135,7 @@ "eslint-plugin-import": "^2.25.4", "eslint-plugin-jsdoc": "^37.6.1", "eslint-plugin-prettier": "^4.0.0", - "gzipper": "^6.2.1", + "gzipper": "^7.0.0", "husky": "^7.0.4", "jasmine-core": "~3.10.1", "karma": "~6.3.11", diff --git a/yarn.lock b/yarn.lock index ec4d1341d7..77e846fb60 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2561,6 +2561,13 @@ resolved "https://registry.yarnpkg.com/@gar/promisify/-/promisify-1.1.2.tgz#30aa825f11d438671d585bd44e7fd564535fc210" integrity sha512-82cpyJyKRoQoRi+14ibCeGPu0CwypgtBAdBhq1WfvagpCZNKqwXbKwXllYSMG91DhmG4jt9gN8eP6lGOtozuaw== +"@gfx/zopfli@^1.0.15": + version "1.0.15" + resolved "https://registry.yarnpkg.com/@gfx/zopfli/-/zopfli-1.0.15.tgz#00720b4f6a4d5ceeb585a5d6dd672b48bd4fc755" + integrity sha512-7mBgpi7UD82fsff5ThQKet0uBTl4BYerQuc+/qA1ELTwWEiIedRTcD3JgiUu9wwZ2kytW8JOb165rSdAt8PfcQ== + dependencies: + base64-js "^1.3.0" + "@humanwhocodes/config-array@^0.9.2": version "0.9.2" resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.9.2.tgz#68be55c737023009dfc5fe245d51181bb6476914" @@ -4717,7 +4724,7 @@ binary-extensions@^2.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d" integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA== -bl@^4.0.3, bl@^4.1.0: +bl@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/bl/-/bl-4.1.0.tgz#451535264182bec2fbbc83a62ab98cf11d9f7b3a" integrity sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w== @@ -5246,7 +5253,7 @@ commander@^2.18.0, commander@^2.20.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== -commander@^3.0.0, commander@^3.0.0-0: +commander@^3.0.0-0: version "3.0.2" resolved "https://registry.yarnpkg.com/commander/-/commander-3.0.2.tgz#6837c3fb677ad9933d1cfba42dd14d5117d6b39e" integrity sha512-Gar0ASD4BDyKC4hl4DwHqDrmvjoxWKZigVnAbn5H1owvm4CxCPdb0HQDehwNYMJpla5+M2tPmPARzhtYuwpHow== @@ -5946,13 +5953,6 @@ decode-uri-component@^0.2.0: resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" integrity sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU= -decompress-response@^4.2.0: - version "4.2.1" - resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-4.2.1.tgz#414023cc7a302da25ce2ec82d0d5238ccafd8986" - integrity sha512-jOSne2qbyE+/r8G1VU+G/82LBs2Fs4LAsTiLSHOCOMZQl2OKZ6i8i4IyHemTe+/yIXOtTcRQMzPcgyhoFlqPkw== - dependencies: - mimic-response "^2.0.0" - deep-equal@^1.0.0, deep-equal@^1.0.1: version "1.1.1" resolved "https://registry.yarnpkg.com/deep-equal/-/deep-equal-1.1.1.tgz#b5c98c942ceffaf7cb051e24e1434a25a2e6076a" @@ -6078,7 +6078,7 @@ detect-indent@^6.0.0: resolved "https://registry.yarnpkg.com/detect-indent/-/detect-indent-6.1.0.tgz#592485ebbbf6b3b1ab2be175c8393d04ca0d57e6" integrity sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA== -detect-libc@^1.0.2, detect-libc@^1.0.3: +detect-libc@^1.0.2: version "1.0.3" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= @@ -6303,7 +6303,7 @@ encoding@^0.1.12: dependencies: iconv-lite "^0.6.2" -end-of-stream@^1.0.0, end-of-stream@^1.1.0, end-of-stream@^1.4.1: +end-of-stream@^1.0.0, end-of-stream@^1.1.0: version "1.4.4" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0" integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q== @@ -6982,11 +6982,6 @@ exit@^0.1.2: resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" integrity sha1-BjJjj42HfMghB9MKD/8aF8uhzQw= -expand-template@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c" - integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg== - express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" @@ -7309,11 +7304,6 @@ fs-access@^1.0.1: dependencies: null-check "^1.0.0" -fs-constants@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/fs-constants/-/fs-constants-1.0.0.tgz#6be0de9be998ce16af8afc24497b9ee9b7ccd9ad" - integrity sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow== - fs-extra@^10.0.0: version "10.0.0" resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.0.0.tgz#9ff61b655dde53fb34a82df84bb214ce802e17c1" @@ -7542,11 +7532,6 @@ gitconfiglocal@^1.0.0: dependencies: ini "^1.3.2" -github-from-package@0.0.0: - version "0.0.0" - resolved "https://registry.yarnpkg.com/github-from-package/-/github-from-package-0.0.0.tgz#97fb5d96bfde8973313f20e8288ef9a167fa64ce" - integrity sha1-l/tdlr/eiXMxPyDoKI75oWf6ZM4= - glob-parent@^5.1.2, glob-parent@~5.1.2: version "5.1.2" resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4" @@ -7649,14 +7634,14 @@ gzip-size@^6.0.0: dependencies: duplexer "^0.1.2" -gzipper@^6.2.1: - version "6.2.1" - resolved "https://registry.yarnpkg.com/gzipper/-/gzipper-6.2.1.tgz#2fe460fd674f7885bea448102d17be8d8ba1c4a5" - integrity sha512-HGCFv3hZy87B+AHRuDpbyRbvOdaJllyGB+OTqDqKy54e8M1RDgF64QN/buyqpqhvSXWePNIE0jqbHpcjCWG6YQ== +gzipper@^7.0.0: + version "7.0.0" + resolved "https://registry.yarnpkg.com/gzipper/-/gzipper-7.0.0.tgz#2a612b8ea265412b321ccf3f7f1760967aa7db8a" + integrity sha512-Pfr8FXg4JOQ9hwWWS+d5KDOokRlfjkuNuK7HVJsiXwQhYTugKMHXAnAeEuKr5ILtxX0cAzJBtR6g3Wclze8+LA== dependencies: + "@gfx/zopfli" "^1.0.15" commander "^7.2.0" deep-equal "^2.0.5" - node-zopfli "^2.1.4" simple-zstd "^1.4.0" uuid "^8.3.2" @@ -9251,11 +9236,6 @@ mimic-fn@^2.1.0: resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== -mimic-response@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-2.1.0.tgz#d13763d35f613d09ec37ebb30bac0469c0ee8f43" - integrity sha512-wXqjST+SLt7R009ySCglWBCFpjUygmCIfD790/kVbiGmUgfYGuB14PiTd5DwVxSV4NcYHjzMkoj5LjQZwTQLEA== - min-indent@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/min-indent/-/min-indent-1.0.1.tgz#a63f681673b30571fbe8bc25686ae746eefa9869" @@ -9289,7 +9269,7 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" -minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.3, minimist@^1.2.5: +minimist@^1.1.3, minimist@^1.2.0, minimist@^1.2.5: version "1.2.5" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602" integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw== @@ -9371,11 +9351,6 @@ minizlib@^2.0.0, minizlib@^2.1.1: minipass "^3.0.0" yallist "^4.0.0" -mkdirp-classic@^0.5.2, mkdirp-classic@^0.5.3: - version "0.5.3" - resolved "https://registry.yarnpkg.com/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz#fa10c9115cc6d8865be221ba47ee9bed78601113" - integrity sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A== - "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdirp@^0.5.5: version "0.5.5" resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def" @@ -9486,11 +9461,6 @@ nanoid@^3.1.30: resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== -napi-build-utils@^1.0.1: - version "1.0.2" - resolved "https://registry.yarnpkg.com/napi-build-utils/-/napi-build-utils-1.0.2.tgz#b1fddc0b2c46e380a0b7a76f984dd47c41a13806" - integrity sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg== - natural-compare@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7" @@ -9542,18 +9512,6 @@ nice-napi@^1.0.2: node-addon-api "^3.0.0" node-gyp-build "^4.2.2" -node-abi@^2.7.0: - version "2.30.1" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-2.30.1.tgz#c437d4b1fe0e285aaf290d45b45d4d7afedac4cf" - integrity sha512-/2D0wOQPgaUWzVSVgRMx+trKJRC2UG4SUc4oCJoXx9Uxjtp0Vy3/kt7zcbxHF8+Z/pK3UloLWzBISg72brfy1w== - dependencies: - semver "^5.4.1" - -node-addon-api@^1.7.2: - version "1.7.2" - resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-1.7.2.tgz#3df30b95720b53c24e59948b49532b662444f54d" - integrity sha512-ibPK3iA+vaY1eEjESkQkM0BbCqFOaZMiXRTtdB0u7b4djtY6JnsjvPdUHVMg6xQt3B8fpTTWHI9A+ADjM9frzg== - node-addon-api@^3.0.0: version "3.2.1" resolved "https://registry.yarnpkg.com/node-addon-api/-/node-addon-api-3.2.1.tgz#81325e0a2117789c0128dab65e7e38f07ceba161" @@ -9646,21 +9604,6 @@ node-releases@^2.0.1: resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.1.tgz#3d1d395f204f1f2f29a54358b9fb678765ad2fc5" integrity sha512-CqyzN6z7Q6aMeF/ktcMVTzhAHCEpf8SOarwpzpf8pNBY2k5/oM34UHldUwp8VKI7uxct2HxSRdJjBaZeESzcxA== -node-zopfli@^2.1.4: - version "2.1.4" - resolved "https://registry.yarnpkg.com/node-zopfli/-/node-zopfli-2.1.4.tgz#fb7f43ce622251ba11451b3e4dac5318d2e5bd61" - integrity sha512-5kxbPxNQHbORFBNNf083V7h0dTFy6+C1W4ZA4qTXjpCQqEMzxAQFAOfi6BlCmXAkC/+Vr8d6h0XOmdjvp+9FNw== - dependencies: - commander "^3.0.0" - defaults "^1.0.3" - node-addon-api "^1.7.2" - prebuild-install "^5.3.5" - -noop-logger@^0.1.1: - version "0.1.1" - resolved "https://registry.yarnpkg.com/noop-logger/-/noop-logger-0.1.1.tgz#94a2b1633c4f1317553007d8966fd0e841b6a4c2" - integrity sha1-lKKxYzxPExdVMAfYlm/Q6EG2pMI= - "nopt@2 || 3": version "3.0.6" resolved "https://registry.yarnpkg.com/nopt/-/nopt-3.0.6.tgz#c6465dbf08abcd4db359317f79ac68a646b28ff9" @@ -9789,7 +9732,7 @@ npm-run-path@^4.0.0, npm-run-path@^4.0.1: dependencies: path-key "^3.0.0" -"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.1, npmlog@^4.0.2: +"npmlog@0 || 1 || 2 || 3 || 4", npmlog@^4.0.2: version "4.1.2" resolved "https://registry.yarnpkg.com/npmlog/-/npmlog-4.1.2.tgz#08a7f2a8bf734604779a9efa4ad5cc717abb954b" integrity sha512-2uUqazuKlTaSI/dC8AzicUck7+IrEaOnN/e0jd3Xtt1KcGpwx30v50mL7oPyr/h9bL3E4aZccVwpwP+5W9Vjkg== @@ -10732,27 +10675,6 @@ postcss@^8.3.7: picocolors "^1.0.0" source-map-js "^0.6.2" -prebuild-install@^5.3.5: - version "5.3.6" - resolved "https://registry.yarnpkg.com/prebuild-install/-/prebuild-install-5.3.6.tgz#7c225568d864c71d89d07f8796042733a3f54291" - integrity sha512-s8Aai8++QQGi4sSbs/M1Qku62PFK49Jm1CbgXklGz4nmHveDq0wzJkg7Na5QbnO1uNH8K7iqx2EQ/mV0MZEmOg== - dependencies: - detect-libc "^1.0.3" - expand-template "^2.0.3" - github-from-package "0.0.0" - minimist "^1.2.3" - mkdirp-classic "^0.5.3" - napi-build-utils "^1.0.1" - node-abi "^2.7.0" - noop-logger "^0.1.1" - npmlog "^4.0.1" - pump "^3.0.0" - rc "^1.2.7" - simple-get "^3.0.3" - tar-fs "^2.0.0" - tunnel-agent "^0.6.0" - which-pm-runs "^1.0.0" - prelude-ls@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" @@ -11028,7 +10950,7 @@ read-pkg@^5.2.0: parse-json "^5.0.0" type-fest "^0.6.0" -readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0, readable-stream@^3.6.0: +readable-stream@3, readable-stream@^3.0.0, readable-stream@^3.0.2, readable-stream@^3.0.6, readable-stream@^3.4.0, readable-stream@^3.6.0: version "3.6.0" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.6.0.tgz#337bbda3adc0706bd3e024426a286d4b4b2c9198" integrity sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA== @@ -11629,20 +11551,6 @@ signal-exit@^3.0.0, signal-exit@^3.0.2, signal-exit@^3.0.3: resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.5.tgz#9e3e8cc0c75a99472b44321033a7702e7738252f" integrity sha512-KWcOiKeQj6ZyXx7zq4YxSMgHRlod4czeBQZrPb8OKcohcqAXShm7E20kEMle9WBt26hFcAf0qLOcp5zmY7kOqQ== -simple-concat@^1.0.0: - version "1.0.1" - resolved "https://registry.yarnpkg.com/simple-concat/-/simple-concat-1.0.1.tgz#f46976082ba35c2263f1c8ab5edfe26c41c9552f" - integrity sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q== - -simple-get@^3.0.3: - version "3.1.0" - resolved "https://registry.yarnpkg.com/simple-get/-/simple-get-3.1.0.tgz#b45be062435e50d159540b576202ceec40b9c6b3" - integrity sha512-bCR6cP+aTdScaQCnQKbPKtJOKDp/hj9EDLJo3Nw4y1QksqaovlW/bnptB6/c1e+qmNIDHRK+oXFDdEqBT8WzUA== - dependencies: - decompress-response "^4.2.0" - once "^1.3.1" - simple-concat "^1.0.0" - simple-zstd@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/simple-zstd/-/simple-zstd-1.4.0.tgz#b8fba1b1b41aa43183263f4c960a9c63899d4cb6" @@ -12274,16 +12182,6 @@ tapable@^2.1.1, tapable@^2.2.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.0.tgz#5c373d281d9c672848213d0e037d1c4165ab426b" integrity sha512-FBk4IesMV1rBxX2tfiK8RAmogtWn53puLOQlvO8XuwlgxcYbP4mVPS9Ph4aeamSyyVjOl24aYWAuc8U5kCVwMw== -tar-fs@^2.0.0: - version "2.1.1" - resolved "https://registry.yarnpkg.com/tar-fs/-/tar-fs-2.1.1.tgz#489a15ab85f1f0befabb370b7de4f9eb5cbe8784" - integrity sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng== - dependencies: - chownr "^1.1.1" - mkdirp-classic "^0.5.2" - pump "^3.0.0" - tar-stream "^2.1.4" - tar-pack@^3.4.0: version "3.4.1" resolved "https://registry.yarnpkg.com/tar-pack/-/tar-pack-3.4.1.tgz#e1dbc03a9b9d3ba07e896ad027317eb679a10a1f" @@ -12298,17 +12196,6 @@ tar-pack@^3.4.0: tar "^2.2.1" uid-number "^0.0.6" -tar-stream@^2.1.4: - version "2.2.0" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.2.0.tgz#acad84c284136b060dc3faa64474aa9aebd77287" - integrity sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ== - dependencies: - bl "^4.0.3" - end-of-stream "^1.4.1" - fs-constants "^1.0.0" - inherits "^2.0.3" - readable-stream "^3.1.1" - tar@^2.0.0, tar@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/tar/-/tar-2.2.2.tgz#0ca8848562c7299b8b446ff6a4d60cdbb23edc40" @@ -13041,11 +12928,6 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which-pm-runs@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb" - integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs= - which-typed-array@^1.1.2: version "1.1.4" resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.4.tgz#8fcb7d3ee5adf2d771066fba7cf37e32fe8711ff" From e02265b15b0268d218b5be4440f62380743baf65 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 22 Jan 2022 08:51:50 +0000 Subject: [PATCH 019/148] build(deps): bump nanoid from 3.1.23 to 3.2.0 Bumps [nanoid](https://github.com/ai/nanoid) from 3.1.23 to 3.2.0. - [Release notes](https://github.com/ai/nanoid/releases) - [Changelog](https://github.com/ai/nanoid/blob/main/CHANGELOG.md) - [Commits](https://github.com/ai/nanoid/compare/3.1.23...3.2.0) --- updated-dependencies: - dependency-name: nanoid dependency-type: indirect ... Signed-off-by: dependabot[bot] --- yarn.lock | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/yarn.lock b/yarn.lock index 7acd87fcff..ed8936f8d2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8771,15 +8771,10 @@ nan@~2.7.0: resolved "https://registry.yarnpkg.com/nan/-/nan-2.7.0.tgz#d95bf721ec877e08db276ed3fc6eb78f9083ad46" integrity sha1-2Vv3IeyHfgjbJ27T/G63j5CDrUY= -nanoid@^3.1.23: - version "3.1.23" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.23.tgz#f744086ce7c2bc47ee0a8472574d5c78e4183a81" - integrity sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw== - -nanoid@^3.1.30: - version "3.1.30" - resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.1.30.tgz#63f93cc548d2a113dc5dfbc63bfa09e2b9b64362" - integrity sha512-zJpuPDwOv8D2zq2WRoMe1HsfZthVewpel9CAvTfc/2mBD1uUT/agc5f7GHGWXlYkFvi1mVxe4IjvP2HNrop7nQ== +nanoid@^3.1.23, nanoid@^3.1.30: + version "3.2.0" + resolved "https://registry.yarnpkg.com/nanoid/-/nanoid-3.2.0.tgz#62667522da6673971cca916a6d3eff3f415ff80c" + integrity sha512-fmsZYa9lpn69Ad5eDn7FMcnnSR+8R34W9qJEijxYhTbfOWzr22n1QxCMzXLK+ODyW2973V3Fux959iQoUxzUIA== natural-compare@^1.4.0: version "1.4.0" From 67bd4462e0f9cf52e75646f15f25e4aadd35f36f Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 25 Jan 2022 17:11:46 +0100 Subject: [PATCH 020/148] build(deps): bump @angular packages from 13.1.1 to 13.1.3 --- package.json | 26 +- yarn.lock | 980 ++++++++++++++++++++++++--------------------------- 2 files changed, 476 insertions(+), 530 deletions(-) diff --git a/package.json b/package.json index 46c5e184a2..17efd1e695 100644 --- a/package.json +++ b/package.json @@ -75,16 +75,16 @@ "deploy:ci": "ng deploy --no-build --message=\"Release $npm_package_name (v$npm_package_version) on gh-pages\"" }, "dependencies": { - "@angular/animations": "~13.1.1", - "@angular/common": "~13.1.1", - "@angular/compiler": "~13.1.1", - "@angular/core": "~13.1.1", - "@angular/forms": "~13.1.1", - "@angular/localize": "~13.1.1", - "@angular/platform-browser": "~13.1.1", - "@angular/platform-browser-dynamic": "~13.1.1", - "@angular/platform-server": "~13.1.1", - "@angular/router": "~13.1.1", + "@angular/animations": "~13.1.3", + "@angular/common": "~13.1.3", + "@angular/compiler": "~13.1.3", + "@angular/core": "~13.1.3", + "@angular/forms": "~13.1.3", + "@angular/localize": "~13.1.3", + "@angular/platform-browser": "~13.1.3", + "@angular/platform-browser-dynamic": "~13.1.3", + "@angular/platform-server": "~13.1.3", + "@angular/router": "~13.1.3", "@ctrl/ngx-codemirror": "^5.1.1", "@fortawesome/angular-fontawesome": "^0.10.1", "@fortawesome/fontawesome-svg-core": "^1.2.36", @@ -110,14 +110,14 @@ "zone.js": "~0.11.4" }, "devDependencies": { - "@angular-devkit/build-angular": "~13.1.2", + "@angular-devkit/build-angular": "~13.1.4", "@angular-eslint/builder": "^13.0.1", "@angular-eslint/eslint-plugin": "^13.0.1", "@angular-eslint/eslint-plugin-template": "^13.0.1", "@angular-eslint/schematics": "^13.0.1", "@angular-eslint/template-parser": "^13.0.1", - "@angular/cli": "~13.1.2", - "@angular/compiler-cli": "~13.1.1", + "@angular/cli": "~13.1.4", + "@angular/compiler-cli": "~13.1.3", "@commitlint/cli": "^16.0.2", "@commitlint/config-angular": "^16.0.0", "@compodoc/compodoc": "^1.1.18", diff --git a/yarn.lock b/yarn.lock index 9584748a32..dd7c1222e5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -15,23 +15,23 @@ "@jridgewell/resolve-uri" "1.0.0" sourcemap-codec "1.4.8" -"@angular-devkit/architect@0.1301.2": - version "0.1301.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1301.2.tgz#a646862b7ef388e4912473c14d336dde94cfc517" - integrity sha512-v8e6OF80Ezo5MTHtFcq1AZJH+Wq+hN9pMZ1iLGkODIfKIW9zx6aPhx0JY0b7sZkfNVL8ay8JA8f339eBMnOE9A== +"@angular-devkit/architect@0.1301.4": + version "0.1301.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/architect/-/architect-0.1301.4.tgz#2fc51bcae0dcb581c8be401e2fde7bbd10b43076" + integrity sha512-p6G8CEMnE+gYwxRyEttj3QGsuNJ3Kusi7iwBIzWyf2RpJSdGzXdwUEiRGg6iS0YHFr06/ZFfAWfnM2DQvNm4TA== dependencies: - "@angular-devkit/core" "13.1.2" + "@angular-devkit/core" "13.1.4" rxjs "6.6.7" -"@angular-devkit/build-angular@~13.1.2": - version "13.1.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-13.1.2.tgz#77004c925aced5ff9993c42cc098aaf47e06ec76" - integrity sha512-0FeDqfjWJjgIU42T3136RNYb7Yv2as6Z8rAnfUlX6RjRGZf98+6ZQZ80yREgrLkm7L8G1qWJc1sn3NyVMDwf9A== +"@angular-devkit/build-angular@~13.1.4": + version "13.1.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-angular/-/build-angular-13.1.4.tgz#942023fca240b0f5753dcf65bb67e57e4779bf86" + integrity sha512-MTvlUCb02J4ODXDsnit4N0PR9PkpKeSYpTPueaSBuWTBeP3dvMPZQabvb3C5QT/5yUzBiXQZq11QYx3Gui4StA== dependencies: "@ampproject/remapping" "1.0.2" - "@angular-devkit/architect" "0.1301.2" - "@angular-devkit/build-webpack" "0.1301.2" - "@angular-devkit/core" "13.1.2" + "@angular-devkit/architect" "0.1301.4" + "@angular-devkit/build-webpack" "0.1301.4" + "@angular-devkit/core" "13.1.4" "@babel/core" "7.16.0" "@babel/generator" "7.16.0" "@babel/helper-annotate-as-pure" "7.16.0" @@ -42,7 +42,7 @@ "@babel/runtime" "7.16.3" "@babel/template" "7.16.0" "@discoveryjs/json-ext" "0.5.6" - "@ngtools/webpack" "13.1.2" + "@ngtools/webpack" "13.1.4" ansi-colors "4.1.1" babel-loader "8.2.3" babel-plugin-istanbul "6.1.1" @@ -51,9 +51,9 @@ circular-dependency-plugin "5.2.2" copy-webpack-plugin "10.0.0" core-js "3.19.3" - critters "0.0.15" + critters "0.0.16" css-loader "6.5.1" - esbuild-wasm "0.14.2" + esbuild-wasm "0.14.11" glob "7.2.0" https-proxy-agent "5.0.0" inquirer "8.2.0" @@ -72,7 +72,7 @@ postcss "8.4.4" postcss-import "14.0.2" postcss-loader "6.2.1" - postcss-preset-env "6.7.0" + postcss-preset-env "7.2.3" regenerator-runtime "0.13.9" resolve-url-loader "4.0.0" rxjs "6.6.7" @@ -93,20 +93,20 @@ webpack-merge "5.8.0" webpack-subresource-integrity "5.0.0" optionalDependencies: - esbuild "0.14.2" + esbuild "0.14.11" -"@angular-devkit/build-webpack@0.1301.2": - version "0.1301.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1301.2.tgz#e1035aefc696232497d5c3024308b3b0175be109" - integrity sha512-Xk0k0tMcLOy2HI1/YrfWeLUrtKvk7/E7fhG3XoozT/pXBQgiZGoPuCt34HNPDkx3WNSedzvh5DNv8kPlILfjIw== +"@angular-devkit/build-webpack@0.1301.4": + version "0.1301.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/build-webpack/-/build-webpack-0.1301.4.tgz#7dd16ec7fb26c5e177ad26a6f485faf4393774ef" + integrity sha512-IcC3Y5WhreIV0uT90ITqJVgRqFjGwH72hftwLxkslaX+FJDcL36mhsNdyN66BJiuX7R85xUxHq3PEb9cZrllJA== dependencies: - "@angular-devkit/architect" "0.1301.2" + "@angular-devkit/architect" "0.1301.4" rxjs "6.6.7" -"@angular-devkit/core@13.1.2": - version "13.1.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-13.1.2.tgz#7ff959aaff4206daa141d6139aed06947bf74ad1" - integrity sha512-uXVesIRiCL/Nv+RSV8JM4j8IoZiGCGnqV2FOJ1hvH7DPxIjhjPMdG/B54xMydZpeASW3ofuxeORyAXxFIBm8Zg== +"@angular-devkit/core@13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-13.1.3.tgz#d1f8a6b4ad4326732a160a7549fccca1369fd108" + integrity sha512-o14jGDk4h14dVYYQafOn+2rq9CDmDMbDV6logqKYCLzTDRlK8gccDnqJM/QKAlfWCzbllZqcHDmg6FyoRLO9RQ== dependencies: ajv "8.8.2" ajv-formats "2.1.1" @@ -115,10 +115,10 @@ rxjs "6.6.7" source-map "0.7.3" -"@angular-devkit/core@13.1.3": - version "13.1.3" - resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-13.1.3.tgz#d1f8a6b4ad4326732a160a7549fccca1369fd108" - integrity sha512-o14jGDk4h14dVYYQafOn+2rq9CDmDMbDV6logqKYCLzTDRlK8gccDnqJM/QKAlfWCzbllZqcHDmg6FyoRLO9RQ== +"@angular-devkit/core@13.1.4": + version "13.1.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/core/-/core-13.1.4.tgz#b5b6ddd674ae351f83beff2e4a0d702096bdfd47" + integrity sha512-225Gjy4iVxh5Jo9njJnaG75M/Dt95UW+dEPCGWKV5E/++7UUlXlo9sNWq8x2vJm2nhtsPkpnXNOt4pW1mIDwqQ== dependencies: ajv "8.8.2" ajv-formats "2.1.1" @@ -127,12 +127,12 @@ rxjs "6.6.7" source-map "0.7.3" -"@angular-devkit/schematics@13.1.2": - version "13.1.2" - resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-13.1.2.tgz#4e6d25e1b2a3360f5a7ef434615ed895ce0bb8de" - integrity sha512-ayYbHGU8QpMGx8ZyhKOBupz+Zfv/2H1pNQErahYV3qg7hA9hfjTGmNmDQ4iw0fiT04NajjUxuomlKsCsg7oXDw== +"@angular-devkit/schematics@13.1.4": + version "13.1.4" + resolved "https://registry.yarnpkg.com/@angular-devkit/schematics/-/schematics-13.1.4.tgz#e8ed817887aa51268dec27d8d6188e2f3f10742a" + integrity sha512-yBa7IeC4cLZ7s137NAQD+sMB5c6SI6UJ6xYxl6J/CvV2RLGOZZA93i4GuRALi5s82eLi1fH+HEL/gvf3JQynzQ== dependencies: - "@angular-devkit/core" "13.1.2" + "@angular-devkit/core" "13.1.4" jsonc-parser "3.0.0" magic-string "0.25.7" ora "5.4.1" @@ -206,22 +206,22 @@ "@angular-eslint/bundled-angular-compiler" "13.0.1" "@typescript-eslint/experimental-utils" "5.3.0" -"@angular/animations@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-13.1.1.tgz#13adfd4d8c2fbf36b87b1b6714ed5121267ea092" - integrity sha512-6ECC9Dn5gmV4U1cz1pRJ2p5lo0BET2CjG1RbhTaZR8lOsoMsmlV/JdBAp8eyYTiGii3MLS6Q2P/hN/YG2SRGQQ== +"@angular/animations@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/animations/-/animations-13.1.3.tgz#2da6ad99602bfb450624a7499d6f81366c3a4519" + integrity sha512-OwsVQsNHubIgRcxnjti4CU3QJnqd7Z2b+2iu3M349Oxyqxz4DNCqKXalDuJZt/b0yNfirvYO3kCgBfj4PF43QQ== dependencies: tslib "^2.3.0" -"@angular/cli@~13.1.2": - version "13.1.2" - resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-13.1.2.tgz#e83f593dd78020a328f1bc94b88cfab6267fde4e" - integrity sha512-jEsQWzHgODFpppWGb49jfqlN8YYhphsKY3MPHlrjmd05qWgKItUGSgA46hSoDqjaJKVUN9koUnJBFCc9utERYA== +"@angular/cli@~13.1.4": + version "13.1.4" + resolved "https://registry.yarnpkg.com/@angular/cli/-/cli-13.1.4.tgz#34e6e87d1c6950408167c41293cf2cd5d1e00a2e" + integrity sha512-PP9xpvDDCHhLTIZjewQQzzf+JbpF2s5mXTW2AgIL/E53ukaVvXwwjFMt9dQvECwut/LDpThoc3OfqcGrmwtqnA== dependencies: - "@angular-devkit/architect" "0.1301.2" - "@angular-devkit/core" "13.1.2" - "@angular-devkit/schematics" "13.1.2" - "@schematics/angular" "13.1.2" + "@angular-devkit/architect" "0.1301.4" + "@angular-devkit/core" "13.1.4" + "@angular-devkit/schematics" "13.1.4" + "@schematics/angular" "13.1.4" "@yarnpkg/lockfile" "1.1.0" ansi-colors "4.1.1" debug "4.3.3" @@ -238,17 +238,17 @@ symbol-observable "4.0.0" uuid "8.3.2" -"@angular/common@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/common/-/common-13.1.1.tgz#e8b659d6376d6764cd2516a4c6d604aafe24cb88" - integrity sha512-FQwRZ1XgTH2PbPjBmq2jAZzETVNX9yWQt21MuNGtokC7V4eS0NYlFIDbhy3UPWCzRgd3+P7P4+HdX15VxCjf9g== +"@angular/common@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/common/-/common-13.1.3.tgz#4c80f45cfd00a17543559c5fbebe0a7a7cf403ed" + integrity sha512-8qf5syeXUogf3+GSu6IRJjrk46UKh9L0QuLx+OSIl/df0y1ewx7e28q3BAUEEnOnKrLzpPNxWs2iwModc4KYfg== dependencies: tslib "^2.3.0" -"@angular/compiler-cli@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-13.1.1.tgz#b01114eb6256085f086e95bdfe832f5c5f447730" - integrity sha512-ycdXN2urBZepbXn2xx1oxF1i6g0Dq/Rb8ySQeELdL9qr6hiZF9fkvIwd91d8uhFG2PvoM4O8/U/3x4yA2bXzew== +"@angular/compiler-cli@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/compiler-cli/-/compiler-cli-13.1.3.tgz#0269370350e928f22f3150523f95bc490a1e7a7a" + integrity sha512-ALURaJATc54DzPuiZBvALf/alEp1wr7Hjmw4FuMn2cU7p8lwKkra1Dz5dAZOxh7jAcD1GJfrK/+Sb7A3cuuKjQ== dependencies: "@babel/core" "^7.8.6" canonical-path "1.0.0" @@ -262,63 +262,63 @@ tslib "^2.3.0" yargs "^17.2.1" -"@angular/compiler@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-13.1.1.tgz#56d1889fbe837ebfe595287cc5aa188cea9be615" - integrity sha512-WS+BB4h2LOBAGQ+P+RcKDw43Z7yAB5m1RY2/MAI+qI339V97WlWEQXxSMvBhCuzJnww1SSZfHMADaB54Jdjx2g== +"@angular/compiler@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/compiler/-/compiler-13.1.3.tgz#fc33b06046599ecc943f55049e0a121d5ab46d4f" + integrity sha512-dbHs/Oa+Dn+7i0jKtlVDE0lD0DaUC+lVzAcTK/zS37LrckrTMn1CA+z9bZ4gpHig9RU0wgV3YORxv0wokyiB8A== dependencies: tslib "^2.3.0" -"@angular/core@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/core/-/core-13.1.1.tgz#bc01b1d7e1d21749a595b0ae8cab5b8f51fb7dbc" - integrity sha512-oLGKgzUbHqte/q7EokOJWUiXAtBjwuZM6c9Or2a7WDJNeImQilxk5qy91RPSbP8FhOBysebqAayrfiCYexlShg== +"@angular/core@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/core/-/core-13.1.3.tgz#4afd71f674f9ead1aada81315f84846cdba10fa4" + integrity sha512-rvCnIAonRx7VnH2Mv9lQR+UYdlFQQetZCjPw8QOswOspEpHpEPDrp1HxDIqJnHxNqW0n8J3Zev/VgQYr0481UA== dependencies: tslib "^2.3.0" -"@angular/forms@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-13.1.1.tgz#d298ea9324929521c5fb7d4f8c0892bdfbe5e4b6" - integrity sha512-wtYzRHPv4mf1Vsi4GEal5qcI2wjqUW+lu8Fsd2Aoe8NqkwtY3fq+iWEP/4pnvmH0RlC+3QbNNV/01D5UKolvgg== +"@angular/forms@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/forms/-/forms-13.1.3.tgz#4b31d1208e2b191766efbbe1a502193e28e89240" + integrity sha512-c4N9zZSILyEbomY2CJo1WAMxiHu/qlycvzxKH5NFS2P2+fieORlbKUJ2p1CbYqcIxVnLYRSdWH8f1JpoaG0ETw== dependencies: tslib "^2.3.0" -"@angular/localize@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-13.1.1.tgz#0e86fa8c511f4e2c84b11839ccd1050c4d98ff08" - integrity sha512-R3DJaDDl+IMo0JbNtU4bgVGT4poavHGvg8E2q9xausn0jtkKY8MLa231a1MWlrc/lLVhX1M0sEr+X3CG/lRqhw== +"@angular/localize@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/localize/-/localize-13.1.3.tgz#05c27275aec7d461e1b2ae2f0b19fef7d0265df8" + integrity sha512-SGKdVtFnMtwQK3BebsOWf9rJjczVDKDbuO+5xXivD9k0gu5zrRy7x7mwLR7cGlWNDEmoiId705ItC+Mm5n+FVQ== dependencies: "@babel/core" "7.8.6" glob "7.2.0" yargs "^17.2.1" -"@angular/platform-browser-dynamic@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-13.1.1.tgz#452c9b1a61998400674f6ee03bc46326ae1295a4" - integrity sha512-ujHJMhJk93hjLx/SQ67y7xiGh2UDL+toVi3OlorWvnYGgPR26ufyL+J73BA+RAKHSP2WPiXU+/87vSz8r+BEgA== +"@angular/platform-browser-dynamic@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/platform-browser-dynamic/-/platform-browser-dynamic-13.1.3.tgz#08cbe321e5f39636a08eb77606ff496df478a21e" + integrity sha512-vEWyJ+2gkwh2N6KOJfxUNSdSO51ROlzCqqzCfHrPYQrlOFUfKsYKA1uoiB5UGfFEU0HBtIRWn6xoUy3wzVOZbw== dependencies: tslib "^2.3.0" -"@angular/platform-browser@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-13.1.1.tgz#d9687beec9c9af63097b1bcb91920bda6d1ea0b2" - integrity sha512-jk9MGwnaVc98wmw5dRBicduI/a8dHtUzaAi1dV003fUWldS9a5FBuj/ym7DJubaD5Njl8l79SFbjrP9aAsqM5A== +"@angular/platform-browser@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/platform-browser/-/platform-browser-13.1.3.tgz#69d90b10e89e11f14f5798d1b6fd788255a6114e" + integrity sha512-mnWjdr9UTNZvGk8jPI6O9FIhun8Q/0ghy3dg3I9AfRzEG4vPiIZW1ICksTiB+jV9etzhKpidtmg71bwgeXax1A== dependencies: tslib "^2.3.0" -"@angular/platform-server@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-13.1.1.tgz#a1378bde02b704c45a950acb0e8d97535d567d80" - integrity sha512-vzGHv2k9Fv9BKRQOdl6RPqj149KZgQ2IFFnSvjbCCLoZ47WV6fw155t+OTWuMLIPySNrsjzRJSRj04hbK9+8yQ== +"@angular/platform-server@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/platform-server/-/platform-server-13.1.3.tgz#8cda1104622ae2a12cb34cbd72d268f2905b8bba" + integrity sha512-uwfz5UJLUtvhIk83Ecdx0rkhyNg3rdjmbgtWvf2os4Q4lDnbg9y77MKQ9rKJtHqXtrhD9a4W/hAEsFJjexNQBg== dependencies: domino "^2.1.2" tslib "^2.3.0" xhr2 "^0.2.0" -"@angular/router@~13.1.1": - version "13.1.1" - resolved "https://registry.yarnpkg.com/@angular/router/-/router-13.1.1.tgz#656919d3c186f46310a0825d62bbc712c20890d7" - integrity sha512-rlz5BBgNX+G2vVu2Gb5avx3LL08i7R/xZO7zPwh0HhXz/Vp8XFlWwaqAGb6Hgat772K2uCxF1/JBLQCUBY2MNQ== +"@angular/router@~13.1.3": + version "13.1.3" + resolved "https://registry.yarnpkg.com/@angular/router/-/router-13.1.3.tgz#2330254febabce55061236f1761a03aae9a9418f" + integrity sha512-L86kARlc5UNi5KeI0O8PO7wFbTzjEI8ouz+z+aNmCnMUUNX0rbvbuXiPdDvLc71nKZznsPCl2IuO8ojyHrSPsQ== dependencies: tslib "^2.3.0" @@ -2448,11 +2448,6 @@ dependencies: "@cspotcode/source-map-consumer" "0.8.0" -"@csstools/convert-colors@^1.4.0": - version "1.4.0" - resolved "https://registry.yarnpkg.com/@csstools/convert-colors/-/convert-colors-1.4.0.tgz#ad495dc41b12e75d588c6db8b9834f08fa131eb7" - integrity sha512-5a6wqoJV/xEdbRNKVo6I4hO3VjyDq//8q2f9I6PBAvMesJHFauXDorcNCsr9RzvsZnaWi5NYCcfyqP1QeFHFbw== - "@ctrl/ngx-codemirror@^5.1.1": version "5.1.1" resolved "https://registry.yarnpkg.com/@ctrl/ngx-codemirror/-/ngx-codemirror-5.1.1.tgz#f0de414da2f42f2e5698d2d5f56617423d964fed" @@ -2622,10 +2617,10 @@ dependencies: tslib "^2.3.0" -"@ngtools/webpack@13.1.2": - version "13.1.2" - resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-13.1.2.tgz#58d8bfe8b3d4ee3b5aa1ceb3f7911b77410c6c6b" - integrity sha512-F/KraxCCUjSn5nWVEQSuyVfnoE9j/bTcpIb+6e38/Hq/saPfsUoNiRjWlTAxCD44vHbMuVkJ/ZRZT6hdICAslw== +"@ngtools/webpack@13.1.4": + version "13.1.4" + resolved "https://registry.yarnpkg.com/@ngtools/webpack/-/webpack-13.1.4.tgz#359c9078af281413cf9cabd0af06b3fca4ddbf7e" + integrity sha512-s8gzjG2nYHawFhlkHMkQWYrocHkBI1nF6T9K/oCSTIsq6kvTv//Ahno2VdBSgVq8uMnpv1TymvX0nFC4Dgn1HA== "@nodelib/fs.scandir@2.1.5": version "2.1.5" @@ -2773,13 +2768,13 @@ resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.15.tgz#6a9d143f7f4f49db2d782f9e1c8839a29b43ae23" integrity sha512-15spi3V28QdevleWBNXE4pIls3nFZmBbUGrW9IVPwiQczuSb9n76TCB4bsk8TSel+I1OkHEdPhu5QKMfY6rQHA== -"@schematics/angular@13.1.2": - version "13.1.2" - resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-13.1.2.tgz#bd3fd2fd1bb225bffb24fedad1409b64b1d08323" - integrity sha512-OMbuOsnzUFjIGeo99NYwIPwjX6udJAiT5Sj5K7QZZYj66HuAqNBMV57J8GPA56edx5mOHZZApWMjXLlOxRXbJA== +"@schematics/angular@13.1.4": + version "13.1.4" + resolved "https://registry.yarnpkg.com/@schematics/angular/-/angular-13.1.4.tgz#8b8c9ad40403c485bae9adeb51649711651189d2" + integrity sha512-P1YsHn1LLAmdpB9X2TBuUgrvEW/KaoBbHr8ifYO8/uQEXyeiIF+So8h/dnegkYkdsr3OwQ2X/j3UF6/+HS0odg== dependencies: - "@angular-devkit/core" "13.1.2" - "@angular-devkit/schematics" "13.1.2" + "@angular-devkit/core" "13.1.4" + "@angular-devkit/schematics" "13.1.4" jsonc-parser "3.0.0" "@tootallnate/once@1": @@ -3888,18 +3883,17 @@ atob@^2.1.2: resolved "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9" integrity sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg== -autoprefixer@^9.6.1: - version "9.8.6" - resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-9.8.6.tgz#3b73594ca1bf9266320c5acf1588d74dea74210f" - integrity sha512-XrvP4VVHdRBCdX1S3WXVD8+RyG9qeb1D5Sn1DeLiG2xfSpzellk5k54xbUERJ3M5DggQxes39UGOTP8CFrEGbg== +autoprefixer@^10.4.2: + version "10.4.2" + resolved "https://registry.yarnpkg.com/autoprefixer/-/autoprefixer-10.4.2.tgz#25e1df09a31a9fba5c40b578936b90d35c9d4d3b" + integrity sha512-9fOPpHKuDW1w/0EKfRmVnxTDt8166MAnLI3mgZ1JCnhNtYWxcJ6Ud5CO/AVOZi/AvFa8DY9RTy3h3+tFBlrrdQ== dependencies: - browserslist "^4.12.0" - caniuse-lite "^1.0.30001109" - colorette "^1.2.1" + browserslist "^4.19.1" + caniuse-lite "^1.0.30001297" + fraction.js "^4.1.2" normalize-range "^0.1.2" - num2fraction "^1.2.2" - postcss "^7.0.32" - postcss-value-parser "^4.1.0" + picocolors "^1.0.0" + postcss-value-parser "^4.2.0" available-typed-arrays@^1.0.2: version "1.0.4" @@ -4833,7 +4827,7 @@ browserify-optional@^1.0.1: ast-types "^0.7.0" browser-resolve "^1.8.1" -browserslist@^4.12.0, browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.6.4, browserslist@^4.9.1: +browserslist@^4.14.5, browserslist@^4.16.6, browserslist@^4.9.1: version "4.16.6" resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.16.6.tgz#d7901277a5a88e554ed305b183ec9b0c08f66fa2" integrity sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ== @@ -4977,7 +4971,7 @@ camelcase@^5.0.0, camelcase@^5.3.1: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== -caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001219: +caniuse-lite@^1.0.30001219: version "1.0.30001241" resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001241.tgz#cd3fae47eb3d7691692b406568d7a3e5b23c7598" integrity sha512-1uoSZ1Pq1VpH0WerIMqwptXHNNGfdl7d1cJUFs80CwQ/lVzdhTvsFZCeNFslze7AjsQnb4C85tzclPa1VShbeQ== @@ -4987,6 +4981,11 @@ caniuse-lite@^1.0.30001286: resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001287.tgz#5fab6a46ab9e47146d5dd35abfe47beaf8073c71" integrity sha512-4udbs9bc0hfNrcje++AxBuc6PfLNHwh3PO9kbwnfCQWyqtlzg3py0YgFu8jyRTTo85VAz4U+VLxSlID09vNtWA== +caniuse-lite@^1.0.30001297, caniuse-lite@^1.0.30001299: + version "1.0.30001301" + resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001301.tgz#ebc9086026534cab0dab99425d9c3b4425e5f450" + integrity sha512-csfD/GpHMqgEL3V3uIgosvh+SVIQvCh43SNu9HRbP1lnxkKm1kjDG4f32PP571JplkLjfS+mg2p1gxR7MYrrIA== + canonical-path@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/canonical-path/-/canonical-path-1.0.0.tgz#fcb470c23958def85081856be7a86e904f180d1d" @@ -5226,7 +5225,7 @@ color-support@^1.1.2, color-support@^1.1.3: resolved "https://registry.yarnpkg.com/color-support/-/color-support-1.1.3.tgz#93834379a1cc9a0c61f82f52f0d04322251bd5a2" integrity sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg== -colorette@^1.2.1, colorette@^1.2.2: +colorette@^1.2.2: version "1.2.2" resolved "https://registry.yarnpkg.com/colorette/-/colorette-1.2.2.tgz#cbcc79d5e99caea2dbf10eb3a26fd8b3e6acfa94" integrity sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w== @@ -5650,13 +5649,13 @@ create-require@^1.1.0: resolved "https://registry.yarnpkg.com/create-require/-/create-require-1.1.1.tgz#c1d7e8f1e5f6cfc9ff65f9cd352d37348756c333" integrity sha512-dcKFX3jn0MpIaXjisoRvexIJVEKzaq7z2rZKxf+MSr9TkdmHmsU4m2lcLojrj/FHl8mk5VxMmYA+ftRkP/3oKQ== -critters@0.0.15: - version "0.0.15" - resolved "https://registry.yarnpkg.com/critters/-/critters-0.0.15.tgz#b1c8d18fd18e614471733d7d749deac0f386b738" - integrity sha512-AE7hkXb3eZUbEvS1SKZa+OU4o2kUOXtzVeE/2E/mjU/0mV1wpBT1HfUCWVRS4zwvkBNJ0AQYsVjAoFm+kIhfdw== +critters@0.0.16: + version "0.0.16" + resolved "https://registry.yarnpkg.com/critters/-/critters-0.0.16.tgz#ffa2c5561a65b43c53b940036237ce72dcebfe93" + integrity sha512-JwjgmO6i3y6RWtLYmXwO5jMd+maZt8Tnfu7VVISmEWyQqfLpB8soBswf8/2bu6SBXxtKA68Al3c+qIG1ApT68A== dependencies: chalk "^4.1.0" - css-select "^4.1.3" + css-select "^4.2.0" parse5 "^6.0.1" parse5-htmlparser2-tree-adapter "^6.0.1" postcss "^8.3.7" @@ -5703,20 +5702,19 @@ crypto-js@^4.0.0: resolved "https://registry.yarnpkg.com/crypto-js/-/crypto-js-4.1.1.tgz#9e485bcf03521041bd85844786b83fb7619736cf" integrity sha512-o2JlM7ydqd3Qk9CA0L4NL6mTzU2sdx96a+oOfPu8Mkl/PK51vSyoi8/rQ8NknZtk44vq15lmhAj9CIAGwgeWKw== -css-blank-pseudo@^0.1.4: - version "0.1.4" - resolved "https://registry.yarnpkg.com/css-blank-pseudo/-/css-blank-pseudo-0.1.4.tgz#dfdefd3254bf8a82027993674ccf35483bfcb3c5" - integrity sha512-LHz35Hr83dnFeipc7oqFDmsjHdljj3TQtxGGiNWSOsTLIAubSm4TEz8qCaKFpk7idaQ1GfWscF4E6mgpBysA1w== +css-blank-pseudo@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/css-blank-pseudo/-/css-blank-pseudo-3.0.2.tgz#f8660f6a48b17888a9277e53f25cc5abec1f0169" + integrity sha512-hOb1LFjRR+8ocA071xUSmg5VslJ8NGo/I2qpUpdeAYyBVCgupS5O8SEVo4SxEMYyFBNodBkzG3T1iqW9HCXxew== dependencies: - postcss "^7.0.5" + postcss-selector-parser "^6.0.8" -css-has-pseudo@^0.10.0: - version "0.10.0" - resolved "https://registry.yarnpkg.com/css-has-pseudo/-/css-has-pseudo-0.10.0.tgz#3c642ab34ca242c59c41a125df9105841f6966ee" - integrity sha512-Z8hnfsZu4o/kt+AuFzeGpLVhFOGO9mluyHBaA2bA8aCGTwah5sT3WV/fTHH8UNZUytOIImuGPrl/prlb4oX4qQ== +css-has-pseudo@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/css-has-pseudo/-/css-has-pseudo-3.0.3.tgz#4824a34cb92dae7e09ea1d3fd19691b653412098" + integrity sha512-0gDYWEKaGacwxCqvQ3Ypg6wGdD1AztbMm5h1JsactG2hP2eiflj808QITmuWBpE7sjSEVrAlZhPTVd/nNMj/hQ== dependencies: - postcss "^7.0.6" - postcss-selector-parser "^5.0.0-rc.4" + postcss-selector-parser "^6.0.8" css-loader@6.5.1: version "6.5.1" @@ -5732,12 +5730,10 @@ css-loader@6.5.1: postcss-value-parser "^4.1.0" semver "^7.3.5" -css-prefers-color-scheme@^3.1.1: - version "3.1.1" - resolved "https://registry.yarnpkg.com/css-prefers-color-scheme/-/css-prefers-color-scheme-3.1.1.tgz#6f830a2714199d4f0d0d0bb8a27916ed65cff1f4" - integrity sha512-MTu6+tMs9S3EUqzmqLXEcgNRbNkkD/TGFvowpeoWJn5Vfq7FMgsmRQs9X5NXAURiOBmOxm/lLjsDNXDE6k9bhg== - dependencies: - postcss "^7.0.5" +css-prefers-color-scheme@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/css-prefers-color-scheme/-/css-prefers-color-scheme-6.0.2.tgz#d5c03a980caab92d8beeee176a8795d331e0c727" + integrity sha512-gv0KQBEM+q/XdoKyznovq3KW7ocO7k+FhPP+hQR1MenJdu0uPGS6IZa9PzlbqBeS6XcZJNAoqoFxlAUW461CrA== css-select@^4.1.3: version "4.1.3" @@ -5750,11 +5746,27 @@ css-select@^4.1.3: domutils "^2.6.0" nth-check "^2.0.0" +css-select@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/css-select/-/css-select-4.2.1.tgz#9e665d6ae4c7f9d65dbe69d0316e3221fb274cdd" + integrity sha512-/aUslKhzkTNCQUB2qTX84lVmfia9NyjP3WpDGtj/WxhwBzWBYUV3DgUpurHTme8UTPcPlAD1DJ+b0nN/t50zDQ== + dependencies: + boolbase "^1.0.0" + css-what "^5.1.0" + domhandler "^4.3.0" + domutils "^2.8.0" + nth-check "^2.0.1" + css-what@^5.0.0, css-what@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.0.1.tgz#3efa820131f4669a8ac2408f9c32e7c7de9f4cad" integrity sha512-FYDTSHb/7KXsWICVsxdmiExPjCfRC4qRFBdVwv7Ax9hMnvMmEjP9RfxTEZ3qPZGmADDn2vAKSo9UcN1jKVYscg== +css-what@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/css-what/-/css-what-5.1.0.tgz#3f7b707aadf633baf62c2ceb8579b545bb40f7fe" + integrity sha512-arSMRWIIFY0hV8pIxZMEfmMI47Wj3R/aWpZDDxWYCPEiOMv6tfOrnpDtgxBYPEQD4V0Y/958+1TdC3iWTFcUPw== + css@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/css/-/css-3.0.0.tgz#4447a4d58fdd03367c516ca9f64ae365cee4aa5d" @@ -5764,15 +5776,10 @@ css@^3.0.0: source-map "^0.6.1" source-map-resolve "^0.6.0" -cssdb@^4.4.0: - version "4.4.0" - resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-4.4.0.tgz#3bf2f2a68c10f5c6a08abd92378331ee803cddb0" - integrity sha512-LsTAR1JPEM9TpGhl/0p3nQecC2LJ0kD8X5YARu1hk/9I1gril5vDtMZyNxcEpxxDj34YNck/ucjuoUd66K03oQ== - -cssesc@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-2.0.0.tgz#3b13bd1bb1cb36e1bcb5a4dcd27f54c5dcb35703" - integrity sha512-MsCAG1z9lPdoO/IUMLSBWBSVxVtJ1395VGIQ+Fc2gNdkQ1hNDnQdw3YhA71WJCBW1vdwA0cAnk/DnW6bqoEUYg== +cssdb@^5.0.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/cssdb/-/cssdb-5.1.0.tgz#ec728d5f5c0811debd0820cbebda505d43003400" + integrity sha512-/vqjXhv1x9eGkE/zO6o8ZOI7dgdZbLVLUGyVRbPgk6YipXbW87YzUCcO+Jrmi5bwJlAH6oD+MNeZyRgXea1GZw== cssesc@^3.0.0: version "3.0.0" @@ -6180,6 +6187,13 @@ domhandler@^4.0.0, domhandler@^4.2.0: dependencies: domelementtype "^2.2.0" +domhandler@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/domhandler/-/domhandler-4.3.0.tgz#16c658c626cf966967e306f966b431f77d4a5626" + integrity sha512-fC0aXNQXqKSFTr2wDNZDhsEYjCiYsDWl3D01kwt25hm1YIPyDGHvvi3rw+PLqHAl/m71MaiF7d5zvBr0p5UB2g== + dependencies: + domelementtype "^2.2.0" + domino@^2.1.2: version "2.1.6" resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.6.tgz#fe4ace4310526e5e7b9d12c7de01b7f485a57ffe" @@ -6194,6 +6208,15 @@ domutils@^2.5.2, domutils@^2.6.0, domutils@^2.7.0: domelementtype "^2.2.0" domhandler "^4.2.0" +domutils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/domutils/-/domutils-2.8.0.tgz#4437def5db6e2d1f5d6ee859bd95ca7d02048135" + integrity sha512-w96Cjofp72M5IIhpjgobBimYEfoPjx1Vx0BSX9P30WBdZW2WIKU0T1Bd0kz2eNZ9ikjKgHbEyKx8BB6H1L3h3A== + dependencies: + dom-serializer "^1.0.1" + domelementtype "^2.2.0" + domhandler "^4.2.0" + dot-prop@^5.1.0: version "5.3.0" resolved "https://registry.yarnpkg.com/dot-prop/-/dot-prop-5.3.0.tgz#90ccce708cd9cd82cc4dc8c3ddd9abdd55b20e88" @@ -6520,118 +6543,124 @@ es6-symbol@^3.1.1, es6-symbol@~3.1.1, es6-symbol@~3.1.3: d "^1.0.1" ext "^1.1.2" -esbuild-android-arm64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.2.tgz#256b7cf2f9d382a2a92a4ff4e13187587c9b7c6a" - integrity sha512-hEixaKMN3XXCkoe+0WcexO4CcBVU5DCSUT+7P8JZiWZCbAjSkc9b6Yz2X5DSfQmRCtI/cQRU6TfMYrMQ5NBfdw== - -esbuild-darwin-64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.2.tgz#891a59ce6bc3aded0265f982469b3eb9571b92f8" - integrity sha512-Uq8t0cbJQkxkQdbUfOl2wZqZ/AtLZjvJulR1HHnc96UgyzG9YlCLSDMiqjM+NANEy7/zzvwKJsy3iNC9wwqLJA== - -esbuild-darwin-arm64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.2.tgz#ab834fffa9c612b2901ca1e77e4695d4d8aa63a2" - integrity sha512-619MSa17sr7YCIrUj88KzQu2ESA4jKYtIYfLU/smX6qNgxQt3Y/gzM4s6sgJ4fPQzirvmXgcHv1ZNQAs/Xh48A== - -esbuild-freebsd-64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.2.tgz#f7fc87a83f02de27d5a48472571efa1a432ae86d" - integrity sha512-aP6FE/ZsChZpUV6F3HE3x1Pz0paoYXycJ7oLt06g0G9dhJKknPawXCqQg/WMyD+ldCEZfo7F1kavenPdIT/SGQ== - -esbuild-freebsd-arm64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.2.tgz#bc8758420431106751f3180293cac0b5bc4ce2ee" - integrity sha512-LSm98WTb1QIhyS83+Po0KTpZNdd2XpVpI9ua5rLWqKWbKeNRFwOsjeiuwBaRNc+O32s9oC2ZMefETxHBV6VNkQ== - -esbuild-linux-32@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.2.tgz#0cc2dcd816d6d66e255bc7aeac139b1d04246812" - integrity sha512-8VxnNEyeUbiGflTKcuVc5JEPTqXfsx2O6ABwUbfS1Hp26lYPRPC7pKQK5Dxa0MBejGc50jy7YZae3EGQUQ8EkQ== - -esbuild-linux-64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.2.tgz#c790f739aa75b15c153609ea3457153fbe4db93d" - integrity sha512-4bzMS2dNxOJoFIiHId4w+tqQzdnsch71JJV1qZnbnErSFWcR9lRgpSqWnTTFtv6XM+MvltRzSXC5wQ7AEBY6Hg== - -esbuild-linux-arm64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.2.tgz#96858a1f89ad30274dec780d0e3dd8b5691c6b0c" - integrity sha512-RlIVp0RwJrdtasDF1vTFueLYZ8WuFzxoQ1OoRFZOTyJHCGCNgh7xJIC34gd7B7+RT0CzLBB4LcM5n0LS+hIoww== - -esbuild-linux-arm@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.2.tgz#03e193225afa9b1215d2ec6efe8edf0c03eeed6f" - integrity sha512-PaylahvMHhH8YMfJPMKEqi64qA0Su+d4FNfHKvlKes/2dUe4QxgbwXT9oLVgy8iJdcFMrO7By4R8fS8S0p8aVQ== - -esbuild-linux-mips64le@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.2.tgz#972f218d2cb5125237376d40ad60a6e5356a782c" - integrity sha512-Fdwrq2roFnO5oetIiUQQueZ3+5soCxBSJswg3MvYaXDomj47BN6oAWMZgLrFh1oVrtWrxSDLCJBenYdbm2s+qQ== - -esbuild-linux-ppc64le@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.2.tgz#20b71622ac09142b0e523f633af0829def7fed6b" - integrity sha512-vxptskw8JfCDD9QqpRO0XnsM1osuWeRjPaXX1TwdveLogYsbdFtcuiuK/4FxGiNMUr1ojtnCS2rMPbY8puc5NA== - -esbuild-netbsd-64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.2.tgz#dbd6a25117902ef67aa11d8779dd9c6bca7fbe82" - integrity sha512-I8+LzYK5iSNpspS9eCV9sW67Rj8FgMHimGri4mKiGAmN0pNfx+hFX146rYtzGtewuxKtTsPywWteHx+hPRLDsw== - -esbuild-openbsd-64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.2.tgz#3c5f199eed459b2f88865548394c0b77383d9ca4" - integrity sha512-120HgMe9elidWUvM2E6mMf0csrGwx8sYDqUIJugyMy1oHm+/nT08bTAVXuwYG/rkMIqsEO9AlMxuYnwR6En/3Q== - -esbuild-sunos-64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.2.tgz#900a681db6b76c6a7f60fc28d2bfe5b11698641c" - integrity sha512-Q3xcf9Uyfra9UuCFxoLixVvdigo0daZaKJ97TL2KNA4bxRUPK18wwGUk3AxvgDQZpRmg82w9PnkaNYo7a+24ow== - -esbuild-wasm@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.14.2.tgz#49c59c610a0be48becec87a7d9019d143468f2f9" - integrity sha512-Rs8NjWoo1UdsVjhxT2o6kLCX9Sh65pyd3/h4XeJ3jjQNM6NgL+/CSowuJgvOIjDAXMLXpc6fdGnyZQDil9IUJA== - -esbuild-windows-32@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.2.tgz#61e0ba5bd95b277a55d2b997ac4c04dfe2559220" - integrity sha512-TW7O49tPsrq+N1sW8mb3m24j/iDGa4xzAZH4wHWwoIzgtZAYPKC0hpIhufRRG/LA30bdMChO9pjJZ5mtcybtBQ== - -esbuild-windows-64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.2.tgz#6ab59ef721ff75c682a1c8ae0570dabb637abddb" - integrity sha512-Rym6ViMNmi1E2QuQMWy0AFAfdY0wGwZD73BnzlsQBX5hZBuy/L+Speh7ucUZ16gwsrMM9v86icZUDrSN/lNBKg== - -esbuild-windows-arm64@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.2.tgz#aca2a4f83d2f0d1592ad4be832ed0045fc888cda" - integrity sha512-ZrLbhr0vX5Em/P1faMnHucjVVWPS+m3tktAtz93WkMZLmbRJevhiW1y4CbulBd2z0MEdXZ6emDa1zFHq5O5bSA== - -esbuild@0.14.2: - version "0.14.2" - resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.2.tgz#9c1e1a652549cc33e44885eea42ea2cc6267edc2" - integrity sha512-l076A6o/PIgcyM24s0dWmDI/b8RQf41uWoJu9I0M71CtW/YSw5T5NUeXxs5lo2tFQD+O4CW4nBHJXx3OY5NpXg== +esbuild-android-arm64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-android-arm64/-/esbuild-android-arm64-0.14.11.tgz#b8b34e35a5b43880664ac7a3fbc70243d7ed894f" + integrity sha512-6iHjgvMnC/SzDH8TefL+/3lgCjYWwAd1LixYfmz/TBPbDQlxcuSkX0yiQgcJB9k+ibZ54yjVXziIwGdlc+6WNw== + +esbuild-darwin-64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-darwin-64/-/esbuild-darwin-64-0.14.11.tgz#ba805de98c0412e50fcd0636451797da157b0625" + integrity sha512-olq84ikh6TiBcrs3FnM4eR5VPPlcJcdW8BnUz/lNoEWYifYQ+Po5DuYV1oz1CTFMw4k6bQIZl8T3yxL+ZT2uvQ== + +esbuild-darwin-arm64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-darwin-arm64/-/esbuild-darwin-arm64-0.14.11.tgz#4d3573e448af76ce33e16231f3d9f878542d6fe8" + integrity sha512-Jj0ieWLREPBYr/TZJrb2GFH8PVzDqiQWavo1pOFFShrcmHWDBDrlDxPzEZ67NF/Un3t6sNNmeI1TUS/fe1xARg== + +esbuild-freebsd-64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-64/-/esbuild-freebsd-64-0.14.11.tgz#9294e6ab359ec93590ab097b0f2017de7c78ab4d" + integrity sha512-C5sT3/XIztxxz/zwDjPRHyzj/NJFOnakAanXuyfLDwhwupKPd76/PPHHyJx6Po6NI6PomgVp/zi6GRB8PfrOTA== + +esbuild-freebsd-arm64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-freebsd-arm64/-/esbuild-freebsd-arm64-0.14.11.tgz#ae3e0b09173350b66cf8321583c9a1c1fcb8bb55" + integrity sha512-y3Llu4wbs0bk4cwjsdAtVOesXb6JkdfZDLKMt+v1U3tOEPBdSu6w8796VTksJgPfqvpX22JmPLClls0h5p+L9w== + +esbuild-linux-32@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-32/-/esbuild-linux-32-0.14.11.tgz#ddadbc7038aa5a6b1675bb1503cf79a0cbf1229a" + integrity sha512-Cg3nVsxArjyLke9EuwictFF3Sva+UlDTwHIuIyx8qpxRYAOUTmxr2LzYrhHyTcGOleLGXUXYsnUVwKqnKAgkcg== + +esbuild-linux-64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-64/-/esbuild-linux-64-0.14.11.tgz#d698e3ce3a231ddfeec6b5df8c546ae8883fcd88" + integrity sha512-oeR6dIrrojr8DKVrxtH3xl4eencmjsgI6kPkDCRIIFwv4p+K7ySviM85K66BN01oLjzthpUMvBVfWSJkBLeRbg== + +esbuild-linux-arm64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm64/-/esbuild-linux-arm64-0.14.11.tgz#85faea9fa99ad355b5e3b283197a4dfd0a110fe7" + integrity sha512-+e6ZCgTFQYZlmg2OqLkg1jHLYtkNDksxWDBWNtI4XG4WxuOCUErLqfEt9qWjvzK3XBcCzHImrajkUjO+rRkbMg== + +esbuild-linux-arm@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-arm/-/esbuild-linux-arm-0.14.11.tgz#74cbcf0b8a22c8401bcbcd6ebd4cbf2baca8b7b4" + integrity sha512-vcwskfD9g0tojux/ZaTJptJQU3a7YgTYsptK1y6LQ/rJmw7U5QJvboNawqM98Ca3ToYEucfCRGbl66OTNtp6KQ== + +esbuild-linux-mips64le@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-mips64le/-/esbuild-linux-mips64le-0.14.11.tgz#490429211a3233f5cbbd8575b7758b897e42979a" + integrity sha512-Rrs99L+p54vepmXIb87xTG6ukrQv+CzrM8eoeR+r/OFL2Rg8RlyEtCeshXJ2+Q66MXZOgPJaokXJZb9snq28bw== + +esbuild-linux-ppc64le@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-ppc64le/-/esbuild-linux-ppc64le-0.14.11.tgz#fc79d60710213b5b98345f5b138d48245616827a" + integrity sha512-JyzziGAI0D30Vyzt0HDihp4s1IUtJ3ssV2zx9O/c+U/dhUHVP2TmlYjzCfCr2Q6mwXTeloDcLS4qkyvJtYptdQ== + +esbuild-linux-s390x@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-linux-s390x/-/esbuild-linux-s390x-0.14.11.tgz#ca4b93556bbba6cc95b0644f2ee93c982165ba07" + integrity sha512-DoThrkzunZ1nfRGoDN6REwmo8ZZWHd2ztniPVIR5RMw/Il9wiWEYBahb8jnMzQaSOxBsGp0PbyJeVLTUatnlcw== + +esbuild-netbsd-64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-netbsd-64/-/esbuild-netbsd-64-0.14.11.tgz#edb340bc6653c88804cac2253e21b74258fce165" + integrity sha512-12luoRQz+6eihKYh1zjrw0CBa2aw3twIiHV/FAfjh2NEBDgJQOY4WCEUEN+Rgon7xmLh4XUxCQjnwrvf8zhACw== + +esbuild-openbsd-64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-openbsd-64/-/esbuild-openbsd-64-0.14.11.tgz#caeff5f946f79a60ce7bcf88871ca4c71d3476e8" + integrity sha512-l18TZDjmvwW6cDeR4fmizNoxndyDHamGOOAenwI4SOJbzlJmwfr0jUgjbaXCUuYVOA964siw+Ix+A+bhALWg8Q== + +esbuild-sunos-64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-sunos-64/-/esbuild-sunos-64-0.14.11.tgz#90ce7e1749c2958a53509b4bae7b8f7d98f276d6" + integrity sha512-bmYzDtwASBB8c+0/HVOAiE9diR7+8zLm/i3kEojUH2z0aIs6x/S4KiTuT5/0VKJ4zk69kXel1cNWlHBMkmavQg== + +esbuild-wasm@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-wasm/-/esbuild-wasm-0.14.11.tgz#bd09f4c42969cddcae39007d284f8ef747aae85d" + integrity sha512-9e1R6hv0hiU+BkJI2edqUuWfXUbOP2Mox+Ijl/uY1vLLlSsunkrcADqD/4Rz+VCEDzw6ecscJM+uJqR2fRmEUg== + +esbuild-windows-32@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-windows-32/-/esbuild-windows-32-0.14.11.tgz#d067f4ce15b29efba6336e6a23597120fafe49ec" + integrity sha512-J1Ys5hMid8QgdY00OBvIolXgCQn1ARhYtxPnG6ESWNTty3ashtc4+As5nTrsErnv8ZGUcWZe4WzTP/DmEVX1UQ== + +esbuild-windows-64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-windows-64/-/esbuild-windows-64-0.14.11.tgz#13e86dd37a6cd61a5276fa2d271342d0f74da864" + integrity sha512-h9FmMskMuGeN/9G9+LlHPAoiQk9jlKDUn9yA0MpiGzwLa82E7r1b1u+h2a+InprbSnSLxDq/7p5YGtYVO85Mlg== + +esbuild-windows-arm64@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild-windows-arm64/-/esbuild-windows-arm64-0.14.11.tgz#e8edfdf1d712085e6dc3fba18a0c225aaae32b75" + integrity sha512-dZp7Krv13KpwKklt9/1vBFBMqxEQIO6ri7Azf8C+ob4zOegpJmha2XY9VVWP/OyQ0OWk6cEeIzMJwInRZrzBUQ== + +esbuild@0.14.11: + version "0.14.11" + resolved "https://registry.yarnpkg.com/esbuild/-/esbuild-0.14.11.tgz#ac4acb78907874832afb704c3afe58ad37715c27" + integrity sha512-xZvPtVj6yecnDeFb3KjjCM6i7B5TCAQZT77kkW/CpXTMnd6VLnRPKrUB1XHI1pSq6a4Zcy3BGueQ8VljqjDGCg== optionalDependencies: - esbuild-android-arm64 "0.14.2" - esbuild-darwin-64 "0.14.2" - esbuild-darwin-arm64 "0.14.2" - esbuild-freebsd-64 "0.14.2" - esbuild-freebsd-arm64 "0.14.2" - esbuild-linux-32 "0.14.2" - esbuild-linux-64 "0.14.2" - esbuild-linux-arm "0.14.2" - esbuild-linux-arm64 "0.14.2" - esbuild-linux-mips64le "0.14.2" - esbuild-linux-ppc64le "0.14.2" - esbuild-netbsd-64 "0.14.2" - esbuild-openbsd-64 "0.14.2" - esbuild-sunos-64 "0.14.2" - esbuild-windows-32 "0.14.2" - esbuild-windows-64 "0.14.2" - esbuild-windows-arm64 "0.14.2" + esbuild-android-arm64 "0.14.11" + esbuild-darwin-64 "0.14.11" + esbuild-darwin-arm64 "0.14.11" + esbuild-freebsd-64 "0.14.11" + esbuild-freebsd-arm64 "0.14.11" + esbuild-linux-32 "0.14.11" + esbuild-linux-64 "0.14.11" + esbuild-linux-arm "0.14.11" + esbuild-linux-arm64 "0.14.11" + esbuild-linux-mips64le "0.14.11" + esbuild-linux-ppc64le "0.14.11" + esbuild-linux-s390x "0.14.11" + esbuild-netbsd-64 "0.14.11" + esbuild-openbsd-64 "0.14.11" + esbuild-sunos-64 "0.14.11" + esbuild-windows-32 "0.14.11" + esbuild-windows-64 "0.14.11" + esbuild-windows-arm64 "0.14.11" escalade@^3.1.1: version "3.1.1" @@ -7239,11 +7268,6 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.1.1.tgz#c4b489e80096d9df1dfc97c79871aea7c617c469" integrity sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA== -flatten@^1.0.2: - version "1.0.3" - resolved "https://registry.yarnpkg.com/flatten/-/flatten-1.0.3.tgz#c1283ac9f27b368abc1e36d1ff7b04501a30356b" - integrity sha512-dVsPA/UwQ8+2uoFe5GHtiBMu48dWLTdsuEd7CKGlZlD78r1TTWBvDuFaFGKCo/ZfEr95Uk56vZoX86OsHkUeIg== - follow-redirects@^1.0.0: version "1.14.7" resolved "https://registry.yarnpkg.com/follow-redirects/-/follow-redirects-1.14.7.tgz#2004c02eb9436eee9a21446a6477debf17e81685" @@ -7287,6 +7311,11 @@ forwarded@0.2.0: resolved "https://registry.yarnpkg.com/forwarded/-/forwarded-0.2.0.tgz#2269936428aad4c15c7ebe9779a84bf0b2a81811" integrity sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow== +fraction.js@^4.1.2: + version "4.1.2" + resolved "https://registry.yarnpkg.com/fraction.js/-/fraction.js-4.1.2.tgz#13e420a92422b6cf244dff8690ed89401029fbe8" + integrity sha512-o2RiJQ6DZaR/5+Si0qJUIy637QMRudSi9kU/FFzx9EZazrIdnBgpU+3sEWCxAVhH2RtxW2Oz+T4p2o8uOPVcgA== + fresh@0.5.2: version "0.5.2" resolved "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7" @@ -8049,11 +8078,6 @@ indexeddb-js@0.0.14: sqlite3 ">=2.1.1" underscore ">=1.4.2" -indexes-of@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/indexes-of/-/indexes-of-1.0.1.tgz#f30f716c8e2bd346c7b67d3df3915566a7c05607" - integrity sha1-8w9xbI4r00bHtn0985FVZqfAVgc= - infer-owner@^1.0.4: version "1.0.4" resolved "https://registry.yarnpkg.com/infer-owner/-/infer-owner-1.0.4.tgz#c4cefcaa8e51051c2a40ba2ce8a3d27295af9467" @@ -9747,7 +9771,7 @@ npmlog@^6.0.0: gauge "^4.0.0" set-blocking "^2.0.0" -nth-check@^2.0.0: +nth-check@^2.0.0, nth-check@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/nth-check/-/nth-check-2.0.1.tgz#2efe162f5c3da06a28959fbd3db75dbeea9f0fc2" integrity sha512-it1vE95zF6dTT9lBsYbxvqh0Soy4SPowchj0UBGj/V6cTPnXXtQOPUbhZ6CmGzAD/rW22LQK6E96pcdJXk4A4w== @@ -9759,11 +9783,6 @@ null-check@^1.0.0: resolved "https://registry.yarnpkg.com/null-check/-/null-check-1.0.0.tgz#977dffd7176012b9ec30d2a39db5cf72a0439edd" integrity sha1-l33/1xdgErnsMNKjnbXPcqBDnt0= -num2fraction@^1.2.2: - version "1.2.2" - resolved "https://registry.yarnpkg.com/num2fraction/-/num2fraction-1.2.2.tgz#6f682b6a027a4e9ddfa4564cd2589d1d4e669ede" - integrity sha1-b2gragJ6Tp3fpFZM0lidHU5mnt4= - number-is-nan@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" @@ -10291,138 +10310,104 @@ portfinder@^1.0.28: debug "^3.1.1" mkdirp "^0.5.5" -postcss-attribute-case-insensitive@^4.0.1: - version "4.0.2" - resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-4.0.2.tgz#d93e46b504589e94ac7277b0463226c68041a880" - integrity sha512-clkFxk/9pcdb4Vkn0hAHq3YnxBQ2p0CGD1dy24jN+reBck+EWxMbxSUqN4Yj7t0w8csl87K6p0gxBe1utkJsYA== - dependencies: - postcss "^7.0.2" - postcss-selector-parser "^6.0.2" - -postcss-color-functional-notation@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/postcss-color-functional-notation/-/postcss-color-functional-notation-2.0.1.tgz#5efd37a88fbabeb00a2966d1e53d98ced93f74e0" - integrity sha512-ZBARCypjEDofW4P6IdPVTLhDNXPRn8T2s1zHbZidW6rPaaZvcnCS2soYFIQJrMZSxiePJ2XIYTlcb2ztr/eT2g== - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" - -postcss-color-gray@^5.0.0: +postcss-attribute-case-insensitive@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-color-gray/-/postcss-color-gray-5.0.0.tgz#532a31eb909f8da898ceffe296fdc1f864be8547" - integrity sha512-q6BuRnAGKM/ZRpfDascZlIZPjvwsRye7UDNalqVz3s7GDxMtqPY6+Q871liNxsonUw8oC61OG+PSaysYpl1bnw== + resolved "https://registry.yarnpkg.com/postcss-attribute-case-insensitive/-/postcss-attribute-case-insensitive-5.0.0.tgz#39cbf6babf3ded1e4abf37d09d6eda21c644105c" + integrity sha512-b4g9eagFGq9T5SWX4+USfVyjIb3liPnjhHHRMP7FMB2kFVpYyfEscV0wP3eaXhKlcHKUut8lt5BGoeylWA/dBQ== dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.5" - postcss-values-parser "^2.0.0" + postcss-selector-parser "^6.0.2" -postcss-color-hex-alpha@^5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-5.0.3.tgz#a8d9ca4c39d497c9661e374b9c51899ef0f87388" - integrity sha512-PF4GDel8q3kkreVXKLAGNpHKilXsZ6xuu+mOQMHWHLPNyjiUBOr75sp5ZKJfmv1MCus5/DWUGcK9hm6qHEnXYw== +postcss-color-functional-notation@^4.2.1: + version "4.2.1" + resolved "https://registry.yarnpkg.com/postcss-color-functional-notation/-/postcss-color-functional-notation-4.2.1.tgz#a25e9e1855e14d04319222a689f120b3240d39e0" + integrity sha512-62OBIXCjRXpQZcFOYIXwXBlpAVWrYk8ek1rcjvMING4Q2cf0ipyN9qT+BhHA6HmftGSEnFQu2qgKO3gMscl3Rw== dependencies: - postcss "^7.0.14" - postcss-values-parser "^2.0.1" + postcss-value-parser "^4.2.0" -postcss-color-mod-function@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/postcss-color-mod-function/-/postcss-color-mod-function-3.0.3.tgz#816ba145ac11cc3cb6baa905a75a49f903e4d31d" - integrity sha512-YP4VG+xufxaVtzV6ZmhEtc+/aTXH3d0JLpnYfxqTvwZPbJhWqp8bSY3nfNzNRFLgB4XSaBA82OE4VjOOKpCdVQ== +postcss-color-hex-alpha@^8.0.2: + version "8.0.2" + resolved "https://registry.yarnpkg.com/postcss-color-hex-alpha/-/postcss-color-hex-alpha-8.0.2.tgz#7a248b006dd47bd83063f662352d31fd982f74ec" + integrity sha512-gyx8RgqSmGVK156NAdKcsfkY3KPGHhKqvHTL3hhveFrBBToguKFzhyiuk3cljH6L4fJ0Kv+JENuPXs1Wij27Zw== dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.2" - postcss-values-parser "^2.0.0" + postcss-value-parser "^4.2.0" -postcss-color-rebeccapurple@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-4.0.1.tgz#c7a89be872bb74e45b1e3022bfe5748823e6de77" - integrity sha512-aAe3OhkS6qJXBbqzvZth2Au4V3KieR5sRQ4ptb2b2O8wgvB3SJBsdG+jsn2BZbbwekDG8nTfcCNKcSfe/lEy8g== +postcss-color-rebeccapurple@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/postcss-color-rebeccapurple/-/postcss-color-rebeccapurple-7.0.2.tgz#5d397039424a58a9ca628762eb0b88a61a66e079" + integrity sha512-SFc3MaocHaQ6k3oZaFwH8io6MdypkUtEy/eXzXEB1vEQlO3S3oDc/FSZA8AsS04Z25RirQhlDlHLh3dn7XewWw== dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" + postcss-value-parser "^4.2.0" -postcss-custom-media@^7.0.8: - version "7.0.8" - resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-7.0.8.tgz#fffd13ffeffad73621be5f387076a28b00294e0c" - integrity sha512-c9s5iX0Ge15o00HKbuRuTqNndsJUbaXdiNsksnVH8H4gdc+zbLzr/UasOwNG6CTDpLFekVY4672eWdiiWu2GUg== - dependencies: - postcss "^7.0.14" +postcss-custom-media@^8.0.0: + version "8.0.0" + resolved "https://registry.yarnpkg.com/postcss-custom-media/-/postcss-custom-media-8.0.0.tgz#1be6aff8be7dc9bf1fe014bde3b71b92bb4552f1" + integrity sha512-FvO2GzMUaTN0t1fBULDeIvxr5IvbDXcIatt6pnJghc736nqNgsGao5NT+5+WVLAQiTt6Cb3YUms0jiPaXhL//g== -postcss-custom-properties@^8.0.11: - version "8.0.11" - resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-8.0.11.tgz#2d61772d6e92f22f5e0d52602df8fae46fa30d97" - integrity sha512-nm+o0eLdYqdnJ5abAJeXp4CEU1c1k+eB2yMCvhgzsds/e0umabFrN6HoTy/8Q4K5ilxERdl/JD1LO5ANoYBeMA== +postcss-custom-properties@^12.1.2: + version "12.1.3" + resolved "https://registry.yarnpkg.com/postcss-custom-properties/-/postcss-custom-properties-12.1.3.tgz#8e37651c7188e72e6762eeae8db39755e84d3a64" + integrity sha512-rtu3otIeY532PnEuuBrIIe+N+pcdbX/7JMZfrcL09wc78YayrHw5E8UkDfvnlOhEUrI4ptCuzXQfj+Or6spbGA== dependencies: - postcss "^7.0.17" - postcss-values-parser "^2.0.1" + postcss-value-parser "^4.2.0" -postcss-custom-selectors@^5.1.2: - version "5.1.2" - resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-5.1.2.tgz#64858c6eb2ecff2fb41d0b28c9dd7b3db4de7fba" - integrity sha512-DSGDhqinCqXqlS4R7KGxL1OSycd1lydugJ1ky4iRXPHdBRiozyMHrdu0H3o7qNOCiZwySZTUI5MV0T8QhCLu+w== +postcss-custom-selectors@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/postcss-custom-selectors/-/postcss-custom-selectors-6.0.0.tgz#022839e41fbf71c47ae6e316cb0e6213012df5ef" + integrity sha512-/1iyBhz/W8jUepjGyu7V1OPcGbc636snN1yXEQCinb6Bwt7KxsiU7/bLQlp8GwAXzCh7cobBU5odNn/2zQWR8Q== dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" + postcss-selector-parser "^6.0.4" -postcss-dir-pseudo-class@^5.0.0: - version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-5.0.0.tgz#6e3a4177d0edb3abcc85fdb6fbb1c26dabaeaba2" - integrity sha512-3pm4oq8HYWMZePJY+5ANriPs3P07q+LW6FAdTlkFH2XqDdP4HeeJYMOzn0HYLhRSjBO3fhiqSwwU9xEULSrPgw== +postcss-dir-pseudo-class@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/postcss-dir-pseudo-class/-/postcss-dir-pseudo-class-6.0.3.tgz#febfe305e75267913a53bf5094c7679f5cfa9b55" + integrity sha512-qiPm+CNAlgXiMf0J5IbBBEXA9l/Q5HGsNGkL3znIwT2ZFRLGY9U2fTUpa4lqCUXQOxaLimpacHeQC80BD2qbDw== dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" + postcss-selector-parser "^6.0.8" -postcss-double-position-gradients@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/postcss-double-position-gradients/-/postcss-double-position-gradients-1.0.0.tgz#fc927d52fddc896cb3a2812ebc5df147e110522e" - integrity sha512-G+nV8EnQq25fOI8CH/B6krEohGWnF5+3A6H/+JEpOncu5dCnkS1QQ6+ct3Jkaepw1NGVqqOZH6lqrm244mCftA== +postcss-double-position-gradients@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/postcss-double-position-gradients/-/postcss-double-position-gradients-3.0.4.tgz#2484b9785ef3ba81b0f03a279c52ec58fc5344c2" + integrity sha512-qz+s5vhKJlsHw8HjSs+HVk2QGFdRyC68KGRQGX3i+GcnUjhWhXQEmCXW6siOJkZ1giu0ddPwSO6I6JdVVVPoog== dependencies: - postcss "^7.0.5" - postcss-values-parser "^2.0.0" + postcss-value-parser "^4.2.0" -postcss-env-function@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/postcss-env-function/-/postcss-env-function-2.0.2.tgz#0f3e3d3c57f094a92c2baf4b6241f0b0da5365d7" - integrity sha512-rwac4BuZlITeUbiBq60h/xbLzXY43qOsIErngWa4l7Mt+RaSkT7QBjXVGTcBHupykkblHMDrBFh30zchYPaOUw== +postcss-env-function@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/postcss-env-function/-/postcss-env-function-4.0.4.tgz#4e85359ca4fcdde4ec4b73752a41de818dbe91cc" + integrity sha512-0ltahRTPtXSIlEZFv7zIvdEib7HN0ZbUQxrxIKn8KbiRyhALo854I/CggU5lyZe6ZBvSTJ6Al2vkZecI2OhneQ== dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" + postcss-value-parser "^4.2.0" -postcss-focus-visible@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-focus-visible/-/postcss-focus-visible-4.0.0.tgz#477d107113ade6024b14128317ade2bd1e17046e" - integrity sha512-Z5CkWBw0+idJHSV6+Bgf2peDOFf/x4o+vX/pwcNYrWpXFrSfTkQ3JQ1ojrq9yS+upnAlNRHeg8uEwFTgorjI8g== +postcss-focus-visible@^6.0.3: + version "6.0.3" + resolved "https://registry.yarnpkg.com/postcss-focus-visible/-/postcss-focus-visible-6.0.3.tgz#14635b71a6b9140f488f11f26cbc9965a13f6843" + integrity sha512-ozOsg+L1U8S+rxSHnJJiET6dNLyADcPHhEarhhtCI9DBLGOPG/2i4ddVoFch9LzrBgb8uDaaRI4nuid2OM82ZA== dependencies: - postcss "^7.0.2" + postcss-selector-parser "^6.0.8" -postcss-focus-within@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-focus-within/-/postcss-focus-within-3.0.0.tgz#763b8788596cee9b874c999201cdde80659ef680" - integrity sha512-W0APui8jQeBKbCGZudW37EeMCjDeVxKgiYfIIEo8Bdh5SpB9sxds/Iq8SEuzS0Q4YFOlG7EPFulbbxujpkrV2w== +postcss-focus-within@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/postcss-focus-within/-/postcss-focus-within-5.0.3.tgz#0b0bf425f14a646bbfd973b463e2d20d85a3a841" + integrity sha512-fk9y2uFS6/Kpp7/A9Hz9Z4rlFQ8+tzgBcQCXAFSrXFGAbKx+4ZZOmmfHuYjCOMegPWoz0pnC6fNzi8j7Xyqp5Q== dependencies: - postcss "^7.0.2" + postcss-selector-parser "^6.0.8" -postcss-font-variant@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-font-variant/-/postcss-font-variant-4.0.1.tgz#42d4c0ab30894f60f98b17561eb5c0321f502641" - integrity sha512-I3ADQSTNtLTTd8uxZhtSOrTCQ9G4qUVKPjHiDk0bV75QSxXjVWiJVJ2VLdspGUi9fbW9BcjKJoRvxAH1pckqmA== - dependencies: - postcss "^7.0.2" +postcss-font-variant@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-font-variant/-/postcss-font-variant-5.0.0.tgz#efd59b4b7ea8bb06127f2d031bfbb7f24d32fa66" + integrity sha512-1fmkBaCALD72CK2a9i468mA/+tr9/1cBxRRMXOUaZqO43oWPR5imcyPjXwuv7PXbCid4ndlP5zWhidQVVa3hmA== -postcss-gap-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-gap-properties/-/postcss-gap-properties-2.0.0.tgz#431c192ab3ed96a3c3d09f2ff615960f902c1715" - integrity sha512-QZSqDaMgXCHuHTEzMsS2KfVDOq7ZFiknSpkrPJY6jmxbugUPTuSzs/vuE5I3zv0WAS+3vhrlqhijiprnuQfzmg== - dependencies: - postcss "^7.0.2" +postcss-gap-properties@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/postcss-gap-properties/-/postcss-gap-properties-3.0.2.tgz#562fbf43a6a721565b3ca0e01008690991d2f726" + integrity sha512-EaMy/pbxtQnKDsnbEjdqlkCkROTQZzolcLKgIE+3b7EuJfJydH55cZeHfm+MtIezXRqhR80VKgaztO/vHq94Fw== -postcss-image-set-function@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/postcss-image-set-function/-/postcss-image-set-function-3.0.1.tgz#28920a2f29945bed4c3198d7df6496d410d3f288" - integrity sha512-oPTcFFip5LZy8Y/whto91L9xdRHCWEMs3e1MdJxhgt4jy2WYXfhkng59fH5qLXSCPN8k4n94p1Czrfe5IOkKUw== +postcss-image-set-function@^4.0.4: + version "4.0.4" + resolved "https://registry.yarnpkg.com/postcss-image-set-function/-/postcss-image-set-function-4.0.4.tgz#ce91579ab2c1386d412ff5cd5e733c474b1f75ee" + integrity sha512-BlEo9gSTj66lXjRNByvkMK9dEdEGFXRfGjKRi9fo8s0/P3oEk74cAoonl/utiM50E2OPVb/XSu+lWvdW4KtE/Q== dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" + postcss-value-parser "^4.2.0" postcss-import@14.0.2: version "14.0.2" @@ -10433,21 +10418,17 @@ postcss-import@14.0.2: read-cache "^1.0.0" resolve "^1.1.7" -postcss-initial@^3.0.0: - version "3.0.4" - resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-3.0.4.tgz#9d32069a10531fe2ecafa0b6ac750ee0bc7efc53" - integrity sha512-3RLn6DIpMsK1l5UUy9jxQvoDeUN4gP939tDcKUHD/kM8SGSKbFAnvkpFpj3Bhtz3HGk1jWY5ZNWX6mPta5M9fg== - dependencies: - postcss "^7.0.2" +postcss-initial@^4.0.1: + version "4.0.1" + resolved "https://registry.yarnpkg.com/postcss-initial/-/postcss-initial-4.0.1.tgz#529f735f72c5724a0fb30527df6fb7ac54d7de42" + integrity sha512-0ueD7rPqX8Pn1xJIjay0AZeIuDoF+V+VvMt/uOnn+4ezUKhZM/NokDeP6DwMNyIoYByuN/94IQnt5FEkaN59xQ== -postcss-lab-function@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/postcss-lab-function/-/postcss-lab-function-2.0.1.tgz#bb51a6856cd12289ab4ae20db1e3821ef13d7d2e" - integrity sha512-whLy1IeZKY+3fYdqQFuDBf8Auw+qFuVnChWjmxm/UhHWqNHZx+B99EwxTvGYmUBqe3Fjxs4L1BoZTJmPu6usVg== +postcss-lab-function@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/postcss-lab-function/-/postcss-lab-function-4.0.3.tgz#633745b324afbcd5881da85fe2cef58b17487536" + integrity sha512-MH4tymWmefdZQ7uVG/4icfLjAQmH6o2NRYyVh2mKoB4RXJp9PjsyhZwhH4ouaCQHvg+qJVj3RzeAR1EQpIlXZA== dependencies: - "@csstools/convert-colors" "^1.4.0" - postcss "^7.0.2" - postcss-values-parser "^2.0.0" + postcss-value-parser "^4.2.0" postcss-loader@6.2.1: version "6.2.1" @@ -10458,19 +10439,15 @@ postcss-loader@6.2.1: klona "^2.0.5" semver "^7.3.5" -postcss-logical@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-logical/-/postcss-logical-3.0.0.tgz#2495d0f8b82e9f262725f75f9401b34e7b45d5b5" - integrity sha512-1SUKdJc2vuMOmeItqGuNaC+N8MzBWFWEkAnRnLpFYj1tGGa7NqyVBujfRtgNa2gXR+6RkGUiB2O5Vmh7E2RmiA== - dependencies: - postcss "^7.0.2" +postcss-logical@^5.0.3: + version "5.0.3" + resolved "https://registry.yarnpkg.com/postcss-logical/-/postcss-logical-5.0.3.tgz#9934e0fb16af70adbd94217b24d2f315ceb5c2f0" + integrity sha512-P5NcHWYrif0vK8rgOy/T87vg0WRIj3HSknrvp1wzDbiBeoDPVmiVRmkown2eSQdpPveat/MC1ess5uhzZFVnqQ== -postcss-media-minmax@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-media-minmax/-/postcss-media-minmax-4.0.0.tgz#b75bb6cbc217c8ac49433e12f22048814a4f5ed5" - integrity sha512-fo9moya6qyxsjbFAYl97qKO9gyre3qvbMnkOZeZwlsW6XYFsvs2DMGDlchVLfAd8LHPZDxivu/+qW2SMQeTHBw== - dependencies: - postcss "^7.0.2" +postcss-media-minmax@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/postcss-media-minmax/-/postcss-media-minmax-5.0.0.tgz#7140bddec173e2d6d657edbd8554a55794e2a5b5" + integrity sha512-yDUvFf9QdFZTuCUg0g0uNSHVlJ5X1lSzDZjPSFaiCWvjgsvu8vEVxtahPrLMinIDEEGnx6cBe6iqdx5YWz08wQ== postcss-modules-extract-imports@^3.0.0: version "3.0.0" @@ -10500,117 +10477,87 @@ postcss-modules-values@^4.0.0: dependencies: icss-utils "^5.0.0" -postcss-nesting@^7.0.0: - version "7.0.1" - resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-7.0.1.tgz#b50ad7b7f0173e5b5e3880c3501344703e04c052" - integrity sha512-FrorPb0H3nuVq0Sff7W2rnc3SmIcruVC6YwpcS+k687VxyxO33iE1amna7wHuRVzM8vfiYofXSBHNAZ3QhLvYg== +postcss-nesting@^10.1.2: + version "10.1.2" + resolved "https://registry.yarnpkg.com/postcss-nesting/-/postcss-nesting-10.1.2.tgz#2e5f811b3d75602ea18a95dd445bde5297145141" + integrity sha512-dJGmgmsvpzKoVMtDMQQG/T6FSqs6kDtUDirIfl4KnjMCiY9/ETX8jdKyCd20swSRAbUYkaBKV20pxkzxoOXLqQ== dependencies: - postcss "^7.0.2" + postcss-selector-parser "^6.0.8" -postcss-overflow-shorthand@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-overflow-shorthand/-/postcss-overflow-shorthand-2.0.0.tgz#31ecf350e9c6f6ddc250a78f0c3e111f32dd4c30" - integrity sha512-aK0fHc9CBNx8jbzMYhshZcEv8LtYnBIRYQD5i7w/K/wS9c2+0NSR6B3OVMu5y0hBHYLcMGjfU+dmWYNKH0I85g== - dependencies: - postcss "^7.0.2" - -postcss-page-break@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/postcss-page-break/-/postcss-page-break-2.0.0.tgz#add52d0e0a528cabe6afee8b46e2abb277df46bf" - integrity sha512-tkpTSrLpfLfD9HvgOlJuigLuk39wVTbbd8RKcy8/ugV2bNBUW3xU+AIqyxhDrQr1VUj1RmyJrBn1YWrqUm9zAQ== - dependencies: - postcss "^7.0.2" +postcss-overflow-shorthand@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/postcss-overflow-shorthand/-/postcss-overflow-shorthand-3.0.2.tgz#b4e9c89728cd1e4918173dfb95936b75f78d4148" + integrity sha512-odBMVt6PTX7jOE9UNvmnLrFzA9pXS44Jd5shFGGtSHY80QCuJF+14McSy0iavZggRZ9Oj//C9vOKQmexvyEJMg== -postcss-place@^4.0.1: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-place/-/postcss-place-4.0.1.tgz#e9f39d33d2dc584e46ee1db45adb77ca9d1dcc62" - integrity sha512-Zb6byCSLkgRKLODj/5mQugyuj9bvAAw9LqJJjgwz5cYryGeXfFZfSXoP1UfveccFmeq0b/2xxwcTEVScnqGxBg== - dependencies: - postcss "^7.0.2" - postcss-values-parser "^2.0.0" +postcss-page-break@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/postcss-page-break/-/postcss-page-break-3.0.4.tgz#7fbf741c233621622b68d435babfb70dd8c1ee5f" + integrity sha512-1JGu8oCjVXLa9q9rFTo4MbeeA5FMe00/9C7lN4va606Rdb+HkxXtXsmEDrIraQ11fGz/WvKWa8gMuCKkrXpTsQ== -postcss-preset-env@6.7.0: - version "6.7.0" - resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-6.7.0.tgz#c34ddacf8f902383b35ad1e030f178f4cdf118a5" - integrity sha512-eU4/K5xzSFwUFJ8hTdTQzo2RBLbDVt83QZrAvI07TULOkmyQlnYlpwep+2yIK+K+0KlZO4BvFcleOCCcUtwchg== - dependencies: - autoprefixer "^9.6.1" - browserslist "^4.6.4" - caniuse-lite "^1.0.30000981" - css-blank-pseudo "^0.1.4" - css-has-pseudo "^0.10.0" - css-prefers-color-scheme "^3.1.1" - cssdb "^4.4.0" - postcss "^7.0.17" - postcss-attribute-case-insensitive "^4.0.1" - postcss-color-functional-notation "^2.0.1" - postcss-color-gray "^5.0.0" - postcss-color-hex-alpha "^5.0.3" - postcss-color-mod-function "^3.0.3" - postcss-color-rebeccapurple "^4.0.1" - postcss-custom-media "^7.0.8" - postcss-custom-properties "^8.0.11" - postcss-custom-selectors "^5.1.2" - postcss-dir-pseudo-class "^5.0.0" - postcss-double-position-gradients "^1.0.0" - postcss-env-function "^2.0.2" - postcss-focus-visible "^4.0.0" - postcss-focus-within "^3.0.0" - postcss-font-variant "^4.0.0" - postcss-gap-properties "^2.0.0" - postcss-image-set-function "^3.0.1" - postcss-initial "^3.0.0" - postcss-lab-function "^2.0.1" - postcss-logical "^3.0.0" - postcss-media-minmax "^4.0.0" - postcss-nesting "^7.0.0" - postcss-overflow-shorthand "^2.0.0" - postcss-page-break "^2.0.0" - postcss-place "^4.0.1" - postcss-pseudo-class-any-link "^6.0.0" - postcss-replace-overflow-wrap "^3.0.0" - postcss-selector-matches "^4.0.0" - postcss-selector-not "^4.0.0" - -postcss-pseudo-class-any-link@^6.0.0: - version "6.0.0" - resolved "https://registry.yarnpkg.com/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-6.0.0.tgz#2ed3eed393b3702879dec4a87032b210daeb04d1" - integrity sha512-lgXW9sYJdLqtmw23otOzrtbDXofUdfYzNm4PIpNE322/swES3VU9XlXHeJS46zT2onFO7V1QFdD4Q9LiZj8mew== +postcss-place@^7.0.3: + version "7.0.3" + resolved "https://registry.yarnpkg.com/postcss-place/-/postcss-place-7.0.3.tgz#ca8040dfd937c7769a233a3bd6e66e139cf89e62" + integrity sha512-tDQ3m+GYoOar+KoQgj+pwPAvGHAp/Sby6vrFiyrELrMKQJ4AejL0NcS0mm296OKKYA2SRg9ism/hlT/OLhBrdQ== dependencies: - postcss "^7.0.2" - postcss-selector-parser "^5.0.0-rc.3" + postcss-value-parser "^4.2.0" -postcss-replace-overflow-wrap@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-3.0.0.tgz#61b360ffdaedca84c7c918d2b0f0d0ea559ab01c" - integrity sha512-2T5hcEHArDT6X9+9dVSPQdo7QHzG4XKclFT8rU5TzJPDN7RIRTbO9c4drUISOVemLj03aezStHCR2AIcr8XLpw== +postcss-preset-env@7.2.3: + version "7.2.3" + resolved "https://registry.yarnpkg.com/postcss-preset-env/-/postcss-preset-env-7.2.3.tgz#01b9b6eea0ff16c27a3d514f10105d56363428a6" + integrity sha512-Ok0DhLfwrcNGrBn8sNdy1uZqWRk/9FId0GiQ39W4ILop5GHtjJs8bu1MY9isPwHInpVEPWjb4CEcEaSbBLpfwA== dependencies: - postcss "^7.0.2" - -postcss-selector-matches@^4.0.0: + autoprefixer "^10.4.2" + browserslist "^4.19.1" + caniuse-lite "^1.0.30001299" + css-blank-pseudo "^3.0.2" + css-has-pseudo "^3.0.3" + css-prefers-color-scheme "^6.0.2" + cssdb "^5.0.0" + postcss-attribute-case-insensitive "^5.0.0" + postcss-color-functional-notation "^4.2.1" + postcss-color-hex-alpha "^8.0.2" + postcss-color-rebeccapurple "^7.0.2" + postcss-custom-media "^8.0.0" + postcss-custom-properties "^12.1.2" + postcss-custom-selectors "^6.0.0" + postcss-dir-pseudo-class "^6.0.3" + postcss-double-position-gradients "^3.0.4" + postcss-env-function "^4.0.4" + postcss-focus-visible "^6.0.3" + postcss-focus-within "^5.0.3" + postcss-font-variant "^5.0.0" + postcss-gap-properties "^3.0.2" + postcss-image-set-function "^4.0.4" + postcss-initial "^4.0.1" + postcss-lab-function "^4.0.3" + postcss-logical "^5.0.3" + postcss-media-minmax "^5.0.0" + postcss-nesting "^10.1.2" + postcss-overflow-shorthand "^3.0.2" + postcss-page-break "^3.0.4" + postcss-place "^7.0.3" + postcss-pseudo-class-any-link "^7.0.2" + postcss-replace-overflow-wrap "^4.0.0" + postcss-selector-not "^5.0.0" + +postcss-pseudo-class-any-link@^7.0.2: + version "7.0.2" + resolved "https://registry.yarnpkg.com/postcss-pseudo-class-any-link/-/postcss-pseudo-class-any-link-7.0.2.tgz#6284c2f970715c78fe992d2fac1130e9991585c9" + integrity sha512-CG35J1COUH7OOBgpw5O+0koOLUd5N4vUGKUqSAuIe4GiuLHWU96Pqp+UPC8QITTd12zYAFx76pV7qWT/0Aj/TA== + dependencies: + postcss-selector-parser "^6.0.8" + +postcss-replace-overflow-wrap@^4.0.0: version "4.0.0" - resolved "https://registry.yarnpkg.com/postcss-selector-matches/-/postcss-selector-matches-4.0.0.tgz#71c8248f917ba2cc93037c9637ee09c64436fcff" - integrity sha512-LgsHwQR/EsRYSqlwdGzeaPKVT0Ml7LAT6E75T8W8xLJY62CE4S/l03BWIt3jT8Taq22kXP08s2SfTSzaraoPww== - dependencies: - balanced-match "^1.0.0" - postcss "^7.0.2" + resolved "https://registry.yarnpkg.com/postcss-replace-overflow-wrap/-/postcss-replace-overflow-wrap-4.0.0.tgz#d2df6bed10b477bf9c52fab28c568b4b29ca4319" + integrity sha512-KmF7SBPphT4gPPcKZc7aDkweHiKEEO8cla/GjcBK+ckKxiZslIu3C4GCRW3DNfL0o7yW7kMQu9xlZ1kXRXLXtw== -postcss-selector-not@^4.0.0: - version "4.0.1" - resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-4.0.1.tgz#263016eef1cf219e0ade9a913780fc1f48204cbf" - integrity sha512-YolvBgInEK5/79C+bdFMyzqTg6pkYqDbzZIST/PDMqa/o3qtXenD05apBG2jLgT0/BQ77d4U2UK12jWpilqMAQ== - dependencies: - balanced-match "^1.0.0" - postcss "^7.0.2" - -postcss-selector-parser@^5.0.0-rc.3, postcss-selector-parser@^5.0.0-rc.4: +postcss-selector-not@^5.0.0: version "5.0.0" - resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-5.0.0.tgz#249044356697b33b64f1a8f7c80922dddee7195c" - integrity sha512-w+zLE5Jhg6Liz8+rQOWEAwtwkyqpfnmsinXjXg6cY7YIONZZtgvE0v2O0uhQBs0peNomOJwWRKt6JBfTdTd3OQ== + resolved "https://registry.yarnpkg.com/postcss-selector-not/-/postcss-selector-not-5.0.0.tgz#ac5fc506f7565dd872f82f5314c0f81a05630dc7" + integrity sha512-/2K3A4TCP9orP4TNS7u3tGdRFVKqz/E6pX3aGnriPG0jU78of8wsUcqE4QAhWEU0d+WnMSF93Ah3F//vUtK+iQ== dependencies: - cssesc "^2.0.0" - indexes-of "^1.0.1" - uniq "^1.0.1" + balanced-match "^1.0.0" postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: version "6.0.6" @@ -10620,19 +10567,23 @@ postcss-selector-parser@^6.0.2, postcss-selector-parser@^6.0.4: cssesc "^3.0.0" util-deprecate "^1.0.2" +postcss-selector-parser@^6.0.8: + version "6.0.9" + resolved "https://registry.yarnpkg.com/postcss-selector-parser/-/postcss-selector-parser-6.0.9.tgz#ee71c3b9ff63d9cd130838876c13a2ec1a992b2f" + integrity sha512-UO3SgnZOVTwu4kyLR22UQ1xZh086RyNZppb7lLAKBFK8a32ttG5i87Y/P3+2bRSjZNyJ1B7hfFNo273tKe9YxQ== + dependencies: + cssesc "^3.0.0" + util-deprecate "^1.0.2" + postcss-value-parser@^4.0.0, postcss-value-parser@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.1.0.tgz#443f6a20ced6481a2bda4fa8532a6e55d789a2cb" integrity sha512-97DXOFbQJhk71ne5/Mt6cOu6yxsSfM0QGQyl0L25Gca4yGWEGJaig7l7gbCX623VqTBNGLRLaVUCnNkcedlRSQ== -postcss-values-parser@^2.0.0, postcss-values-parser@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/postcss-values-parser/-/postcss-values-parser-2.0.1.tgz#da8b472d901da1e205b47bdc98637b9e9e550e5f" - integrity sha512-2tLuBsA6P4rYTNKCXYG/71C7j1pU6pK503suYOmn4xYrQIzW+opD+7FAFNuGSdZC/3Qfy334QbeMu7MEb8gOxg== - dependencies: - flatten "^1.0.2" - indexes-of "^1.0.1" - uniq "^1.0.1" +postcss-value-parser@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/postcss-value-parser/-/postcss-value-parser-4.2.0.tgz#723c09920836ba6d3e5af019f92bc0971c02e514" + integrity sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ== postcss@8.4.4: version "8.4.4" @@ -10643,7 +10594,7 @@ postcss@8.4.4: picocolors "^1.0.0" source-map-js "^1.0.1" -postcss@^7.0.14, postcss@^7.0.17, postcss@^7.0.2, postcss@^7.0.32, postcss@^7.0.35, postcss@^7.0.5, postcss@^7.0.6: +postcss@^7.0.35: version "7.0.36" resolved "https://registry.yarnpkg.com/postcss/-/postcss-7.0.36.tgz#056f8cffa939662a8f5905950c07d5285644dfcb" integrity sha512-BebJSIUMwJHRH0HAQoxN4u1CN86glsrwsW0q7T+/m44eXOUAxSNdHRkNZPYz5vVUbg17hFgOQDE7fZk7li3pZw== @@ -12636,11 +12587,6 @@ unicode-trie@^2.0.0: pako "^0.2.5" tiny-inflate "^1.0.0" -uniq@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/uniq/-/uniq-1.0.1.tgz#b31c5ae8254844a3a8281541ce2b04b865a734ff" - integrity sha1-sxxa6CVIRKOoKBVBzisEuGWnNP8= - unique-filename@^1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-1.1.1.tgz#1d69769369ada0583103a1e6ae87681b56573230" From 1d705e56d2c7cc2d9e5efd1c9d69b4df56d1d5d2 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 25 Jan 2022 17:49:59 +0100 Subject: [PATCH 021/148] refactor(search): rename SearchForm --> FulltextSearchForm --- .../fulltext-search-form.component.css} | 0 .../fulltext-search-form.component.html} | 0 .../fulltext-search-form.component.spec.ts} | 12 ++++++------ .../fulltext-search-form.component.ts} | 6 +++--- .../search-panel/search-panel.component.ts | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) rename src/app/views/data-view/data-outlets/search-panel/{search-form/search-form.component.css => fulltext-search-form/fulltext-search-form.component.css} (100%) rename src/app/views/data-view/data-outlets/search-panel/{search-form/search-form.component.html => fulltext-search-form/fulltext-search-form.component.html} (100%) rename src/app/views/data-view/data-outlets/search-panel/{search-form/search-form.component.spec.ts => fulltext-search-form/fulltext-search-form.component.spec.ts} (79%) rename src/app/views/data-view/data-outlets/search-panel/{search-form/search-form.component.ts => fulltext-search-form/fulltext-search-form.component.ts} (95%) diff --git a/src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.css b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.css similarity index 100% rename from src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.css rename to src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.css diff --git a/src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.html b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html similarity index 100% rename from src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.html rename to src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html diff --git a/src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.spec.ts similarity index 79% rename from src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.spec.ts rename to src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.spec.ts index 8297e63ad2..a9b2e8ab5a 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.spec.ts @@ -5,11 +5,11 @@ import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms'; import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; -import { SearchFormComponent } from './search-form.component'; +import { FulltextSearchFormComponent } from './fulltext-search-form.component'; -describe('SearchFormComponent', () => { - let component: SearchFormComponent; - let fixture: ComponentFixture; +describe('FulltextSearchFormComponent', () => { + let component: FulltextSearchFormComponent; + let fixture: ComponentFixture; let compDe: DebugElement; // Create new instance of FormBuilder @@ -22,14 +22,14 @@ describe('SearchFormComponent', () => { waitForAsync(() => { TestBed.configureTestingModule({ imports: [FontAwesomeModule, ReactiveFormsModule], - declarations: [SearchFormComponent], + declarations: [FulltextSearchFormComponent], providers: [{ provide: FormBuilder, useValue: formBuilder }], }).compileComponents(); }) ); beforeEach(() => { - fixture = TestBed.createComponent(SearchFormComponent); + fixture = TestBed.createComponent(FulltextSearchFormComponent); component = fixture.componentInstance; compDe = fixture.debugElement; diff --git a/src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts similarity index 95% rename from src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.ts rename to src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts index d86f389a22..a6d974f540 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-form/search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts @@ -14,11 +14,11 @@ import { faSearch } from '@fortawesome/free-solid-svg-icons'; */ @Component({ selector: 'awg-search-form', - templateUrl: './search-form.component.html', - styleUrls: ['./search-form.component.css'], + templateUrl: './fulltext-search-form.component.html', + styleUrls: ['./fulltext-search-form.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class SearchFormComponent implements OnChanges { +export class FulltextSearchFormComponent implements OnChanges { /** * Input variable: searchValue. * diff --git a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts index da81a0b14f..e3bc931d54 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts @@ -16,7 +16,7 @@ import { SearchParams, SearchParamsViewTypes, SearchResponseWithQuery } from '@a * It contains the search panel section * of the data (search) view of the app * with a {@link TwelveToneSpinnerComponent}, - * the {@link SearchFormComponent} + * the {@link FulltextSearchFormComponent} * and the {@link SearchResultListComponent}. */ @Component({ From 3d1664ae686d232e8a99c267ad93f54bcfb76279 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 25 Jan 2022 17:51:01 +0100 Subject: [PATCH 022/148] fix(app): revert ngx-gallery version to 1.2.3 (BrowserModule issue) --- package.json | 2 +- yarn.lock | 10 ++++------ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/package.json b/package.json index 17efd1e695..01645d1101 100644 --- a/package.json +++ b/package.json @@ -89,7 +89,7 @@ "@fortawesome/angular-fontawesome": "^0.10.1", "@fortawesome/fontawesome-svg-core": "^1.2.36", "@fortawesome/free-solid-svg-icons": "^5.15.4", - "@kolkov/ngx-gallery": "^2.0.0", + "@kolkov/ngx-gallery": "1.2.3", "@ng-bootstrap/ng-bootstrap": "^11.0.0", "bootstrap": "^4.6.1", "codemirror": "^5.65.0", diff --git a/yarn.lock b/yarn.lock index dd7c1222e5..e8ba9bcd3a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2603,12 +2603,10 @@ resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-1.0.0.tgz#3fdf5798f0b49e90155896f6291df186eac06c83" integrity sha512-9oLAnygRMi8Q5QkYEU4XWK04B+nuoXoxjRvRxgjuChkLZFBja0YPSgdZ7dZtwhncLBcQe/I/E+fLuk5qxcYVJA== -"@kolkov/ngx-gallery@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@kolkov/ngx-gallery/-/ngx-gallery-2.0.0.tgz#be6840467345733b2bcb6d1ea4e64a845bd201f3" - integrity sha512-0zwZIVZXgc61urkI5r7h7BftDQ1wtrFevljgyZGFgIJYu6NpfUiH7tGrMzSQyl0bJf0sWq+A7Z7acCJH9FArZw== - dependencies: - tslib "^2.3.0" +"@kolkov/ngx-gallery@1.2.3": + version "1.2.3" + resolved "https://registry.yarnpkg.com/@kolkov/ngx-gallery/-/ngx-gallery-1.2.3.tgz#bb15d4b64a5c03905677aa4ca741835aabe41f43" + integrity sha512-Dpnhwq3DGPSXrNt65gexo+/Smb2L0bne14A0WONN04+racETtcY33fqFvNWfRw5Nvk2Eza+sq95eEA0NbgF/6g== "@ng-bootstrap/ng-bootstrap@^11.0.0": version "11.0.0" From 2126a35feecd1d90c4127bca3cce67026ce3766d Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 25 Jan 2022 17:52:41 +0100 Subject: [PATCH 023/148] fix(search): add index files for search view components --- .../data-outlets/resource-detail/index.ts | 1 + .../resource-detail-header/index.ts | 1 + .../resource-detail-html/index.ts | 1 + .../imageobjects/index.ts | 1 + .../resource-detail-html-content/index.ts | 1 + .../linkedobjects/index.ts | 1 + .../resource-detail-html-content/props/index.ts | 1 + .../resource-detail-json-converted/index.ts | 1 + .../resource-detail-json-raw/index.ts | 1 + .../resource-detail/resource-detail.module.ts | 16 ++++++++-------- .../search-panel/extended-search-form/index.ts | 1 + .../search-panel/fulltext-search-form/index.ts | 1 + .../data-view/data-outlets/search-panel/index.ts | 1 + .../search-panel/search-result-list/index.ts | 1 + 14 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 src/app/views/data-view/data-outlets/resource-detail/index.ts create mode 100644 src/app/views/data-view/data-outlets/resource-detail/resource-detail-header/index.ts create mode 100644 src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/index.ts create mode 100644 src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/imageobjects/index.ts create mode 100644 src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/index.ts create mode 100644 src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/linkedobjects/index.ts create mode 100644 src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/index.ts create mode 100644 src/app/views/data-view/data-outlets/resource-detail/resource-detail-json-converted/index.ts create mode 100644 src/app/views/data-view/data-outlets/resource-detail/resource-detail-json-raw/index.ts create mode 100644 src/app/views/data-view/data-outlets/search-panel/extended-search-form/index.ts create mode 100644 src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/index.ts create mode 100644 src/app/views/data-view/data-outlets/search-panel/index.ts create mode 100644 src/app/views/data-view/data-outlets/search-panel/search-result-list/index.ts diff --git a/src/app/views/data-view/data-outlets/resource-detail/index.ts b/src/app/views/data-view/data-outlets/resource-detail/index.ts new file mode 100644 index 0000000000..c3e03a5b11 --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/index.ts @@ -0,0 +1 @@ +export * from './resource-detail.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-header/index.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-header/index.ts new file mode 100644 index 0000000000..770a42b69a --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-header/index.ts @@ -0,0 +1 @@ +export * from './resource-detail-header.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/index.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/index.ts new file mode 100644 index 0000000000..475ae717e4 --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/index.ts @@ -0,0 +1 @@ +export * from './resource-detail-html.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/imageobjects/index.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/imageobjects/index.ts new file mode 100644 index 0000000000..fb62a22000 --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/imageobjects/index.ts @@ -0,0 +1 @@ +export * from './imageobjects.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/index.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/index.ts new file mode 100644 index 0000000000..f2348435b3 --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/index.ts @@ -0,0 +1 @@ +export * from './resource-detail-html-content.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/linkedobjects/index.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/linkedobjects/index.ts new file mode 100644 index 0000000000..e71040db5e --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/linkedobjects/index.ts @@ -0,0 +1 @@ +export * from './linkedobjects.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/index.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/index.ts new file mode 100644 index 0000000000..39620315a5 --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/index.ts @@ -0,0 +1 @@ +export * from './props.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-json-converted/index.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-json-converted/index.ts new file mode 100644 index 0000000000..b1f8acce60 --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-json-converted/index.ts @@ -0,0 +1 @@ +export * from './resource-detail-json-converted.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-json-raw/index.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-json-raw/index.ts new file mode 100644 index 0000000000..0faa1a470c --- /dev/null +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-json-raw/index.ts @@ -0,0 +1 @@ +export * from './resource-detail-json-raw.component'; diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.module.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.module.ts index 8bc983f89b..dfbb5fc363 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.module.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.module.ts @@ -1,14 +1,14 @@ import { NgModule } from '@angular/core'; import { SharedModule } from '@awg-shared/shared.module'; -import { ResourceDetailHeaderComponent } from './resource-detail-header/resource-detail-header.component'; -import { ResourceDetailHtmlComponent } from './resource-detail-html/resource-detail-html.component'; -import { ResourceDetailHtmlContentComponent } from './resource-detail-html/resource-detail-html-content/resource-detail-html-content.component'; -import { ResourceDetailHtmlContentImageobjectsComponent } from './resource-detail-html/resource-detail-html-content/imageobjects/imageobjects.component'; -import { ResourceDetailHtmlContentLinkedobjectsComponent } from './resource-detail-html/resource-detail-html-content/linkedobjects/linkedobjects.component'; -import { ResourceDetailHtmlContentPropsComponent } from './resource-detail-html/resource-detail-html-content/props/props.component'; -import { ResourceDetailJsonConvertedComponent } from './resource-detail-json-converted/resource-detail-json-converted.component'; -import { ResourceDetailJsonRawComponent } from './resource-detail-json-raw/resource-detail-json-raw.component'; +import { ResourceDetailHeaderComponent } from './resource-detail-header'; +import { ResourceDetailHtmlComponent } from './resource-detail-html'; +import { ResourceDetailHtmlContentComponent } from './resource-detail-html/resource-detail-html-content'; +import { ResourceDetailHtmlContentImageobjectsComponent } from './resource-detail-html/resource-detail-html-content/imageobjects'; +import { ResourceDetailHtmlContentLinkedobjectsComponent } from './resource-detail-html/resource-detail-html-content/linkedobjects'; +import { ResourceDetailHtmlContentPropsComponent } from './resource-detail-html/resource-detail-html-content/props'; +import { ResourceDetailJsonConvertedComponent } from './resource-detail-json-converted'; +import { ResourceDetailJsonRawComponent } from './resource-detail-json-raw'; /** * The resource detail module. diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/index.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/index.ts new file mode 100644 index 0000000000..ae0252bcdd --- /dev/null +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/index.ts @@ -0,0 +1 @@ +export * from './extended-search-form.component'; diff --git a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/index.ts b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/index.ts new file mode 100644 index 0000000000..70db2d6c85 --- /dev/null +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/index.ts @@ -0,0 +1 @@ +export * from './fulltext-search-form.component'; diff --git a/src/app/views/data-view/data-outlets/search-panel/index.ts b/src/app/views/data-view/data-outlets/search-panel/index.ts new file mode 100644 index 0000000000..66433ca8ca --- /dev/null +++ b/src/app/views/data-view/data-outlets/search-panel/index.ts @@ -0,0 +1 @@ +export * from './search-panel.component'; diff --git a/src/app/views/data-view/data-outlets/search-panel/search-result-list/index.ts b/src/app/views/data-view/data-outlets/search-panel/search-result-list/index.ts new file mode 100644 index 0000000000..66b74653e8 --- /dev/null +++ b/src/app/views/data-view/data-outlets/search-panel/search-result-list/index.ts @@ -0,0 +1 @@ +export * from './search-result-list.component'; From b9a070a28065b0235cf49d766211bf0c11807e07 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 25 Jan 2022 19:15:51 +0100 Subject: [PATCH 024/148] fix(search): do not use incorrect API nhits for search result length --- src/app/core/services/conversion-service/conversion.service.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/app/core/services/conversion-service/conversion.service.ts b/src/app/core/services/conversion-service/conversion.service.ts index 803bcc6785..c8e498011b 100644 --- a/src/app/core/services/conversion-service/conversion.service.ts +++ b/src/app/core/services/conversion-service/conversion.service.ts @@ -151,8 +151,7 @@ export class ConversionService extends ApiService { if (searchResults.subjects) { const length = searchResults.subjects.length; const resString: string = length === 1 ? 'Resultat' : 'Resultate'; - resText = `${searchResults.nhits} `; - resText += `${resString} für "${searchValue}"`; + resText = `${length} ${resString} für "${searchValue}"`; if (this.filteredOut > 0) { const duplString: string = this.filteredOut === 1 ? 'Duplikat' : 'Duplikate'; From 4617a28659847fe83bbc1a92399685570181ac68 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Fri, 28 Jan 2022 01:29:21 +0100 Subject: [PATCH 025/148] feat(search): add extended search form & functionality - ongoing --- .../resource-response-formats/index.ts | 2 + .../src/prop-item-for-res-type-json.ts | 1 - .../data-outlets/search-overview.component.ts | 1 + .../extended-search-form.component.css | 0 .../extended-search-form.component.html | 101 +++++++ .../extended-search-form.component.spec.ts | 24 ++ .../extended-search-form.component.ts | 255 ++++++++++++++++++ .../fulltext-search-form.component.html | 6 +- .../search-panel/search-panel.component.html | 2 + .../data-view/data-view-routing.module.ts | 9 +- src/app/views/data-view/data-view.module.ts | 14 +- .../data-view/services/data-api.service.ts | 82 ++++++ 12 files changed, 487 insertions(+), 10 deletions(-) create mode 100644 src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.css create mode 100644 src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html create mode 100644 src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts create mode 100644 src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts diff --git a/src/app/shared/api-objects/resource-response-formats/index.ts b/src/app/shared/api-objects/resource-response-formats/index.ts index bc9a08bc6a..7609ab8959 100644 --- a/src/app/shared/api-objects/resource-response-formats/index.ts +++ b/src/app/shared/api-objects/resource-response-formats/index.ts @@ -25,6 +25,7 @@ import { ContextJson } from './src/context-json'; import { IncomingItemJson } from './src/incoming-item-json'; import { PropertyJson } from './src/property-json'; import { PropertyTypesInResourceClassResponseJson } from './src/property-types-in-resource-class-response-json'; +import { ResTypeItemJson } from './src/res-type-item-json'; import { ResourceContextResponseJson } from './src/resource-context-response-json'; import { ResourceFullResponseJson } from './src/resource-full-response-json'; import { ResourceInfoResponseJson } from './src/resource-info-response-json'; @@ -40,6 +41,7 @@ export { IncomingItemJson, PropertyJson, PropertyTypesInResourceClassResponseJson, + ResTypeItemJson, ResourceContextResponseJson, ResourceFullResponseJson, ResourceInfoResponseJson, diff --git a/src/app/shared/api-objects/resource-response-formats/src/prop-item-for-res-type-json.ts b/src/app/shared/api-objects/resource-response-formats/src/prop-item-for-res-type-json.ts index 30d056baa5..fc2098e417 100644 --- a/src/app/shared/api-objects/resource-response-formats/src/prop-item-for-res-type-json.ts +++ b/src/app/shared/api-objects/resource-response-formats/src/prop-item-for-res-type-json.ts @@ -23,7 +23,6 @@ export class PropItemForResTypeJson { /** * ... * @param id: string - * TODO: change to KnoraIRI?? */ @JsonProperty('id', String) public id: string = undefined; diff --git a/src/app/views/data-view/data-outlets/search-overview.component.ts b/src/app/views/data-view/data-outlets/search-overview.component.ts index f90121d56f..69d3957f21 100644 --- a/src/app/views/data-view/data-outlets/search-overview.component.ts +++ b/src/app/views/data-view/data-outlets/search-overview.component.ts @@ -58,6 +58,7 @@ export class SearchOverviewComponent implements OnInit { setButtons(): void { this.searchRouterLinkButtons = [ new RouterLinkButton('/data/search', 'fulltext', 'Volltext-Suche', false), + new RouterLinkButton('/data/search', 'extended', 'Erweiterte Suche', false), new RouterLinkButton('/data/search', 'timeline', 'Timeline', true), new RouterLinkButton('/data/search', 'bibliography', 'Bibliographie', true), ]; diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.css b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html new file mode 100644 index 0000000000..de0df86560 --- /dev/null +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html @@ -0,0 +1,101 @@ +

extended-search-form works!

+ +
+
+
+ +
+ +
+ + +
+ +
+
+ +
+ +
+
+ + +
+
+ + +
+ + +
+
+

+ {{ searchFormStrings.errorMessage }} +
+ + property: {{ _getFormArrayControlValueAtIndex('propertyControl', idx) }} + + compop: {{ _getFormArrayControlValueAtIndex('compopControl', idx) }} + + searchValue: {{ _getFormArrayControlValueAtIndex('searchValueControl', idx) }} + + sVDisabled?: {{ isSearchValueControlDisabled(idx) }} +
+
+ + + +
diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts new file mode 100644 index 0000000000..57436bdde2 --- /dev/null +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { ExtendedSearchFormComponent } from './extended-search-form.component'; + +describe('ExtendedSearchFormComponent', () => { + let component: ExtendedSearchFormComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [ExtendedSearchFormComponent], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(ExtendedSearchFormComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts new file mode 100644 index 0000000000..b37c31d132 --- /dev/null +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts @@ -0,0 +1,255 @@ +import { Component, OnInit } from '@angular/core'; +import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; + +import { faPlus, faTrash } from '@fortawesome/free-solid-svg-icons'; + +import { ResourceTypesInVocabularyResponseJson, ResTypeItemJson } from '@awg-shared/api-objects'; + +import { SearchParams, SearchParamsViewTypes } from '@awg-views/data-view/models'; +import { DataApiService } from '@awg-views/data-view/services'; + +@Component({ + selector: 'awg-extended-search-form', + templateUrl: './extended-search-form.component.html', + styleUrls: ['./extended-search-form.component.css'], +}) +export class ExtendedSearchFormComponent implements OnInit { + searchParams: SearchParams = { + query: '', + nRows: '25', + startAt: '0', + view: SearchParamsViewTypes.table, + }; + + compops = [ + { id: 'EXISTS', label: 'EXISTS' }, + { id: 'EQ', label: '=' }, + { id: '!EQ', label: '!=' }, + { id: 'GT', label: '>' }, + { id: 'GT_EQ', label: '>=' }, + { id: 'LT', label: '>' }, + { id: 'LT_EQ', label: '>=' }, + ]; + + defaultFormString = '---'; + + displaySearchValue = false; + + /** + * Public variable: faPlus. + * + * It instantiates fontawesome's faPlus icon. + */ + faPlus = faPlus; + + /** + * Public variable: faTrash. + * + * It instantiates fontawesome's faTrash icon. + */ + faTrash = faTrash; + + /** + * Public variable: extendedSearchForm. + * + * It keeps the reactive form group: extendedSearchForm. + */ + extendedSearchForm: FormGroup; + + restypesResponse: ResourceTypesInVocabularyResponseJson; + selectedResourcetype: ResTypeItemJson; + selectedProperties: string[]; + + // TODO: move to separate class / service? + /** + * Public variable: searchFormString. + * + * It keeps the default texts for the search form. + */ + searchFormStrings = { + label: 'Search Input', + placeholder: 'Volltextsuche in der Webern-Datenbank …', + errorMessage: 'Es wird ein Suchbegriff mit mindestens 3 Zeichen benötigt!', + }; + + constructor(private dataApiService: DataApiService, private formBuilder: FormBuilder) {} + + /** + * Getter for the resource type control value. + */ + get resourcetypeControl() { + return this.extendedSearchForm.get('resourcetypeControl'); + } + + /** + * Getter for the properties control value. + */ + get propertiesControls(): FormArray { + return this.extendedSearchForm.get('propertiesControls') as FormArray; + } + + /** + * (Functional) Getter for the searchValue control value. + */ + getSearchValueControlAtIndex(index: number) { + return this.propertiesControls.controls[index].get('searchValueControl'); + } + + ngOnInit(): void { + this.createFormGroup(); + this.getResourcetypes(); + } + + /** + * Public method: createFormGroup. + * + * It creates the search form using the reactive FormBuilder + * with a formGroup and a resource type control and properties control. + * + * For the mechanism of FormArray with dynamic fields, see https://www.digitalocean.com/community/tutorials/angular-reactive-forms-formarray-dynamic-fields + * + * @returns {void} Creates the search form. + */ + createFormGroup(): void { + this.extendedSearchForm = this.formBuilder.group({ + resourcetypeControl: [this.defaultFormString, Validators.required], + propertiesControls: this.formBuilder.array([]), + }); + this.addPropertyControl(); + } + + getResourcetypes(): void { + this.dataApiService.getExtendedSearchTree().subscribe( + (restypesResponse: ResourceTypesInVocabularyResponseJson) => { + this.restypesResponse = restypesResponse; + console.log(this.restypesResponse); + + this.listenToUserResourcetypeChange(); + }, + error => { + console.error(error as any); + } + ); + } + + listenToUserResourcetypeChange(): void { + this.resourcetypeControl.valueChanges.subscribe((resourcetypeId: string) => { + this.selectedResourcetype = this.restypesResponse.resourcetypes.find(r => r.id === resourcetypeId); + + this.clearPropertyControls(); // Remove all previous property input fields + + console.log(resourcetypeId); + console.log(this.selectedResourcetype); + }); + } + + /** + * Public method: addPropertyControl. + * + * It creates a FormGroup for the properties controls using the reactive FormBuilder + * with a property control, compop control, and a searchValue control, an pushes this FormGroup to the propertiesControls FormArray. + * + * @returns {void} Creates the form group and adds it to the FormArray. + */ + addPropertyControl(): void { + const group = this.formBuilder.group({ + propertyControl: ['', Validators.required], + compopControl: ['', Validators.required], + searchValueControl: ['', Validators.minLength(3)], + }); + + this.propertiesControls.push(group); + } + + clearPropertyControls() { + this.propertiesControls.clear(); + this.addPropertyControl(); // Add back first line of property inputs after clearing + } + + removePropertyControl(index: number): void { + if (index > -1) { + this.propertiesControls.removeAt(index); + } + } + + onSearch(): void { + console.warn('Submitted form', this.extendedSearchForm.value); + + /* TODO + this.dataApiService.getExtendedSearchData(this.searchParams).subscribe( + (searchResponse: SearchResponseJson) => { + this.results = searchResponse; + console.log(this.results); + }, + error => { + console.error(error as any); + } + );*/ + } + + isAddButtonDisabled(index: number): string | null { + const compopValue = this._getFormArrayControlValueAtIndex('compopControl', index); + + return this._isPropertyAndCompopMissing(index) || + (compopValue !== 'EXISTS' && this._isSearchValueMissing(index)) || + this.getSearchValueControlAtIndex(index).errors?.minlength || + this._isNotLastProperty(index) + ? '' + : null; + } + + isPropertyControlDisabled(): string | null { + return this._isResourecetypeMissing() ? '' : null; // Mechanism needed to populate "attr.disabled", cf. https://stackoverflow.com/a/49087915 + } + + isCompopControlDisabled(): string | null { + return this.isPropertyControlDisabled(); + } + + isSearchValueControlDisabled(index: number): string | null { + const compopValue = this._getFormArrayControlValueAtIndex('compopControl', index); + return this._isResourecetypeMissing() || this._isPropertyAndCompopMissing(index) || compopValue === 'EXISTS' + ? '' + : null; + } + + getSearchValuePlaceholder(index: number): string { + let placeholder = 'Suchbegriff'; + if (this.isSearchValueControlDisabled(index)) { + placeholder = '---'; + } + return placeholder; + } + + private _getFormArrayControlValueAtIndex(controlName: string, index: number): unknown { + return this.propertiesControls.controls[index].get(controlName).value; + } + + private _isNotLastProperty(index: number): boolean { + // Check if index is not at last position of FormArray + const arrayLength = this.propertiesControls.controls.length; + return arrayLength - 1 > index; + } + + private _isResourecetypeMissing(): boolean { + const resourceValue = this.resourcetypeControl.value; + return !resourceValue || resourceValue === this.defaultFormString; + } + + private _isPropertyAndCompopMissing(index: number): boolean { + const propertyValue = this._getFormArrayControlValueAtIndex('propertyControl', index); + const compopValue = this._getFormArrayControlValueAtIndex('compopControl', index); + + const propertyMissing = !propertyValue || propertyValue === this.defaultFormString; + const compopMissing = !compopValue || compopValue === this.defaultFormString; + + return propertyMissing || compopMissing; + } + + private _isSearchValueMissing(index: number): boolean { + const searchValue = this._getFormArrayControlValueAtIndex('searchValueControl', index); + const searchValueMissing = !searchValue || searchValue === this.defaultFormString; + + return searchValueMissing; + } +} diff --git a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html index e1b673f2ee..4bacd6b8fd 100644 --- a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html @@ -1,7 +1,7 @@
- +
@@ -9,9 +9,9 @@
+ + diff --git a/src/app/views/data-view/data-view-routing.module.ts b/src/app/views/data-view/data-view-routing.module.ts index 2e81bf364b..e3110155c9 100644 --- a/src/app/views/data-view/data-view-routing.module.ts +++ b/src/app/views/data-view/data-view-routing.module.ts @@ -2,9 +2,9 @@ import { NgModule } from '@angular/core'; import { RouterModule, Routes } from '@angular/router'; import { DataViewComponent } from './data-view.component'; -import { ResourceDetailComponent } from './data-outlets/resource-detail/resource-detail.component'; +import { ResourceDetailComponent } from './data-outlets/resource-detail'; import { SearchOverviewComponent } from './data-outlets/search-overview.component'; -import { SearchPanelComponent } from './data-outlets/search-panel/search-panel.component'; +import { SearchPanelComponent } from './data-outlets/search-panel'; // Import { TimelineComponent } from './data-outlets/timeline/timeline.component'; /* Routes of the DataViewModule */ @@ -22,6 +22,11 @@ const dataViewRoutes: Routes = [ component: SearchPanelComponent, data: { title: 'AWG Online Edition – Search' }, }, + { + path: 'extended', + component: SearchPanelComponent, + data: { title: 'AWG Online Edition – Search' }, + }, { path: 'detail/:id', redirectTo: 'resource/:id' }, // Absolute redirect (replacement of route) to resource/:id, /* Muted for now { path: 'timeline', component: TimelineComponent }, diff --git a/src/app/views/data-view/data-view.module.ts b/src/app/views/data-view/data-view.module.ts index 8a9f64962c..1f2b2f3072 100644 --- a/src/app/views/data-view/data-view.module.ts +++ b/src/app/views/data-view/data-view.module.ts @@ -5,8 +5,9 @@ import { SharedModule } from '@awg-shared/shared.module'; import { ResourceDetailModule } from './data-outlets/resource-detail/resource-detail.module'; // Bibliography module is lazy loaded, so not imported here -import { SearchFormComponent } from './data-outlets/search-panel/search-form/search-form.component'; -import { SearchResultListComponent } from './data-outlets/search-panel/search-result-list/search-result-list.component'; +import { ExtendedSearchFormComponent } from './data-outlets/search-panel/extended-search-form'; +import { FulltextSearchFormComponent } from './data-outlets/search-panel/fulltext-search-form'; +import { SearchResultListComponent } from './data-outlets/search-panel/search-result-list'; /* Routing Module */ import { DataViewRoutingModule, routedDataViewComponents } from './data-view-routing.module'; @@ -15,11 +16,16 @@ import { DataViewRoutingModule, routedDataViewComponents } from './data-view-rou * The dataView module. * * It embeds the data components and their [routing definition]{@link DataViewRoutingModule}, - * the {@link SearchFormComponent}, {@link SearchResultListComponent}, + * the {@link FulltextSearchFormComponent}, {@link SearchResultListComponent}, * as well as the {@link ResourceDetailModule} and {@link SharedModule}. */ @NgModule({ imports: [SharedModule, ResourceDetailModule, DataViewRoutingModule], - declarations: [routedDataViewComponents, SearchFormComponent, SearchResultListComponent], + declarations: [ + routedDataViewComponents, + ExtendedSearchFormComponent, + FulltextSearchFormComponent, + SearchResultListComponent, + ], }) export class DataViewModule {} diff --git a/src/app/views/data-view/services/data-api.service.ts b/src/app/views/data-view/services/data-api.service.ts index e0944c05d9..8ad44597c8 100644 --- a/src/app/views/data-view/services/data-api.service.ts +++ b/src/app/views/data-view/services/data-api.service.ts @@ -10,6 +10,7 @@ import { HlistJson, ResourceContextResponseJson, ResourceFullResponseJson, + ResourceTypesInVocabularyResponseJson, SearchResponseJson, SelectionJson, } from '@awg-shared/api-objects'; @@ -41,6 +42,8 @@ export class DataApiService extends ApiService { */ projectId = '6'; + defaultLanguage = 'de'; + /** * Public variable: resourceSuffix. * @@ -56,6 +59,7 @@ export class DataApiService extends ApiService { */ routes = { resources: 'resources/', + resourcetypes: 'resourcetypes/', search: 'search/', geonames: 'geonames/', hlists: 'hlists/', @@ -106,6 +110,7 @@ export class DataApiService extends ApiService { const queryHttpParams = new HttpParams() .set('searchtype', 'fulltext') .set('filter_by_project', this.projectId) + .set('lang', this.defaultLanguage) .set('show_nrows', sp.nRows) .set('start_at', sp.startAt); @@ -128,6 +133,83 @@ export class DataApiService extends ApiService { ); } + getExtendedSearchData(searchParams: SearchParams): Observable { + if (!searchParams) { + return; + } + + // Default values + const sp: SearchParams = { + query: searchParams.query, + nRows: searchParams.nRows || '-1', + startAt: searchParams.startAt || '0', + view: searchParams.view || SearchParamsViewTypes.table, + }; + + const restypeId = 28; + const propertyId = 195; + const compop = 'EXISTS'; + + // Set path and params of query + const queryPath: string = this.routes.search; + const queryHttpParams = new HttpParams() + .set('searchtype', 'extended') + .set('filter_by_project', this.projectId) + .set('filter_by_restype', restypeId) + .set('property_id', propertyId) + .set('compop', compop) + .set('lang', this.defaultLanguage) + .set('show_nrows', sp.nRows) + .set('start_at', sp.startAt); + + // Cold request to API + const searchData$: Observable = this.getApiResponse( + SearchResponseJson, + queryPath, + queryHttpParams + ); + + // Return converted search response + return searchData$.pipe( + // Default empty value + defaultIfEmpty(new SearchResponseJson()), + + // Map the response to a converted search response object for HTML display + map((searchResponse: SearchResponseJson) => { + console.log(this.httpGetUrl); + + return this.conversionService.convertFullTextSearchResults(searchResponse); + }) + ); + } + + getExtendedSearchTree(): Observable { + const vocabularyId = 4; + + // Set path and params of query + const queryPath: string = this.routes.resourcetypes; + const queryHttpParams = new HttpParams().set('vocabulary', vocabularyId).set('lang', this.defaultLanguage); + + // Cold request to API + const resourcetypesData$: Observable = this.getApiResponse( + ResourceTypesInVocabularyResponseJson, + queryPath, + queryHttpParams + ); + + // Return resource types + return resourcetypesData$.pipe( + // Default empty value + defaultIfEmpty(new ResourceTypesInVocabularyResponseJson()), + + // TODO Map the response to a converted search response object for HTML display + map((resourcetypes: ResourceTypesInVocabularyResponseJson) => { + console.log(this.httpGetUrl); + return resourcetypes; + }) + ); + } + /** * Public method: getResourceData. * From 4f10399f6ac289e8d52ce0c2b057c251f08fd19d Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 1 Feb 2022 02:27:39 +0100 Subject: [PATCH 026/148] refactor(search): rename tabTitles in ResourceDetailComponent --- .../resource-detail/resource-detail.component.html | 6 +++--- .../resource-detail/resource-detail.component.ts | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.html b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.html index 66c370df9e..d865e24ec8 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.html +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.html @@ -25,7 +25,7 @@
- - - + + diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts index b37c31d132..9f8bd0809a 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts @@ -1,11 +1,15 @@ -import { Component, OnInit } from '@angular/core'; +import { Component, EventEmitter, OnInit, Output } from '@angular/core'; import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; -import { faPlus, faTrash } from '@fortawesome/free-solid-svg-icons'; +import { faPlus, faSearch, faTrash } from '@fortawesome/free-solid-svg-icons'; -import { ResourceTypesInVocabularyResponseJson, ResTypeItemJson } from '@awg-shared/api-objects'; +import { ResourceTypesInVocabularyResponseJson, ResTypeItemJson, SearchResponseJson } from '@awg-shared/api-objects'; -import { SearchParams, SearchParamsViewTypes } from '@awg-views/data-view/models'; +import { + ExtendedSearchParams, + ExtendedSearchParamsProperties, + SearchResultsViewTypes, +} from '@awg-views/data-view/models'; import { DataApiService } from '@awg-views/data-view/services'; @Component({ @@ -14,12 +18,15 @@ import { DataApiService } from '@awg-views/data-view/services'; styleUrls: ['./extended-search-form.component.css'], }) export class ExtendedSearchFormComponent implements OnInit { - searchParams: SearchParams = { - query: '', - nRows: '25', - startAt: '0', - view: SearchParamsViewTypes.table, - }; + /** + * Output variable: searchRequest. + * + * It keeps an event emitter for the extended search params. + */ + @Output() + searchRequest: EventEmitter = new EventEmitter(); + + extendedSearchParams: ExtendedSearchParams = new ExtendedSearchParams(); compops = [ { id: 'EXISTS', label: 'EXISTS' }, @@ -42,6 +49,13 @@ export class ExtendedSearchFormComponent implements OnInit { */ faPlus = faPlus; + /** + * Public variable: faSearch. + * + * It instantiates fontawesome's faSearch icon. + */ + faSearch = faSearch; + /** * Public variable: faTrash. * @@ -96,12 +110,27 @@ export class ExtendedSearchFormComponent implements OnInit { } ngOnInit(): void { - this.createFormGroup(); + this.createExtendedSearchForm(); this.getResourcetypes(); } /** - * Public method: createFormGroup. + * Makes the field required if the predicate function returns true + */ + _requiredIfValidator(predicate) { + return formControl => { + if (!formControl.parent) { + return null; + } + if (predicate()) { + return Validators.required(formControl); + } + return null; + }; + } + + /** + * Public method: createExtendedSearchForm. * * It creates the search form using the reactive FormBuilder * with a formGroup and a resource type control and properties control. @@ -110,16 +139,45 @@ export class ExtendedSearchFormComponent implements OnInit { * * @returns {void} Creates the search form. */ - createFormGroup(): void { + createExtendedSearchForm(): void { this.extendedSearchForm = this.formBuilder.group({ - resourcetypeControl: [this.defaultFormString, Validators.required], + resourcetypeControl: ['', Validators.required], propertiesControls: this.formBuilder.array([]), }); - this.addPropertyControl(); + this.addPropertiesControl(); + } + + /** + * Public method: addPropertiesControl. + * + * It creates a single property control using a reactive FormGroup + * with a property control, compop control, and a searchValue control, and pushes this FormGroup to the propertiesControls FormArray. + * + * @returns {void} Creates the form group and adds it to the FormArray. + */ + addPropertiesControl(): void { + const group = this.formBuilder.group({ + propertyControl: ['', [Validators.required]], + compopControl: ['', [Validators.required]], + searchValueControl: [''], + }); + + this.propertiesControls.push(group); + } + + removePropertiesControl(index: number): void { + if (index > -1) { + this.propertiesControls.removeAt(index); + } + } + + clearPropertiesControls() { + this.propertiesControls.clear(); + this.addPropertiesControl(); // Add back first line of property inputs after clearing } getResourcetypes(): void { - this.dataApiService.getExtendedSearchTree().subscribe( + this.dataApiService.getExtendedSearchResourcetypes().subscribe( (restypesResponse: ResourceTypesInVocabularyResponseJson) => { this.restypesResponse = restypesResponse; console.log(this.restypesResponse); @@ -136,55 +194,42 @@ export class ExtendedSearchFormComponent implements OnInit { this.resourcetypeControl.valueChanges.subscribe((resourcetypeId: string) => { this.selectedResourcetype = this.restypesResponse.resourcetypes.find(r => r.id === resourcetypeId); - this.clearPropertyControls(); // Remove all previous property input fields + this.clearPropertiesControls(); // Remove all previous property input fields console.log(resourcetypeId); console.log(this.selectedResourcetype); }); } - /** - * Public method: addPropertyControl. - * - * It creates a FormGroup for the properties controls using the reactive FormBuilder - * with a property control, compop control, and a searchValue control, an pushes this FormGroup to the propertiesControls FormArray. - * - * @returns {void} Creates the form group and adds it to the FormArray. - */ - addPropertyControl(): void { - const group = this.formBuilder.group({ - propertyControl: ['', Validators.required], - compopControl: ['', Validators.required], - searchValueControl: ['', Validators.minLength(3)], - }); - - this.propertiesControls.push(group); - } - - clearPropertyControls() { - this.propertiesControls.clear(); - this.addPropertyControl(); // Add back first line of property inputs after clearing - } - - removePropertyControl(index: number): void { - if (index > -1) { - this.propertiesControls.removeAt(index); - } + onReset(): void { + alert('Gesamte Suchmaske zurücksetzen?'); + this._resetForm(); } onSearch(): void { - console.warn('Submitted form', this.extendedSearchForm.value); - - /* TODO - this.dataApiService.getExtendedSearchData(this.searchParams).subscribe( - (searchResponse: SearchResponseJson) => { - this.results = searchResponse; - console.log(this.results); - }, - error => { - console.error(error as any); - } - );*/ + if (this.extendedSearchForm.valid) { + this.extendedSearchParams = { + resourcetypeId: this.extendedSearchForm.value.resourcetypeControl, + properties: [], + nRows: '25', + startAt: '0', + view: SearchResultsViewTypes.table, + }; + + this.extendedSearchForm.value.propertiesControls.forEach((property, index) => { + this.extendedSearchParams.properties[index] = new ExtendedSearchParamsProperties(); + const p = this.extendedSearchParams.properties[index]; + p.propertyId = property.propertyControl; + p.compop = property.compopControl; + if (property.searchValueControl) { + p.searchValue = property.searchValueControl; + } + }); + + this.searchRequest.emit(this.extendedSearchParams); + + this._resetForm(); + } } isAddButtonDisabled(index: number): string | null { @@ -221,7 +266,7 @@ export class ExtendedSearchFormComponent implements OnInit { return placeholder; } - private _getFormArrayControlValueAtIndex(controlName: string, index: number): unknown { + private _getFormArrayControlValueAtIndex(controlName: string, index: number): any { return this.propertiesControls.controls[index].get(controlName).value; } @@ -252,4 +297,8 @@ export class ExtendedSearchFormComponent implements OnInit { return searchValueMissing; } + + private _resetForm() { + return this.extendedSearchForm.reset(); + } } From 8eb4cb8cdf36c4ddeddb99c4ae09daf589b87346 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 1 Feb 2022 02:45:55 +0100 Subject: [PATCH 031/148] fix(search): adjust DataApiervice to handle ExtendedSearch queries --- .../data-view/services/data-api.service.ts | 41 +++++++++++-------- 1 file changed, 24 insertions(+), 17 deletions(-) diff --git a/src/app/views/data-view/services/data-api.service.ts b/src/app/views/data-view/services/data-api.service.ts index 8ad44597c8..17f13ecef3 100644 --- a/src/app/views/data-view/services/data-api.service.ts +++ b/src/app/views/data-view/services/data-api.service.ts @@ -15,11 +15,12 @@ import { SelectionJson, } from '@awg-shared/api-objects'; import { + ExtendedSearchParams, IResourceDataResponse, ResourceData, ResourceDetail, SearchParams, - SearchParamsViewTypes, + SearchResultsViewTypes, } from '@awg-views/data-view/models'; /** @@ -102,7 +103,7 @@ export class DataApiService extends ApiService { query: searchParams.query, nRows: searchParams.nRows || '-1', startAt: searchParams.startAt || '0', - view: searchParams.view || SearchParamsViewTypes.table, + view: searchParams.view || SearchResultsViewTypes.table, }; // Set path and params of query @@ -133,35 +134,42 @@ export class DataApiService extends ApiService { ); } - getExtendedSearchData(searchParams: SearchParams): Observable { - if (!searchParams) { + getExtendedSearchData(searchParams: ExtendedSearchParams): Observable { + if (!searchParams || !searchParams.resourcetypeId || !searchParams.properties) { return; } // Default values - const sp: SearchParams = { - query: searchParams.query, + const sp: ExtendedSearchParams = { + resourcetypeId: searchParams.resourcetypeId, + properties: searchParams.properties, nRows: searchParams.nRows || '-1', startAt: searchParams.startAt || '0', - view: searchParams.view || SearchParamsViewTypes.table, + view: searchParams.view || SearchResultsViewTypes.table, }; - const restypeId = 28; - const propertyId = 195; - const compop = 'EXISTS'; - // Set path and params of query const queryPath: string = this.routes.search; - const queryHttpParams = new HttpParams() + + let queryHttpParams = new HttpParams() .set('searchtype', 'extended') .set('filter_by_project', this.projectId) - .set('filter_by_restype', restypeId) - .set('property_id', propertyId) - .set('compop', compop) + .set('filter_by_restype', sp.resourcetypeId) .set('lang', this.defaultLanguage) .set('show_nrows', sp.nRows) .set('start_at', sp.startAt); + if (sp.properties.length > 0) { + sp.properties.forEach(p => { + queryHttpParams = queryHttpParams.append('property_id', p.propertyId); + queryHttpParams = queryHttpParams.append('compop', p.compop); + if (p.searchValue) { + queryHttpParams = queryHttpParams.append('searchval', p.searchValue); + } + }); + } + console.log(queryHttpParams); + // Cold request to API const searchData$: Observable = this.getApiResponse( SearchResponseJson, @@ -183,7 +191,7 @@ export class DataApiService extends ApiService { ); } - getExtendedSearchTree(): Observable { + getExtendedSearchResourcetypes(): Observable { const vocabularyId = 4; // Set path and params of query @@ -202,7 +210,6 @@ export class DataApiService extends ApiService { // Default empty value defaultIfEmpty(new ResourceTypesInVocabularyResponseJson()), - // TODO Map the response to a converted search response object for HTML display map((resourcetypes: ResourceTypesInVocabularyResponseJson) => { console.log(this.httpGetUrl); return resourcetypes; From f8910f516fd06a1181c2c139a6c632582531f861 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 1 Feb 2022 02:46:54 +0100 Subject: [PATCH 032/148] fix(search): use tabs to display different search modes --- .../search-panel/search-panel.component.html | 30 ++++++++++++++++--- 1 file changed, 26 insertions(+), 4 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.html b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.html index 138ee7d40c..94fce47702 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.html +++ b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.html @@ -1,14 +1,36 @@ - - - - +
+

Die Anfrage "{{ errorMessage?.route }}" ist fehlgeschlagen.

From da19e77401dff084134a7ebfea3754719cf5a8e8 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 1 Feb 2022 02:47:37 +0100 Subject: [PATCH 033/148] fix(search): adjust SearchPanel to handle different search modes --- .../search-panel/search-panel.component.ts | 212 +++++++++++------- 1 file changed, 133 insertions(+), 79 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts index e3bc931d54..a14479ea12 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts @@ -1,14 +1,16 @@ import { Component, OnDestroy, OnInit } from '@angular/core'; import { ActivatedRoute, NavigationEnd, ParamMap, Router } from '@angular/router'; -import { Observable, Subject } from 'rxjs'; -import { takeUntil } from 'rxjs/operators'; +import { EMPTY, Observable, Subject } from 'rxjs'; +import { filter, map, switchMap, takeUntil } from 'rxjs/operators'; -import { ConversionService, DataStreamerService, LoadingService } from '@awg-core/services'; -import { DataApiService } from '@awg-views/data-view/services'; +import { NgbNavChangeEvent } from '@ng-bootstrap/ng-bootstrap'; +import { ConversionService, DataStreamerService, LoadingService } from '@awg-core/services'; import { SearchResponseJson } from '@awg-shared/api-objects'; -import { SearchParams, SearchParamsViewTypes, SearchResponseWithQuery } from '@awg-views/data-view/models'; + +import { DataApiService } from '@awg-views/data-view/services'; +import { SearchParams, SearchResultsViewTypes, SearchResponseWithQuery } from '@awg-views/data-view/models'; /** * The SearchPanel component. @@ -48,9 +50,26 @@ export class SearchPanelComponent implements OnInit, OnDestroy { query: '', nRows: '25', startAt: '0', - view: SearchParamsViewTypes.table, + view: SearchResultsViewTypes.table, + }; + + /** + * Public variable: searchTabTitles. + * + * It keeps the titles for the tab panels. + */ + searchTabTitles = { + fulltext: 'Volltext-Suche', + extended: 'Erweiterte Suche', }; + /** + * Public variable: selectedTabId. + * + * It keeps the id of the selected tab panel. + */ + selectedTabId: string; + /** * Public variable: errorMessage. * @@ -125,15 +144,23 @@ export class SearchPanelComponent implements OnInit, OnDestroy { * * @returns {void} Sets the search data. * - * @todo Refactor nested subscription. */ getFulltextSearchData(): void { - this.router.events.pipe(takeUntil(this.destroy$)).subscribe( - (e: any) => { - // Check for end of navigation - if (e instanceof NavigationEnd) { + this.router.events + .pipe( + takeUntil(this.destroy$), + filter(event => event instanceof NavigationEnd), + map(() => this.route), + map((route: ActivatedRoute) => { + while (route.firstChild) { + route = route.firstChild; + } + this.activateTab(route.snapshot.url[0].path); + return route; + }), + switchMap((route: ActivatedRoute) => { // Snapshot of current route query params - const qp = this.route.snapshot.queryParamMap; + const qp = route.snapshot.queryParamMap; if (qp !== this.currentQueryParams) { this.currentQueryParams = qp; @@ -147,30 +174,40 @@ export class SearchPanelComponent implements OnInit, OnDestroy { if (this.searchParams.query && !this.viewChanged) { // Fetch search data - return this.dataApiService.getFulltextSearchData(this.searchParams).subscribe( - (searchResponse: SearchResponseJson) => { - // Share search data via streamer service - const searchResponseWithQuery: SearchResponseWithQuery = - new SearchResponseWithQuery(searchResponse, this.searchParams.query); - this.dataStreamerService.updateSearchResponseWithQuery(searchResponseWithQuery); - }, - error => { - this.errorMessage = error as any; - } - ); - } else { - // Console.log('No search query!'); + return this.dataApiService.getFulltextSearchData(this.searchParams); } } - } else { - // Console.log('Routed on same page with same query params'); } + // In any other cases return empty observable + return EMPTY; + }) + ) + .subscribe( + (searchResponse: SearchResponseJson) => { + // Share search data via streamer service + const searchResponseWithQuery: SearchResponseWithQuery = new SearchResponseWithQuery( + searchResponse, + this.searchParams.query + ); + this.dataStreamerService.updateSearchResponseWithQuery(searchResponseWithQuery); + }, + error => { + this.errorMessage = error as any; } - }, - error => { - this.errorMessage = error as any; - } - ); + ); + } + + /** + * Public method: activateTab. + * + * It activates a tab by its id. + * + * @param {string} id The given tab id. + * + * @returns {void} Activates the tab. + */ + activateTab(id: string) { + this.selectedTabId = id; } /** @@ -178,7 +215,7 @@ export class SearchPanelComponent implements OnInit, OnDestroy { * * It sets a new start position value in the searchParams * after a page change request and triggers the - * {@link routeToSelf} method. + * {@link _routeToSelf} method. * * @param {string} requestedStartAt The given start position. * @@ -196,7 +233,7 @@ export class SearchPanelComponent implements OnInit, OnDestroy { view: this.searchParams.view, }; // Route to new params - this.routeToSelf(this.searchParams); + this._routeToSelf(this.searchParams); } } @@ -205,7 +242,7 @@ export class SearchPanelComponent implements OnInit, OnDestroy { * * It sets new row number value in the searchParams * after a row change request and triggers the - * {@link routeToSelf} method. + * {@link _routeToSelf} method. * * @param {string} requestedRows The given row. * @@ -224,35 +261,7 @@ export class SearchPanelComponent implements OnInit, OnDestroy { }; // Route to new params - this.routeToSelf(this.searchParams); - } - } - - /** - * Public method: onViewChange. - * - * It sets new view type value in the searchParams - * after a view change request and triggers the - * {@link routeToSelf} method. - * - * @param {string} requestedView The given view. - * - * @returns {void} Sets the search params and routes to itself. - */ - onViewChange(requestedView: string): void { - if (requestedView !== this.searchParams.view) { - // View has changed - this.viewChanged = true; - - this.searchParams = { - query: this.searchParams.query, - nRows: this.searchParams.nRows, - startAt: this.searchParams.startAt, - view: SearchParamsViewTypes[requestedView], - }; - - // Route to new params - this.routeToSelf(this.searchParams); + this._routeToSelf(this.searchParams); } } @@ -261,7 +270,7 @@ export class SearchPanelComponent implements OnInit, OnDestroy { * * It sets new query value in the searchParams * after a search request and triggers the - * {@link routeToSelf} method. + * {@link _routeToSelf} method. * * @param {string} requestedQuery The given search query. * @@ -280,25 +289,51 @@ export class SearchPanelComponent implements OnInit, OnDestroy { }; // Route to new search params - this.routeToSelf(this.searchParams); + this._routeToSelf(this.searchParams); } } /** - * Public method: routeToSelf. + * Public method: onTabChange. * - * It navigates to itself to set - * new search parameters. + * It triggers the {@link _routeToSelf} method + * after a tab change request to update the URL. * - * @param {SearchParams} sp The given search parameters. - * @returns {void} Navigates to itself. + * @param {NgbNavChangeEvent} tabEvent The given tabEvent with an id of the next route. + * + * @returns {void} Routes to itself with the given id as route. */ - routeToSelf(sp: SearchParams) { - this.router.navigate([], { - relativeTo: this.route, - queryParams: { query: sp.query, nrows: sp.nRows, startAt: sp.startAt, view: sp.view }, - queryParamsHandling: 'merge', - }); + onTabChange(tabEvent: NgbNavChangeEvent) { + // Route to new params + this._routeToSelf(this.searchParams, tabEvent.nextId); + } + + /** + * Public method: onViewChange. + * + * It sets new view type value in the searchParams + * after a view change request and triggers the + * {@link _routeToSelf} method. + * + * @param {string} requestedView The given view. + * + * @returns {void} Sets the search params and routes to itself. + */ + onViewChange(requestedView: string): void { + if (requestedView !== this.searchParams.view) { + // View has changed + this.viewChanged = true; + + this.searchParams = { + query: this.searchParams.query, + nRows: this.searchParams.nRows, + startAt: this.searchParams.startAt, + view: SearchResultsViewTypes[requestedView], + }; + + // Route to new params + this._routeToSelf(this.searchParams); + } } /** @@ -324,11 +359,11 @@ export class SearchPanelComponent implements OnInit, OnDestroy { query: params.get('query') || this.searchParams.query, nRows: params.get('nrows') || this.searchParams.nRows, startAt: params.get('startAt') || this.searchParams.startAt, - view: SearchParamsViewTypes[params.get('view')] || this.searchParams.view, + view: SearchResultsViewTypes[params.get('view')] || this.searchParams.view, }; if (routing) { - this.routeToSelf(this.searchParams); + this._routeToSelf(this.searchParams); } } @@ -345,4 +380,23 @@ export class SearchPanelComponent implements OnInit, OnDestroy { // Unsubscribe from the destroy subject itself this.destroy$.unsubscribe(); } + + /** + * Private method: _routeToSelf. + * + * It navigates to itself to set + * new search parameters. + * + * @param {SearchParams} sp The given search parameters. + * @param {string} [route] Optional route parameter. + * @returns {void} Navigates to itself. + */ + private _routeToSelf(sp: SearchParams, route?: string) { + const commands = route ? [route] : []; + this.router.navigate(commands, { + relativeTo: this.route, + queryParams: { query: sp.query, nrows: sp.nRows, startAt: sp.startAt, view: sp.view }, + queryParamsHandling: 'merge', + }); + } } From 9e2d4609a22451e7e072c6dc6f8b8cd1d703bd98 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 1 Feb 2022 18:44:00 +0100 Subject: [PATCH 034/148] feat(search): add routing to resource detail tabs --- .../resource-detail.component.html | 13 +++-- .../resource-detail.component.ts | 54 ++++++++++++++++--- .../data-view/data-view-routing.module.ts | 15 ++++++ 3 files changed, 70 insertions(+), 12 deletions(-) diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.html b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.html index d865e24ec8..99ab23c505 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.html +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.html @@ -23,8 +23,13 @@ (resourceRequest)="navigateToResource($event)"> -
- Aktueller Suchbegriff + Aktuelle Suchanfrage
{{ - resourceInfoData?.searchResults?.query + resourceInfoData?.searchResults?.query | json }} --- diff --git a/src/app/side-info/search-info/search-info.component.html b/src/app/side-info/search-info/search-info.component.html index ddd14aaaba..1fbdb17338 100644 --- a/src/app/side-info/search-info/search-info.component.html +++ b/src/app/side-info/search-info/search-info.component.html @@ -7,7 +7,7 @@
{{ searchInfoData?.query }} + >{{ searchInfoData?.query | json }}

From 90b23a2011326b17046155b70660c0b0ed6a45f0 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 00:20:51 +0100 Subject: [PATCH 038/148] refactor(search): rename controls of ExtendedSearch --- .../extended-search-form.component.html | 26 +++--- .../extended-search-form.component.ts | 84 ++++++++----------- 2 files changed, 50 insertions(+), 60 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html index 59da479016..f205b23b41 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html @@ -8,7 +8,7 @@ @@ -59,9 +59,9 @@ type="search" id="awg-extended-search-searchValue" class="form-control" - [formControl]="getSearchValueControlAtIndex(idx)" - [attr.disabled]="isSearchValueControlDisabled(idx)" - placeholder="{{ getSearchValuePlaceholder(idx) }}" /> + [formControl]="getSearchvalControlAtIndex(idx)" + [attr.disabled]="isSearchvalControlDisabled(idx)" + placeholder="{{ getSearchvalPlaceholder(idx) }}" />

-

+

{{ searchFormStrings.errorMessage }}
- property: {{ _getFormArrayControlValueAtIndex('propertyControl', idx) }} + property_id[]: {{ _getFormArrayControlAtIndex('propertyIdControl', idx).value }} - compop: {{ _getFormArrayControlValueAtIndex('compopControl', idx) }} + compop[]: {{ _getFormArrayControlAtIndex('compopControl', idx).value }} - searchValue: {{ _getFormArrayControlValueAtIndex('searchValueControl', idx) }} + searchval[]: {{ _getFormArrayControlAtIndex('searchvalControl', idx).value }} - sVDisabled?: {{ isSearchValueControlDisabled(idx) }} + sVDisabled?: {{ isSearchvalControlDisabled(idx) }}
- + diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts index 9f8bd0809a..46543566a9 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts @@ -91,8 +91,8 @@ export class ExtendedSearchFormComponent implements OnInit { /** * Getter for the resource type control value. */ - get resourcetypeControl() { - return this.extendedSearchForm.get('resourcetypeControl'); + get restypeControl() { + return this.extendedSearchForm.get('restypeControl'); } /** @@ -102,13 +102,6 @@ export class ExtendedSearchFormComponent implements OnInit { return this.extendedSearchForm.get('propertiesControls') as FormArray; } - /** - * (Functional) Getter for the searchValue control value. - */ - getSearchValueControlAtIndex(index: number) { - return this.propertiesControls.controls[index].get('searchValueControl'); - } - ngOnInit(): void { this.createExtendedSearchForm(); this.getResourcetypes(); @@ -141,7 +134,7 @@ export class ExtendedSearchFormComponent implements OnInit { */ createExtendedSearchForm(): void { this.extendedSearchForm = this.formBuilder.group({ - resourcetypeControl: ['', Validators.required], + restypeControl: ['', Validators.required], propertiesControls: this.formBuilder.array([]), }); this.addPropertiesControl(); @@ -157,9 +150,9 @@ export class ExtendedSearchFormComponent implements OnInit { */ addPropertiesControl(): void { const group = this.formBuilder.group({ - propertyControl: ['', [Validators.required]], + propertyIdControl: ['', [Validators.required]], compopControl: ['', [Validators.required]], - searchValueControl: [''], + searchvalControl: [''], }); this.propertiesControls.push(group); @@ -191,7 +184,7 @@ export class ExtendedSearchFormComponent implements OnInit { } listenToUserResourcetypeChange(): void { - this.resourcetypeControl.valueChanges.subscribe((resourcetypeId: string) => { + this.restypeControl.valueChanges.subscribe((resourcetypeId: string) => { this.selectedResourcetype = this.restypesResponse.resourcetypes.find(r => r.id === resourcetypeId); this.clearPropertiesControls(); // Remove all previous property input fields @@ -209,21 +202,16 @@ export class ExtendedSearchFormComponent implements OnInit { onSearch(): void { if (this.extendedSearchForm.valid) { this.extendedSearchParams = { - resourcetypeId: this.extendedSearchForm.value.resourcetypeControl, - properties: [], - nRows: '25', - startAt: '0', - view: SearchResultsViewTypes.table, + filterByRestype: this.extendedSearchForm.value.restypeControl, + propertyId: [], + compop: [], + searchval: [], }; this.extendedSearchForm.value.propertiesControls.forEach((property, index) => { - this.extendedSearchParams.properties[index] = new ExtendedSearchParamsProperties(); - const p = this.extendedSearchParams.properties[index]; - p.propertyId = property.propertyControl; - p.compop = property.compopControl; - if (property.searchValueControl) { - p.searchValue = property.searchValueControl; - } + this.extendedSearchParams.propertyId.push(property.propertyIdControl); + this.extendedSearchParams.compop.push(property.compopControl); + this.extendedSearchParams.searchval.push(property.searchvalControl); }); this.searchRequest.emit(this.extendedSearchParams); @@ -233,41 +221,45 @@ export class ExtendedSearchFormComponent implements OnInit { } isAddButtonDisabled(index: number): string | null { - const compopValue = this._getFormArrayControlValueAtIndex('compopControl', index); + const compopValue = this._getFormArrayControlAtIndex('compopControl', index).value; - return this._isPropertyAndCompopMissing(index) || - (compopValue !== 'EXISTS' && this._isSearchValueMissing(index)) || - this.getSearchValueControlAtIndex(index).errors?.minlength || + return this._isPropertyIdAndCompopMissing(index) || + (compopValue !== 'EXISTS' && this._isSearchvalMissing(index)) || + this.getSearchvalControlAtIndex(index).errors?.minlength || this._isNotLastProperty(index) ? '' : null; } - isPropertyControlDisabled(): string | null { + isPropertyIdControlDisabled(): string | null { return this._isResourecetypeMissing() ? '' : null; // Mechanism needed to populate "attr.disabled", cf. https://stackoverflow.com/a/49087915 } isCompopControlDisabled(): string | null { - return this.isPropertyControlDisabled(); + return this.isPropertyIdControlDisabled(); } - isSearchValueControlDisabled(index: number): string | null { - const compopValue = this._getFormArrayControlValueAtIndex('compopControl', index); - return this._isResourecetypeMissing() || this._isPropertyAndCompopMissing(index) || compopValue === 'EXISTS' + isSearchvalControlDisabled(index: number): string | null { + const compopValue = this._getFormArrayControlAtIndex('compopControl', index).value; + return this._isResourecetypeMissing() || this._isPropertyIdAndCompopMissing(index) || compopValue === 'EXISTS' ? '' : null; } - getSearchValuePlaceholder(index: number): string { + getSearchvalControlAtIndex(index: number) { + return this._getFormArrayControlAtIndex('searchvalControl', index); + } + + getSearchvalPlaceholder(index: number): string { let placeholder = 'Suchbegriff'; - if (this.isSearchValueControlDisabled(index)) { + if (this.isSearchvalControlDisabled(index)) { placeholder = '---'; } return placeholder; } - private _getFormArrayControlValueAtIndex(controlName: string, index: number): any { - return this.propertiesControls.controls[index].get(controlName).value; + private _getFormArrayControlAtIndex(controlName: string, index: number): any { + return this.propertiesControls.controls[index].get(controlName); } private _isNotLastProperty(index: number): boolean { @@ -277,13 +269,13 @@ export class ExtendedSearchFormComponent implements OnInit { } private _isResourecetypeMissing(): boolean { - const resourceValue = this.resourcetypeControl.value; + const resourceValue = this.restypeControl.value; return !resourceValue || resourceValue === this.defaultFormString; } - private _isPropertyAndCompopMissing(index: number): boolean { - const propertyValue = this._getFormArrayControlValueAtIndex('propertyControl', index); - const compopValue = this._getFormArrayControlValueAtIndex('compopControl', index); + private _isPropertyIdAndCompopMissing(index: number): boolean { + const propertyValue = this._getFormArrayControlAtIndex('propertyIdControl', index).value; + const compopValue = this._getFormArrayControlAtIndex('compopControl', index).value; const propertyMissing = !propertyValue || propertyValue === this.defaultFormString; const compopMissing = !compopValue || compopValue === this.defaultFormString; @@ -291,11 +283,9 @@ export class ExtendedSearchFormComponent implements OnInit { return propertyMissing || compopMissing; } - private _isSearchValueMissing(index: number): boolean { - const searchValue = this._getFormArrayControlValueAtIndex('searchValueControl', index); - const searchValueMissing = !searchValue || searchValue === this.defaultFormString; - - return searchValueMissing; + private _isSearchvalMissing(index: number): boolean { + const searchval = this._getFormArrayControlAtIndex('searchvalControl', index); + return !searchval || searchval === this.defaultFormString; } private _resetForm() { From 169393550ccaf1a39a67b8ab44a6ec2266f0ead2 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 00:25:51 +0100 Subject: [PATCH 039/148] build(deps-dev): remove pretty-quick --- .husky/pre-commit | 1 - .lintstagedrc.json | 2 +- package.json | 2 -- yarn.lock | 53 +--------------------------------------------- 4 files changed, 2 insertions(+), 56 deletions(-) diff --git a/.husky/pre-commit b/.husky/pre-commit index e2846a865e..8b393a8996 100755 --- a/.husky/pre-commit +++ b/.husky/pre-commit @@ -3,4 +3,3 @@ # cf. https://typicode.github.io/husky/#/?id=package-scripts yarn run lint-staged -yarn run format:fix-staged diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 6ce67a92c2..2cce5c033c 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,3 +1,3 @@ { - "src/**/*.{ts,html}": ["yarn lint-files:fix"] + "src/**/*": ["yarn lint-files:fix", "yarn format:write"] } diff --git a/package.json b/package.json index 01645d1101..038ad460d2 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,6 @@ "tslint-check": "tslint-config-prettier-check ./tslint.json", "format:check": "prettier --check \"src/**/*.{ts,js,css,html}\"", "format:write": "prettier --write \"src/**/*.{ts,js,css,html}\"", - "format:fix-staged": "pretty-quick --staged", "-- DOCS --": "", "doc": "yarn compodoc --tsconfig tsconfig.doc.json --theme Readthedocs --output dist/awg-app/compodoc", "doc:build": "yarn doc", @@ -145,7 +144,6 @@ "karma-jasmine-html-reporter": "^1.7.0", "lint-staged": "^12.1.7", "prettier": "^2.5.1", - "pretty-quick": "^3.1.3", "source-map-explorer": "^2.5.2", "standard-version": "^9.3.2", "typescript": "~4.5.4", diff --git a/yarn.lock b/yarn.lock index e8ba9bcd3a..4c8951c554 100644 --- a/yarn.lock +++ b/yarn.lock @@ -3100,11 +3100,6 @@ resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" integrity sha1-7ihweulOEdK4J7y+UnC86n8+ce4= -"@types/minimatch@^3.0.3": - version "3.0.4" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.4.tgz#f0ec25dbf2f0e4b18647313ac031134ca5b24b21" - integrity sha512-1z8k4wzFnNjVK/tlxvrWuK5WMt6mydWWP7+zvH5eFep4oj+UkrfiJTRtjCeBXNpwaA/FYqqtb4/QS4ianFpIRA== - "@types/minimist@^1.2.0": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" @@ -3741,11 +3736,6 @@ aria-query@^4.2.2: "@babel/runtime" "^7.10.2" "@babel/runtime-corejs3" "^7.10.2" -array-differ@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/array-differ/-/array-differ-3.0.0.tgz#3cbb3d0f316810eafcc47624734237d6aee4ae6b" - integrity sha512-THtfYS6KtME/yIAhKjZ2ul7XI96lQGHRputJQHO80LAWQnuGP4iCIN8vdMRboGbIEYBwU33q8Tch1os2+X0kMg== - array-flatten@1.1.1: version "1.1.1" resolved "https://registry.yarnpkg.com/array-flatten/-/array-flatten-1.1.1.tgz#9a5f699051b1e7073328f2a008968b64ea2955d2" @@ -3813,11 +3803,6 @@ arrify@^1.0.1: resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" integrity sha1-iYUI2iIm84DfkEcoRWhJwVAaSw0= -arrify@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/arrify/-/arrify-2.0.1.tgz#c9655e9331e0abcd588d2a7cad7e9956f66701fa" - integrity sha512-3duEwti880xqi4eAMN8AyR4a0ByT90zoYdLlevfrvU43vb0YZwZVfxOgxWrLXXXpyugL0hNZc9G6BiB5B3nUug== - asn1@~0.2.3: version "0.2.4" resolved "https://registry.yarnpkg.com/asn1/-/asn1-0.2.4.tgz#8d2475dfab553bb33e77b54e59e880bb8ce23136" @@ -5022,14 +5007,6 @@ chalk@^2.0.0, chalk@^2.4.2: escape-string-regexp "^1.0.5" supports-color "^5.3.0" -chalk@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/chalk/-/chalk-3.0.0.tgz#3f73c2bf526591f574cc492c51e2456349f844e4" - integrity sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg== - dependencies: - ansi-styles "^4.1.0" - supports-color "^7.1.0" - chalk@^4.0.0, chalk@^4.1.0, chalk@^4.1.1, chalk@^4.1.2: version "4.1.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-4.1.2.tgz#aac4e2b7734a740867aeb16bf02aad556a1e7a01" @@ -6974,7 +6951,7 @@ events@^3.2.0: resolved "https://registry.yarnpkg.com/events/-/events-3.3.0.tgz#31a95ad0a924e2d2c419a813aeb2c4e878ea7400" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== -execa@^4.0.0, execa@^4.0.2: +execa@^4.0.2: version "4.1.0" resolved "https://registry.yarnpkg.com/execa/-/execa-4.1.0.tgz#4e5491ad1572f2f17a77d388c6c857135b22847a" integrity sha512-j5W0//W7f8UxAn8hXVnwG8tLwdiUy4FJLcSupCg6maBYZDpyBvTApK7KyuI4bKj8KOh1r2YH+6ucuYtJv1bTZA== @@ -9401,11 +9378,6 @@ morgan@^1.10.0: on-finished "~2.3.0" on-headers "~1.0.2" -mri@^1.1.5: - version "1.1.6" - resolved "https://registry.yarnpkg.com/mri/-/mri-1.1.6.tgz#49952e1044db21dbf90f6cd92bc9c9a777d415a6" - integrity sha512-oi1b3MfbyGa7FJMP9GmLTttni5JoICpYBRlq+x5V16fZbLsnL9N3wFqqIm/nIG43FjUFkFh9Epzp/kzUGUnJxQ== - ms@2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8" @@ -9439,17 +9411,6 @@ multicast-dns@^6.0.1: dns-packet "^1.3.1" thunky "^1.0.2" -multimatch@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/multimatch/-/multimatch-4.0.0.tgz#8c3c0f6e3e8449ada0af3dd29efb491a375191b3" - integrity sha512-lDmx79y1z6i7RNx0ZGCPq1bzJ6ZoDDKbvh7jxr9SJcWLkShMzXrHbYVpTdnhNM5MXpDUxCQ4DgqVttVXlBgiBQ== - dependencies: - "@types/minimatch" "^3.0.3" - array-differ "^3.0.0" - array-union "^2.1.0" - arrify "^2.0.1" - minimatch "^3.0.4" - mute-stream@0.0.8: version "0.0.8" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-0.0.8.tgz#1630c42b2251ff81e2a283de96a5497ea92e5e0d" @@ -10646,18 +10607,6 @@ pretty-bytes@^5.3.0: resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-5.6.0.tgz#356256f643804773c82f64723fe78c92c62beaeb" integrity sha512-FFw039TmrBqFK8ma/7OL3sDz/VytdtJr044/QUJtH0wK9lb9jLq9tJyIxUwtQJHwar2BqtiA4iCWSwo9JLkzFg== -pretty-quick@^3.1.3: - version "3.1.3" - resolved "https://registry.yarnpkg.com/pretty-quick/-/pretty-quick-3.1.3.tgz#15281108c0ddf446675157ca40240099157b638e" - integrity sha512-kOCi2FJabvuh1as9enxYmrnBC6tVMoVOenMaBqRfsvBHB0cbpYHjdQEpSglpASDFEXVwplpcGR4CLEaisYAFcA== - dependencies: - chalk "^3.0.0" - execa "^4.0.0" - find-up "^4.1.0" - ignore "^5.1.4" - mri "^1.1.5" - multimatch "^4.0.0" - private@^0.1.6, private@^0.1.8: version "0.1.8" resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff" From f95034f2fd8d4b22268e12d4f53482dfa966bbc2 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 00:27:34 +0100 Subject: [PATCH 040/148] style(app): reformat files with prettier --- src/app/views/edition-view/models/edition-constants.ts | 6 ++---- src/testing/mock-data/mockResourceDetail.ts | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/app/views/edition-view/models/edition-constants.ts b/src/app/views/edition-view/models/edition-constants.ts index dd7a43a6db..4f2ca1c573 100644 --- a/src/app/views/edition-view/models/edition-constants.ts +++ b/src/app/views/edition-view/models/edition-constants.ts @@ -215,8 +215,7 @@ export class EditionConstants { static readonly FIRM_JE_NO_9_LIN_28: EditionRoute = { route: 'assets/img/edition/series1/section5/op12/firm_je_no9_lin28.png', short: '[JE] | No. 9 | 28 linig.', - full: - 'J. E. & Co. [diagonal ansteigend auf schildförmiger Papierrolle, rechts von einem Löwen gehalten, links und unten Blattgirlande] | No. 9 | 28 linig.', + full: 'J. E. & Co. [diagonal ansteigend auf schildförmiger Papierrolle, rechts von einem Löwen gehalten, links und unten Blattgirlande] | No. 9 | 28 linig.', }; /** @@ -225,8 +224,7 @@ export class EditionConstants { static readonly FIRM_JE_NO_15_LIN_16: EditionRoute = { route: 'assets/img/edition/series1/section5/op25/firm_je_no15_lin16.png', short: '[JE] | No. 15 | 16 linig.', - full: - 'J. E. & Co. [diagonal ansteigend auf schildförmiger Papierrolle, rechts von einem Löwen gehalten, links und unten Blattgirlande] | No. 15 | 16 linig.', + full: 'J. E. & Co. [diagonal ansteigend auf schildförmiger Papierrolle, rechts von einem Löwen gehalten, links und unten Blattgirlande] | No. 15 | 16 linig.', }; /** diff --git a/src/testing/mock-data/mockResourceDetail.ts b/src/testing/mock-data/mockResourceDetail.ts index 0e3c4c90f5..11932fc254 100644 --- a/src/testing/mock-data/mockResourceDetail.ts +++ b/src/testing/mock-data/mockResourceDetail.ts @@ -121,13 +121,11 @@ export const mockResourceDetail = { links: [ { id: '2173508', - value: - 'Vier Stücke für Geige und Klavier op. 7: Aufführung (Egon Ledeč, Vl.;  Karel Reiner, Klav.). Programm: Webern, op. 7; Leopold Spinner, Zwei kleine Stücke für Geige und Klavier (1934); Ernst Kanitz, Fünf Tänze für Klavier, Nr. 1 und 3; Hans Erich Apostel, Sonatina ritmica op. 5; Egon Wellesz, Sonate für Violine solo op. 36; Ernst Krenek, Toccata und Chaconne für Klavier op. 13; Paul Amadeus Pisk, Rondo-Suite für Violine und Klavier op. 27.\r', + value: 'Vier Stücke für Geige und Klavier op. 7: Aufführung (Egon Ledeč, Vl.;  Karel Reiner, Klav.). Programm: Webern, op. 7; Leopold Spinner, Zwei kleine Stücke für Geige und Klavier (1934); Ernst Kanitz, Fünf Tänze für Klavier, Nr. 1 und 3; Hans Erich Apostel, Sonatina ritmica op. 5; Egon Wellesz, Sonate für Violine solo op. 36; Ernst Krenek, Toccata und Chaconne für Klavier op. 13; Paul Amadeus Pisk, Rondo-Suite für Violine und Klavier op. 27.\r', restype: { id: '28', label: 'Chronologie', - icon: - 'https://www.salsah.org:443/core/location.php?table=resource_type&field=icon&keyfield=id&keyvalue=28', + icon: 'https://www.salsah.org:443/core/location.php?table=resource_type&field=icon&keyfield=id&keyvalue=28', }, }, ], From f3c530d9407ad3cfe4a04a53e5e9200c4f34d08e Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 00:30:42 +0100 Subject: [PATCH 041/148] fix(search): adjust type of search queries --- .../resource-info/resource-info.component.ts | 2 +- .../side-info-models/search-info.model.ts | 10 +++-- src/app/views/data-view/models/index.ts | 9 +--- .../data-view/models/search-params.model.ts | 45 +++++-------------- .../search-response-with-query.model.ts | 9 ++-- 5 files changed, 25 insertions(+), 50 deletions(-) diff --git a/src/app/side-info/resource-info/resource-info.component.ts b/src/app/side-info/resource-info/resource-info.component.ts index 542c4e1f25..318bbbc8df 100644 --- a/src/app/side-info/resource-info/resource-info.component.ts +++ b/src/app/side-info/resource-info/resource-info.component.ts @@ -8,7 +8,7 @@ import { switchMap, takeUntil } from 'rxjs/operators'; import { faArrowLeft, faChevronLeft, faChevronRight, faTimesCircle } from '@fortawesome/free-solid-svg-icons'; import { DataStreamerService } from '@awg-core/services'; -import { SearchResponseWithQuery } from '@awg-views/data-view/models'; +import { SearchQuery, SearchResponseWithQuery } from '@awg-views/data-view/models'; import { ResourceInfo, ResourceInfoResource } from '@awg-side-info/side-info-models'; /** diff --git a/src/app/side-info/side-info-models/search-info.model.ts b/src/app/side-info/side-info-models/search-info.model.ts index a8714a90ff..34e8fb218f 100644 --- a/src/app/side-info/side-info-models/search-info.model.ts +++ b/src/app/side-info/side-info-models/search-info.model.ts @@ -1,3 +1,5 @@ +import { SearchQuery } from '@awg-views/data-view/models'; + /** * The SearchInfo class. * @@ -6,9 +8,9 @@ */ export class SearchInfo { /** - * The query string of a search. + * The query of a search (string or ExtendedSearchParams). */ - query: string; + query: SearchQuery; /** * The number of hits of a search. @@ -22,10 +24,10 @@ export class SearchInfo { * from a given query and number of hits * of a search. * - * @param {string} query The given query string. + * @param {SearchQuery} query The given search query. * @param {string} nhits The given number of hits. */ - constructor(query: string, nhits: string) { + constructor(query: SearchQuery, nhits: string) { this.query = query; this.nhits = nhits; } diff --git a/src/app/views/data-view/models/index.ts b/src/app/views/data-view/models/index.ts index 0c283d82f9..7783870cc0 100644 --- a/src/app/views/data-view/models/index.ts +++ b/src/app/views/data-view/models/index.ts @@ -15,17 +15,11 @@ import { ResourceDetailImage } from './resource-detail-image.model'; import { ResourceDetailIncomingLink } from './resource-detail-incoming-link.model'; import { ResourceDetailProperty } from './resource-detail-property.model'; import { ResourceDetailGroupedIncomingLinks } from './resource-detail-grouped-incoming-links.model'; -import { - ExtendedSearchParams, - ExtendedSearchParamsProperties, - SearchParams, - SearchResultsViewTypes, -} from './search-params.model'; +import { ExtendedSearchParams, SearchQuery, SearchParams, SearchResultsViewTypes } from './search-params.model'; import { SearchResponseWithQuery } from './search-response-with-query.model'; export { ExtendedSearchParams, - ExtendedSearchParamsProperties, IResourceDataResponse, ResourceData, ResourceDetail, @@ -35,6 +29,7 @@ export { ResourceDetailIncomingLink, ResourceDetailProperty, ResourceDetailGroupedIncomingLinks, + SearchQuery, SearchParams, SearchResultsViewTypes, SearchResponseWithQuery, diff --git a/src/app/views/data-view/models/search-params.model.ts b/src/app/views/data-view/models/search-params.model.ts index 1de233a25d..5ca2545844 100644 --- a/src/app/views/data-view/models/search-params.model.ts +++ b/src/app/views/data-view/models/search-params.model.ts @@ -8,6 +8,11 @@ export enum SearchResultsViewTypes { grid = 'grid', } +/** + * Describes a type that can be either string or ExtendedSearchParams object. + */ +export type SearchQuery = string | ExtendedSearchParams; + /** * The SearchParams class. * @@ -16,9 +21,9 @@ export enum SearchResultsViewTypes { */ export class SearchParams { /** - * The query string. + * The search query (string or ExtendedSearchParams). */ - query: string; + query: SearchQuery; /** * The number of rows to return per result list page. @@ -46,48 +51,20 @@ export class ExtendedSearchParams { /** * The ID of a resource type. */ - resourcetypeId: number; - - /** - * The properties fields. - */ - properties: ExtendedSearchParamsProperties[]; - - /** - * The number of rows to return per result list page. - */ - nRows: string; - - /** - * The position in the result list to start at. - */ - startAt: string; + filterByRestype: string; - /** - * The requested view type ('table', 'grid'). - */ - view: SearchResultsViewTypes; -} - -/** - * The ExtendedSearchParamsProperties class. - * - * It is used in the context of the extended search - * to store the data for the searched properties params. - */ -export class ExtendedSearchParamsProperties { /** * The ID of a property to be searched. */ - propertyId: number; + propertyId: string[]; /** * The comparison operator to be applied. */ - compop: string; + compop: string[]; /** * The search value string. */ - searchValue: string; + searchval: string[]; } diff --git a/src/app/views/data-view/models/search-response-with-query.model.ts b/src/app/views/data-view/models/search-response-with-query.model.ts index caa5403b99..9e26754454 100644 --- a/src/app/views/data-view/models/search-response-with-query.model.ts +++ b/src/app/views/data-view/models/search-response-with-query.model.ts @@ -1,4 +1,5 @@ import { SearchResponseJson } from '@awg-shared/api-objects'; +import { ExtendedSearchParams, SearchQuery } from '@awg-views/data-view/models'; /** * The SearchResponseWithQuery class. @@ -14,9 +15,9 @@ export class SearchResponseWithQuery { data: SearchResponseJson; /** - * The query string. + * The query string or extended search object. */ - query: string; + query: SearchQuery; /** * Constructor of the SearchResponseWithQuery class. @@ -25,9 +26,9 @@ export class SearchResponseWithQuery { * search response and the corresponding query string. * * @param {SearchResponseJson} data The given search response. - * @param {string} query The given query string. + * @param {SearchQuery} query The given search query. */ - constructor(data: SearchResponseJson, query: string) { + constructor(data: SearchResponseJson, query: SearchQuery) { this.data = data; this.query = query; } From a9c3c62d7269eed1f321313e198ff8cec6352501 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 00:39:15 +0100 Subject: [PATCH 042/148] refactor(search): rename destroy$ subjects --> destroyed$ --- .../resource-info/resource-info.component.ts | 12 +++--- .../fulltext-search-form.component.ts | 40 +++++++++++++++++-- .../search-panel/search-panel.component.ts | 22 +++++----- 3 files changed, 53 insertions(+), 21 deletions(-) diff --git a/src/app/side-info/resource-info/resource-info.component.ts b/src/app/side-info/resource-info/resource-info.component.ts index 318bbbc8df..0527766bb9 100644 --- a/src/app/side-info/resource-info/resource-info.component.ts +++ b/src/app/side-info/resource-info/resource-info.component.ts @@ -89,11 +89,11 @@ export class ResourceInfoComponent implements OnInit, OnDestroy { resultSize: number; /** - * Private variable: _destroy$. + * Private variable: _destroyed$. * * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. */ - private _destroy$: Subject = new Subject(); + private _destroyed$: Subject = new Subject(); /** * Constructor of the ResourceInfoComponent. @@ -149,7 +149,7 @@ export class ResourceInfoComponent implements OnInit, OnDestroy { // Return search response with query from streamer service return this.streamerService.getSearchResponseWithQuery(); }), - takeUntil(this._destroy$) + takeUntil(this._destroyed$) ) .subscribe( (res: SearchResponseWithQuery) => { @@ -231,10 +231,10 @@ export class ResourceInfoComponent implements OnInit, OnDestroy { */ ngOnDestroy() { // Emit truthy value to end all subscriptions - this._destroy$.next(true); + this._destroyed$.next(true); - // Now let's also unsubscribe from the subject itself: - this._destroy$.unsubscribe(); + // Complete the subject itself + this._destroyed$.complete(); } /** diff --git a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts index 89d8c691c7..705297fe11 100644 --- a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts @@ -1,7 +1,17 @@ -import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnChanges, Output } from '@angular/core'; +import { + ChangeDetectionStrategy, + Component, + EventEmitter, + Input, + OnChanges, + OnDestroy, + OnInit, + Output, +} from '@angular/core'; import { FormBuilder, FormGroup, Validators } from '@angular/forms'; -import { debounceTime, distinctUntilChanged, filter } from 'rxjs/operators'; +import { Subject } from 'rxjs'; +import { debounceTime, distinctUntilChanged, filter, takeUntil } from 'rxjs/operators'; import { faSearch } from '@fortawesome/free-solid-svg-icons'; @@ -18,7 +28,7 @@ import { faSearch } from '@fortawesome/free-solid-svg-icons'; styleUrls: ['./fulltext-search-form.component.css'], changeDetection: ChangeDetectionStrategy.OnPush, }) -export class FulltextSearchFormComponent implements OnChanges { +export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy { /** * Input variable: searchValue. * @@ -60,6 +70,13 @@ export class FulltextSearchFormComponent implements OnChanges { errorMessage: 'Es wird ein Suchbegriff mit mindestens 3 Zeichen benötigt!', }; + /** + * Private variable: _destroyed$. + * + * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. + */ + private _destroyed$: Subject = new Subject(); + /** * Constructor of the SearchFormComponent. * @@ -120,7 +137,8 @@ export class FulltextSearchFormComponent implements OnChanges { // Do not check changes before half a second debounceTime(500), // Do not check unchanged values - distinctUntilChanged() + distinctUntilChanged(), + takeUntil(this._destroyed$) ) .subscribe((query: string) => this.onSearch(query)); } @@ -150,4 +168,18 @@ export class FulltextSearchFormComponent implements OnChanges { onSearch(query: string): void { this.searchRequest.emit(query); } + + /** + * Angular life cycle hook: ngOnDestroy. + * + * It calls the containing methods + * when destroying the component. + */ + ngOnDestroy() { + // Emit truthy value to end all subscriptions + this._destroyed$.next(true); + + // Complete the destroy subject itself + this._destroyed$.complete(); + } } diff --git a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts index 3d1372f087..d74f923b26 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts @@ -27,13 +27,6 @@ import { SearchParams, SearchResultsViewTypes, SearchResponseWithQuery } from '@ styleUrls: ['./search-panel.component.css'], }) export class SearchPanelComponent implements OnInit, OnDestroy { - /** - * Public variable: destroy$. - * - * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. - */ - destroy$: Subject = new Subject(); - /** * Public variable: currentQueryParams. * @@ -79,6 +72,13 @@ export class SearchPanelComponent implements OnInit, OnDestroy { */ viewChanged = false; + /** + * Private variable: _destroyed$. + * + * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. + */ + private _destroyed$: Subject = new Subject(); + /** * Constructor of the SearchPanelComponent. * @@ -176,7 +176,7 @@ export class SearchPanelComponent implements OnInit, OnDestroy { // In any other cases return empty observable return EMPTY; }), - takeUntil(this.destroy$) + takeUntil(this._destroyed$) ) .subscribe( (searchResponse: SearchResponseJson) => { @@ -376,10 +376,10 @@ export class SearchPanelComponent implements OnInit, OnDestroy { */ ngOnDestroy() { // Emit truthy value to end all subscriptions - this.destroy$.next(true); + this._destroyed$.next(true); - // Unsubscribe from the destroy subject itself - this.destroy$.unsubscribe(); + // Complete the destroy subject itself + this._destroyed$.complete(); } /** From cf162f95aae5727ca9b4bbc87adcffc16c9d65f2 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 00:50:07 +0100 Subject: [PATCH 043/148] build(app): rename prettier scripts --- .lintstagedrc.json | 2 +- package.json | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.lintstagedrc.json b/.lintstagedrc.json index 2cce5c033c..d9f3cca906 100644 --- a/.lintstagedrc.json +++ b/.lintstagedrc.json @@ -1,3 +1,3 @@ { - "src/**/*": ["yarn lint-files:fix", "yarn format:write"] + "src/**/*": ["yarn lint-files:fix", "yarn format-files:fix"] } diff --git a/package.json b/package.json index 038ad460d2..cfa78ab0ce 100644 --- a/package.json +++ b/package.json @@ -52,8 +52,8 @@ "lint-files:fix": "yarn lint-files --fix", "lint-staged": "lint-staged", "tslint-check": "tslint-config-prettier-check ./tslint.json", - "format:check": "prettier --check \"src/**/*.{ts,js,css,html}\"", - "format:write": "prettier --write \"src/**/*.{ts,js,css,html}\"", + "format-files:check": "prettier --check \"src/**/*.{ts,js,css,html}\"", + "format-files:fix": "prettier --write \"src/**/*.{ts,js,css,html}\"", "-- DOCS --": "", "doc": "yarn compodoc --tsconfig tsconfig.doc.json --theme Readthedocs --output dist/awg-app/compodoc", "doc:build": "yarn doc", From 178612fc8663f18fc013192f290da6a53e1482e9 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 00:52:29 +0100 Subject: [PATCH 044/148] refactor(search): rename searchval controls in FullTextSearch --- .../fulltext-search-form.component.html | 6 +++--- .../fulltext-search-form.component.ts | 18 ++++++++++-------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html index 4bacd6b8fd..f1b161b8fc 100644 --- a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.html @@ -13,14 +13,14 @@ type="search" id="awg-fulltext-search-searchValue" class="form-control" - formControlName="searchValueControl" + formControlName="searchvalControl" aria-label="Search input" aria-describedby="search-icon" placeholder="{{ searchFormStrings.placeholder }}" required />
-
-

+
+

{{ searchFormStrings.errorMessage }}
diff --git a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts index 705297fe11..5f0d1da5ca 100644 --- a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts @@ -93,8 +93,8 @@ export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy /** * Getter for the search value control value. */ - get searchValueControl() { - return this.searchForm.get('searchValueControl'); + get searchvalControl() { + return this.searchForm.get('searchvalControl'); } /** @@ -116,7 +116,7 @@ export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy */ createFulltextSearchForm(): void { this.searchForm = this.formBuilder.group({ - searchValueControl: ['', Validators.compose([Validators.required, Validators.minLength(3)])], + searchvalControl: ['', Validators.compose([Validators.required, Validators.minLength(3)])], }); } @@ -130,7 +130,7 @@ export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy * @returns {void} Listens to changing search values. */ listenToUserInputChange(): void { - this.searchValueControl.valueChanges + this.searchvalControl.valueChanges .pipe( // At least 3 characters filter(x => x.length >= 3), @@ -144,7 +144,7 @@ export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy } /** - * Public method: setSearchValueFromInput. + * Public method: setSearchvalFromInput. * * It sets the value of the search value control * from the searchValue input. @@ -153,8 +153,8 @@ export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy * * @returns {void} Sets the search value control. */ - setSearchValueFromInput(): void { - this.searchValueControl.setValue(this.searchValue); + setSearchvalFromInput(): void { + this.searchvalControl.setValue(this.searchValue); } /** @@ -166,7 +166,9 @@ export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy * @returns {void} Emits the search query. */ onSearch(query: string): void { - this.searchRequest.emit(query); + if (this.searchForm.valid) { + this.searchRequest.emit(query); + } } /** From 3f613962760736335d8768c7bd92b5bd4b901192 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 00:59:06 +0100 Subject: [PATCH 045/148] refactor(search): rename formBuilder instances --- .../side-info/resource-info/resource-info.component.ts | 10 +++++++--- .../fulltext-search-form.component.ts | 8 ++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/app/side-info/resource-info/resource-info.component.ts b/src/app/side-info/resource-info/resource-info.component.ts index 0527766bb9..5d85b037e2 100644 --- a/src/app/side-info/resource-info/resource-info.component.ts +++ b/src/app/side-info/resource-info/resource-info.component.ts @@ -103,11 +103,15 @@ export class ResourceInfoComponent implements OnInit, OnDestroy { * DataStreamerService instance * to get the streamed search results. * - * @param {FormBuilder} fb Instance of the FormBuilder. + * @param {FormBuilder} formBuilder Instance of the FormBuilder. * @param {Router} router Instance of the Router. * @param {DataStreamerService} streamerService Instance of the DataStreamerService. */ - constructor(private fb: FormBuilder, private router: Router, private streamerService: DataStreamerService) {} + constructor( + private formBuilder: FormBuilder, + private router: Router, + private streamerService: DataStreamerService + ) {} /** * Getter for the current index position of the form group. @@ -288,7 +292,7 @@ export class ResourceInfoComponent implements OnInit, OnDestroy { private _buildForm(index: number, resultSize: number): void { const regexPattern = /^[1-9]\d{0,9}$/; // Match any up-to 10-digit integer greater 0 - this.resourceInfoFormGroup = this.fb.group({ + this.resourceInfoFormGroup = this.formBuilder.group({ resourceInfoIndex: [ index || '', Validators.compose([ diff --git a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts index 5f0d1da5ca..5f739f595d 100644 --- a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts @@ -80,15 +80,11 @@ export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy /** * Constructor of the SearchFormComponent. * - * It declares a private FormBuilder instance - * and initializes the search form. + * It declares a private FormBuilder instance. * * @param {FormBuilder} formBuilder Instance of the FormBuilder. */ - constructor(private formBuilder: FormBuilder) { - this.createFulltextSearchForm(); - this.listenToUserInputChange(); - } + constructor(private formBuilder: FormBuilder) {} /** * Getter for the search value control value. From ef4f4bb0458811dd283c9a59d734f71043053fc0 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 3 Feb 2022 01:02:09 +0100 Subject: [PATCH 046/148] fix(search): clean up code --- .../extended-search-form.component.ts | 14 ++++---------- .../search-result-list.component.html | 4 ++-- 2 files changed, 6 insertions(+), 12 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts index 46543566a9..65638e884f 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts @@ -1,15 +1,11 @@ import { Component, EventEmitter, OnInit, Output } from '@angular/core'; -import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms'; +import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; import { faPlus, faSearch, faTrash } from '@fortawesome/free-solid-svg-icons'; -import { ResourceTypesInVocabularyResponseJson, ResTypeItemJson, SearchResponseJson } from '@awg-shared/api-objects'; +import { ResourceTypesInVocabularyResponseJson, ResTypeItemJson } from '@awg-shared/api-objects'; -import { - ExtendedSearchParams, - ExtendedSearchParamsProperties, - SearchResultsViewTypes, -} from '@awg-views/data-view/models'; +import { ExtendedSearchParams } from '@awg-views/data-view/models'; import { DataApiService } from '@awg-views/data-view/services'; @Component({ @@ -40,8 +36,6 @@ export class ExtendedSearchFormComponent implements OnInit { defaultFormString = '---'; - displaySearchValue = false; - /** * Public variable: faPlus. * @@ -78,7 +72,7 @@ export class ExtendedSearchFormComponent implements OnInit { /** * Public variable: searchFormString. * - * It keeps the default texts for the search form. + * It keeps the default text strings for the search form. */ searchFormStrings = { label: 'Search Input', diff --git a/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.html b/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.html index df8850c6eb..b5894282eb 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.html +++ b/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.html @@ -85,7 +85,7 @@ - + @@ -101,7 +101,7 @@
- +
diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts index 030f84a510..9a63fccc54 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts @@ -3,11 +3,17 @@ import { FormArray, FormBuilder, FormGroup, Validators } from '@angular/forms'; import { faPlus, faSearch, faTrash } from '@fortawesome/free-solid-svg-icons'; -import { ResourceTypesInVocabularyResponseJson, ResTypeItemJson } from '@awg-shared/api-objects'; +import { + PropertyTypesInResourceClassResponseJson, + ResourceTypesInVocabularyResponseJson, + ResTypeItemJson, +} from '@awg-shared/api-objects'; import { ExtendedSearchParams } from '@awg-views/data-view/models'; import { DataApiService } from '@awg-views/data-view/services'; +import { SEARCH_COMPOP_LISTS, SearchCompop, VALUETYPE_LIST } from './compop'; + @Component({ selector: 'awg-extended-search-form', templateUrl: './extended-search-form.component.html', @@ -22,20 +28,6 @@ export class ExtendedSearchFormComponent implements OnInit { @Output() searchRequest: EventEmitter = new EventEmitter(); - extendedSearchParams: ExtendedSearchParams = new ExtendedSearchParams(); - - compops = [ - { id: 'EXISTS', label: 'EXISTS' }, - { id: 'EQ', label: '=' }, - { id: '!EQ', label: '!=' }, - { id: 'GT', label: '>' }, - { id: 'GT_EQ', label: '>=' }, - { id: 'LT', label: '<' }, - { id: 'LT_EQ', label: '<=' }, - ]; - - defaultFormString = '---'; - /** * Public variable: faPlus. * @@ -64,11 +56,16 @@ export class ExtendedSearchFormComponent implements OnInit { */ extendedSearchForm: FormGroup; + extendedSearchParams: ExtendedSearchParams = new ExtendedSearchParams(); + restypesResponse: ResourceTypesInVocabularyResponseJson; + propertyListsResponse: PropertyTypesInResourceClassResponseJson; selectedResourcetype: ResTypeItemJson; selectedProperties: string[]; + selectedCompopSets: SearchCompop[][] = [[]]; + + defaultFormString = '---'; - // TODO: move to separate class / service? /** * Public variable: searchFormString. * @@ -164,7 +161,7 @@ export class ExtendedSearchFormComponent implements OnInit { } getResourcetypes(): void { - this.dataApiService.getExtendedSearchResourcetypes().subscribe( + this.dataApiService.getResourcetypes().subscribe( (restypesResponse: ResourceTypesInVocabularyResponseJson) => { this.restypesResponse = restypesResponse; console.log(this.restypesResponse); @@ -177,6 +174,17 @@ export class ExtendedSearchFormComponent implements OnInit { ); } + getPropertyLists(restypeId: string): void { + this.dataApiService.getPropertyListsByResourceType(restypeId).subscribe( + (properyListsResponse: PropertyTypesInResourceClassResponseJson) => { + this.propertyListsResponse = properyListsResponse; + }, + error => { + console.error(error as any); + } + ); + } + listenToUserResourcetypeChange(): void { this.restypeControl.valueChanges.subscribe((resourcetypeId: string) => { this.selectedResourcetype = this.restypesResponse.resourcetypes.find(r => r.id === resourcetypeId); @@ -184,10 +192,58 @@ export class ExtendedSearchFormComponent implements OnInit { this.clearPropertiesControls(); // Remove all previous property input fields console.log(resourcetypeId); - console.log(this.selectedResourcetype); + + if (this.selectedResourcetype) { + console.log(this.selectedResourcetype); + this.getPropertyLists(this.selectedResourcetype.id); + } + }); + } + + listenToUserPropertyChange(index: number): void { + this._getFormArrayControlAtIndex('propertyIdControl', index).valueChanges.subscribe((propertyId: string) => { + const propertyListEntry = this.getPopertyListEntryById(propertyId)[0]; + const guiElementId = propertyListEntry.guielement_id; + const valueTypeId = propertyListEntry.valuetype_id; + + this.getCompopoControlAtIndex(index).setValue(this.defaultFormString); + this.getSearchvalControlAtIndex(index).setValue(''); + + this.selectedCompopSets[index] = this.getCompopSetByValueType(valueTypeId, guiElementId); }); } + getCompopSetByValueType(valueTypeId: string, guiElementId: string): SearchCompop[] { + let compopSet: SearchCompop[] = []; + const valueType = VALUETYPE_LIST.typeList.filter(vt => vt.id === valueTypeId); + + if (!valueType || valueType.length !== 1 || !valueType[0].id) { + return []; + } else { + const id = valueType[0].id; + + if (id === '1' || id === '14') { + // 1 TEXT, 14 RICHTEXT, + 6 RESPTR if gui = 14 + compopSet = SEARCH_COMPOP_LISTS.compopList[0].compopSet; + } else if (id === '2' || id === '3') { + // 2 INTEGER, 3 FLOAT + compopSet = SEARCH_COMPOP_LISTS.compopList[1].compopSet; + } else if (id === '4' || id === '5') { + // 4 DATE, 5 PERIOD + compopSet = SEARCH_COMPOP_LISTS.compopList[2].compopSet; + } else if (id === '7' || id === '11' || id === '12' || id === '15') { + // 7 SELECTION, 11 COLOR, 12 HLIST, 15 GEONAE, 6 RESPTR if gui not 14 (3, 6) + compopSet = SEARCH_COMPOP_LISTS.compopList[3].compopSet; + } else if (id === '13') { + // 13 ICONCLASS + compopSet = SEARCH_COMPOP_LISTS.compopList[4].compopSet; + } else { + compopSet = SEARCH_COMPOP_LISTS.compopList[0].compopSet; + } + } + return compopSet; + } + onReset(): void { alert('Gesamte Suchmaske zurücksetzen?'); this._resetForm(); From 0daf91fe701dd038872be665ccec2c525529ab4c Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 8 Feb 2022 01:18:19 +0100 Subject: [PATCH 059/148] fix(search): add compop conditions for res pointer and edge cases --- .../extended-search-form/compop.ts | 45 ++++++++++--------- .../extended-search-form.component.ts | 23 ++++++---- 2 files changed, 40 insertions(+), 28 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/compop.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/compop.ts index 03de18981b..93d07f711c 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/compop.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/compop.ts @@ -33,44 +33,49 @@ const LT_EQ: SearchCompop = new SearchCompop('LT_EQ', 'less equal than', '≤') export const SEARCH_COMPOP_LISTS: SearchCompopLists = { compopList: [ - // 1 TEXT --> gui text - // 6 RESPTR GUI id 14 richtext --> gui text - // 14 RICHTEXT --> gui text + // Edge case for uncatched value types { id: 0, - compopSet: [EXISTS, EQ, NOT_EQ, MATCH, MATCH_BOOLEAN, LIKE, NOT_LIKE], + compopSet: [EXISTS], }, - - // 2 INTEGER -> gui text - // 3 FLOAT -> gui text + // 6 RESPTR GUI id 3 --> gui pulldown, + // 6 RESPTR GUI id 6 --> gui searchbox + // 7 SELECTION --> gui pulldown, + // 11 COLOR --> gui colorpicker, + // 12 HLIST --> gui hlist, + // 15 GEONAME --> gui geoname { id: 1, - compopSet: [EXISTS, EQ, NOT_EQ, GT, GT_EQ, LT, LT_EQ], + compopSet: [EXISTS, EQ], + }, + + // 13 ICONCLASS --> gui ?? + { + id: 2, + compopSet: [EXISTS, EQ, LIKE], }, // 4 DATE -> gui datepicker // 5 PERIOD -> gui datepicker // Without !EQ { - id: 2, + id: 3, compopSet: [EXISTS, EQ, GT, GT_EQ, LT, LT_EQ], }, - // 6 RESPTR GUI id 3 --> gui pulldown, - // 6 RESPTR GUI id 6 --> gui searchbox - // 7 SELECTION --> gui pulldown, - // 11 COLOR --> gui colorpicker, - // 12 HLIST --> gui hlist, - // 15 GEONAME --> gui geoname + // 2 INTEGER -> gui text + // 3 FLOAT -> gui text { - id: 3, - compopSet: [EXISTS, EQ], + id: 4, + compopSet: [EXISTS, EQ, NOT_EQ, GT, GT_EQ, LT, LT_EQ], }, - // 13 ICONCLASS --> gui ?? + // 1 TEXT --> gui text + // 6 RESPTR GUI id 14 richtext --> gui text + // 14 RICHTEXT --> gui text { - id: 4, - compopSet: [EXISTS, EQ, LIKE], + id: 5, + compopSet: [EXISTS, EQ, NOT_EQ, MATCH, MATCH_BOOLEAN, LIKE, NOT_LIKE], }, ], }; diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts index 9a63fccc54..9566a9cc2d 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts @@ -222,22 +222,29 @@ export class ExtendedSearchFormComponent implements OnInit { } else { const id = valueType[0].id; - if (id === '1' || id === '14') { - // 1 TEXT, 14 RICHTEXT, + 6 RESPTR if gui = 14 - compopSet = SEARCH_COMPOP_LISTS.compopList[0].compopSet; + if (id === '1' || (id === '6' && guiElementId === '14') || id === '14') { + // 1 TEXT, 6 RESPTR if gui 14, 14 RICHTEXT + compopSet = SEARCH_COMPOP_LISTS.compopList[5].compopSet; } else if (id === '2' || id === '3') { // 2 INTEGER, 3 FLOAT - compopSet = SEARCH_COMPOP_LISTS.compopList[1].compopSet; + compopSet = SEARCH_COMPOP_LISTS.compopList[4].compopSet; } else if (id === '4' || id === '5') { // 4 DATE, 5 PERIOD - compopSet = SEARCH_COMPOP_LISTS.compopList[2].compopSet; - } else if (id === '7' || id === '11' || id === '12' || id === '15') { - // 7 SELECTION, 11 COLOR, 12 HLIST, 15 GEONAE, 6 RESPTR if gui not 14 (3, 6) compopSet = SEARCH_COMPOP_LISTS.compopList[3].compopSet; } else if (id === '13') { // 13 ICONCLASS - compopSet = SEARCH_COMPOP_LISTS.compopList[4].compopSet; + compopSet = SEARCH_COMPOP_LISTS.compopList[2].compopSet; + } else if ( + (id === '6' && (guiElementId === '3' || guiElementId === '6')) || + id === '7' || + id === '11' || + id === '12' || + id === '15' + ) { + // 6 RESPTR if gui 3 or 6 (not 14), 7 SELECTION, 11 COLOR, 12 HLIST, 15 GEONAMES + compopSet = SEARCH_COMPOP_LISTS.compopList[1].compopSet; } else { + // Minimal set for all other cases compopSet = SEARCH_COMPOP_LISTS.compopList[0].compopSet; } } From 32730f7f57dfbb45aa3d22e3ab6456caccaf40f9 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 8 Feb 2022 19:33:13 +0100 Subject: [PATCH 060/148] refactor(edition): rename model SelectResponse --> SearchResult --- .../graph-visualizer.component.ts | 6 +-- .../graph-visualizer/models/index.ts | 6 +-- .../models/search-result.model.ts | 52 +++++++++++++++++++ .../models/select-response.model.ts | 52 ------------------- .../select-results.component.spec.ts | 8 +-- .../select-results.component.ts | 10 ++-- .../services/graph-visualizer.service.ts | 14 ++--- .../sparql-table/sparql-table.component.ts | 7 +-- 8 files changed, 78 insertions(+), 77 deletions(-) create mode 100644 src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/search-result.model.ts delete mode 100644 src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/select-response.model.ts diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/graph-visualizer.component.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/graph-visualizer.component.ts index 084baeb69b..5db28a5d9c 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/graph-visualizer.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/graph-visualizer.component.ts @@ -7,7 +7,7 @@ import { ChangeDetectionStrategy, Component, ElementRef, Input, OnInit, ViewChil import { EMPTY, from, Observable } from 'rxjs'; import { GraphSparqlQuery, GraphRDFData } from '@awg-views/edition-view/models'; -import { D3SimulationNode, Triple } from './models'; +import { D3SimulationNode, SearchResult, Triple } from './models'; import { GraphVisualizerService } from './services/graph-visualizer.service'; import { Toast, ToastService } from '@awg-core/services/toast-service'; @@ -72,9 +72,9 @@ export class GraphVisualizerComponent implements OnInit { /** * Public variable: queryResult$. * - * It keeps the result of the query as an observable of triples. + * It keeps the result of the query as an observable of triples or SearchResult. */ - queryResult$: Observable; + queryResult$: Observable; /** * Public variable: queryTime. diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/index.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/index.ts index 604f89a302..075359d763 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/index.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/index.ts @@ -20,8 +20,8 @@ import { Namespace, NamespaceType } from './namespace.model'; import { PrefixForm, Prefix } from './prefix.model'; import { QueryResult } from './query-result.model'; import { QueryTypeIndex } from './query-type-index.model'; -import { SelectResponse, SelectResponseBindings } from './select-response.model'; import { PaginatorOptions, TableData, TableOptions, TableOptionsSortCase } from './table-data.model'; +import { SearchResult, SearchResultBindings } from './search-result.model'; import { TripleComponent, Triple } from './triple.model'; export { @@ -43,8 +43,8 @@ export { Prefix, QueryResult, QueryTypeIndex, - SelectResponse, - SelectResponseBindings, + SearchResult, + SearchResultBindings, TableData, PaginatorOptions, TableOptionsSortCase, diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/search-result.model.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/search-result.model.ts new file mode 100644 index 0000000000..36613ee252 --- /dev/null +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/search-result.model.ts @@ -0,0 +1,52 @@ +/** + * The SearchResult interface. + * + * It represents the result of a search. + */ +export interface SearchResult { + /** + * The head of the search result with the variable names. + */ + head: SearchResultHead; + + /** + * The body of the search result with the bindings. + */ + body: SearchResultBody; +} + +/** + * The SearchResultHead interface. + * + * It represents the head of a search result. + */ +export interface SearchResultHead { + /** + * The variable names of the search result head. + */ + vars: string[]; +} + +/** + * The SearchResultBody interface. + * + * It represents the body of a search result. + */ +export interface SearchResultBody { + /** + * The bindings of the search result body. + */ + bindings: SearchResultBindings[]; +} + +/** + * The SearchResultBindings interface. + * + * It represents the bindings of a search result. + */ +export interface SearchResultBindings { + /** + * The key-value pair bindings of the search result body. + */ + [key: string]: any; +} diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/select-response.model.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/select-response.model.ts deleted file mode 100644 index f0dca892a8..0000000000 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/select-response.model.ts +++ /dev/null @@ -1,52 +0,0 @@ -/** - * The SelectResponse interface. - * - * It represents the response of a select query. - */ -export interface SelectResponse { - /** - * The head of the select response with the variable names. - */ - head: SelectResponseHead; - - /** - * The body of the select response with the bindings. - */ - body: SelectResponseBody; -} - -/** - * The SelectResponseHead interface. - * - * It represents the head of a select query response. - */ -export interface SelectResponseHead { - /** - * The variable names of the select response head. - */ - vars: string[]; -} - -/** - * The SelectResponseBody interface. - * - * It represents the body of a select query response. - */ -export interface SelectResponseBody { - /** - * The bindings of the select response body. - */ - bindings: SelectResponseBindings[]; -} - -/** - * The SelectResponseBindings interface. - * - * It represents the bindings of a select query response. - */ -export interface SelectResponseBindings { - /** - * The key-value pair bindings of the select response body. - */ - [key: string]: any; -} diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts index c3c67bc93a..5070c29c5f 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts @@ -14,7 +14,7 @@ import { getAndExpectDebugElementByDirective, } from '@testing/expect-helper'; -import { SelectResponse } from '../models'; +import { SearchResult } from '../models'; import { SelectResultsComponent } from './select-results.component'; // Mock components @@ -23,7 +23,7 @@ class SparqlNoResultsStubComponent {} @Component({ selector: 'awg-sparql-table', template: '' }) class SparqlTableStubComponent { - @Input() queryResult: SelectResponse; + @Input() queryResult: SearchResult; @Input() queryTime: number; @Output() clickedTableRequest: EventEmitter = new EventEmitter(); } @@ -36,8 +36,8 @@ describe('SelectResultsComponent (DONE)', () => { let fixture: ComponentFixture; let compDe: DebugElement; - let expectedQueryResult: SelectResponse; - let expectedQueryResult$: Observable; + let expectedQueryResult: SearchResult; + let expectedQueryResult$: Observable; let expectedQueryTime: number; let tableClickSpy: Spy; diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.ts index 4ec705b32e..0cf7de6ef6 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.ts @@ -1,7 +1,7 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { Observable } from 'rxjs'; -import { SelectResponse } from '../models'; +import { SearchResult } from '../models'; /** * The SelectResults component. @@ -19,10 +19,10 @@ export class SelectResultsComponent { /** * Input variable: queryResult$. * - * It keeps the SelectResponse as an observable. + * It keeps the SearchResult as an observable. */ @Input() - queryResult$: Observable; + queryResult$: Observable; /** * Input variable: queryTime. @@ -43,14 +43,14 @@ export class SelectResultsComponent { /** * Public method: isNotEmpty. * - * It checks if a given queryResult with a SelectResponse + * It checks if a given queryResult with a SearchResult * is not empty. * * @param {string} queryResult The given queryResult. * * @returns {boolean} The boolean value of the comparison result. */ - isNotEmpty(queryResult: SelectResponse): boolean { + isNotEmpty(queryResult: SearchResult): boolean { if (!queryResult.head || !queryResult.body) { return; } diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/services/graph-visualizer.service.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/services/graph-visualizer.service.ts index 31ea087641..1475c33f60 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/services/graph-visualizer.service.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/services/graph-visualizer.service.ts @@ -13,8 +13,8 @@ import { PrefixForm, QueryResult, QueryTypeIndex, - SelectResponse, - SelectResponseBindings, + SearchResult, + SearchResultBindings, Triple, TripleComponent, } from '../models'; @@ -212,7 +212,7 @@ export class GraphVisualizerService { query: string, ttlString: string, mimeType?: string - ): Promise { + ): Promise { if (!mimeType) { mimeType = 'text/turtle'; } @@ -542,11 +542,11 @@ export class GraphVisualizerService { * * It prepares the data of the select response. * - * @param {SelectResponseBindings[]} data The given obj. + * @param {SearchResultBindings[]} data The given obj. * - * @returns {status: number; data: SelectResponse | string } An object with a status code, and the data as SelectResponse or string. + * @returns {status: number; data: SearchResult | string } An object with a status code, and the data as SearchResult or string. */ - private _prepareSelectResponse(data: SelectResponseBindings[]): { status: number; data: SelectResponse | string } { + private _prepareSelectResponse(data: SearchResultBindings[]): { status: number; data: SearchResult | string } { if (!data) { return; } @@ -599,7 +599,7 @@ export class GraphVisualizerService { } // Re-format data - const reformatted: SelectResponse = { head: { vars: varKeys }, body: { bindings: b } }; + const reformatted: SearchResult = { head: { vars: varKeys }, body: { bindings: b } }; return { status: 200, data: reformatted }; } diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts index 4366820a6f..88ac072d4c 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts @@ -13,6 +13,7 @@ import { TableOptions, TableOptionsSortCase, } from '../models'; +import { SearchResult } from '../models'; /** * The SparqlTable component. @@ -28,12 +29,12 @@ import { }) export class SparqlTableComponent implements OnInit { /** - * Input variable: queryResult$. + * Input variable: queryResult. * - * It keeps the SelectResponse as an observable. + * It keeps the result of the query. */ @Input() - queryResult: SelectResponse; + queryResult: SearchResult; /** * Input variable: queryTime. From c91950caa801ff298ecaf082f903ad55d78aae82 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 8 Feb 2022 19:37:38 +0100 Subject: [PATCH 061/148] feat(shared): move table to shared components --- src/app/shared/shared.module.ts | 3 + .../table}/table-data.model.ts | 49 ++-- src/app/shared/table/table.component.css | 0 src/app/shared/table/table.component.html | 101 +++++++ src/app/shared/table/table.component.spec.ts | 24 ++ src/app/shared/table/table.component.ts | 247 ++++++++++++++++++ .../graph-visualizer/models/index.ts | 3 +- .../sparql-table/sparql-table.component.html | 108 +------- .../sparql-table/sparql-table.component.ts | 168 +----------- 9 files changed, 403 insertions(+), 300 deletions(-) rename src/app/{views/edition-view/edition-outlets/edition-graph/graph-visualizer/models => shared/table}/table-data.model.ts (62%) create mode 100644 src/app/shared/table/table.component.css create mode 100644 src/app/shared/table/table.component.html create mode 100644 src/app/shared/table/table.component.spec.ts create mode 100644 src/app/shared/table/table.component.ts diff --git a/src/app/shared/shared.module.ts b/src/app/shared/shared.module.ts index 16d417a647..00e5c59380 100644 --- a/src/app/shared/shared.module.ts +++ b/src/app/shared/shared.module.ts @@ -21,6 +21,7 @@ import { JsonViewerComponent } from './json-viewer/json-viewer.component'; import { ModalComponent } from './modal/modal.component'; import { OpenStreetMapComponent } from './open-street-map/open-street-map.component'; import { RouterLinkButtonGroupComponent } from './router-link-button-group/router-link-button-group.component'; +import { TableComponent } from './table/table.component'; import { ToastComponent } from './toast/toast.component'; import { TwelveToneSpinnerComponent } from './twelve-tone-spinner/twelve-tone-spinner.component'; @@ -57,6 +58,7 @@ import { ExternalLinkDirective } from './external-link/external-link.directive'; ModalComponent, OpenStreetMapComponent, RouterLinkButtonGroupComponent, + TableComponent, ToastComponent, TwelveToneSpinnerComponent, ExternalLinkDirective, @@ -83,6 +85,7 @@ import { ExternalLinkDirective } from './external-link/external-link.directive'; ToastComponent, TwelveToneSpinnerComponent, ExternalLinkDirective, + TableComponent, ], }) export class SharedModule {} diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/table-data.model.ts b/src/app/shared/table/table-data.model.ts similarity index 62% rename from src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/table-data.model.ts rename to src/app/shared/table/table-data.model.ts index 7fd730f320..931ea41864 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/table-data.model.ts +++ b/src/app/shared/table/table-data.model.ts @@ -1,8 +1,6 @@ import { IconDefinition } from '@fortawesome/free-solid-svg-icons'; import { Observable, of } from 'rxjs'; -import { SelectResponse, SelectResponseBindings } from './select-response.model'; - /** * The TableData class. * @@ -18,30 +16,31 @@ export class TableData { /** * The total rows of the table data as Observable. */ - totalRows$: Observable; + totalRows$: Observable; /** * The filtered rows of the table data. */ - filteredRows: SelectResponseBindings[]; + filteredRows: any[]; /** * The paginated rows of the table data as Observable. */ - paginatedRows$: Observable; + paginatedRows$: Observable; /** * Constructor of the TableData class. * * It initializes the class with given values. * - * @param {SelectResponse} data The given SelectResponse. + * @param {any} header The given table header. + * @param {any} rows The given table rows. */ - constructor(data: SelectResponse) { - this.header = data.head.vars; - this.totalRows$ = of(data.body.bindings); - this.filteredRows = data.body.bindings; - this.paginatedRows$ = of(data.body.bindings); + constructor(header: any, rows: any) { + this.header = header; + this.totalRows$ = of(rows); + this.filteredRows = rows; + this.paginatedRows$ = of(rows); } } @@ -53,22 +52,22 @@ export class TableData { */ export class PaginatorOptions { /** - * The current page number of the Paginator options. + * The current page number. */ page: number; /** - * The number of rows per page of the Paginator options. + * The selected number of rows per page. */ - pageSize: number; + selectedPageSize: number; /** - * The page size optios of the Paginator options. + * The page size options. */ pageSizeOptions: number[]; /** - * The size of the collection of the Paginator options. + * The size of the collection. */ collectionSize: number; @@ -78,28 +77,18 @@ export class PaginatorOptions { * It initializes the class with given values. * * @param {number} page The current page number. - * @param {number} pageSize The number of rows per page. + * @param {number} selectedPageSize The number of rows per page. * @param {number[]} pageSizeOptions The options for the page size. * @param {number} collectionSize The size of the collection. */ - constructor(page: number, pageSize: number, pageSizeOptions: number[], collectionSize: number) { + constructor(page: number, selectedPageSize: number, pageSizeOptions: number[], collectionSize: number) { this.page = page; - this.pageSize = pageSize; + this.selectedPageSize = selectedPageSize; this.pageSizeOptions = pageSizeOptions; this.collectionSize = collectionSize; } } -/** - * The TableOptionsSortCase enumeration. - * - * It stores the possible sort case options for a table. - */ -export enum TableOptionsSortCase { - CASE_SENSITIVE = 'case-sensitive', - CASE_INSENSITIVE = 'case-insensitive', -} - /** * The TableOptions class. * @@ -130,5 +119,5 @@ export class TableOptions { /** * The sort case of the Table options. */ - case: TableOptionsSortCase; + isCaseInsensitive: boolean; } diff --git a/src/app/shared/table/table.component.css b/src/app/shared/table/table.component.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/app/shared/table/table.component.html b/src/app/shared/table/table.component.html new file mode 100644 index 0000000000..ff6e7f7e39 --- /dev/null +++ b/src/app/shared/table/table.component.html @@ -0,0 +1,101 @@ +
+
+ +
+ +
+
+
+ +
+ + + + + +
+ + + + + + + + + + + + +
+ {{ headerLabel }}  +
+ + + + +
+ + + + +
+ + + + + +
diff --git a/src/app/shared/table/table.component.spec.ts b/src/app/shared/table/table.component.spec.ts new file mode 100644 index 0000000000..44613df586 --- /dev/null +++ b/src/app/shared/table/table.component.spec.ts @@ -0,0 +1,24 @@ +import { ComponentFixture, TestBed } from '@angular/core/testing'; + +import { TableComponent } from './table.component'; + +describe('TableComponent', () => { + let component: TableComponent; + let fixture: ComponentFixture; + + beforeEach(async () => { + await TestBed.configureTestingModule({ + declarations: [TableComponent], + }).compileComponents(); + }); + + beforeEach(() => { + fixture = TestBed.createComponent(TableComponent); + component = fixture.componentInstance; + fixture.detectChanges(); + }); + + it('should create', () => { + expect(component).toBeTruthy(); + }); +}); diff --git a/src/app/shared/table/table.component.ts b/src/app/shared/table/table.component.ts new file mode 100644 index 0000000000..ec3656164a --- /dev/null +++ b/src/app/shared/table/table.component.ts @@ -0,0 +1,247 @@ +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; + +import { Observable } from 'rxjs'; +import { map } from 'rxjs/operators'; + +import { faSortDown, faSortUp } from '@fortawesome/free-solid-svg-icons'; + +import { PaginatorOptions, TableData, TableOptions } from './table-data.model'; + +import { SearchResultBindings } from '@awg-views/edition-view/edition-outlets/edition-graph/graph-visualizer/models'; + +@Component({ + selector: 'awg-table', + templateUrl: './table.component.html', + styleUrls: ['./table.component.css'], +}) +export class TableComponent implements OnInit { + /** + * Input variable: tableTitle. + * + * It keeps the title for the table. + */ + @Input() + tableTitle: string; + + /** + * Input variable: headerInputData. + * + * It keeps the input data for the table header. + */ + @Input() + headerInputData: any; + + /** + * Input variable: rowInputData. + * + * It keeps the input data for the table rows. + */ + @Input() + rowInputData: any; + + /** + * Output variable: clickedTableValueRequest. + * + * It keeps an event emitter for a click on a table value. + */ + @Output() + clickedTableValueRequest: EventEmitter = new EventEmitter(); + + /** + * Output variable: clickedTableRowRequest. + * + * It keeps an event emitter for a click on a table row. + */ + @Output() + clickedTableRowRequest: EventEmitter = new EventEmitter(); + + /** + * Public variable: faSortUp. + * + * It instantiates fontawesome's faSortUp icon. + */ + faSortUp = faSortUp; + + /** + * Public variable: faSortDown. + * + * It instantiates fontawesome's faSortDown icon. + */ + faSortDown = faSortDown; + + /** + * Public variable: paginatorOptions. + * + * It keeps the options of the Paginator. + */ + paginatorOptions: PaginatorOptions; + + /** + * Public variable: searchFilter. + * + * It keeps the string value of the search filter. + */ + searchFilter: string; + + /** + * Public variable: tableData. + * + * It keeps the data arrays of the table. + */ + tableData: TableData; + + /** + * Public variable: tableOptions. + * + * It keeps the options of the table. + */ + tableOptions: TableOptions = { + selectedKey: '', + sortKey: '', + sortIcon: this.faSortDown, + reverse: false, + isCaseInsensitive: false, + }; + + /** + * Angular life cycle hook: ngOnInit. + * + * It calls the containing methods + * when initializing the component. + */ + ngOnInit(): void { + this._initTable(); + } + + /** + * Public method: onPageSizeChange. + * + * It emits the new start position of the Paginator + * from a given page number to the {@link pageChangeRequest}. + * + * @returns {void} Emits the new start position. + */ + onPageSizeChange(searchFilter: string): void { + if (!this.tableData || !this.headerInputData || !this.rowInputData) { + return; + } + this.tableData.paginatedRows$ = this._paginateRows(searchFilter); + } + + /** + * Public method: onSort. + * + * It sets the options to sort a table column by a given sort key (header label). + * + * @param {string} key The given key to sort by. + * + * @returns {void} Sets the options. + */ + onSort(key: string): void { + if (!key) { + return; + } + + // Switch sort order when clicking on same key + if (this.tableOptions.selectedKey === key) { + this.tableOptions.reverse = !this.tableOptions.reverse; + } + + // Set sort icon + this.tableOptions.sortIcon = this.tableOptions.reverse ? this.faSortUp : this.faSortDown; + + // Select new key + this.tableOptions.selectedKey = key; + + // Create sortKey for nested object + this.tableOptions.sortKey = this.tableOptions.selectedKey.toString() + '.label'; + } + + /** + * Public method: onTableValueClick. + * + * It emits an event when the user clicks on a table value. + * + * @param {any} e The given event. + * + * @returns {void} Emits the event. + */ + onTableValueClick(e: any): void { + if (!e) { + return; + } + this.clickedTableValueRequest.emit(e); + } + + /** + * Public method: onTableRowClick. + * + * It emits an event when the user clicks on a table row. + * + * @param {any} e The given event. + * + * @returns {void} Emits the event. + */ + onTableRowClick(e: any): void { + if (!e) { + return; + } + this.clickedTableRowRequest.emit(e); + } + + /** + * Private method: _initTable. + * + * It inits all the data needed for the table. + * + * @returns {void} Inits the table data. + */ + private _initTable(): void { + this.tableData = new TableData(this.headerInputData, this.rowInputData); + this.paginatorOptions = new PaginatorOptions(1, 10, [5, 10, 25, 50, 100, 200], this.rowInputData.length); + this.searchFilter = ''; + + this.onSort(this.tableData.header[0]); + + this.onPageSizeChange(this.searchFilter); + } + + /** + * Private method: _paginateRows. + * + * It filters by searchTerm and paginates the observable of total rows. + * + * @param {string} searchTerm The given searchTerm. + * + * @returns {Observable} Returns an observable of the paginated rows. + */ + private _paginateRows(searchTerm: string): Observable { + return this.tableData.totalRows$.pipe( + // Filter rows by searchTerm + map((rows: SearchResultBindings[]) => { + const term = searchTerm.toString().toLowerCase(); + this.tableData.filteredRows = rows.filter(row => + Object.values(row).some(rowEntry => { + if (rowEntry === null || rowEntry === undefined) { + return false; + } + return rowEntry['label'] && rowEntry['label'].toString().toLowerCase().includes(term); + }) + ); + return this.tableData.filteredRows; + }), + // Paginate rows + map((rows: SearchResultBindings[]) => { + const startRow = (this.paginatorOptions.page - 1) * this.paginatorOptions.selectedPageSize; + const endRow = startRow + this.paginatorOptions.selectedPageSize; + const range = endRow - startRow; + + if (rows.length <= range) { + return rows; + } else { + return rows.slice(startRow, endRow); + } + }) + ); + } +} diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/index.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/index.ts index 075359d763..f3db7697a9 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/index.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/models/index.ts @@ -20,8 +20,8 @@ import { Namespace, NamespaceType } from './namespace.model'; import { PrefixForm, Prefix } from './prefix.model'; import { QueryResult } from './query-result.model'; import { QueryTypeIndex } from './query-type-index.model'; -import { PaginatorOptions, TableData, TableOptions, TableOptionsSortCase } from './table-data.model'; import { SearchResult, SearchResultBindings } from './search-result.model'; +import { PaginatorOptions, TableData, TableOptions } from '@awg-shared/table/table-data.model'; import { TripleComponent, Triple } from './triple.model'; export { @@ -47,7 +47,6 @@ export { SearchResultBindings, TableData, PaginatorOptions, - TableOptionsSortCase, TableOptions, Triple, TripleComponent, diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.html b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.html index e79b334493..b2b550e0ae 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.html @@ -1,101 +1,7 @@ -
-
- -
- -
-
-
- -
- - - - - -
- - - - - - - - - - - - -
- {{ headerLabel }}  -
- - - - -
- - - - -
- - - - - -
+ diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts index 88ac072d4c..0c4e21437e 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts @@ -1,18 +1,5 @@ import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { Observable } from 'rxjs'; -import { map } from 'rxjs/operators'; - -import { faSortDown, faSortUp } from '@fortawesome/free-solid-svg-icons'; - -import { - PaginatorOptions, - SelectResponse, - SelectResponseBindings, - TableData, - TableOptions, - TableOptionsSortCase, -} from '../models'; import { SearchResult } from '../models'; /** @@ -52,54 +39,6 @@ export class SparqlTableComponent implements OnInit { @Output() clickedTableRequest: EventEmitter = new EventEmitter(); - /** - * Public variable: faSortUp. - * - * It instantiates fontawesome's faSortUp icon. - */ - faSortUp = faSortUp; - - /** - * Public variable: faSortDown. - * - * It instantiates fontawesome's faSortDown icon. - */ - faSortDown = faSortDown; - - /** - * Public variable: paginatorOptions. - * - * It keeps the options of the Paginator. - */ - paginatorOptions: PaginatorOptions; - - /** - * Public variable: searchFilter. - * - * It keeps the string value of the search filter. - */ - searchFilter: string; - - /** - * Public variable: tableData. - * - * It keeps the data arrays of the table. - */ - tableData: TableData; - - /** - * Public variable: tableOptions. - * - * It keeps the options of the table. - */ - tableOptions: TableOptions = { - selectedKey: '', - sortKey: '', - sortIcon: this.faSortDown, - reverse: false, - case: TableOptionsSortCase.CASE_INSENSITIVE, - }; - /** * Angular life cycle hook: ngOnInit. * @@ -107,51 +46,7 @@ export class SparqlTableComponent implements OnInit { * when initializing the component. */ ngOnInit(): void { - this._initTable(); - } - - /** - * Public method: onPageSizeChange. - * - * It emits the new start position of the Paginator - * from a given page number to the {@link pageChangeRequest}. - * - * @returns {void} Emits the new start position. - */ - onPageSizeChange(searchFilter: string): void { - if (!this.queryResult) { - return; - } - this.tableData.paginatedRows$ = this._paginateRows(searchFilter); - } - - /** - * Public method: onSort. - * - * It sets the options to sort a table column by a given sort key (header label). - * - * @param {string} key The given key to sort by. - * - * @returns {void} Sets the options. - */ - onSort(key: string): void { - if (!key) { - return; - } - - // Switch sort order when clicking on same key - if (this.tableOptions.selectedKey === key) { - this.tableOptions.reverse = !this.tableOptions.reverse; - } - - // Set sort icon - this.tableOptions.sortIcon = this.tableOptions.reverse ? this.faSortUp : this.faSortDown; - - // Select new key - this.tableOptions.selectedKey = key; - - // Create sortKey for nested object - this.tableOptions.sortKey = this.tableOptions.selectedKey.toString() + '.label'; + console.log(this.queryResult); } /** @@ -169,65 +64,4 @@ export class SparqlTableComponent implements OnInit { } this.clickedTableRequest.emit(uri); } - - /** - * Private method: _initTable. - * - * It inits all the data needed for the table. - * - * @returns {void} Inits the table data. - */ - private _initTable(): void { - this.tableData = new TableData(this.queryResult); - this.paginatorOptions = new PaginatorOptions( - 1, - 10, - [5, 10, 25, 50, 100, 200], - this.queryResult.body.bindings.length - ); - this.searchFilter = ''; - - this.onSort(this.tableData.header[0]); - - this.onPageSizeChange(this.searchFilter); - } - - /** - * Private method: _paginateRows. - * - * It filters by searchTerm and paginates the observable of total rows. - * - * @param {string} searchTerm The given searchTerm. - * - * @returns {Observable} Returns an observable of the paginated rows. - */ - private _paginateRows(searchTerm: string): Observable { - return this.tableData.totalRows$.pipe( - // Filter rows by searchTerm - map((rows: SelectResponseBindings[]) => { - const term = searchTerm.toString().toLowerCase(); - this.tableData.filteredRows = rows.filter(row => - Object.values(row).some(rowEntry => { - if (rowEntry === null || rowEntry === undefined) { - return false; - } - return rowEntry['label'] && rowEntry['label'].toString().toLowerCase().includes(term); - }) - ); - return this.tableData.filteredRows; - }), - // Paginate rows - map((rows: SelectResponseBindings[]) => { - const startRow = (this.paginatorOptions.page - 1) * this.paginatorOptions.pageSize; - const endRow = startRow + this.paginatorOptions.pageSize; - const range = endRow - startRow; - - if (rows.length <= range) { - return rows; - } else { - return rows.slice(startRow, endRow); - } - }) - ); - } } From a2ba4387cdeae8a97c15d60626e55bd80d723413 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 8 Feb 2022 21:22:16 +0100 Subject: [PATCH 062/148] test(edition): add tests for SparqlTableComponent --- .../sparql-table.component.spec.ts | 148 +++++++++++++++--- .../sparql-table/sparql-table.component.ts | 4 +- 2 files changed, 131 insertions(+), 21 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.spec.ts index bcbc5d2679..b250c86a09 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.spec.ts @@ -1,24 +1,40 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; -import { Component, DebugElement } from '@angular/core'; +import { Component, DebugElement, EventEmitter, Input, Output } from '@angular/core'; import { NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap'; +import Spy = jasmine.Spy; -import { getAndExpectDebugElementByCss, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; +import { expectSpyCall, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; +import { SearchResult } from '@awg-views/edition-view/edition-outlets/edition-graph/graph-visualizer/models'; import { SparqlTableComponent } from './sparql-table.component'; -@Component({ selector: 'awg-twelve-tone-spinner', template: '' }) -class TwelveToneSpinnerStubComponent {} +@Component({ selector: 'awg-table', template: '' }) +class TableStubComponent { + @Input() tableTitle: string; + @Input() headerInputData: any; + @Input() rowInputData: any; + @Output() clickedTableValueRequest: EventEmitter = new EventEmitter(); + @Output() clickedTableRowRequest: EventEmitter = new EventEmitter(); +} -describe('SparqlTableComponent', () => { +describe('SparqlTableComponent (DONE)', () => { let component: SparqlTableComponent; let fixture: ComponentFixture; let compDe: DebugElement; + let expectedQueryResult: SearchResult; + let expectedQueryTime: number; + + let expectedTableTitle: string; + + let tableClickSpy: Spy; + let emitSpy: Spy; + beforeEach(async () => { await TestBed.configureTestingModule({ imports: [NgbPaginationModule], - declarations: [SparqlTableComponent, TwelveToneSpinnerStubComponent], + declarations: [SparqlTableComponent, TableStubComponent], }).compileComponents(); }); @@ -26,6 +42,25 @@ describe('SparqlTableComponent', () => { fixture = TestBed.createComponent(SparqlTableComponent); component = fixture.componentInstance; compDe = fixture.debugElement; + + // Test data + const varKeys = ['Test', 'success']; + const b = [ + { + Test: { type: 'test type', value: 'test value' }, + success: { type: 'success type', value: 'sucess value' }, + }, + ]; + expectedQueryResult = { head: { vars: varKeys }, body: { bindings: b } }; + expectedQueryTime = 5000; + + expectedTableTitle = 'SELECT Anfrage'; + + // Spies on component functions + // `.and.callThrough` will track the spy down the nested describes, see + // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E + tableClickSpy = spyOn(component, 'onTableNodeClick').and.callThrough(); + emitSpy = spyOn(component.clickedTableRequest, 'emit').and.callThrough(); }); it('should create', () => { @@ -34,32 +69,109 @@ describe('SparqlTableComponent', () => { describe('BEFORE initial data binding', () => { it('should not have queryResult', () => { - expect(component.queryResult).toBeUndefined('should be undefined'); + expect(component.queryResult).withContext('should be undefined').toBeUndefined(); }); it('should not have queryTime', () => { - expect(component.queryTime).toBeUndefined('should be undefined'); + expect(component.queryTime).withContext('should be undefined').toBeUndefined(); + }); + + describe('VIEW', () => { + it('... should not display TableComponent (stubbed)', () => { + getAndExpectDebugElementByDirective(compDe, TableStubComponent, 0, 0); + }); + }); + }); + + describe('AFTER initial data binding', () => { + beforeEach(() => { + // Simulate the parent setting the input properties + component.queryResult = expectedQueryResult; + component.queryTime = expectedQueryTime; + + // Trigger initial data binding + fixture.detectChanges(); + }); + + it('should have `queryResult` input', () => { + expect(component.queryResult).withContext('should be defined').toBeDefined(); + expect(component.queryResult) + .withContext(`should equal ${expectedQueryResult}`) + .toEqual(expectedQueryResult); }); - it('should not have paginatorOptions', () => { - expect(component.paginatorOptions).toBeUndefined('should be undefined'); + it('should have `queryTime` input', () => { + expect(component.queryTime).withContext('should be defined').toBeDefined(); + expect(component.queryTime).withContext(`should equal ${expectedQueryTime}`).toEqual(expectedQueryTime); }); describe('VIEW', () => { - it('... should contain no form yet', () => { - getAndExpectDebugElementByCss(compDe, 'form', 0, 0); + it('... should contain one TableComponent (stubbed) if results are available', () => { + getAndExpectDebugElementByDirective(compDe, TableStubComponent, 1, 1); }); - it('... should contain no pagination divs yet', () => { - getAndExpectDebugElementByCss(compDe, 'div.awg-pagination', 0, 0); + it('... should pass down `tableTitle` to table component', () => { + const tableDes = getAndExpectDebugElementByDirective(compDe, TableStubComponent, 1, 1); + const tableCmp = tableDes[0].injector.get(TableStubComponent) as TableStubComponent; + + expect(tableCmp.tableTitle).toBeDefined(); + expect(tableCmp.tableTitle) + .withContext(`should equal ${expectedTableTitle}`) + .toEqual(expectedTableTitle); + }); + + it('... should pass down `headerInputData` to table component', () => { + const tableDes = getAndExpectDebugElementByDirective(compDe, TableStubComponent, 1, 1); + const tableCmp = tableDes[0].injector.get(TableStubComponent) as TableStubComponent; + + expect(tableCmp.headerInputData).toBeDefined(); + expect(tableCmp.headerInputData) + .withContext(`should equal ${expectedQueryResult.head.vars}`) + .toEqual(expectedQueryResult.head.vars); + }); + + it('... should pass down `rowInputData` to table component', () => { + const tableDes = getAndExpectDebugElementByDirective(compDe, TableStubComponent, 1, 1); + const tableCmp = tableDes[0].injector.get(TableStubComponent) as TableStubComponent; + + expect(tableCmp.rowInputData).toBeDefined(); + expect(tableCmp.rowInputData) + .withContext(`should equal ${expectedQueryResult.body.bindings}`) + .toEqual(expectedQueryResult.body.bindings); + }); + }); + + describe('#onTableNodeClick', () => { + it('... should trigger on clickedTableValueRequest event from TableComponent', () => { + const tableDes = getAndExpectDebugElementByDirective(compDe, TableStubComponent, 1, 1); + const tableCmp = tableDes[0].injector.get(TableStubComponent) as TableStubComponent; + + const expectedUri = 'example:Test'; + tableCmp.clickedTableValueRequest.emit(expectedUri); + + expectSpyCall(tableClickSpy, 1, expectedUri); }); - it('... should contain no table yet', () => { - getAndExpectDebugElementByCss(compDe, 'table.table', 0, 0); + it('... should not emit anything if no URI is provided', () => { + const tableDes = getAndExpectDebugElementByDirective(compDe, TableStubComponent, 1, 1); + const tableCmp = tableDes[0].injector.get(TableStubComponent) as TableStubComponent; + + // Node is undefined + tableCmp.clickedTableValueRequest.emit(undefined); + + expectSpyCall(tableClickSpy, 1, undefined); + expectSpyCall(emitSpy, 0); }); - it('... should not display TwelveToneSpinnerComponent (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, TwelveToneSpinnerStubComponent, 0, 0); + it('... should emit provided URI on click', () => { + const tableDes = getAndExpectDebugElementByDirective(compDe, TableStubComponent, 1, 1); + const tableCmp = tableDes[0].injector.get(TableStubComponent) as TableStubComponent; + + const expectedUri = 'example:Test'; + tableCmp.clickedTableValueRequest.emit(expectedUri); + + expectSpyCall(tableClickSpy, 1, expectedUri); + expectSpyCall(emitSpy, 1, expectedUri); }); }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts index 0c4e21437e..b1dcb772ac 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-table/sparql-table.component.ts @@ -45,9 +45,7 @@ export class SparqlTableComponent implements OnInit { * It calls the containing methods * when initializing the component. */ - ngOnInit(): void { - console.log(this.queryResult); - } + ngOnInit(): void {} /** * Public method: onTableNodeClick. From ab34087b3a35ca62229f3efe9fe8b538f58b213f Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Wed, 9 Feb 2022 11:59:16 +0100 Subject: [PATCH 063/148] test(app): fix tests after changes --- src/app/core/navbar/navbar.component.spec.ts | 258 ++++++---- .../resource-info.component.spec.ts | 451 +++++++++++------- .../resource-detail.component.spec.ts | 16 +- .../select-results.component.spec.ts | 2 +- src/testing/expect-helper.ts | 2 +- 5 files changed, 451 insertions(+), 278 deletions(-) diff --git a/src/app/core/navbar/navbar.component.spec.ts b/src/app/core/navbar/navbar.component.spec.ts index 95d8b67869..d1d99fdd9a 100644 --- a/src/app/core/navbar/navbar.component.spec.ts +++ b/src/app/core/navbar/navbar.component.spec.ts @@ -90,15 +90,24 @@ describe('NavbarComponent (DONE)', () => { describe('BEFORE initial data binding', () => { it('should have fontawesome icons', () => { - expect(component.faEnvelope).toBe(faEnvelope, 'should be faEnvelope'); - expect(component.faFileAlt).toBe(faFileAlt, 'should be faFileAlt'); - expect(component.faHome).toBe(faHome, 'should be faHome'); - expect(component.faNetworkWired).toBe(faNetworkWired, 'should be faNetworkWired'); - expect(component.faSearch).toBe(faSearch, 'should be faSearch'); + expect(component.faEnvelope).toBeTruthy(); + expect(component.faEnvelope).withContext('should be faEnvelope').toBe(faEnvelope); + + expect(component.faFileAlt).toBeTruthy(); + expect(component.faFileAlt).withContext('should be faFileAlt').toBe(faFileAlt); + + expect(component.faHome).toBeTruthy(); + expect(component.faHome).withContext('should be faHome').toBe(faHome); + + expect(component.faNetworkWired).toBeTruthy(); + expect(component.faNetworkWired).withContext('should be faNetworkWired').toBe(faNetworkWired); + + expect(component.faSearch).toBeTruthy(); + expect(component.faSearch).withContext('should be faSearch').toBe(faSearch); }); it('should have `isCollapsed = true`', () => { - expect(component.isCollapsed).toBe(true, 'should be true'); + expect(component.isCollapsed).withContext('should be true').toBeTrue(); }); describe('#provideMetaData', () => { @@ -107,7 +116,7 @@ describe('NavbarComponent (DONE)', () => { }); it('... should not have pageMetaData', () => { - expect(component.pageMetaData).toBeUndefined('should be undefined'); + expect(component.pageMetaData).withContext('should be undefined').toBeUndefined(); }); }); @@ -135,11 +144,11 @@ describe('NavbarComponent (DONE)', () => { it('... should toggle `isCollapsed`', () => { component.toggleNav(); - expect(component.isCollapsed).toBe(false); + expect(component.isCollapsed).withContext(`should be false`).toBeFalse(); component.toggleNav(); - expect(component.isCollapsed).toBe(true); + expect(component.isCollapsed).withContext(`should be true`).toBeTrue(); }); }); @@ -159,10 +168,10 @@ describe('NavbarComponent (DONE)', () => { const urlEl2 = urlDes[1].nativeElement; expect(urlEl1.href).toBeDefined(); - expect(urlEl1.href).toBe('', 'should be empty string'); + expect(urlEl1.href).withContext('should be empty string').toBe(''); expect(urlEl2.href).toBeDefined(); - expect(urlEl2.href).toBe('', 'should be empty string'); + expect(urlEl2.href).withContext('should be empty string').toBe(''); }); }); }); @@ -182,7 +191,9 @@ describe('NavbarComponent (DONE)', () => { it('... should return metadata', () => { expect(component.pageMetaData).toBeDefined(); - expect(component.pageMetaData).toBe(expectedPageMetaData); + expect(component.pageMetaData) + .withContext(`should be ${expectedPageMetaData}`) + .toBe(expectedPageMetaData); }); }); @@ -193,16 +204,14 @@ describe('NavbarComponent (DONE)', () => { const urlEl2 = urlDes[1].nativeElement; expect(urlEl1.href).toBeDefined(); - expect(urlEl1.href).toBe( - expectedPageMetaData.awgProjectUrl, - `should be ${expectedPageMetaData.awgProjectUrl}` - ); + expect(urlEl1.href) + .withContext(`should be ${expectedPageMetaData.awgProjectUrl}`) + .toBe(expectedPageMetaData.awgProjectUrl); expect(urlEl2.href).toBeDefined(); - expect(urlEl2.href).toBe( - expectedPageMetaData.awgProjectUrl, - `should be ${expectedPageMetaData.awgProjectUrl}` - ); + expect(urlEl2.href) + .withContext(`should be ${expectedPageMetaData.awgProjectUrl}`) + .toBe(expectedPageMetaData.awgProjectUrl); }); }); @@ -216,132 +225,201 @@ describe('NavbarComponent (DONE)', () => { }); it('... can get 16 routerLinks from template', () => { - expect(routerLinks.length).toBe(16, 'should have 16 routerLinks'); + expect(routerLinks.length).withContext('should have 16 routerLinks').toBe(16); }); it('... can get correct routes from routerLinks', () => { - expect(routerLinks[0].linkParams).toEqual(['/home']); - expect(routerLinks[1].linkParams).toEqual([ - expectedEditionWorks[0].baseRoute, - expectedEditionWorks[0].introRoute.route, - ]); - expect(routerLinks[2].linkParams).toEqual([ - expectedEditionWorks[1].baseRoute, - expectedEditionWorks[1].introRoute.route, - ]); - expect(routerLinks[3].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.introRoute.route, - ]); - expect(routerLinks[4].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.detailRoute.route, - ]); - expect(routerLinks[5].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.detailRoute.route, - ]); - expect(routerLinks[6].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.detailRoute.route, - ]); - expect(routerLinks[7].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.detailRoute.route, - ]); - expect(routerLinks[8].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.reportRoute.route, - ]); - expect(routerLinks[9].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.reportRoute.route, - ]); - expect(routerLinks[10].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.reportRoute.route, - ]); - expect(routerLinks[11].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.reportRoute.route, - ]); - expect(routerLinks[12].linkParams).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.reportRoute.route, - ]); - expect(routerLinks[13].linkParams).toEqual(['/structure']); - expect(routerLinks[14].linkParams).toEqual(['/data/search', 'fulltext']); - expect(routerLinks[15].linkParams).toEqual(['/contact']); + expect(routerLinks[0].linkParams).withContext(`should equal ['/home']`).toEqual(['/home']); + expect(routerLinks[1].linkParams) + .withContext( + `should equal ${[expectedEditionWorks[0].baseRoute, expectedEditionWorks[0].introRoute.route]}` + ) + .toEqual([expectedEditionWorks[0].baseRoute, expectedEditionWorks[0].introRoute.route]); + expect(routerLinks[2].linkParams) + .withContext( + `should equal ${[expectedEditionWorks[1].baseRoute, expectedEditionWorks[1].introRoute.route]}` + ) + .toEqual([expectedEditionWorks[1].baseRoute, expectedEditionWorks[1].introRoute.route]); + expect(routerLinks[3].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.introRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.introRoute.route]); + expect(routerLinks[4].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.detailRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.detailRoute.route]); + expect(routerLinks[5].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.detailRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.detailRoute.route]); + expect(routerLinks[6].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.detailRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.detailRoute.route]); + expect(routerLinks[7].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.detailRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.detailRoute.route]); + expect(routerLinks[8].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.reportRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.reportRoute.route]); + expect(routerLinks[9].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.reportRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.reportRoute.route]); + expect(routerLinks[10].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.reportRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.reportRoute.route]); + expect(routerLinks[11].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.reportRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.reportRoute.route]); + expect(routerLinks[12].linkParams) + .withContext( + `should equal ${[ + expectedSelectEditionWork.baseRoute, + expectedSelectEditionWork.reportRoute.route, + ]}` + ) + .toEqual([expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.reportRoute.route]); + expect(routerLinks[13].linkParams).withContext(`should equal ['/structure']`).toEqual(['/structure']); + expect(routerLinks[14].linkParams).withContext(`should equal ['/data']`).toEqual(['/data']); + expect(routerLinks[15].linkParams).withContext(`should equal ['/contact']`).toEqual(['/contact']); }); it('... can get correct queryParams from routerLinks', () => { - expect(routerLinks[4].queryParams).toEqual({ sketch: 'Aa:SkI/2' }); - expect(routerLinks[5].queryParams).toEqual({ sketch: 'Aa:SkI/3' }); - expect(routerLinks[6].queryParams).toEqual({ sketch: 'Aa:SkI/4' }); - expect(routerLinks[7].queryParams).toEqual({ sketch: 'Aa:SkI/5' }); + expect(routerLinks[4].queryParams).toBeTruthy(); + expect(routerLinks[4].queryParams) + .withContext(`should equal { sketch: 'Aa:SkI/2' }`) + .toEqual({ sketch: 'Aa:SkI/2' }); + + expect(routerLinks[5].queryParams).toBeTruthy(); + expect(routerLinks[5].queryParams) + .withContext(`should equal { sketch: 'Aa:SkI/3' }`) + .toEqual({ sketch: 'Aa:SkI/3' }); + + expect(routerLinks[6].queryParams).toBeTruthy(); + expect(routerLinks[6].queryParams) + .withContext(`should equal { sketch: 'Aa:SkI/4' }`) + .toEqual({ sketch: 'Aa:SkI/4' }); + + expect(routerLinks[7].queryParams).toBeTruthy(); + expect(routerLinks[7].queryParams) + .withContext(`should equal { sketch: 'Aa:SkI/5' }`) + .toEqual({ sketch: 'Aa:SkI/5' }); }); it('... can click Home link in template', () => { const homeLinkDe = linkDes[0]; // Contact link DebugElement const homeLink = routerLinks[0]; // Contact link directive - expect(homeLink.navigatedTo).toBeNull('should not have navigated yet'); + const expectedRoute = ['/home']; + + expect(homeLink.navigatedTo).withContext('should not have navigated yet').toBeNull(); click(homeLinkDe); fixture.detectChanges(); - expect(homeLink.navigatedTo).toEqual(['/home']); + expect(homeLink.navigatedTo).toBeTruthy(); + expect(homeLink.navigatedTo).withContext(`should equal ${expectedRoute}`).toEqual(expectedRoute); }); it('... can click Edition link in template', () => { const editionLinkDe = linkDes[1]; // Contact link DebugElement const editionLink = routerLinks[1]; // Contact link directive - expect(editionLink.navigatedTo).toBeNull('should not have navigated yet'); + const expectedRoute = [expectedSelectEditionWork.baseRoute, expectedSelectEditionWork.introRoute.route]; + + expect(editionLink.navigatedTo).withContext('should not have navigated yet').toBeNull(); click(editionLinkDe); fixture.detectChanges(); - expect(editionLink.navigatedTo).toEqual([ - expectedSelectEditionWork.baseRoute, - expectedSelectEditionWork.introRoute.route, - ]); + expect(editionLink.navigatedTo).toBeTruthy(); + expect(editionLink.navigatedTo).withContext(`should equal ${expectedRoute}`).toEqual(expectedRoute); }); it('... can click Structure link in template', () => { const structureLinkDe = linkDes[13]; // Contact link DebugElement const structureLink = routerLinks[13]; // Contact link directive - expect(structureLink.navigatedTo).toBeNull('should not have navigated yet'); + const expectedRoute = ['/structure']; + + expect(structureLink.navigatedTo).withContext('should not have navigated yet').toBeNull(); click(structureLinkDe); fixture.detectChanges(); - expect(structureLink.navigatedTo).toEqual(['/structure']); + expect(structureLink.navigatedTo).toBeTruthy(); + expect(structureLink.navigatedTo).withContext(`should equal ${expectedRoute}`).toEqual(expectedRoute); }); it('... can click Data link in template', () => { const dataLinkDe = linkDes[14]; // Contact link DebugElement const dataLink = routerLinks[14]; // Contact link directive - expect(dataLink.navigatedTo).toBeNull('should not have navigated yet'); + const expectedRoute = ['/data']; + + expect(dataLink.navigatedTo).withContext('should not have navigated yet').toBeNull(); click(dataLinkDe); fixture.detectChanges(); - expect(dataLink.navigatedTo).toEqual(['/data/search', 'fulltext']); + expect(dataLink.navigatedTo).toBeTruthy(); + expect(dataLink.navigatedTo).withContext(`should equal ${expectedRoute}`).toEqual(expectedRoute); }); it('... can click Contact link in template', () => { const contactLinkDe = linkDes[15]; // Contact link DebugElement const contactLink = routerLinks[15]; // Contact link directive - expect(contactLink.navigatedTo).toBeNull('should not have navigated yet'); + const expectedRoute = ['/contact']; + + expect(contactLink.navigatedTo).withContext('should not have navigated yet').toBeNull(); click(contactLinkDe); fixture.detectChanges(); - expect(contactLink.navigatedTo).toEqual(['/contact']); + expect(contactLink.navigatedTo).toBeTruthy(); + expect(contactLink.navigatedTo).withContext(`should equal ${expectedRoute}`).toEqual(expectedRoute); }); }); }); diff --git a/src/app/side-info/resource-info/resource-info.component.spec.ts b/src/app/side-info/resource-info/resource-info.component.spec.ts index 534e1d315f..e376fa4d40 100644 --- a/src/app/side-info/resource-info/resource-info.component.spec.ts +++ b/src/app/side-info/resource-info/resource-info.component.spec.ts @@ -1,5 +1,6 @@ import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing'; import { Component, DebugElement } from '@angular/core'; +import { JsonPipe } from '@angular/common'; import { AbstractControl, FormBuilder, ReactiveFormsModule } from '@angular/forms'; import { Router } from '@angular/router'; @@ -54,6 +55,8 @@ describe('ResourceInfoComponent (DONE)', () => { let dataStreamerSearchResponseWithQuerySpy: Spy; let consoleSpy: Spy; + const jsonPipe = new JsonPipe(); + const expectedResourceId = '1232'; const expectedQuery = 'Test'; let expectedSearchResponseWithQuery: SearchResponseWithQuery; @@ -138,31 +141,31 @@ describe('ResourceInfoComponent (DONE)', () => { describe('BEFORE initial data binding', () => { it('should not have goToIndex', () => { - expect(component.goToIndex).toBeUndefined('should be undefined'); + expect(component.goToIndex).withContext('should be undefined').toBeUndefined(); }); it('should not have resourceId', () => { - expect(component.resourceId).toBeUndefined('should be undefined'); + expect(component.resourceId).withContext('should be undefined').toBeUndefined(); }); it('should not have resourceInfoFormGroup', () => { - expect(component.resourceInfoFormGroup).toBeUndefined('should be undefined'); + expect(component.resourceInfoFormGroup).withContext('should be undefined').toBeUndefined(); }); it('should not have resultSize', () => { - expect(component.resultSize).toBeUndefined('should be undefined'); + expect(component.resultSize).withContext('should be undefined').toBeUndefined(); }); it('should have empty resourceInfoData', () => { - expect(component.resourceInfoData).toBeDefined('should be defined'); - expect(component.resourceInfoData).toEqual(new ResourceInfo(), 'should equal new ResourceInfo'); + expect(component.resourceInfoData).withContext('should be defined').toBeDefined(); + expect(component.resourceInfoData).withContext('should equal new ResourceInfo').toEqual(new ResourceInfo()); }); it('should have fa-icons', () => { - expect(component.faArrowLeft).toBe(faArrowLeft, 'should be faArrowLeft'); - expect(component.faChevronLeft).toBe(faChevronLeft, 'should be faChevronLeft'); - expect(component.faChevronRight).toBe(faChevronRight, 'should be faChevronRight'); - expect(component.faTimesCircle).toBe(faTimesCircle, 'should be faTimesCircle'); + expect(component.faArrowLeft).withContext('should be faArrowLeft').toBe(faArrowLeft); + expect(component.faChevronLeft).withContext('should be faChevronLeft').toBe(faChevronLeft); + expect(component.faChevronRight).withContext('should be faChevronRight').toBe(faChevronRight); + expect(component.faTimesCircle).withContext('should be faTimesCircle').toBe(faTimesCircle); }); describe('VIEW', () => { @@ -222,8 +225,8 @@ describe('ResourceInfoComponent (DONE)', () => { it('... should have got `resourceId` from dataStreamerService', () => { expectSpyCall(dataStreamerResourceIdSpy, 1); - expect(component.resourceId).toBeTruthy('should be truthy'); - expect(component.resourceId).toBe(expectedResourceId, `should be ${expectedResourceId}`); + expect(component.resourceId).withContext('should be truthy').toBeTruthy(); + expect(component.resourceId).withContext(`should be ${expectedResourceId}`).toBe(expectedResourceId); }); it('... should have got searchResponseWithQuery from dataStreamerService', () => { @@ -236,11 +239,11 @@ describe('ResourceInfoComponent (DONE)', () => { expectSpyCall(updateResourceInfoSpy, 1, [expectedResourceId, expectedResponseClone]); }); it('... should have set `goToIndex` and `resultSize` (via _updateResourceInfo)', () => { - expect(component.resultSize).toBeTruthy('should be truthy'); - expect(component.resultSize).toBe(expectedResultSize, `should be ${expectedResultSize}`); + expect(component.resultSize).withContext('should be truthy').toBeTruthy(); + expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); - expect(component.goToIndex).toBeTruthy('should be truthy'); - expect(component.goToIndex).toBe(expectedGoToIndex, `should be ${expectedGoToIndex}`); + expect(component.goToIndex).withContext('should be truthy').toBeTruthy(); + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); }); it('... should have called _buildForm with `goToIndex` and `resultSize`', () => { @@ -255,7 +258,7 @@ describe('ResourceInfoComponent (DONE)', () => { // Should not have logged to console expectSpyCall(consoleSpy, 0); - expect(mockConsole.get(0)).toBeUndefined('should be undefined'); + expect(mockConsole.get(0)).withContext('should be undefined').toBeUndefined(); }); it('... should throw an error if subscription fails and log to console', () => { @@ -266,10 +269,10 @@ describe('ResourceInfoComponent (DONE)', () => { // Should not have logged to console expectSpyCall(consoleSpy, 0); - expect(mockConsole.get(0)).toBeUndefined('should be undefined'); + expect(mockConsole.get(0)).withContext('should be undefined').toBeUndefined(); // Spy on dataStreamerService to return an error - dataStreamerSearchResponseWithQuerySpy.and.returnValue(observableThrowError({ status: 404 })); + dataStreamerSearchResponseWithQuerySpy.and.returnValue(observableThrowError(() => new Error('error'))); const expectedLogMessage = 'RESOURCE-INFO: Got no sideInfoData from Subscription!'; @@ -286,7 +289,7 @@ describe('ResourceInfoComponent (DONE)', () => { // Check console expectSpyCall(consoleSpy, 1, expectedLogMessage); - expect(mockConsole.get(0)).toEqual(expectedLogMessage, `should be ${expectedLogMessage}`); + expect(mockConsole.get(0)).withContext(`should be ${expectedLogMessage}`).toEqual(expectedLogMessage); }); }); @@ -298,11 +301,11 @@ describe('ResourceInfoComponent (DONE)', () => { }); it('... should set `goToIndex` and `resultSize`', () => { - expect(component.resultSize).toBeTruthy('should be truthy'); - expect(component.resultSize).toBe(expectedResultSize, `should be ${expectedResultSize}`); + expect(component.resultSize).withContext('should be truthy').toBeTruthy(); + expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); - expect(component.goToIndex).toBeTruthy('should be truthy'); - expect(component.goToIndex).toBe(expectedGoToIndex, `should be ${expectedGoToIndex}`); + expect(component.goToIndex).withContext('should be truthy').toBeTruthy(); + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); }); it('... should change `goToIndex` and `resultSize` depending on input', () => { @@ -314,11 +317,11 @@ describe('ResourceInfoComponent (DONE)', () => { (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); - expect(component.resultSize).toBeTruthy('should be truthy'); - expect(component.resultSize).toBe(expectedResultSize, `should be ${expectedResultSize}`); + expect(component.resultSize).withContext('should be truthy').toBeTruthy(); + expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); - expect(component.goToIndex).toBeTruthy('should be truthy'); - expect(component.goToIndex).toBe(expectedGoToIndex, `should be ${expectedGoToIndex}`); + expect(component.goToIndex).withContext('should be truthy').toBeTruthy(); + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); }); it('... should set `resourceInfoData` (previous, current, next resource given)', () => { @@ -338,11 +341,10 @@ describe('ResourceInfoComponent (DONE)', () => { }, }; - expect(component.resourceInfoData).toBeTruthy('should be truthy'); - expect(component.resourceInfoData).toEqual( - expectedResourceInfoData, - `should be ${expectedResourceInfoData}` - ); + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should be ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); }); it('... should set `resourceInfoData` (only current, next resource given)', () => { @@ -366,14 +368,13 @@ describe('ResourceInfoComponent (DONE)', () => { (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); - expect(component.goToIndex).toBe(1, 'should be 1'); - expect(component.resultSize).toBe(3, 'should be 3'); + expect(component.goToIndex).withContext('should be 1').toBe(1); + expect(component.resultSize).withContext('should be 3').toBe(3); - expect(component.resourceInfoData).toBeTruthy('should be truthy'); - expect(component.resourceInfoData).toEqual( - expectedResourceInfoData, - `should be ${expectedResourceInfoData}` - ); + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should be ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); }); it('... should set `resourceInfoData` (only current, previous resource given)', () => { @@ -397,14 +398,13 @@ describe('ResourceInfoComponent (DONE)', () => { (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); - expect(component.goToIndex).toBe(expectedGoToIndex, `should be ${expectedGoToIndex}`); - expect(component.resultSize).toBe(expectedResultSize, `should be ${expectedResultSize}`); + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); + expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); - expect(component.resourceInfoData).toBeTruthy('should be truthy'); - expect(component.resourceInfoData).toEqual( - expectedResourceInfoData, - `should be ${expectedResourceInfoData}` - ); + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should be ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); }); it('... should set `resourceInfoData` (only current resource given)', () => { @@ -427,14 +427,13 @@ describe('ResourceInfoComponent (DONE)', () => { (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); - expect(component.goToIndex).toBe(expectedGoToIndex, `should be ${expectedGoToIndex}`); - expect(component.resultSize).toBe(expectedResultSize, `should be ${expectedResultSize}`); + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); + expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); - expect(component.resourceInfoData).toBeTruthy('should be truthy'); - expect(component.resourceInfoData).toEqual( - expectedResourceInfoData, - `should be ${expectedResourceInfoData}` - ); + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should be ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); }); it('... should set `resourceInfoData` (no previous, current resource given)', () => { @@ -464,14 +463,13 @@ describe('ResourceInfoComponent (DONE)', () => { (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); - expect(component.goToIndex).toBe(expectedGoToIndex, `should be ${expectedGoToIndex}`); - expect(component.resultSize).toBe(expectedResultSize, `should be ${expectedResultSize}`); + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); + expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); - expect(component.resourceInfoData).toBeTruthy('should be truthy'); - expect(component.resourceInfoData).toEqual( - expectedResourceInfoData, - `should be ${expectedResourceInfoData}` - ); + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should equal ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); }); }); @@ -513,12 +511,13 @@ describe('ResourceInfoComponent (DONE)', () => { }); it('... should have initiated resourceInfoFormGroup with correct resourceInfoIndex', () => { - expect(component.resourceInfoFormGroup).toBeTruthy(); - expect(component.resourceInfoFormGroup.controls['resourceInfoIndex']).toBeTruthy(); - expectedGoToIndex = 3; - expect(component.resourceInfoFormGroup.controls['resourceInfoIndex'].value).toEqual(expectedGoToIndex); + expect(component.resourceInfoFormGroup).toBeTruthy(); + expect(component.resourceInfoFormGroup.controls['resourceInfoIndex']).toBeTruthy(); + expect(component.resourceInfoFormGroup.controls['resourceInfoIndex'].value) + .withContext(`should equal ${expectedGoToIndex}`) + .toEqual(expectedGoToIndex); }); it('... should have initiated resourceInfoFormGroup with empty index if none is given', () => { @@ -530,7 +529,9 @@ describe('ResourceInfoComponent (DONE)', () => { expect(component.resourceInfoFormGroup).toBeTruthy(); expect(component.resourceInfoFormGroup.controls['resourceInfoIndex']).toBeTruthy(); - expect(component.resourceInfoFormGroup.controls['resourceInfoIndex'].value).toEqual(expectedEmptyIndex); + expect(component.resourceInfoFormGroup.controls['resourceInfoIndex'].value) + .withContext(`should equal ${expectedEmptyIndex}`) + .toEqual(expectedEmptyIndex); }); describe('Validators', () => { @@ -577,58 +578,83 @@ describe('ResourceInfoComponent (DONE)', () => { const expectedPattern = '/^[1-9]\\d{0,9}$/'; it('NaN', () => { - resourceInfoIndex.setValue(NaN); + const nanValue = NaN; + resourceInfoIndex.setValue(nanValue); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: nanValue, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: NaN }, - `should be { requiredPattern: ${expectedPattern}, actualValue: NaN }` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); - it('string', () => { - resourceInfoIndex.setValue('should error'); + it('any string', () => { + const anyString = 'should error'; + resourceInfoIndex.setValue(anyString); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: anyString, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: 'should error' }, - `should be { requiredPattern: ${expectedPattern}, actualValue: \'should error\'}` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); - it('array', () => { - resourceInfoIndex.setValue([1, 2, 3]); + it('any array', () => { + const anyArray = [1, 2, 3]; + resourceInfoIndex.setValue(anyArray); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: anyArray, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: [1, 2, 3] }, - `should be { requiredPattern: ${expectedPattern}, actualValue: [1, 2, 3]}` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); it('empty object', () => { - resourceInfoIndex.setValue({}); + const emptyObject = {}; + resourceInfoIndex.setValue(emptyObject); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: emptyObject, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: {} }, - `should be { requiredPattern: ${expectedPattern}, actualValue: {} }` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); - it('object', () => { - resourceInfoIndex.setValue({ 1: 'should', 2: 'error' }); + it('any object', () => { + const anyObject = { 1: 'should', 2: 'error' }; + resourceInfoIndex.setValue(anyObject); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: anyObject, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: { 1: 'should', 2: 'error' } }, - `should be { requiredPattern: ${expectedPattern}, actualValue: { 1: 'should', 2: 'error' }}` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); }); @@ -636,69 +662,99 @@ describe('ResourceInfoComponent (DONE)', () => { const expectedPattern = '/^[1-9]\\d{0,9}$/'; it('no 10-digit negative integers (-1234567890)', () => { - resourceInfoIndex.setValue(-1234567890); + const tenDigitNegativeInteger = -1234567890; + resourceInfoIndex.setValue(tenDigitNegativeInteger); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: tenDigitNegativeInteger, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: -1234567890 }, - `should be { requiredPattern: ${expectedPattern}, actualValue: -1234567890 }` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); it('no 1-digit negative integers (-1)', () => { - resourceInfoIndex.setValue(-1); + const oneDigitNegativeInteger = -1; + resourceInfoIndex.setValue(oneDigitNegativeInteger); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: oneDigitNegativeInteger, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: -1 }, - `should be { requiredPattern: ${expectedPattern}, actualValue: -1 }` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); it('not 0', () => { - resourceInfoIndex.setValue(0); + const zero = 0; + resourceInfoIndex.setValue(zero); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: zero, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: 0 }, - `should be { requiredPattern: ${expectedPattern}, actualValue: 0 }` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); it('no 11-digit positive integers (12345678901)', () => { - resourceInfoIndex.setValue(12345678901); + const elevenDigitPositivInteger = 12345678901; + resourceInfoIndex.setValue(elevenDigitPositivInteger); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: elevenDigitPositivInteger, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: 12345678901 }, - `should be { requiredPattern: ${expectedPattern}, actualValue: 12345678901 }` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); it('no floating numbers (1.1)', () => { - resourceInfoIndex.setValue(1.1); + const floatingNumber = 1.1; + resourceInfoIndex.setValue(floatingNumber); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: floatingNumber, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: 1.1 }, - `should be { requiredPattern: ${expectedPattern}, actualValue: 1.1 }` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); it('no big floating numbers (1234567890.0123456789)', () => { - resourceInfoIndex.setValue(1234567890.0123456789); + const bigFloatingNumber = 1234567890.0123456789; + resourceInfoIndex.setValue(bigFloatingNumber); errors = getErrors(resourceInfoIndex); + const expectedPatternError = { + requiredPattern: expectedPattern, + actualValue: bigFloatingNumber, + }; + expect(errors['pattern']).toBeTruthy(); - expect(errors['pattern']).toEqual( - { requiredPattern: expectedPattern, actualValue: 1234567890.0123456789 }, - `should be { requiredPattern: ${expectedPattern}, actualValue: 1234567890.0123456789 }` - ); + expect(errors['pattern']) + .withContext(`should equal ${expectedPatternError}`) + .toEqual(expectedPatternError); }); }); @@ -737,16 +793,20 @@ describe('ResourceInfoComponent (DONE)', () => { resourceInfoIndex.setValue(-1); errors = getErrors(resourceInfoIndex); + const expectedError = { min: 1, actual: -1 }; + expect(errors['min']).toBeTruthy(); - expect(errors['min']).toEqual({ min: 1, actual: -1 }, 'should be { min: 1, actual: -1 }'); + expect(errors['min']).withContext(`should equal ${expectedError}`).toEqual(expectedError); }); it('min error == TRUE for 0', () => { resourceInfoIndex.setValue(0); errors = getErrors(resourceInfoIndex); + const expectedError = { min: 1, actual: 0 }; + expect(errors['min']).toBeTruthy(); - expect(errors['min']).toEqual({ min: 1, actual: 0 }, 'should be { min: 1, actual: 0}'); + expect(errors['min']).withContext(`should equal ${expectedError}`).toEqual(expectedError); }); it('min error == FALSE for 1', () => { @@ -769,8 +829,10 @@ describe('ResourceInfoComponent (DONE)', () => { resourceInfoIndex.setValue(expectedResultSize + 1); errors = getErrors(resourceInfoIndex); + const expectedError = { max: 5, actual: 6 }; + expect(errors['max']).toBeTruthy(); - expect(errors['max']).toEqual({ max: 5, actual: 6 }, 'should be { max: 5, actual: 6 }'); + expect(errors['max']).withContext(`should equal ${expectedError}`).toEqual(expectedError); }); it('max error == FALSE for value equals resultSize', () => { @@ -796,7 +858,12 @@ describe('ResourceInfoComponent (DONE)', () => { expect( (component as any)._findIndexPositionInSearchResultsById(expectedResourceId, expectedResponseClone) - ).toBe(2, 'should be 2'); + ).toBeTruthy(); + expect( + (component as any)._findIndexPositionInSearchResultsById(expectedResourceId, expectedResponseClone) + ) + .withContext('should be 2') + .toBe(2); }); it('... should return -1 if resource id is not found in given search response', () => { @@ -812,7 +879,10 @@ describe('ResourceInfoComponent (DONE)', () => { expect( (component as any)._findIndexPositionInSearchResultsById(expectedResourceId, otherResponseClone) - ).toBe(-1, 'should be -1'); + ).toBeTruthy(); + expect((component as any)._findIndexPositionInSearchResultsById(expectedResourceId, otherResponseClone)) + .withContext('should be -1') + .toBe(-1); }); }); @@ -951,7 +1021,7 @@ describe('ResourceInfoComponent (DONE)', () => { }); it('... should trigger `router.navigate` with query params if searchResults are given', () => { - const expectedRoute = ['/data/search/fulltext']; + const expectedRoute = ['/data/search']; const expectedParams = { queryParams: { query: component.resourceInfoData.searchResults.query } }; component.navigateToSearchPanel(); @@ -961,7 +1031,7 @@ describe('ResourceInfoComponent (DONE)', () => { }); it('... should trigger `router.navigate` without query params if no searchResults are given', () => { - const expectedRoute = ['/data/search/fulltext']; + const expectedRoute = ['/data/search']; const expectedParams = { queryParams: { query: '' } }; component.resourceInfoData.searchResults = undefined; @@ -1030,8 +1100,10 @@ describe('ResourceInfoComponent (DONE)', () => { const spanDe = getAndExpectDebugElementByCss(buttonDe[0], 'span.awg-resource-info-btn-text', 1, 1); const spanEl = spanDe[0].nativeElement; + const expectedText = 'Zur Suche'; + expect(spanEl.innerText).toBeTruthy(); - expect(spanEl.innerText).toBe('Zur Suche', 'should be `Zur Suche`'); + expect(spanEl.innerText).withContext(`should be ${expectedText}`).toBe(expectedText); }); it('... should display bold, small, muted text in second div', () => { @@ -1039,9 +1111,13 @@ describe('ResourceInfoComponent (DONE)', () => { const strongDes = getAndExpectDebugElementByCss(divDes[1], 'strong', 1, 1); const strongEl = strongDes[0].nativeElement; + const expectedText = 'Aktuelle Suchanfrage'; + expect(strongEl).toHaveCssClass('text-muted'); expect(strongEl).toHaveCssClass('small'); - expect(strongEl.innerText).toBe('Aktueller Suchbegriff'); + + expect(strongEl.innerText).toBeTruthy(); + expect(strongEl.innerText).withContext(`should be ${expectedText}`).toBe(expectedText); }); it('... should display query in span in second div', () => { @@ -1053,7 +1129,10 @@ describe('ResourceInfoComponent (DONE)', () => { const spanDes = getAndExpectDebugElementByCss(divDes[1], 'span', 1, 1); const spanEl = spanDes[0].nativeElement; - expect(spanEl.innerText).toBe(expectedQuery, `should be ${expectedQuery}`); + expect(spanEl.innerText).toBeTruthy(); + expect(spanEl.innerText) + .withContext(`should be ${expectedQuery}`) + .toBe(jsonPipe.transform(expectedQuery)); }); it('... should display `---` without query in span in second div', () => { @@ -1065,7 +1144,10 @@ describe('ResourceInfoComponent (DONE)', () => { const spanDes = getAndExpectDebugElementByCss(divDes[1], 'span', 1, 1); const spanEl = spanDes[0].nativeElement; - expect(spanEl.innerText).toBe('---', 'should be ---'); + const expectedText = '---'; + + expect(spanEl.innerText).toBeTruthy(); + expect(spanEl.innerText).withContext(`should be ${expectedText}`).toBe(expectedText); }); }); @@ -1165,7 +1247,10 @@ describe('ResourceInfoComponent (DONE)', () => { const expectedIndex = component.resourceInfoData.resources.previous.displayIndex; // = 2 const expectedInnerText = `Vorheriges Ergebnis (${expectedIndex}/${expectedResultSize})`; - expect(spanEl.innerText).toBe(expectedInnerText, `should be ${expectedInnerText}`); + expect(spanEl.innerText).toBeTruthy(); + expect(spanEl.innerText) + .withContext(`should be ${expectedInnerText}`) + .toBe(expectedInnerText); }); it('... should have two divs.single-line in second div', () => { @@ -1201,7 +1286,7 @@ describe('ResourceInfoComponent (DONE)', () => { const title = component.resourceInfoData.resources.previous.title; // = Nelson 1974 expect(spanEl0.innerText).toBeTruthy(); - expect(spanEl0.innerText).toBe(title, `should be ${title}`); + expect(spanEl0.innerText).withContext(`should be ${title}`).toBe(title); }); it('... should display previous subtitle in second div.single-line', () => { @@ -1221,7 +1306,7 @@ describe('ResourceInfoComponent (DONE)', () => { const subTitle = component.resourceInfoData.resources.previous.subtitle; // = Bibliografie expect(spanEl1.innerText).toBeTruthy(); - expect(spanEl1.innerText).toBe(subTitle, `should be ${subTitle}`); + expect(spanEl1.innerText).withContext(`should be ${subTitle}`).toBe(subTitle); }); }); @@ -1309,16 +1394,14 @@ describe('ResourceInfoComponent (DONE)', () => { const whiteSpace = '\xA0'; // Hex code for a non-breaking space ' ' expect(spanEl0.innerText).toBeTruthy(); - expect(spanEl0.innerText).toBe( - whiteSpace, - `should be non-breaking whiteSpace ${whiteSpace}` - ); + expect(spanEl0.innerText) + .withContext(`should be non-breaking whiteSpace ${whiteSpace}`) + .toBe(whiteSpace); expect(spanEl1.innerText).toBeTruthy(); - expect(spanEl1.innerText).toBe( - whiteSpace, - `should be non-breaking whiteSpace ${whiteSpace}` - ); + expect(spanEl1.innerText) + .withContext(`should be non-breaking whiteSpace ${whiteSpace}`) + .toBe(whiteSpace); }); }); }); @@ -1379,7 +1462,10 @@ describe('ResourceInfoComponent (DONE)', () => { const expectedIndex = component.resourceInfoData.resources.current.displayIndex; // = 3 const expectedInnerText = `Angezeigtes Ergebnis (${expectedIndex}/${expectedResultSize})`; - expect(spanEl.innerText).toBe(expectedInnerText, `should be ${expectedInnerText}`); + expect(spanEl.innerText).toBeTruthy(); + expect(spanEl.innerText) + .withContext(`should be ${expectedInnerText}`) + .toBe(expectedInnerText); }); it('... should contain one div with button and an input in form > div.input-group', () => { @@ -1415,21 +1501,20 @@ describe('ResourceInfoComponent (DONE)', () => { // FormControlName='resourceInfoIndex' expect(inputDes[0].attributes.formControlName).toBeTruthy(); - expect(inputDes[0].attributes.formControlName).toBe( - 'resourceInfoIndex', - 'should be resourceInfoIndex' - ); + expect(inputDes[0].attributes.formControlName) + .withContext('should be resourceInfoIndex') + .toBe('resourceInfoIndex'); // Type='number' expect(inputDes[0].attributes.type).toBeTruthy(); - expect(inputDes[0].attributes.type).toBe('number', 'should be number'); + expect(inputDes[0].attributes.type).withContext('should be number').toBe('number'); // Size=4 expect(inputDes[0].attributes.size).toBeTruthy(); - expect(inputDes[0].attributes.size).toBe('4', 'should be 4'); + expect(inputDes[0].attributes.size).withContext('should be 4').toBe('4'); // Step=1 expect(inputDes[0].attributes.step).toBeTruthy(); - expect(inputDes[0].attributes.step).toBe('1', 'should be 1'); + expect(inputDes[0].attributes.step).withContext('should be 1').toBe('1'); }); describe('button', () => { @@ -1462,8 +1547,10 @@ describe('ResourceInfoComponent (DONE)', () => { ); const buttonEl = buttonDes[0].nativeElement; + const expectedText = 'Gehe zu'; + expect(buttonEl.innerText).toBeTruthy(); - expect(buttonEl.innerText).toBe('Gehe zu', 'should be `Gehe zu`'); + expect(buttonEl.innerText).withContext(`should be ${expectedText}`).toBe(expectedText); }); it('... should have btn-outline-success class when form is valid', () => { @@ -1520,9 +1607,11 @@ describe('ResourceInfoComponent (DONE)', () => { const resourceInfoIndex = component.resourceInfoFormGroup.controls['resourceInfoIndex']; // Input index is current.displayIndex - expect(resourceInfoIndex.value).toBe( - component.resourceInfoData.resources.current.displayIndex - ); + expect(resourceInfoIndex.value) + .withContext( + `should be ${component.resourceInfoData.resources.current.displayIndex}` + ) + .toBe(component.resourceInfoData.resources.current.displayIndex); // Disabled = true expect(buttonEl.disabled).toBeTrue(); }); @@ -1572,9 +1661,11 @@ describe('ResourceInfoComponent (DONE)', () => { expect(component.resourceInfoFormGroup.invalid).toBeFalsy(); // Input index is different from current.displayIndex - expect(resourceInfoIndex.value).not.toBe( - component.resourceInfoData.resources.current.displayIndex - ); + expect(resourceInfoIndex.value) + .withContext( + `should not be ${component.resourceInfoData.resources.current.displayIndex}` + ) + .not.toBe(component.resourceInfoData.resources.current.displayIndex); // Disabled = false expect(buttonEl.disabled).toBeFalse(); @@ -1784,7 +1875,10 @@ describe('ResourceInfoComponent (DONE)', () => { const expectedIndex = component.resourceInfoData.resources.next.displayIndex; // = 4 const expectedInnerText = `Nächstes Ergebnis (${expectedIndex}/${expectedResultSize})`; - expect(spanEl.innerText).toBe(expectedInnerText, `should be ${expectedInnerText}`); + expect(spanEl.innerText).toBeTruthy(); + expect(spanEl.innerText) + .withContext(`should be ${expectedInnerText}`) + .toBe(expectedInnerText); }); it('... should have two divs.single-line in second div', () => { @@ -1820,7 +1914,7 @@ describe('ResourceInfoComponent (DONE)', () => { const title = component.resourceInfoData.resources.next.title; // = BrownJ 2014 expect(spanEl0.innerText).toBeTruthy(); - expect(spanEl0.innerText).toBe(title, `should be ${title}`); + expect(spanEl0.innerText).withContext(`should be ${title}`).toBe(title); }); it('... should display next subtitle in second div.single-line', () => { @@ -1841,7 +1935,7 @@ describe('ResourceInfoComponent (DONE)', () => { const subTitle = component.resourceInfoData.resources.next.subtitle; // = Bibliografie expect(spanEl1.innerText).toBeTruthy(); - expect(spanEl1.innerText).toBe(subTitle, `should be ${subTitle}`); + expect(spanEl1.innerText).withContext(`should be ${subTitle}`).toBe(subTitle); }); }); @@ -1859,10 +1953,9 @@ describe('ResourceInfoComponent (DONE)', () => { it('... should have current.displayIndex === resultSize', () => { expect(component.resourceInfoData.resources.current.displayIndex).toBeTruthy(); - expect(component.resourceInfoData.resources.current.displayIndex).toBe( - component.resultSize, - `should be ${component.resultSize}` - ); + expect(component.resourceInfoData.resources.current.displayIndex) + .withContext(`should be ${component.resultSize}`) + .toBe(component.resultSize); }); it('... should have list-group-item-danger class', () => { @@ -1936,17 +2029,15 @@ describe('ResourceInfoComponent (DONE)', () => { const whiteSpace = '\xA0'; // Hex code for a non-breaking space ' ' - expect(spanEl0.innerText).toBeTruthy(); - expect(spanEl0.innerText).toBe( - whiteSpace, - `should be non-breaking whiteSpace ${whiteSpace}` - ); + expect(spanEl0.innerText).withContext(`should be truthy`).toBeTruthy(); + expect(spanEl0.innerText) + .withContext(`should be non-breaking whiteSpace ${whiteSpace}`) + .toBe(whiteSpace); - expect(spanEl1.innerText).toBeTruthy(); - expect(spanEl1.innerText).toBe( - whiteSpace, - `should be non-breaking whiteSpace ${whiteSpace}` - ); + expect(spanEl1.innerText).withContext(`should be truthy`).toBeTruthy(); + expect(spanEl1.innerText) + .withContext(`should be non-breaking whiteSpace ${whiteSpace}`) + .toBe(whiteSpace); }); }); }); @@ -1960,8 +2051,8 @@ describe('ResourceInfoComponent (DONE)', () => { const aDe = getAndExpectDebugElementByCss(compDe, 'div.card-footer a', 1, 1); const aEl = aDe[0].nativeElement; - expect(aEl.href).toBe(expectedHref, `should be ${expectedHref}`); - expect(aEl.innerText).toBe(expectedInnerText, `should be ${expectedInnerText}`); + expect(aEl.href).withContext(`should be ${expectedHref}`).toBe(expectedHref); + expect(aEl.innerText).withContext(`should be ${expectedInnerText}`).toBe(expectedInnerText); }); }); }); diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.spec.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.spec.ts index 909565510b..a1dd368da0 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.spec.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.spec.ts @@ -1,6 +1,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { Component, DebugElement, EventEmitter, Input, Output } from '@angular/core'; -import { ActivatedRoute, Router } from '@angular/router'; +import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { ActivatedRouteStub } from '@testing/router-stubs'; import { mockResourceDetail, mockResourceFullResponseJson } from '@testing/mock-data'; @@ -60,9 +60,6 @@ describe('ResourceDetailComponent', () => { let fixture: ComponentFixture; let compDe: DebugElement; - let mockRouter: Spy; - let mockActivatedRoute: ActivatedRouteStub; - // Json object let jsonConvert: JsonConvert; let expectedResourceFullResponseJson: ResourceFullResponseJson; @@ -85,9 +82,16 @@ describe('ResourceDetailComponent', () => { }; // Router spy object - mockRouter = jasmine.createSpyObj('Router', ['navigate']); + const mockRouter = { + url: '/test-url', + events: observableOf( + new NavigationEnd(0, 'http://localhost:4200/test-url', 'http://localhost:4200/test-url') + ), + navigate: jasmine.createSpy('navigate'), + }; + // Mocked activated route - mockActivatedRoute = new ActivatedRouteStub(); + const mockActivatedRoute: ActivatedRouteStub = new ActivatedRouteStub(); TestBed.configureTestingModule({ imports: [NgbNavModule], diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts index 5070c29c5f..5963b365cb 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts @@ -101,7 +101,7 @@ describe('SelectResultsComponent (DONE)', () => { describe('BEFORE initial data binding', () => { it('should not have queryResult', () => { - expect(component.queryResult$).toBeUndefined('should be undefined'); + expect(component.queryResult$).withContext('should be undefined').toBeUndefined(); }); describe('VIEW', () => { diff --git a/src/testing/expect-helper.ts b/src/testing/expect-helper.ts index 8dea2ae2b8..4e05d83653 100644 --- a/src/testing/expect-helper.ts +++ b/src/testing/expect-helper.ts @@ -38,7 +38,7 @@ function expectDebugElement( : `should have ${expectedFailMsg} ${selector}`; expect(de).toBeDefined(); - expect(de.length).toBe(expected, failMsg); + expect(de.length).withContext(failMsg).toBe(expected); } /** From d6223cce4f819cadf7479724ff34236328c8079f Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Wed, 9 Feb 2022 17:48:04 +0100 Subject: [PATCH 064/148] fix(search): use common function for all API requests in DataApiService --- .../core/services/api-service/api.service.ts | 4 +- .../data-view/services/data-api.service.ts | 261 +++++++++--------- 2 files changed, 131 insertions(+), 134 deletions(-) diff --git a/src/app/core/services/api-service/api.service.ts b/src/app/core/services/api-service/api.service.ts index fcd866e3f6..7eb3a4b39a 100644 --- a/src/app/core/services/api-service/api.service.ts +++ b/src/app/core/services/api-service/api.service.ts @@ -62,7 +62,7 @@ export class ApiService { return this._httpGet(queryPath, queryHttpParams).pipe( map((result: ApiServiceResult): Observable => result.getBody(responseJsonType)), - catchError((error: ApiServiceError): Observable => observableThrowError(error)) + catchError((error: ApiServiceError): Observable => observableThrowError(() => error)) ); } @@ -120,6 +120,6 @@ export class ApiService { apiServiceError.statusText = error.statusText ? error.statusText : apiServiceError.statusText; apiServiceError.errorInfo = error.message ? error.message : apiServiceError.errorInfo; apiServiceError.url = error.url ? error.url : apiServiceError.url; - return observableThrowError(apiServiceError); + return observableThrowError(() => apiServiceError); } } diff --git a/src/app/views/data-view/services/data-api.service.ts b/src/app/views/data-view/services/data-api.service.ts index e1ef834b42..a722bef00f 100644 --- a/src/app/views/data-view/services/data-api.service.ts +++ b/src/app/views/data-view/services/data-api.service.ts @@ -96,141 +96,143 @@ export class DataApiService extends ApiService { } /** - * Public method: getSearchData. + * Public method: getPropertyListsByResourceType. * - * It sets the path and params for a search query - * depending on the search mode (fulltext or extended) - * to retrieve all results from the given (SALSAH) API. + * It sets the path and params for the Extended Search to retrieve + * the list of properties of a given resource type from the given (SALSAH) API. * - * @params {SearchParams} searchParams The given search parameters of the query. + * @params {string} restypeId The given resource type. * - * @returns {Observable} The observable with the SearchResponseJson data. + * @returns {Observable} The observable with the PropertyTypesInResourceClassResponseJson data. */ - getSearchData(searchParams: SearchParams): Observable { - if (!searchParams || !searchParams.query) { - return observableOf(new SearchResponseJson()); - } - if (typeof searchParams.query === 'object' && !searchParams.query['filterByRestype']) { - return observableOf(new SearchResponseJson()); - } - - // Default values - const sp: SearchParams = { - query: searchParams.query, - nRows: searchParams.nRows || '-1', - startAt: searchParams.startAt || '0', - view: searchParams.view || SearchResultsViewTypes.table, - }; - - // Set path and params of query - let queryPath: string = this.routes.search; - if (typeof searchParams.query === 'string') { - queryPath = queryPath + searchParams.query; + getPropertyListsByResourceType(restypeId: string): Observable { + if (!restypeId) { + return observableOf(new PropertyTypesInResourceClassResponseJson()); } - const queryHttpParams = this._createQueryParams(sp); - // Cold request to API - const searchData$: Observable = this.getApiResponse( - SearchResponseJson, - queryPath, - queryHttpParams - ); + const propertylistsData$: Observable = + this._getResourceDataResponseFromApi(PropertyTypesInResourceClassResponseJson, restypeId); - // Return converted search response - return searchData$.pipe( + // Return resource types + return propertylistsData$.pipe( // Default empty value - defaultIfEmpty(new SearchResponseJson()), - - // Map the response to a converted search response object for HTML display - map((searchResponse: SearchResponseJson) => { - console.log(this.httpGetUrl); + defaultIfEmpty(new PropertyTypesInResourceClassResponseJson()), - return this.conversionService.convertFullTextSearchResults(searchResponse); - }) + map((propertylists: PropertyTypesInResourceClassResponseJson) => propertylists) ); } - getResourcetypes(): Observable { - // Set path and params of query - const queryPath: string = this.routes.resourcetypes; - const queryHttpParams = new HttpParams().set('vocabulary', this.vocabularyId).set('lang', this.defaultLanguage); + /** + * Public method: getResourceData. + * + * It provides the data for the resource detail view + * as an ResourceData observable. + * + * @params {string} resourceId The id of the requested resource. + * + * @returns {Observable} The observable with the resource data. + */ + getResourceData(resourceId: string): Observable { + if (!resourceId) { + return; + } // Cold request to API - const resourcetypesData$: Observable = this.getApiResponse( - ResourceTypesInVocabularyResponseJson, - queryPath, - queryHttpParams + const fullResponseData$: Observable = this._getResourceDataResponseFromApi( + ResourceFullResponseJson, + resourceId + ); + const contextData$: Observable = this._getResourceDataResponseFromApi( + ResourceContextResponseJson, + resourceId ); - // Return resource types - return resourcetypesData$.pipe( + // Return converted search response + return observableForkJoin([fullResponseData$, contextData$]).pipe( // Default empty value - defaultIfEmpty(new ResourceTypesInVocabularyResponseJson()), + defaultIfEmpty([new ResourceFullResponseJson(), new ResourceContextResponseJson()]), - map((resourcetypes: ResourceTypesInVocabularyResponseJson) => { - console.log(this.httpGetUrl); - return resourcetypes; - }) + // Map the forkJoined response to a ResourceData object + map((resourceDataResponse: IResourceDataResponse) => + this._prepareResourceData(resourceDataResponse, resourceId) + ) ); } - getPropertyListsByResourceType(restypeId: string): Observable { - // Set path and params of query - const queryPath: string = this.routes.propertylists; - const queryHttpParams = new HttpParams().set('restype', restypeId); - + /** + * Public method: getResourceTypes. + * + * It sets the path and params for the Extended search to retrieve + * all resource types of the Webern vocabulary (4) from the given (SALSAH) API. + * + * @returns {Observable} The observable with the ResourceTypesInVocabularyResponseJson data. + */ + getResourceTypes(): Observable { // Cold request to API - const propertylistsData$: Observable = this.getApiResponse( - PropertyTypesInResourceClassResponseJson, - queryPath, - queryHttpParams - ); + const resourcetypesData$: Observable = + this._getResourceDataResponseFromApi(ResourceTypesInVocabularyResponseJson, ''); // Return resource types - return propertylistsData$.pipe( + return resourcetypesData$.pipe( // Default empty value - defaultIfEmpty(new PropertyTypesInResourceClassResponseJson()), + defaultIfEmpty(new ResourceTypesInVocabularyResponseJson()), - map((propertylists: PropertyTypesInResourceClassResponseJson) => { - console.log(this.httpGetUrl); - return propertylists; - }) + map((resourcetypes: ResourceTypesInVocabularyResponseJson) => resourcetypes) ); } /** - * Public method: getResourceData. + * Public method: getSearchData. * - * It provides the data for the resource detail view - * as an ResourceData observable. + * It sets the path and params for a search query + * depending on the search mode (fulltext or extended) + * to retrieve all results from the given (SALSAH) API. * - * @params {string} resourceId The id of the requested resource. + * @params {SearchParams} searchParams The given search parameters of the query. * - * @returns {Observable} The observable with the resource data. + * @returns {Observable} The observable with the SearchResponseJson data. */ - getResourceData(resourceId: string): Observable { - if (!resourceId) { - return; + getSearchData(searchParams: SearchParams): Observable { + if (!searchParams || !searchParams.query) { + // .console.log('APISERVICE: no searchParams --> RETURN', searchParams); + + return observableOf(new SearchResponseJson()); + } + if (typeof searchParams.query === 'object' && !searchParams.query['filterByRestype']) { + // .console.log('APISERVICE: no searchParams object --> RETURN', searchParams); + return observableOf(new SearchResponseJson()); } + // .console.log('APISERVICE: searchParams', searchParams); + + // Default values + const sp: SearchParams = { + query: searchParams.query, + nRows: searchParams.nRows || '-1', + startAt: searchParams.startAt || '0', + view: searchParams.view || SearchResultsViewTypes.table, + }; // Cold request to API - const fullResponseData$: Observable = this._getResourceFullResponseData(resourceId); - const contextData$: Observable = this._getResourceContextData(resourceId); + const searchData$: Observable = this._getResourceDataResponseFromApi( + SearchResponseJson, + '', + sp + ); // Return converted search response - return observableForkJoin([fullResponseData$, contextData$]).pipe( + return searchData$.pipe( // Default empty value - defaultIfEmpty([new ResourceFullResponseJson(), new ResourceContextResponseJson()]), + defaultIfEmpty(new SearchResponseJson()), - // Map the forkJoined response to a ResourceData object - map((resourceDataResponse: IResourceDataResponse) => - this._prepareResourceData(resourceDataResponse, resourceId) + // Map the response to a converted search response object for HTML display + map((searchResponse: SearchResponseJson) => + this.conversionService.convertFullTextSearchResults(searchResponse) ) ); } - private _createQueryParams(sp: SearchParams) { + private _createSearchQueryParams(sp: SearchParams) { let queryHttpParams = new HttpParams() .set('filter_by_project', this.projectId) .set('lang', this.defaultLanguage) @@ -243,20 +245,25 @@ export class DataApiService extends ApiService { queryHttpParams = queryHttpParams.append('searchtype', 'extended'); queryHttpParams = queryHttpParams.append('filter_by_restype', sp.query['filterByRestype']); - if (sp.query.propertyId.length > 0) { + if ( + sp.query.propertyId && + sp.query.propertyId.length > 0 && + sp.query.compop && + sp.query.compop.length > 0 + ) { + // Compop not possible without property sp.query.propertyId.forEach(id => { queryHttpParams = queryHttpParams.append('property_id', id); }); - } - if (sp.query.compop.length > 0) { sp.query.compop.forEach(compop => { queryHttpParams = queryHttpParams.append('compop', compop); }); - } - if (sp.query.searchval.length > 0) { - sp.query.searchval.forEach(searchval => { - queryHttpParams = queryHttpParams.append('searchval', searchval); - }); + // For compop EXISTS there is no searchval + if (sp.query.searchval && sp.query.searchval.length > 0) { + sp.query.searchval.forEach(searchval => { + queryHttpParams = queryHttpParams.append('searchval', searchval); + }); + } } } @@ -289,34 +296,6 @@ export class DataApiService extends ApiService { return new ResourceData(resourceDataResponse[0], resourceDetail); } - /** - * Private method: _getResourceContextData. - * - * It calls the {@link _getResourceDataResponseFromApi} method to - * provide an Observable with the ResourceContextResponseJson data. - * - * @params {string} resourceId The id of the requested resource. - * - * @returns {Observable} The observable of the response data. - */ - private _getResourceContextData(resourceId: string): Observable { - return this._getResourceDataResponseFromApi(ResourceContextResponseJson, resourceId); - } - - /** - * Private method: _getResourceFullResponseData. - * - * It calls the {@link _getResourceDataResponseFromApi} method to - * provide an Observable with the ResourceFullResponseJson data. - * - * @params {string} resourceId The id of the requested resource. - * - * @returns {Observable} The observable of the response data. - */ - private _getResourceFullResponseData(resourceId: string): Observable { - return this._getResourceDataResponseFromApi(ResourceFullResponseJson, resourceId); - } - /** * Private method: _getGeoData. * @@ -383,10 +362,14 @@ export class DataApiService extends ApiService { * * @returns {Observable} The observable of the HTTP response. */ - private _getResourceDataResponseFromApi(responseJsonType: any, id: string): Observable { + private _getResourceDataResponseFromApi( + responseJsonType: any, + id: string, + searchParams?: SearchParams + ): Observable { // Init query path and params let queryPath: string; - let queryHttpParams: HttpParams = new HttpParams(); + let queryHttpParams: HttpParams; // Set path and params of query depending on responseJsonType switch (responseJsonType) { @@ -394,19 +377,33 @@ export class DataApiService extends ApiService { queryPath = this.routes.geonames + id; queryHttpParams = queryHttpParams.set('reqtype', 'node'); break; - case HlistJson: - queryPath = this.routes.hlists + id; + case PropertyTypesInResourceClassResponseJson: + queryPath = this.routes.propertylists; + queryHttpParams = new HttpParams().set('restype', id); break; case ResourceContextResponseJson: queryPath = this.routes.resources + id + this.resourceSuffix; - queryHttpParams = queryHttpParams.set('reqtype', 'context'); + queryHttpParams = new HttpParams().set('reqtype', 'context'); break; case ResourceFullResponseJson: queryPath = this.routes.resources + id + this.resourceSuffix; + queryHttpParams = new HttpParams(); + break; + case ResourceTypesInVocabularyResponseJson: + queryPath = this.routes.resourcetypes; + queryHttpParams = new HttpParams() + .set('vocabulary', this.vocabularyId) + .set('lang', this.defaultLanguage); break; - case SelectionJson: - queryPath = this.routes.selections + id; + case SearchResponseJson: + queryPath = this.routes.search; + if (typeof searchParams.query === 'string') { + queryPath = queryPath + searchParams.query; + } + queryHttpParams = this._createSearchQueryParams(searchParams); break; + default: + return; } // Trigger call to API From bac8cc59865ac2f0ea6483fc15af078c6292cc89 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Wed, 9 Feb 2022 17:50:51 +0100 Subject: [PATCH 065/148] fix(search): remove unused code from DataApiService --- .../data-view/services/data-api.service.ts | 91 +------------------ 1 file changed, 1 insertion(+), 90 deletions(-) diff --git a/src/app/views/data-view/services/data-api.service.ts b/src/app/views/data-view/services/data-api.service.ts index a722bef00f..c800815abd 100644 --- a/src/app/views/data-view/services/data-api.service.ts +++ b/src/app/views/data-view/services/data-api.service.ts @@ -6,14 +6,11 @@ import { defaultIfEmpty, map } from 'rxjs/operators'; import { ApiService, ConversionService } from '@awg-core/services/'; import { - GeoDataJson, - HlistJson, PropertyTypesInResourceClassResponseJson, ResourceContextResponseJson, ResourceFullResponseJson, ResourceTypesInVocabularyResponseJson, SearchResponseJson, - SelectionJson, } from '@awg-shared/api-objects'; import { IResourceDataResponse, @@ -68,16 +65,13 @@ export class DataApiService extends ApiService { * Public variable: routes. * * It keeps the SALSAH specific routes for - * resources, search, geonames, hlists and selections. + * propertylists, resources, resourcetypes and search. */ routes = { - geonames: 'geonames/', - hlists: 'hlists/', propertylists: 'propertylists/', resources: 'resources/', resourcetypes: 'resourcetypes/', search: 'search/', - selections: 'selections/', }; /** @@ -282,10 +276,6 @@ export class DataApiService extends ApiService { * @returns {ResourceData} The resource data object. */ private _prepareResourceData(resourceDataResponse: IResourceDataResponse, resourceId: string): ResourceData { - if (Object.keys(resourceDataResponse[0]).length === 0 && resourceDataResponse[0].constructor === Object) { - return new ResourceData(new ResourceFullResponseJson(), undefined); - } - // Convert data for displaying resource detail const resourceDetail: ResourceDetail = this.conversionService.convertResourceData( resourceDataResponse, @@ -295,61 +285,6 @@ export class DataApiService extends ApiService { // Return new resource data return new ResourceData(resourceDataResponse[0], resourceDetail); } - - /** - * Private method: _getGeoData. - * - * * It calls the {@link _getResourceDataResponseFromApi} method to - * provide an Observable with the GeoDataJson data. - * - * NOT USED. - * - * IMPLEMENTATION FOR FUTURE USE. - * - * @params {string} resourceId The id of the requested resource. - * - * @returns {Observable} The observable of the response data. - */ - private _getGeoData(resourceId: string): Observable { - return this._getResourceDataResponseFromApi(GeoDataJson, resourceId); - } - - /** - * Private method: _getHlistData. - * - * * It calls the {@link _getResourceDataResponseFromApi} method to - * provide an Observable with the HlistJson data. - * - * NOT USED. - * - * IMPLEMENTATION FOR FUTURE USE. - * - * @params {string} resourceId The id of the requested resource. - * - * @returns {Observable} The observable of the response data. - */ - private _getHlistData(resourceId: string): Observable { - return this._getResourceDataResponseFromApi(HlistJson, resourceId); - } - - /** - * Private method: _getSelectionsData. - * - * * It calls the {@link _getResourceDataResponseFromApi} method to - * provide an Observable with the SelectionJson data. - * - * NOT USED. - * - * IMPLEMENTATION FOR FUTURE USE. - * - * @params {string} resourceId The id of the requested resource. - * - * @returns {Observable} The observable of the response data. - */ - private _getSelectionsData(resourceId: string): Observable { - return this._getResourceDataResponseFromApi(SelectionJson, resourceId); - } - /** * Private method: _getResourceDataResponseFromApi. * @@ -373,10 +308,6 @@ export class DataApiService extends ApiService { // Set path and params of query depending on responseJsonType switch (responseJsonType) { - case GeoDataJson: - queryPath = this.routes.geonames + id; - queryHttpParams = queryHttpParams.set('reqtype', 'node'); - break; case PropertyTypesInResourceClassResponseJson: queryPath = this.routes.propertylists; queryHttpParams = new HttpParams().set('restype', id); @@ -409,24 +340,4 @@ export class DataApiService extends ApiService { // Trigger call to API return this.getApiResponse(responseJsonType, queryPath, queryHttpParams); } - - /** - * Private method: _getNodeIdFromAttributes. - * - * It gets a node id from the prop.attributes - * of a selections or hlists value. - * - * NOT USED. - * - * IMPLEMENTATION FOR FUTURE USE. - * - * @param {string} attributes The given prop.attributes. - * - * @returns {string} id The node id. - */ - private _getNodeIdFromAttributes(attributes: string): string { - // Identify node id from prop.attributes - // E.g. "hlist=17" or "selection=77" - return attributes.split('=')[1].toString(); - } } From 9f3fada1d5500623d0ef1479a7adbba976a760c3 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Wed, 9 Feb 2022 17:56:11 +0100 Subject: [PATCH 066/148] test(search): add tests for DataApiService after changes --- .../conversion-service/conversion.service.ts | 3 + .../src/property-definition-json.ts | 2 +- .../extended-search-form.component.ts | 2 +- .../data-view/models/resource-data.model.ts | 6 +- .../services/data-api.service.spec.ts | 1695 +++++++++++++---- src/testing/mock-data/index.ts | 4 + ...ropertyTypesInResourceClassResponseJson.ts | 77 + ...ckResourceTypesInVocabularyResponseJson.ts | 91 + 8 files changed, 1477 insertions(+), 403 deletions(-) create mode 100644 src/testing/mock-data/mockPropertyTypesInResourceClassResponseJson.ts create mode 100644 src/testing/mock-data/mockResourceTypesInVocabularyResponseJson.ts diff --git a/src/app/core/services/conversion-service/conversion.service.ts b/src/app/core/services/conversion-service/conversion.service.ts index c1691ac29e..28e19726a3 100644 --- a/src/app/core/services/conversion-service/conversion.service.ts +++ b/src/app/core/services/conversion-service/conversion.service.ts @@ -274,6 +274,9 @@ export class ConversionService extends ApiService { * @returns {ResourceDetail} The converted resource detail object. */ convertResourceData(resourceData: IResourceDataResponse, resourceId: string): ResourceDetail { + if (!resourceData || !resourceData[0] || !resourceData[0].access) { + return new ResourceDetail(undefined, undefined); + } if (resourceData[0].access === 'OK') { return this._prepareAccessibleResource(resourceData, resourceId); } else { diff --git a/src/app/shared/api-objects/resource-response-formats/src/property-definition-json.ts b/src/app/shared/api-objects/resource-response-formats/src/property-definition-json.ts index 81e9b82ecf..ac0be77ec6 100644 --- a/src/app/shared/api-objects/resource-response-formats/src/property-definition-json.ts +++ b/src/app/shared/api-objects/resource-response-formats/src/property-definition-json.ts @@ -48,7 +48,7 @@ export class PropertyDefinitionJson { * GUI attributes (HTML) of the property type * @param attributes: string | null */ - @JsonProperty('attributes', String) + @JsonProperty('attributes', String, true) public attributes: string = undefined; /** diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts index 9566a9cc2d..76e84874d4 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts @@ -161,7 +161,7 @@ export class ExtendedSearchFormComponent implements OnInit { } getResourcetypes(): void { - this.dataApiService.getResourcetypes().subscribe( + this.dataApiService.getResourceTypes().subscribe( (restypesResponse: ResourceTypesInVocabularyResponseJson) => { this.restypesResponse = restypesResponse; console.log(this.restypesResponse); diff --git a/src/app/views/data-view/models/resource-data.model.ts b/src/app/views/data-view/models/resource-data.model.ts index 4f3dfeabf4..408c41612b 100644 --- a/src/app/views/data-view/models/resource-data.model.ts +++ b/src/app/views/data-view/models/resource-data.model.ts @@ -57,10 +57,10 @@ export class ResourceData { // Snapshot of raw json response this.jsonRaw = JSON.parse(JSON.stringify(resourceFullResponse)); - // Converted html data - this.detail = detail; - // Snapshot of json response from converted html data this.jsonConverted = JSON.parse(JSON.stringify(detail)); + + // Converted html data + this.detail = detail; } } diff --git a/src/app/views/data-view/services/data-api.service.spec.ts b/src/app/views/data-view/services/data-api.service.spec.ts index 98f5ae06bc..8d224c98d4 100644 --- a/src/app/views/data-view/services/data-api.service.spec.ts +++ b/src/app/views/data-view/services/data-api.service.spec.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { TestBed, waitForAsync } from '@angular/core/testing'; -import { HttpClientTestingModule, HttpTestingController } from '@angular/common/http/testing'; +import { HttpClientTestingModule, HttpTestingController, TestRequest } from '@angular/common/http/testing'; import { HttpClient, HttpParams, HttpRequest } from '@angular/common/http'; import { Data } from '@angular/router'; @@ -11,9 +11,11 @@ import { JsonConvert } from 'json2typescript'; import { expectSpyCall } from '@testing/expect-helper'; import { + mockPropertyTypesInResourceClassResponseJson, mockResourceContextResponseJson, mockResourceDetail, mockResourceFullResponseJson, + mockResourceTypesInVocabularyResponseJson, mockSearchResponseConverted, mockSearchResponseJson, } from '@testing/mock-data'; @@ -21,12 +23,26 @@ import { import { AppConfig } from '@awg-app/app.config'; import { ConversionService } from '@awg-core/services'; import { ApiServiceError } from '@awg-core/services/api-service/api-service-error.model'; -import { ResourceContextResponseJson, ResourceFullResponseJson, SearchResponseJson } from '@awg-shared/api-objects'; -import { ResourceData, ResourceDetail, SearchParams } from '@awg-views/data-view/models'; +import { + HlistJson, + PropertyTypesInResourceClassResponseJson, + ResourceContextResponseJson, + ResourceFullResponseJson, + ResourceTypesInVocabularyResponseJson, + SearchResponseJson, +} from '@awg-shared/api-objects'; +import { ExtendedSearchParams, ResourceData, ResourceDetail, SearchParams } from '@awg-views/data-view/models'; import { DataApiService } from './data-api.service'; -describe('DataApiService', () => { +// Helper function +function expectParams(call: TestRequest, param: string, expectedValue: string[], length?: number) { + expect(call.request.params.getAll(param)).toBeTruthy(); + expect(call.request.params.getAll(param).length).withContext(`should be ${length}`).toBe(length); + expect(call.request.params.getAll(param)).withContext(`should equal ${expectedValue}`).toEqual(expectedValue); +} + +describe('DataApiService (DONE)', () => { let dataApiService: DataApiService; let httpClient: HttpClient; @@ -41,19 +57,21 @@ describe('DataApiService', () => { let expectedResourceFullResponseJson: ResourceFullResponseJson; let expectedResourceContextResponseJson: ResourceContextResponseJson; let expectedSearchResponseJson: SearchResponseJson; + let expectedResourceTypesInVocabularyResponseJson: ResourceTypesInVocabularyResponseJson; + let expectedPropertyTypesInResourceClassResponseJson: PropertyTypesInResourceClassResponseJson; let expectedSearchResponseConverted: any; let expectedResourceDetail: ResourceDetail; let expectedResourceData: ResourceData; const expectedProjectId = '6'; + const expectedVocabularyId = '4'; + const expectedDefaultLanguage = 'de'; const expectedResourceSuffix = '_-_local'; const expectedRoutes = { + propertylists: 'propertylists/', resources: 'resources/', resourcetypes: 'resourcetypes/', search: 'search/', - geonames: 'geonames/', - hlists: 'hlists/', - selections: 'selections/', }; const apiUrl = AppConfig.API_ENDPOINT; @@ -85,6 +103,14 @@ describe('DataApiService', () => { ResourceContextResponseJson ); expectedSearchResponseJson = jsonConvert.deserializeObject(mockSearchResponseJson, SearchResponseJson); + expectedResourceTypesInVocabularyResponseJson = jsonConvert.deserializeObject( + mockResourceTypesInVocabularyResponseJson, + ResourceTypesInVocabularyResponseJson + ); + expectedPropertyTypesInResourceClassResponseJson = jsonConvert.deserializeObject( + mockPropertyTypesInResourceClassResponseJson, + PropertyTypesInResourceClassResponseJson + ); // Test data expectedSearchResponseConverted = mockSearchResponseConverted; @@ -108,7 +134,9 @@ describe('DataApiService', () => { it('injected service should use provided mockValue', () => { const conversionService = TestBed.inject(ConversionService); - expect(mockConversionService === conversionService).toBe(true); + expect(mockConversionService === conversionService) + .withContext('should be true') + .toBeTrue(); }); describe('default values', () => { @@ -116,27 +144,45 @@ describe('DataApiService', () => { const expectedServiceName = 'DataApiService'; expect(dataApiService.serviceName).toBeDefined(); - expect(dataApiService.serviceName).toBe(expectedServiceName, `should be ${expectedServiceName}`); + expect(dataApiService.serviceName) + .withContext(`should be ${expectedServiceName}`) + .toBe(expectedServiceName); }); it('... should have projectId', () => { expect(dataApiService.projectId).toBeDefined(); - expect(dataApiService.projectId).toBe(expectedProjectId, `should be ${expectedProjectId}`); + expect(dataApiService.projectId).withContext(`should be ${expectedProjectId}`).toBe(expectedProjectId); + }); + + it('... should have vocabularyId', () => { + expect(dataApiService.vocabularyId).toBeDefined(); + expect(dataApiService.vocabularyId) + .withContext(`should be ${expectedVocabularyId}`) + .toBe(expectedVocabularyId); + }); + + it('... should have defaultLanguage', () => { + expect(dataApiService.defaultLanguage).toBeDefined(); + expect(dataApiService.defaultLanguage) + .withContext(`should be ${expectedDefaultLanguage}`) + .toBe(expectedDefaultLanguage); }); it('... should have resourceSuffix', () => { expect(dataApiService.resourceSuffix).toBeDefined(); - expect(dataApiService.resourceSuffix).toBe(expectedResourceSuffix, `should be ${expectedResourceSuffix}`); + expect(dataApiService.resourceSuffix) + .withContext(`should be ${expectedResourceSuffix}`) + .toBe(expectedResourceSuffix); }); it('... should have routes', () => { expect(dataApiService.routes).toBeDefined(); - expect(dataApiService.routes).toEqual(expectedRoutes, `should be ${expectedRoutes}`); + expect(dataApiService.routes).withContext(`should be ${expectedRoutes}`).toEqual(expectedRoutes); }); it("... should have empty 'httpGetUrl' (inherited from ApiService)", () => { expect(dataApiService.httpGetUrl).toBeDefined(); - expect(dataApiService.httpGetUrl).toBe('', 'should be empty string'); + expect(dataApiService.httpGetUrl).withContext('should be empty string').toBe(''); }); }); @@ -147,16 +193,17 @@ describe('DataApiService', () => { const testData: Data = { name: 'TestData' }; httpClient.get('/foo/bar').subscribe(data => { - expect(data).toEqual(testData); + expect(data).toBeTruthy(); + expect(data).withContext(`should equal ${testData}`).toEqual(testData); }); // Match the request url - const call = httpTestingController.expectOne({ + const call: TestRequest = httpTestingController.expectOne({ url: '/foo/bar', }); // Check for GET request - expect(call.request.method).toEqual('GET'); + expect(call.request.method).withContext(`should be GET`).toBe('GET'); // Respond with mocked data call.flush(testData); @@ -166,208 +213,612 @@ describe('DataApiService', () => { describe('#getSearchData', () => { describe('request', () => { - it( - '... should not do anything if undefined is provided', - waitForAsync(() => { - // Undefined - const expectedSearchString = undefined; - const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchString; + describe('... should not do anything if', () => { + it( + '... undefined is provided', + waitForAsync(() => { + // Undefined + const undefinedValue = undefined; + const expectedUrl = apiUrl + expectedRoutes.search + undefinedValue; - // Call service function - dataApiService.getSearchData(expectedSearchString); + // Call service function + dataApiService.getSearchData(undefinedValue); - // Expect no request to getApiResponse - expectSpyCall(getApiResponseSpy, 0); + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); - // Expect no request to url with given settings - httpTestingController.expectNone( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` - ); - }) - ); + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); - it( - '... should not do anything if null is provided', - waitForAsync(() => { - // Null - const expectedSearchString = null; - const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchString; + it( + '... null is provided', + waitForAsync(() => { + // Null + const nullValue = null; + const expectedUrl = apiUrl + expectedRoutes.search + nullValue; - // Call service function - dataApiService.getSearchData(expectedSearchString); + // Call service function + dataApiService.getSearchData(nullValue); - // Expect no request to getApiResponse - expectSpyCall(getApiResponseSpy, 0); + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); - // Expect no request to url with given settings - httpTestingController.expectNone( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` - ); - }) - ); + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); - it( - '... should not do anything if empty searchString is provided', - waitForAsync(() => { - // Empty string - const expectedSearchParams: SearchParams = new SearchParams(); - expectedSearchParams.query = ''; - const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + it( + '... searchParams.query is undefined', + waitForAsync(() => { + // Empty string + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = undefined; + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; - // Call service function - dataApiService.getSearchData(expectedSearchParams); + // Call service function + dataApiService.getSearchData(expectedSearchParams); - // Expect no request to getApiResponse - expectSpyCall(getApiResponseSpy, 0); + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); - // Expect no request to url with given settings - httpTestingController.expectNone( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` - ); - }) - ); + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); - it( - '... should perform an HTTP GET request to the Knora API (via ApiService) with provided searchString', - waitForAsync(() => { - const expectedSearchParams: SearchParams = new SearchParams(); - expectedSearchParams.query = 'Test'; - const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + it( + '... searchParams.query is null', + waitForAsync(() => { + // Empty string + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = null; + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; - // Call service function - dataApiService.getSearchData(expectedSearchParams).subscribe(); + // Call service function + dataApiService.getSearchData(expectedSearchParams); - // Expect one request to url with given settings - const call = httpTestingController.expectOne( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` - ); + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); - expect(call.request.method).toEqual('GET', 'should be GET'); - expect(call.request.responseType).toEqual('json', 'should be json'); - expect(call.request.url).toEqual(expectedUrl, `should be ${expectedUrl}`); - }) - ); + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); - it( - '... should set default params for GET request if none is provided', - waitForAsync(() => { - const expectedSearchParams: SearchParams = new SearchParams(); - expectedSearchParams.query = 'Test'; - expectedSearchParams.nRows = '-1'; - expectedSearchParams.startAt = '0'; + it( + '... searchParams.query is empty string', + waitForAsync(() => { + // Empty string + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = ''; + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; - const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + // Call service function + dataApiService.getSearchData(expectedSearchParams); - // Call service function - dataApiService.getSearchData(expectedSearchParams).subscribe(); + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); - // Expect one request to url with given settings - const call = httpTestingController.expectOne( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` - ); + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); - expect(call.request.method).toEqual('GET', 'should be GET'); - expect(call.request.responseType).toEqual('json', 'should be json'); - expect(call.request.url).toEqual(expectedUrl, `should be ${expectedUrl}`); - expect(call.request.params).toBeDefined(); - expect(call.request.params.keys().length).toBe(4, 'should be 4'); - expect(call.request.params.get('searchtype')).toBe('fulltext', 'should be fulltext'); - expect(call.request.params.get('filter_by_project')).toBe( - expectedProjectId, - `should be ${expectedProjectId}` + describe('... searchParams.query is an ExtendedSearchParams object that has', () => { + it( + '... `filterByRestype` value of undefined', + waitForAsync(() => { + // Empty string + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = undefined; + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + + // Call service function + dataApiService.getSearchData(expectedSearchParams); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) ); - expect(call.request.params.get('show_nrows')).toBe( - expectedSearchParams.nRows, - `should be ${expectedSearchParams.nRows}` + + it( + '... `filterByRestype` value of null', + waitForAsync(() => { + // Empty string + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = null; + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + + // Call service function + dataApiService.getSearchData(expectedSearchParams); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) ); - expect(call.request.params.get('start_at')).toBe( - expectedSearchParams.startAt, - `should be ${expectedSearchParams.startAt}` + + it( + '... `filterByRestype` value of empty string', + waitForAsync(() => { + // Empty string + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = ''; + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + + // Call service function + dataApiService.getSearchData(expectedSearchParams); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) ); - }) - ); + }); + }); - it( - '... should apply provided params for GET request', - waitForAsync(() => { - const expectedSearchParams: SearchParams = new SearchParams(); - expectedSearchParams.query = 'Test'; - expectedSearchParams.nRows = '5'; - expectedSearchParams.startAt = '20'; + describe('... should perform an HTTP GET request to the API (via ApiService)', () => { + it( + '... for Fulltext search with provided searchString (url includes query)', + waitForAsync(() => { + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = 'Test'; + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; - const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); - // Call service function - dataApiService.getSearchData(expectedSearchParams).subscribe(); + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); - // Expect one request to url with given settings - const call = httpTestingController.expectOne( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` + expect(call.request.method).toBeTruthy(); + expect(call.request.method).withContext('should be GET').toBe('GET'); + + expect(call.request.responseType).toBeTruthy(); + expect(call.request.responseType).withContext('should be json').toBe('json'); + + expect(call.request.url).toBeTruthy(); + expect(call.request.url).withContext(`should be ${expectedUrl}`).toBe(expectedUrl); + }) + ); + + it( + '... for Extended search with provided object (url does not include query)', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = expectedRestype; + const expectedUrl = apiUrl + expectedRoutes.search; + + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.method).toBeTruthy(); + expect(call.request.method).withContext('should be GET').toBe('GET'); + + expect(call.request.responseType).toBeTruthy(); + expect(call.request.responseType).withContext('should be json').toBe('json'); + + expect(call.request.url).toBeTruthy(); + expect(call.request.url).withContext(`should be ${expectedUrl}`).toBe(expectedUrl); + }) + ); + }); + + describe('... should set default query params for GET request if none is provided', () => { + it( + '... for Fulltext search query (string) => 5', + waitForAsync(() => { + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = 'Test'; + + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + const expectedNRows = '-1'; + const expectedStartAt = '0'; + + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 5').toBe(5); + + expectParams(call, 'searchtype', ['fulltext'], 1); + expectParams(call, 'filter_by_project', [expectedProjectId], 1); + expectParams(call, 'show_nrows', [expectedNRows], 1); + expectParams(call, 'start_at', [expectedStartAt], 1); + expectParams(call, 'lang', [expectedDefaultLanguage], 1); + }) + ); + + it( + '... for Extended search query (object) without properties => 6', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = expectedRestype; + + const expectedUrl = apiUrl + expectedRoutes.search; + const expectedNRows = '-1'; + const expectedStartAt = '0'; + + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 6').toBe(6); + + expectParams(call, 'searchtype', ['extended'], 1); + expectParams(call, 'filter_by_project', [expectedProjectId], 1); + expectParams(call, 'filter_by_restype', [expectedRestype], 1); + expectParams(call, 'show_nrows', [expectedNRows], 1); + expectParams(call, 'start_at', [expectedStartAt], 1); + expectParams(call, 'lang', [expectedDefaultLanguage], 1); + }) + ); + }); + + describe('... should apply provided params for GET request', () => { + it( + '... for Fulltext search query (string)', + waitForAsync(() => { + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = 'Test'; + expectedSearchParams.nRows = '5'; + expectedSearchParams.startAt = '20'; + + const expectedUrl = apiUrl + expectedRoutes.search + expectedSearchParams.query; + + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 5').toBe(5); + + expectParams(call, 'searchtype', ['fulltext'], 1); + expectParams(call, 'filter_by_project', [expectedProjectId], 1); + expectParams(call, 'show_nrows', [expectedSearchParams.nRows], 1); + expectParams(call, 'start_at', [expectedSearchParams.startAt], 1); + expectParams(call, 'lang', [expectedDefaultLanguage], 1); + }) + ); + + describe('... for Extended search query (object)', () => { + it( + '... with one propertyId and compop EXISTS (no searchval) => 8', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedFirstProperty = '389'; // Opus number + const expectedFirstCompop = 'EXISTS'; + + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = expectedRestype; + expectedSearchParams.query.propertyId = [expectedFirstProperty]; + expectedSearchParams.query.compop = [expectedFirstCompop]; + expectedSearchParams.nRows = '5'; + expectedSearchParams.startAt = '20'; + + const expectedUrl = apiUrl + expectedRoutes.search; + + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 8').toBe(8); + + expectParams(call, 'searchtype', ['extended'], 1); + expectParams(call, 'filter_by_project', [expectedProjectId], 1); + expectParams(call, 'filter_by_restype', [expectedRestype], 1); + expectParams(call, 'show_nrows', [expectedSearchParams.nRows], 1); + expectParams(call, 'start_at', [expectedSearchParams.startAt], 1); + expectParams(call, 'lang', [expectedDefaultLanguage], 1); + expectParams(call, 'property_id', [expectedFirstProperty], 1); + expectParams(call, 'compop', [expectedFirstCompop], 1); + }) ); - expect(call.request.method).toEqual('GET', 'should be GET'); - expect(call.request.responseType).toEqual('json', 'should be json'); - expect(call.request.url).toEqual(expectedUrl, `should be ${expectedUrl}`); - expect(call.request.params).toBeDefined(); - expect(call.request.params.keys().length).toBe(4, 'should be 4'); - expect(call.request.params.get('searchtype')).toBe('fulltext', 'should be fulltext'); - expect(call.request.params.get('filter_by_project')).toBe( - expectedProjectId, - `should be ${expectedProjectId}` + it( + '... with two propertyIds and compop EXISTS (no searchval) => 8 (+2)', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedFirstProperty = '389'; // Opus number + const expectedSecondProperty = '1'; // Title + const expectedFirstCompop = 'EXISTS'; + const expectedSecondCompop = 'EXISTS'; + + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = expectedRestype; + expectedSearchParams.query.propertyId = [expectedFirstProperty, expectedSecondProperty]; + expectedSearchParams.query.compop = [expectedFirstCompop, expectedSecondCompop]; + expectedSearchParams.nRows = '5'; + expectedSearchParams.startAt = '20'; + + const expectedUrl = apiUrl + expectedRoutes.search; + + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 8').toBe(8); + + expectParams(call, 'searchtype', ['extended'], 1); + expectParams(call, 'filter_by_project', [expectedProjectId], 1); + expectParams(call, 'filter_by_restype', [expectedRestype], 1); + expectParams(call, 'show_nrows', [expectedSearchParams.nRows], 1); + expectParams(call, 'start_at', [expectedSearchParams.startAt], 1); + expectParams(call, 'lang', [expectedDefaultLanguage], 1); + expectParams(call, 'property_id', [expectedFirstProperty, expectedSecondProperty], 2); + expectParams(call, 'compop', [expectedFirstCompop, expectedSecondCompop], 2); + }) ); - expect(call.request.params.get('show_nrows')).toBe( - expectedSearchParams.nRows, - `should be ${expectedSearchParams.nRows}` + + it( + '... with one propertyId, compop, and searchval => 9', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedFirstProperty = '389'; // Opus number + const expectedFirstCompop = 'EQ'; + const expectedFirstSearchval = '1'; + + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = expectedRestype; + expectedSearchParams.query.propertyId = [expectedFirstProperty]; + expectedSearchParams.query.compop = [expectedFirstCompop]; + expectedSearchParams.query.searchval = [expectedFirstSearchval]; + expectedSearchParams.nRows = '5'; + expectedSearchParams.startAt = '20'; + + const expectedUrl = apiUrl + expectedRoutes.search; + + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 9').toBe(9); + + expectParams(call, 'searchtype', ['extended'], 1); + expectParams(call, 'filter_by_project', [expectedProjectId], 1); + expectParams(call, 'filter_by_restype', [expectedRestype], 1); + expectParams(call, 'show_nrows', [expectedSearchParams.nRows], 1); + expectParams(call, 'start_at', [expectedSearchParams.startAt], 1); + expectParams(call, 'lang', [expectedDefaultLanguage], 1); + expectParams(call, 'property_id', [expectedFirstProperty], 1); + expectParams(call, 'compop', [expectedFirstCompop], 1); + expectParams(call, 'searchval', [expectedFirstSearchval], 1); + }) ); - expect(call.request.params.get('start_at')).toBe( - expectedSearchParams.startAt, - `should be ${expectedSearchParams.startAt}` + + it( + '... with two propertyIds, compops, and searchvals => 9 (+3)', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedFirstProperty = '389'; // Opus number + const expectedSecondProperty = '1'; // Title + const expectedFirstCompop = 'EQ'; + const expectedSecondCompop = 'EQ'; + const expectedFirstSearchval = '1'; + const expectedSecondSearchval = 'Passacaglia'; + + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = expectedRestype; + expectedSearchParams.query.propertyId = [expectedFirstProperty, expectedSecondProperty]; + expectedSearchParams.query.compop = [expectedFirstCompop, expectedSecondCompop]; + expectedSearchParams.query.searchval = [expectedFirstSearchval, expectedSecondSearchval]; + expectedSearchParams.nRows = '5'; + expectedSearchParams.startAt = '20'; + + const expectedUrl = apiUrl + expectedRoutes.search; + + // Call service function + dataApiService.getSearchData(expectedSearchParams).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 9').toBe(9); + + expectParams(call, 'searchtype', ['extended'], 1); + expectParams(call, 'filter_by_project', [expectedProjectId], 1); + expectParams(call, 'filter_by_restype', [expectedRestype], 1); + expectParams(call, 'show_nrows', [expectedSearchParams.nRows], 1); + expectParams(call, 'start_at', [expectedSearchParams.startAt], 1); + expectParams(call, 'lang', [expectedDefaultLanguage], 1); + expectParams(call, 'property_id', [expectedFirstProperty, expectedSecondProperty], 2); + expectParams(call, 'compop', [expectedFirstCompop, expectedSecondCompop], 2); + expectParams(call, 'searchval', [expectedFirstSearchval, expectedSecondSearchval], 2); + }) ); - }) - ); + }); + }); - it( - '... should call getApiResponse (via ApiService) with search string', - waitForAsync(() => { - const expectedSearchParams: SearchParams = new SearchParams(); - expectedSearchParams.query = 'Test'; + describe('... should call getApiResponse (via ApiService) ', () => { + it( + '... with Fulltext search string', + waitForAsync(() => { + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = 'Test'; - const expectedQueryPath = expectedRoutes.search + expectedSearchParams.query; - const expectedQueryHttpParams = new HttpParams() - .set('searchtype', 'fulltext') - .set('filter_by_project', '6') - .set('show_nrows', '-1') - .set('start_at', '0'); + const expectedQueryPath = expectedRoutes.search + expectedSearchParams.query; + let expectedQueryHttpParams = new HttpParams() + .set('filter_by_project', expectedProjectId) + .set('lang', expectedDefaultLanguage) + .set('show_nrows', '-1') + .set('start_at', '0'); + expectedQueryHttpParams = expectedQueryHttpParams.append('searchtype', 'fulltext'); - getApiResponseSpy.and.returnValue(observableOf(expectedSearchResponseJson)); + getApiResponseSpy.and.returnValue(observableOf(expectedSearchResponseJson)); - dataApiService.getSearchData(expectedSearchParams).subscribe((response: SearchResponseJson) => { - expectSpyCall(getApiResponseSpy, 1, [ - SearchResponseJson, - expectedQueryPath, - expectedQueryHttpParams, - ]); - }); - }) - ); + dataApiService.getSearchData(expectedSearchParams).subscribe((response: SearchResponseJson) => { + expectSpyCall(getApiResponseSpy, 1, [ + SearchResponseJson, + expectedQueryPath, + expectedQueryHttpParams, + ]); + }); + }) + ); + + it( + '... with ExtendedSearchParams object', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedFirstProperty = '389'; // Opus number + const expectedSecondProperty = '1'; // Title + const expectedFirstCompop = 'EQ'; + const expectedSecondCompop = 'EQ'; + const expectedFirstSearchval = '1'; + const expectedSecondSearchval = 'Passacaglia'; + + const expectedSearchParams: SearchParams = new SearchParams(); + expectedSearchParams.query = new ExtendedSearchParams(); + expectedSearchParams.query.filterByRestype = expectedRestype; + expectedSearchParams.query.propertyId = [expectedFirstProperty, expectedSecondProperty]; + expectedSearchParams.query.compop = [expectedFirstCompop, expectedSecondCompop]; + expectedSearchParams.query.searchval = [expectedFirstSearchval, expectedSecondSearchval]; + + const expectedQueryPath = expectedRoutes.search; + let expectedQueryHttpParams = new HttpParams() + .set('filter_by_project', expectedProjectId) + .set('lang', expectedDefaultLanguage) + .set('show_nrows', '-1') + .set('start_at', '0'); + expectedQueryHttpParams = expectedQueryHttpParams.append('searchtype', 'extended'); + expectedQueryHttpParams = expectedQueryHttpParams.append('filter_by_restype', expectedRestype); + expectedQueryHttpParams = expectedQueryHttpParams.append('property_id', expectedFirstProperty); + expectedQueryHttpParams = expectedQueryHttpParams.append('property_id', expectedSecondProperty); + + expectedQueryHttpParams = expectedQueryHttpParams.append('compop', expectedFirstCompop); + expectedQueryHttpParams = expectedQueryHttpParams.append('compop', expectedSecondCompop); + + expectedQueryHttpParams = expectedQueryHttpParams.append('searchval', expectedFirstSearchval); + expectedQueryHttpParams = expectedQueryHttpParams.append('searchval', expectedSecondSearchval); + + getApiResponseSpy.and.returnValue(observableOf(expectedSearchResponseJson)); + + dataApiService.getSearchData(expectedSearchParams).subscribe((response: SearchResponseJson) => { + expectSpyCall(getApiResponseSpy, 1, [ + SearchResponseJson, + expectedQueryPath, + expectedQueryHttpParams, + ]); + }); + }) + ); + }); }); describe('response', () => { describe('success', () => { it( - '... should return an SearchResponseJson observable (converted)', + '... should return a SearchResponseJson observable (converted)', waitForAsync(() => { const expectedSearchParams: SearchParams = new SearchParams(); expectedSearchParams.query = 'Test'; @@ -375,7 +826,10 @@ describe('DataApiService', () => { getApiResponseSpy.and.returnValue(observableOf(expectedSearchResponseConverted)); dataApiService.getSearchData(expectedSearchParams).subscribe((response: SearchResponseJson) => { - expect(response).toEqual(expectedSearchResponseConverted); + expect(response).toBeTruthy(); + expect(response) + .withContext(`should equal ${expectedSearchResponseConverted}`) + .toEqual(expectedSearchResponseConverted); }); }) ); @@ -389,11 +843,12 @@ describe('DataApiService', () => { expectedSearchParams.query = 'Test'; const expectedQueryPath = expectedRoutes.search + expectedSearchParams.query; - const expectedQueryHttpParams = new HttpParams() - .set('searchtype', 'fulltext') + let expectedQueryHttpParams = new HttpParams() .set('filter_by_project', '6') + .set('lang', expectedDefaultLanguage) .set('show_nrows', '-1') .set('start_at', '0'); + expectedQueryHttpParams = expectedQueryHttpParams.append('searchtype', 'fulltext'); const expectedErrorMsg = 'failed HTTP response with 401 error'; @@ -401,7 +856,7 @@ describe('DataApiService', () => { expectedApiServiceError.status = 401; expectedApiServiceError.url = expectedQueryPath; - getApiResponseSpy.and.returnValue(observableThrowError(expectedApiServiceError)); + getApiResponseSpy.and.returnValue(observableThrowError(() => expectedApiServiceError)); dataApiService.getSearchData(expectedSearchParams).subscribe( result => fail(expectedErrorMsg), @@ -411,7 +866,9 @@ describe('DataApiService', () => { expectedQueryPath, expectedQueryHttpParams, ]); - expect(error).toEqual(expectedApiServiceError); + expect(error) + .withContext(`should equal ${expectedApiServiceError}`) + .toEqual(expectedApiServiceError); } ); }) @@ -422,250 +879,287 @@ describe('DataApiService', () => { describe('#getResourceData', () => { describe('request', () => { - it( - '... should not do anything if undefined is provided', - waitForAsync(() => { - // Undefined - const expectedResourceId = undefined; - const expectedUrl = apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + describe('... should not do anything if ', () => { + it( + '... undefined is provided', + waitForAsync(() => { + // Undefined + const expectedResourceId = undefined; + const expectedUrl = + apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + + // Call service function + dataApiService.getResourceData(expectedResourceId); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); - // Call service function - dataApiService.getResourceData(expectedResourceId); + it( + '... null is provided', + waitForAsync(() => { + // Null + const expectedResourceId = null; + const expectedUrl = + apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + + // Call service function + dataApiService.getResourceData(expectedResourceId); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); - // Expect no request to getApiResponse - expectSpyCall(getApiResponseSpy, 0); + it( + '... empty resource id string is provided', + waitForAsync(() => { + // Empty string + const expectedResourceId = ''; + const expectedUrl = + apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + + // Call service function + dataApiService.getResourceData(expectedResourceId); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); + }); - // Expect no request to url with given settings - httpTestingController.expectNone( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` - ); - }) - ); - - it( - '... should not do anything if null is provided', - waitForAsync(() => { - // Null - const expectedResourceId = null; - const expectedUrl = apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; - - // Call service function - dataApiService.getResourceData(expectedResourceId); - - // Expect no request to getApiResponse - expectSpyCall(getApiResponseSpy, 0); - - // Expect no request to url with given settings - httpTestingController.expectNone( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` - ); - }) - ); - - it( - '... should not do anything if empty resource id string is provided', - waitForAsync(() => { - // Empty string - const expectedResourceId = ''; - const expectedUrl = apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; - - // Call service function - dataApiService.getResourceData(expectedResourceId); - - // Expect no request to getApiResponse - expectSpyCall(getApiResponseSpy, 0); - - // Expect no request to url with given settings - httpTestingController.expectNone( - (req: HttpRequest) => - req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, - `GET to ${expectedUrl}` - ); - }) - ); + describe('... should perform HTTP GET requests to the API (via ApiService)', () => { + it( + '... with two requests', + waitForAsync(() => { + const expectedResourceId = '11398'; + const expectedUrl = + apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; - it( - '... should perform two HTTP GET requests to the Knora API (via ApiService)', - waitForAsync(() => { - const expectedResourceId = '11398'; - const expectedUrl = apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + // Call service function + dataApiService.getResourceData(expectedResourceId).subscribe(); - // Call service function - dataApiService.getResourceData(expectedResourceId).subscribe(); + // Expect two requests to url with given settings + const re = new RegExp(expectedUrl, 'g'); + const calls = httpTestingController.match( + req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' + ); - // Expect two requests to url with given settings - const re = new RegExp(expectedUrl, 'g'); - const calls = httpTestingController.match( - req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' - ); + expect(calls.length).withContext('should be 2 calls').toBe(2); + }) + ); - expect(calls.length).toBe(2, 'should be 2 calls'); - }) - ); + it( + '... the first request being a ResourceFullResponse request', + waitForAsync(() => { + const expectedResourceId = '11398'; + const expectedUrl = + apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; - it( - '... first request to the Knora API (via ApiService) should be a ResourceFullResponse request', - waitForAsync(() => { - const expectedResourceId = '11398'; - const expectedUrl = apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + // Call service function + dataApiService.getResourceData(expectedResourceId).subscribe(); - // Call service function - dataApiService.getResourceData(expectedResourceId).subscribe(); + // Expect two requests to url with given settings + const re = new RegExp(expectedUrl, 'g'); + const calls = httpTestingController.match( + req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' + ); - // Expect two requests to url with given settings - const re = new RegExp(expectedUrl, 'g'); - const calls = httpTestingController.match( - req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' - ); + expect(calls.length).withContext('should be 2 calls').toBe(2); - expect(calls.length).toBe(2, 'should be 2 calls'); + // Call to GET https://www.salsah.org/api/resources/11398_-_local (ResourceFullResponseJson) + expect(calls[0].request.method).toBeTruthy(); + expect(calls[0].request.method).withContext('should be GET').toBe('GET'); - // Call to GET https://www.salsah.org/api/resources/11398_-_local (ResourceFullResponseJson) - expect(calls[0].request.method).toEqual('GET', 'should be GET'); - expect(calls[0].request.responseType).toEqual('json', 'should be json'); - expect(calls[0].request.url).toEqual(expectedUrl, `should be ${expectedUrl}`); - expect(calls[0].request.params).toBeDefined(); - expect(calls[0].request.params.keys().length).toBe(0, 'should be 0'); - }) - ); + expect(calls[0].request.responseType).toBeTruthy(); + expect(calls[0].request.responseType).withContext('should be json').toBe('json'); - it( - '... second request to the Knora API (via ApiService) should be a ResourceContextResponse request', - waitForAsync(() => { - const expectedResourceId = '11398'; - const expectedUrl = apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + expect(calls[0].request.url).toBeTruthy(); + expect(calls[0].request.url).withContext(`should be ${expectedUrl}`).toBe(expectedUrl); - // Call service function - dataApiService.getResourceData(expectedResourceId).subscribe(); + expect(calls[0].request.params).toBeDefined(); + expect(calls[0].request.params.keys().length).withContext('should be 0').toBe(0); + }) + ); - // Expect two requests to url with given settings - const re = new RegExp(expectedUrl, 'g'); - const calls = httpTestingController.match( - req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' - ); + it( + '... the second request being a ResourceContextResponse request', + waitForAsync(() => { + const expectedResourceId = '11398'; + const expectedUrl = + apiUrl + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; - expect(calls.length).toBe(2, 'should be 2 calls'); + // Call service function + dataApiService.getResourceData(expectedResourceId).subscribe(); - // Call to GET https://www.salsah.org/api/resources/11398_-_local?reqtype=context (ResourceContextResponseJson) - expect(calls[1].request.method).toEqual('GET', 'should be GET'); - expect(calls[1].request.responseType).toEqual('json', 'should be json'); - expect(calls[1].request.url).toEqual(expectedUrl, `should be ${expectedUrl}`); - expect(calls[1].request.params).toBeDefined(); - expect(calls[1].request.params.keys().length).toBe(1, 'should be 1'); - expect(calls[1].request.params.keys()[0]).toBe('reqtype', 'should be reqtype'); - expect(calls[1].request.params.get('reqtype')).toBe('context', 'should be context'); - }) - ); + // Expect two requests to url with given settings + const re = new RegExp(expectedUrl, 'g'); + const calls = httpTestingController.match( + req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' + ); - it( - '... should call two times getApiResponse (via ApiService) with resource id', - waitForAsync(() => { - const expectedResourceId = '11398'; - const expectedQueryPath = expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; - const expectedUrl = apiUrl + expectedQueryPath; + expect(calls.length).withContext('should be 2 calls').toBe(2); - dataApiService.getResourceData(expectedResourceId).subscribe((response: ResourceData) => { - // Two calls - expect(getApiResponseSpy.calls.all().length).toBe(2, 'should be 2 calls'); - }); + // Call to GET https://www.salsah.org/api/resources/11398_-_local?reqtype=context (ResourceContextResponseJson) + expect(calls[1].request.method).toBeTruthy(); + expect(calls[1].request.method).withContext('should be GET').toBe('GET'); - // Expect two requests to url with given settings - const re = new RegExp(expectedUrl, 'g'); - const calls = httpTestingController.match( - req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' - ); + expect(calls[1].request.responseType).toBeTruthy(); + expect(calls[1].request.responseType).withContext('should be json').toBe('json'); - calls[0].flush(expectedResourceFullResponseJson); - calls[1].flush(expectedResourceContextResponseJson); - }) - ); + expect(calls[1].request.url).toBeTruthy(); + expect(calls[1].request.url).withContext(`should be ${expectedUrl}`).toBe(expectedUrl); - it( - '... first call to getApiResponse (via ApiService) with resource id should be a ResourceFullResponse request', - waitForAsync(() => { - const expectedResourceId = '11398'; - const expectedQueryPath = expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; - const expectedQueryHttpParams = new HttpParams(); - const expectedUrl = apiUrl + expectedQueryPath; + expect(calls[1].request.params).toBeDefined(); + expect(calls[1].request.params.keys().length).withContext('should be 1').toBe(1); - dataApiService.getResourceData(expectedResourceId).subscribe((response: ResourceData) => { - // Two calls - expect(getApiResponseSpy.calls.all().length).toBe(2, 'should be 2 calls'); + expectParams(calls[1], 'reqtype', ['context'], 1); + }) + ); + }); - // Shortcut - const firstCallArgs = getApiResponseSpy.calls.allArgs()[0]; + describe('... should call getApiResponse (via ApiService) with resource id', () => { + it( + '... two times', + waitForAsync(() => { + const expectedResourceId = '11398'; + const expectedQueryPath = + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + const expectedUrl = apiUrl + expectedQueryPath; + + dataApiService.getResourceData(expectedResourceId).subscribe((response: ResourceData) => { + // Two calls + expect(getApiResponseSpy.calls.all().length).withContext('should be 2 calls').toBe(2); + }); - // Check args of call - expect(firstCallArgs[0].name).toBe( - 'ResourceFullResponseJson', - 'should be ResourceFullResponseJson' + // Expect two requests to url with given settings + const re = new RegExp(expectedUrl, 'g'); + const calls = httpTestingController.match( + req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' ); - expect(firstCallArgs[1]).toBe(expectedQueryPath, `should be ${expectedQueryPath}`); - expect(firstCallArgs[2]).toEqual( - expectedQueryHttpParams, - `should equal ${expectedQueryHttpParams}` - ); - }); - // Expect two requests to url with given settings - const re = new RegExp(expectedUrl, 'g'); - const calls = httpTestingController.match( - req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' - ); + calls[0].flush(expectedResourceFullResponseJson); + calls[1].flush(expectedResourceContextResponseJson); + }) + ); - calls[0].flush(expectedResourceFullResponseJson); - calls[1].flush(expectedResourceContextResponseJson); - }) - ); + it( + '... the first call being a ResourceFullResponse request', + waitForAsync(() => { + const expectedResourceId = '11398'; + const expectedQueryPath = + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + const expectedQueryHttpParams = new HttpParams(); + const expectedUrl = apiUrl + expectedQueryPath; + + dataApiService.getResourceData(expectedResourceId).subscribe((response: ResourceData) => { + // Two calls + expect(getApiResponseSpy.calls.all().length).withContext('should be 2 calls').toBe(2); + + // Shortcut + const firstCallArgs = getApiResponseSpy.calls.allArgs()[0]; + + // Check args of call + expect(firstCallArgs[0].name).toBeTruthy(); + expect(firstCallArgs[0].name) + .withContext('should be ResourceFullResponseJson') + .toBe('ResourceFullResponseJson'); + + expect(firstCallArgs[1]).toBeTruthy(); + expect(firstCallArgs[1]) + .withContext(`should be ${expectedQueryPath}`) + .toBe(expectedQueryPath); + + expect(firstCallArgs[2]).toBeTruthy(); + expect(firstCallArgs[2]) + .withContext(`should equal ${expectedQueryHttpParams}`) + .toEqual(expectedQueryHttpParams); + }); - it( - '... second call to getApiResponse (via ApiService) with resource id should be a ResourceContextResponse request', - waitForAsync(() => { - const expectedResourceId = '11398'; - const expectedQueryPath = expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; - const expectedQueryHttpParams = new HttpParams().set('reqtype', 'context'); - const expectedUrl = apiUrl + expectedQueryPath; + // Expect two requests to url with given settings + const re = new RegExp(expectedUrl, 'g'); + const calls = httpTestingController.match( + req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' + ); - dataApiService.getResourceData(expectedResourceId).subscribe((response: ResourceData) => { - // Two calls - expect(getApiResponseSpy.calls.all().length).toBe(2, 'should be 2 calls'); + calls[0].flush(expectedResourceFullResponseJson); + calls[1].flush(expectedResourceContextResponseJson); + }) + ); - // Shortcut - const secondCallArgs = getApiResponseSpy.calls.allArgs()[1]; + it( + '... the second call being a ResourceContextResponse request', + waitForAsync(() => { + const expectedResourceId = '11398'; + const expectedQueryPath = + expectedRoutes.resources + expectedResourceId + expectedResourceSuffix; + const expectedQueryHttpParams = new HttpParams().set('reqtype', 'context'); + const expectedUrl = apiUrl + expectedQueryPath; + + dataApiService.getResourceData(expectedResourceId).subscribe((response: ResourceData) => { + // Two calls + expect(getApiResponseSpy.calls.all().length).withContext('should be 2 calls').toBe(2); + + // Shortcut + const secondCallArgs = getApiResponseSpy.calls.allArgs()[1]; + + // Check args of call + expect(secondCallArgs[0].name).toBeTruthy(); + expect(secondCallArgs[0].name) + .withContext('should be ResourceContextResponseJson') + .toBe('ResourceContextResponseJson'); + + expect(secondCallArgs[1]).toBeTruthy(); + expect(secondCallArgs[1]) + .withContext(`should be ${expectedQueryPath}`) + .toBe(expectedQueryPath); + + expect(secondCallArgs[2]).toBeTruthy(); + expect(secondCallArgs[2]) + .withContext(`should equal ${expectedQueryHttpParams}`) + .toEqual(expectedQueryHttpParams); + }); - // Check args of call - expect(secondCallArgs[0].name).toBe( - 'ResourceContextResponseJson', - 'should be ResourceContextResponseJson' + // Expect two requests to url with given settings + const re = new RegExp(expectedUrl, 'g'); + const calls = httpTestingController.match( + req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' ); - expect(secondCallArgs[1]).toBe(expectedQueryPath, `should be ${expectedQueryPath}`); - expect(secondCallArgs[2]).toEqual( - expectedQueryHttpParams, - `should equal ${expectedQueryHttpParams}` - ); - }); - // Expect two requests to url with given settings - const re = new RegExp(expectedUrl, 'g'); - const calls = httpTestingController.match( - req => req.url.match(re) && req.method === 'GET' && req.responseType === 'json' - ); - - calls[0].flush(expectedResourceFullResponseJson); - calls[1].flush(expectedResourceContextResponseJson); - }) - ); + calls[0].flush(expectedResourceFullResponseJson); + calls[1].flush(expectedResourceContextResponseJson); + }) + ); + }); }); describe('response', () => { describe('success', () => { - describe('... should return a ResourceData observable ', () => { + describe('... should return a ResourceData observable', () => { it( - '...when both API responses succeed', + '... with resource data when both API responses succeed', waitForAsync(() => { const expectedResourceId = '11398'; @@ -678,8 +1172,13 @@ describe('DataApiService', () => { dataApiService .getResourceData(expectedResourceId) .subscribe((resourceData: ResourceData) => { - expect(getApiResponseSpy.calls.all().length).toBe(2, 'should be 2 calls'); - expect(resourceData).toEqual(expectedResourceData); + expect(getApiResponseSpy.calls.all().length) + .withContext('should be 2 calls') + .toBe(2); + expect(resourceData).toBeTruthy(); + expect(resourceData) + .withContext(`should equal ${expectedResourceData}`) + .toEqual(expectedResourceData); }); }) ); @@ -705,15 +1204,19 @@ describe('DataApiService', () => { // Return fork joined observables from API getApiResponseSpy.and.returnValues( observableThrowError(expectedApiServiceError), - observableThrowError(expectedApiServiceError) + observableThrowError(() => expectedApiServiceError) ); dataApiService.getResourceData(expectedResourceId).subscribe( result => fail(expectedErrorMsg), (error: ApiServiceError) => { // Two calls - expect(getApiResponseSpy.calls.all().length).toBe(2, 'should be 2 calls'); - expect(error).toEqual(expectedApiServiceError); + expect(getApiResponseSpy.calls.all().length) + .withContext('should be 2 calls') + .toBe(2); + expect(error) + .withContext(`should equal ${expectedApiServiceError}`) + .toEqual(expectedApiServiceError); } ); }) @@ -724,7 +1227,7 @@ describe('DataApiService', () => { waitForAsync(() => { // Return fork joined observables from API getApiResponseSpy.and.returnValues( - observableThrowError(expectedApiServiceError), + observableThrowError(() => expectedApiServiceError), observableOf(expectedResourceContextResponseJson) ); @@ -732,8 +1235,12 @@ describe('DataApiService', () => { result => fail(expectedErrorMsg), (error: ApiServiceError) => { // Two calls - expect(getApiResponseSpy.calls.all().length).toBe(2, 'should be 2 calls'); - expect(error).toEqual(expectedApiServiceError); + expect(getApiResponseSpy.calls.all().length) + .withContext('should be 2 calls') + .toBe(2); + expect(error) + .withContext(`should equal ${expectedApiServiceError}`) + .toEqual(expectedApiServiceError); } ); }) @@ -745,15 +1252,19 @@ describe('DataApiService', () => { // Return fork joined observables from API getApiResponseSpy.and.returnValues( observableOf(expectedResourceFullResponseJson), - observableThrowError(expectedApiServiceError) + observableThrowError(() => expectedApiServiceError) ); dataApiService.getResourceData(expectedResourceId).subscribe( result => fail(expectedErrorMsg), (error: ApiServiceError) => { // Two calls - expect(getApiResponseSpy.calls.all().length).toBe(2, 'should be 2 calls'); - expect(error).toEqual(expectedApiServiceError); + expect(getApiResponseSpy.calls.all().length) + .withContext('should be 2 calls') + .toBe(2); + expect(error) + .withContext(`should equal ${expectedApiServiceError}`) + .toEqual(expectedApiServiceError); } ); }) @@ -762,4 +1273,392 @@ describe('DataApiService', () => { }); }); }); + + describe('#getResourceTypes', () => { + describe('request', () => { + it( + '... should perform an HTTP GET request to the API (via ApiService)', + waitForAsync(() => { + const expectedUrl = apiUrl + expectedRoutes.resourcetypes; + + // Call service function + dataApiService.getResourceTypes().subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.method).toBeTruthy(); + expect(call.request.method).withContext('should be GET').toBe('GET'); + + expect(call.request.responseType).toBeTruthy(); + expect(call.request.responseType).withContext('should be json').toBe('json'); + + expect(call.request.url).toBeTruthy(); + expect(call.request.url).withContext(`should be ${expectedUrl}`).toBe(expectedUrl); + }) + ); + + it( + '... should set default query params for GET request', + waitForAsync(() => { + const expectedUrl = apiUrl + expectedRoutes.resourcetypes; + + // Call service function + dataApiService.getResourceTypes().subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 2').toBe(2); + + expectParams(call, 'vocabulary', [expectedVocabularyId], 1); + expectParams(call, 'lang', [expectedDefaultLanguage], 1); + }) + ); + + it( + '... should call getApiResponse (via ApiService) ', + waitForAsync(() => { + const expectedQueryPath = expectedRoutes.resourcetypes; + const expectedQueryHttpParams = new HttpParams() + .set('vocabulary', expectedVocabularyId) + .set('lang', expectedDefaultLanguage); + + getApiResponseSpy.and.returnValue(observableOf(expectedPropertyTypesInResourceClassResponseJson)); + + dataApiService.getResourceTypes().subscribe((restypes: ResourceTypesInVocabularyResponseJson) => { + expect(restypes).toBeTruthy(); + expectSpyCall(getApiResponseSpy, 1, [ + ResourceTypesInVocabularyResponseJson, + expectedQueryPath, + expectedQueryHttpParams, + ]); + }); + }) + ); + }); + describe('response', () => { + describe('success', () => { + it( + '... should return a ResourceTypesInVocabularyResponseJson observable', + waitForAsync(() => { + getApiResponseSpy.and.returnValue(observableOf(expectedResourceTypesInVocabularyResponseJson)); + + dataApiService + .getResourceTypes() + .subscribe((restypes: ResourceTypesInVocabularyResponseJson) => { + expect(restypes).toBeTruthy(); + expect(restypes) + .withContext(`should equal ${expectedResourceTypesInVocabularyResponseJson}`) + .toEqual(expectedResourceTypesInVocabularyResponseJson); + }); + }) + ); + }); + + describe('fail', () => { + it( + '... should return an ApiServiceError observable', + waitForAsync(() => { + const expectedQueryPath = expectedRoutes.resourcetypes; + const expectedQueryHttpParams = new HttpParams() + .set('vocabulary', expectedVocabularyId) + .set('lang', expectedDefaultLanguage); + + const expectedErrorMsg = 'failed HTTP response with 401 error'; + + const expectedApiServiceError = new ApiServiceError(); + expectedApiServiceError.status = 401; + expectedApiServiceError.url = expectedQueryPath; + + getApiResponseSpy.and.returnValue(observableThrowError(() => expectedApiServiceError)); + + dataApiService.getResourceTypes().subscribe( + result => fail(expectedErrorMsg), + (error: ApiServiceError) => { + expectSpyCall(getApiResponseSpy, 1, [ + ResourceTypesInVocabularyResponseJson, + expectedQueryPath, + expectedQueryHttpParams, + ]); + expect(error) + .withContext(`should equal ${expectedApiServiceError}`) + .toEqual(expectedApiServiceError); + } + ); + }) + ); + }); + }); + }); + + describe('#getPropertyListsByResourceType', () => { + describe('request', () => { + describe('... should not do anything if ', () => { + it( + 'undefined is provided', + waitForAsync(() => { + // Undefined + const expectedRestype = undefined; + const expectedUrl = apiUrl + expectedRoutes.propertylists; + + // Call service function + dataApiService.getPropertyListsByResourceType(expectedRestype); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); + + it( + '... null is provided', + waitForAsync(() => { + // Null + const expectedRestype = null; + const expectedUrl = apiUrl + expectedRoutes.propertylists; + + // Call service function + dataApiService.getPropertyListsByResourceType(expectedRestype); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); + + it( + '... empty resource id string is provided', + waitForAsync(() => { + // Empty string + const expectedRestype = ''; + const expectedUrl = apiUrl + expectedRoutes.propertylists; + + // Call service function + dataApiService.getPropertyListsByResourceType(expectedRestype); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + }) + ); + }); + + it( + '... should perform an HTTP GET request to the API (via ApiService)', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedUrl = apiUrl + expectedRoutes.propertylists; + + // Call service function + dataApiService.getPropertyListsByResourceType(expectedRestype).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.method).toBeTruthy(); + expect(call.request.method).withContext('should be GET').toBe('GET'); + + expect(call.request.responseType).toBeTruthy(); + expect(call.request.responseType).withContext('should be json').toBe('json'); + + expect(call.request.url).toBeTruthy(); + expect(call.request.url).withContext(`should be ${expectedUrl}`).toBe(expectedUrl); + }) + ); + + it( + '... should set default query params for GET request', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedUrl = apiUrl + expectedRoutes.propertylists; + + // Call service function + dataApiService.getPropertyListsByResourceType(expectedRestype).subscribe(); + + // Expect one request to url with given settings + const call: TestRequest = httpTestingController.expectOne( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === expectedUrl, + `GET to ${expectedUrl}` + ); + + expect(call.request.params).toBeDefined(); + expect(call.request.params.keys().length).withContext('should be 1').toBe(1); + + expectParams(call, 'restype', [expectedRestype], 1); + }) + ); + + it( + '... should call getApiResponse (via ApiService) ', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedQueryPath = expectedRoutes.propertylists; + const expectedQueryHttpParams = new HttpParams().set('restype', expectedRestype); + + getApiResponseSpy.and.returnValue(observableOf(expectedPropertyTypesInResourceClassResponseJson)); + + dataApiService + .getPropertyListsByResourceType(expectedRestype) + .subscribe((propertyList: PropertyTypesInResourceClassResponseJson) => { + expect(propertyList).toBeTruthy(); + expectSpyCall(getApiResponseSpy, 1, [ + PropertyTypesInResourceClassResponseJson, + expectedQueryPath, + expectedQueryHttpParams, + ]); + }); + }) + ); + }); + + describe('response', () => { + describe('success', () => { + it( + '... should return a PropertyTypesInResourceClassResponseJson observable', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + + getApiResponseSpy.and.returnValue( + observableOf(expectedPropertyTypesInResourceClassResponseJson) + ); + + dataApiService + .getPropertyListsByResourceType(expectedRestype) + .subscribe((propertyList: PropertyTypesInResourceClassResponseJson) => { + expect(propertyList).toBeTruthy(); + expect(propertyList) + .withContext(`should equal ${expectedPropertyTypesInResourceClassResponseJson}`) + .toEqual(expectedPropertyTypesInResourceClassResponseJson); + }); + }) + ); + }); + + describe('fail', () => { + it( + '... should return an ApiServiceError observable', + waitForAsync(() => { + const expectedRestype = '43'; // Opus + const expectedQueryPath = expectedRoutes.propertylists; + const expectedQueryHttpParams = new HttpParams().set('restype', expectedRestype); + + const expectedErrorMsg = 'failed HTTP response with 401 error'; + + const expectedApiServiceError = new ApiServiceError(); + expectedApiServiceError.status = 401; + expectedApiServiceError.url = expectedQueryPath; + + getApiResponseSpy.and.returnValue(observableThrowError(() => expectedApiServiceError)); + + dataApiService.getPropertyListsByResourceType(expectedRestype).subscribe( + result => fail(expectedErrorMsg), + (error: ApiServiceError) => { + expectSpyCall(getApiResponseSpy, 1, [ + PropertyTypesInResourceClassResponseJson, + expectedQueryPath, + expectedQueryHttpParams, + ]); + expect(error) + .withContext(`should equal ${expectedApiServiceError}`) + .toEqual(expectedApiServiceError); + } + ); + }) + ); + }); + }); + }); + + describe('#_getResourceDataResponseFromApi', () => { + describe('request', () => { + describe('... should not do anything if ', () => { + it( + 'response type is undefined', + waitForAsync(() => { + // Call service function + (dataApiService as any)._getResourceDataResponseFromApi(undefined, 'undefined'); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === 'undefined', + `GET to ${'undefined'}` + ); + }) + ); + + it( + 'response type is null', + waitForAsync(() => { + // Call service function + (dataApiService as any)._getResourceDataResponseFromApi(null, 'null'); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === 'null', + `GET to ${'null'}` + ); + }) + ); + + it( + 'response type is not a known switch case', + waitForAsync(() => { + // Call service function + (dataApiService as any)._getResourceDataResponseFromApi(HlistJson, 'hlist'); + + // Expect no request to getApiResponse + expectSpyCall(getApiResponseSpy, 0); + + // Expect no request to url with given settings + httpTestingController.expectNone( + (req: HttpRequest) => + req.method === 'GET' && req.responseType === 'json' && req.url === 'hlist', + `GET to ${'hlist'}` + ); + }) + ); + }); + }); + }); }); diff --git a/src/testing/mock-data/index.ts b/src/testing/mock-data/index.ts index cbebcc1468..5d009f21db 100644 --- a/src/testing/mock-data/index.ts +++ b/src/testing/mock-data/index.ts @@ -8,17 +8,21 @@ */ import { mockContextJson } from '@testing/mock-data/mockContextJson'; +import { mockPropertyTypesInResourceClassResponseJson } from '@testing/mock-data/mockPropertyTypesInResourceClassResponseJson'; import { mockResourceContextResponseJson } from '@testing/mock-data/mockResourceContextResponseJson'; import { mockResourceDetail } from '@testing/mock-data/mockResourceDetail'; import { mockResourceFullResponseJson } from '@testing/mock-data/mockResourceFullResponseJson'; +import { mockResourceTypesInVocabularyResponseJson } from '@testing/mock-data/mockResourceTypesInVocabularyResponseJson'; import { mockSearchResponseConverted } from '@testing/mock-data/mockSearchResponseConverted'; import { mockSearchResponseJson } from '@testing/mock-data/mockSearchResponseJson'; export { mockContextJson, + mockPropertyTypesInResourceClassResponseJson, mockResourceContextResponseJson, mockResourceDetail, mockResourceFullResponseJson, + mockResourceTypesInVocabularyResponseJson, mockSearchResponseConverted, mockSearchResponseJson, }; diff --git a/src/testing/mock-data/mockPropertyTypesInResourceClassResponseJson.ts b/src/testing/mock-data/mockPropertyTypesInResourceClassResponseJson.ts new file mode 100644 index 0000000000..2380a0690a --- /dev/null +++ b/src/testing/mock-data/mockPropertyTypesInResourceClassResponseJson.ts @@ -0,0 +1,77 @@ +/* eslint-disable @typescript-eslint/naming-convention */ + +/** + * Test helper data file: mockPropertyTypesInResourceClassResponseJson. + * + * It provides a mocked PropertyTypesInResourceClassResponseJson response + * from the Salsah API. + * + * Exposed to be called from tests. + */ +export const mockPropertyTypesInResourceClassResponseJson = { + status: 0, + userdata: { + lang: 'en', + email: undefined, + givenName: undefined, + familyName: undefined, + password: undefined, + status: undefined, + token: undefined, + user_id: undefined, + }, + properties: [ + { + id: '206', + name: 'alternative_name', + valuetype_id: '14', + attributes: null, + vocabulary_id: '4', + guielement_id: '14', + is_annotation: '0', + person_id: '5', + shortname: 'webern-onto', + longname: 'Anton Webern Ontology', + label: 'Namensvariante', + }, + { + id: '217', + name: 'authentic_date', + valuetype_id: '4', + attributes: null, + vocabulary_id: '4', + guielement_id: '7', + is_annotation: '0', + person_id: '5', + shortname: 'webern-onto', + longname: 'Anton Webern Ontology', + label: 'gesicherte Datierung', + }, + { + id: '594', + name: 'autograph_date', + valuetype_id: '14', + attributes: null, + vocabulary_id: '4', + guielement_id: '14', + is_annotation: '0', + person_id: '100', + shortname: 'webern-onto', + longname: 'Anton Webern Ontology', + label: 'autographe Datierung', + }, + { + id: '655', + name: 'bibl_abstract', + valuetype_id: '14', + attributes: null, + vocabulary_id: '4', + guielement_id: '14', + is_annotation: '0', + person_id: '100', + shortname: 'webern-onto', + longname: 'Anton Webern Ontology', + label: 'Abstract', + }, + ], +}; diff --git a/src/testing/mock-data/mockResourceTypesInVocabularyResponseJson.ts b/src/testing/mock-data/mockResourceTypesInVocabularyResponseJson.ts new file mode 100644 index 0000000000..7e7bec17b4 --- /dev/null +++ b/src/testing/mock-data/mockResourceTypesInVocabularyResponseJson.ts @@ -0,0 +1,91 @@ +/* eslint-disable @typescript-eslint/naming-convention */ + +/** + * Test helper data file: mockResourceTypesInVocabularyResponseJson. + * + * It provides a mocked ResourceTypesInVocabularyResponseJson response + * from the Salsah API. + * + * Exposed to be called from tests. + */ +export const mockResourceTypesInVocabularyResponseJson = { + status: 0, + userdata: { + lang: 'en', + email: undefined, + givenName: undefined, + familyName: undefined, + password: undefined, + status: undefined, + token: undefined, + user_id: undefined, + }, + resourcetypes: [ + { + id: '43', + label: 'Work [Anton Webern Ontology]', + properties: [ + { + id: '389', + label: 'Opus', + }, + { + id: '1', + label: 'Title', + }, + { + id: '856', + label: 'Gemeinsame Normdatei (GND)', + }, + { + id: '97', + label: 'Datum der Komposition', + }, + { + id: '94', + label: 'Aufführungen', + }, + { + id: '96', + label: 'Datum der Erstpublikation', + }, + { + id: '224', + label: 'Erstverlag (Richtext)', + }, + { + id: '226', + label: 'Datum weitere Publikation', + }, + { + id: '225', + label: 'weiterer Verlag', + }, + { + id: '196', + label: 'Besetzung', + }, + { + id: '193', + label: 'Quelle (Richtext)', + }, + { + id: '896', + label: 'weitere, für die Edition nicht relevante Quelle', + }, + { + id: '198', + label: 'Textquelle', + }, + { + id: '204', + label: 'hat Satz', + }, + { + id: '199', + label: 'Kommentar (Richtext)', + }, + ], + }, + ], +}; From 52bd679e522de065ac9034f0b02d19e9a50f9def Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Wed, 9 Feb 2022 18:08:15 +0100 Subject: [PATCH 067/148] test(search): fix tests after changes --- .../resource-detail/resource-detail.component.spec.ts | 1 - .../extended-search-form.component.spec.ts | 9 +++++++++ .../search-panel/search-panel.component.spec.ts | 3 ++- 3 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.spec.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.spec.ts index a1dd368da0..4fac274809 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.spec.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.spec.ts @@ -8,7 +8,6 @@ import { mockResourceDetail, mockResourceFullResponseJson } from '@testing/mock- import { of as observableOf } from 'rxjs'; import { JsonConvert } from 'json2typescript'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import Spy = jasmine.Spy; import { DataStreamerService, LoadingService } from '@awg-core/services'; import { GndEvent } from '@awg-core/services/gnd-service'; diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts index 57436bdde2..5a716b9c37 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts @@ -1,4 +1,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { HttpClientTestingModule } from '@angular/common/http/testing'; +import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; import { ExtendedSearchFormComponent } from './extended-search-form.component'; @@ -6,15 +8,22 @@ describe('ExtendedSearchFormComponent', () => { let component: ExtendedSearchFormComponent; let fixture: ComponentFixture; + let formBuilder: FormBuilder; + beforeEach(async () => { await TestBed.configureTestingModule({ + imports: [HttpClientTestingModule, ReactiveFormsModule], declarations: [ExtendedSearchFormComponent], + providers: [FormBuilder], }).compileComponents(); }); beforeEach(() => { fixture = TestBed.createComponent(ExtendedSearchFormComponent); component = fixture.componentInstance; + + formBuilder = TestBed.inject(FormBuilder); + fixture.detectChanges(); }); diff --git a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts index b005689326..e93a977a04 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts @@ -5,6 +5,7 @@ import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; import { RouterTestingModule } from '@angular/router/testing'; import { of as observableOf } from 'rxjs'; +import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; import { ActivatedRouteStub } from '@testing/router-stubs'; @@ -70,7 +71,7 @@ describe('SearchPanelComponent', () => { beforeEach( waitForAsync(() => { TestBed.configureTestingModule({ - imports: [RouterTestingModule], + imports: [RouterTestingModule, NgbNavModule], declarations: [ SearchPanelComponent, SearchFormStubComponent, From cf683bf3333b44fa11c7f0c553daa3db9b16bccb Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Wed, 9 Feb 2022 23:54:15 +0100 Subject: [PATCH 068/148] test(search): fix tests of SearchOverviewComponent after changes --- .../search-overview.component.spec.ts | 115 ++++++++---------- .../edition-overview.component.spec.ts | 26 ++-- src/testing/router-stubs.ts | 57 +++++++-- 3 files changed, 115 insertions(+), 83 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-overview.component.spec.ts b/src/app/views/data-view/data-outlets/search-overview.component.spec.ts index f0a3db2892..e83d72b1a5 100644 --- a/src/app/views/data-view/data-outlets/search-overview.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-overview.component.spec.ts @@ -7,7 +7,7 @@ import { ActivatedRoute, QueryParamsHandling } from '@angular/router'; import Spy = jasmine.Spy; import { expectSpyCall, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; -import { ActivatedRouteStub, RouterOutletStubComponent } from '@testing/router-stubs'; +import { ActivatedRouteStub, RouterOutletStubComponent, UrlSegmentStub } from '@testing/router-stubs'; import { SideInfoService } from '@awg-core/services'; import { RouterLinkButton } from '@awg-shared/router-link-button-group/router-link-button.model'; @@ -29,11 +29,11 @@ describe('SearchOverviewComponent (DONE)', () => { let fixture: ComponentFixture; let compDe: DebugElement; - let expectedsearchRouterLinkButtons: RouterLinkButton[]; + let expectedSearchRouterLinkButtons: RouterLinkButton[]; let mockActivatedRoute: ActivatedRouteStub; - let expectedRouteParams: {}; - // Let mockActivatedRoutePath: string; + let expectedRouteUrl: UrlSegmentStub[] = []; + const expectedPath = 'search'; let setButtonsSpy: Spy; let selectButtonSpy: Spy; @@ -55,15 +55,10 @@ describe('SearchOverviewComponent (DONE)', () => { // Mocked activated route // See https://gist.github.com/benjamincharity/3d25cd2c95b6ecffadb18c3d4dbbd80b - expectedRouteParams = [ - { - url: [{ path: 'fulltext' }], - }, - ]; - mockActivatedRoute = new ActivatedRouteStub(); - mockActivatedRoute.testChildren = expectedRouteParams; + expectedRouteUrl = [{ path: expectedPath }]; - // MockActivatedRoutePath = mockActivatedRoute.snapshot.children[0].url[0].path;*/ + mockActivatedRoute = new ActivatedRouteStub(); + mockActivatedRoute.testUrl = expectedRouteUrl; TestBed.configureTestingModule({ declarations: [SearchOverviewComponent, RouterLinkButtonGroupStubComponent, RouterOutletStubComponent], @@ -84,10 +79,10 @@ describe('SearchOverviewComponent (DONE)', () => { compDe = fixture.debugElement; // Test data - expectedsearchRouterLinkButtons = [ - new RouterLinkButton('/data/search', 'fulltext', 'Volltext-Suche', false), - new RouterLinkButton('/data/search', 'timeline', 'Timeline', true), - new RouterLinkButton('/data/search', 'bibliography', 'Bibliographie', true), + expectedSearchRouterLinkButtons = [ + new RouterLinkButton('/data', 'search', 'Suche', false), + new RouterLinkButton('/data', 'timeline', 'Timeline', true), + new RouterLinkButton('/data', 'bibliography', 'Bibliographie', true), ]; // Spies on component functions @@ -102,22 +97,24 @@ describe('SearchOverviewComponent (DONE)', () => { expect(component).toBeTruthy(); }); - it('should change params', () => { - expect(mockActivatedRoute.snapshot.children).toEqual(expectedRouteParams); + it('should change urls', () => { + expect(mockActivatedRoute.snapshot.url[0].path).toBeTruthy(); + expect(mockActivatedRoute.snapshot.url[0].path) + .withContext(`should equal ${expectedPath}`) + .toEqual(expectedPath); - const changedRouteParams = [ - { - url: [{ path: 'other' }], - }, - ]; - mockActivatedRoute.testChildren = changedRouteParams; + const changedPath = 'other'; + const changedRouteUrl: UrlSegmentStub[] = [{ path: changedPath }]; + + mockActivatedRoute.testUrl = changedRouteUrl; - expect(mockActivatedRoute.snapshot.children).toEqual(changedRouteParams); + expect(mockActivatedRoute.snapshot.url[0].path).toBeTruthy(); + expect(mockActivatedRoute.snapshot.url[0].path).withContext(`should equal ${changedPath}`).toEqual(changedPath); }); describe('BEFORE initial data binding', () => { it('should not have `searchRouterLinkButtons`', () => { - expect(component.searchRouterLinkButtons).toBeUndefined('should be undefined'); + expect(component.searchRouterLinkButtons).withContext('should be undefined').toBeUndefined(); }); describe('#setButtons', () => { @@ -173,11 +170,10 @@ describe('SearchOverviewComponent (DONE)', () => { }); it('should have `searchRouterLinkButtons`', () => { - expect(component.searchRouterLinkButtons).toBeDefined('should be defined'); - expect(component.searchRouterLinkButtons).toEqual( - expectedsearchRouterLinkButtons, - `should equal ${expectedsearchRouterLinkButtons}` - ); + expect(component.searchRouterLinkButtons).withContext('should be defined').toBeDefined(); + expect(component.searchRouterLinkButtons) + .withContext(`should equal ${expectedSearchRouterLinkButtons}`) + .toEqual(expectedSearchRouterLinkButtons); }); }); @@ -193,10 +189,9 @@ describe('SearchOverviewComponent (DONE)', () => { ) as RouterLinkButtonGroupStubComponent; expect(buttonCmp.routerLinkButtons).toBeTruthy(); - expect(buttonCmp.routerLinkButtons).toEqual( - expectedsearchRouterLinkButtons, - `should equal ${expectedsearchRouterLinkButtons}` - ); + expect(buttonCmp.routerLinkButtons) + .withContext(`should equal ${expectedSearchRouterLinkButtons}`) + .toEqual(expectedSearchRouterLinkButtons); }); }); @@ -208,29 +203,25 @@ describe('SearchOverviewComponent (DONE)', () => { it('... should update search info title (via Service) if path matches button.link', () => { expectSpyCall(updateSearchInfoTitleFromPathSpy, 1); - // Path == fulltext -> first button - const expectedButton = expectedsearchRouterLinkButtons[0]; + // Path == search -> first button + const expectedButton = expectedSearchRouterLinkButtons[0]; expectSpyCall(serviceUpdateSearchInfoTitleSpy, 1, expectedButton.label); }); it('... should not update search info title (via Service) if path does not match button.link', () => { - expectSpyCall(updateSearchInfoTitleFromPathSpy, 1, undefined); - expectSpyCall(serviceUpdateSearchInfoTitleSpy, 1, expectedsearchRouterLinkButtons[0].label); + expectSpyCall(updateSearchInfoTitleFromPathSpy, 1); + expectSpyCall(serviceUpdateSearchInfoTitleSpy, 1, expectedSearchRouterLinkButtons[0].label); - const changedRouteParams = [ - { - url: [{ path: 'other' }], - }, - ]; - mockActivatedRoute.testChildren = changedRouteParams; + const changedRouteUrl = [{ path: 'other' }]; + mockActivatedRoute.testUrl = changedRouteUrl; component.updateSearchInfoTitleFromPath(); fixture.detectChanges(); - expectSpyCall(updateSearchInfoTitleFromPathSpy, 2, undefined); + expectSpyCall(updateSearchInfoTitleFromPathSpy, 2); // Spy count should not have changed - expectSpyCall(serviceUpdateSearchInfoTitleSpy, 1); + expectSpyCall(serviceUpdateSearchInfoTitleSpy, 1, expectedSearchRouterLinkButtons[0].label); }); }); @@ -246,19 +237,19 @@ describe('SearchOverviewComponent (DONE)', () => { ) as RouterLinkButtonGroupStubComponent; // Button 1 - buttonCmp.selectButtonRequest.emit(expectedsearchRouterLinkButtons[0]); + buttonCmp.selectButtonRequest.emit(expectedSearchRouterLinkButtons[0]); - expectSpyCall(selectButtonSpy, 1, expectedsearchRouterLinkButtons[0]); + expectSpyCall(selectButtonSpy, 1, expectedSearchRouterLinkButtons[0]); // Button 2 - buttonCmp.selectButtonRequest.emit(expectedsearchRouterLinkButtons[1]); + buttonCmp.selectButtonRequest.emit(expectedSearchRouterLinkButtons[1]); - expectSpyCall(selectButtonSpy, 2, expectedsearchRouterLinkButtons[1]); + expectSpyCall(selectButtonSpy, 2, expectedSearchRouterLinkButtons[1]); // Button 3 - buttonCmp.selectButtonRequest.emit(expectedsearchRouterLinkButtons[2]); + buttonCmp.selectButtonRequest.emit(expectedSearchRouterLinkButtons[2]); - expectSpyCall(selectButtonSpy, 3, expectedsearchRouterLinkButtons[2]); + expectSpyCall(selectButtonSpy, 3, expectedSearchRouterLinkButtons[2]); })); describe('... should not do anything if no RouterLinkButton provided', () => { @@ -347,15 +338,15 @@ describe('SearchOverviewComponent (DONE)', () => { it('... should call SideInfoService# clearSearchInfoData', fakeAsync(() => { // Emit button 1 - component.onButtonSelect(expectedsearchRouterLinkButtons[0]); + component.onButtonSelect(expectedSearchRouterLinkButtons[0]); expectSpyCall(serviceClearSearchInfoDataSpy, 1); // Emit button 2 - component.onButtonSelect(expectedsearchRouterLinkButtons[1]); + component.onButtonSelect(expectedSearchRouterLinkButtons[1]); expectSpyCall(serviceClearSearchInfoDataSpy, 2); // Emit button 3 - component.onButtonSelect(expectedsearchRouterLinkButtons[2]); + component.onButtonSelect(expectedSearchRouterLinkButtons[2]); expectSpyCall(serviceClearSearchInfoDataSpy, 3); })); @@ -363,16 +354,16 @@ describe('SearchOverviewComponent (DONE)', () => { // First call was on init // Emit button 1 - component.onButtonSelect(expectedsearchRouterLinkButtons[0]); - expectSpyCall(serviceUpdateSearchInfoTitleSpy, 2, expectedsearchRouterLinkButtons[0].label); + component.onButtonSelect(expectedSearchRouterLinkButtons[0]); + expectSpyCall(serviceUpdateSearchInfoTitleSpy, 2, expectedSearchRouterLinkButtons[0].label); // Emit button 2 - component.onButtonSelect(expectedsearchRouterLinkButtons[1]); - expectSpyCall(serviceUpdateSearchInfoTitleSpy, 3, expectedsearchRouterLinkButtons[1].label); + component.onButtonSelect(expectedSearchRouterLinkButtons[1]); + expectSpyCall(serviceUpdateSearchInfoTitleSpy, 3, expectedSearchRouterLinkButtons[1].label); // Emit button 3 - component.onButtonSelect(expectedsearchRouterLinkButtons[2]); - expectSpyCall(serviceUpdateSearchInfoTitleSpy, 4, expectedsearchRouterLinkButtons[2].label); + component.onButtonSelect(expectedSearchRouterLinkButtons[2]); + expectSpyCall(serviceUpdateSearchInfoTitleSpy, 4, expectedSearchRouterLinkButtons[2].label); })); }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-overview.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-overview.component.spec.ts index ebd5464bce..d7d02c4856 100644 --- a/src/app/views/edition-view/edition-outlets/edition-overview.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-overview.component.spec.ts @@ -101,11 +101,11 @@ describe('EditionOverviewComponent (DONE)', () => { describe('BEFORE initial data binding', () => { it('should not have `editionRouterLinkButtons`', () => { - expect(component.editionRouterLinkButtons).toBeUndefined('should be undefined'); + expect(component.editionRouterLinkButtons).withContext('should be undefined').toBeUndefined(); }); it('should not have `editionWork`', () => { - expect(component.editionWork).toBeUndefined('should be undefined'); + expect(component.editionWork).withContext('should be undefined').toBeUndefined(); }); describe('#getEditionWork', () => { @@ -144,8 +144,10 @@ describe('EditionOverviewComponent (DONE)', () => { }); it('should have `editionWork`', () => { - expect(component.editionWork).toBeDefined('should be defined'); - expect(component.editionWork).toEqual(expectedEditionWork, `should equal ${expectedEditionWork}`); + expect(component.editionWork).withContext('should be defined').toBeDefined(); + expect(component.editionWork) + .withContext(`should equal ${expectedEditionWork}`) + .toEqual(expectedEditionWork); }); describe('#setButtons', () => { @@ -154,11 +156,10 @@ describe('EditionOverviewComponent (DONE)', () => { }); it('should have `editionRouterLinkButtons`', () => { - expect(component.editionRouterLinkButtons).toBeDefined('should be defined'); - expect(component.editionRouterLinkButtons).toEqual( - expectedEditionRouterLinkButtons, - `should equal ${expectedEditionRouterLinkButtons}` - ); + expect(component.editionRouterLinkButtons).withContext('should be defined').toBeDefined(); + expect(component.editionRouterLinkButtons) + .withContext(`should equal ${expectedEditionRouterLinkButtons}`) + .toEqual(expectedEditionRouterLinkButtons); }); }); @@ -178,10 +179,9 @@ describe('EditionOverviewComponent (DONE)', () => { ) as RouterLinkButtonGroupStubComponent; expect(buttonCmp.routerLinkButtons).toBeTruthy(); - expect(buttonCmp.routerLinkButtons).toEqual( - expectedEditionRouterLinkButtons, - `should equal ${expectedEditionRouterLinkButtons}` - ); + expect(buttonCmp.routerLinkButtons) + .withContext(`should equal ${expectedEditionRouterLinkButtons}`) + .toEqual(expectedEditionRouterLinkButtons); }); }); }); diff --git a/src/testing/router-stubs.ts b/src/testing/router-stubs.ts index 61b27d01aa..0a45f427bd 100644 --- a/src/testing/router-stubs.ts +++ b/src/testing/router-stubs.ts @@ -6,6 +6,10 @@ import { BehaviorSubject } from 'rxjs'; import { AppModule } from '@awg-app/app.module'; +export interface UrlSegmentStub { + path: string; +} + // #docregion router-link-stub /** * A RouterLink test double (stub) with a `click` listener. @@ -136,6 +140,22 @@ export class ActivatedRouteStub { */ private _testChildren: Params; + /** + * Private BehaviorSubject to handle test route url. + */ + private _urlSubject = new BehaviorSubject(this.testUrl); + + /** + * Observable that contains a map of the urls + */ + // eslint-disable-next-line @typescript-eslint/member-ordering, @typescript-eslint/naming-convention + readonly url = this._urlSubject.asObservable(); + + /** + * Private variable: _testUrl + */ + private _testUrl: UrlSegmentStub[]; + /** * Constructor for the ActivatedRouteStub (stub). * @@ -176,14 +196,23 @@ export class ActivatedRouteStub { } /** - * Getter for the test route queryÜaramMap. + * Getter for the test route queryParamMap. * - * @returns The latest test route queryParamMap. + * @returns The latest test route children. */ get testChildren() { return this._testChildren; } + /** + * Getter for the test route url. + * + * @returns The latest test route url. + */ + get testUrl() { + return this._testUrl; + } + /** * Getter for the ActivatedRoute.snapshot.params/paramMap/queryParamMap. * @@ -191,15 +220,17 @@ export class ActivatedRouteStub { */ get snapshot() { return { + children: this.testChildren, + queryParamMap: this.testQueryParamMap, params: this.testParams, paramMap: this.testParamMap, - queryParamMap: this.testQueryParamMap, - children: this.testChildren, + url: this.testUrl, }; } /** * Setter for test route parameters. + * * @param params The test route parameters to be set. */ set testParams(params: {}) { @@ -208,7 +239,7 @@ export class ActivatedRouteStub { } /** - * Setter for the test route paramMap + * Setter for the test route paramMap. * * @param {} params The route parameters to be set. */ @@ -218,7 +249,7 @@ export class ActivatedRouteStub { } /** - * Setter for the test route queryParamMap + * Setter for the test route queryParamMap. * * @param {Params} params The route queryParameters to be set. */ @@ -228,14 +259,24 @@ export class ActivatedRouteStub { } /** - * Setter for the test route queryParamMap + * Setter for the test route children. * - * @param {Params} params The route queryParameters to be set. + * @param {Params} params The route children to be set. */ set testChildren(params: {}) { this._testChildren = params; this._childrenSubject.next(this._testChildren); } + + /** + * Setter for the test route url. + * + * @param {Params} params The route url to be set. + */ + set testUrl(params: UrlSegmentStub[]) { + this._testUrl = params; + this._urlSubject.next(this._testUrl); + } } // #enddocregion activated-route-stub From 4182e3f971b1cdd2dfd7d98ff38c36a6c57ae883 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Wed, 9 Feb 2022 23:57:54 +0100 Subject: [PATCH 069/148] test(search): fix tests for ResearchInfo after changes --- .../resource-info.component.spec.ts | 586 +++++++++++------- 1 file changed, 364 insertions(+), 222 deletions(-) diff --git a/src/app/side-info/resource-info/resource-info.component.spec.ts b/src/app/side-info/resource-info/resource-info.component.spec.ts index e376fa4d40..e6004488cb 100644 --- a/src/app/side-info/resource-info/resource-info.component.spec.ts +++ b/src/app/side-info/resource-info/resource-info.component.spec.ts @@ -18,9 +18,10 @@ import { mockSearchResponseJson } from '@testing/mock-data'; import { mockConsole } from '@testing/mock-helper'; import { DataStreamerService } from '@awg-core/services'; +import { SearchResponseJson } from '@awg-shared/api-objects'; import { CompileHtmlComponent } from '@awg-shared/compile-html'; import { ResourceInfo, ResourceInfoResource } from '@awg-side-info/side-info-models'; -import { SearchResponseWithQuery } from '@awg-views/data-view/models'; +import { ExtendedSearchParams, SearchResponseWithQuery } from '@awg-views/data-view/models'; import { ResourceInfoComponent } from './resource-info.component'; @@ -324,214 +325,229 @@ describe('ResourceInfoComponent (DONE)', () => { expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); }); - it('... should set `resourceInfoData` (previous, current, next resource given)', () => { - const expectedResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); - const subjects = expectedResponseClone.data.subjects; - const i = expectedGoToIndex - 1; - const expectedCurrent = subjects[i]; - const expectedPrevious = subjects[i - 1]; - const expectedNext = subjects[i + 1]; - - const expectedResourceInfoData: ResourceInfo = { - searchResults: expectedResponseClone, - resources: { - current: new ResourceInfoResource(expectedCurrent, i), - next: new ResourceInfoResource(expectedNext, i + 1), - previous: new ResourceInfoResource(expectedPrevious, i - 1), - }, - }; - - expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); - expect(component.resourceInfoData) - .withContext(`should be ${expectedResourceInfoData}`) - .toEqual(expectedResourceInfoData); - }); - - it('... should set `resourceInfoData` (only current, next resource given)', () => { - const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); - otherResponseClone.data.subjects = otherResponseClone.data.subjects.slice(-3); - expectedGoToIndex = 1; - expectedResultSize = 3; - const subjects = otherResponseClone.data.subjects; - const i = expectedGoToIndex - 1; - const expectedCurrent = subjects[i]; - const expectedNext = subjects[i + 1]; - - const expectedResourceInfoData: ResourceInfo = { - searchResults: otherResponseClone, - resources: { - current: new ResourceInfoResource(expectedCurrent, i), - next: new ResourceInfoResource(expectedNext, i + 1), - previous: undefined, - }, - }; - - (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); - - expect(component.goToIndex).withContext('should be 1').toBe(1); - expect(component.resultSize).withContext('should be 3').toBe(3); - - expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); - expect(component.resourceInfoData) - .withContext(`should be ${expectedResourceInfoData}`) - .toEqual(expectedResourceInfoData); - }); - - it('... should set `resourceInfoData` (only current, previous resource given)', () => { - const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); - otherResponseClone.data.subjects = otherResponseClone.data.subjects.slice(0, 3); - expectedGoToIndex = 3; - expectedResultSize = 3; - const subjects = otherResponseClone.data.subjects; - const i = expectedGoToIndex - 1; - const expectedCurrent = subjects[i]; - const expectedPrevious = subjects[i - 1]; - - const expectedResourceInfoData: ResourceInfo = { - searchResults: otherResponseClone, - resources: { - current: new ResourceInfoResource(expectedCurrent, i), - next: undefined, - previous: new ResourceInfoResource(expectedPrevious, i - 1), - }, - }; - - (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); - - expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); - expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); - - expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); - expect(component.resourceInfoData) - .withContext(`should be ${expectedResourceInfoData}`) - .toEqual(expectedResourceInfoData); - }); - - it('... should set `resourceInfoData` (only current resource given)', () => { - const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); - otherResponseClone.data.subjects = otherResponseClone.data.subjects.slice(2, 3); - expectedGoToIndex = 1; - expectedResultSize = 1; - const subjects = otherResponseClone.data.subjects; - const i = expectedGoToIndex - 1; - const expectedCurrent = subjects[i]; - - const expectedResourceInfoData: ResourceInfo = { - searchResults: otherResponseClone, - resources: { - current: new ResourceInfoResource(expectedCurrent, i), - next: undefined, - previous: undefined, - }, - }; - - (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); - - expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); - expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); - - expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); - expect(component.resourceInfoData) - .withContext(`should be ${expectedResourceInfoData}`) - .toEqual(expectedResourceInfoData); - }); - - it('... should set `resourceInfoData` (no previous, current resource given)', () => { - const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); - const sliceIndex = 2; - // Remove resource with resourceId from subjects (on array index position 2) - otherResponseClone.data.subjects = otherResponseClone.data.subjects - .slice(0, sliceIndex) - .concat( - otherResponseClone.data.subjects.slice(sliceIndex + 1, otherResponseClone.data.subjects.length) - ); + describe('... should set `resourceInfoData` if', () => { + it('... previous, current, next resource given', () => { + const expectedResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); + const subjects = expectedResponseClone.data.subjects; + const i = expectedGoToIndex - 1; + const expectedCurrent = subjects[i]; + const expectedPrevious = subjects[i - 1]; + const expectedNext = subjects[i + 1]; + + const expectedResourceInfoData: ResourceInfo = { + searchResults: expectedResponseClone, + resources: { + current: new ResourceInfoResource(expectedCurrent, i), + next: new ResourceInfoResource(expectedNext, i + 1), + previous: new ResourceInfoResource(expectedPrevious, i - 1), + }, + }; + + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should be ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); + }); - expectedGoToIndex = 0; - expectedResultSize = 4; - const subjects = otherResponseClone.data.subjects; - const i = expectedGoToIndex - 1; - const expectedNext = subjects[i + 1]; - - const expectedResourceInfoData: ResourceInfo = { - searchResults: otherResponseClone, - resources: { - current: undefined, - next: new ResourceInfoResource(expectedNext, i + 1), - previous: undefined, - }, - }; + it('... only current and next resource given', () => { + const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); + otherResponseClone.data.subjects = otherResponseClone.data.subjects.slice(-3); + expectedGoToIndex = 1; + expectedResultSize = 3; + const subjects = otherResponseClone.data.subjects; + const i = expectedGoToIndex - 1; + const expectedCurrent = subjects[i]; + const expectedNext = subjects[i + 1]; + + const expectedResourceInfoData: ResourceInfo = { + searchResults: otherResponseClone, + resources: { + current: new ResourceInfoResource(expectedCurrent, i), + next: new ResourceInfoResource(expectedNext, i + 1), + previous: undefined, + }, + }; + + (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); + + expect(component.goToIndex).withContext('should be 1').toBe(1); + expect(component.resultSize).withContext('should be 3').toBe(3); + + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should be ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); + }); - (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); + it('... only current and previous resource given', () => { + const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); + otherResponseClone.data.subjects = otherResponseClone.data.subjects.slice(0, 3); + expectedGoToIndex = 3; + expectedResultSize = 3; + const subjects = otherResponseClone.data.subjects; + const i = expectedGoToIndex - 1; + const expectedCurrent = subjects[i]; + const expectedPrevious = subjects[i - 1]; + + const expectedResourceInfoData: ResourceInfo = { + searchResults: otherResponseClone, + resources: { + current: new ResourceInfoResource(expectedCurrent, i), + next: undefined, + previous: new ResourceInfoResource(expectedPrevious, i - 1), + }, + }; + + (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); + + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); + expect(component.resultSize) + .withContext(`should be ${expectedResultSize}`) + .toBe(expectedResultSize); + + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should be ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); + }); - expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); - expect(component.resultSize).withContext(`should be ${expectedResultSize}`).toBe(expectedResultSize); + it('... only current resource given', () => { + const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); + otherResponseClone.data.subjects = otherResponseClone.data.subjects.slice(2, 3); + expectedGoToIndex = 1; + expectedResultSize = 1; + const subjects = otherResponseClone.data.subjects; + const i = expectedGoToIndex - 1; + const expectedCurrent = subjects[i]; + + const expectedResourceInfoData: ResourceInfo = { + searchResults: otherResponseClone, + resources: { + current: new ResourceInfoResource(expectedCurrent, i), + next: undefined, + previous: undefined, + }, + }; + + (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); + + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); + expect(component.resultSize) + .withContext(`should be ${expectedResultSize}`) + .toBe(expectedResultSize); + + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should be ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); + }); - expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); - expect(component.resourceInfoData) - .withContext(`should equal ${expectedResourceInfoData}`) - .toEqual(expectedResourceInfoData); + it('... no previous and current resource given', () => { + const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); + const sliceIndex = 2; + // Remove resource with resourceId from subjects (on array index position 2) + otherResponseClone.data.subjects = otherResponseClone.data.subjects + .slice(0, sliceIndex) + .concat( + otherResponseClone.data.subjects.slice( + sliceIndex + 1, + otherResponseClone.data.subjects.length + ) + ); + + expectedGoToIndex = 0; + expectedResultSize = 4; + const subjects = otherResponseClone.data.subjects; + const i = expectedGoToIndex - 1; + const expectedNext = subjects[i + 1]; + + const expectedResourceInfoData: ResourceInfo = { + searchResults: otherResponseClone, + resources: { + current: undefined, + next: new ResourceInfoResource(expectedNext, i + 1), + previous: undefined, + }, + }; + + (component as any)._updateResourceInfo(expectedResourceId, otherResponseClone); + + expect(component.goToIndex).withContext(`should be ${expectedGoToIndex}`).toBe(expectedGoToIndex); + expect(component.resultSize) + .withContext(`should be ${expectedResultSize}`) + .toBe(expectedResultSize); + + expect(component.resourceInfoData).withContext('should be truthy').toBeTruthy(); + expect(component.resourceInfoData) + .withContext(`should equal ${expectedResourceInfoData}`) + .toEqual(expectedResourceInfoData); + }); }); }); describe('#_buildForm', () => { - it('... should have been called with `goToIndex` and `resultSize`', () => { - expectedGoToIndex = 3; - expectedResultSize = 5; - expectSpyCall(buildFormSpy, 1, [expectedGoToIndex, expectedResultSize]); - }); + describe('... should have been called with', () => { + it('... `goToIndex` and `resultSize`', () => { + expectedGoToIndex = 3; + expectedResultSize = 5; + expectSpyCall(buildFormSpy, 1, [expectedGoToIndex, expectedResultSize]); + }); - it('... should have been called with updated values when changed', () => { - expectSpyCall(buildFormSpy, 1, [expectedGoToIndex, expectedResultSize]); + it('... updated values when changed', () => { + expectSpyCall(buildFormSpy, 1, [expectedGoToIndex, expectedResultSize]); - // Remove last two entries from searchResponse to get no next resource - const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); - otherResponseClone.data.subjects = otherResponseClone.data.subjects.slice(-3); + // Remove last two entries from searchResponse to get no next resource + const otherResponseClone = JSON.parse(JSON.stringify(expectedSearchResponseWithQuery)); + otherResponseClone.data.subjects = otherResponseClone.data.subjects.slice(-3); - dataStreamerSearchResponseWithQuerySpy.and.returnValue(observableOf(otherResponseClone)); + dataStreamerSearchResponseWithQuerySpy.and.returnValue(observableOf(otherResponseClone)); - component.getResourceInfoData(); + component.getResourceInfoData(); - // Apply changes - fixture.detectChanges(); + // Apply changes + fixture.detectChanges(); - expectedGoToIndex = 1; - expectedResultSize = 3; - expectSpyCall(buildFormSpy, 2, [expectedGoToIndex, expectedResultSize]); + expectedGoToIndex = 1; + expectedResultSize = 3; + expectSpyCall(buildFormSpy, 2, [expectedGoToIndex, expectedResultSize]); + }); }); - it('... should have initiated resourceInfoFormGroup', () => { - expect(component.resourceInfoFormGroup).toBeTruthy(); - }); + describe('... should have initiated resourceInfoFormGroup', () => { + it('... on init', () => { + expect(component.resourceInfoFormGroup).toBeTruthy(); + }); - it('... should have initiated resourceInfoFormGroup as untouched, pristine and valid', () => { - expect(component.resourceInfoFormGroup).toBeTruthy(); - expect(component.resourceInfoFormGroup.untouched).toBeTruthy(); - expect(component.resourceInfoFormGroup.pristine).toBeTruthy(); - expect(component.resourceInfoFormGroup.valid).toBeTruthy(); - }); + it('... as untouched, pristine and valid', () => { + expect(component.resourceInfoFormGroup).toBeTruthy(); + expect(component.resourceInfoFormGroup.untouched).toBeTruthy(); + expect(component.resourceInfoFormGroup.pristine).toBeTruthy(); + expect(component.resourceInfoFormGroup.valid).toBeTruthy(); + }); - it('... should have initiated resourceInfoFormGroup with correct resourceInfoIndex', () => { - expectedGoToIndex = 3; + it('... with correct resourceInfoIndex', () => { + expectedGoToIndex = 3; - expect(component.resourceInfoFormGroup).toBeTruthy(); - expect(component.resourceInfoFormGroup.controls['resourceInfoIndex']).toBeTruthy(); - expect(component.resourceInfoFormGroup.controls['resourceInfoIndex'].value) - .withContext(`should equal ${expectedGoToIndex}`) - .toEqual(expectedGoToIndex); - }); + expect(component.resourceInfoFormGroup).toBeTruthy(); + expect(component.resourceInfoFormGroup.controls['resourceInfoIndex']).toBeTruthy(); + expect(component.resourceInfoFormGroup.controls['resourceInfoIndex'].value) + .withContext(`should equal ${expectedGoToIndex}`) + .toEqual(expectedGoToIndex); + }); - it('... should have initiated resourceInfoFormGroup with empty index if none is given', () => { - const expectedEmptyIndex = ''; + it('... with empty index if none is given', () => { + const expectedEmptyIndex = ''; - // Apply changes - (component as any)._buildForm(undefined, expectedResultSize); - fixture.detectChanges(); + // Apply changes + (component as any)._buildForm(undefined, expectedResultSize); + fixture.detectChanges(); - expect(component.resourceInfoFormGroup).toBeTruthy(); - expect(component.resourceInfoFormGroup.controls['resourceInfoIndex']).toBeTruthy(); - expect(component.resourceInfoFormGroup.controls['resourceInfoIndex'].value) - .withContext(`should equal ${expectedEmptyIndex}`) - .toEqual(expectedEmptyIndex); + expect(component.resourceInfoFormGroup).toBeTruthy(); + expect(component.resourceInfoFormGroup.controls['resourceInfoIndex']).toBeTruthy(); + expect(component.resourceInfoFormGroup.controls['resourceInfoIndex'].value) + .withContext(`should equal ${expectedEmptyIndex}`) + .toEqual(expectedEmptyIndex); + }); }); describe('Validators', () => { @@ -934,16 +950,18 @@ describe('ResourceInfoComponent (DONE)', () => { navigationSpy = mockRouter.navigate as jasmine.Spy; }); - it('... should do nothing if no index is provided', () => { - component.navigateToResourceByIndex(undefined); + describe('... should not do anything if ', () => { + it('... no index is provided', () => { + component.navigateToResourceByIndex(undefined); - expectSpyCall(navigationSpy, 0); - }); + expectSpyCall(navigationSpy, 0); + }); - it('... should do nothing if index is less than 1', () => { - component.navigateToResourceByIndex(0); + it('... index is less than 1', () => { + component.navigateToResourceByIndex(0); - expectSpyCall(navigationSpy, 0); + expectSpyCall(navigationSpy, 0); + }); }); it('... should trigger `navigateToResource` and `router.navigate` (with id)', () => { @@ -1017,52 +1035,176 @@ describe('ResourceInfoComponent (DONE)', () => { navigationSpy = mockRouter.navigate as jasmine.Spy; component.resourceInfoData = new ResourceInfo(); - component.resourceInfoData.searchResults = new SearchResponseWithQuery(mockSearchResponseJson, ''); }); - it('... should trigger `router.navigate` with query params if searchResults are given', () => { - const expectedRoute = ['/data/search']; - const expectedParams = { queryParams: { query: component.resourceInfoData.searchResults.query } }; - + it('... should trigger `router.navigate`', () => { component.navigateToSearchPanel(); - expect(component.resourceInfoData.searchResults).toBeTruthy(); - expectSpyCall(navigationSpy, 1, [expectedRoute, expectedParams]); + expectSpyCall(navigationSpy, 1); }); - it('... should trigger `router.navigate` without query params if no searchResults are given', () => { - const expectedRoute = ['/data/search']; - const expectedParams = { queryParams: { query: '' } }; + describe('... should navigate to fulltext search route', () => { + describe('... with empty string as queryParams query value if', () => { + it('... searchResults are undefined', () => { + const expectedRoute = ['/data/search']; + const expectedNavigationQuery = ''; + const expectedParams = { queryParams: { query: expectedNavigationQuery } }; - component.resourceInfoData.searchResults = undefined; + component.resourceInfoData.searchResults = undefined; + component.navigateToSearchPanel(); - component.navigateToSearchPanel(); + expect(component.resourceInfoData.searchResults).toBeUndefined(); + expectSpyCall(navigationSpy, 1, [expectedRoute, expectedParams]); + }); + + it('... searchResults are null', () => { + const expectedRoute = ['/data/search']; + const expectedNavigationQuery = ''; + const expectedParams = { queryParams: { query: expectedNavigationQuery } }; + + component.resourceInfoData.searchResults = null; + component.navigateToSearchPanel(); - expect(component.resourceInfoData.searchResults).toBeUndefined(); - expectSpyCall(navigationSpy, 1, [expectedRoute, expectedParams]); + expect(component.resourceInfoData.searchResults).toBeNull(); + expectSpyCall(navigationSpy, 1, [expectedRoute, expectedParams]); + }); + + it('... searchResults are given, but `searchResults.query` is an empty string', () => { + const actualQuery = ''; + const expectedRoute = ['/data/search']; + const expectedNavigationQuery = ''; + const expectedParams = { queryParams: { query: expectedNavigationQuery } }; + + component.resourceInfoData.searchResults = new SearchResponseWithQuery( + mockSearchResponseJson, + actualQuery + ); + component.navigateToSearchPanel(); + + expect(component.resourceInfoData.searchResults).toBeTruthy(); + expect(component.resourceInfoData.searchResults.query) + .withContext('should be empty string (falsy)') + .toBeFalsy(); + expectSpyCall(navigationSpy, 1, [expectedRoute, expectedParams]); + }); + }); + + describe('... with searchResults.query (string) as queryParams query value if', () => { + it('... searchResults have an empty SearchResponse', () => { + const actualQuery = 'Test'; + const expectedRoute = ['/data/search']; + const expectedNavigationQuery = 'Test'; + const expectedParams = { queryParams: { query: expectedNavigationQuery } }; + + component.resourceInfoData.searchResults = new SearchResponseWithQuery( + new SearchResponseJson(), + actualQuery + ); + component.navigateToSearchPanel(); + + expect(component.resourceInfoData.searchResults).toBeTruthy(); + expect(component.resourceInfoData.searchResults.query).toBeTruthy(); + expectSpyCall(navigationSpy, 1, [expectedRoute, expectedParams]); + }); + + it('... searchResults are given and searchResults.query is typeof string', () => { + const actualQuery = 'TestString'; + const expectedRoute = ['/data/search']; + const expectedNavigationQuery = 'TestString'; + const expectedParams = { queryParams: { query: expectedNavigationQuery } }; + + component.resourceInfoData.searchResults = new SearchResponseWithQuery( + mockSearchResponseJson, + actualQuery + ); + component.navigateToSearchPanel(); + + expect(component.resourceInfoData.searchResults).toBeTruthy(); + expect(component.resourceInfoData.searchResults.query).toBeTruthy(); + expect(typeof component.resourceInfoData.searchResults.query) + .withContext(`should be string`) + .toBe('string'); + expectSpyCall(navigationSpy, 1, [expectedRoute, expectedParams]); + }); + }); }); - it('... should trigger on click (no query)', fakeAsync(() => { - const buttonDe = getAndExpectDebugElementByCss(compDe, 'div.card-header div button', 1, 1); + describe('... should navigate to extended search route', () => { + describe('... with searchResults.query (object) as queryParams query value if', () => { + it('... searchResults are given and searchResults.query is typeof object', () => { + const actualQuery: ExtendedSearchParams = { + filterByRestype: '43', + propertyId: ['1'], + compop: ['EXISTS'], + searchval: [''], + }; + const expectedRoute = ['/data/search/', 'extended']; + const expectedNavigationQuery: ExtendedSearchParams = { + filterByRestype: '43', + propertyId: ['1'], + compop: ['EXISTS'], + searchval: [''], + }; + const expectedParams = { queryParams: { query: expectedNavigationQuery } }; + + component.resourceInfoData.searchResults = new SearchResponseWithQuery( + mockSearchResponseJson, + actualQuery + ); + component.navigateToSearchPanel(); + + expect(component.resourceInfoData.searchResults).toBeTruthy(); + expect(component.resourceInfoData.searchResults.query).toBeTruthy(); + expect(typeof component.resourceInfoData.searchResults.query) + .withContext(`should be object`) + .toBe('object'); + expectSpyCall(navigationSpy, 1, [expectedRoute, expectedParams]); + }); + }); + }); - component.resourceInfoData.searchResults.query = ''; + describe('... should trigger on click', () => { + it('... without query', fakeAsync(() => { + const buttonDe = getAndExpectDebugElementByCss(compDe, 'div.card-header div button', 1, 1); - // Trigger click with click helper & wait for changes - clickAndAwaitChanges(buttonDe[0], fixture); + component.resourceInfoData.searchResults = new SearchResponseWithQuery(mockSearchResponseJson, ''); - expectSpyCall(navigateToSearchPanelSpy, 1, undefined); - })); + // Trigger click with click helper & wait for changes + clickAndAwaitChanges(buttonDe[0], fixture); - it('... should trigger on click (with query)', fakeAsync(() => { - const buttonDe = getAndExpectDebugElementByCss(compDe, 'div.card-header div button', 1, 1); + expectSpyCall(navigateToSearchPanelSpy, 1); + })); - component.resourceInfoData.searchResults.query = 'Test'; + it('with string query', fakeAsync(() => { + const buttonDe = getAndExpectDebugElementByCss(compDe, 'div.card-header div button', 1, 1); - // Trigger click with click helper & wait for changes - clickAndAwaitChanges(buttonDe[0], fixture); + component.resourceInfoData.searchResults = new SearchResponseWithQuery( + mockSearchResponseJson, + 'Test' + ); - expectSpyCall(navigateToSearchPanelSpy, 1); - })); + // Trigger click with click helper & wait for changes + clickAndAwaitChanges(buttonDe[0], fixture); + + expectSpyCall(navigateToSearchPanelSpy, 1); + })); + + it('with object query', fakeAsync(() => { + const buttonDe = getAndExpectDebugElementByCss(compDe, 'div.card-header div button', 1, 1); + + component.resourceInfoData.searchResults = new SearchResponseWithQuery(mockSearchResponseJson, { + filterByRestype: '43', + propertyId: ['1'], + compop: ['EXISTS'], + searchval: [''], + }); + + // Trigger click with click helper & wait for changes + clickAndAwaitChanges(buttonDe[0], fixture); + + expectSpyCall(navigateToSearchPanelSpy, 1); + })); + }); }); describe('VIEW', () => { From cc80b1a134de811c7122c74771d967e453d170db Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 02:27:14 +0100 Subject: [PATCH 070/148] test(search): fix tests for ResourceDetailHtml components after changes --- .../services/gnd-service/gnd.service.spec.ts | 257 ++++++++------- .../core/services/gnd-service/gnd.service.ts | 2 +- .../props/props.component.html | 10 +- ...urce-detail-html-content.component.spec.ts | 307 +++++++++++++----- .../resource-detail-html-content.component.ts | 2 +- .../resource-detail-html.component.spec.ts | 232 +++++++++---- .../resource-detail-html.component.ts | 2 +- 7 files changed, 546 insertions(+), 266 deletions(-) diff --git a/src/app/core/services/gnd-service/gnd.service.spec.ts b/src/app/core/services/gnd-service/gnd.service.spec.ts index d192af9280..f76e14682d 100644 --- a/src/app/core/services/gnd-service/gnd.service.spec.ts +++ b/src/app/core/services/gnd-service/gnd.service.spec.ts @@ -1,7 +1,5 @@ import { TestBed } from '@angular/core/testing'; -import Spy = jasmine.Spy; - import { cleanStylesFromDOM } from '@testing/clean-up-helper'; import { expectSpyCall } from '@testing/expect-helper'; import { mockConsole, mockLocalStorage, mockSessionStorage, mockWindow } from '@testing/mock-helper'; @@ -10,6 +8,7 @@ import { AppConfig } from '@awg-app/app.config'; import { StorageType } from '@awg-core/services/storage-service'; import { GndEvent, GndEventType, GndService } from './gnd.service'; +import Spy = jasmine.Spy; describe('GndService (DONE)', () => { let gndService: GndService; @@ -92,11 +91,11 @@ describe('GndService (DONE)', () => { it('... should use mock console', () => { console.warn('Test'); - expect(mockConsole.get(0)).toBe('Test'); + expect(mockConsole.get(0)).withContext(`should be 'Test'`).toBe('Test'); }); it('... should clear mock console after each run', () => { - expect(mockConsole.get(0)).toBeUndefined('should be undefined'); + expect(mockConsole.get(0)).withContext('should be undefined').toBeUndefined(); }); it('... should use mock window', () => { @@ -106,21 +105,23 @@ describe('GndService (DONE)', () => { window.parent.window.postMessage('testMessage', 'testTarget'); expectSpyCall(postMessageSpy, 1, 'testMessage'); - expect(mockWindow.get(0)).toEqual(['testMessage', 'testTarget']); + expect(mockWindow.get(0)) + .withContext(`should equal ['testMessage', 'testTarget']`) + .toEqual(['testMessage', 'testTarget']); }); it('... should clear mock window after each run', () => { - expect(mockWindow.get(0)).toBeUndefined('should be undefined'); + expect(mockWindow.get(0)).withContext('should be undefined').toBeUndefined(); }); it('... should use mock storage', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).toEqual('testvalue', "should be 'testvalue'"); + expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); expectedStorage.removeItem('testkey'); - expect(mockStorage.getItem('testkey')).toBeNull('should be null'); + expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); }); it('... should use correct mock storage', () => { @@ -129,16 +130,16 @@ describe('GndService (DONE)', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).toEqual('testvalue', "should be 'testvalue'"); - expect(otherMockStorage.getItem('testkey')).toBeNull('should be null'); + expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); + expect(otherMockStorage.getItem('testkey')).withContext('should be null').toBeNull(); mockStorage.clear(); otherMockStorage.clear(); expectedOtherStorage.setItem('testkey', 'testvalue'); - expect(otherMockStorage.getItem('testkey')).toEqual('testvalue', "should be 'testvalue'"); - expect(mockStorage.getItem('testkey')).toBeNull('should be null'); + expect(otherMockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); + expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); otherMockStorage.clear(); }); @@ -146,112 +147,121 @@ describe('GndService (DONE)', () => { it('... should set and get an item', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).toEqual('testvalue', "should be 'testvalue'"); + expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); }); it('... should remove an item', () => { expectedStorage.setItem('testkey', 'testvalue'); - expect(mockStorage.getItem('testkey')).toEqual('testvalue', "should be 'testvalue'"); + expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); expectedStorage.removeItem('testkey'); - expect(mockStorage.getItem('testkey')).toBeNull('should be null'); + expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); }); it('... should remove the correct item', () => { expectedStorage.setItem('testkey', 'testvalue'); expectedStorage.setItem('testkey2', 'testvalue2'); - expect(mockStorage.getItem('testkey')).toEqual('testvalue', "should be 'testvalue'"); - expect(mockStorage.getItem('testkey2')).toEqual('testvalue2', "should be 'testvalue2'"); + expect(mockStorage.getItem('testkey')).withContext(`should equal 'testvalue'`).toEqual('testvalue'); + expect(mockStorage.getItem('testkey2')).withContext(`should equal 'testvalue2'`).toEqual('testvalue2'); expectedStorage.removeItem('testkey'); - expect(mockStorage.getItem('testkey')).toBeNull('should be null'); - expect(mockStorage.getItem('testkey2')).toEqual('testvalue2', "should be 'testvalue2'"); + expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); + expect(mockStorage.getItem('testkey2')).withContext(`should equal 'testvalue2'`).toEqual('testvalue2'); expectedStorage.removeItem('testkey2'); - expect(mockStorage.getItem('testkey')).toBeNull('should be null'); - expect(mockStorage.getItem('testkey2')).toBeNull('should be null'); + expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); + expect(mockStorage.getItem('testkey2')).withContext('should be null').toBeNull(); }); it('... should clear mock storage after each run', () => { - expect(mockStorage.getItem('testkey')).toBeNull('should be undefined'); + expect(mockStorage.getItem('testkey')).withContext('should be null').toBeNull(); }); }); it('should have GND_KEY', () => { expect(gndService.GND_KEY).toBeTruthy(); - expect(gndService.GND_KEY).toEqual(expectedGndKey); + expect(gndService.GND_KEY).withContext(`should equal ${expectedGndKey}`).toEqual(expectedGndKey); }); it('should have DNB_REG', () => { expect(gndService.DNB_REG).toBeTruthy(); - expect(gndService.DNB_REG).toEqual(expectedDnbReg); + expect(gndService.DNB_REG).withContext(`should equal ${expectedDnbReg}`).toEqual(expectedDnbReg); }); it('should not have linkRegArr before exposeGnd call', () => { - expect(gndService.linkRegArr).toBeUndefined(); + expect(gndService.linkRegArr).withContext('should be undefined').toBeUndefined(); gndService.exposeGnd(expectedSetEvent); - expect(gndService.linkRegArr).toBeDefined(); + expect(gndService.linkRegArr).withContext('should be defined').toBeDefined(); }); describe('#exposeGnd', () => { - describe('... should do nothing if:', () => { - it('- gndEvent is undefined', () => { - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + describe('... should not do anything if', () => { + it('... gndEvent is undefined', () => { + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); gndService.exposeGnd(undefined); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); }); - it('- gndEvent is null', () => { - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + it('... gndEvent is null', () => { + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); gndService.exposeGnd(null); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); }); - it('- gndEvent has undefined values', () => { - const expectedDefaultMessage = 'Got an uncatched GND event'; + it('... gndEvent has undefined type', () => { + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + gndService.exposeGnd(new GndEvent(undefined, '123')); - gndService.exposeGnd(new GndEvent(undefined, undefined)); + expectSpyCall(setGndToSessionStorageSpy, 0); + expectSpyCall(removeGndFromSessionStorageSpy, 0); + + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + }); + + it('... gndEvent has type null', () => { + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + + gndService.exposeGnd(new GndEvent(null, '123')); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expectSpyCall(consoleSpy, 1, expectedDefaultMessage); - expect(mockConsole.get(0)).toBe(expectedDefaultMessage); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); }); - it('- gndEvent has null values', () => { + it('... gndEvent has GET type', () => { const expectedDefaultMessage = 'Got an uncatched GND event'; - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); - gndService.exposeGnd(new GndEvent(null, null)); + gndService.exposeGnd(new GndEvent(GndEventType.GET, '123')); expectSpyCall(setGndToSessionStorageSpy, 0); expectSpyCall(removeGndFromSessionStorageSpy, 0); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); expectSpyCall(consoleSpy, 1, expectedDefaultMessage); - expect(mockConsole.get(0)).toBe(expectedDefaultMessage); + expect(mockConsole.get(0)) + .withContext(`should be ${expectedDefaultMessage}`) + .toBe(expectedDefaultMessage); }); }); @@ -264,13 +274,15 @@ describe('GndService (DONE)', () => { }); it('... should set key/value pair to storage if given gndEvent type is `set`', () => { - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); gndService.exposeGnd(expectedSetEvent); expectSpyCall(setGndToSessionStorageSpy, 1); - expect(mockStorage.getItem(expectedGndKey)).toEqual(expectedItem, `should be ${expectedItem}`); + expect(mockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); }); it('... should expose gnd if given gndEvent type is `set`', () => { @@ -292,10 +304,9 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, expectedItem); expectSpyCall(postMessageSpy, 1, [{ gnd: expectedItem }, target]); - expect(mockWindow.get(0)).toEqual( - [{ gnd: expectedItem }, target], - `should be [{ gnd: ${expectedItem}, ${target}]]` - ); + expect(mockWindow.get(0)) + .withContext(`should equal [{ gnd: ${expectedItem}, ${target}]]`) + .toEqual([{ gnd: expectedItem }, target]); }); it('... should expose gnd to parent window if target meets parent location (localhost)', () => { @@ -311,10 +322,9 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, expectedItem); expectSpyCall(postMessageSpy, 1, [{ gnd: expectedItem }, target]); - expect(mockWindow.get(0)).toEqual( - [{ gnd: expectedItem }, target], - `should be [{ gnd: ${expectedItem}, ${target}]]` - ); + expect(mockWindow.get(0)) + .withContext(`should equal [{ gnd: ${expectedItem}, ${target}]]`) + .toEqual([{ gnd: expectedItem }, target]); }); it('... should not expose gnd to window if target does not meet parent location', () => { @@ -330,48 +340,53 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, expectedItem); expectSpyCall(postMessageSpy, 0); - expect(mockWindow.get(0)).toBeUndefined('should be undefined'); + expect(mockWindow.get(0)).withContext('should be undefined').toBeUndefined(); }); it('... should set an item to the correct storage if given gndEvent value has gnd link', () => { const otherMockStorage = mockLocalStorage; - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expect(otherMockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(otherMockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); gndService.exposeGnd(expectedSetEvent); - expect(mockStorage.getItem(expectedGndKey)).toEqual(expectedItem, `should be ${expectedItem}`); - expect(otherMockStorage.getItem(expectedGndKey)).not.toEqual( - expectedItem, - `should not be ${otherItem}` - ); - expect(otherMockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); + expect(otherMockStorage.getItem(expectedGndKey)) + .withContext(`should not equal ${otherItem}`) + .not.toEqual(expectedItem); + expect(otherMockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); otherMockStorage.clear(); }); it('... should overwrite an existing gnd key if gndEvent value has gnd link', () => { - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); gndService.exposeGnd(expectedSetEvent); - expect(mockStorage.getItem(expectedGndKey)).toEqual(expectedItem, `should be ${expectedItem}`); + expect(mockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); gndService.exposeGnd(otherSetEvent); - expect(mockStorage.getItem(expectedGndKey)).not.toEqual(expectedItem, `should not be ${expectedItem}`); - expect(mockStorage.getItem(expectedGndKey)).toEqual(otherItem, `should be ${otherItem}`); + expect(mockStorage.getItem(expectedGndKey)) + .withContext(`should not equal ${expectedItem}`) + .not.toEqual(expectedItem); + expect(mockStorage.getItem(expectedGndKey)).withContext(`should equal ${otherItem}`).toEqual(otherItem); }); it('... should return null if value has no gnd link', () => { - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); gndService.exposeGnd(noLinkGndSetEvent); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); }); it('... should call helper function with input value to check if value has gnd link', () => { - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callThrough(); gndService.exposeGnd(expectedSetEvent); @@ -381,8 +396,8 @@ describe('GndService (DONE)', () => { describe('#_valueHasGnd', () => { it('... should execute regex check and populate linkRegArr if value has gnd link', () => { - expect(gndService.linkRegArr).toBeUndefined(); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(gndService.linkRegArr).withContext('should be undefined').toBeUndefined(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callFake(checkValue => { gndService.linkRegArr = gndService.DNB_REG.exec(checkValue); @@ -392,13 +407,13 @@ describe('GndService (DONE)', () => { expectSpyCall(valueHasGndSpy, 1, expectedGndEventValue); expect(expectedGndEventValue).toMatch(expectedDnbReg); - expect(gndService.linkRegArr).toBeDefined(); + expect(gndService.linkRegArr).withContext('should be defined').toBeDefined(); expect(gndService.linkRegArr).toEqual(expectedDnbReg.exec(expectedGndEventValue)); }); it('... should execute regex check and set linkRegArr = null if value has no gnd link', () => { - expect(gndService.linkRegArr).toBeUndefined(); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(gndService.linkRegArr).withContext('should be undefined').toBeUndefined(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callThrough(); gndService.exposeGnd(noLinkGndSetEvent); @@ -406,30 +421,32 @@ describe('GndService (DONE)', () => { expectSpyCall(valueHasGndSpy, 1, noLinkGndEventValue); expect(noLinkGndEventValue).not.toMatch(expectedDnbReg); - expect(gndService.linkRegArr).toBeNull(); + expect(gndService.linkRegArr).withContext('should be null').toBeNull(); }); it('... should return true (and set item) if value has gnd link', () => { - expect(gndService.linkRegArr).toBeUndefined(); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(gndService.linkRegArr).withContext('should be undefined').toBeUndefined(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callThrough(); gndService.exposeGnd(expectedSetEvent); expectSpyCall(valueHasGndSpy, 1, expectedGndEventValue); - expect(mockStorage.getItem(expectedGndKey)).toEqual(expectedItem, `should be ${expectedItem}`); + expect(mockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); }); it('... should return false (and set no item) if value has no gnd link', () => { - expect(gndService.linkRegArr).toBeUndefined(); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(gndService.linkRegArr).withContext('should be undefined').toBeUndefined(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); const valueHasGndSpy = spyOn(gndService, '_valueHasGnd').and.callThrough(); gndService.exposeGnd(noLinkGndSetEvent); expectSpyCall(valueHasGndSpy, 1, noLinkGndEventValue); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); }); }); }); @@ -443,14 +460,16 @@ describe('GndService (DONE)', () => { }); it('... should remove an item by key from the storage if given gndEvent type is `remove`', () => { - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); expectedStorage.setItem(expectedGndKey, expectedItem); - expect(mockStorage.getItem(expectedGndKey)).toEqual(expectedItem, `should be ${expectedItem}`); + expect(mockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); }); it('... should expose null value if given gndEvent type is `remove`', () => { @@ -472,10 +491,9 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, null); expectSpyCall(postMessageSpy, 1, [{ gnd: null }, target]); - expect(mockWindow.get(0)).toEqual( - [{ gnd: null }, target], - `should be [{ gnd: ${expectedItem}, ${target}]]` - ); + expect(mockWindow.get(0)) + .withContext(`should equal [{ gnd: ${expectedItem}, ${target}]]`) + .toEqual([{ gnd: null }, target]); }); it('... should expose null value to parent window if target meets parent location (localhost)', () => { @@ -491,29 +509,34 @@ describe('GndService (DONE)', () => { expectSpyCall(exposeGndMessageToParentSpy, 1, null); expectSpyCall(postMessageSpy, 1, [{ gnd: null }, target]); - expect(mockWindow.get(0)).toEqual( - [{ gnd: null }, target], - `should be [{ gnd: ${expectedItem}, ${target}]]` - ); + expect(mockWindow.get(0)) + .withContext(`should equal [{ gnd: ${expectedItem}, ${target}]]`) + .toEqual([{ gnd: null }, target]); }); it('... should remove an item from the correct storage', () => { const expectedOtherStorage = expectedLocalStorage; const otherMockStorage = mockLocalStorage; - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expect(otherMockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(otherMockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); expectedStorage.setItem(expectedGndKey, expectedItem); expectedOtherStorage.setItem(expectedGndKey, otherItem); - expect(mockStorage.getItem(expectedGndKey)).toEqual(expectedItem, `should be ${expectedItem}`); - expect(otherMockStorage.getItem(expectedGndKey)).toEqual(otherItem, `should be ${otherItem}`); + expect(mockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); + expect(otherMockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${otherItem}`) + .toEqual(otherItem); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expect(otherMockStorage.getItem(expectedGndKey)).toEqual(otherItem, `should be ${otherItem}`); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(otherMockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${otherItem}`) + .toEqual(otherItem); otherMockStorage.clear(); }); @@ -521,45 +544,51 @@ describe('GndService (DONE)', () => { it('... should remove the correct item from the storage', () => { const otherKey = 'otherKey'; - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expect(mockStorage.getItem(otherKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(otherKey)).withContext('should be null').toBeNull(); expectedStorage.setItem(expectedGndKey, expectedItem); expectedStorage.setItem(otherKey, expectedItem); - expect(mockStorage.getItem(expectedGndKey)).toEqual(expectedItem, `should be ${expectedItem}`); - expect(mockStorage.getItem(otherKey)).toEqual(expectedItem, `should be ${expectedItem}`); + expect(mockStorage.getItem(expectedGndKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); + expect(mockStorage.getItem(otherKey)).withContext(`should equal ${expectedItem}`).toEqual(expectedItem); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expect(mockStorage.getItem(otherKey)).toEqual(expectedItem, `should be ${expectedItem}`); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(otherKey)).withContext(`should equal ${expectedItem}`).toEqual(expectedItem); }); describe('... should do nothing if:', () => { it('- storage has not the gnd key', () => { - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); }); it('- storage has other key but not the gnd key', () => { const otherKey = 'otherKey'; - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expect(mockStorage.getItem(otherKey)).toBeNull(); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(otherKey)).withContext('should be null').toBeNull(); expectedStorage.setItem(otherKey, expectedItem); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expect(mockStorage.getItem(otherKey)).toEqual(expectedItem, `should be ${expectedItem}`); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(otherKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); gndService.exposeGnd(expectedRemoveEvent); - expect(mockStorage.getItem(expectedGndKey)).toBeNull(); - expect(mockStorage.getItem(otherKey)).toEqual(expectedItem, `should be ${expectedItem}`); + expect(mockStorage.getItem(expectedGndKey)).withContext('should be null').toBeNull(); + expect(mockStorage.getItem(otherKey)) + .withContext(`should equal ${expectedItem}`) + .toEqual(expectedItem); }); }); }); diff --git a/src/app/core/services/gnd-service/gnd.service.ts b/src/app/core/services/gnd-service/gnd.service.ts index a9d622ba48..290c648fec 100644 --- a/src/app/core/services/gnd-service/gnd.service.ts +++ b/src/app/core/services/gnd-service/gnd.service.ts @@ -98,7 +98,7 @@ export class GndService extends StorageService { * @returns {void} It exposes or removes the event to/from the storage. */ exposeGnd(gndEvent: GndEvent) { - if (!gndEvent) { + if (!gndEvent || !gndEvent.type) { return; } switch (gndEvent.type) { diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.html b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.html index 2e7d081ced..84eb736663 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.html +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.html @@ -2,16 +2,16 @@

Objektdaten

    -
  • +

  • -
  • +
  • - - {{ prop?.label }} + + {{ prop.label }} -
      +
      • diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.spec.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.spec.ts index 4cdbe02b4d..9c54c8a06b 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.spec.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.spec.ts @@ -12,7 +12,7 @@ import { } from '@testing/expect-helper'; import { mockContextJson } from '@testing/mock-data'; -import { GndEvent } from '@awg-core/services/gnd-service'; +import { GndEvent, GndEventType } from '@awg-core/services/gnd-service'; import { ContextJson } from '@awg-shared/api-objects'; import { ResourceDetailContent, @@ -53,8 +53,10 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { let fixture: ComponentFixture; let compDe: DebugElement; + let exposeGndSpy: Spy; let navigateToResourceSpy: Spy; - let emitSpy: Spy; + let gndRequestEmitSpy: Spy; + let resourceRequestEmitSpy: Spy; // Json object let jsonConvert: JsonConvert; @@ -99,7 +101,9 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { // `.and.callThrough` will track the spy down the nested describes, see // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E navigateToResourceSpy = spyOn(component, 'navigateToResource').and.callThrough(); - emitSpy = spyOn(component.resourceRequest, 'emit').and.callThrough(); + exposeGndSpy = spyOn(component, 'exposeGnd').and.callThrough(); + gndRequestEmitSpy = spyOn(component.gndRequest, 'emit').and.callThrough(); + resourceRequestEmitSpy = spyOn(component.resourceRequest, 'emit').and.callThrough(); }); it('should create', () => { @@ -108,13 +112,20 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { describe('BEFORE initial data binding', () => { it('should not have `content` inputs', () => { - expect(component.content).toBeUndefined('should be undefined'); + expect(component.content).withContext('should be undefined').toBeUndefined(); + }); + + describe('#exposeGnd', () => { + it('... should not have been called', () => { + expect(exposeGndSpy).not.toHaveBeenCalled(); + expect(gndRequestEmitSpy).not.toHaveBeenCalled(); + }); }); describe('#navigateToResource', () => { it('... should not have been called', () => { expect(navigateToResourceSpy).not.toHaveBeenCalled(); - expect(emitSpy).not.toHaveBeenCalled(); + expect(resourceRequestEmitSpy).not.toHaveBeenCalled(); }); }); @@ -157,8 +168,10 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { }); it('should have `content` inputs', () => { - expect(component.content).toBeDefined('should be defined'); - expect(component.content).toBe(expectedContent, `should be expectedIncoming: ${expectedContent}`); + expect(component.content).withContext('should be defined').toBeDefined(); + expect(component.content) + .withContext(`should be expectedIncoming: ${expectedContent}`) + .toBe(expectedContent); }); describe('VIEW', () => { @@ -174,8 +187,8 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { ResourceDetailHtmlContentPropsStubComponent ) as ResourceDetailHtmlContentPropsStubComponent; - expect(propsCmp.props).toBeDefined(); - expect(propsCmp.props).toBe(expectedContent.props); + expect(propsCmp.props).withContext('should be defined').toBeDefined(); + expect(propsCmp.props).withContext(`should be ${expectedContent.props}`).toBe(expectedContent.props); }); it('... should pass down `content.images` to ResourceDetailHtmlContentImageobjectsComponent', () => { @@ -190,8 +203,10 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { ResourceDetailHtmlContentImageobjectsStubComponent ) as ResourceDetailHtmlContentImageobjectsStubComponent; - expect(imagesCmp.images).toBeDefined(); - expect(imagesCmp.images).toBe(expectedContent.images); + expect(imagesCmp.images).withContext('should be defined').toBeDefined(); + expect(imagesCmp.images) + .withContext(`should be ${expectedContent.images}`) + .toBe(expectedContent.images); }); it('... should pass down `content.incoming` to ResourceDetailHtmlContentLinkedobjectsComponent', () => { @@ -206,122 +221,242 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { ResourceDetailHtmlContentLinkedobjectsStubComponent ) as ResourceDetailHtmlContentLinkedobjectsStubComponent; - expect(incomingCmp.incomingGroups).toBeDefined(); - expect(incomingCmp.incomingGroups).toBe(expectedContent.incoming); + expect(incomingCmp.incomingGroups).withContext('should be defined').toBeDefined(); + expect(incomingCmp.incomingGroups) + .withContext(`should be ${expectedContent.incoming}`) + .toBe(expectedContent.incoming); }); }); - describe('#navigateToResource', () => { - it('... should trigger on event from ResourceDetailHtmlContentPropsComponent', fakeAsync(() => { - const propsDes = getAndExpectDebugElementByDirective( + describe('#exposeGnd', () => { + let htmlContentDes; + let htmlContentCmp; + let gndEvent: GndEvent; + + beforeEach(() => { + htmlContentDes = getAndExpectDebugElementByDirective( compDe, ResourceDetailHtmlContentPropsStubComponent, 1, 1 ); - const propsCmp = propsDes[0].injector.get( + htmlContentCmp = htmlContentDes[0].injector.get( ResourceDetailHtmlContentPropsStubComponent ) as ResourceDetailHtmlContentPropsStubComponent; + }); - let id; + describe('... should trigger on event from ResourceDetailHtmlContentComponent if', () => { + it('... gndEvent is undefined', fakeAsync(() => { + // Undefined + gndEvent = undefined; + htmlContentCmp.gndRequest.emit(gndEvent); - // Undefined - id = undefined; - propsCmp.resourceRequest.emit(id); + expectSpyCall(exposeGndSpy, 1, gndEvent); + })); - expectSpyCall(navigateToResourceSpy, 1, id); + it('... gndEvent is SET', fakeAsync(() => { + // SET + gndEvent = new GndEvent(GndEventType.SET, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); - // Number - id = 28; - propsCmp.resourceRequest.emit(id); + expectSpyCall(exposeGndSpy, 1, gndEvent); + })); - expectSpyCall(navigateToResourceSpy, 2, id); + it('... gndEvent is GET', fakeAsync(() => { + // GET + gndEvent = new GndEvent(GndEventType.GET, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); - // String - id = '330'; - propsCmp.resourceRequest.emit(id); + expectSpyCall(exposeGndSpy, 1, gndEvent); + })); - expectSpyCall(navigateToResourceSpy, 3, id); - })); + it('... gndEvent is REMOVE', fakeAsync(() => { + // REMOVE + gndEvent = new GndEvent(GndEventType.REMOVE, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); - it('... should trigger on event from ResourceDetailHtmlContentLinkedobjectsComponent', fakeAsync(() => { - const propsDes = getAndExpectDebugElementByDirective( + expectSpyCall(exposeGndSpy, 1, gndEvent); + })); + }); + + describe('... should not emit anything if', () => { + it('... gndEvent is undefined', fakeAsync(() => { + // GndEvent is undefined + gndEvent = undefined; + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, undefined); + expectSpyCall(gndRequestEmitSpy, 0); + })); + + it('... gndEvent is null', fakeAsync(() => { + // GndEvent is undefined + gndEvent = null; + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, null); + expectSpyCall(gndRequestEmitSpy, 0); + })); + + it('... gndEvent type is undefined', fakeAsync(() => { + // GndEvent is undefined + gndEvent = new GndEvent(undefined, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, null); + expectSpyCall(gndRequestEmitSpy, 0); + })); + }); + + describe('... should emit provided gndEvent on click with', () => { + it('... SET event', fakeAsync(() => { + // SET + gndEvent = new GndEvent(GndEventType.SET, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, gndEvent); + expectSpyCall(gndRequestEmitSpy, 1, gndEvent); + })); + + it('... GET event', fakeAsync(() => { + // GET + gndEvent = new GndEvent(GndEventType.GET, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, gndEvent); + expectSpyCall(gndRequestEmitSpy, 1, gndEvent); + })); + + it('... REMOVE event', fakeAsync(() => { + // REMOVE + gndEvent = new GndEvent(GndEventType.REMOVE, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, gndEvent); + expectSpyCall(gndRequestEmitSpy, 1, gndEvent); + })); + }); + }); + + describe('#navigateToResource', () => { + let propsDes; + let propsCmp; + let linkObjDes; + let linkObjCmp; + let id; + + beforeEach(() => { + propsDes = getAndExpectDebugElementByDirective( + compDe, + ResourceDetailHtmlContentPropsStubComponent, + 1, + 1 + ); + propsCmp = propsDes[0].injector.get( + ResourceDetailHtmlContentPropsStubComponent + ) as ResourceDetailHtmlContentPropsStubComponent; + + linkObjDes = getAndExpectDebugElementByDirective( compDe, ResourceDetailHtmlContentLinkedobjectsStubComponent, 1, 1 ); - const propsCmp = propsDes[0].injector.get( + linkObjCmp = linkObjDes[0].injector.get( ResourceDetailHtmlContentLinkedobjectsStubComponent ) as ResourceDetailHtmlContentLinkedobjectsStubComponent; + }); - let id; + describe('... should trigger on event', () => { + describe('... from ResourceDetailHtmlContentPropsComponent if', () => { + it('... id is undefined', fakeAsync(() => { + id = undefined; + propsCmp.resourceRequest.emit(id); - // Undefined - id = undefined; - propsCmp.resourceRequest.emit(id); + expectSpyCall(navigateToResourceSpy, 1, id); + })); - expectSpyCall(navigateToResourceSpy, 1, id); + it('... id is a number', fakeAsync(() => { + id = 28; + propsCmp.resourceRequest.emit(id); - // Number - id = 28; - propsCmp.resourceRequest.emit(id); + expectSpyCall(navigateToResourceSpy, 1, id); + })); - expectSpyCall(navigateToResourceSpy, 2, id); + it('... id is a string', fakeAsync(() => { + id = '330'; + propsCmp.resourceRequest.emit(id); - // String - id = '330'; - propsCmp.resourceRequest.emit(id); + expectSpyCall(navigateToResourceSpy, 1, id); + })); + }); - expectSpyCall(navigateToResourceSpy, 3, id); - })); + describe('... from ResourceDetailHtmlContentLinkedobjectsComponent if', () => { + it('... id is undefined', fakeAsync(() => { + id = undefined; + linkObjCmp.resourceRequest.emit(id); - it('... should not emit anything if no id is provided', fakeAsync(() => { - // Props - const propsDes = getAndExpectDebugElementByDirective( - compDe, - ResourceDetailHtmlContentPropsStubComponent, - 1, - 1 - ); - const propsCmp = propsDes[0].injector.get( - ResourceDetailHtmlContentPropsStubComponent - ) as ResourceDetailHtmlContentPropsStubComponent; + expectSpyCall(navigateToResourceSpy, 1, id); + })); - // No id - propsCmp.resourceRequest.emit(undefined); + it('... id is a number', fakeAsync(() => { + id = 28; + linkObjCmp.resourceRequest.emit(id); - // Id is undefined - expect(emitSpy).not.toHaveBeenCalled(); - expect(emitSpy).toHaveBeenCalledTimes(0); - })); + expectSpyCall(navigateToResourceSpy, 1, id); + })); - it('... should emit provided resource id (as string) on click', fakeAsync(() => { - // Props - const propsDes = getAndExpectDebugElementByDirective( - compDe, - ResourceDetailHtmlContentPropsStubComponent, - 1, - 1 - ); - const propsCmp = propsDes[0].injector.get( - ResourceDetailHtmlContentPropsStubComponent - ) as ResourceDetailHtmlContentPropsStubComponent; + it('... id is a string', fakeAsync(() => { + id = '330'; + linkObjCmp.resourceRequest.emit(id); + + expectSpyCall(navigateToResourceSpy, 1, id); + })); + }); + }); + + describe('... should not emit anything if', () => { + it('... id is undefined', fakeAsync(() => { + propsCmp.resourceRequest.emit(undefined); - let id; + expectSpyCall(navigateToResourceSpy, 1, undefined); + expectSpyCall(resourceRequestEmitSpy, 0); + })); - // Number - id = 28; - propsCmp.resourceRequest.emit(id); + it('... id is null', fakeAsync(() => { + propsCmp.resourceRequest.emit(null); - expectSpyCall(emitSpy, 1, id.toString()); + expectSpyCall(navigateToResourceSpy, 1, null); + expectSpyCall(resourceRequestEmitSpy, 0); + })); - // String - id = '28'; - propsCmp.resourceRequest.emit(id); + it('... id is empty string', fakeAsync(() => { + propsCmp.resourceRequest.emit(''); - expectSpyCall(emitSpy, 2, id); - })); + expectSpyCall(navigateToResourceSpy, 1, ''); + expectSpyCall(resourceRequestEmitSpy, 0); + })); + }); + + describe('... should emit provided resource id (as string) on click with', () => { + it('... number input', fakeAsync(() => { + // Number + id = 28; + propsCmp.resourceRequest.emit(id); + + expectSpyCall(navigateToResourceSpy, 1, id); + expectSpyCall(resourceRequestEmitSpy, 1, id.toString()); + })); + + it('... string input', fakeAsync(() => { + // String + id = '28'; + propsCmp.resourceRequest.emit(id); + + expectSpyCall(navigateToResourceSpy, 1, id); + expectSpyCall(resourceRequestEmitSpy, 1, id.toString()); + })); + }); }); }); }); diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.ts index a32e38819a..b796fde06c 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.ts @@ -54,7 +54,7 @@ export class ResourceDetailHtmlContentComponent { * @returns {void} Emits the event. */ exposeGnd(gndEvent: GndEvent): void { - if (!gndEvent) { + if (!gndEvent || !gndEvent.type) { return; } this.gndRequest.emit(gndEvent); diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html.component.spec.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html.component.spec.ts index fd83f5386b..9aa317a738 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html.component.spec.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html.component.spec.ts @@ -1,7 +1,6 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing'; import { Component, DebugElement, EventEmitter, Input, Output } from '@angular/core'; -import Spy = jasmine.Spy; import { expectSpyCall, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; @@ -13,10 +12,11 @@ import { ResourceDetailImage, ResourceDetailProperty, } from '@awg-views/data-view/models'; -import { GndEvent } from '@awg-core/services/gnd-service'; +import { GndEvent, GndEventType } from '@awg-core/services/gnd-service'; import { ResourceDetailHtmlComponent } from './resource-detail-html.component'; import { detectChangesOnPush } from '@testing/detect-changes-on-push-helper'; +import Spy = jasmine.Spy; // Mock component @Component({ selector: 'awg-resource-detail-html-content', template: '' }) @@ -36,8 +36,10 @@ describe('ResourceDetailHtmlComponent (DONE)', () => { let expectedResourceDetailData: ResourceDetail; + let exposeGndSpy: Spy; let navigateToResourceSpy: Spy; - let emitSpy: Spy; + let gndRequestEmitSpy: Spy; + let resourceRequestEmitSpy: Spy; beforeEach( waitForAsync(() => { @@ -67,7 +69,9 @@ describe('ResourceDetailHtmlComponent (DONE)', () => { // `.and.callThrough` will track the spy down the nested describes, see // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E navigateToResourceSpy = spyOn(component, 'navigateToResource').and.callThrough(); - emitSpy = spyOn(component.resourceRequest, 'emit').and.callThrough(); + exposeGndSpy = spyOn(component, 'exposeGnd').and.callThrough(); + gndRequestEmitSpy = spyOn(component.gndRequest, 'emit').and.callThrough(); + resourceRequestEmitSpy = spyOn(component.resourceRequest, 'emit').and.callThrough(); }); it('should create', () => { @@ -76,13 +80,20 @@ describe('ResourceDetailHtmlComponent (DONE)', () => { describe('BEFORE initial data binding', () => { it('should not have `resourceDetailData` inputs', () => { - expect(component.resourceDetailData).toBeUndefined('should be undefined'); + expect(component.resourceDetailData).withContext('should be undefined').toBeUndefined(); + }); + + describe('#exposeGnd', () => { + it('... should not have been called', () => { + expect(exposeGndSpy).not.toHaveBeenCalled(); + expect(gndRequestEmitSpy).not.toHaveBeenCalled(); + }); }); describe('#navigateToResource', () => { it('... should not have been called', () => { expect(navigateToResourceSpy).not.toHaveBeenCalled(); - expect(emitSpy).not.toHaveBeenCalled(); + expect(resourceRequestEmitSpy).not.toHaveBeenCalled(); }); }); @@ -103,8 +114,10 @@ describe('ResourceDetailHtmlComponent (DONE)', () => { }); it('should have `resourceDetailData` inputs', () => { - expect(component.resourceDetailData).toBeDefined('should be defined'); - expect(component.resourceDetailData).toBe(expectedResourceDetailData); + expect(component.resourceDetailData).withContext('should be defined').toBeDefined(); + expect(component.resourceDetailData) + .withContext(`should be ${expectedResourceDetailData}`) + .toBe(expectedResourceDetailData); }); describe('VIEW', () => { @@ -135,89 +148,192 @@ describe('ResourceDetailHtmlComponent (DONE)', () => { ) as ResourceDetailHtmlContentStubComponent; expect(htmlContentCmp.content).toBeDefined(); - expect(htmlContentCmp.content).toBe(expectedResourceDetailData.content); + expect(htmlContentCmp.content) + .withContext(`should be ${expectedResourceDetailData.content}`) + .toBe(expectedResourceDetailData.content); }); }); - describe('#navigateToResource', () => { - it('... should trigger on event from ResourceDetailHtmlContentComponent', fakeAsync(() => { - const htmlContentDes = getAndExpectDebugElementByDirective( + describe('#exposeGnd', () => { + let htmlContentDes; + let htmlContentCmp; + let gndEvent: GndEvent; + + beforeEach(() => { + htmlContentDes = getAndExpectDebugElementByDirective( compDe, ResourceDetailHtmlContentStubComponent, 1, 1 ); - const htmlContentCmp = htmlContentDes[0].injector.get( + htmlContentCmp = htmlContentDes[0].injector.get( ResourceDetailHtmlContentStubComponent ) as ResourceDetailHtmlContentStubComponent; + }); - let id; + describe('... should trigger on event from ResourceDetailHtmlContentComponent if', () => { + it('... gndEvent is undefined', fakeAsync(() => { + gndEvent = undefined; + htmlContentCmp.gndRequest.emit(gndEvent); - // Undefined - id = undefined; - htmlContentCmp.resourceRequest.emit(id); + expectSpyCall(exposeGndSpy, 1, gndEvent); + })); - expectSpyCall(navigateToResourceSpy, 1, id); + it('... gndEvent is SET', fakeAsync(() => { + gndEvent = new GndEvent(GndEventType.SET, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); - // Number - id = 28; - htmlContentCmp.resourceRequest.emit(id); + expectSpyCall(exposeGndSpy, 1, gndEvent); + })); - expectSpyCall(navigateToResourceSpy, 2, id); + it('... gndEvent is GET', fakeAsync(() => { + gndEvent = new GndEvent(GndEventType.GET, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); - // String - id = '330'; - htmlContentCmp.resourceRequest.emit(id); + expectSpyCall(exposeGndSpy, 1, gndEvent); + })); - expectSpyCall(navigateToResourceSpy, 3, id); - })); + it('... gndEvent is REMOVE', fakeAsync(() => { + gndEvent = new GndEvent(GndEventType.REMOVE, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); - it('... should not emit anything if no id is provided', fakeAsync(() => { - const htmlContentDes = getAndExpectDebugElementByDirective( - compDe, - ResourceDetailHtmlContentStubComponent, - 1, - 1 - ); - const htmlContentCmp = htmlContentDes[0].injector.get( - ResourceDetailHtmlContentStubComponent - ) as ResourceDetailHtmlContentStubComponent; + expectSpyCall(exposeGndSpy, 1, gndEvent); + })); + }); - // Id is undefined - htmlContentCmp.resourceRequest.emit(undefined); + describe('... should not emit anything if', () => { + it('... gndEvent is undefined', fakeAsync(() => { + gndEvent = undefined; + htmlContentCmp.gndRequest.emit(gndEvent); - expectSpyCall(navigateToResourceSpy, 1, undefined); - expect(emitSpy).not.toHaveBeenCalled(); - expect(emitSpy).toHaveBeenCalledTimes(0); - })); + expectSpyCall(exposeGndSpy, 1, undefined); + expectSpyCall(gndRequestEmitSpy, 0); + })); - it('... should emit provided resource id (as string) on click', fakeAsync(() => { - const htmlContentDes = getAndExpectDebugElementByDirective( + it('... gndEvent is null', fakeAsync(() => { + gndEvent = null; + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, null); + expectSpyCall(gndRequestEmitSpy, 0); + })); + + it('... gndEvent type is undefined', fakeAsync(() => { + gndEvent = new GndEvent(undefined, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, null); + expectSpyCall(gndRequestEmitSpy, 0); + })); + }); + + describe('... should emit provided gndEvent on click with', () => { + it('... SET event', fakeAsync(() => { + gndEvent = new GndEvent(GndEventType.SET, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, gndEvent); + expectSpyCall(gndRequestEmitSpy, 1, gndEvent); + })); + + it('... GET event', fakeAsync(() => { + gndEvent = new GndEvent(GndEventType.GET, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, gndEvent); + expectSpyCall(gndRequestEmitSpy, 1, gndEvent); + })); + + it('... REMOVE event', fakeAsync(() => { + gndEvent = new GndEvent(GndEventType.REMOVE, '123'); + htmlContentCmp.gndRequest.emit(gndEvent); + + expectSpyCall(exposeGndSpy, 1, gndEvent); + expectSpyCall(gndRequestEmitSpy, 1, gndEvent); + })); + }); + }); + + describe('#navigateToResource', () => { + let htmlContentDes; + let htmlContentCmp; + let id; + + beforeEach(() => { + htmlContentDes = getAndExpectDebugElementByDirective( compDe, ResourceDetailHtmlContentStubComponent, 1, 1 ); - const htmlContentCmp = htmlContentDes[0].injector.get( + htmlContentCmp = htmlContentDes[0].injector.get( ResourceDetailHtmlContentStubComponent ) as ResourceDetailHtmlContentStubComponent; + }); + + describe('... should trigger on event from ResourceDetailHtmlContentComponent if', () => { + it('... id is undefined', fakeAsync(() => { + id = undefined; + htmlContentCmp.resourceRequest.emit(id); - let id; + expectSpyCall(navigateToResourceSpy, 1, id); + })); - // Number - id = 28; - htmlContentCmp.resourceRequest.emit(id); + it('... id is a number', fakeAsync(() => { + id = 28; + htmlContentCmp.resourceRequest.emit(id); - expectSpyCall(navigateToResourceSpy, 1, id); - expectSpyCall(emitSpy, 1, id.toString()); + expectSpyCall(navigateToResourceSpy, 1, id); + })); - // String - id = '28'; - htmlContentCmp.resourceRequest.emit(id); + it('... id is a string', fakeAsync(() => { + id = '330'; + htmlContentCmp.resourceRequest.emit(id); - expectSpyCall(navigateToResourceSpy, 2, id); - expectSpyCall(emitSpy, 2, id); - })); + expectSpyCall(navigateToResourceSpy, 1, id); + })); + }); + + describe('... should not emit anything if', () => { + it('... id is undefined', fakeAsync(() => { + htmlContentCmp.resourceRequest.emit(undefined); + + expectSpyCall(navigateToResourceSpy, 1, undefined); + expectSpyCall(resourceRequestEmitSpy, 0); + })); + + it('... id is null', fakeAsync(() => { + htmlContentCmp.resourceRequest.emit(null); + + expectSpyCall(navigateToResourceSpy, 1, null); + expectSpyCall(resourceRequestEmitSpy, 0); + })); + + it('... id is empty string', fakeAsync(() => { + htmlContentCmp.resourceRequest.emit(''); + + expectSpyCall(navigateToResourceSpy, 1, ''); + expectSpyCall(resourceRequestEmitSpy, 0); + })); + }); + + describe('... should emit provided resource id (as string) on click with', () => { + it('... number input', fakeAsync(() => { + id = 28; + htmlContentCmp.resourceRequest.emit(id); + + expectSpyCall(navigateToResourceSpy, 1, id); + expectSpyCall(resourceRequestEmitSpy, 1, id.toString()); + })); + + it('... string input', fakeAsync(() => { + id = '28'; + htmlContentCmp.resourceRequest.emit(id); + + expectSpyCall(navigateToResourceSpy, 1, id); + expectSpyCall(resourceRequestEmitSpy, 1, id.toString()); + })); + }); }); }); }); diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html.component.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html.component.ts index 218a68a105..6c0d604f54 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html.component.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html.component.ts @@ -52,7 +52,7 @@ export class ResourceDetailHtmlComponent { * @returns {void} Emits the event. */ exposeGnd(gndEvent: GndEvent): void { - if (!gndEvent) { + if (!gndEvent || !gndEvent.type) { return; } this.gndRequest.emit(gndEvent); From f2ed3167b7e173f007b5fd8cbbc7f038363ddf8f Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 02:30:59 +0100 Subject: [PATCH 071/148] test(app): use FontAwesomeTestingModule for tests --- src/app/core/navbar/navbar.component.spec.ts | 4 ++-- .../resource-detail-html-content.component.spec.ts | 10 ---------- .../extended-search-form.component.spec.ts | 4 +++- .../fulltext-search-form.component.spec.ts | 4 ++-- .../search-result-list.component.spec.ts | 5 ++--- .../edition-convolute.component.spec.ts | 9 +++++---- .../edition-graph/edition-graph.component.spec.ts | 5 +++-- 7 files changed, 17 insertions(+), 24 deletions(-) diff --git a/src/app/core/navbar/navbar.component.spec.ts b/src/app/core/navbar/navbar.component.spec.ts index d1d99fdd9a..1fe20ef45a 100644 --- a/src/app/core/navbar/navbar.component.spec.ts +++ b/src/app/core/navbar/navbar.component.spec.ts @@ -7,7 +7,7 @@ import { click } from '@testing/click-helper'; import { getAndExpectDebugElementByCss, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; import { RouterLinkStubDirective } from '@testing/router-stubs'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; +import { FontAwesomeTestingModule } from '@fortawesome/angular-fontawesome/testing'; import { faEnvelope, faFileAlt, faHome, faNetworkWired, faSearch } from '@fortawesome/free-solid-svg-icons'; import { NgbCollapseModule, NgbConfig, NgbDropdownModule } from '@ng-bootstrap/ng-bootstrap'; @@ -51,7 +51,7 @@ describe('NavbarComponent (DONE)', () => { }; TestBed.configureTestingModule({ - imports: [FontAwesomeModule, NgbWithConfigModule], + imports: [FontAwesomeTestingModule, NgbWithConfigModule], declarations: [NavbarComponent, RouterLinkStubDirective], providers: [{ provide: CoreService, useValue: mockCoreService }], }).compileComponents(); diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.spec.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.spec.ts index 9c54c8a06b..905a16002f 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.spec.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/resource-detail-html-content.component.spec.ts @@ -247,7 +247,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { describe('... should trigger on event from ResourceDetailHtmlContentComponent if', () => { it('... gndEvent is undefined', fakeAsync(() => { - // Undefined gndEvent = undefined; htmlContentCmp.gndRequest.emit(gndEvent); @@ -255,7 +254,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { })); it('... gndEvent is SET', fakeAsync(() => { - // SET gndEvent = new GndEvent(GndEventType.SET, '123'); htmlContentCmp.gndRequest.emit(gndEvent); @@ -263,7 +261,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { })); it('... gndEvent is GET', fakeAsync(() => { - // GET gndEvent = new GndEvent(GndEventType.GET, '123'); htmlContentCmp.gndRequest.emit(gndEvent); @@ -271,7 +268,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { })); it('... gndEvent is REMOVE', fakeAsync(() => { - // REMOVE gndEvent = new GndEvent(GndEventType.REMOVE, '123'); htmlContentCmp.gndRequest.emit(gndEvent); @@ -281,7 +277,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { describe('... should not emit anything if', () => { it('... gndEvent is undefined', fakeAsync(() => { - // GndEvent is undefined gndEvent = undefined; htmlContentCmp.gndRequest.emit(gndEvent); @@ -290,7 +285,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { })); it('... gndEvent is null', fakeAsync(() => { - // GndEvent is undefined gndEvent = null; htmlContentCmp.gndRequest.emit(gndEvent); @@ -299,7 +293,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { })); it('... gndEvent type is undefined', fakeAsync(() => { - // GndEvent is undefined gndEvent = new GndEvent(undefined, '123'); htmlContentCmp.gndRequest.emit(gndEvent); @@ -310,7 +303,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { describe('... should emit provided gndEvent on click with', () => { it('... SET event', fakeAsync(() => { - // SET gndEvent = new GndEvent(GndEventType.SET, '123'); htmlContentCmp.gndRequest.emit(gndEvent); @@ -319,7 +311,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { })); it('... GET event', fakeAsync(() => { - // GET gndEvent = new GndEvent(GndEventType.GET, '123'); htmlContentCmp.gndRequest.emit(gndEvent); @@ -328,7 +319,6 @@ describe('ResourceDetailHtmlContentComponent (DONE)', () => { })); it('... REMOVE event', fakeAsync(() => { - // REMOVE gndEvent = new GndEvent(GndEventType.REMOVE, '123'); htmlContentCmp.gndRequest.emit(gndEvent); diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts index 5a716b9c37..6253894c14 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.spec.ts @@ -2,6 +2,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { HttpClientTestingModule } from '@angular/common/http/testing'; import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; +import { FontAwesomeTestingModule } from '@fortawesome/angular-fontawesome/testing'; + import { ExtendedSearchFormComponent } from './extended-search-form.component'; describe('ExtendedSearchFormComponent', () => { @@ -12,7 +14,7 @@ describe('ExtendedSearchFormComponent', () => { beforeEach(async () => { await TestBed.configureTestingModule({ - imports: [HttpClientTestingModule, ReactiveFormsModule], + imports: [FontAwesomeTestingModule, HttpClientTestingModule, ReactiveFormsModule], declarations: [ExtendedSearchFormComponent], providers: [FormBuilder], }).compileComponents(); diff --git a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.spec.ts index a9b2e8ab5a..5a4b25449b 100644 --- a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.spec.ts @@ -3,7 +3,7 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { DebugElement } from '@angular/core'; import { FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; +import { FontAwesomeTestingModule } from '@fortawesome/angular-fontawesome/testing'; import { FulltextSearchFormComponent } from './fulltext-search-form.component'; @@ -21,7 +21,7 @@ describe('FulltextSearchFormComponent', () => { beforeEach( waitForAsync(() => { TestBed.configureTestingModule({ - imports: [FontAwesomeModule, ReactiveFormsModule], + imports: [FontAwesomeTestingModule, ReactiveFormsModule], declarations: [FulltextSearchFormComponent], providers: [{ provide: FormBuilder, useValue: formBuilder }], }).compileComponents(); diff --git a/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.spec.ts index ea35955fbd..adb4a53824 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.spec.ts @@ -6,7 +6,7 @@ import { FormBuilder, ReactiveFormsModule } from '@angular/forms'; import Spy = jasmine.Spy; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; +import { FontAwesomeTestingModule } from '@fortawesome/angular-fontawesome/testing'; import { NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap'; import { CompileHtmlComponent } from '@awg-shared/compile-html'; @@ -17,7 +17,6 @@ import { SearchParams, SearchResultsViewTypes, SearchResponseWithQuery } from '@ import { SearchResponseJson } from '@awg-shared/api-objects'; import { SearchResultListComponent } from './search-result-list.component'; -import { EditionDataService, EditionService } from '@awg-views/edition-view/services'; describe('SearchResultListComponent', () => { let component: SearchResultListComponent; @@ -60,7 +59,7 @@ describe('SearchResultListComponent', () => { }; TestBed.configureTestingModule({ - imports: [FontAwesomeModule, NgbPaginationModule, ReactiveFormsModule, RouterTestingModule], + imports: [FontAwesomeTestingModule, NgbPaginationModule, ReactiveFormsModule, RouterTestingModule], declarations: [SearchResultListComponent, CompileHtmlComponent], providers: [ { provide: DataStreamerService, useValue: mockDataStreamerService }, diff --git a/src/app/views/edition-view/edition-outlets/edition-detail/edition-convolute/edition-convolute.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-detail/edition-convolute/edition-convolute.component.spec.ts index 8efaab2c39..4449d72f1b 100644 --- a/src/app/views/edition-view/edition-outlets/edition-detail/edition-convolute/edition-convolute.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-detail/edition-convolute/edition-convolute.component.spec.ts @@ -2,12 +2,10 @@ import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/cor import { Component, DebugElement, EventEmitter, Input, NgModule, Output } from '@angular/core'; import Spy = jasmine.Spy; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; +import { FontAwesomeTestingModule } from '@fortawesome/angular-fontawesome/testing'; import { faSquare } from '@fortawesome/free-solid-svg-icons/faSquare'; import { NgbAccordionModule, NgbConfig } from '@ng-bootstrap/ng-bootstrap'; -import { EditionSvgSheet, FolioConvoluteList, FolioConvolute } from '@awg-views/edition-view/models'; -import { EditionConvoluteComponent } from './edition-convolute.component'; import { expectSpyCall, getAndExpectDebugElementByCss, @@ -15,6 +13,9 @@ import { } from '@testing/expect-helper'; import { clickAndAwaitChanges } from '@testing/click-helper'; +import { EditionSvgSheet, FolioConvoluteList, FolioConvolute } from '@awg-views/edition-view/models'; +import { EditionConvoluteComponent } from './edition-convolute.component'; + interface IFolioLegend { color: string; label: string; @@ -62,7 +63,7 @@ describe('EditionConvoluteComponent (DONE)', () => { beforeEach( waitForAsync(() => { TestBed.configureTestingModule({ - imports: [FontAwesomeModule, NgbAccordionWithConfigModule], + imports: [FontAwesomeTestingModule, NgbAccordionWithConfigModule], declarations: [EditionConvoluteComponent, FolioStubComponent], }).compileComponents(); }) diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/edition-graph.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-graph/edition-graph.component.spec.ts index 4bb24dbe91..af060aa5bd 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/edition-graph.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/edition-graph.component.spec.ts @@ -5,6 +5,8 @@ import { JsonPipe } from '@angular/common'; import { Observable, of as observableOf, throwError as observableThrowError } from 'rxjs'; import Spy = jasmine.Spy; +import { FontAwesomeTestingModule } from '@fortawesome/angular-fontawesome/testing'; + import { cleanStylesFromDOM } from '@testing/clean-up-helper'; import { click } from '@testing/click-helper'; import { detectChangesOnPush } from '@testing/detect-changes-on-push-helper'; @@ -27,7 +29,6 @@ import { import { EditionDataService, EditionService } from '@awg-views/edition-view/services'; import { EditionGraphComponent } from './edition-graph.component'; -import { FontAwesomeModule } from '@fortawesome/angular-fontawesome'; // Mock components @Component({ selector: 'awg-graph-visualizer', template: '' }) @@ -83,7 +84,7 @@ describe('EditionGraphComponent (DONE)', () => { }; TestBed.configureTestingModule({ - imports: [FontAwesomeModule], + imports: [FontAwesomeTestingModule], declarations: [ EditionGraphComponent, GraphVisualizerStubComponent, From 254ab52e80a88c4b08e56f529c3ad6f6de417a7a Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 02:40:00 +0100 Subject: [PATCH 072/148] refactor(app): rename destroy$ observable -> destroyed$ --- .../resource-info/resource-info.component.ts | 2 +- .../resource-detail/resource-detail.component.ts | 12 ++++++------ .../search-result-list.component.ts | 12 ++++++------ .../edition-detail/edition-detail.component.ts | 14 +++++++------- .../force-graph/force-graph.component.ts | 12 ++++++------ .../edition-outlets/edition-overview.component.ts | 12 ++++++------ 6 files changed, 32 insertions(+), 32 deletions(-) diff --git a/src/app/side-info/resource-info/resource-info.component.ts b/src/app/side-info/resource-info/resource-info.component.ts index c79708f3f2..a037f1a559 100644 --- a/src/app/side-info/resource-info/resource-info.component.ts +++ b/src/app/side-info/resource-info/resource-info.component.ts @@ -249,7 +249,7 @@ export class ResourceInfoComponent implements OnInit, OnDestroy { // Emit truthy value to end all subscriptions this._destroyed$.next(true); - // Complete the subject itself + // Now let's also complete the subject itself this._destroyed$.complete(); } diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.ts index d1db100830..fd6553d8c6 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail.component.ts @@ -77,11 +77,11 @@ export class ResourceDetailComponent implements OnInit, OnDestroy { selectedResourceDetailTabId: string; /** - * Private variable: _destroy$. + * Private variable: _destroyed$. * * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. */ - private _destroy$: Subject = new Subject(); + private _destroyed$: Subject = new Subject(); /** * Constructor of the ResourceDetailComponent. @@ -169,7 +169,7 @@ export class ResourceDetailComponent implements OnInit, OnDestroy { // Fetch resource data depending on param id return this.dataApiService.getResourceData(resourceId); }), - takeUntil(this._destroy$) + takeUntil(this._destroyed$) ) .subscribe( (data: ResourceData) => { @@ -278,9 +278,9 @@ export class ResourceDetailComponent implements OnInit, OnDestroy { */ ngOnDestroy() { // Emit truthy value to end all subscriptions - this._destroy$.next(true); + this._destroyed$.next(true); - // Now let's also unsubscribe from the subject itself: - this._destroy$.unsubscribe(); + // Now let's also complete the subject itself: + this._destroyed$.complete(); } } diff --git a/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.ts b/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.ts index c725b405a4..6e6ec9302a 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-result-list/search-result-list.component.ts @@ -141,11 +141,11 @@ export class SearchResultListComponent implements OnInit, OnDestroy { private _selectedResourceId: string; /** - * Private variable: _destroy$. + * Private variable: _destroyed$. * * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. */ - private _destroy$: Subject = new Subject(); + private _destroyed$: Subject = new Subject(); /** * Constructor of the SearchResultListComponent. @@ -343,7 +343,7 @@ export class SearchResultListComponent implements OnInit, OnDestroy { // Cold request to streamer service const searchResponseWithQuery$: Observable = this.dataStreamerService .getSearchResponseWithQuery() - .pipe(takeUntil(this._destroy$)); + .pipe(takeUntil(this._destroyed$)); // Subscribe to response to handle changes searchResponseWithQuery$.subscribe( @@ -415,9 +415,9 @@ export class SearchResultListComponent implements OnInit, OnDestroy { this.sideInfoService.clearSearchInfoData(); // Emit truthy value to end all subscriptions - this._destroy$.next(true); + this._destroyed$.next(true); - // Now let's also unsubscribe from the subject itself: - this._destroy$.unsubscribe(); + // Now let's also complete the subject itself + this._destroyed$.complete(); } } diff --git a/src/app/views/edition-view/edition-outlets/edition-detail/edition-detail.component.ts b/src/app/views/edition-view/edition-outlets/edition-detail/edition-detail.component.ts index 0d23d6beac..020bb1e2b3 100644 --- a/src/app/views/edition-view/edition-outlets/edition-detail/edition-detail.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-detail/edition-detail.component.ts @@ -110,11 +110,11 @@ export class EditionDetailComponent implements OnInit, OnDestroy { showTkA = false; /** - * Private variable: _destroy$. + * Private variable: _destroyed$. * * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. */ - private _destroy$: Subject = new Subject(); + private _destroyed$: Subject = new Subject(); /** * Constructor of the EditionDetailComponent. @@ -165,7 +165,7 @@ export class EditionDetailComponent implements OnInit, OnDestroy { // Return EditionDetailData from editionDataService return this.editionDataService.getEditionDetailData(this.editionWork); }), - takeUntil(this._destroy$) + takeUntil(this._destroyed$) ) .pipe( switchMap((data: [FolioConvoluteList, EditionSvgSheetList, TextcriticsList]) => { @@ -177,7 +177,7 @@ export class EditionDetailComponent implements OnInit, OnDestroy { return this.route.queryParamMap; } }), - takeUntil(this._destroy$) + takeUntil(this._destroyed$) ) .subscribe( (queryParams: ParamMap) => { @@ -279,10 +279,10 @@ export class EditionDetailComponent implements OnInit, OnDestroy { */ ngOnDestroy() { // Emit truthy value to end all subscriptions - this._destroy$.next(true); + this._destroyed$.next(true); - // Now let's also unsubscribe from the subject itself: - this._destroy$.unsubscribe(); + // Now let's also complete the subject itself + this._destroyed$.complete(); } /** diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/force-graph/force-graph.component.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/force-graph/force-graph.component.ts index e0bc181d90..6df644049d 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/force-graph/force-graph.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/force-graph/force-graph.component.ts @@ -203,11 +203,11 @@ export class ForceGraphComponent implements OnInit, OnChanges, OnDestroy { private _resize$: Subject = new Subject(); /** - * Private variable: _destroy$. + * Private variable: _destroyed$. * * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. */ - private _destroy$: Subject = new Subject(); + private _destroyed$: Subject = new Subject(); /** * Constructor of the ForceGraphComponent. @@ -247,7 +247,7 @@ export class ForceGraphComponent implements OnInit, OnChanges, OnDestroy { */ ngOnInit() { // Subscribe to resize subject to _redraw on resize with delay until component gets destroyed - this._resize$.pipe(debounceTime(150), takeUntil(this._destroy$)).subscribe((event: any) => { + this._resize$.pipe(debounceTime(150), takeUntil(this._destroyed$)).subscribe((event: any) => { this._redraw(); }); @@ -340,10 +340,10 @@ export class ForceGraphComponent implements OnInit, OnChanges, OnDestroy { */ ngOnDestroy() { // Emit truthy value to end all subscriptions - this._destroy$.next(true); + this._destroyed$.next(true); - // Unsubscribe from the subject itself: - this._destroy$.unsubscribe(); + // Now let's also complete the subject itself + this._destroyed$.complete(); } /** diff --git a/src/app/views/edition-view/edition-outlets/edition-overview.component.ts b/src/app/views/edition-view/edition-outlets/edition-overview.component.ts index 670625fafc..5847231bd3 100644 --- a/src/app/views/edition-view/edition-outlets/edition-overview.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-overview.component.ts @@ -35,11 +35,11 @@ export class EditionOverviewComponent implements OnInit, OnDestroy { editionWork: EditionWork; /** - * Private variable: _destroy$. + * Private variable: _destroyed$. * * Subject to emit a truthy value in the ngOnDestroy lifecycle hook. */ - private _destroy$: Subject = new Subject(); + private _destroyed$: Subject = new Subject(); /** * Constructor of the EditionOverviewComponent. @@ -71,7 +71,7 @@ export class EditionOverviewComponent implements OnInit, OnDestroy { getEditionWork(): void { this.editionService .getEditionWork() - .pipe(takeUntil(this._destroy$)) + .pipe(takeUntil(this._destroyed$)) .subscribe((work: EditionWork) => { this.editionWork = work; this.setButtons(); @@ -124,9 +124,9 @@ export class EditionOverviewComponent implements OnInit, OnDestroy { */ ngOnDestroy() { // Emit truthy value to end all subscriptions - this._destroy$.next(true); + this._destroyed$.next(true); - // Now let's also unsubscribe from the subject itself: - this._destroy$.unsubscribe(); + // Now let's also complete the subject itself + this._destroyed$.complete(); } } From f63275414220c9010e03c1a7f4b7146613625fcf Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 19:40:12 +0100 Subject: [PATCH 073/148] test(search): fix text for ResourceDetailProps component --- .../props/props.component.spec.ts | 165 +++++++++++++++--- .../props/props.component.ts | 46 +++-- .../fulltext-search-form.component.ts | 2 +- 3 files changed, 171 insertions(+), 42 deletions(-) diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.spec.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.spec.ts index a64b444dcb..754923fe00 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.spec.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.spec.ts @@ -1,28 +1,36 @@ import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing'; -import { DebugElement } from '@angular/core'; +import { DebugElement, SimpleChange } from '@angular/core'; + import Spy = jasmine.Spy; import { clickAndAwaitChanges } from '@testing/click-helper'; +import { detectChangesOnPush } from '@testing/detect-changes-on-push-helper'; import { expectSpyCall, getAndExpectDebugElementByCss, getAndExpectDebugElementByDirective, } from '@testing/expect-helper'; +import { GndEvent, GndEventType } from '@awg-core/services/gnd-service'; import { CompileHtmlComponent } from '@awg-shared/compile-html'; import { ResourceDetailProperty } from '@awg-views/data-view/models'; import { ResourceDetailHtmlContentPropsComponent } from './props.component'; -describe('ResourceDetailHtmlContentPropsComponent', () => { +describe('ResourceDetailHtmlContentPropsComponent (DONE)', () => { let component: ResourceDetailHtmlContentPropsComponent; let fixture: ComponentFixture; let compDe: DebugElement; + let exposeGndSpy: Spy; let navigateToResourceSpy: Spy; - let emitSpy: Spy; + let gndRequestEmitSpy: Spy; + let resourceRequestEmitSpy: Spy; let expectedProps: ResourceDetailProperty[]; + let expectedPropWithGnd: ResourceDetailProperty; + let expectedGndValue: string; + let expectedGnd: string; let expectedMetaBreakLine: string; beforeEach( @@ -40,6 +48,7 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { // Test data expectedMetaBreakLine = 'Versionsdatum'; + expectedGnd = '12345678-X'; const prop1Value1 = 'Op. 28: Skizzen zu einem "1. Satz" (später 2. Satz [M 330])'; @@ -54,13 +63,18 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { 'prop2-value3', ]); const props4: ResourceDetailProperty = new ResourceDetailProperty('3', 'text', 'prop1', []); + expectedGndValue = `http://d-nb.info/gnd/${expectedGnd}`; + expectedPropWithGnd = new ResourceDetailProperty('856', 'richtext', 'prop1', [expectedGndValue]); + expectedProps = [props1, props2, props3, props4]; // Spies on component functions // `.and.callThrough` will track the spy down the nested describes, see // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E navigateToResourceSpy = spyOn(component, 'navigateToResource').and.callThrough(); - emitSpy = spyOn(component.resourceRequest, 'emit').and.callThrough(); + exposeGndSpy = spyOn(component, 'exposeGnd').and.callThrough(); + gndRequestEmitSpy = spyOn(component.gndRequest, 'emit').and.callThrough(); + resourceRequestEmitSpy = spyOn(component.resourceRequest, 'emit').and.callThrough(); }); it('should create', () => { @@ -69,18 +83,27 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { describe('BEFORE initial data binding', () => { it('should have `metaBreakLine`', () => { - expect(component.metaBreakLine).toBeDefined('should be defined'); - expect(component.metaBreakLine).toBe(expectedMetaBreakLine, `should be ${expectedMetaBreakLine}`); + expect(component.metaBreakLine).withContext('should be defined').toBeDefined(); + expect(component.metaBreakLine) + .withContext(`should be ${expectedMetaBreakLine}`) + .toBe(expectedMetaBreakLine); }); it('should not have `props` input', () => { - expect(component.props).toBeUndefined('should be undefined'); + expect(component.props).withContext('should be undefined').toBeUndefined(); + }); + + describe('#exposeGnd', () => { + it('... should not have been called', () => { + expect(exposeGndSpy).not.toHaveBeenCalled(); + expect(gndRequestEmitSpy).not.toHaveBeenCalled(); + }); }); describe('#navigateToResource', () => { it('... should not have been called', () => { expect(navigateToResourceSpy).not.toHaveBeenCalled(); - expect(emitSpy).not.toHaveBeenCalled(); + expect(resourceRequestEmitSpy).not.toHaveBeenCalled(); }); }); @@ -95,7 +118,8 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { const headerEl = headerDes[0].nativeElement; // Check output - expect(headerEl.textContent).toContain('Objektdaten'); + expect(headerEl.textContent).toBeTruthy(); + expect(headerEl.textContent).withContext('Objektdaten').toContain('Objektdaten'); }); it('... should contain no ul with props yet', () => { @@ -105,21 +129,21 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { }); describe('AFTER initial data binding', () => { - beforeEach(() => { + beforeEach(async () => { // Simulate the parent setting the input properties component.props = expectedProps; // Trigger initial data binding - fixture.detectChanges(); + await detectChangesOnPush(fixture); }); it('should have `props` input', () => { - expect(component.props).toBeDefined('should be defined'); - expect(component.props).toBe(expectedProps, `should be expectedProps: ${expectedProps}`); + expect(component.props).withContext('should be defined').toBeDefined(); + expect(component.props).withContext(`should be expectedProps: ${expectedProps}`).toBe(expectedProps); }); describe('VIEW', () => { - it('... should contain 4 ul with props', () => { + it('... should contain 4 ul elements (one for each prop of props array)', () => { getAndExpectDebugElementByCss(compDe, 'section.awg-props > ul', 4, 4); }); @@ -129,7 +153,7 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { getAndExpectDebugElementByCss(breakDes[0], 'hr', 1, 1); }); - it('... should contain only 3 props (li.awg-prop), last props.value is empty', () => { + it('... should contain altogether 3 li.awg-prop elements, since last props.value is empty', () => { getAndExpectDebugElementByCss(compDe, 'ul > li.awg-prop', 3, 3); }); @@ -145,25 +169,113 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { getAndExpectDebugElementByCss(outerLiDes[2], 'ul', expectedLength2, expectedLength2); }); - it('... should contain 6 li.awg-prop-value', () => { + it('... should contain altogether 6 li.awg-prop-value elements', () => { getAndExpectDebugElementByCss(compDe, 'ul > li.awg-prop > ul > li.awg-prop-value', 6, 6); }); - it('... should contain 6 CompileHtmlComponents in li.awg-prop-value', () => { + it('... should contain 7 CompileHtmlComponents in li.awg-prop-value', () => { const htmlDes = getAndExpectDebugElementByDirective(compDe, CompileHtmlComponent, 6, 6); htmlDes.forEach(html => { - expect(html.name).toBeDefined(); - expect(html.name).toBe('span'); + expect(html.name).toBeTruthy(); + expect(html.name).withContext(`should be span`).toBe('span'); // Check parent - expect(html.parent.name).toBe('li'); - expect(html.parent.attributes.class).toBeDefined(); - expect(html.parent.attributes.class).toBe('awg-prop-value'); + expect(html.parent.name).toBeTruthy(); + expect(html.parent.name).withContext(`should be li`).toBe('li'); + expect(html.parent.attributes.class).toBeTruthy(); + expect(html.parent.attributes.class).withContext(`should be awg-prop-value`).toBe('awg-prop-value'); }); }); }); + describe('#exposeGnd', () => { + let gndEvent: GndEvent; + + describe('... should trigger', () => { + it('... on props input change', fakeAsync(() => { + // Directly trigger ngOnChanges + component.ngOnChanges({ + props: new SimpleChange(component.props, [expectedPropWithGnd], false), + }); + + // Gets triggered 2x (remove all old GND values & set new GND value) + expectSpyCall(exposeGndSpy, 2); + })); + + it('... a REMOVE event that clears all previous GND entries if props input contains no GND property', fakeAsync(() => { + const gndRemoveEvent = new GndEvent(GndEventType.REMOVE, null); + + // Directly trigger ngOnChanges + component.ngOnChanges({ + props: new SimpleChange(component.props, [expectedProps], false), + }); + + expectSpyCall(exposeGndSpy, 1, gndRemoveEvent); + expect(exposeGndSpy.calls.mostRecent().args[0]).toEqual(gndRemoveEvent); + })); + + it('... a REMOVE and SET event if props input contains a GND property', fakeAsync(() => { + const gndRemoveEvent = new GndEvent(GndEventType.REMOVE, null); + const gndSetEvent = new GndEvent(GndEventType.SET, expectedGndValue); + + // Directly trigger ngOnChanges + component.ngOnChanges({ + props: new SimpleChange(component.props, [expectedPropWithGnd], false), + }); + + // Gets triggered 2x (remove all old GND values & set new GND value) + expectSpyCall(exposeGndSpy, 2, gndSetEvent); + expect(exposeGndSpy.calls.first().args[0]).toEqual(gndRemoveEvent); + expect(exposeGndSpy.calls.mostRecent().args[0]).toEqual(gndSetEvent); + })); + }); + + describe('... should not emit anything if', () => { + it('... gndEvent is undefined', fakeAsync(() => { + gndEvent = undefined; + component.exposeGnd(gndEvent); + + expectSpyCall(exposeGndSpy, 1, undefined); + expectSpyCall(gndRequestEmitSpy, 0); + })); + + it('... gndEvent is null', fakeAsync(() => { + gndEvent = null; + component.exposeGnd(gndEvent); + + expectSpyCall(exposeGndSpy, 1, null); + expectSpyCall(gndRequestEmitSpy, 0); + })); + + it('... gndEvent type is undefined', fakeAsync(() => { + gndEvent = new GndEvent(undefined, expectedGnd); + component.exposeGnd(gndEvent); + + expectSpyCall(exposeGndSpy, 1, null); + expectSpyCall(gndRequestEmitSpy, 0); + })); + }); + + describe('... should emit provided gndEvent for', () => { + it('... SET event', fakeAsync(() => { + gndEvent = new GndEvent(GndEventType.SET, expectedGnd); + component.exposeGnd(gndEvent); + + expectSpyCall(exposeGndSpy, 1, gndEvent); + expectSpyCall(gndRequestEmitSpy, 1, gndEvent); + })); + + it('... REMOVE event', fakeAsync(() => { + gndEvent = new GndEvent(GndEventType.REMOVE, null); + component.exposeGnd(gndEvent); + + expectSpyCall(exposeGndSpy, 1, gndEvent); + expectSpyCall(gndRequestEmitSpy, 1, gndEvent); + })); + }); + }); + describe('#navigateToResource', () => { it('... should trigger on click', fakeAsync(() => { const innerLiDes = getAndExpectDebugElementByCss( @@ -172,6 +284,7 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { 6, 6 ); + // Get second element with anchor const anchorDes = getAndExpectDebugElementByCss(innerLiDes[0], 'a', 3, 3); // Trigger click with click helper & wait for changes @@ -207,8 +320,8 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { // Trigger click with click helper & wait for changes clickAndAwaitChanges(anchorDes[0], fixture); - expect(emitSpy).not.toHaveBeenCalled(); - expect(emitSpy).toHaveBeenCalledTimes(0); + expect(resourceRequestEmitSpy).not.toHaveBeenCalled(); + expect(resourceRequestEmitSpy).toHaveBeenCalledTimes(0); })); it('... should emit provided resource id (as string) on click', fakeAsync(() => { @@ -226,13 +339,13 @@ describe('ResourceDetailHtmlContentPropsComponent', () => { // Trigger click with click helper & wait for changes clickAndAwaitChanges(anchorDes[1], fixture); - expectSpyCall(emitSpy, 1, '28'); + expectSpyCall(resourceRequestEmitSpy, 1, '28'); // Third anchor has @id: number // Trigger click with click helper & wait for changes clickAndAwaitChanges(anchorDes[2], fixture); - expectSpyCall(emitSpy, 2, '330'); + expectSpyCall(resourceRequestEmitSpy, 2, '330'); })); }); }); diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.ts index 76958a519d..8df78c51e0 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/props/props.component.ts @@ -66,7 +66,26 @@ export class ResourceDetailHtmlContentPropsComponent implements OnChanges, OnDes * @param {SimpleChanges} changes The changes of the input. */ ngOnChanges(changes: SimpleChanges) { - this._checkForGND(changes.props); + if (changes['props']) { + this._checkForGND(changes.props); + } + } + + /** + * Public method: exposeGnd. + * + * It emits a given gnd event (type, value) + * to the {@link gndRequest}. + * + * @param {{type: string, value: string}} gndEvent The given event. + * + * @returns {void} Emits the event. + */ + exposeGnd(gndEvent: GndEvent): void { + if (!gndEvent || !gndEvent.type) { + return; + } + this.gndRequest.emit(gndEvent); } /** @@ -122,40 +141,37 @@ export class ResourceDetailHtmlContentPropsComponent implements OnChanges, OnDes propsWithGND.forEach((prop: ResourceDetailProperty) => { prop.values.forEach((value: string) => { // Expose gnd for every value - this._exposeGnd(value); + this._setGnd(value); }); }); } } /** - * Private method: _exposeGnd. + * Private method: _setGnd. * - * It emits a gnd set event (type, value) - * for a given value to the {@link gndRequest}. + * It creates a gnd set event (type, value) + * for a given value and sends it to the {@link exposeGnd} method. * * @param {string} value The given value. * - * @returns {void} Emits the GND set event. + * @returns {void} Exposes the GND set event. */ - private _exposeGnd(value: string): void { - if (!value) { - return; - } + private _setGnd(value: string): void { const gndEvent = new GndEvent(GndEventType.SET, value); - this.gndRequest.emit(gndEvent); + this.exposeGnd(gndEvent); } /** * Private method: _removeGnd. * - * It emits a gnd remove event (type, value) - * to the {@link gndRequest}. + * It creates a gnd remove event (type, value) + * and sends it to the {@link exposeGnd} method. * - * @returns {void} Emits the GND remove event. + * @returns {void} Exposes the GND remove event. */ private _removeGnd(): void { const gndEvent = new GndEvent(GndEventType.REMOVE, null); - this.gndRequest.emit(gndEvent); + this.exposeGnd(gndEvent); } } diff --git a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts index 259c5896cf..7c8ffb593a 100644 --- a/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/fulltext-search-form/fulltext-search-form.component.ts @@ -189,7 +189,7 @@ export class FulltextSearchFormComponent implements OnInit, OnChanges, OnDestroy // Emit truthy value to end all subscriptions this._destroyed$.next(true); - // Complete the destroy subject itself + // Now let's complete the subject itself this._destroyed$.complete(); } } From 0d297dd46d545a53c90af1a15ec002fcdf959184 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 22:23:54 +0100 Subject: [PATCH 074/148] test(edition): add tests for SourcesComponent --- .../sources/sources.component.spec.ts | 488 +++++++++++++++--- .../sources/sources.component.ts | 9 + 2 files changed, 425 insertions(+), 72 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.spec.ts index 8f0381e1bf..70d7f0f9e5 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.spec.ts @@ -1,14 +1,18 @@ /* eslint-disable @typescript-eslint/no-unused-vars */ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { Component, DebugElement, EventEmitter, Input, NgModule, Output } from '@angular/core'; -import { RouterTestingModule } from '@angular/router/testing'; - -import { getAndExpectDebugElementByDirective } from '@testing/expect-helper'; -import { RouterLinkStubDirective } from '@testing/router-stubs'; import { NgbAccordionModule, NgbConfig } from '@ng-bootstrap/ng-bootstrap'; +import Spy = jasmine.Spy; + +import { expectSpyCall, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; -import { SourceDescriptionList, SourceEvaluationList, SourceList } from '@awg-views/edition-view/models'; +import { + EditionSvgSheet, + SourceDescriptionList, + SourceEvaluationList, + SourceList, +} from '@awg-views/edition-view/models'; import { SourcesComponent } from './sources.component'; @@ -43,7 +47,7 @@ class SourceEvaluationStubComponent { selectSvgSheetRequest: EventEmitter = new EventEmitter(); } -describe('SourcesComponent', () => { +describe('SourcesComponent (DONE)', () => { let component: SourcesComponent; let fixture: ComponentFixture; let compDe: DebugElement; @@ -51,6 +55,17 @@ describe('SourcesComponent', () => { let expectedSourceListData: SourceList; let expectedSourceDescriptionListData: SourceDescriptionList; let expectedSourceEvaluationListData: SourceEvaluationList; + let expectedFragment: string; + let expectedModalSnippet: string; + let expectedSvgSheet: EditionSvgSheet; + let expectedNextSvgSheet: EditionSvgSheet; + + let openModalSpy: Spy; + let openModalRequestEmitSpy: Spy; + let selectSvgSheetSpy: Spy; + let selectSvgSheetRequestEmitSpy: Spy; + let navigateToReportFragmentSpy: Spy; + let navigateToReportFragmentRequestEmitSpy: Spy; // Global NgbConfigModule @NgModule({ imports: [NgbAccordionModule], exports: [NgbAccordionModule] }) @@ -64,13 +79,12 @@ describe('SourcesComponent', () => { beforeEach( waitForAsync(() => { TestBed.configureTestingModule({ - imports: [NgbAccordionWithConfigModule, RouterTestingModule], + imports: [NgbAccordionWithConfigModule], declarations: [ SourcesComponent, SourceListStubComponent, SourceDescriptionStubComponent, SourceEvaluationStubComponent, - RouterLinkStubDirective, ], }).compileComponents(); }) @@ -80,6 +94,75 @@ describe('SourcesComponent', () => { fixture = TestBed.createComponent(SourcesComponent); component = fixture.componentInstance; compDe = fixture.debugElement; + + // Test data + expectedSourceListData = { + sources: [ + { + siglum: 'A', + type: 'Skizzen', + location: 'Basel, Paul Sacher Stiftung, Sammlung Anton Webern.', + linkTo: 'sourceA', + }, + { + siglum: 'B', + type: 'Autograph von Nr. I.', + location: 'Basel, Paul Sacher Stiftung, Sammlung Anton Webern.', + linkTo: 'OP12_SOURCE_NOT_A', + }, + { + siglum: 'C', + type: 'Autograph von Nr. I–IV.', + location: 'Basel, Paul Sacher Stiftung, Sammlung Anton Webern.', + linkTo: 'OP12_SOURCE_NOT_A', + }, + ], + }; + expectedSourceDescriptionListData = { + sources: [ + { + id: 'sourceA', + siglum: 'A', + location: 'Basel, Paul Sacher Stiftung, Sammlung Anton Webern.', + description: [], + }, + ], + }; + expectedSourceEvaluationListData = { + sources: [ + { + id: 'op12', + content: ['Die Skizzen in A sind zum Testen da.'], + }, + ], + }; + expectedFragment = 'sourceA'; + expectedSvgSheet = { + id: 'Aa:SkI/2', + svg: 'assets/img/edition/series1/section5/op12/SkI_2n_small_cut_opt.svg', + image: 'assets/img/edition/series1/section5/op12/SkI_2_small.jpg', + alt: 'Aa:SkI/2', + }; + expectedNextSvgSheet = { + id: 'Aa:SkI/3', + svg: 'assets/img/edition/series1/section5/op12/SkI_3n_small_cut_opt.svg', + image: 'assets/img/edition/series1/section5/op12/SkI_3_small.jpg', + alt: 'Aa:SkI/3', + }; + expectedModalSnippet = 'OP12_SHEET_COMING_SOON'; + + // Spies on component functions + // `.and.callThrough` will track the spy down the nested describes, see + // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E + openModalSpy = spyOn(component, 'openModal').and.callThrough(); + openModalRequestEmitSpy = spyOn(component.openModalRequest, 'emit').and.callThrough(); + selectSvgSheetSpy = spyOn(component, 'selectSvgSheet').and.callThrough(); + selectSvgSheetRequestEmitSpy = spyOn(component.selectSvgSheetRequest, 'emit').and.callThrough(); + navigateToReportFragmentSpy = spyOn(component, 'navigateToReportFragment').and.callThrough(); + navigateToReportFragmentRequestEmitSpy = spyOn( + component.navigateToReportFragmentRequest, + 'emit' + ).and.callThrough(); }); it('should create', () => { @@ -87,75 +170,35 @@ describe('SourcesComponent', () => { }); describe('BEFORE initial data binding', () => { - it('should not get sourceListData input', () => { - expect(component.sourceListData).toBeUndefined('should be undefined'); + it('should not have sourceListData', () => { + expect(component.sourceListData).withContext('should be undefined').toBeUndefined(); }); - it('should not get sourceDescriptionListData input', () => { - expect(component.sourceDescriptionListData).toBeUndefined('should be undefined'); + it('should not have sourceDescriptionListData', () => { + expect(component.sourceDescriptionListData).withContext('should be undefined').toBeUndefined(); }); - it('should not get sourceEvaluationListData input', () => { - expect(component.sourceEvaluationListData).toBeUndefined('should be undefined'); + it('should not have sourceEvaluationListData', () => { + expect(component.sourceEvaluationListData).withContext('should be undefined').toBeUndefined(); }); - it('should not contain source list component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceListStubComponent, 0, 0); - }); + describe('VIEW', () => { + it('should not contain source list component (stubbed)', () => { + getAndExpectDebugElementByDirective(compDe, SourceListStubComponent, 0, 0); + }); - it('should not contain source description component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceDescriptionStubComponent, 0, 0); - }); + it('should not contain source description component (stubbed)', () => { + getAndExpectDebugElementByDirective(compDe, SourceDescriptionStubComponent, 0, 0); + }); - it('should not contain source evaluation component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceEvaluationStubComponent, 0, 0); + it('should not contain source evaluation component (stubbed)', () => { + getAndExpectDebugElementByDirective(compDe, SourceEvaluationStubComponent, 0, 0); + }); }); }); describe('AFTER initial data binding', () => { beforeEach(() => { - // Mock the input values supplied by the parent component - expectedSourceListData = { - sources: [ - { - siglum: 'A', - type: 'Skizzen', - location: 'Basel, Paul Sacher Stiftung, Sammlung Anton Webern.', - linkTo: 'sourceA', - }, - { - siglum: 'B', - type: 'Autograph von Nr. I.', - location: 'Basel, Paul Sacher Stiftung, Sammlung Anton Webern.', - linkTo: 'OP12_SOURCE_NOT_A', - }, - { - siglum: 'C', - type: 'Autograph von Nr. I–IV.', - location: 'Basel, Paul Sacher Stiftung, Sammlung Anton Webern.', - linkTo: 'OP12_SOURCE_NOT_A', - }, - ], - }; - expectedSourceDescriptionListData = { - sources: [ - { - id: 'sourceA', - siglum: 'A', - location: 'Basel, Paul Sacher Stiftung, Sammlung Anton Webern.', - description: [], - }, - ], - }; - expectedSourceEvaluationListData = { - sources: [ - { - id: 'op12', - content: ['Die Skizzen in A sind zum Testen da.'], - }, - ], - }; - // Simulate the parent setting the input properties component.sourceListData = expectedSourceListData; component.sourceDescriptionListData = expectedSourceDescriptionListData; @@ -165,20 +208,321 @@ describe('SourcesComponent', () => { fixture.detectChanges(); }); - it('should get sourceListData input', () => { - expect(component.sourceListData).toBe(expectedSourceListData); + it('should have sourceListData', () => { + expect(component.sourceListData).toBeTruthy(); + expect(component.sourceListData) + .withContext(`should be ${expectedSourceListData}`) + .toBe(expectedSourceListData); + }); + + it('should have sourceDescriptionListData', () => { + expect(component.sourceDescriptionListData).toBeTruthy(); + expect(component.sourceDescriptionListData) + .withContext(`should be ${expectedSourceDescriptionListData}`) + .toBe(expectedSourceDescriptionListData); }); - it('should contain source list component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceListStubComponent, 1, 1); + it('should have sourceEvaluationListData', () => { + expect(component.sourceEvaluationListData).toBeTruthy(); + expect(component.sourceEvaluationListData) + .withContext(`should be ${expectedSourceEvaluationListData}`) + .toBe(expectedSourceEvaluationListData); }); - it('should contain source description component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceDescriptionStubComponent, 1, 1); + describe('VIEW', () => { + it('should contain source list component (stubbed)', () => { + getAndExpectDebugElementByDirective(compDe, SourceListStubComponent, 1, 1); + }); + + it('should contain source description component (stubbed)', () => { + getAndExpectDebugElementByDirective(compDe, SourceDescriptionStubComponent, 1, 1); + }); + + it('should contain source evaluation component (stubbed)', () => { + getAndExpectDebugElementByDirective(compDe, SourceEvaluationStubComponent, 1, 1); + }); + }); + + describe('#navigateToReportFragment', () => { + describe('... should trigger on event from SourceEvaluationComponent if', () => { + it('... fragment is undefined', () => { + const evaluationDes = getAndExpectDebugElementByDirective( + compDe, + SourceEvaluationStubComponent, + 1, + 1 + ); + const evaluationCmp = evaluationDes[0].injector.get( + SourceEvaluationStubComponent + ) as SourceEvaluationStubComponent; + + evaluationCmp.navigateToReportFragmentRequest.emit(undefined); + + expectSpyCall(navigateToReportFragmentSpy, 1, undefined); + }); + + it('... fragment is given', () => { + const evaluationDes = getAndExpectDebugElementByDirective( + compDe, + SourceEvaluationStubComponent, + 1, + 1 + ); + const evaluationCmp = evaluationDes[0].injector.get( + SourceEvaluationStubComponent + ) as SourceEvaluationStubComponent; + + evaluationCmp.navigateToReportFragmentRequest.emit(expectedFragment); + + expectSpyCall(navigateToReportFragmentSpy, 1, expectedFragment); + }); + }); + + describe('... should not emit anything if', () => { + it('... id is undefined', () => { + component.navigateToReportFragment(undefined); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 0); + }); + it('... id is null', () => { + component.navigateToReportFragment(null); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 0); + }); + it('... id is empty string', () => { + component.navigateToReportFragment(''); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 0); + }); + }); + + it('... should emit id of selected report fragment', () => { + component.navigateToReportFragment(expectedFragment); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 1, expectedFragment); + + const otherFragment = 'sourceB'; + component.navigateToReportFragment(otherFragment); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 2, otherFragment); + }); }); - it('should contain source evaluation component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceEvaluationStubComponent, 1, 1); + describe('#openModal', () => { + describe('... should trigger on event from', () => { + describe('... SourceListComponent if', () => { + it('... modal snippet is undefined', () => { + const listDes = getAndExpectDebugElementByDirective(compDe, SourceListStubComponent, 1, 1); + const listCmp = listDes[0].injector.get(SourceListStubComponent) as SourceListStubComponent; + + listCmp.openModalRequest.emit(undefined); + + expectSpyCall(openModalSpy, 1, undefined); + }); + + it('... modal snippet is given', () => { + const listDes = getAndExpectDebugElementByDirective(compDe, SourceListStubComponent, 1, 1); + const listCmp = listDes[0].injector.get(SourceListStubComponent) as SourceListStubComponent; + + listCmp.openModalRequest.emit(expectedModalSnippet); + + expectSpyCall(openModalSpy, 1, expectedModalSnippet); + }); + }); + + describe('... SourceDescriptionComponent if', () => { + it('... modal snippet is undefined', () => { + const descriptionDes = getAndExpectDebugElementByDirective( + compDe, + SourceDescriptionStubComponent, + 1, + 1 + ); + const descriptionCmp = descriptionDes[0].injector.get( + SourceDescriptionStubComponent + ) as SourceDescriptionStubComponent; + + descriptionCmp.openModalRequest.emit(undefined); + + expectSpyCall(openModalSpy, 1, undefined); + }); + + it('... modal snippet is given', () => { + const descriptionDes = getAndExpectDebugElementByDirective( + compDe, + SourceDescriptionStubComponent, + 1, + 1 + ); + const descriptionCmp = descriptionDes[0].injector.get( + SourceDescriptionStubComponent + ) as SourceDescriptionStubComponent; + + descriptionCmp.openModalRequest.emit(expectedModalSnippet); + + expectSpyCall(openModalSpy, 1, expectedModalSnippet); + }); + }); + + describe('... SourceEvaluationComponent if', () => { + it('... modal snippet is undefined', () => { + const evaluationDes = getAndExpectDebugElementByDirective( + compDe, + SourceEvaluationStubComponent, + 1, + 1 + ); + const evaluationCmp = evaluationDes[0].injector.get( + SourceEvaluationStubComponent + ) as SourceEvaluationStubComponent; + + evaluationCmp.openModalRequest.emit(undefined); + + expectSpyCall(openModalSpy, 1, undefined); + }); + + it('... modal snippet is given', () => { + const evaluationDes = getAndExpectDebugElementByDirective( + compDe, + SourceEvaluationStubComponent, + 1, + 1 + ); + const evaluationCmp = evaluationDes[0].injector.get( + SourceEvaluationStubComponent + ) as SourceEvaluationStubComponent; + + evaluationCmp.openModalRequest.emit(expectedModalSnippet); + + expectSpyCall(openModalSpy, 1, expectedModalSnippet); + }); + }); + }); + + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + + it('... id is null', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0, null); + }); + it('... id is empty string', () => { + component.openModal(''); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + }); + + it('... should emit id of given modal snippet', () => { + component.openModal(expectedModalSnippet); + + expectSpyCall(openModalRequestEmitSpy, 1, expectedModalSnippet); + }); + }); + + describe('#selectSvgSheet', () => { + describe('... should trigger on event from', () => { + describe('... SourceDescriptionComponent if', () => { + it('... svg sheet id is undefined', () => { + const descriptinDes = getAndExpectDebugElementByDirective( + compDe, + SourceDescriptionStubComponent, + 1, + 1 + ); + const descriptionCmp = descriptinDes[0].injector.get( + SourceDescriptionStubComponent + ) as SourceDescriptionStubComponent; + + descriptionCmp.selectSvgSheetRequest.emit(undefined); + + expectSpyCall(selectSvgSheetSpy, 1, undefined); + }); + + it('... svg sheet id is given', () => { + const descriptinDes = getAndExpectDebugElementByDirective( + compDe, + SourceDescriptionStubComponent, + 1, + 1 + ); + const descriptionCmp = descriptinDes[0].injector.get( + SourceDescriptionStubComponent + ) as SourceDescriptionStubComponent; + + descriptionCmp.selectSvgSheetRequest.emit(expectedSvgSheet.id); + + expectSpyCall(selectSvgSheetSpy, 1, expectedSvgSheet.id); + }); + }); + + describe('... SourceEvaluationComponent if', () => { + it('... svg sheet id is undefined', () => { + const evaluationDes = getAndExpectDebugElementByDirective( + compDe, + SourceEvaluationStubComponent, + 1, + 1 + ); + const evaluationCmp = evaluationDes[0].injector.get( + SourceEvaluationStubComponent + ) as SourceEvaluationStubComponent; + + evaluationCmp.selectSvgSheetRequest.emit(undefined); + + expectSpyCall(selectSvgSheetSpy, 1, undefined); + }); + + it('... svg sheet id is given', () => { + const evaluationDes = getAndExpectDebugElementByDirective( + compDe, + SourceEvaluationStubComponent, + 1, + 1 + ); + const evaluationCmp = evaluationDes[0].injector.get( + SourceEvaluationStubComponent + ) as SourceEvaluationStubComponent; + + evaluationCmp.selectSvgSheetRequest.emit(expectedSvgSheet.id); + + expectSpyCall(selectSvgSheetSpy, 1, expectedSvgSheet.id); + }); + }); + }); + + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.selectSvgSheet(undefined); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + it('... id is null', () => { + component.selectSvgSheet(null); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + it('... id is empty string', () => { + component.selectSvgSheet(''); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + }); + + it('... should emit id of selected svg sheet', () => { + component.selectSvgSheet(expectedSvgSheet.id); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 1, expectedSvgSheet.id); + + component.selectSvgSheet(expectedNextSvgSheet.id); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 2, expectedNextSvgSheet.id); + }); }); }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.ts b/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.ts index ffc71c2721..deec7e6bb1 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.ts @@ -76,6 +76,9 @@ export class SourcesComponent { * @returns {void} Navigates to the edition report. */ navigateToReportFragment(fragmentId: string) { + if (!fragmentId) { + return; + } this.navigateToReportFragmentRequest.emit(fragmentId); } @@ -90,6 +93,9 @@ export class SourcesComponent { * @returns {void} Emits the id. */ openModal(id: string): void { + if (!id) { + return; + } this.openModalRequest.emit(id); } @@ -103,6 +109,9 @@ export class SourcesComponent { * @returns {void} Emits the id. */ selectSvgSheet(id: string): void { + if (!id) { + return; + } this.selectSvgSheetRequest.emit(id); } } From 599e3da377c28ade29db24d5c0acdb1b64333938 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 22:32:57 +0100 Subject: [PATCH 075/148] test(edition): adjust tests for SourceDescriptionComponent --- .../source-description.component.html | 9 +- .../source-description.component.spec.ts | 278 +++++++++++++----- 2 files changed, 204 insertions(+), 83 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-description/source-description.component.html b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-description/source-description.component.html index ac1afc659f..002dd474d8 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-description/source-description.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-description/source-description.component.html @@ -3,10 +3,15 @@ class="awg-source-description para" *ngFor="let sourceDescription of sourceDescriptionListData.sources" [id]="sourceDescription.id"> -

        {{ sourceDescription.siglum }}

        -

        {{ sourceDescription.location }}

        +

        + {{ sourceDescription.siglum }} +

        +

        + {{ sourceDescription.location }} +

        diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-description/source-description.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-description/source-description.component.spec.ts index 0075abd3c3..4657b25ebd 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-description/source-description.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-description/source-description.component.spec.ts @@ -67,7 +67,7 @@ describe('SourceDescriptionComponent (DONE)', () => { { id: 'sourceAa', siglum: 'Aa', - location: '', + location: 'Wien, Testcentre.', description: [ '
        auf Bl. 1r unten links (Bl. 1);
        Notenpapier, 16 Systeme, Format: quer 175 × 270 mm, kein Firmenzeichen (Bl. 2).', 'Inhalt: (SkI/1a). (SkI/2).', @@ -93,13 +93,12 @@ describe('SourceDescriptionComponent (DONE)', () => { describe('BEFORE initial data binding', () => { it('should not have sourceDescriptionListData', () => { - expect(component.sourceDescriptionListData).toBeUndefined('should be undefined'); + expect(component.sourceDescriptionListData).withContext('should be undefined').toBeUndefined(); }); it('should have ref', () => { expect(component.ref).toBeTruthy(); - // @ts-ignore - expect(component.ref).toEqual(component, `should equal ${component}`); + expect(component.ref).withContext(`should equal ${component}`).toEqual(component); }); describe('VIEW', () => { @@ -118,83 +117,173 @@ describe('SourceDescriptionComponent (DONE)', () => { fixture.detectChanges(); }); + it('should have sourceDescriptionListData', () => { + expect(component.sourceDescriptionListData).toBeTruthy(); + expect(component.sourceDescriptionListData) + .withContext(`should equal ${expectedSourceDescriptionListData}`) + .toEqual(expectedSourceDescriptionListData); + }); + describe('VIEW', () => { - it('... should contain one description list div', () => { + it('... should contain one main description list div', () => { getAndExpectDebugElementByCss(compDe, 'div.awg-source-description-list', 1, 1); }); - it('... should contain two description divs in main div', () => { + it('... should contain as many description divs in main list div as description data has source entries', () => { getAndExpectDebugElementByCss( compDe, 'div.awg-source-description-list > div.awg-source-description', - 2, - 2 + expectedSourceDescriptionListData.sources.length, + expectedSourceDescriptionListData.sources.length ); }); - it('... should contain two paragraphs in first description div', () => { - const divDes = getAndExpectDebugElementByCss( - compDe, - 'div.awg-source-description-list > div.awg-source-description', - 2, - 2 - ); - - const pDes = getAndExpectDebugElementByCss(divDes[0], 'p', 2, 2); - - const pCmp0 = pDes[0].nativeElement; - const pCmp1 = pDes[1].nativeElement; - - expect(pCmp0.textContent).toBeDefined('should be defined'); - expect(pCmp0.textContent).toBe( - expectedSourceDescriptionListData.sources[0].siglum, - `should be ${expectedSourceDescriptionListData.sources[0].siglum}` - ); - - expect(pCmp1.textContent).toBeDefined('should be defined'); - expect(pCmp1.textContent).toBe( - expectedSourceDescriptionListData.sources[0].location, - `should be ${expectedSourceDescriptionListData.sources[0].location}` - ); + describe('... first description div', () => { + it('... should contain two paragraphs', () => { + const divDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-description-list > div.awg-source-description', + 2, + 2 + ); + + getAndExpectDebugElementByCss(divDes[0], 'p', 2, 2); + }); + + it('... the first one displaying siglum', () => { + const divDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-description-list > div.awg-source-description', + 2, + 2 + ); + + const pDes = getAndExpectDebugElementByCss(divDes[0], 'p', 2, 2); + + const pCmp = pDes[0].nativeElement; + + expect(pCmp).toHaveClass('awg-source-description-siglum'); + expect(pCmp.textContent).withContext('should be defined').toBeDefined(); + expect(pCmp.textContent.trim()) + .withContext(`should be ${expectedSourceDescriptionListData.sources[0].siglum.trim()}`) + .toBe(expectedSourceDescriptionListData.sources[0].siglum.trim()); + }); + + it('... the second one displaying location', () => { + const divDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-description-list > div.awg-source-description', + 2, + 2 + ); + + const pDes = getAndExpectDebugElementByCss(divDes[0], 'p', 2, 2); + + const pCmp = pDes[1].nativeElement; + + expect(pCmp).toHaveClass('awg-source-description-location'); + expect(pCmp.textContent).withContext('should be defined').toBeDefined(); + expect(pCmp.textContent.trim()) + .withContext(`should be ${expectedSourceDescriptionListData.sources[0].location.trim()}`) + .toBe(expectedSourceDescriptionListData.sources[0].location.trim()); + }); }); - it('... should contain 3 paragraphs in second description div', () => { - const divDes = getAndExpectDebugElementByCss( - compDe, - 'div.awg-source-description-list > div.awg-source-description', - 2, - 2 - ); - - const pDes = getAndExpectDebugElementByCss(divDes[1], 'p', 3, 3); - - const pCmp0 = pDes[0].nativeElement; - const pCmp1 = pDes[1].nativeElement; - const pCmp2 = pDes[2].nativeElement; - - expect(pCmp0.textContent).toBeDefined('should be defined'); - expect(pCmp0.textContent).toBe( - expectedSourceDescriptionListData.sources[1].siglum, - `should be ${expectedSourceDescriptionListData.sources[1].siglum}` - ); - - // Process HTML expression of description - const htmlDescription = mockDocument.createElement('p'); - htmlDescription.innerHTML = expectedSourceDescriptionListData.sources[1].description[0]; - - expect(pCmp1.textContent).toBeDefined('should be defined'); - expect(pCmp1.textContent.trim()).toBe( - htmlDescription.textContent.trim(), - `should be ${htmlDescription.textContent.trim()}` - ); - - htmlDescription.innerHTML = expectedSourceDescriptionListData.sources[1].description[1]; - - expect(pCmp2.textContent).toBeDefined('should be defined'); - expect(pCmp2.textContent.trim()).toBe( - htmlDescription.textContent.trim(), - `should be ${htmlDescription.textContent.trim()}` - ); + describe('... second description div', () => { + it('... should contain 4 paragraphs', () => { + const divDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-description-list > div.awg-source-description', + 2, + 2 + ); + + getAndExpectDebugElementByCss(divDes[1], 'p', 4, 4); + }); + + it('... the first one displaying siglum', () => { + const divDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-description-list > div.awg-source-description', + 2, + 2 + ); + + const pDes = getAndExpectDebugElementByCss(divDes[1], 'p', 4, 4); + + const pCmp = pDes[0].nativeElement; + + expect(pCmp).toHaveClass('awg-source-description-siglum'); + expect(pCmp.textContent).withContext('should be defined').toBeDefined(); + expect(pCmp.textContent.trim()) + .withContext(`should be ${expectedSourceDescriptionListData.sources[1].siglum.trim()}`) + .toBe(expectedSourceDescriptionListData.sources[1].siglum.trim()); + }); + + it('... the second one displaying location', () => { + const divDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-description-list > div.awg-source-description', + 2, + 2 + ); + + const pDes = getAndExpectDebugElementByCss(divDes[1], 'p', 4, 4); + + const pCmp = pDes[1].nativeElement; + + expect(pCmp).toHaveClass('awg-source-description-location'); + expect(pCmp.textContent).withContext('should be defined').toBeDefined(); + expect(pCmp.textContent.trim()) + .withContext(`should be ${expectedSourceDescriptionListData.sources[1].location.trim()}`) + .toBe(expectedSourceDescriptionListData.sources[1].location.trim()); + }); + + it('... the third one displaying the first description', () => { + const divDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-description-list > div.awg-source-description', + 2, + 2 + ); + + const pDes = getAndExpectDebugElementByCss(divDes[1], 'p', 4, 4); + + const pCmp = pDes[2].nativeElement; + + // Process HTML expression of description entry + const htmlDescriptionEntry = mockDocument.createElement('p'); + htmlDescriptionEntry.innerHTML = expectedSourceDescriptionListData.sources[1].description[0]; + + expect(pCmp).toHaveClass('awg-source-description-entry'); + expect(pCmp.textContent).withContext('should be defined').toBeDefined(); + expect(pCmp.textContent.trim()) + .withContext(`should be ${htmlDescriptionEntry.textContent.trim()}`) + .toBe(htmlDescriptionEntry.textContent.trim()); + }); + + it('... the foruth one displaying the second description', () => { + const divDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-description-list > div.awg-source-description', + 2, + 2 + ); + + const pDes = getAndExpectDebugElementByCss(divDes[1], 'p', 4, 4); + + const pCmp = pDes[3].nativeElement; + + // Process HTML expression of description entry + const htmlDescriptionEntry = mockDocument.createElement('p'); + htmlDescriptionEntry.innerHTML = expectedSourceDescriptionListData.sources[1].description[1]; + + expect(pCmp).toHaveClass('awg-source-description-entry'); + expect(pCmp.textContent).withContext('should be defined').toBeDefined(); + expect(pCmp.textContent.trim()) + .withContext(`should be ${htmlDescriptionEntry.textContent.trim()}`) + .toBe(htmlDescriptionEntry.textContent.trim()); + }); }); }); @@ -206,10 +295,11 @@ describe('SourceDescriptionComponent (DONE)', () => { 2, 2 ); - const pDes = getAndExpectDebugElementByCss(divDes[1], 'p', 3, 3); + // Find description paragraphs + const pDes = getAndExpectDebugElementByCss(divDes[1], 'p.awg-source-description-entry', 2, 2); - // Find anchors in third paragraph - const anchorDes = getAndExpectDebugElementByCss(pDes[2], 'a', 2, 2); + // Find anchors in second description paragraph + const anchorDes = getAndExpectDebugElementByCss(pDes[1], 'a', 2, 2); // Click on first anchor with modal call clickAndAwaitChanges(anchorDes[0], fixture); @@ -217,10 +307,23 @@ describe('SourceDescriptionComponent (DONE)', () => { expectSpyCall(openModalSpy, 1, expectedModalSnippet); })); - it('... should not emit anything if no id is provided', () => { - component.openModal(undefined); + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); - expectSpyCall(openModalRequestEmitSpy, 0, undefined); + it('... id is null', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0, null); + }); + it('... id is empty string', () => { + component.openModal(''); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); }); it('... should emit id of given modal snippet', () => { @@ -238,10 +341,11 @@ describe('SourceDescriptionComponent (DONE)', () => { 2, 2 ); - const pDes = getAndExpectDebugElementByCss(divDes[1], 'p', 3, 3); + // Find description paragraphs + const pDes = getAndExpectDebugElementByCss(divDes[1], 'p.awg-source-description-entry', 2, 2); - // Find anchors in third paragraph - const anchorDes = getAndExpectDebugElementByCss(pDes[2], 'a', 2, 2); + // Find anchors in second paragraph + const anchorDes = getAndExpectDebugElementByCss(pDes[1], 'a', 2, 2); // CLick on second anchor (with selectSvgSheet call) clickAndAwaitChanges(anchorDes[1], fixture); @@ -249,10 +353,22 @@ describe('SourceDescriptionComponent (DONE)', () => { expectSpyCall(selectSvgSheetSpy, 1, expectedSvgSheet.id); })); - it('... should not emit anything if no id is provided', () => { - component.selectSvgSheet(undefined); + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.selectSvgSheet(undefined); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + it('... id is null', () => { + component.selectSvgSheet(null); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + it('... id is empty string', () => { + component.selectSvgSheet(''); - expectSpyCall(selectSvgSheetRequestEmitSpy, 0, undefined); + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); }); it('... should emit id of selected svg sheet', () => { From 3dc72e3ab3f17cadbd48bf091e9dc3ca838746ec Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 22:34:11 +0100 Subject: [PATCH 076/148] test(edition): add tests for SourceEvaluationComponent --- .../source-evaluation.component.html | 3 +- .../source-evaluation.component.spec.ts | 282 +++++++++++++++++- .../source-evaluation.component.ts | 9 + 3 files changed, 289 insertions(+), 5 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.html b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.html index 0c4d7defa0..06769c7302 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.html @@ -1,5 +1,6 @@ -
        +

        diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.spec.ts index d19c6626b1..9e1990e072 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.spec.ts @@ -1,14 +1,37 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; +import { ComponentFixture, fakeAsync, TestBed, waitForAsync } from '@angular/core/testing'; +import { DOCUMENT } from '@angular/common'; +import { DebugElement } from '@angular/core'; +import Spy = jasmine.Spy; + +import { clickAndAwaitChanges } from '@testing/click-helper'; +import { expectSpyCall, getAndExpectDebugElementByCss } from '@testing/expect-helper'; import { RouterLinkStubDirective } from '@testing/router-stubs'; import { CompileHtmlComponent } from '@awg-shared/compile-html'; +import { EditionSvgSheet, SourceEvaluationList } from '@awg-views/edition-view/models'; + import { SourceEvaluationComponent } from './source-evaluation.component'; -describe('SourceEvaluationComponent', () => { +describe('SourceEvaluationComponent (DONE)', () => { let component: SourceEvaluationComponent; let fixture: ComponentFixture; + let compDe: DebugElement; + + let mockDocument: Document; + + let expectedSourceEvaluationListData: SourceEvaluationList; + let expectedFragment: string; + let expectedModalSnippet: string; + let expectedSvgSheet: EditionSvgSheet; + let expectedNextSvgSheet: EditionSvgSheet; + + let openModalSpy: Spy; + let openModalRequestEmitSpy: Spy; + let selectSvgSheetSpy: Spy; + let selectSvgSheetRequestEmitSpy: Spy; + let navigateToReportFragmentSpy: Spy; + let navigateToReportFragmentRequestEmitSpy: Spy; beforeEach( waitForAsync(() => { @@ -21,10 +44,261 @@ describe('SourceEvaluationComponent', () => { beforeEach(() => { fixture = TestBed.createComponent(SourceEvaluationComponent); component = fixture.componentInstance; - fixture.detectChanges(); + compDe = fixture.debugElement; + + // Test data + expectedFragment = 'sourceA'; + expectedSvgSheet = { + id: 'Aa:SkI/2', + svg: 'assets/img/edition/series1/section5/op12/SkI_2n_small_cut_opt.svg', + image: 'assets/img/edition/series1/section5/op12/SkI_2_small.jpg', + alt: 'Aa:SkI/2', + }; + expectedNextSvgSheet = { + id: 'Aa:SkI/3', + svg: 'assets/img/edition/series1/section5/op12/SkI_3n_small_cut_opt.svg', + image: 'assets/img/edition/series1/section5/op12/SkI_3_small.jpg', + alt: 'Aa:SkI/3', + }; + expectedModalSnippet = 'OP12_SHEET_COMING_SOON'; + expectedSourceEvaluationListData = { + sources: [ + { + id: 'op25', + content: [ + '[Die Quellenbewertung zum gesamten Werkkomplex Drei Lieder nach Gedichten von Hildegard Jone op. 25 erscheint im Zusammenhang der vollständigen Edition von Opus 25 in AWG I/5.]', + 'Die Skizzen in A enthalten u. a. Aa:SkI/1 (13. Januar 1915) als Korrekturen einer in B und in Aa:SkI/2–5 vorformulierten Fassung dar.', + ], + }, + ], + }; + + mockDocument = TestBed.inject(DOCUMENT); + + // Spies on component functions + // `.and.callThrough` will track the spy down the nested describes, see + // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E + openModalSpy = spyOn(component, 'openModal').and.callThrough(); + openModalRequestEmitSpy = spyOn(component.openModalRequest, 'emit').and.callThrough(); + selectSvgSheetSpy = spyOn(component, 'selectSvgSheet').and.callThrough(); + selectSvgSheetRequestEmitSpy = spyOn(component.selectSvgSheetRequest, 'emit').and.callThrough(); + navigateToReportFragmentSpy = spyOn(component, 'navigateToReportFragment').and.callThrough(); + navigateToReportFragmentRequestEmitSpy = spyOn( + component.navigateToReportFragmentRequest, + 'emit' + ).and.callThrough(); }); it('should create', () => { expect(component).toBeTruthy(); }); + + describe('BEFORE initial data binding', () => { + it('should not have sourceDescriptionListData', () => { + expect(component.sourceEvaluationListData).withContext('should be undefined').toBeUndefined(); + }); + + it('should have ref', () => { + expect(component.ref).toBeTruthy(); + expect(component.ref).withContext(`should equal ${component}`).toEqual(component); + }); + + describe('VIEW', () => { + it('... should contain no div yet', () => { + getAndExpectDebugElementByCss(compDe, 'div', 0, 0); + }); + }); + }); + + describe('AFTER initial data binding', () => { + beforeEach(() => { + // Simulate the parent setting the input properties + component.sourceEvaluationListData = expectedSourceEvaluationListData; + + // Trigger initial data binding + fixture.detectChanges(); + }); + + it('should have sourceEvaluationListData', () => { + expect(component.sourceEvaluationListData).toBeTruthy(); + expect(component.sourceEvaluationListData) + .withContext(`should equal ${expectedSourceEvaluationListData}`) + .toEqual(expectedSourceEvaluationListData); + }); + + describe('VIEW', () => { + it('... should contain one evaluation list div', () => { + getAndExpectDebugElementByCss(compDe, 'div.awg-source-evaluation-list', 1, 1); + }); + + it('... should contain as many paragraphs in div as evaluation data has content entries', () => { + const divDes = getAndExpectDebugElementByCss(compDe, 'div.awg-source-evaluation-list', 1, 1); + + getAndExpectDebugElementByCss(divDes[0], 'p.awg-source-evaluation-entry', 2, 2); + }); + + it('... should display evaluation entries in paragraphs', () => { + const pDes = getAndExpectDebugElementByCss( + compDe, + 'div.awg-source-evaluation-list > p.awg-source-evaluation-entry', + 2, + 2 + ); + + const pCmp0 = pDes[0].nativeElement; + const pCmp1 = pDes[1].nativeElement; + + // Process HTML expression of first evaluation entry + let htmlEvaluationEntry = mockDocument.createElement('p'); + htmlEvaluationEntry.innerHTML = expectedSourceEvaluationListData.sources[0].content[0]; + + expect(pCmp0.textContent).withContext('should be defined').toBeDefined(); + expect(pCmp0.textContent.trim()) + .withContext(`should be ${htmlEvaluationEntry.textContent.trim()}`) + .toEqual(htmlEvaluationEntry.textContent.trim()); + + // Process HTML expression of second evaluation entry + htmlEvaluationEntry = mockDocument.createElement('p'); + htmlEvaluationEntry.innerHTML = expectedSourceEvaluationListData.sources[0].content[1]; + + expect(pCmp1.textContent).withContext('should be defined').toBeDefined(); + expect(pCmp1.textContent.trim()) + .withContext(`should be ${htmlEvaluationEntry.textContent.trim()}`) + .toBe(htmlEvaluationEntry.textContent.trim()); + }); + }); + + describe('#navigateToReportFragment', () => { + it('... should trigger on click', fakeAsync(() => { + const divDes = getAndExpectDebugElementByCss(compDe, 'div.awg-source-evaluation-list', 1, 1); + + // Find evaluation paragraphs + const pDes = getAndExpectDebugElementByCss(divDes[0], 'p.awg-source-evaluation-entry', 2, 2); + + // Find anchors in second paragraph + const anchorDes = getAndExpectDebugElementByCss(pDes[1], 'a', 3, 3); + + // CLick on first anchor (with navigateToReportFragment call) + clickAndAwaitChanges(anchorDes[0], fixture); + + expectSpyCall(navigateToReportFragmentSpy, 1, expectedFragment); + })); + + describe('... should not emit anything if', () => { + it('... id is undefined', () => { + component.navigateToReportFragment(undefined); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 0); + }); + it('... id is null', () => { + component.navigateToReportFragment(null); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 0); + }); + it('... id is empty string', () => { + component.navigateToReportFragment(''); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 0); + }); + }); + + it('... should emit id of selected report fragment', () => { + component.navigateToReportFragment(expectedFragment); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 1, expectedFragment); + + const otherFragment = 'sourceB'; + component.navigateToReportFragment(otherFragment); + + expectSpyCall(navigateToReportFragmentRequestEmitSpy, 2, otherFragment); + }); + }); + + describe('#openModal', () => { + it('... should trigger on click', fakeAsync(() => { + const divDes = getAndExpectDebugElementByCss(compDe, 'div.awg-source-evaluation-list', 1, 1); + + // Find evaluation paragraphs + const pDes = getAndExpectDebugElementByCss(divDes[0], 'p.awg-source-evaluation-entry', 2, 2); + + // Find anchors in second description paragraph + const anchorDes = getAndExpectDebugElementByCss(pDes[1], 'a', 3, 3); + + // Click on second anchor with modal call + clickAndAwaitChanges(anchorDes[1], fixture); + + expectSpyCall(openModalSpy, 1, expectedModalSnippet); + })); + + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + + it('... id is null', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0, null); + }); + it('... id is empty string', () => { + component.openModal(''); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + }); + + it('... should emit id of given modal snippet', () => { + component.openModal(expectedModalSnippet); + + expectSpyCall(openModalRequestEmitSpy, 1, expectedModalSnippet); + }); + }); + + describe('#selectSvgSheet', () => { + it('... should trigger on click', fakeAsync(() => { + const divDes = getAndExpectDebugElementByCss(compDe, 'div.awg-source-evaluation-list', 1, 1); + + // Find evaluation paragraphs + const pDes = getAndExpectDebugElementByCss(divDes[0], 'p.awg-source-evaluation-entry', 2, 2); + + // Find anchors in second paragraph + const anchorDes = getAndExpectDebugElementByCss(pDes[1], 'a', 3, 3); + + // CLick on third anchor (with selectSvgSheet call) + clickAndAwaitChanges(anchorDes[2], fixture); + + expectSpyCall(selectSvgSheetSpy, 1, expectedSvgSheet.id); + })); + + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.selectSvgSheet(undefined); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + it('... id is null', () => { + component.selectSvgSheet(null); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + it('... id is empty string', () => { + component.selectSvgSheet(''); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + }); + + it('... should emit id of selected svg sheet', () => { + component.selectSvgSheet(expectedSvgSheet.id); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 1, expectedSvgSheet.id); + + component.selectSvgSheet(expectedNextSvgSheet.id); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 2, expectedNextSvgSheet.id); + }); + }); + }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.ts b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.ts index 1ad79683f3..b2b6b319a5 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-evaluation/source-evaluation.component.ts @@ -74,6 +74,9 @@ export class SourceEvaluationComponent { * @returns {void} Navigates to the edition report. */ navigateToReportFragment(id: string) { + if (!id) { + return; + } this.navigateToReportFragmentRequest.emit(id); } @@ -87,6 +90,9 @@ export class SourceEvaluationComponent { * @returns {void} Emits the id. */ openModal(id: string): void { + if (!id) { + return; + } this.openModalRequest.emit(id); } @@ -100,6 +106,9 @@ export class SourceEvaluationComponent { * @returns {void} Emits the id. */ selectSvgSheet(id: string): void { + if (!id) { + return; + } this.selectSvgSheetRequest.emit(id); } } From 2572ee47741a8b2cd88512bc9ec43269d5216295 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 22:36:26 +0100 Subject: [PATCH 077/148] test(edition): adjust tests for SourceListComponent --- .../source-list/source-list.component.spec.ts | 121 ++++++++++-------- 1 file changed, 65 insertions(+), 56 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-list/source-list.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-list/source-list.component.spec.ts index a143b6d1fc..81de2af5f4 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/source-list/source-list.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/source-list/source-list.component.spec.ts @@ -73,13 +73,12 @@ describe('SourceListComponent (DONE)', () => { describe('BEFORE initial data binding', () => { it('should not have sourceListData', () => { - expect(component.sourceListData).toBeUndefined('should be undefined'); + expect(component.sourceListData).withContext('should be undefined').toBeUndefined(); }); it('should have ref', () => { expect(component.ref).toBeTruthy(); - // @ts-ignore - expect(component.ref).toEqual(component, `should equal ${component}`); + expect(component.ref).withContext(`should equal ${component}`).toEqual(component); }); describe('VIEW', () => { @@ -101,7 +100,10 @@ describe('SourceListComponent (DONE)', () => { }); it('should have sourceListData', () => { - expect(component.sourceListData).toBe(expectedSourceListData); + expect(component.sourceListData).toBeTruthy(); + expect(component.sourceListData) + .withContext(`should equal ${expectedSourceListData}`) + .toEqual(expectedSourceListData); }); describe('VIEW', () => { @@ -139,23 +141,20 @@ describe('SourceListComponent (DONE)', () => { const anchorCmp1 = anchorDes1[0].nativeElement; const anchorCmp2 = anchorDes2[0].nativeElement; - expect(anchorCmp0.textContent).toBeDefined('should be defined'); - expect(anchorCmp0.textContent).toBe( - expectedSourceListData.sources[0].siglum, - `should be ${expectedSourceListData.sources[0].siglum}` - ); - - expect(anchorCmp1.textContent).toBeDefined('should be defined'); - expect(anchorCmp1.textContent).toBe( - expectedSourceListData.sources[1].siglum, - `should be ${expectedSourceListData.sources[1].siglum}` - ); - - expect(anchorCmp2.textContent).toBeDefined('should be defined'); - expect(anchorCmp2.textContent).toBe( - expectedSourceListData.sources[2].siglum, - `should be ${expectedSourceListData.sources[2].siglum}` - ); + expect(anchorCmp0.textContent).withContext('should be defined').toBeDefined(); + expect(anchorCmp0.textContent) + .withContext(`should be ${expectedSourceListData.sources[0].siglum}`) + .toBe(expectedSourceListData.sources[0].siglum); + + expect(anchorCmp1.textContent).withContext('should be defined').toBeDefined(); + expect(anchorCmp1.textContent) + .withContext(`should be ${expectedSourceListData.sources[1].siglum}`) + .toBe(expectedSourceListData.sources[1].siglum); + + expect(anchorCmp2.textContent).withContext('should be defined').toBeDefined(); + expect(anchorCmp2.textContent) + .withContext(`should be ${expectedSourceListData.sources[2].siglum}`) + .toBe(expectedSourceListData.sources[2].siglum); }); it('... should contain source type and source location in second table column (td)', () => { @@ -178,38 +177,35 @@ describe('SourceListComponent (DONE)', () => { const spanCmp20 = spanDes2[0].nativeElement; const spanCmp21 = spanDes2[1].nativeElement; - expect(spanCmp00.textContent).toBeDefined('should be defined'); - expect(spanCmp00.textContent).toBe( - expectedSourceListData.sources[0].type, - `should be ${expectedSourceListData.sources[0].type}` - ); - expect(spanCmp01.textContent).toBeDefined('should be defined'); - expect(spanCmp01.textContent).toBe( - expectedSourceListData.sources[0].location, - `should be ${expectedSourceListData.sources[0].location}` - ); - - expect(spanCmp10.textContent).toBeDefined('should be defined'); - expect(spanCmp10.textContent).toBe( - expectedSourceListData.sources[1].type, - `should be ${expectedSourceListData.sources[1].type}` - ); - expect(spanCmp11.textContent).toBeDefined('should be defined'); - expect(spanCmp11.textContent).toBe( - expectedSourceListData.sources[1].location, - `should be ${expectedSourceListData.sources[1].location}` - ); - - expect(spanCmp20.textContent).toBeDefined('should be defined'); - expect(spanCmp20.textContent).toBe( - expectedSourceListData.sources[2].type, - `should be ${expectedSourceListData.sources[2].type}` - ); - expect(spanCmp21.textContent).toBeDefined('should be defined'); - expect(spanCmp21.textContent).toBe( - expectedSourceListData.sources[2].location, - `should be ${expectedSourceListData.sources[2].location}` - ); + expect(spanCmp00.textContent).withContext('should be defined').toBeDefined(); + expect(spanCmp00.textContent) + .withContext(`should be ${expectedSourceListData.sources[0].type}`) + .toBe(expectedSourceListData.sources[0].type); + + expect(spanCmp01.textContent).withContext('should be defined').toBeDefined(); + expect(spanCmp01.textContent) + .withContext(`should be ${expectedSourceListData.sources[0].location}`) + .toBe(expectedSourceListData.sources[0].location); + + expect(spanCmp10.textContent).withContext('should be defined').toBeDefined(); + expect(spanCmp10.textContent) + .withContext(`should be ${expectedSourceListData.sources[1].type}`) + .toBe(expectedSourceListData.sources[1].type); + + expect(spanCmp11.textContent).withContext('should be defined').toBeDefined(); + expect(spanCmp11.textContent) + .withContext(`should be ${expectedSourceListData.sources[1].location}`) + .toBe(expectedSourceListData.sources[1].location); + + expect(spanCmp20.textContent).withContext('should be defined').toBeDefined(); + expect(spanCmp20.textContent) + .withContext(`should be ${expectedSourceListData.sources[2].type}`) + .toBe(expectedSourceListData.sources[2].type); + + expect(spanCmp21.textContent).withContext('should be defined').toBeDefined(); + expect(spanCmp21.textContent) + .withContext(`should be ${expectedSourceListData.sources[2].location}`) + .toBe(expectedSourceListData.sources[2].location); }); }); @@ -230,10 +226,23 @@ describe('SourceListComponent (DONE)', () => { expectSpyCall(openModalSpy, 2, expectedSourceListData.sources[2].linkTo); })); - it('... should not emit anything if no id is provided', () => { - component.openModal(undefined); + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + + it('... id is null', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0, null); + }); + it('... id is empty string', () => { + component.openModal(''); - expectSpyCall(openModalRequestEmitSpy, 0, undefined); + expectSpyCall(openModalRequestEmitSpy, 0); + }); }); it('... should emit id of given modal snippet', () => { From a82ca0997e4780ebb96bdfe4c96c6d5ba5785156 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 23:16:17 +0100 Subject: [PATCH 078/148] fix(edition): fix source description of op. 25 --- .../edition/series1/section5/op25/source-description.json | 2 +- src/assets/themes/css/main.css | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/assets/data/edition/series1/section5/op25/source-description.json b/src/assets/data/edition/series1/section5/op25/source-description.json index c3285ce78b..e0a8401c44 100644 --- a/src/assets/data/edition/series1/section5/op25/source-description.json +++ b/src/assets/data/edition/series1/section5/op25/source-description.json @@ -14,7 +14,7 @@ "Taktzahlen: Taktzahlen 1–2, 3–6 und 9–15 in M 317 Sk4 sowie 2–3 in M 317 Sk4.1 mit schwarzem Buntstift; Taktzahlen 7–8 in M 317 Sk4 mit Bleistift und nachgezogen mit schwarzem Buntstift.
        Taktzahl 52 (zu op. 24/1) auf Bl. 39r oben links mit schwarzem Buntstift.", "Instrumentenvorsatz: Akkoladenstrich und teilweise Schlüsselvorsatz auf Bl. 38v System 1–4 (zu op. 24/1).
        Akkoladenstrich und Schlüsselvorsatz auf Bl. 39r System 1–4 (zu op. 24/1), eingekreist und gestrichen mit rotem Buntstift.", "Eintragungen: Reihe auf Bl. 38v System 5 links (zu M 317 Sk3.1.3) mit schwarzem Buntstift.", - "Inhalt:
        Bl. 38v System 1b: T. 1–2: Skizze zu Nr. I T. 1–2 (M 317 SkI/1).
        Bl. 38v System 1a: Reihenfragment (Teil A); Zwölftonreihe Gcis (Teil B) (M 317 SkI/2).
        Bl. 38v System 1c–3c: T. 1–4 (M 317 SkI/2.1).
        Bl. 38v System 1d: T. 1–2 (M 317 SkI/2.1.1).
        Bl. 38v System 2a: T. 3 (M 317 SkI/2.1.2).
        Bl. 38v System 4c: T. 3 (M 317 SkI/2.1.2.1).
        Bl. 38v System 3d–4d: Tonbuchstaben (M 317 SkI/2.1.3).
        Bl. 38v System 3a: T. 1–5 (M 317 SkI/3).
        Bl. 38v System 3b–5b: T. 2–4, {{ '{' }}5–6{{ '}' }} (M 317 SkI/3.1).
        Bl. 38v System 5c–6b: T. 4–5 (M 317 SkI/3.1.1).
        Bl. 38v System 4a: T. 3–5 (M 317 SkI/3.1.2).
        Bl. 38v System 4a: T. 3–5 (M 317 SkI/3.1.2).
        M 317 SkI/3.1.3 (Reihentabelle):
        Bl. 38v System 6a: Gg (1); Bl. 38v System 6b: Kgis (2)
        Bl. 38v System 7a: Ug (3); Bl. 38v System 7b: KUfis (4)
        Bl. 38v System 6c: Zwölftonreihe Gg (M 317 SkI/3.1.3.1).
        Bl. 38v System 10–12 T. {{ '{' }}1A{{ '}' }}, {{ '{' }}1B{{ '}' }},
        T. 1–2, 3A, (M 317 SkI/4a),
        Bl. 39r System 1–8b: T. 3B, 4–6 (M 317 SkI/4b),
        Bl. 39r System 9–12, 13c, 14b: T. 7–12 (M 317 SkI/4c),
        Bl. 39r System 13a–16a: T. 13–15 (M 317 SkI/4d).
        Bl. 38v System 13–15: T. 2,{{ '{' }}3{{ '}' }} (M 317 SkI/4.1).
        Bl. 39r System 13b: T. 13 (M 317 SkI/4.2).
        Bl. 39r System 15c–16c: T. 13 (M 317 SkI/4.3)." + "Inhalt:
        Bl. 38v System 1b: T. 1–2: Skizze zu Nr. I T. 1–2 (M 317 Sk1).
        Bl. 38v System 1a: Reihenfragment (Teil A); Zwölftonreihe Gcis (Teil B) (M 317 Sk2).
        Bl. 38v System 1c–3c: T. 1–4 (M 317 Sk2.1).
        Bl. 38v System 1d: T. 1–2 (M 317 Sk2.1.1).
        Bl. 38v System 2a: T. 3 (M 317 Sk2.1.2).
        Bl. 38v System 4c: T. 3 (M 317 Sk2.1.2.1).
        Bl. 38v System 3d–4d: Tonbuchstaben (M 317 Sk2.1.3).
        Bl. 38v System 3a: T. 1–5 (M 317 Sk3).
        Bl. 38v System 3b–5b: T. 2–4, {{ '{' }}5–6{{ '}' }} (M 317 Sk3.1).
        Bl. 38v System 5c–6b: T. 4–5 (M 317 Sk3.1.1).
        Bl. 38v System 4a: T. 3–5 (M 317 Sk3.1.2).
        M 317 Sk3.1.3 (Reihentabelle):
        Bl. 38v
        System 6a: Gg (1); System 6b: Kgis (2);
        System 7a: Ug (3); System 7b: KUfis (4).
        Bl. 38v System 6c: Zwölftonreihe Gg (M 317 Sk3.1.3.1).
        M 317 Sk4:
        Bl. 38v
        System 10–12 T. {{ '{' }}1A{{ '}' }}, {{ '{' }}1B{{ '}' }}, T. 1–2, 3A (Sk4a),
        Bl. 39r
        System 1–8b: T. 3B, 4–6 (Sk4b),
        System 9–12, 13c, 14b: T. 7–12 (Sk4c),
        System 13a–16a: T. 13–15 (Sk4d).
        Bl. 38v System 13–15: T. 2,{{ '{' }}3{{ '}' }} (M 317 Sk4.1).
        Bl. 39r System 13b: T. 13 (M 317 Sk4.2).
        Bl. 39r System 15c–16c: T. 13 (M 317 Sk4.3)." ] }, { diff --git a/src/assets/themes/css/main.css b/src/assets/themes/css/main.css index d8d6da386b..3a2e8df557 100644 --- a/src/assets/themes/css/main.css +++ b/src/assets/themes/css/main.css @@ -318,6 +318,10 @@ span.facet-badge { .version { font-variant: small-caps; } +.tab { + display: inline-block; + margin-left: 25px; +} .indent { text-indent: 25px; } From 3cbd7c80b5fa8d207baaef449252e264a4a3fd94 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Thu, 10 Feb 2022 23:43:49 +0100 Subject: [PATCH 079/148] test(app): remove custom matcher toHaveCssClass to use toHaveClass --- .../view-container.component.spec.ts | 8 +-- .../json-viewer/json-viewer.component.spec.ts | 7 --- .../resource-info.component.spec.ts | 60 +++++++++---------- .../select-results.component.spec.ts | 4 -- .../sparql-editor.component.spec.ts | 30 ++++------ ...unsupported-type-results.component.spec.ts | 8 +-- src/test.ts | 3 - src/testing/custom-matchers.d.ts | 7 --- src/testing/custom-matchers.ts | 37 ------------ 9 files changed, 45 insertions(+), 119 deletions(-) delete mode 100644 src/testing/custom-matchers.d.ts delete mode 100644 src/testing/custom-matchers.ts diff --git a/src/app/core/view-container/view-container.component.spec.ts b/src/app/core/view-container/view-container.component.spec.ts index 48e1691f13..2c4a073a09 100644 --- a/src/app/core/view-container/view-container.component.spec.ts +++ b/src/app/core/view-container/view-container.component.spec.ts @@ -2,7 +2,6 @@ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { DebugElement } from '@angular/core'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; -import { customJasmineMatchers } from '@testing/custom-matchers'; import { getAndExpectDebugElementByCss, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; import { RouterLinkStubDirective, RouterOutletStubComponent } from '@testing/router-stubs'; @@ -22,9 +21,6 @@ describe('ViewContainerComponent (DONE)', () => { ); beforeEach(() => { - // Add custom jasmine matchers (ToHaveCssClass) - jasmine.addMatchers(customJasmineMatchers); - fixture = TestBed.createComponent(ViewContainerComponent); component = fixture.componentInstance; compDe = fixture.debugElement; @@ -45,8 +41,8 @@ describe('ViewContainerComponent (DONE)', () => { const divEl0 = divDes[0].nativeElement; const divEl1 = divDes[1].nativeElement; - expect(divEl0).toHaveCssClass('awg-maincontent'); - expect(divEl1).toHaveCssClass('awg-sidenav'); + expect(divEl0).toHaveClass('awg-maincontent'); + expect(divEl1).toHaveClass('awg-sidenav'); }); it('... should contain two router outlets (stubbed)', () => { diff --git a/src/app/shared/json-viewer/json-viewer.component.spec.ts b/src/app/shared/json-viewer/json-viewer.component.spec.ts index a9c4e62bc0..fdbfade87a 100644 --- a/src/app/shared/json-viewer/json-viewer.component.spec.ts +++ b/src/app/shared/json-viewer/json-viewer.component.spec.ts @@ -1,6 +1,3 @@ -/* eslint-disable-next-line spaced-comment, @typescript-eslint/triple-slash-reference */ -/// - import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { By } from '@angular/platform-browser'; import { Component, DebugElement, Input, NgModule } from '@angular/core'; @@ -8,7 +5,6 @@ import { JsonPipe } from '@angular/common'; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; import { click } from '@testing/click-helper'; -import { customJasmineMatchers } from '@testing/custom-matchers'; import { detectChangesOnPush } from '@testing/detect-changes-on-push-helper'; import { getAndExpectDebugElementByCss, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; @@ -100,9 +96,6 @@ describe('JsonViewerComponent (DONE)', () => { ); beforeEach(() => { - // Add custom jasmine matchers (toHaveCssClass) - jasmine.addMatchers(customJasmineMatchers); - fixture = TestBed.createComponent(JsonViewerComponent); component = fixture.componentInstance; compDe = fixture.debugElement; diff --git a/src/app/side-info/resource-info/resource-info.component.spec.ts b/src/app/side-info/resource-info/resource-info.component.spec.ts index e6004488cb..de0639fadf 100644 --- a/src/app/side-info/resource-info/resource-info.component.spec.ts +++ b/src/app/side-info/resource-info/resource-info.component.spec.ts @@ -12,7 +12,6 @@ import Spy = jasmine.Spy; import { cleanStylesFromDOM } from '@testing/clean-up-helper'; import { clickAndAwaitChanges } from '@testing/click-helper'; -import { customJasmineMatchers } from '@testing/custom-matchers'; import { expectSpyCall, getAndExpectDebugElementByCss } from '@testing/expect-helper'; import { mockSearchResponseJson } from '@testing/mock-data'; import { mockConsole } from '@testing/mock-helper'; @@ -88,9 +87,6 @@ describe('ResourceInfoComponent (DONE)', () => { ); beforeEach(() => { - // Add custom jasmine matchers (ToHaveCssClass) - jasmine.addMatchers(customJasmineMatchers); - fixture = TestBed.createComponent(ResourceInfoComponent); component = fixture.componentInstance; compDe = fixture.debugElement; @@ -1255,8 +1251,8 @@ describe('ResourceInfoComponent (DONE)', () => { const expectedText = 'Aktuelle Suchanfrage'; - expect(strongEl).toHaveCssClass('text-muted'); - expect(strongEl).toHaveCssClass('small'); + expect(strongEl).toHaveClass('text-muted'); + expect(strongEl).toHaveClass('small'); expect(strongEl.innerText).toBeTruthy(); expect(strongEl.innerText).withContext(`should be ${expectedText}`).toBe(expectedText); @@ -1311,7 +1307,7 @@ describe('ResourceInfoComponent (DONE)', () => { const aDes = getAndExpectDebugElementByCss(ulDes[0], 'a.awg-list-group-item', 2, 2); const aEl0 = aDes[0].nativeElement; - expect(aEl0).toHaveCssClass('text-left'); + expect(aEl0).toHaveClass('text-left'); }); describe('if previous resource is given', () => { @@ -1319,7 +1315,7 @@ describe('ResourceInfoComponent (DONE)', () => { const aDes = getAndExpectDebugElementByCss(compDe, 'a.awg-list-group-item.text-left', 1, 1); const aEl0 = aDes[0].nativeElement; - expect(aEl0).toHaveCssClass('list-group-item-action'); + expect(aEl0).toHaveClass('list-group-item-action'); }); it('... should navigate to previous resource on click', fakeAsync(() => { @@ -1354,8 +1350,8 @@ describe('ResourceInfoComponent (DONE)', () => { const strongDes = getAndExpectDebugElementByCss(divDes[0], 'strong', 1, 1); const strongEl = strongDes[0].nativeElement; - expect(strongEl).toHaveCssClass('text-muted'); - expect(strongEl).toHaveCssClass('small'); + expect(strongEl).toHaveClass('text-muted'); + expect(strongEl).toHaveClass('small'); }); it('... should have faChevronLeft icon in strong element', () => { @@ -1406,8 +1402,8 @@ describe('ResourceInfoComponent (DONE)', () => { // Get second div const divEl1 = divDes[1].nativeElement; - expect(divEl1).toHaveCssClass('text-muted'); - expect(divEl1).toHaveCssClass('small'); + expect(divEl1).toHaveClass('text-muted'); + expect(divEl1).toHaveClass('small'); }); it('... should display previous title in first div.single-line', () => { @@ -1473,7 +1469,7 @@ describe('ResourceInfoComponent (DONE)', () => { const aDes = getAndExpectDebugElementByCss(compDe, 'a.awg-list-group-item.text-left', 1, 1); const aEl0 = aDes[0].nativeElement; - expect(aEl0).toHaveCssClass('list-group-item-danger'); + expect(aEl0).toHaveClass('list-group-item-danger'); }); it('... should contain two divs', () => { @@ -1496,8 +1492,8 @@ describe('ResourceInfoComponent (DONE)', () => { const strongDes = getAndExpectDebugElementByCss(divDes[0], 'strong', 1, 1); const strongEl = strongDes[0].nativeElement; - expect(strongEl).toHaveCssClass('text-muted'); - expect(strongEl).toHaveCssClass('small'); + expect(strongEl).toHaveClass('text-muted'); + expect(strongEl).toHaveClass('small'); }); it('... should have faTimesCircle icon in strong element', () => { @@ -1525,8 +1521,8 @@ describe('ResourceInfoComponent (DONE)', () => { // Get second inner div const divEl1 = divDes[1].nativeElement; - expect(divEl1).toHaveCssClass('text-muted'); - expect(divEl1).toHaveCssClass('small'); + expect(divEl1).toHaveClass('text-muted'); + expect(divEl1).toHaveClass('small'); // Get spans const spanDes = getAndExpectDebugElementByCss(outerDivDes[1], 'div.single-line span', 2, 2); @@ -1558,7 +1554,7 @@ describe('ResourceInfoComponent (DONE)', () => { const liDes = getAndExpectDebugElementByCss(compDe, 'li.awg-list-group-item', 1, 1); const liEl = liDes[0].nativeElement; - expect(liEl).toHaveCssClass('list-group-item-info'); + expect(liEl).toHaveClass('list-group-item-info'); }); it('... should contain a strong element and a form', () => { @@ -1582,8 +1578,8 @@ describe('ResourceInfoComponent (DONE)', () => { ); const strongEl = strongDes[0].nativeElement; - expect(strongEl).toHaveCssClass('text-muted'); - expect(strongEl).toHaveCssClass('small'); + expect(strongEl).toHaveClass('text-muted'); + expect(strongEl).toHaveClass('small'); }); it('... should point to current resource in span in strong element', () => { @@ -1929,8 +1925,8 @@ describe('ResourceInfoComponent (DONE)', () => { const ulDes = getAndExpectDebugElementByCss(compDe, 'ul.awg-resource-info-list-group', 1, 1); const aDes = getAndExpectDebugElementByCss(ulDes[0], 'a.awg-list-group-item', 2, 2); const aEl1 = aDes[1].nativeElement; - expect(aEl1).toHaveCssClass('list-group-item-action'); - expect(aEl1).toHaveCssClass('text-right'); + expect(aEl1).toHaveClass('list-group-item-action'); + expect(aEl1).toHaveClass('text-right'); }); describe('if next resource is given', () => { @@ -1943,7 +1939,7 @@ describe('ResourceInfoComponent (DONE)', () => { ); const aEl0 = aDes[0].nativeElement; - expect(aEl0).toHaveCssClass('list-group-item-action'); + expect(aEl0).toHaveClass('list-group-item-action'); }); it('... should navigate to next resource on click', fakeAsync(() => { @@ -1982,8 +1978,8 @@ describe('ResourceInfoComponent (DONE)', () => { const strongDes = getAndExpectDebugElementByCss(divDes[0], 'strong', 1, 1); const strongEl = strongDes[0].nativeElement; - expect(strongEl).toHaveCssClass('text-muted'); - expect(strongEl).toHaveCssClass('small'); + expect(strongEl).toHaveClass('text-muted'); + expect(strongEl).toHaveClass('small'); }); it('... should have faChevronRight icon in strong element', () => { @@ -2034,8 +2030,8 @@ describe('ResourceInfoComponent (DONE)', () => { // // get second div const divEl1 = divDes[1].nativeElement; - expect(divEl1).toHaveCssClass('text-muted'); - expect(divEl1).toHaveCssClass('small'); + expect(divEl1).toHaveClass('text-muted'); + expect(divEl1).toHaveClass('small'); }); it('... should display next title in first div.single-line', () => { @@ -2109,7 +2105,7 @@ describe('ResourceInfoComponent (DONE)', () => { ); const aEl0 = aDes[0].nativeElement; - expect(aEl0).toHaveCssClass('list-group-item-danger'); + expect(aEl0).toHaveClass('list-group-item-danger'); }); it('... should contain two divs', () => { @@ -2132,8 +2128,8 @@ describe('ResourceInfoComponent (DONE)', () => { const strongDes = getAndExpectDebugElementByCss(divDes[0], 'strong', 1, 1); const strongEl = strongDes[0].nativeElement; - expect(strongEl).toHaveCssClass('text-muted'); - expect(strongEl).toHaveCssClass('small'); + expect(strongEl).toHaveClass('text-muted'); + expect(strongEl).toHaveClass('small'); }); it('... should have faTimesCircle icon in strong element', () => { @@ -2161,8 +2157,8 @@ describe('ResourceInfoComponent (DONE)', () => { // Get second inner div const divEl1 = divDes[1].nativeElement; - expect(divEl1).toHaveCssClass('text-muted'); - expect(divEl1).toHaveCssClass('small'); + expect(divEl1).toHaveClass('text-muted'); + expect(divEl1).toHaveClass('small'); // Get spans const spanDes = getAndExpectDebugElementByCss(outerDivDes[1], 'div.single-line span', 2, 2); diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts index 5963b365cb..1af737e70f 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/select-results/select-results.component.spec.ts @@ -6,7 +6,6 @@ import Spy = jasmine.Spy; import { NgbAccordionModule, NgbConfig } from '@ng-bootstrap/ng-bootstrap'; -import { customJasmineMatchers } from '@testing/custom-matchers'; import { detectChangesOnPush } from '@testing/detect-changes-on-push-helper'; import { expectSpyCall, @@ -68,9 +67,6 @@ describe('SelectResultsComponent (DONE)', () => { ); beforeEach(() => { - // Add custom jasmine matchers (ToHaveCssClass) - jasmine.addMatchers(customJasmineMatchers); - fixture = TestBed.createComponent(SelectResultsComponent); component = fixture.componentInstance; compDe = fixture.debugElement; diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-editor/sparql-editor.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-editor/sparql-editor.component.spec.ts index fdfe119c2d..35ff429b65 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-editor/sparql-editor.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/sparql-editor/sparql-editor.component.spec.ts @@ -5,7 +5,6 @@ import { NgbAccordion, NgbAccordionModule, NgbConfig, NgbPanelChangeEvent } from import Spy = jasmine.Spy; import { click } from '@testing/click-helper'; -import { customJasmineMatchers } from '@testing/custom-matchers'; import { detectChangesOnPush } from '@testing/detect-changes-on-push-helper'; import { expectSpyCall, @@ -68,9 +67,6 @@ describe('SparqlEditorComponent (DONE)', () => { ); beforeEach(() => { - // Add custom jasmine matchers (ToHaveCssClass) - jasmine.addMatchers(customJasmineMatchers); - fixture = TestBed.createComponent(SparqlEditorComponent); component = fixture.componentInstance; compDe = fixture.debugElement; @@ -384,14 +380,14 @@ describe('SparqlEditorComponent (DONE)', () => { const itemEl0 = itemDes[0].nativeElement; const itemEl1 = itemDes[1].nativeElement; - expect(itemEl0).toHaveCssClass('disabled'); - expect(itemEl1).not.toHaveCssClass('disabled'); + expect(itemEl0).toHaveClass('disabled'); + expect(itemEl1).not.toHaveClass('disabled'); component.query = expectedQuery2; await detectChangesOnPush(fixture); - expect(itemEl0).not.toHaveCssClass('disabled'); - expect(itemEl1).toHaveCssClass('disabled'); + expect(itemEl0).not.toHaveClass('disabled'); + expect(itemEl1).toHaveClass('disabled'); }); it('... should trigger `onQueryListChange()` by click on dropdown item', async () => { @@ -407,7 +403,7 @@ describe('SparqlEditorComponent (DONE)', () => { const itemEl0 = itemDes[0].nativeElement; const itemEl1 = itemDes[1].nativeElement; - expect(itemEl1).not.toHaveCssClass('disabled'); + expect(itemEl1).not.toHaveClass('disabled'); // Click on second item (first disabled) click(itemEl1 as HTMLElement); @@ -419,7 +415,7 @@ describe('SparqlEditorComponent (DONE)', () => { component.query = expectedQuery2; await detectChangesOnPush(fixture); - expect(itemEl0).not.toHaveCssClass('disabled'); + expect(itemEl0).not.toHaveClass('disabled'); // Click on first item (second disabled) click(itemEl0 as HTMLElement); @@ -724,14 +720,14 @@ describe('SparqlEditorComponent (DONE)', () => { const itemEl0 = itemDes[0].nativeElement; const itemEl1 = itemDes[1].nativeElement; - expect(itemEl0).toHaveCssClass('disabled'); - expect(itemEl1).not.toHaveCssClass('disabled'); + expect(itemEl0).toHaveClass('disabled'); + expect(itemEl1).not.toHaveClass('disabled'); component.query = expectedQuery2; await detectChangesOnPush(fixture); - expect(itemEl0).not.toHaveCssClass('disabled'); - expect(itemEl1).toHaveCssClass('disabled'); + expect(itemEl0).not.toHaveClass('disabled'); + expect(itemEl1).toHaveClass('disabled'); }); it('... should trigger `onQueryListChange()` by click on dropdown item', async () => { @@ -747,7 +743,7 @@ describe('SparqlEditorComponent (DONE)', () => { const itemEl0 = itemDes[0].nativeElement; const itemEl1 = itemDes[1].nativeElement; - expect(itemEl1).not.toHaveCssClass('disabled'); + expect(itemEl1).not.toHaveClass('disabled'); // Click on second item (first disabled) click(itemEl1 as HTMLElement); @@ -759,7 +755,7 @@ describe('SparqlEditorComponent (DONE)', () => { component.query = expectedQuery2; await detectChangesOnPush(fixture); - expect(itemEl0).not.toHaveCssClass('disabled'); + expect(itemEl0).not.toHaveClass('disabled'); // Click on first item (second disabled) click(itemEl0 as HTMLElement); @@ -947,7 +943,7 @@ describe('SparqlEditorComponent (DONE)', () => { component.query = expectedQuery2; await detectChangesOnPush(fixture); - expect(itemEl0).not.toHaveCssClass('disabled'); + expect(itemEl0).not.toHaveClass('disabled'); // Click on first item (second disabled) click(itemEl0 as HTMLElement); diff --git a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/unsupported-type-results/unsupported-type-results.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/unsupported-type-results/unsupported-type-results.component.spec.ts index fdbef986b6..c9470c7053 100644 --- a/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/unsupported-type-results/unsupported-type-results.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-graph/graph-visualizer/unsupported-type-results/unsupported-type-results.component.spec.ts @@ -3,7 +3,6 @@ import { DebugElement, NgModule } from '@angular/core'; import { NgbAccordionModule, NgbConfig } from '@ng-bootstrap/ng-bootstrap'; -import { customJasmineMatchers } from '@testing/custom-matchers'; import { detectChangesOnPush } from '@testing/detect-changes-on-push-helper'; import { getAndExpectDebugElementByCss } from '@testing/expect-helper'; @@ -35,9 +34,6 @@ describe('UnsupportedTypeResultsComponent (DONE)', () => { ); beforeEach(() => { - // Add custom jasmine matchers (ToHaveCssClass) - jasmine.addMatchers(customJasmineMatchers); - fixture = TestBed.createComponent(UnsupportedTypeResultsComponent); component = fixture.componentInstance; compDe = fixture.debugElement; @@ -131,8 +127,8 @@ describe('UnsupportedTypeResultsComponent (DONE)', () => { const pEl0 = pDes[0].nativeElement; const pEl1 = pDes[1].nativeElement; - expect(pEl0).toHaveCssClass('text-center'); - expect(pEl1).toHaveCssClass('text-center'); + expect(pEl0).toHaveClass('text-center'); + expect(pEl1).toHaveClass('text-center'); }); it('... should display messages in panel body paragraphs', () => { diff --git a/src/test.ts b/src/test.ts index c4f6e45be1..2beba974c6 100644 --- a/src/test.ts +++ b/src/test.ts @@ -1,9 +1,6 @@ /* eslint-disable @typescript-eslint/member-ordering */ // This file is required by karma.conf.js and loads recursively all the .spec and framework files -// For custom matchers, see https://stackoverflow.com/a/44996479 -import '@testing/custom-matchers'; - import 'zone.js/testing'; import { getTestBed } from '@angular/core/testing'; import { BrowserDynamicTestingModule, platformBrowserDynamicTesting } from '@angular/platform-browser-dynamic/testing'; diff --git a/src/testing/custom-matchers.d.ts b/src/testing/custom-matchers.d.ts deleted file mode 100644 index b2bb577e4f..0000000000 --- a/src/testing/custom-matchers.d.ts +++ /dev/null @@ -1,7 +0,0 @@ -declare namespace jasmine { - interface Matchers { - toHaveCssClass(expected: string): boolean; - } -} - -// For custom matchers, see https://stackoverflow.com/a/44996479 diff --git a/src/testing/custom-matchers.ts b/src/testing/custom-matchers.ts deleted file mode 100644 index daa68d95eb..0000000000 --- a/src/testing/custom-matchers.ts +++ /dev/null @@ -1,37 +0,0 @@ -import MatchersUtil = jasmine.MatchersUtil; -import CustomMatcherFactories = jasmine.CustomMatcherFactories; -import CustomEqualityTester = jasmine.CustomEqualityTester; -import CustomMatcher = jasmine.CustomMatcher; -import CustomMatcherResult = jasmine.CustomMatcherResult; - -/** - * Test helper custom matcher factory: customJasmineMatchers. - * - * It exposes custom jasmine matchers to be used in unit tests. - * - * For more details on custom matchers see {@link https://stackoverflow.com/a/44996479}. - */ -export const customJasmineMatchers: CustomMatcherFactories = { - /** - * Test helper custom matcher: toHaveCssClass. - * - * It checks if a given element has an expected CSS class. - * - * @param {MatchersUtil} util - * @param {CustomEqualityTester[]} customEqualityTester - * @returns {CustomMatcher} The custom matcher instance. - */ - toHaveCssClass(util: MatchersUtil, customEqualityTester: CustomEqualityTester[]): CustomMatcher { - function buildError(isNot: boolean) { - return (actual: HTMLElement, className: string): CustomMatcherResult => ({ - pass: actual.classList.contains(className) === !isNot, - message: `Expected ${actual.outerHTML} ${isNot ? 'not ' : ''}to contain the CSS class "${className}"`, - }); - } - - return { - compare: buildError(false), - negativeCompare: buildError(true), - }; - }, -}; From 176113b23797d8030c4acaec752eaf3305c12357 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Fri, 11 Feb 2022 00:34:19 +0100 Subject: [PATCH 080/148] test(edition): fix setup for SearchPanel tests after changes --- .../search-panel.component.spec.ts | 51 +++++++++++++++---- .../search-panel/search-panel.component.ts | 16 ++++-- 2 files changed, 53 insertions(+), 14 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts index e93a977a04..89b95e4f73 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.spec.ts @@ -1,13 +1,11 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ import { ComponentFixture, TestBed, waitForAsync } from '@angular/core/testing'; import { Component, DebugElement, EventEmitter, Input, Output } from '@angular/core'; import { ActivatedRoute, NavigationEnd, Router } from '@angular/router'; -import { RouterTestingModule } from '@angular/router/testing'; import { of as observableOf } from 'rxjs'; import { NgbNavModule } from '@ng-bootstrap/ng-bootstrap'; -import { ActivatedRouteStub } from '@testing/router-stubs'; +import { ActivatedRouteStub, UrlSegmentStub } from '@testing/router-stubs'; import { DataApiService } from '@awg-views/data-view/services'; import { ConversionService, DataStreamerService, LoadingService } from '@awg-core/services'; @@ -15,14 +13,20 @@ import { SearchParams } from '@awg-views/data-view/models'; import { SearchPanelComponent } from './search-panel.component'; -@Component({ selector: 'awg-search-form', template: '' }) -class SearchFormStubComponent { +@Component({ selector: 'awg-fulltext-search-form', template: '' }) +class FulltextSearchFormStubComponent { @Input() searchValue: string; @Output() searchRequest: EventEmitter = new EventEmitter(); } +@Component({ selector: 'awg-extended-search-form', template: '' }) +class ExtendedSearchFormStubComponent { + @Output() + searchRequest: EventEmitter = new EventEmitter(); +} + @Component({ selector: 'awg-search-result-list', template: '' }) class SearchResultListStubComponent { @Input() @@ -32,7 +36,7 @@ class SearchResultListStubComponent { @Output() pageChangeRequest: EventEmitter = new EventEmitter(); @Output() - rowChangeRequest: EventEmitter = new EventEmitter(); + rowNumberChangeRequest: EventEmitter = new EventEmitter(); @Output() viewChangeRequest: EventEmitter = new EventEmitter(); } @@ -51,7 +55,7 @@ describe('SearchPanelComponent', () => { // Intentional empty test override }, }; - const mockDataApiService = { httpGetUrl: '/testUrl', getFulltextSearchData: () => observableOf({}) }; + const mockDataApiService = { httpGetUrl: '/testUrl', getSearchData: () => observableOf({}) }; const mockLoadingService = { getLoadingStatus: () => observableOf(false) }; const mockDataStreamerService = { updateSearchResponseWithQuery: () => { @@ -65,16 +69,26 @@ describe('SearchPanelComponent', () => { events: observableOf(new NavigationEnd(0, 'http://localhost:4200/test-url', 'http://localhost:4200/test-url')), navigate: jasmine.createSpy('navigate'), }; - // Mocked activated route - const mockActivatedRoute: ActivatedRouteStub = new ActivatedRouteStub(); + + let mockActivatedRoute: ActivatedRouteStub; + let expectedRouteUrl: UrlSegmentStub[] = []; + const expectedPath = 'fulltext'; beforeEach( waitForAsync(() => { + // Mocked activated route + // See https://gist.github.com/benjamincharity/3d25cd2c95b6ecffadb18c3d4dbbd80b + expectedRouteUrl = [{ path: expectedPath }]; + + mockActivatedRoute = new ActivatedRouteStub(); + mockActivatedRoute.testUrl = expectedRouteUrl; + TestBed.configureTestingModule({ - imports: [RouterTestingModule, NgbNavModule], + imports: [NgbNavModule], declarations: [ SearchPanelComponent, - SearchFormStubComponent, + FulltextSearchFormStubComponent, + ExtendedSearchFormStubComponent, SearchResultListStubComponent, TwelveToneSpinnerStubComponent, ], @@ -101,4 +115,19 @@ describe('SearchPanelComponent', () => { it('should create', () => { expect(component).toBeTruthy(); }); + + it('should change urls', () => { + expect(mockActivatedRoute.snapshot.url[0].path).toBeTruthy(); + expect(mockActivatedRoute.snapshot.url[0].path) + .withContext(`should equal ${expectedPath}`) + .toEqual(expectedPath); + + const changedPath = 'other'; + const changedRouteUrl: UrlSegmentStub[] = [{ path: changedPath }]; + + mockActivatedRoute.testUrl = changedRouteUrl; + + expect(mockActivatedRoute.snapshot.url[0].path).toBeTruthy(); + expect(mockActivatedRoute.snapshot.url[0].path).withContext(`should equal ${changedPath}`).toEqual(changedPath); + }); }); diff --git a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts index de9eca5612..ab42bdc088 100644 --- a/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/search-panel.component.ts @@ -160,7 +160,10 @@ export class SearchPanelComponent implements OnInit, OnDestroy { while (r.firstChild) { r = r.firstChild; } - this.selectedSearchTabId = r.snapshot.url[0].path; + // Set search tab from url if given, otherwise router will redirect to fulltext automatically + if (this._isValidTabIdInRoute(r)) { + this.selectedSearchTabId = r.snapshot.url[0].path; + } return route; }), @@ -179,7 +182,6 @@ export class SearchPanelComponent implements OnInit, OnDestroy { this.updateSearchParamsFromRoute(qp, false); if (!this.viewChanged) { - console.log(typeof this.getSearchQueryType(this.searchParams.query)); if (this.searchParams.query && typeof this.searchParams.query === 'string') { // Fetch search data return this.dataApiService.getSearchData(this.searchParams); @@ -459,7 +461,7 @@ export class SearchPanelComponent implements OnInit, OnDestroy { // Emit truthy value to end all subscriptions this._destroyed$.next(true); - // Complete the destroy subject itself + // Now let's also complete the subject itself this._destroyed$.complete(); } @@ -502,4 +504,12 @@ export class SearchPanelComponent implements OnInit, OnDestroy { return qp; } + + private _isValidTabIdInRoute(r: ActivatedRoute) { + return ( + r.snapshot.url && + r.snapshot.url.length > 0 && + Object.values(this.searchTabStrings).filter(tab => tab.id === r.snapshot.url[0].path).length > 0 + ); + } } From 704e7b952142c834002e6917bc78d229c609b583 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Fri, 11 Feb 2022 01:53:42 +0100 Subject: [PATCH 081/148] test(search): move accordion panel helper into test helpers --- .../linkedobjects.component.spec.ts | 53 ++++++++----------- src/testing/accordion-panel-helper.ts | 33 ++++++++++++ 2 files changed, 56 insertions(+), 30 deletions(-) create mode 100644 src/testing/accordion-panel-helper.ts diff --git a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/linkedobjects/linkedobjects.component.spec.ts b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/linkedobjects/linkedobjects.component.spec.ts index eaf3d9f0c9..5014486612 100644 --- a/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/linkedobjects/linkedobjects.component.spec.ts +++ b/src/app/views/data-view/data-outlets/resource-detail/resource-detail-html/resource-detail-html-content/linkedobjects/linkedobjects.component.spec.ts @@ -11,16 +11,7 @@ import { NgbAccordionModule, NgbConfig } from '@ng-bootstrap/ng-bootstrap'; import { ResourceDetailGroupedIncomingLinks, ResourceDetailIncomingLink } from '@awg-views/data-view/models'; import { ResourceDetailHtmlContentLinkedobjectsComponent } from './linkedobjects.component'; - -// Helper functions -function expectClosedPanelBody(de: DebugElement, id: number, msg: string) { - // Body debug elements - getAndExpectDebugElementByCss(de, `div.card > div#incoming-linkgroup-${id} > div.card-body`, 0, 0, msg); -} -function expectOpenPanelBody(de: DebugElement, id: number, msg: string) { - // Body debug elements - getAndExpectDebugElementByCss(de, `div.card > div#incoming-linkgroup-${id} > div.card-body`, 1, 1, msg); -} +import { expectClosedPanelBody, expectOpenPanelBody } from '@testing/accordion-panel-helper'; describe('ResourceDetailHtmlContentLinkedobjectsComponent (DONE)', () => { let component: ResourceDetailHtmlContentLinkedobjectsComponent; @@ -36,6 +27,8 @@ describe('ResourceDetailHtmlContentLinkedobjectsComponent (DONE)', () => { let incomingLink2: ResourceDetailIncomingLink; let incomingLink3: ResourceDetailIncomingLink; const expectedTotalItems = 5; + const expectedFirstPanelId = 'incoming-linkgroup-0'; + const expectedSecondPanelId = 'incoming-linkgroup-1'; // Global NgbConfigModule @NgModule({ imports: [NgbAccordionModule], exports: [NgbAccordionModule] }) @@ -145,7 +138,7 @@ describe('ResourceDetailHtmlContentLinkedobjectsComponent (DONE)', () => { fixture.detectChanges(); }); - it('should have `incomingGroups` inputs', () => { + it('... should have `incomingGroups` inputs', () => { expect(component.incomingGroups).toBeDefined('should be defined'); expect(component.incomingGroups).toBe(expectedIncoming, `should be expectedIncoming: ${expectedIncoming}`); }); @@ -310,32 +303,32 @@ describe('ResourceDetailHtmlContentLinkedobjectsComponent (DONE)', () => { ); // Both panels closed first by default - expectClosedPanelBody(compDe, 0, 'closed (first panel)'); - expectClosedPanelBody(compDe, 1, 'closed (second panel)'); + expectClosedPanelBody(compDe, expectedFirstPanelId, 'first panel closed'); + expectClosedPanelBody(compDe, expectedSecondPanelId, 'second panel closed'); // Click first panel clickAndAwaitChanges(button0Des[0], fixture); - expectOpenPanelBody(compDe, 0, 'opened (first panel)'); - expectClosedPanelBody(compDe, 1, 'closed (second panel)'); + expectOpenPanelBody(compDe, expectedFirstPanelId, 'first panel open'); + expectClosedPanelBody(compDe, expectedSecondPanelId, 'second panel closed'); // Click first panel again clickAndAwaitChanges(button0Des[0], fixture); - expectClosedPanelBody(compDe, 0, 'closed (first panel)'); - expectClosedPanelBody(compDe, 1, 'closed (second panel)'); + expectClosedPanelBody(compDe, expectedFirstPanelId, 'first panel closed'); + expectClosedPanelBody(compDe, expectedSecondPanelId, 'second panel closed'); // Click second panel clickAndAwaitChanges(button1Des[0], fixture); - expectClosedPanelBody(compDe, 0, 'closed (first panel)'); - expectOpenPanelBody(compDe, 1, 'opened (second panel)'); + expectClosedPanelBody(compDe, expectedFirstPanelId, 'first panel closed'); + expectOpenPanelBody(compDe, expectedSecondPanelId, 'second panel open'); // Click second panel again clickAndAwaitChanges(button1Des[0], fixture); - expectClosedPanelBody(compDe, 0, 'closed (first panel)'); - expectClosedPanelBody(compDe, 1, 'closed (second panel)'); + expectClosedPanelBody(compDe, expectedFirstPanelId, 'first panel closed'); + expectClosedPanelBody(compDe, expectedSecondPanelId, 'second panel closed'); })); it('... should toggle panels alternately on click', fakeAsync(() => { @@ -359,20 +352,20 @@ describe('ResourceDetailHtmlContentLinkedobjectsComponent (DONE)', () => { ); // Both panels closed first by default - expectClosedPanelBody(compDe, 0, 'closed (first panel)'); - expectClosedPanelBody(compDe, 1, 'closed (second panel)'); + expectClosedPanelBody(compDe, expectedFirstPanelId, 'closed (first panel)'); + expectClosedPanelBody(compDe, expectedSecondPanelId, 'closed (second panel)'); // Click first panel clickAndAwaitChanges(button0Des[0], fixture); - expectOpenPanelBody(compDe, 0, 'opened (first panel)'); - expectClosedPanelBody(compDe, 1, 'closed (second panel)'); + expectOpenPanelBody(compDe, expectedFirstPanelId, 'opened (first panel)'); + expectClosedPanelBody(compDe, expectedSecondPanelId, 'closed (second panel)'); // Click second panel clickAndAwaitChanges(button1Des[0], fixture); - expectClosedPanelBody(compDe, 0, 'closed (first panel)'); - expectOpenPanelBody(compDe, 1, 'opened (second panel)'); + expectClosedPanelBody(compDe, expectedFirstPanelId, 'closed (first panel)'); + expectOpenPanelBody(compDe, expectedSecondPanelId, 'opened (second panel)'); })); describe('... should render panel content (div.card-body)', () => { @@ -398,7 +391,7 @@ describe('ResourceDetailHtmlContentLinkedobjectsComponent (DONE)', () => { click(button0El as HTMLElement); await detectChangesOnPush(fixture); // Replacement for fixture.detectChanges with OnPush - expectOpenPanelBody(compDe, 0, 'should have first panel opened'); + expectOpenPanelBody(compDe, expectedFirstPanelId, 'should have first panel opened'); // List debug elements listDes = getAndExpectDebugElementByCss(compDe, 'ul.awg-linked-obj-list', 1, 1); @@ -489,8 +482,8 @@ describe('ResourceDetailHtmlContentLinkedobjectsComponent (DONE)', () => { // Open second panel clickAndAwaitChanges(buttonDes[1], fixture); - expectClosedPanelBody(compDe, 0, 'should have first panel closed'); - expectOpenPanelBody(compDe, 1, 'should have second panel opened'); + expectClosedPanelBody(compDe, expectedFirstPanelId, 'should have first panel closed'); + expectOpenPanelBody(compDe, expectedSecondPanelId, 'should have second panel opened'); listDes = getAndExpectDebugElementByCss(compDe, 'ul.awg-linked-obj-list', 1, 1); listItemDes = getAndExpectDebugElementByCss(listDes[0], 'li', 3, 3); diff --git a/src/testing/accordion-panel-helper.ts b/src/testing/accordion-panel-helper.ts new file mode 100644 index 0000000000..9cab8f3231 --- /dev/null +++ b/src/testing/accordion-panel-helper.ts @@ -0,0 +1,33 @@ +import { DebugElement } from '@angular/core'; + +import { getAndExpectDebugElementByCss } from '@testing/expect-helper'; + +/** + * Test helper function: expectClosedPanelBody. + * + * It checks if a given ngb-accordion panel is closed. + * + * @param {DebugElement} de The DebugElement. + * @param {string} id The id of the panel. + * @param {string} msg The msg to be displayed in Expectation. + * + * @returns {void} Sends the given values to getAndExpect helper. + */ +export function expectClosedPanelBody(de: DebugElement, id: string, msg: string) { + getAndExpectDebugElementByCss(de, `div.card > div#${id} > div.card-body`, 0, 0, msg); +} + +/** + * Test helper function: expectClosedPanelBody. + * + * It checks if a given ngb-accordion panel is open. + * + * @param {DebugElement} de The DebugElement. + * @param {string} id The id of the panel. + * @param {string} msg The msg to be displayed in Expectation. + * + * @returns {void} Sends the given values to getAndExpect helper. + */ +export function expectOpenPanelBody(de: DebugElement, id: string, msg: string) { + getAndExpectDebugElementByCss(de, `div.card > div#${id} > div.card-body`, 1, 1, msg); +} From 2c9861f5e6b164714986601b5c7f58b95aa63129 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Fri, 11 Feb 2022 01:56:15 +0100 Subject: [PATCH 082/148] test(edition): add tests for TextCriticsComponent --- .../textcritics/textcritics.component.html | 2 +- .../textcritics/textcritics.component.spec.ts | 421 +++++++++++++++++- .../textcritics/textcritics.component.ts | 6 + 3 files changed, 423 insertions(+), 6 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-report/textcritics/textcritics.component.html b/src/app/views/edition-view/edition-outlets/edition-report/textcritics/textcritics.component.html index 5ea17c92fc..3787cdc3c4 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/textcritics/textcritics.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-report/textcritics/textcritics.component.html @@ -1,5 +1,5 @@ - + { let component: TextcriticsComponent; let fixture: ComponentFixture; + let compDe: DebugElement; + + let expectedTextcriticsData: TextcriticsList; + let expectedModalSnippet: string; + let expectedSvgSheet: EditionSvgSheet; + let expectedNextSvgSheet: EditionSvgSheet; + let expectedPanelId: string; + + let openModalSpy: Spy; + let openModalRequestEmitSpy: Spy; + let selectSvgSheetSpy: Spy; + let selectSvgSheetRequestEmitSpy: Spy; // Global NgbConfigModule @NgModule({ imports: [NgbAccordionModule], exports: [NgbAccordionModule] }) @@ -43,10 +65,399 @@ describe('TextcriticsComponent', () => { beforeEach(() => { fixture = TestBed.createComponent(TextcriticsComponent); component = fixture.componentInstance; - fixture.detectChanges(); + compDe = fixture.debugElement; + + // Test data + expectedTextcriticsData = { + textcritics: [ + { + id: 'test-1', + label: 'test1', + description: ['test description'], + comments: [], + }, + { + id: 'test-2', + label: 'test2', + description: [], + comments: [ + { + measure: '10', + system: '12', + position: '1. Note', + comment: 'Viertelnote überschreibt Halbe Note.', + }, + { + measure: '10', + system: '12', + position: '2. Note', + comment: + "Modal click: Aa:SkI/3", + }, + ], + }, + ], + }; + expectedSvgSheet = { + id: 'Aa:SkI/2', + svg: 'assets/img/edition/series1/section5/op12/SkI_2n_small_cut_opt.svg', + image: 'assets/img/edition/series1/section5/op12/SkI_2_small.jpg', + alt: 'Aa:SkI/2', + }; + expectedNextSvgSheet = { + id: 'Aa:SkI/3', + svg: 'assets/img/edition/series1/section5/op12/SkI_3n_small_cut_opt.svg', + image: 'assets/img/edition/series1/section5/op12/SkI_3_small.jpg', + alt: 'Aa:SkI/3', + }; + expectedModalSnippet = 'OP12_SHEET_COMING_SOON'; + expectedPanelId = 'awg-tka-panel'; + + // Spies on component functions + // `.and.callThrough` will track the spy down the nested describes, see + // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E + openModalSpy = spyOn(component, 'openModal').and.callThrough(); + openModalRequestEmitSpy = spyOn(component.openModalRequest, 'emit').and.callThrough(); + selectSvgSheetSpy = spyOn(component, 'selectSvgSheet').and.callThrough(); + selectSvgSheetRequestEmitSpy = spyOn(component.selectSvgSheetRequest, 'emit').and.callThrough(); }); it('should create', () => { expect(component).toBeTruthy(); }); + + describe('BEFORE initial data binding', () => { + it('should not have textcriticsData', () => { + expect(component.textcriticsData).withContext('should be undefined').toBeUndefined(); + }); + + describe('VIEW', () => { + it('... should contain one ngb-accordion without panel (div.card) yet', () => { + // Ngb-accordion debug element + const accordionDes = getAndExpectDebugElementByCss(compDe, 'ngb-accordion', 1, 1); + + // Panel + getAndExpectDebugElementByCss(accordionDes[0], 'div.card', 0, 0, 'yet'); + }); + + it('... should not contain critics list component (stubbed) yet', () => { + getAndExpectDebugElementByDirective(compDe, CriticsListStubComponent, 0, 0); + }); + }); + }); + + describe('AFTER initial data binding', () => { + beforeEach(() => { + // Simulate the parent setting the input properties + component.textcriticsData = expectedTextcriticsData; + + // Trigger initial data binding + fixture.detectChanges(); + }); + + it('should have textcriticsData', () => { + expect(component.textcriticsData).toBeTruthy(); + expect(component.textcriticsData) + .withContext(`should be ${expectedTextcriticsData}`) + .toBe(expectedTextcriticsData); + }); + + describe('VIEW', () => { + it('... should contain one ngb-accordion with one panel (div.card)', () => { + // Ngb-accordion debug element + const accordionDes = getAndExpectDebugElementByCss(compDe, 'ngb-accordion', 1, 1); + + // Panel + getAndExpectDebugElementByCss(accordionDes[0], 'div.card', 1, 1); + }); + + it('... should contain one ngb-panel element (div.card) with header but no body (closed)', () => { + // Panel debug elements + const panelDes = getAndExpectDebugElementByCss(compDe, 'div.card', 1, 1); + + // Header debug elements + getAndExpectDebugElementByCss(panelDes[0], 'div.card-header', 1, 1, 'in first panel'); + + // Body debug elements + getAndExpectDebugElementByCss( + panelDes[0], + 'div.card-header > div > div.card-body', + 0, + 0, + 'in first panel' + ); + }); + + it('... should render title in panel header (div.card-header)', () => { + // Ngb-accordion panel debug element + const panelDes = getAndExpectDebugElementByCss(compDe, 'ngb-accordion > div.card', 1, 1); + + // Header + const headerDes = getAndExpectDebugElementByCss( + panelDes[0], + 'div#awg-tka-panel-header.card-header', + 1, + 1 + ); + + // Header Buttons + const buttonDes = getAndExpectDebugElementByCss(headerDes[0], 'div > button', 1, 1); + + const buttonCmp = buttonDes[0].nativeElement; + + const expectedTitle = 'II. Textkritischer Kommentar'; + + expect(buttonCmp.textContent).withContext('should be defined').toBeDefined(); + expect(buttonCmp.textContent.trim()) + .withContext(`should be ${expectedTitle.trim()}`) + .toBe(expectedTitle.trim()); + }); + + it('... should open and close panel on click', fakeAsync(() => { + // Header debug elements + const panelHeaderDes = getAndExpectDebugElementByCss(compDe, 'div.card > div.card-header', 1, 1); + + // Button debug elements + const buttonDes = getAndExpectDebugElementByCss( + panelHeaderDes[0], + 'button.btn-link', + 1, + 1, + 'in first panel' + ); + + // Both panels closed first by default + expectClosedPanelBody(compDe, expectedPanelId, 'panel closed'); + + // Click panel to open it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectOpenPanelBody(compDe, expectedPanelId, 'panel open'); + + // Click panel again to close it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectClosedPanelBody(compDe, expectedPanelId, 'panel closed'); + })); + + describe('... should render panel content (div.card-body)', () => { + beforeEach(async () => { + // Click button to open panel and get inner content + // Button debug elements + const buttonDes = getAndExpectDebugElementByCss( + compDe, + 'div.card > div.card-header button.btn-link', + 1, + 1 + ); + + // Button's native element to click on + const buttonEl = buttonDes[0].nativeElement; + + // Open panel + click(buttonEl as HTMLElement); + await detectChangesOnPush(fixture); + + expectOpenPanelBody(compDe, expectedPanelId, 'should have open panel'); + }); + + describe('CriticsListComponent', () => { + it('... should contain one CriticsListComponent (stubbed) in the panel body (div.card-body)', () => { + // Ngb-accordion panel debug element + const panelDes = getAndExpectDebugElementByCss(compDe, 'ngb-accordion > div.card', 1, 1); + + const bodyDes = getAndExpectDebugElementByCss(panelDes[0], 'div.card-body', 1, 1); + + getAndExpectDebugElementByDirective(bodyDes[0], CriticsListStubComponent, 1, 1); + }); + + it('... should pass down textcriticsData to the CriticsListComponent', () => { + const criticsListDes = getAndExpectDebugElementByDirective( + compDe, + CriticsListStubComponent, + 1, + 1 + ); + const criticsListCmp = criticsListDes[0].injector.get( + CriticsListStubComponent + ) as CriticsListStubComponent; + + expect(criticsListCmp.textcriticsData).toBeTruthy(); + expect(criticsListCmp.textcriticsData) + .withContext(`should equal ${expectedTextcriticsData}`) + .toEqual(expectedTextcriticsData); + }); + }); + }); + }); + + describe('#openModal', () => { + describe('... should trigger on event from', () => { + describe('... CriticsListComponent if', () => { + beforeEach(async () => { + // Click button to open panel and get inner content + // Button debug elements + const buttonDes = getAndExpectDebugElementByCss( + compDe, + 'div.card > div.card-header button.btn-link', + 1, + 1 + ); + + // Button's native element to click on + const buttonEl = buttonDes[0].nativeElement; + + // Open panel + click(buttonEl as HTMLElement); + await detectChangesOnPush(fixture); + + expectOpenPanelBody(compDe, expectedPanelId, 'should have open panel'); + }); + + it('... modal snippet is undefined', () => { + const criticsListDes = getAndExpectDebugElementByDirective( + compDe, + CriticsListStubComponent, + 1, + 1 + ); + const criticsListCmp = criticsListDes[0].injector.get( + CriticsListStubComponent + ) as CriticsListStubComponent; + + criticsListCmp.openModalRequest.emit(undefined); + + expectSpyCall(openModalSpy, 1, undefined); + }); + + it('... modal snippet is given', () => { + const criticsListDes = getAndExpectDebugElementByDirective( + compDe, + CriticsListStubComponent, + 1, + 1 + ); + const criticsListCmp = criticsListDes[0].injector.get( + CriticsListStubComponent + ) as CriticsListStubComponent; + + criticsListCmp.openModalRequest.emit(expectedModalSnippet); + + expectSpyCall(openModalSpy, 1, expectedModalSnippet); + }); + }); + }); + + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + + it('... id is null', () => { + component.openModal(undefined); + + expectSpyCall(openModalRequestEmitSpy, 0, null); + }); + it('... id is empty string', () => { + component.openModal(''); + + expectSpyCall(openModalRequestEmitSpy, 0); + }); + }); + + it('... should emit id of given modal snippet', () => { + component.openModal(expectedModalSnippet); + + expectSpyCall(openModalRequestEmitSpy, 1, expectedModalSnippet); + }); + }); + + describe('#selectSvgSheet', () => { + describe('... should trigger on event from', () => { + describe('... CriticsListComponent if', () => { + beforeEach(async () => { + // Click button to open panel and get inner content + // Button debug elements + const buttonDes = getAndExpectDebugElementByCss( + compDe, + 'div.card > div.card-header button.btn-link', + 1, + 1 + ); + + // Button's native element to click on + const buttonEl = buttonDes[0].nativeElement; + + // Open panel + click(buttonEl as HTMLElement); + await detectChangesOnPush(fixture); + + expectOpenPanelBody(compDe, expectedPanelId, 'should have open panel'); + }); + + it('... svg sheet id is undefined', () => { + const criticsListDes = getAndExpectDebugElementByDirective( + compDe, + CriticsListStubComponent, + 1, + 1 + ); + const criticsListCmp = criticsListDes[0].injector.get( + CriticsListStubComponent + ) as CriticsListStubComponent; + + criticsListCmp.selectSvgSheetRequest.emit(undefined); + + expectSpyCall(selectSvgSheetSpy, 1, undefined); + }); + + it('... svg sheet id is given', () => { + const criticsListDes = getAndExpectDebugElementByDirective( + compDe, + CriticsListStubComponent, + 1, + 1 + ); + const criticsListCmp = criticsListDes[0].injector.get( + CriticsListStubComponent + ) as CriticsListStubComponent; + + criticsListCmp.selectSvgSheetRequest.emit(expectedSvgSheet.id); + + expectSpyCall(selectSvgSheetSpy, 1, expectedSvgSheet.id); + }); + }); + }); + + describe('... should not emit anything if ', () => { + it('... id is undefined', () => { + component.selectSvgSheet(undefined); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + it('... id is null', () => { + component.selectSvgSheet(null); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + it('... id is empty string', () => { + component.selectSvgSheet(''); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 0); + }); + }); + + it('... should emit id of selected svg sheet', () => { + component.selectSvgSheet(expectedSvgSheet.id); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 1, expectedSvgSheet.id); + + component.selectSvgSheet(expectedNextSvgSheet.id); + + expectSpyCall(selectSvgSheetRequestEmitSpy, 2, expectedNextSvgSheet.id); + }); + }); + }); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-report/textcritics/textcritics.component.ts b/src/app/views/edition-view/edition-outlets/edition-report/textcritics/textcritics.component.ts index 135b472d02..f2c985c792 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/textcritics/textcritics.component.ts +++ b/src/app/views/edition-view/edition-outlets/edition-report/textcritics/textcritics.component.ts @@ -51,6 +51,9 @@ export class TextcriticsComponent { * @returns {void} Emits the id. */ openModal(id: string): void { + if (!id) { + return; + } this.openModalRequest.emit(id); } @@ -64,6 +67,9 @@ export class TextcriticsComponent { * @returns {void} Emits the id. */ selectSvgSheet(id: string): void { + if (!id) { + return; + } this.selectSvgSheetRequest.emit(id); } } From ab8d9e7854414eafd594388d7e56f27e357fe89a Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Fri, 11 Feb 2022 02:43:04 +0100 Subject: [PATCH 083/148] test(edition): adjust tests after changes --- .../edition-accolade.component.spec.ts | 14 +- .../sources/sources.component.html | 12 +- .../sources/sources.component.spec.ts | 322 +++++++++++++++++- 3 files changed, 317 insertions(+), 31 deletions(-) diff --git a/src/app/views/edition-view/edition-outlets/edition-detail/edition-accolade/edition-accolade.component.spec.ts b/src/app/views/edition-view/edition-outlets/edition-detail/edition-accolade/edition-accolade.component.spec.ts index aeac6b6ba8..d92bf18e3b 100644 --- a/src/app/views/edition-view/edition-outlets/edition-detail/edition-accolade/edition-accolade.component.spec.ts +++ b/src/app/views/edition-view/edition-outlets/edition-detail/edition-accolade/edition-accolade.component.spec.ts @@ -199,22 +199,22 @@ describe('EditionAccoladeComponent (DONE)', () => { }); it('should have `svgSheetsData` input', () => { - expect(component.svgSheetsData).toBeDefined('should be defined'); + expect(component.svgSheetsData).withContext('should be defined').toBeDefined(); expect(component.svgSheetsData).toEqual(expectedSvgSheetsData, `should equal ${expectedSvgSheetsData}`); }); it('should have `selectedOverlay` input', () => { - expect(component.selectedOverlay).toBeDefined('should be defined'); + expect(component.selectedOverlay).withContext('should be defined').toBeDefined(); expect(component.selectedOverlay).toBe(expectedOverlay, `should be ${expectedOverlay}`); }); it('should have `selectedSvgSheet` input', () => { - expect(component.selectedSvgSheet).toBeDefined('should be defined'); + expect(component.selectedSvgSheet).withContext('should be defined').toBeDefined(); expect(component.selectedSvgSheet).toBe(expectedSvgSheet, `should be ${expectedSvgSheet}`); }); it('should have `selectedTextcriticalComments` input', () => { - expect(component.selectedTextcriticalComments).toBeDefined('should be defined'); + expect(component.selectedTextcriticalComments).withContext('should be defined').toBeDefined(); expect(component.selectedTextcriticalComments).toEqual( expectedSelectedTextcriticalComments, `should equal ${expectedSelectedTextcriticalComments}` @@ -222,7 +222,7 @@ describe('EditionAccoladeComponent (DONE)', () => { }); it('should have `showTkA` input', () => { - expect(component.showTkA).toBeDefined('should be defined'); + expect(component.showTkA).withContext('should be defined').toBeDefined(); expect(component.showTkA).toBe(expectedShowTka, `should be ${expectedShowTka}`); }); @@ -256,10 +256,10 @@ describe('EditionAccoladeComponent (DONE)', () => { const expectedTitle0 = 'Edierter Notentext'; const expectedTitle1 = 'Hinweise zur Nutzung'; - expect(buttonCmp0.textContent).toBeDefined('should be defined'); + expect(buttonCmp0.textContent).withContext('should be defined').toBeDefined(); expect(buttonCmp0.textContent).toBe(expectedTitle0, `should be ${expectedTitle0}`); - expect(buttonCmp1.textContent).toBeDefined('should be defined'); + expect(buttonCmp1.textContent).withContext('should be defined').toBeDefined(); expect(buttonCmp1.textContent.trim()).toBe(expectedTitle1, `should be ${expectedTitle1}`); }); diff --git a/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.html b/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.html index a4b3f6dc56..d5160d27af 100644 --- a/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.html +++ b/src/app/views/edition-view/edition-outlets/edition-report/sources/sources.component.html @@ -1,9 +1,9 @@ - - + + - + - + - + - + { let expectedModalSnippet: string; let expectedSvgSheet: EditionSvgSheet; let expectedNextSvgSheet: EditionSvgSheet; + let expectedPanelId: string; + let navigateToReportFragmentSpy: Spy; + let navigateToReportFragmentRequestEmitSpy: Spy; let openModalSpy: Spy; let openModalRequestEmitSpy: Spy; let selectSvgSheetSpy: Spy; let selectSvgSheetRequestEmitSpy: Spy; - let navigateToReportFragmentSpy: Spy; - let navigateToReportFragmentRequestEmitSpy: Spy; // Global NgbConfigModule @NgModule({ imports: [NgbAccordionModule], exports: [NgbAccordionModule] }) @@ -150,19 +157,20 @@ describe('SourcesComponent (DONE)', () => { alt: 'Aa:SkI/3', }; expectedModalSnippet = 'OP12_SHEET_COMING_SOON'; + expectedPanelId = 'awg-sources-panel'; // Spies on component functions // `.and.callThrough` will track the spy down the nested describes, see // https://jasmine.github.io/2.0/introduction.html#section-Spies:_%3Ccode%3Eand.callThrough%3C/code%3E - openModalSpy = spyOn(component, 'openModal').and.callThrough(); - openModalRequestEmitSpy = spyOn(component.openModalRequest, 'emit').and.callThrough(); - selectSvgSheetSpy = spyOn(component, 'selectSvgSheet').and.callThrough(); - selectSvgSheetRequestEmitSpy = spyOn(component.selectSvgSheetRequest, 'emit').and.callThrough(); navigateToReportFragmentSpy = spyOn(component, 'navigateToReportFragment').and.callThrough(); navigateToReportFragmentRequestEmitSpy = spyOn( component.navigateToReportFragmentRequest, 'emit' ).and.callThrough(); + openModalSpy = spyOn(component, 'openModal').and.callThrough(); + openModalRequestEmitSpy = spyOn(component.openModalRequest, 'emit').and.callThrough(); + selectSvgSheetSpy = spyOn(component, 'selectSvgSheet').and.callThrough(); + selectSvgSheetRequestEmitSpy = spyOn(component.selectSvgSheetRequest, 'emit').and.callThrough(); }); it('should create', () => { @@ -183,15 +191,23 @@ describe('SourcesComponent (DONE)', () => { }); describe('VIEW', () => { - it('should not contain source list component (stubbed)', () => { + it('... should contain one ngb-accordion without panel (div.card) yet', () => { + // Ngb-accordion debug element + const accordionDes = getAndExpectDebugElementByCss(compDe, 'ngb-accordion', 1, 1); + + // Panel + getAndExpectDebugElementByCss(accordionDes[0], 'div.card', 0, 0, 'yet'); + }); + + it('should not contain source list component (stubbed) yet', () => { getAndExpectDebugElementByDirective(compDe, SourceListStubComponent, 0, 0); }); - it('should not contain source description component (stubbed)', () => { + it('should not contain source description component (stubbed) yet', () => { getAndExpectDebugElementByDirective(compDe, SourceDescriptionStubComponent, 0, 0); }); - it('should not contain source evaluation component (stubbed)', () => { + it('should not contain source evaluation component (stubbed) yet', () => { getAndExpectDebugElementByDirective(compDe, SourceEvaluationStubComponent, 0, 0); }); }); @@ -230,16 +246,286 @@ describe('SourcesComponent (DONE)', () => { }); describe('VIEW', () => { - it('should contain source list component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceListStubComponent, 1, 1); - }); + it('... should contain one main ngb-accordion with one panel (div.card)', () => { + getAndExpectDebugElementByCss(compDe, 'ngb-accordion#sourcesAcc', 1, 1); - it('should contain source description component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceDescriptionStubComponent, 1, 1); + // Panel + getAndExpectDebugElementByCss(compDe, 'ngb-accordion#sourcesAcc > div.card', 1, 1); }); - it('should contain source evaluation component (stubbed)', () => { - getAndExpectDebugElementByDirective(compDe, SourceEvaluationStubComponent, 1, 1); + describe('... main ngb-accordion (sourcesAcc)', () => { + it('... should render title in outer panel header (div.card-header)', () => { + // Ngb-accordion panel debug element + const panelDes = getAndExpectDebugElementByCss(compDe, 'ngb-accordion#sourcesAcc > div.card', 1, 1); + + // Header + const headerDes = getAndExpectDebugElementByCss( + panelDes[0], + 'div#awg-sources-panel-header.card-header', + 1, + 1 + ); + + // Header Buttons + const buttonDes = getAndExpectDebugElementByCss(headerDes[0], 'div > button', 1, 1); + + const buttonCmp = buttonDes[0].nativeElement; + + const expectedTitle = 'I. Quellen'; + + expect(buttonCmp.textContent).withContext('should be defined').toBeDefined(); + expect(buttonCmp.textContent.trim()) + .withContext(`should be ${expectedTitle.trim()}`) + .toBe(expectedTitle.trim()); + }); + + it('... should open and close outer panel on click', fakeAsync(() => { + // Header debug elements + const panelHeaderDes = getAndExpectDebugElementByCss( + compDe, + 'ngb-accordion#sourcesAcc > div.card > div.card-header', + 1, + 1 + ); + + // Button debug elements + const buttonDes = getAndExpectDebugElementByCss( + panelHeaderDes[0], + 'button.btn-link', + 1, + 1, + 'in first panel' + ); + + // Panel opened first by default + expectOpenPanelBody(compDe, expectedPanelId, 'panel open'); + + // Click panel to close it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectClosedPanelBody(compDe, expectedPanelId, 'panel closed'); + + // Click panel again to open it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectOpenPanelBody(compDe, expectedPanelId, 'panel open'); + })); + + it('... should contain one sub ngb-accordion with three inner panels (div.card)', () => { + const outerAccDes = getAndExpectDebugElementByCss(compDe, 'ngb-accordion#sourcesAcc', 1, 1); + + const innerAccDes = getAndExpectDebugElementByCss( + outerAccDes[0], + 'ngb-accordion#sourcesPanelAcc', + 1, + 1 + ); + + // Panel + getAndExpectDebugElementByCss(innerAccDes[0], 'ngb-accordion#sourcesPanelAcc > div.card', 3, 3); + }); + + describe('... sub ngb-accordion (sourcesPanelAcc)', () => { + let innerAccDes; + + beforeEach(() => { + innerAccDes = getAndExpectDebugElementByCss(compDe, 'ngb-accordion#sourcesPanelAcc', 1, 1); + }); + + describe('... first inner panel', () => { + it('... should render title in panel header (div.card-header)', () => { + // Ngb-accordion panel debug element + const panelDes = getAndExpectDebugElementByCss(innerAccDes[0], 'div.card', 3, 3); + + // First panel header + const headerDes = getAndExpectDebugElementByCss( + panelDes[0], + 'div#awg-source-list-header.card-header', + 1, + 1 + ); + + // Header Buttons + const buttonDes = getAndExpectDebugElementByCss(headerDes[0], 'div > button', 1, 1); + + const buttonCmp = buttonDes[0].nativeElement; + + const expectedTitle = '1. Quellenübersicht'; + + expect(buttonCmp.textContent).withContext('should be defined').toBeDefined(); + expect(buttonCmp.textContent.trim()) + .withContext(`should be ${expectedTitle.trim()}`) + .toBe(expectedTitle.trim()); + }); + + it('... should open and close outer panel on click', fakeAsync(() => { + // Header debug elements + const panelHeaderDes = getAndExpectDebugElementByCss( + innerAccDes[0], + 'div.card > div.card-header', + 3, + 3 + ); + + // Button debug elements of first panel + const buttonDes = getAndExpectDebugElementByCss( + panelHeaderDes[0], + 'button.btn-link', + 1, + 1, + 'in first panel' + ); + + expectedPanelId = 'awg-source-list'; + + // Panel opened first by default + expectOpenPanelBody(innerAccDes[0], expectedPanelId, 'panel open'); + + // Click panel to close it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectClosedPanelBody(innerAccDes[0], expectedPanelId, 'panel closed'); + + // Click panel again to open it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectOpenPanelBody(innerAccDes[0], expectedPanelId, 'panel open'); + })); + + it('should contain source list component (stubbed)', () => { + getAndExpectDebugElementByDirective(innerAccDes[0], SourceListStubComponent, 1, 1); + }); + }); + describe('... second inner panel', () => { + it('... should render title in panel header (div.card-header)', () => { + // Ngb-accordion panel debug element + const panelDes = getAndExpectDebugElementByCss(innerAccDes[0], 'div.card', 3, 3); + + // Second panel header + const headerDes = getAndExpectDebugElementByCss( + panelDes[1], + 'div#awg-source-desc-header.card-header', + 1, + 1 + ); + + // Header Buttons + const buttonDes = getAndExpectDebugElementByCss(headerDes[0], 'div > button', 1, 1); + + const buttonCmp = buttonDes[0].nativeElement; + + const expectedTitle = '2. Quellenbeschreibung'; + + expect(buttonCmp.textContent).withContext('should be defined').toBeDefined(); + expect(buttonCmp.textContent.trim()) + .withContext(`should be ${expectedTitle.trim()}`) + .toBe(expectedTitle.trim()); + }); + + it('... should open and close outer panel on click', fakeAsync(() => { + // Header debug elements + const panelHeaderDes = getAndExpectDebugElementByCss( + innerAccDes[0], + 'div.card > div.card-header', + 3, + 3 + ); + + // Button debug elements of second panel + const buttonDes = getAndExpectDebugElementByCss( + panelHeaderDes[1], + 'button.btn-link', + 1, + 1, + 'in first panel' + ); + + expectedPanelId = 'awg-source-desc'; + + // Panel opened first by default + expectOpenPanelBody(innerAccDes[0], expectedPanelId, 'panel open'); + + // Click panel to close it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectClosedPanelBody(innerAccDes[0], expectedPanelId, 'panel closed'); + + // Click panel again to open it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectOpenPanelBody(innerAccDes[0], expectedPanelId, 'panel open'); + })); + + it('should contain source description component (stubbed)', () => { + getAndExpectDebugElementByDirective(innerAccDes[0], SourceDescriptionStubComponent, 1, 1); + }); + }); + + describe('... third inner panel', () => { + it('... should render title in panel header (div.card-header)', () => { + // Ngb-accordion panel debug element + const panelDes = getAndExpectDebugElementByCss(innerAccDes[0], 'div.card', 3, 3); + + // Third panel header + const headerDes = getAndExpectDebugElementByCss( + panelDes[2], + 'div#awg-source-evaluation-header.card-header', + 1, + 1 + ); + + // Header Buttons + const buttonDes = getAndExpectDebugElementByCss(headerDes[0], 'div > button', 1, 1); + + const buttonCmp = buttonDes[0].nativeElement; + + const expectedTitle = '3. Quellenbewertung'; + + expect(buttonCmp.textContent).withContext('should be defined').toBeDefined(); + expect(buttonCmp.textContent.trim()) + .withContext(`should be ${expectedTitle.trim()}`) + .toBe(expectedTitle.trim()); + }); + + it('... should open and close outer panel on click', fakeAsync(() => { + // Header debug elements + const panelHeaderDes = getAndExpectDebugElementByCss( + innerAccDes[0], + 'div.card > div.card-header', + 3, + 3 + ); + + // Button debug elements of third panel + const buttonDes = getAndExpectDebugElementByCss( + panelHeaderDes[2], + 'button.btn-link', + 1, + 1, + 'in first panel' + ); + + expectedPanelId = 'awg-source-evaluation'; + + // Panel opened first by default + expectOpenPanelBody(innerAccDes[0], expectedPanelId, 'panel open'); + + // Click panel to close it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectClosedPanelBody(innerAccDes[0], expectedPanelId, 'panel closed'); + + // Click panel again to open it + clickAndAwaitChanges(buttonDes[0], fixture); + + expectOpenPanelBody(innerAccDes[0], expectedPanelId, 'panel open'); + })); + + it('should contain source evaluation component (stubbed)', () => { + getAndExpectDebugElementByDirective(innerAccDes[0], SourceEvaluationStubComponent, 1, 1); + }); + }); + }); }); }); From 56e1801d83be299409f17bcd2f4ac426c67d70f7 Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Fri, 11 Feb 2022 02:46:03 +0100 Subject: [PATCH 084/148] test(shared): adjust setup for TableComponent --- src/app/shared/table/table.component.spec.ts | 39 +++++++++++++++++++- 1 file changed, 37 insertions(+), 2 deletions(-) diff --git a/src/app/shared/table/table.component.spec.ts b/src/app/shared/table/table.component.spec.ts index 44613df586..87f6252141 100644 --- a/src/app/shared/table/table.component.spec.ts +++ b/src/app/shared/table/table.component.spec.ts @@ -1,24 +1,59 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { Component, DebugElement } from '@angular/core'; + +import { NgbPaginationModule } from '@ng-bootstrap/ng-bootstrap'; + +import { getAndExpectDebugElementByCss, getAndExpectDebugElementByDirective } from '@testing/expect-helper'; import { TableComponent } from './table.component'; +@Component({ selector: 'awg-twelve-tone-spinner', template: '' }) +class TwelveToneSpinnerStubComponent {} + describe('TableComponent', () => { let component: TableComponent; let fixture: ComponentFixture; + let compDe: DebugElement; beforeEach(async () => { await TestBed.configureTestingModule({ - declarations: [TableComponent], + imports: [NgbPaginationModule], + declarations: [TableComponent, TwelveToneSpinnerStubComponent], }).compileComponents(); }); beforeEach(() => { fixture = TestBed.createComponent(TableComponent); + component = fixture.componentInstance; - fixture.detectChanges(); + compDe = fixture.debugElement; }); it('should create', () => { expect(component).toBeTruthy(); }); + + describe('BEFORE initial data binding', () => { + it('should not have paginatorOptions', () => { + expect(component.paginatorOptions).toBeUndefined('should be undefined'); + }); + + describe('VIEW', () => { + it('... should contain no form yet', () => { + getAndExpectDebugElementByCss(compDe, 'form', 0, 0); + }); + + it('... should contain no pagination divs yet', () => { + getAndExpectDebugElementByCss(compDe, 'div.awg-pagination', 0, 0); + }); + + it('... should contain no table yet', () => { + getAndExpectDebugElementByCss(compDe, 'table.table', 0, 0); + }); + + it('... should not display TwelveToneSpinnerComponent (stubbed)', () => { + getAndExpectDebugElementByDirective(compDe, TwelveToneSpinnerStubComponent, 0, 0); + }); + }); + }); }); From 1f8e8e544e4dc1cfb3adcf20fb9662817d0878da Mon Sep 17 00:00:00 2001 From: musicEnfanthen Date: Tue, 15 Feb 2022 08:08:05 +0100 Subject: [PATCH 085/148] fix(search): add required validation with custom if-condition - ongoing --- .../extended-search-form.component.html | 2 +- .../extended-search-form.component.ts | 32 ++++++++++--------- 2 files changed, 18 insertions(+), 16 deletions(-) diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html index d71fbb79c9..d543521beb 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.html @@ -93,7 +93,7 @@
        -

        +

        {{ searchFormStrings.errorMessage }}
        diff --git a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts index 76e84874d4..6160570d87 100644 --- a/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts +++ b/src/app/views/data-view/data-outlets/search-panel/extended-search-form/extended-search-form.component.ts @@ -6,7 +6,7 @@ import { faPlus, faSearch, faTrash } from '@fortawesome/free-solid-svg-icons'; import { PropertyTypesInResourceClassResponseJson, ResourceTypesInVocabularyResponseJson, - ResTypeItemJson, + ResTypeItemJson } from '@awg-shared/api-objects'; import { ExtendedSearchParams } from '@awg-views/data-view/models'; @@ -113,6 +113,11 @@ export class ExtendedSearchFormComponent implements OnInit { }; } + toggle(index: number) { + this.getSearchvalControlAtIndex(index).setValidators(this.getCompopoControlAtIndex(index).value === "EXISTS" ? null : [Validators.required]); + this.getSearchvalControlAtIndex(index).updateValueAndValidity(); + } + /** * Public method: createExtendedSearchForm. * @@ -206,7 +211,7 @@ export class ExtendedSearchFormComponent implements OnInit { const guiElementId = propertyListEntry.guielement_id; const valueTypeId = propertyListEntry.valuetype_id; - this.getCompopoControlAtIndex(index).setValue(this.defaultFormString); + this.getCompopoControlAtIndex(index).setValue(''); this.getSearchvalControlAtIndex(index).setValue(''); this.selectedCompopSets[index] = this.getCompopSetByValueType(valueTypeId, guiElementId); @@ -303,7 +308,7 @@ export class ExtendedSearchFormComponent implements OnInit { } isAddButtonDisabled(index: number): string | null { - const compopValue = this._getFormArrayControlAtIndex('compopControl', index).value; + const compopValue = this.getCompopoControlAtIndex(index).value; return this._isPropertyIdOrCompopMissing(index) || (compopValue !== 'EXISTS' && this._isSearchvalMissing(index)) || @@ -322,7 +327,7 @@ export class ExtendedSearchFormComponent implements OnInit { } isSearchvalControlDisabled(index: number): string | null { - const compopValue = this._getFormArrayControlAtIndex('compopControl', index).value; + const compopValue = this.getCompopoControlAtIndex(index).value; return this._isResourecetypeMissing() || this._isPropertyIdOrCompopMissing(index) || compopValue === 'EXISTS' ? '' : null; @@ -344,19 +349,12 @@ export class ExtendedSearchFormComponent implements OnInit { } private _isPropertyIdMissing(index: number): boolean { - const propertyIdValue = this._getFormArrayControlAtIndex('propertyIdControl', index).value; + return this._isFormControlValueMissing('propertyIdControl', index); - const propertyIdMissing = !propertyIdValue || propertyIdValue === this.defaultFormString; - - return propertyIdMissing; } private _isCompopMissing(index: number): boolean { - const compopValue = this._getFormArrayControlAtIndex('compopControl', index).value; - - const compopMissing = !compopValue || compopValue === this.defaultFormString; - - return compopMissing; + return this._isFormControlValueMissing('compopControl', index); } private _isPropertyIdOrCompopMissing(index: number): boolean { @@ -364,8 +362,12 @@ export class ExtendedSearchFormComponent implements OnInit { } private _isSearchvalMissing(index: number): boolean { - const searchval = this._getFormArrayControlAtIndex('searchvalControl', index); - return !searchval || searchval === this.defaultFormString; + return this._isFormControlValueMissing('searchvalControl', index); + } + + private _isFormControlValueMissing(controlName: string, index: number): boolean { + const formControlValue = this._getFormArrayControlAtIndex(controlName, index).value; + return !formControlValue || formControlValue === this.defaultFormString; } private _resetForm() { From 17c5ed3f1e0a54bd0aa782bd51f9812b75513d2e Mon Sep 17 00:00:00 2001 From: "Stefan@Lap" Date: Tue, 15 Feb 2022 08:33:02 +0100 Subject: [PATCH 086/148] refactor(search): use TableComponent in search result view - ongoing --- src/app/shared/table/table-data.model.ts | 16 +++---- src/app/shared/table/table.component.html | 12 +++-- src/app/shared/table/table.component.ts | 8 +++- .../search-result-list.component.html | 10 +++- .../search-result-list.component.ts | 48 ++++++++++++++++++- 5 files changed, 79 insertions(+), 15 deletions(-) diff --git a/src/app/shared/table/table-data.model.ts b/src/app/shared/table/table-data.model.ts index 931ea41864..eb5316a874 100644 --- a/src/app/shared/table/table-data.model.ts +++ b/src/app/shared/table/table-data.model.ts @@ -1,5 +1,5 @@ import { IconDefinition } from '@fortawesome/free-solid-svg-icons'; -import { Observable, of } from 'rxjs'; +import { Observable, of as observableOf } from 'rxjs'; /** * The TableData class. @@ -33,14 +33,14 @@ export class TableData { * * It initializes the class with given values. * - * @param {any} header The given table header. - * @param {any} rows The given table rows. + * @param {string[]} header The given table header. + * @param {any[]} rows The given table rows. */ - constructor(header: any, rows: any) { - this.header = header; - this.totalRows$ = of(rows); - this.filteredRows = rows; - this.paginatedRows$ = of(rows); + constructor(header: string[], rows: any[]) { + this.header = header || ['']; + this.totalRows$ = observableOf(rows) || observableOf([]); + this.filteredRows = rows || []; + this.paginatedRows$ = observableOf(rows) || observableOf([]); } } diff --git a/src/app/shared/table/table.component.html b/src/app/shared/table/table.component.html index ff6e7f7e39..cc6eb3ab39 100644 --- a/src/app/shared/table/table.component.html +++ b/src/app/shared/table/table.component.html @@ -1,4 +1,4 @@ -
        +