diff --git a/.travis.yml b/.travis.yml index d46202f5f30d4606ef47f0bc3e46e26cb53c2f4f..403a10b770f1b6202d4fb03d14e098f608f295ca 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,7 +11,7 @@ language: node_js node_js: - "8" - - "9" + - "10" cache: yarn: true diff --git a/README.md b/README.md index cb2f41130fbc341778c11413763b94432457d67f..1b3ed9b7cbbe512d37e5ab341cb8ce7d2031cc11 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ If you're looking for the 2016 Angular 2 DSpace UI prototype, you can find it [h Quick start ----------- -**Ensure you're running [Node](https://nodejs.org) >= `v8.0.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) >= `v1.x`** +**Ensure you're running [Node](https://nodejs.org) `v8.0.x` or `v10.0.x`, [npm](https://www.npmjs.com/) >= `v5.x` and [yarn](https://yarnpkg.com) >= `v1.x`** ```bash # clone the repo @@ -65,7 +65,7 @@ Requirements ------------ - [Node.js](https://nodejs.org), [npm](https://www.npmjs.com/), and [yarn](https://yarnpkg.com) -- Ensure you're running node >= `v8.x`, npm >= `v5.x` and yarn >= `v1.x` +- Ensure you're running node `v8.x` or `v10.x`, npm >= `v5.x` and yarn >= `v1.x` If you have [`nvm`](https://github.com/creationix/nvm#install-script) or [`nvm-windows`](https://github.com/coreybutler/nvm-windows) installed, which is highly recommended, you can run `nvm install --lts && nvm use` to install and start using the latest Node LTS. diff --git a/package.json b/package.json index 5ec7b2d694840b0d2e0df50b63500c0b2423d125..791637903936a9cd11c33b7054b4fc4ddc2b01f6 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ }, "license": "BSD-2-Clause", "engines": { - "node": ">=8.0.0" + "node": "8.* || >= 10.*" }, "scripts": { "global": "npm install -g @angular/cli marked node-gyp nodemon node-nightly npm-check-updates npm-run-all rimraf typescript ts-node typedoc webpack webpack-bundle-analyzer pm2 rollup", @@ -51,7 +51,7 @@ "debug:server": "node-nightly --inspect --debug-brk dist/server.js", "debug:build": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --mode development", "debug:build:prod": "node-nightly --inspect --debug-brk node_modules/webpack/bin/webpack.js --env.aot --env.client --env.server --mode production", - "ci": "yarn run lint && yarn run build:aot && yarn run test:headless && npm-run-all -p -r server e2e", + "ci": "yarn run lint && yarn run build:aot && yarn run test:headless", "protractor": "node node_modules/protractor/bin/protractor", "pree2e": "yarn run webdriver:update", "e2e": "yarn run protractor", @@ -62,7 +62,9 @@ "webdriver:update": "node node_modules/protractor/bin/webdriver-manager update --standalone --gecko false", "lint": "tslint \"src/**/*.ts\" && tslint \"e2e/**/*.ts\"", "docs": "typedoc --options typedoc.json ./src/", - "coverage": "http-server -c-1 -o -p 9875 ./coverage" + "coverage": "http-server -c-1 -o -p 9875 ./coverage", + "postinstall": "yarn run patch-protractor", + "patch-protractor": "ncp node_modules/webdriver-manager node_modules/protractor/node_modules/webdriver-manager" }, "dependencies": { "@angular/animations": "^6.1.4", @@ -120,7 +122,7 @@ "ngx-moment": "^3.1.0", "ngx-pagination": "3.0.3", "nouislider": "^11.0.0", - "pem": "1.12.3", + "pem": "1.13.2", "reflect-metadata": "0.1.12", "rxjs": "6.2.2", "rxjs-spy": "^7.5.1", @@ -167,7 +169,7 @@ "codelyzer": "^4.4.4", "compression-webpack-plugin": "^1.1.6", "copy-webpack-plugin": "^4.4.1", - "copyfiles": "^2.1.0", + "copyfiles": "^2.1.1", "coveralls": "3.0.0", "css-loader": "1.0.0", "cssnano": "^4.1.10", @@ -190,8 +192,9 @@ "karma-remap-coverage": "^0.1.5", "karma-remap-istanbul": "0.6.0", "karma-sourcemap-loader": "0.3.7", - "karma-webdriver-launcher": "1.0.5", + "karma-webdriver-launcher": "^1.0.7", "karma-webpack": "3.0.0", + "ncp": "^2.0.0", "ngrx-store-freeze": "^0.2.4", "node-sass": "^4.11.0", "nodemon": "^1.15.0", @@ -204,7 +207,7 @@ "postcss-loader": "^3.0.0", "postcss-responsive-type": "1.0.0", "postcss-smart-import": "0.7.6", - "protractor": "^5.3.0", + "protractor": "^5.4.2", "protractor-istanbul-plugin": "2.0.0", "raw-loader": "0.5.1", "resolve-url-loader": "^2.3.0", @@ -225,10 +228,11 @@ "tslint": "5.11.0", "typedoc": "^0.9.0", "typescript": "^2.9.1", + "webdriver-manager": "^12.1.6", "webpack": "^4.17.1", "webpack-bundle-analyzer": "^3.3.2", "webpack-dev-middleware": "3.2.0", - "webpack-dev-server": "^3.1.5", + "webpack-dev-server": "^3.1.11", "webpack-import-glob-loader": "^1.6.3", "webpack-merge": "4.1.4", "webpack-node-externals": "1.7.2" diff --git a/resources/i18n/cs.json b/resources/i18n/cs.json index 1fdd02401bdd233b47624e97796112a8b2b6fbf7..d658030b6b92785207211ad67a5e8cd5e9689ccc 100644 --- a/resources/i18n/cs.json +++ b/resources/i18n/cs.json @@ -1,277 +1,149 @@ { - "footer": { - "copyright": "copyright © 2002-{{ year }}", - "link.dspace": "software DSpace", - "link.duraspace": "DuraSpace" - }, - "collection": { - "page": { - "news": "Novinky", - "license": "Licence", - "browse": { - "recent": { - "head": "Poslednà pÅ™ÃspÄ›vky" - } - } - } - }, - "community": { - "page": { - "news": "Novinky", - "license": "Licence" - }, - "sub-collection-list": { - "head": "Kolekce v této komunitÄ›" - } - }, - "item": { - "page": { - "author": "Autor", - "abstract": "Abstract", - "date": "Datum", - "uri": "URI", - "files": "Soubory", - "collections": "Kolekce", - "filesection": { - "download": "Stáhnout", - "name": "Název:", - "format": "Formát:", - "size": "Velikost:", - "description": "Popis:" - }, - "link": { - "simple": "Minimálnà záznam", - "full": "Úplný záznam" - } - } - }, - "nav": { - "home": "Domů", - "login": "PÅ™ihlásit se", - "logout": "Odhlásit se" - }, - "pagination": { - "results-per-page": "Výsledků na stránku", - "sort-direction": "SeÅ™azenÃ", - "showing": { - "label": "Zobrazujà se záznamy ", - "detail": "{{ range }} z {{ total }}" - } - }, - "sorting": { - "score": { - "DESC": "Relevance" - }, - "dc.title": { - "ASC": "Název vzestupnÄ›", - "DESC": "Název sestupnÄ›" - } - }, - "title": "DSpace", - "404": { - "help": "NepodaÅ™ilo se najÃt stránku, kterou hledáte. Je možné, že stránka byla pÅ™esunuta nebo smazána. Pomocà tlaÄÃtka nÞe můžete pÅ™ejÃt na domovskou stránku. ", - "page-not-found": "stránka nenalezena", - "link": { - "home-page": "PÅ™ejÃt na domovskou stránku" - } - }, - "home": { - "title": "DSpace Angular :: Domů", - "description": "", - "top-level-communities": { - "head": "Komunity v DSpace", - "help": "VybránÃm komunity můžete prohlÞet jejà kolekce." - } - }, - "search": { - "title": "DSpace Angular :: Hledat", - "description": "", - "form": { - "search": "Hledat", - "search_dspace": "Hledat v DSpace" - }, - "results": { - "head": "Výsledky hledánÃ", - "no-results": "Nebyli nalezeny žádné výsledky" - }, - "sidebar": { - "close": "ZpÄ›t na výsledky", - "open": "Vyhledávacà nástroje", - "results": "výsledky", - "filters": { - "title": "Filtry" - }, - "settings": { - "title": "NastavenÃ", - "sort-by": "Řadit dle", - "rpp": "Výsledků na stránku" - } - }, - "view-switch": { - "show-list": "Zobrazit seznam", - "show-grid": "Zobrazit mřÞku" - }, - "filters": { - "head": "Filtry", - "reset": "Obnovit filtry", - "applied": { - "f.author": "Autor", - "f.dateIssued.min": "Od data", - "f.dateIssued.max": "Do data", - "f.subject": "PÅ™edmÄ›t", - "f.has_content_in_original_bundle": "Má soubory" - }, - "filter": { - "show-more": "Zobrazit vÃce", - "show-less": "Sbalit", - "author": { - "placeholder": "Jméno autora", - "head": "Autor" - }, - "scope": { - "placeholder": "Filtr rozsahu", - "head": "Rozsah" - }, - "subject": { - "placeholder": "PÅ™edmÄ›t", - "head": "PÅ™edmÄ›t" - }, - "dateIssued": { - "max": { - "placeholder": "Datum od" - }, - "min": { - "placeholder": "Datum do" - }, - "head": "Datum" - }, - "has_content_in_original_bundle": { - "head": "Má soubory" - } - } - } - }, - "browse": { - "title": "ProhlÞÃte {{ collection }} dle {{ field }} {{ value }}" - }, - "admin": { - "registries": { - "metadata": { - "title": "DSpace Angular :: Registr metadat", - "head": "Registr metadat", - "description": "Registr metadat je seznam vÅ¡ech metadatových polà dostupných v repozitáři. Tyto pole mohou být rozdÄ›lena do vÃce schémat. DSpace vÅ¡ak vyžaduje použità schématu kvalifikový Dublin Core.", - "schemas": { - "table": { - "id": "ID", - "namespace": "Jmenný prostor", - "name": "Název" - }, - "no-items": "Žádná schémata metadat." - } - }, - "schema": { - "title": "DSpace Angular :: Registr schémat metadat", - "head": "Metadata Schema", - "description": "Toto je schéma metadat pro „{{namespace}}“.", - "fields": { - "head": "Pole schématu metadat", - "table": { - "field": "Pole", - "scopenote": "Poznámka o rozsahu" - }, - "no-items": "Žádná metadatová pole." - } - }, - "bitstream-formats": { - "title": "DSpace Angular :: Registr formátů souborů", - "head": "Registr formátů souborů", - "description": "Tento seznam formátů souborů poskytuje informace o známých formátech a o úrovni jejich podpory.", - "formats": { - "table": { - "name": "Název", - "mimetype": "Typ MIME", - "supportLevel": { - "head": "Úroveň podpory", - "0": "Neznámá", - "1": "Známá", - "2": "Podpora" - }, - "internal": "internÃ" - }, - "no-items": "Žádné formáty souborů." - } - } - } - }, - "loading": { - "default": "NaÄÃtá se...", - "top-level-communities": "NaÄÃtajà se komunity nejvyššà úrovnÄ›...", - "community": "NaÄÃtá se komunita...", - "collection": "NaÄÃtá se kolekce...", - "sub-collections": "NaÄÃtajà se subkolekce...", - "recent-submissions": "NaÄÃtajà se poslednà pÅ™ÃspÄ›vky...", - "item": "NaÄÃtá se záznam...", - "objects": "NaÄÃtá se...", - "search-results": "NaÄÃtajà se výsledky hledánÃ...", - "browse-by": "NaÄÃtajà se záznamy..." - }, - "error": { - "default": "Chyba", - "top-level-communities": "Chyba bÄ›hem stahovánà komunit nejvyššà úrovnÄ›", - "community": "Chyba bÄ›hem stahovánà komunity", - "collection": "Chyba bÄ›hem stahovánà kolekce", - "sub-collections": "Chyba bÄ›hem stahovánà subkolekcÃ", - "recent-submissions": "Chyba bÄ›hem stahovánà poslednÃch pÅ™ÃspÄ›vků", - "item": "Chyba bÄ›hem stahovánà záznamu", - "objects": "Chyba bÄ›hem stahovánà objektů", - "search-results": "Chyba bÄ›hem stahovánà výsledků hledánÃ", - "browse-by": "Chyba bÄ›hem stahovánà záznamů", - "validation": { - "pattern": "Tento vstup je omezen dle vzoru: {{ pattern }}.", - "license": { - "notgranted": "Pro dokonÄenà zaslánà MusÃte udÄ›lit licenci. Pokud v tuto chvÃli tuto licenci nemůžete udÄ›lit, můžete svou práci uložit a pozdÄ›ji se k svému pÅ™ÃspÄ›veku vrátit nebo jej smazat." - } - } - }, - "form": { - "submit": "Odeslat", - "cancel": "ZruÅ¡it", - "search": "Hledat", - "remove": "Smazat", - "first-name": "KÅ™estnà jméno", - "last-name": "PÅ™ÃjmenÃ", - "loading": "NaÄÃtá se...", - "no-results": "Nebyli nalezeny žádné výsledky", - "no-value": "Nebyla zadána hodnota", - "group-collapse": "Sbalit", - "group-expand": "Rozbalit", - "group-collapse-help": "KliknutÃm sem sbalÃte", - "group-expand-help": "KliknutÃm sem rozbalÃte a pÅ™idáte dalÅ¡Ã prvky" - }, - "login": { - "title": "PÅ™ihlásit se", - "form": { - "header": "ProsÃm, pÅ™ihlaste se do DSpace", - "email": "E-mailová adresa", - "forgot-password": "ZapomnÄ›li jste své heslo?", - "new-user": "Nový uživatel? Zaregistrujte se kliknutÃm sem.", - "password": "Heslo", - "submit": "PÅ™ihlásit se" - } - }, - "logout": { - "title": "Odhlásit se", - "form": { - "header": "Odhlásit se z DSpace", - "submit": "Odhlásit se" - } - }, - "auth": { - "messages": { - "expired": "VaÅ¡e relace vyprÅ¡ela. ProsÃm, znova se pÅ™ihlaste." - }, - "errors": { - "invalid-user": "Neplatná e-mailová adresa nebo heslo." - } - } + "404.help": "NepodaÅ™ilo se najÃt stránku, kterou hledáte. Je možné, že stránka byla pÅ™esunuta nebo smazána. Pomocà tlaÄÃtka nÞe můžete pÅ™ejÃt na domovskou stránku. ", + "404.link.home-page": "PÅ™ejÃt na domovskou stránku", + "404.page-not-found": "stránka nenalezena", + "admin.registries.bitstream-formats.description": "Tento seznam formátů souborů poskytuje informace o známých formátech a o úrovni jejich podpory.", + "admin.registries.bitstream-formats.formats.no-items": "Žádné formáty souborů.", + "admin.registries.bitstream-formats.formats.table.internal": "internÃ", + "admin.registries.bitstream-formats.formats.table.mimetype": "Typ MIME", + "admin.registries.bitstream-formats.formats.table.name": "Název", + "admin.registries.bitstream-formats.formats.table.supportLevel.0": "Neznámá", + "admin.registries.bitstream-formats.formats.table.supportLevel.1": "Známá", + "admin.registries.bitstream-formats.formats.table.supportLevel.2": "Podpora", + "admin.registries.bitstream-formats.formats.table.supportLevel.head": "Úroveň podpory", + "admin.registries.bitstream-formats.head": "Registr formátů souborů", + "admin.registries.bitstream-formats.title": "DSpace Angular :: Registr formátů souborů", + "admin.registries.metadata.description": "Registr metadat je seznam vÅ¡ech metadatových polà dostupných v repozitáři. Tyto pole mohou být rozdÄ›lena do vÃce schémat. DSpace vÅ¡ak vyžaduje použità schématu kvalifikový Dublin Core.", + "admin.registries.metadata.head": "Registr metadat", + "admin.registries.metadata.schemas.no-items": "Žádná schémata metadat.", + "admin.registries.metadata.schemas.table.id": "ID", + "admin.registries.metadata.schemas.table.name": "Název", + "admin.registries.metadata.schemas.table.namespace": "Jmenný prostor", + "admin.registries.metadata.title": "DSpace Angular :: Registr metadat", + "admin.registries.schema.description": "Toto je schéma metadat pro „{{namespace}}“.", + "admin.registries.schema.fields.head": "Pole schématu metadat", + "admin.registries.schema.fields.no-items": "Žádná metadatová pole.", + "admin.registries.schema.fields.table.field": "Pole", + "admin.registries.schema.fields.table.scopenote": "Poznámka o rozsahu", + "admin.registries.schema.head": "Metadata Schema", + "admin.registries.schema.title": "DSpace Angular :: Registr schémat metadat", + "auth.errors.invalid-user": "Neplatná e-mailová adresa nebo heslo.", + "auth.messages.expired": "VaÅ¡e relace vyprÅ¡ela. ProsÃm, znova se pÅ™ihlaste.", + "browse.title": "ProhlÞÃte {{ collection }} dle {{ field }} {{ value }}", + "collection.page.browse.recent.head": "Poslednà pÅ™ÃspÄ›vky", + "collection.page.license": "Licence", + "collection.page.news": "Novinky", + "community.page.license": "Licence", + "community.page.news": "Novinky", + "community.sub-collection-list.head": "Kolekce v této komunitÄ›", + "error.browse-by": "Chyba bÄ›hem stahovánà záznamů", + "error.collection": "Chyba bÄ›hem stahovánà kolekce", + "error.community": "Chyba bÄ›hem stahovánà komunity", + "error.default": "Chyba", + "error.item": "Chyba bÄ›hem stahovánà záznamu", + "error.objects": "Chyba bÄ›hem stahovánà objektů", + "error.recent-submissions": "Chyba bÄ›hem stahovánà poslednÃch pÅ™ÃspÄ›vků", + "error.search-results": "Chyba bÄ›hem stahovánà výsledků hledánÃ", + "error.sub-collections": "Chyba bÄ›hem stahovánà subkolekcÃ", + "error.top-level-communities": "Chyba bÄ›hem stahovánà komunit nejvyššà úrovnÄ›", + "error.validation.license.notgranted": "Pro dokonÄenà zaslánà MusÃte udÄ›lit licenci. Pokud v tuto chvÃli tuto licenci nemůžete udÄ›lit, můžete svou práci uložit a pozdÄ›ji se k svému pÅ™ÃspÄ›veku vrátit nebo jej smazat.", + "error.validation.pattern": "Tento vstup je omezen dle vzoru: {{ pattern }}.", + "footer.copyright": "copyright © 2002-{{ year }}", + "footer.link.dspace": "software DSpace", + "footer.link.duraspace": "DuraSpace", + "form.cancel": "ZruÅ¡it", + "form.first-name": "KÅ™estnà jméno", + "form.group-collapse": "Sbalit", + "form.group-collapse-help": "KliknutÃm sem sbalÃte", + "form.group-expand": "Rozbalit", + "form.group-expand-help": "KliknutÃm sem rozbalÃte a pÅ™idáte dalÅ¡Ã prvky", + "form.last-name": "PÅ™ÃjmenÃ", + "form.loading": "NaÄÃtá se...", + "form.no-results": "Nebyli nalezeny žádné výsledky", + "form.no-value": "Nebyla zadána hodnota", + "form.remove": "Smazat", + "form.search": "Hledat", + "form.submit": "Odeslat", + "home.description": "", + "home.title": "DSpace Angular :: Domů", + "home.top-level-communities.head": "Komunity v DSpace", + "home.top-level-communities.help": "VybránÃm komunity můžete prohlÞet jejà kolekce.", + "item.page.abstract": "Abstract", + "item.page.author": "Autor", + "item.page.collections": "Kolekce", + "item.page.date": "Datum", + "item.page.files": "Soubory", + "item.page.filesection.description": "Popis:", + "item.page.filesection.download": "Stáhnout", + "item.page.filesection.format": "Formát:", + "item.page.filesection.name": "Název:", + "item.page.filesection.size": "Velikost:", + "item.page.link.full": "Úplný záznam", + "item.page.link.simple": "Minimálnà záznam", + "item.page.uri": "URI", + "loading.browse-by": "NaÄÃtajà se záznamy...", + "loading.collection": "NaÄÃtá se kolekce...", + "loading.community": "NaÄÃtá se komunita...", + "loading.default": "NaÄÃtá se...", + "loading.item": "NaÄÃtá se záznam...", + "loading.objects": "NaÄÃtá se...", + "loading.recent-submissions": "NaÄÃtajà se poslednà pÅ™ÃspÄ›vky...", + "loading.search-results": "NaÄÃtajà se výsledky hledánÃ...", + "loading.sub-collections": "NaÄÃtajà se subkolekce...", + "loading.top-level-communities": "NaÄÃtajà se komunity nejvyššà úrovnÄ›...", + "login.form.email": "E-mailová adresa", + "login.form.forgot-password": "ZapomnÄ›li jste své heslo?", + "login.form.header": "ProsÃm, pÅ™ihlaste se do DSpace", + "login.form.new-user": "Nový uživatel? Zaregistrujte se kliknutÃm sem.", + "login.form.password": "Heslo", + "login.form.submit": "PÅ™ihlásit se", + "login.title": "PÅ™ihlásit se", + "logout.form.header": "Odhlásit se z DSpace", + "logout.form.submit": "Odhlásit se", + "logout.title": "Odhlásit se", + "nav.home": "Domů", + "nav.login": "PÅ™ihlásit se", + "nav.logout": "Odhlásit se", + "pagination.results-per-page": "Výsledků na stránku", + "pagination.showing.detail": "{{ range }} z {{ total }}", + "pagination.showing.label": "Zobrazujà se záznamy ", + "pagination.sort-direction": "SeÅ™azenÃ", + "search.description": "", + "search.filters.applied.f.author": "Autor", + "search.filters.applied.f.dateIssued.max": "Do data", + "search.filters.applied.f.dateIssued.min": "Od data", + "search.filters.applied.f.has_content_in_original_bundle": "Má soubory", + "search.filters.applied.f.subject": "PÅ™edmÄ›t", + "search.filters.filter.author.head": "Autor", + "search.filters.filter.author.placeholder": "Jméno autora", + "search.filters.filter.dateIssued.head": "Datum", + "search.filters.filter.dateIssued.max.placeholder": "Datum od", + "search.filters.filter.dateIssued.min.placeholder": "Datum do", + "search.filters.filter.has_content_in_original_bundle.head": "Má soubory", + "search.filters.filter.scope.head": "Rozsah", + "search.filters.filter.scope.placeholder": "Filtr rozsahu", + "search.filters.filter.show-less": "Sbalit", + "search.filters.filter.show-more": "Zobrazit vÃce", + "search.filters.filter.subject.head": "PÅ™edmÄ›t", + "search.filters.filter.subject.placeholder": "PÅ™edmÄ›t", + "search.filters.head": "Filtry", + "search.filters.reset": "Obnovit filtry", + "search.form.search": "Hledat", + "search.form.search_dspace": "Hledat v DSpace", + "search.results.head": "Výsledky hledánÃ", + "search.results.no-results": "Nebyli nalezeny žádné výsledky", + "search.sidebar.close": "ZpÄ›t na výsledky", + "search.sidebar.filters.title": "Filtry", + "search.sidebar.open": "Vyhledávacà nástroje", + "search.sidebar.results": "výsledky", + "search.sidebar.settings.rpp": "Výsledků na stránku", + "search.sidebar.settings.sort-by": "Řadit dle", + "search.sidebar.settings.title": "NastavenÃ", + "search.title": "DSpace Angular :: Hledat", + "search.view-switch.show-grid": "Zobrazit mřÞku", + "search.view-switch.show-list": "Zobrazit seznam", + "sorting.dc.title.ASC": "Název vzestupnÄ›", + "sorting.dc.title.DESC": "Název sestupnÄ›", + "sorting.score.DESC": "Relevance", + "title": "DSpace" } diff --git a/resources/i18n/de.json b/resources/i18n/de.json index d6b02ff533d0e1fb3bd52bf8365f6c2e9d04f702..d184e7d091f7f31a91e61e8c0336a7ece01e3abc 100644 --- a/resources/i18n/de.json +++ b/resources/i18n/de.json @@ -1,277 +1,149 @@ { - "footer": { - "copyright": "Copyright © 2002-{{ year }}", - "link.dspace": "DSpace Software", - "link.duraspace": "DuraSpace" - }, - "collection": { - "page": { - "news": "Neuigkeiten", - "license": "Lizenz", - "browse": { - "recent": { - "head": "Aktuellste Veröffentlichungen" - } - } - } - }, - "community": { - "page": { - "news": "Neuigkeiten", - "license": "Lizenz" - }, - "sub-collection-list": { - "head": "Sammlungen in diesem Bereich" - } - }, - "item": { - "page": { - "author": "Autor", - "abstract": "Kurzfassung", - "date": "Datum", - "uri": "URI", - "files": "Dateien", - "collections": "Sammlungen", - "filesection": { - "download": "Herunterladen", - "name": "Name:", - "format": "Format:", - "size": "Größe:", - "description": "Beschreibung:" - }, - "link": { - "simple": "Kurzanzeige", - "full": "Vollanzeige" - } - } - }, - "nav": { - "home": "Zur Startseite", - "login": "Anmelden", - "logout": "Abmelden" - }, - "pagination": { - "results-per-page": "Ergebnisse pro Seite", - "sort-direction": "Sortiermöglichkeiten", - "showing": { - "label": "Anzeige der Treffer ", - "detail": "{{ range }} bis {{ total }}" - } - }, - "sorting": { - "score": { - "DESC": "Relevanz" - }, - "dc.title": { - "ASC": "Titel aufsteigend", - "DESC": "Titel absteigend" - } - }, - "title": "DSpace", - "404": { - "help": "Die Seite, die Sie aufrufen wollten, konnte nicht gefunden werden. Sie könnte verschoben oder gelöscht worden sein. Mit dem Link unten kommen Sie zurück zur Startseite. ", - "page-not-found": "Seite nicht gefunden", - "link": { - "home-page": "Zurück zur Startseite" - } - }, - "home": { - "title": "DSpace Angular :: Startseite", - "description": "", - "top-level-communities": { - "head": "Bereiche in DSpace", - "help": "Wählen Sie einen Bereich, um seine Sammlungen einzusehen." - } - }, - "search": { - "title": "DSpace Angular :: Suche", - "description": "", - "form": { - "search": "Suche", - "search_dspace": "DSpace durchsuchen" - }, - "results": { - "head": "Suchergebnisse", - "no-results": "Zu dieser Suche gibt es keine Treffer." - }, - "sidebar": { - "close": "Zurück zu den Ergebnissen", - "open": "Suchwerkzeuge", - "results": "Ergebnisse", - "filters": { - "title": "Filter" - }, - "settings": { - "title": "Einstellungen", - "sort-by": "Sortiere nach", - "rpp": "Treffer pro Seite" - } - }, - "view-switch": { - "show-list": "Zeige als Liste", - "show-grid": "Zeige als Raster" - }, - "filters": { - "head": "Filter", - "reset": "Filter zurücksetzen", - "applied": { - "f.author": "Autor", - "f.dateIssued.min": "Anfangsdatum", - "f.dateIssued.max": "Enddatum", - "f.subject": "Thema", - "f.has_content_in_original_bundle": "Besitzt Dateien" - }, - "filter": { - "show-more": "Zeige mehr", - "show-less": "Zeige weniger", - "author": { - "placeholder": "Autor", - "head": "Autor" - }, - "scope": { - "placeholder": "Bereichsfilter", - "head": "Bereich" - }, - "subject": { - "placeholder": "Schlagwort", - "head": "Schlagwort" - }, - "dateIssued": { - "max": { - "placeholder": "Frühestes Datum" - }, - "min": { - "placeholder": "Ältestes Datum" - }, - "head": "Datum" - }, - "has_content_in_original_bundle": { - "head": "Besitzt Dateien" - } - } - } - }, - "browse": { - "title": "Anzeige {{ collection }} nach {{ field }} {{ value }}" - }, - "admin": { - "registries": { - "metadata": { - "title": "DSpace Angular :: Metadatenreferenzliste", - "head": "Metadatenreferenzliste", - "description": "Die Metadatenreferenzliste beinhaltet alle Metadatenfelder, die zur Verfügung stehen. Die Felder können in unterschiedlichen Schemata enthalten sein. Nichtsdestotrotz benötigt DSpace mindestens qualifiziertes Dublin Core.", - "schemas": { - "table": { - "id": "ID", - "namespace": "Namensraum", - "name": "Name" - }, - "no-items": "Es gbit keine Metadatenschemata." - } - }, - "schema": { - "title": "DSpace Angular :: Referenzliste der Metadatenschemata", - "head": "Metadatenschemata", - "description": "Dies ist das Metadatenschema für \"{{namespace}}\".", - "fields": { - "head": "Felder in diesem Schema", - "table": { - "field": "Feld", - "scopenote": "Gültigkeitsbereich" - }, - "no-items": "Es gibt keine Felder in diesem Schema." - } - }, - "bitstream-formats": { - "title": "DSpace Angular :: Referenzliste der Dateiformate", - "head": "Referenzliste der Dateiformate", - "description": "Diese Liste enhtält die in diesem Repositorium zulässigen Dateiformate und den jeweiligen Unterstützungsgrad.", - "formats": { - "table": { - "name": "Name", - "mimetype": "MIME Type", - "supportLevel": { - "head": "Unterstützungsgrad", - "0": "Unbekannt", - "1": "Bekannt", - "2": "Unterstützt" - }, - "internal": "intern" - }, - "no-items": "Es gibt keine Formate in dieser Referenzliste." - } - } - } - }, - "loading": { - "default": "Am Laden ...", - "top-level-communities": "Die Hauptbereiche werden geladen ...", - "community": "Der Bereich wird geladen ...", - "collection": "Die Sammlung wird geladen ...", - "sub-collections": "Die untergeordneten Sammlungen werden geladen ...", - "recent-submissions": "Die aktuellsten Veröffentlichungen werden geladen ...", - "item": "Die Ressource wird geladen ...", - "objects": "Am Laden ...", - "search-results": "Die Suchergebnisse werden geladen ...", - "browse-by": "Die Ressourcen werden geladen ..." - }, - "error": { - "default": "Fehler", - "top-level-communities": "Fehler beim Laden der Hauptbereiche.", - "community": "Fehler beim Laden des Bereiches.", - "collection": "Fehler beim Laden der Sammlung.", - "sub-collections": "Fehler beim Laden der untergeordneten Sammlungen.", - "recent-submissions": "Fehler beim Laden der aktuellsten Veröffentlichungen.", - "item": "Fehler beim Laden der Ressource.", - "objects": "Fehler beim Laden der Objekte.", - "search-results": "Fehler beim Laden der Suchergebnisse.", - "browse-by": "Fehler beim Laden der Ressourcen", - "validation": { - "pattern": "Die Eingabe kann nur folgendes Muster haben: {{ pattern }}.", - "license": { - "notgranted": "Sie müssen der Lizenz zustimmen, um die Ressource einzureichen. Wenn dies zur Zeit nicht geht, können Sie die Einreichung speichern und später wiederaufnehmen oder löschen." - } - } - }, - "form": { - "submit": "Los", - "cancel": "Abbrechen", - "search": "Suchen", - "remove": "Löschen", - "first-name": "Vorname", - "last-name": "Nachname", - "loading": "Am Laden ...", - "no-results": "Keine Ergebnisse gefunden", - "no-value": "Kein Wert eingegeben", - "group-collapse": "Weniger", - "group-expand": "Mehr", - "group-collapse-help": "Hier klicken, um die Anzeige zu reduzieren", - "group-expand-help": "Hier klicken, um mehr Elemente anzuzeigen" - }, - "login": { - "title": "Einloggen", - "form": { - "header": "Bitte Loggen Sie sich ein.", - "email": "E-Mail-Adresse", - "forgot-password": "Haben Sie Ihr Passwort vergessen?", - "new-user": "Sind Sie neu hier? Klicken Sie hier, um sich zu registrieren.", - "password": "Passwort", - "submit": "Einloggen" - } - }, - "logout": { - "title": "Ausloggen", - "form": { - "header": "Ausloggen aus DSpace", - "submit": "Ausloggen" - } - }, - "auth": { - "messages": { - "expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an." - }, - "errors": { - "invalid-user": "Ungültige E-Mail-Adresse oder Passwort." - } - } + "404.help": "Die Seite, die Sie aufrufen wollten, konnte nicht gefunden werden. Sie könnte verschoben oder gelöscht worden sein. Mit dem Link unten kommen Sie zurück zur Startseite. ", + "404.link.home-page": "Zurück zur Startseite", + "404.page-not-found": "Seite nicht gefunden", + "admin.registries.bitstream-formats.description": "Diese Liste enhtält die in diesem Repositorium zulässigen Dateiformate und den jeweiligen Unterstützungsgrad.", + "admin.registries.bitstream-formats.formats.no-items": "Es gibt keine Formate in dieser Referenzliste.", + "admin.registries.bitstream-formats.formats.table.internal": "intern", + "admin.registries.bitstream-formats.formats.table.mimetype": "MIME Type", + "admin.registries.bitstream-formats.formats.table.name": "Name", + "admin.registries.bitstream-formats.formats.table.supportLevel.0": "Unbekannt", + "admin.registries.bitstream-formats.formats.table.supportLevel.1": "Bekannt", + "admin.registries.bitstream-formats.formats.table.supportLevel.2": "Unterstützt", + "admin.registries.bitstream-formats.formats.table.supportLevel.head": "Unterstützungsgrad", + "admin.registries.bitstream-formats.head": "Referenzliste der Dateiformate", + "admin.registries.bitstream-formats.title": "DSpace Angular :: Referenzliste der Dateiformate", + "admin.registries.metadata.description": "Die Metadatenreferenzliste beinhaltet alle Metadatenfelder, die zur Verfügung stehen. Die Felder können in unterschiedlichen Schemata enthalten sein. Nichtsdestotrotz benötigt DSpace mindestens qualifiziertes Dublin Core.", + "admin.registries.metadata.head": "Metadatenreferenzliste", + "admin.registries.metadata.schemas.no-items": "Es gbit keine Metadatenschemata.", + "admin.registries.metadata.schemas.table.id": "ID", + "admin.registries.metadata.schemas.table.name": "Name", + "admin.registries.metadata.schemas.table.namespace": "Namensraum", + "admin.registries.metadata.title": "DSpace Angular :: Metadatenreferenzliste", + "admin.registries.schema.description": "Dies ist das Metadatenschema für \"{{namespace}}\".", + "admin.registries.schema.fields.head": "Felder in diesem Schema", + "admin.registries.schema.fields.no-items": "Es gibt keine Felder in diesem Schema.", + "admin.registries.schema.fields.table.field": "Feld", + "admin.registries.schema.fields.table.scopenote": "Gültigkeitsbereich", + "admin.registries.schema.head": "Metadatenschemata", + "admin.registries.schema.title": "DSpace Angular :: Referenzliste der Metadatenschemata", + "auth.errors.invalid-user": "Ungültige E-Mail-Adresse oder Passwort.", + "auth.messages.expired": "Ihre Sitzung ist abgelaufen, bitte melden Sie sich erneut an.", + "browse.title": "Anzeige {{ collection }} nach {{ field }} {{ value }}", + "collection.page.browse.recent.head": "Aktuellste Veröffentlichungen", + "collection.page.license": "Lizenz", + "collection.page.news": "Neuigkeiten", + "community.page.license": "Lizenz", + "community.page.news": "Neuigkeiten", + "community.sub-collection-list.head": "Sammlungen in diesem Bereich", + "error.browse-by": "Fehler beim Laden der Ressourcen", + "error.collection": "Fehler beim Laden der Sammlung.", + "error.community": "Fehler beim Laden des Bereiches.", + "error.default": "Fehler", + "error.item": "Fehler beim Laden der Ressource.", + "error.objects": "Fehler beim Laden der Objekte.", + "error.recent-submissions": "Fehler beim Laden der aktuellsten Veröffentlichungen.", + "error.search-results": "Fehler beim Laden der Suchergebnisse.", + "error.sub-collections": "Fehler beim Laden der untergeordneten Sammlungen.", + "error.top-level-communities": "Fehler beim Laden der Hauptbereiche.", + "error.validation.license.notgranted": "Sie müssen der Lizenz zustimmen, um die Ressource einzureichen. Wenn dies zur Zeit nicht geht, können Sie die Einreichung speichern und später wiederaufnehmen oder löschen.", + "error.validation.pattern": "Die Eingabe kann nur folgendes Muster haben: {{ pattern }}.", + "footer.copyright": "Copyright © 2002-{{ year }}", + "footer.link.dspace": "DSpace Software", + "footer.link.duraspace": "DuraSpace", + "form.cancel": "Abbrechen", + "form.first-name": "Vorname", + "form.group-collapse": "Weniger", + "form.group-collapse-help": "Hier klicken, um die Anzeige zu reduzieren", + "form.group-expand": "Mehr", + "form.group-expand-help": "Hier klicken, um mehr Elemente anzuzeigen", + "form.last-name": "Nachname", + "form.loading": "Am Laden ...", + "form.no-results": "Keine Ergebnisse gefunden", + "form.no-value": "Kein Wert eingegeben", + "form.remove": "Löschen", + "form.search": "Suchen", + "form.submit": "Los", + "home.description": "", + "home.title": "DSpace Angular :: Startseite", + "home.top-level-communities.head": "Bereiche in DSpace", + "home.top-level-communities.help": "Wählen Sie einen Bereich, um seine Sammlungen einzusehen.", + "item.page.abstract": "Kurzfassung", + "item.page.author": "Autor", + "item.page.collections": "Sammlungen", + "item.page.date": "Datum", + "item.page.files": "Dateien", + "item.page.filesection.description": "Beschreibung:", + "item.page.filesection.download": "Herunterladen", + "item.page.filesection.format": "Format:", + "item.page.filesection.name": "Name:", + "item.page.filesection.size": "Größe:", + "item.page.link.full": "Vollanzeige", + "item.page.link.simple": "Kurzanzeige", + "item.page.uri": "URI", + "loading.browse-by": "Die Ressourcen werden geladen ...", + "loading.collection": "Die Sammlung wird geladen ...", + "loading.community": "Der Bereich wird geladen ...", + "loading.default": "Am Laden ...", + "loading.item": "Die Ressource wird geladen ...", + "loading.objects": "Am Laden ...", + "loading.recent-submissions": "Die aktuellsten Veröffentlichungen werden geladen ...", + "loading.search-results": "Die Suchergebnisse werden geladen ...", + "loading.sub-collections": "Die untergeordneten Sammlungen werden geladen ...", + "loading.top-level-communities": "Die Hauptbereiche werden geladen ...", + "login.form.email": "E-Mail-Adresse", + "login.form.forgot-password": "Haben Sie Ihr Passwort vergessen?", + "login.form.header": "Bitte Loggen Sie sich ein.", + "login.form.new-user": "Sind Sie neu hier? Klicken Sie hier, um sich zu registrieren.", + "login.form.password": "Passwort", + "login.form.submit": "Einloggen", + "login.title": "Einloggen", + "logout.form.header": "Ausloggen aus DSpace", + "logout.form.submit": "Ausloggen", + "logout.title": "Ausloggen", + "nav.home": "Zur Startseite", + "nav.login": "Anmelden", + "nav.logout": "Abmelden", + "pagination.results-per-page": "Ergebnisse pro Seite", + "pagination.showing.detail": "{{ range }} bis {{ total }}", + "pagination.showing.label": "Anzeige der Treffer ", + "pagination.sort-direction": "Sortiermöglichkeiten", + "search.description": "", + "search.filters.applied.f.author": "Autor", + "search.filters.applied.f.dateIssued.max": "Enddatum", + "search.filters.applied.f.dateIssued.min": "Anfangsdatum", + "search.filters.applied.f.has_content_in_original_bundle": "Besitzt Dateien", + "search.filters.applied.f.subject": "Thema", + "search.filters.filter.author.head": "Autor", + "search.filters.filter.author.placeholder": "Autor", + "search.filters.filter.dateIssued.head": "Datum", + "search.filters.filter.dateIssued.max.placeholder": "Frühestes Datum", + "search.filters.filter.dateIssued.min.placeholder": "Ältestes Datum", + "search.filters.filter.has_content_in_original_bundle.head": "Besitzt Dateien", + "search.filters.filter.scope.head": "Bereich", + "search.filters.filter.scope.placeholder": "Bereichsfilter", + "search.filters.filter.show-less": "Zeige weniger", + "search.filters.filter.show-more": "Zeige mehr", + "search.filters.filter.subject.head": "Schlagwort", + "search.filters.filter.subject.placeholder": "Schlagwort", + "search.filters.head": "Filter", + "search.filters.reset": "Filter zurücksetzen", + "search.form.search": "Suche", + "search.form.search_dspace": "DSpace durchsuchen", + "search.results.head": "Suchergebnisse", + "search.results.no-results": "Zu dieser Suche gibt es keine Treffer.", + "search.sidebar.close": "Zurück zu den Ergebnissen", + "search.sidebar.filters.title": "Filter", + "search.sidebar.open": "Suchwerkzeuge", + "search.sidebar.results": "Ergebnisse", + "search.sidebar.settings.rpp": "Treffer pro Seite", + "search.sidebar.settings.sort-by": "Sortiere nach", + "search.sidebar.settings.title": "Einstellungen", + "search.title": "DSpace Angular :: Suche", + "search.view-switch.show-grid": "Zeige als Raster", + "search.view-switch.show-list": "Zeige als Liste", + "sorting.dc.title.ASC": "Titel aufsteigend", + "sorting.dc.title.DESC": "Titel absteigend", + "sorting.score.DESC": "Relevanz", + "title": "DSpace" } diff --git a/resources/i18n/en.json b/resources/i18n/en.json index 053c810964e55b5ddf0f668338d3651aef2ee5d5..63bc5983042ef89081adf3b9703df4b276f63ff4 100644 --- a/resources/i18n/en.json +++ b/resources/i18n/en.json @@ -1,1117 +1,662 @@ { - "footer": { - "copyright": "copyright © 2002-{{ year }}", - "link.dspace": "DSpace software", - "link.duraspace": "DuraSpace" - }, - "collection": { - "page": { - "news": "News", - "license": "License", - "browse": { - "recent": { - "head": "Recent Submissions" - } - } - }, - "form": { - "title": "Name", - "description": "Introductory text (HTML)", - "abstract": "Short Description", - "rights": "Copyright text (HTML)", - "tableofcontents": "News (HTML)", - "license": "License", - "provenance": "Provenance", - "errors": { - "title": { - "required": "Please enter a collection name" - } - } - }, - "edit": { - "head": "Edit Collection", - "delete": "Delete this collection" - }, - "create": { - "head": "Create a Collection", - "sub-head": "Create a Collection for Community {{ parent }}" - }, - "delete": { - "head": "Delete Collection", - "text": "Are you sure you want to delete collection \"{{ dso }}\"", - "confirm": "Confirm", - "cancel": "Cancel", - "notification": { - "success": "Successfully deleted collection", - "fail": "Collection could not be deleted" - } - } - }, - "community": { - "page": { - "news": "News", - "license": "License" - }, - "sub-collection-list": { - "head": "Collections of this Community" - }, - "sub-community-list": { - "head": "Communities of this Community" - }, - "form": { - "title": "Name", - "description": "Introductory text (HTML)", - "abstract": "Short Description", - "rights": "Copyright text (HTML)", - "tableofcontents": "News (HTML)", - "errors": { - "title": { - "required": "Please enter a community name" - } - } - }, - "edit": { - "head": "Edit Community", - "delete": "Delete this community" - }, - "create": { - "head": "Create a Community", - "sub-head": "Create a Sub-Community for Community {{ parent }}" - }, - "delete": { - "head": "Delete Community", - "text": "Are you sure you want to delete community \"{{ dso }}\"", - "confirm": "Confirm", - "cancel": "Cancel", - "notification": { - "success": "Successfully deleted community", - "fail": "Community could not be deleted" - } - } - }, - "item": { - "page": { - "author": "Authors", - "abstract": "Abstract", - "date": "Date", - "uri": "URI", - "files": "Files", - "collections": "Collections", - "subject": "Keywords", - "citation": "Citation", - "filesection": { - "download": "Download", - "name": "Name:", - "format": "Format:", - "size": "Size:", - "description": "Description:" - }, - "link": { - "simple": "Simple item page", - "full": "Full item page" - }, - "journal": { - "search": { - "title": "Articles in this journal" - } - }, - "person": { - "search": { - "title": "Articles by this author" - } - } - }, - "select": { - "table": { - "collection": "Collection", - "author": "Author", - "title": "Title" - }, - "confirm": "Confirm selected" - }, - "edit": { - "head": "Edit Item", - "tabs": { - "status": { - "head": "Item Status", - "description": "Welcome to the item management page. From here you can withdraw, reinstate, move or delete the item. You may also update or add new metadata / bitstreams on the other tabs.", - "title": "Item Edit - Status", - "labels": { - "id": "Item Internal ID", - "handle": "Handle", - "lastModified": "Last Modified", - "itemPage": "Item Page" - }, - "buttons": { - "authorizations": { - "label": "Edit item's authorization policies", - "button": "Authorizations..." - }, - "withdraw": { - "label": "Withdraw item from the repository", - "button": "Withdraw..." - }, - "reinstate": { - "label": "Reinstate item into the repository", - "button": "Reinstate..." - }, - "move": { - "label": "Move item to another collection", - "button": "Move..." - }, - "private": { - "label": "Make item private", - "button": "Make it private..." - }, - "public": { - "label": "Make item public", - "button": "Make it public..." - }, - "delete": { - "label": "Completely expunge item", - "button": "Permanently delete" - }, - "mappedCollections": { - "label": "Manage mapped collections", - "button": "Mapped collections" - } - } - }, - "bitstreams": { - "head": "Item Bitstreams", - "title": "Item Edit - Bitstreams" - }, - "metadata": { - "head": "Item Metadata", - "title": "Item Edit - Metadata" - }, - "view": { - "head": "View Item", - "title": "Item Edit - View" - }, - "curate": { - "head": "Curate", - "title": "Item Edit - Curate" - } - }, - "modify.overview": { - "field": "Field", - "value": "Value", - "language": "Language" - }, - "withdraw": { - "header": "Withdraw item: {{ id }}", - "description": "Are you sure this item should be withdrawn from the archive?", - "confirm": "Withdraw", - "cancel": "Cancel", - "success": "The item was withdrawn successfully", - "error": "An error occurred while withdrawing the item" - }, - "reinstate": { - "header": "Reinstate item: {{ id }}", - "description": "Are you sure this item should be reinstated to the archive?", - "confirm": "Reinstate", - "cancel": "Cancel", - "success": "The item was reinstated successfully", - "error": "An error occurred while reinstating the item" - }, - "private": { - "header": "Make item private: {{ id }}", - "description": "Are you sure this item should be made private in the archive?", - "confirm": "Make it Private", - "cancel": "Cancel", - "success": "The item is now private", - "error": "An error occurred while making the item private" - }, - "public": { - "header": "Make item public: {{ id }}", - "description": "Are you sure this item should be made public in the archive?", - "confirm": "Make it Public", - "cancel": "Cancel", - "success": "The item is now public", - "error": "An error occurred while making the item public" - }, - "delete": { - "header": "Delete item: {{ id }}", - "description": "Are you sure this item should be completely deleted? Caution: At present, no tombstone would be left.", - "confirm": "Delete", - "cancel": "Cancel", - "success": "The item has been deleted", - "error": "An error occurred while deleting the item" - }, - "metadata": { - "add-button": "Add", - "discard-button": "Discard", - "reinstate-button": "Undo", - "save-button": "Save", - "headers": { - "field": "Field", - "value": "Value", - "language": "Lang", - "edit": "Edit" - }, - "edit": { - "buttons": { - "edit": "Edit", - "unedit": "Stop editing", - "remove": "Remove", - "undo": "Undo changes" - } - }, - "metadatafield": { - "invalid": "Please choose a valid metadata field" - }, - "notifications": { - "outdated": { - "title": "Changed outdated", - "content": "The item you're currently working on has been changed by another user. Your current changes are discarded to prevent conflicts" - }, - "discarded": { - "title": "Changed discarded", - "content": "Your changes were discarded. To reinstate your changes click the 'Undo' button" - }, - "invalid": { - "title": "Metadata invalid", - "content": "Your changes were not saved. Please make sure all fields are valid before you save." - }, - "saved": { - "title": "Metadata saved", - "content": "Your changes to this item's metadata were saved." - } - } - } - } - }, - "relationships": { - "isPublicationOf": "Publications", - "isProjectOf": "Research Projects", - "isOrgUnitOf": "Organizational Units", - "isAuthorOf": "Authors", - "isPersonOf": "Authors", - "isJournalOf": "Journals", - "isSingleJournalOf": "Journal", - "isVolumeOf": "Journal Volumes", - "isSingleVolumeOf": "Journal Volume", - "isIssueOf": "Journal Issues", - "isJournalIssueOf": "Journal Issue", - "isPublicationOfJournalIssue": "Articles" - }, - "person": { - "page": { - "titleprefix": "Person: ", - "jobtitle": "Job Title", - "lastname": "Last Name", - "firstname": "First Name", - "email": "Email Address", - "orcid": "ORCID", - "birthdate": "Birth Date", - "staffid": "Staff ID", - "link": { - "full": "Show all metadata" - } - }, - "listelement": { - "badge": "Person" - }, - "search": { - "title": "DSpace Angular :: Person Search", - "results": { - "head": "Person Search Results" - } - } - }, - "project": { - "page": { - "titleprefix": "Research Project: ", - "status": "Status", - "contributor": "Contributors", - "funder": "Funders", - "id": "ID", - "expectedcompletion": "Expected Completion", - "description": "Description", - "keyword": "Keywords" - }, - "listelement": { - "badge": "Research Project" - } - }, - "orgunit": { - "page": { - "titleprefix": "Organizational Unit: ", - "dateestablished": "Date established", - "city": "City", - "country": "Country", - "id": "ID", - "description": "Description" - }, - "listelement": { - "badge": "Organizational Unit" - } - }, - "journal": { - "page": { - "titleprefix": "Journal: ", - "issn": "ISSN", - "publisher": "Publisher", - "description": "Description", - "editor": "Editor-in-Chief" - }, - "listelement": { - "badge": "Journal" - }, - "search": { - "title": "DSpace Angular :: Journal Search", - "results": { - "head": "Journal Search Results" - } - } - }, - "journalvolume": { - "page": { - "titleprefix": "Journal Volume: ", - "volume": "Volume", - "issuedate": "Issue Date", - "description": "Description" - }, - "listelement": { - "badge": "Journal Volume" - } - }, - "journalissue": { - "page": { - "titleprefix": "Journal Issue: ", - "number": "Number", - "issuedate": "Issue Date", - "description": "Description", - "keyword": "Keywords", - "journal-title": "Journal Title", - "journal-issn": "Journal ISSN" - }, - "listelement": { - "badge": "Journal Issue" - } - }, - "publication": { - "page": { - "titleprefix": "Publication: ", - "journal-title": "Journal Title", - "journal-issn": "Journal ISSN", - "volume-title": "Volume Title", - "publisher": "Publisher", - "description": "Description" - - }, - "listelement": { - "badge": "Publication" - }, - "search": { - "title": "DSpace Angular :: Publication Search", - "results": { - "head": "Publication Search Results" - } - } - }, - "nav": { - "browse": { - "header": "All of DSpace" - }, - "community-browse": { - "header": "By Community" - }, - "statistics": { - "header": "Statistics" - }, - "login": "Log In", - "logout": "Log Out", - "mydspace": "MyDSpace", - "language": "Language switch", - "search": "Search" - }, - "pagination": { - "results-per-page": "Results Per Page", - "sort-direction": "Sort Options", - "showing": { - "label": "Now showing ", - "detail": "{{ range }} of {{ total }}" - } - }, - "sorting": { - "score": { - "DESC": "Relevance" - }, - "dc.title": { - "ASC": "Title Ascending", - "DESC": "Title Descending" - } - }, + "404.help": "We can't find the page you're looking for. The page may have been moved or deleted. You can use the button below to get back to the home page. ", + "404.link.home-page": "Take me to the home page", + "404.page-not-found": "page not found", + "admin.registries.bitstream-formats.description": "This list of bitstream formats provides information about known formats and their support level.", + "admin.registries.bitstream-formats.formats.no-items": "No bitstream formats to show.", + "admin.registries.bitstream-formats.formats.table.internal": "internal", + "admin.registries.bitstream-formats.formats.table.mimetype": "MIME Type", + "admin.registries.bitstream-formats.formats.table.name": "Name", + "admin.registries.bitstream-formats.formats.table.supportLevel.0": "Unknown", + "admin.registries.bitstream-formats.formats.table.supportLevel.1": "Known", + "admin.registries.bitstream-formats.formats.table.supportLevel.2": "Support", + "admin.registries.bitstream-formats.formats.table.supportLevel.head": "Support Level", + "admin.registries.bitstream-formats.head": "Bitstream Format Registry", + "admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Format Registry", + "admin.registries.metadata.description": "The metadata registry maintains a list of all metadata fields available in the repository. These fields may be divided amongst multiple schemas. However, DSpace requires the qualified Dublin Core schema.", + "admin.registries.metadata.form.create": "Create metadata schema", + "admin.registries.metadata.form.edit": "Edit metadata schema", + "admin.registries.metadata.form.name": "Name", + "admin.registries.metadata.form.namespace": "Namespace", + "admin.registries.metadata.head": "Metadata Registry", + "admin.registries.metadata.schemas.no-items": "No metadata schemas to show.", + "admin.registries.metadata.schemas.table.delete": "Delete selected", + "admin.registries.metadata.schemas.table.id": "ID", + "admin.registries.metadata.schemas.table.name": "Name", + "admin.registries.metadata.schemas.table.namespace": "Namespace", + "admin.registries.metadata.title": "DSpace Angular :: Metadata Registry", + "admin.registries.schema.description": "This is the metadata schema for \"{{namespace}}\".", + "admin.registries.schema.fields.head": "Schema metadata fields", + "admin.registries.schema.fields.no-items": "No metadata fields to show.", + "admin.registries.schema.fields.table.delete": "Delete selected", + "admin.registries.schema.fields.table.field": "Field", + "admin.registries.schema.fields.table.scopenote": "Scope Note", + "admin.registries.schema.form.create": "Create metadata field", + "admin.registries.schema.form.edit": "Edit metadata field", + "admin.registries.schema.form.element": "Element", + "admin.registries.schema.form.qualifier": "Qualifier", + "admin.registries.schema.form.scopenote": "Scope Note", + "admin.registries.schema.head": "Metadata Schema", + "admin.registries.schema.notification.created": "Successfully created metadata schema \"{{prefix}}\"", + "admin.registries.schema.notification.deleted.failure": "Failed to delete {{amount}} metadata schemas", + "admin.registries.schema.notification.deleted.success": "Successfully deleted {{amount}} metadata schemas", + "admin.registries.schema.notification.edited": "Successfully edited metadata schema \"{{prefix}}\"", + "admin.registries.schema.notification.failure": "Error", + "admin.registries.schema.notification.field.created": "Successfully created metadata field \"{{field}}\"", + "admin.registries.schema.notification.field.deleted.failure": "Failed to delete {{amount}} metadata fields", + "admin.registries.schema.notification.field.deleted.success": "Successfully deleted {{amount}} metadata fields", + "admin.registries.schema.notification.field.edited": "Successfully edited metadata field \"{{field}}\"", + "admin.registries.schema.notification.success": "Success", + "admin.registries.schema.return": "Return", + "admin.registries.schema.title": "DSpace Angular :: Metadata Schema Registry", + "auth.errors.invalid-user": "Invalid email address or password.", + "auth.messages.expired": "Your session has expired. Please log in again.", + "browse.comcol.by.author": "By Author", + "browse.comcol.by.dateissued": "By Issue Date", + "browse.comcol.by.subject": "By Subject", + "browse.comcol.by.title": "By Title", + "browse.comcol.head": "Browse", + "browse.empty": "No items to show.", + "browse.metadata.author": "Author", + "browse.metadata.dateissued": "Issue Date", + "browse.metadata.subject": "Subject", + "browse.metadata.title": "Title", + "browse.startsWith.choose_start": "(Choose start)", + "browse.startsWith.choose_year": "(Choose year)", + "browse.startsWith.jump": "Jump to a point in the index:", + "browse.startsWith.months.april": "April", + "browse.startsWith.months.august": "August", + "browse.startsWith.months.december": "December", + "browse.startsWith.months.february": "February", + "browse.startsWith.months.january": "January", + "browse.startsWith.months.july": "July", + "browse.startsWith.months.june": "June", + "browse.startsWith.months.march": "March", + "browse.startsWith.months.may": "May", + "browse.startsWith.months.none": "(Choose month)", + "browse.startsWith.months.november": "November", + "browse.startsWith.months.october": "October", + "browse.startsWith.months.september": "September", + "browse.startsWith.submit": "Go", + "browse.startsWith.type_date": "Or type in a date (year-month):", + "browse.startsWith.type_text": "Or enter first few letters:", + "browse.title": "Browsing {{ collection }} by {{ field }} {{ value }}", + "chips.remove": "Remove chip", + "collection.create.head": "Create a Collection", + "collection.create.sub-head": "Create a Collection for Community {{ parent }}", + "collection.delete.cancel": "Cancel", + "collection.delete.confirm": "Confirm", + "collection.delete.head": "Delete Collection", + "collection.delete.notification.fail": "Collection could not be deleted", + "collection.delete.notification.success": "Successfully deleted collection", + "collection.delete.text": "Are you sure you want to delete collection \"{{ dso }}\"", + "collection.edit.delete": "Delete this collection", + "collection.edit.head": "Edit Collection", + "collection.form.abstract": "Short Description", + "collection.form.description": "Introductory text (HTML)", + "collection.form.errors.title.required": "Please enter a collection name", + "collection.form.license": "License", + "collection.form.provenance": "Provenance", + "collection.form.rights": "Copyright text (HTML)", + "collection.form.tableofcontents": "News (HTML)", + "collection.form.title": "Name", + "collection.page.browse.recent.head": "Recent Submissions", + "collection.page.license": "License", + "collection.page.news": "News", + "community.create.head": "Create a Community", + "community.create.sub-head": "Create a Sub-Community for Community {{ parent }}", + "community.delete.cancel": "Cancel", + "community.delete.confirm": "Confirm", + "community.delete.head": "Delete Community", + "community.delete.notification.fail": "Community could not be deleted", + "community.delete.notification.success": "Successfully deleted community", + "community.delete.text": "Are you sure you want to delete community \"{{ dso }}\"", + "community.edit.delete": "Delete this community", + "community.edit.head": "Edit Community", + "community.form.abstract": "Short Description", + "community.form.description": "Introductory text (HTML)", + "community.form.errors.title.required": "Please enter a community name", + "community.form.rights": "Copyright text (HTML)", + "community.form.tableofcontents": "News (HTML)", + "community.form.title": "Name", + "community.page.license": "License", + "community.page.news": "News", + "community.sub-collection-list.head": "Collections of this Community", + "community.sub-community-list.head": "Communities of this Community", + "dso-selector.create.collection.head": "New collection", + "dso-selector.create.community.head": "New community", + "dso-selector.create.community.sub-level": "Create a new community in", + "dso-selector.create.community.top-level": "Create a new top-level community", + "dso-selector.create.item.head": "New item", + "dso-selector.edit.collection.head": "Edit collection", + "dso-selector.edit.community.head": "Edit community", + "dso-selector.edit.item.head": "Edit item", + "dso-selector.no-results": "No {{ type }} found", + "dso-selector.placeholder": "Search for a {{ type }}", + "error.browse-by": "Error fetching items", + "error.collection": "Error fetching collection", + "error.community": "Error fetching community", + "error.default": "Error", + "error.item": "Error fetching item", + "error.objects": "Error fetching objects", + "error.recent-submissions": "Error fetching recent submissions", + "error.search-results": "Error fetching search results", + "error.sub-collections": "Error fetching sub-collections", + "error.sub-communities": "Error fetching sub-communities", + "error.submission.sections.init-form-error": "An error occurred during section initialize, please check your input-form configuration. Details are below : <br> <br>", + "error.top-level-communities": "Error fetching top-level communities", + "error.validation.license.notgranted": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission.", + "error.validation.pattern": "This input is restricted by the current pattern: {{ pattern }}.", + "footer.copyright": "copyright © 2002-{{ year }}", + "footer.link.dspace": "DSpace software", + "footer.link.duraspace": "DuraSpace", + "form.cancel": "Cancel", + "form.clear": "Clear", + "form.clear-help": "Click here to remove the selected value", + "form.edit": "Edit", + "form.edit-help": "Click here to edit the selected value", + "form.first-name": "First name", + "form.group-collapse": "Collapse", + "form.group-collapse-help": "Click here to collapse", + "form.group-expand": "Expand", + "form.group-expand-help": "Click here to expand and add more elements", + "form.last-name": "Last name", + "form.loading": "Loading...", + "form.no-results": "No results found", + "form.no-value": "No value entered", + "form.other-information": {}, + "form.remove": "Remove", + "form.save": "Save", + "form.save-help": "Save changes", + "form.search": "Search", + "form.search-help": "Click here to looking for an existing correspondence", + "form.submit": "Submit", + "home.description": "", + "home.title": "DSpace Angular :: Home", + "home.top-level-communities.head": "Communities in DSpace", + "home.top-level-communities.help": "Select a community to browse its collections.", + "item.edit.delete.cancel": "Cancel", + "item.edit.delete.confirm": "Delete", + "item.edit.delete.description": "Are you sure this item should be completely deleted? Caution: At present, no tombstone would be left.", + "item.edit.delete.error": "An error occurred while deleting the item", + "item.edit.delete.header": "Delete item: {{ id }}", + "item.edit.delete.success": "The item has been deleted", + "item.edit.head": "Edit Item", + "item.edit.metadata.add-button": "Add", + "item.edit.metadata.discard-button": "Discard", + "item.edit.metadata.edit.buttons.edit": "Edit", + "item.edit.metadata.edit.buttons.remove": "Remove", + "item.edit.metadata.edit.buttons.undo": "Undo changes", + "item.edit.metadata.edit.buttons.unedit": "Stop editing", + "item.edit.metadata.headers.edit": "Edit", + "item.edit.metadata.headers.field": "Field", + "item.edit.metadata.headers.language": "Lang", + "item.edit.metadata.headers.value": "Value", + "item.edit.metadata.metadatafield.invalid": "Please choose a valid metadata field", + "item.edit.metadata.notifications.discarded.content": "Your changes were discarded. To reinstate your changes click the 'Undo' button", + "item.edit.metadata.notifications.discarded.title": "Changed discarded", + "item.edit.metadata.notifications.invalid.content": "Your changes were not saved. Please make sure all fields are valid before you save.", + "item.edit.metadata.notifications.invalid.title": "Metadata invalid", + "item.edit.metadata.notifications.outdated.content": "The item you're currently working on has been changed by another user. Your current changes are discarded to prevent conflicts", + "item.edit.metadata.notifications.outdated.title": "Changed outdated", + "item.edit.metadata.notifications.saved.content": "Your changes to this item's metadata were saved.", + "item.edit.metadata.notifications.saved.title": "Metadata saved", + "item.edit.metadata.reinstate-button": "Undo", + "item.edit.metadata.save-button": "Save", + "item.edit.modify.overview.field": "Field", + "item.edit.modify.overview.language": "Language", + "item.edit.modify.overview.value": "Value", + "item.edit.private.cancel": "Cancel", + "item.edit.private.confirm": "Make it Private", + "item.edit.private.description": "Are you sure this item should be made private in the archive?", + "item.edit.private.error": "An error occurred while making the item private", + "item.edit.private.header": "Make item private: {{ id }}", + "item.edit.private.success": "The item is now private", + "item.edit.public.cancel": "Cancel", + "item.edit.public.confirm": "Make it Public", + "item.edit.public.description": "Are you sure this item should be made public in the archive?", + "item.edit.public.error": "An error occurred while making the item public", + "item.edit.public.header": "Make item public: {{ id }}", + "item.edit.public.success": "The item is now public", + "item.edit.reinstate.cancel": "Cancel", + "item.edit.reinstate.confirm": "Reinstate", + "item.edit.reinstate.description": "Are you sure this item should be reinstated to the archive?", + "item.edit.reinstate.error": "An error occurred while reinstating the item", + "item.edit.reinstate.header": "Reinstate item: {{ id }}", + "item.edit.reinstate.success": "The item was reinstated successfully", + "item.edit.tabs.bitstreams.head": "Item Bitstreams", + "item.edit.tabs.bitstreams.title": "Item Edit - Bitstreams", + "item.edit.tabs.curate.head": "Curate", + "item.edit.tabs.curate.title": "Item Edit - Curate", + "item.edit.tabs.metadata.head": "Item Metadata", + "item.edit.tabs.metadata.title": "Item Edit - Metadata", + "item.edit.tabs.status.buttons.authorizations.button": "Authorizations...", + "item.edit.tabs.status.buttons.authorizations.label": "Edit item's authorization policies", + "item.edit.tabs.status.buttons.delete.button": "Permanently delete", + "item.edit.tabs.status.buttons.delete.label": "Completely expunge item", + "item.edit.tabs.status.buttons.mappedCollections.button": "Mapped collections", + "item.edit.tabs.status.buttons.mappedCollections.label": "Manage mapped collections", + "item.edit.tabs.status.buttons.move.button": "Move...", + "item.edit.tabs.status.buttons.move.label": "Move item to another collection", + "item.edit.tabs.status.buttons.private.button": "Make it private...", + "item.edit.tabs.status.buttons.private.label": "Make item private", + "item.edit.tabs.status.buttons.public.button": "Make it public...", + "item.edit.tabs.status.buttons.public.label": "Make item public", + "item.edit.tabs.status.buttons.reinstate.button": "Reinstate...", + "item.edit.tabs.status.buttons.reinstate.label": "Reinstate item into the repository", + "item.edit.tabs.status.buttons.withdraw.button": "Withdraw...", + "item.edit.tabs.status.buttons.withdraw.label": "Withdraw item from the repository", + "item.edit.tabs.status.description": "Welcome to the item management page. From here you can withdraw, reinstate, move or delete the item. You may also update or add new metadata / bitstreams on the other tabs.", + "item.edit.tabs.status.head": "Item Status", + "item.edit.tabs.status.labels.handle": "Handle", + "item.edit.tabs.status.labels.id": "Item Internal ID", + "item.edit.tabs.status.labels.itemPage": "Item Page", + "item.edit.tabs.status.labels.lastModified": "Last Modified", + "item.edit.tabs.status.title": "Item Edit - Status", + "item.edit.tabs.view.head": "View Item", + "item.edit.tabs.view.title": "Item Edit - View", + "item.edit.withdraw.cancel": "Cancel", + "item.edit.withdraw.confirm": "Withdraw", + "item.edit.withdraw.description": "Are you sure this item should be withdrawn from the archive?", + "item.edit.withdraw.error": "An error occurred while withdrawing the item", + "item.edit.withdraw.header": "Withdraw item: {{ id }}", + "item.edit.withdraw.success": "The item was withdrawn successfully", + "item.page.abstract": "Abstract", + "item.page.author": "Authors", + "item.page.citation": "Citation", + "item.page.collections": "Collections", + "item.page.date": "Date", + "item.page.files": "Files", + "item.page.filesection.description": "Description:", + "item.page.filesection.download": "Download", + "item.page.filesection.format": "Format:", + "item.page.filesection.name": "Name:", + "item.page.filesection.size": "Size:", + "item.page.journal.search.title": "Articles in this journal", + "item.page.link.full": "Full item page", + "item.page.link.simple": "Simple item page", + "item.page.person.search.title": "Articles by this author", + "item.page.subject": "Keywords", + "item.page.uri": "URI", + "item.select.confirm": "Confirm selected", + "item.select.table.author": "Author", + "item.select.table.collection": "Collection", + "item.select.table.title": "Title", + "journal.listelement.badge": "Journal", + "journal.page.description": "Description", + "journal.page.editor": "Editor-in-Chief", + "journal.page.issn": "ISSN", + "journal.page.publisher": "Publisher", + "journal.page.titleprefix": "Journal: ", + "journal.search.results.head": "Journal Search Results", + "journal.search.title": "DSpace Angular :: Journal Search", + "journalissue.listelement.badge": "Journal Issue", + "journalissue.page.description": "Description", + "journalissue.page.issuedate": "Issue Date", + "journalissue.page.journal-issn": "Journal ISSN", + "journalissue.page.journal-title": "Journal Title", + "journalissue.page.keyword": "Keywords", + "journalissue.page.number": "Number", + "journalissue.page.titleprefix": "Journal Issue: ", + "journalvolume.listelement.badge": "Journal Volume", + "journalvolume.page.description": "Description", + "journalvolume.page.issuedate": "Issue Date", + "journalvolume.page.titleprefix": "Journal Volume: ", + "journalvolume.page.volume": "Volume", + "loading.browse-by": "Loading items...", + "loading.browse-by-page": "Loading page...", + "loading.collection": "Loading collection...", + "loading.community": "Loading community...", + "loading.default": "Loading...", + "loading.item": "Loading item...", + "loading.mydspace-results": "Loading items...", + "loading.objects": "Loading...", + "loading.recent-submissions": "Loading recent submissions...", + "loading.search-results": "Loading search results...", + "loading.sub-collections": "Loading sub-collections...", + "loading.sub-communities": "Loading sub-communities...", + "loading.top-level-communities": "Loading top-level communities...", + "login.form.email": "Email address", + "login.form.forgot-password": "Have you forgotten your password?", + "login.form.header": "Please log in to DSpace", + "login.form.new-user": "New user? Click here to register.", + "login.form.password": "Password", + "login.form.submit": "Log in", + "login.title": "Login", + "logout.form.header": "Log out from DSpace", + "logout.form.submit": "Log out", + "logout.title": "Logout", + "menu.header.admin": "Admin", + "menu.header.image.logo": "Repository logo", + "menu.section.access_control": "Access Control", + "menu.section.access_control_authorizations": "Authorizations", + "menu.section.access_control_groups": "Groups", + "menu.section.access_control_people": "People", + "menu.section.browse_community": "This Community", + "menu.section.browse_community_by_author": "By Author", + "menu.section.browse_community_by_issue_date": "By Issue Date", + "menu.section.browse_community_by_title": "By Title", + "menu.section.browse_global": "All of DSpace", + "menu.section.browse_global_by_author": "By Author", + "menu.section.browse_global_by_dateissued": "By Issue Date", + "menu.section.browse_global_by_subject": "By Subject", + "menu.section.browse_global_by_title": "By Title", + "menu.section.browse_global_communities_and_collections": "Communities & Collections", + "menu.section.control_panel": "Control Panel", + "menu.section.curation_task": "Curation Task", + "menu.section.edit": "Edit", + "menu.section.edit_collection": "Collection", + "menu.section.edit_community": "Community", + "menu.section.edit_item": "Item", + "menu.section.export": "Export", + "menu.section.export_collection": "Collection", + "menu.section.export_community": "Community", + "menu.section.export_item": "Item", + "menu.section.export_metadata": "Metadata", + "menu.section.find": "Find", + "menu.section.find_items": "Items", + "menu.section.find_private_items": "Private Items", + "menu.section.find_withdrawn_items": "Withdrawn Items", + "menu.section.icon.access_control": "Access Control menu section", + "menu.section.icon.control_panel": "Control Panel menu section", + "menu.section.icon.curation_task": "Curation Task menu section", + "menu.section.icon.edit": "Edit menu section", + "menu.section.icon.export": "Export menu section", + "menu.section.icon.find": "Find menu section", + "menu.section.icon.import": "Import menu section", + "menu.section.icon.new": "New menu section", + "menu.section.icon.pin": "Pin sidebar", + "menu.section.icon.registries": "Registries menu section", + "menu.section.icon.statistics_task": "Statistics Task menu section", + "menu.section.icon.unpin": "Unpin sidebar", + "menu.section.import": "Import", + "menu.section.import_batch": "Batch Import (ZIP)", + "menu.section.import_metadata": "Metadata", + "menu.section.new": "New", + "menu.section.new_collection": "Collection", + "menu.section.new_community": "Community", + "menu.section.new_item": "Item", + "menu.section.new_item_version": "Item Version", + "menu.section.pin": "Pin sidebar", + "menu.section.registries": "Registries", + "menu.section.registries_format": "Format", + "menu.section.registries_metadata": "Metadata", + "menu.section.statistics": "Statistics", + "menu.section.statistics_task": "Statistics Task", + "menu.section.toggle.access_control": "Toggle Access Control section", + "menu.section.toggle.control_panel": "Toggle Control Panel section", + "menu.section.toggle.curation_task": "Toggle Curation Task section", + "menu.section.toggle.edit": "Toggle Edit section", + "menu.section.toggle.export": "Toggle Export section", + "menu.section.toggle.find": "Toggle Find section", + "menu.section.toggle.import": "Toggle Import section", + "menu.section.toggle.new": "Toggle New section", + "menu.section.toggle.registries": "Toggle Registries section", + "menu.section.toggle.statistics_task": "Toggle Statistics Task section", + "menu.section.unpin": "Unpin sidebar", + "mydspace.description": "", + "mydspace.general.text-here": "HERE", + "mydspace.messages.controller-help": "Select this option to send a message to item's submitter.", + "mydspace.messages.description-placeholder": "Insert your message here...", + "mydspace.messages.hide-msg": "Hide message", + "mydspace.messages.mark-as-read": "Mark as read", + "mydspace.messages.mark-as-unread": "Mark as unread", + "mydspace.messages.no-content": "No content.", + "mydspace.messages.no-messages": "No messages yet.", + "mydspace.messages.send-btn": "Send", + "mydspace.messages.show-msg": "Show message", + "mydspace.messages.subject-placeholder": "Subject...", + "mydspace.messages.submitter-help": "Select this option to send a message to controller.", + "mydspace.messages.title": "Messages", + "mydspace.messages.to": "To", + "mydspace.new-submission": "New submission", + "mydspace.results.head": "Your submissions", + "mydspace.results.no-abstract": "No Abstract", + "mydspace.results.no-authors": "No Authors", + "mydspace.results.no-collections": "No Collections", + "mydspace.results.no-date": "No Date", + "mydspace.results.no-files": "No Files", + "mydspace.results.no-results": "There were no items to show", + "mydspace.results.no-title": "No title", + "mydspace.results.no-uri": "No Uri", + "mydspace.show.workflow": "All tasks", + "mydspace.show.workspace": "Your Submissions", + "mydspace.status.archived": "Archived", + "mydspace.status.validation": "Validation", + "mydspace.status.waiting-for-controller": "Waiting for controller", + "mydspace.status.workflow": "Workflow", + "mydspace.status.workspace": "Workspace", + "mydspace.title": "MyDSpace", + "mydspace.upload.upload-failed": "Error creating new workspace. Please verify the content uploaded before retry.", + "mydspace.upload.upload-multiple-successful": "{{qty}} new workspace items created.", + "mydspace.upload.upload-successful": "New workspace item created. Click {{here}} for edit it.", + "mydspace.view-btn": "View", + "nav.browse.header": "All of DSpace", + "nav.community-browse.header": "By Community", + "nav.language": "Language switch", + "nav.login": "Log In", + "nav.logout": "Log Out", + "nav.mydspace": "MyDSpace", + "nav.search": "Search", + "nav.statistics.header": "Statistics", + "orgunit.listelement.badge": "Organizational Unit", + "orgunit.page.city": "City", + "orgunit.page.country": "Country", + "orgunit.page.dateestablished": "Date established", + "orgunit.page.description": "Description", + "orgunit.page.id": "ID", + "orgunit.page.titleprefix": "Organizational Unit: ", + "pagination.results-per-page": "Results Per Page", + "pagination.showing.detail": "{{ range }} of {{ total }}", + "pagination.showing.label": "Now showing ", + "pagination.sort-direction": "Sort Options", + "person.listelement.badge": "Person", + "person.page.birthdate": "Birth Date", + "person.page.email": "Email Address", + "person.page.firstname": "First Name", + "person.page.jobtitle": "Job Title", + "person.page.lastname": "Last Name", + "person.page.link.full": "Show all metadata", + "person.page.orcid": "ORCID", + "person.page.staffid": "Staff ID", + "person.page.titleprefix": "Person: ", + "person.search.results.head": "Person Search Results", + "person.search.title": "DSpace Angular :: Person Search", + "project.listelement.badge": "Research Project", + "project.page.contributor": "Contributors", + "project.page.description": "Description", + "project.page.expectedcompletion": "Expected Completion", + "project.page.funder": "Funders", + "project.page.id": "ID", + "project.page.keyword": "Keywords", + "project.page.status": "Status", + "project.page.titleprefix": "Research Project: ", + "publication.listelement.badge": "Publication", + "publication.page.description": "Description", + "publication.page.journal-issn": "Journal ISSN", + "publication.page.journal-title": "Journal Title", + "publication.page.publisher": "Publisher", + "publication.page.titleprefix": "Publication: ", + "publication.page.volume-title": "Volume Title", + "publication.search.results.head": "Publication Search Results", + "publication.search.title": "DSpace Angular :: Publication Search", + "relationships.isAuthorOf": "Authors", + "relationships.isIssueOf": "Journal Issues", + "relationships.isJournalIssueOf": "Journal Issue", + "relationships.isJournalOf": "Journals", + "relationships.isOrgUnitOf": "Organizational Units", + "relationships.isPersonOf": "Authors", + "relationships.isProjectOf": "Research Projects", + "relationships.isPublicationOf": "Publications", + "relationships.isPublicationOfJournalIssue": "Articles", + "relationships.isSingleJournalOf": "Journal", + "relationships.isSingleVolumeOf": "Journal Volume", + "relationships.isVolumeOf": "Journal Volumes", + "search.description": "", + "search.filters.applied.f.author": "Author", + "search.filters.applied.f.dateIssued.max": "End date", + "search.filters.applied.f.dateIssued.min": "Start date", + "search.filters.applied.f.dateSubmitted": "Date submitted", + "search.filters.applied.f.entityType": "Item Type", + "search.filters.applied.f.has_content_in_original_bundle": "Has files", + "search.filters.applied.f.itemtype": "Type", + "search.filters.applied.f.namedresourcetype": "Status", + "search.filters.applied.f.subject": "Subject", + "search.filters.applied.f.submitter": "Submitter", + "search.filters.filter.author.head": "Author", + "search.filters.filter.author.placeholder": "Author name", + "search.filters.filter.birthDate.head": "Birth Date", + "search.filters.filter.birthDate.placeholder": "Birth Date", + "search.filters.filter.creativeDatePublished.head": "Date Published", + "search.filters.filter.creativeDatePublished.placeholder": "Date Published", + "search.filters.filter.creativeWorkEditor.head": "Editor", + "search.filters.filter.creativeWorkEditor.placeholder": "Editor", + "search.filters.filter.creativeWorkKeywords.head": "Subject", + "search.filters.filter.creativeWorkKeywords.placeholder": "Subject", + "search.filters.filter.creativeWorkPublisher.head": "Publisher", + "search.filters.filter.creativeWorkPublisher.placeholder": "Publisher", + "search.filters.filter.dateIssued.head": "Date", + "search.filters.filter.dateIssued.max.placeholder": "Minimum Date", + "search.filters.filter.dateIssued.min.placeholder": "Maximum Date", + "search.filters.filter.dateSubmitted.head": "Date submitted", + "search.filters.filter.dateSubmitted.placeholder": "Date submitted", + "search.filters.filter.entityType.head": "Item Type", + "search.filters.filter.entityType.placeholder": "Item Type", + "search.filters.filter.has_content_in_original_bundle.head": "Has files", + "search.filters.filter.itemtype.head": "Type", + "search.filters.filter.itemtype.placeholder": "Type", + "search.filters.filter.jobTitle.head": "Job Title", + "search.filters.filter.jobTitle.placeholder": "Job Title", + "search.filters.filter.knowsLanguage.head": "Known language", + "search.filters.filter.knowsLanguage.placeholder": "Known language", + "search.filters.filter.namedresourcetype.head": "Status", + "search.filters.filter.namedresourcetype.placeholder": "Status", + "search.filters.filter.objectpeople.head": "People", + "search.filters.filter.objectpeople.placeholder": "People", + "search.filters.filter.organizationAddressCountry.head": "Country", + "search.filters.filter.organizationAddressCountry.placeholder": "Country", + "search.filters.filter.organizationAddressLocality.head": "City", + "search.filters.filter.organizationAddressLocality.placeholder": "City", + "search.filters.filter.organizationFoundingDate.head": "Date Founded", + "search.filters.filter.organizationFoundingDate.placeholder": "Date Founded", + "search.filters.filter.scope.head": "Scope", + "search.filters.filter.scope.placeholder": "Scope filter", + "search.filters.filter.show-less": "Collapse", + "search.filters.filter.show-more": "Show more", + "search.filters.filter.subject.head": "Subject", + "search.filters.filter.subject.placeholder": "Subject", + "search.filters.filter.submitter.head": "Submitter", + "search.filters.filter.submitter.placeholder": "Submitter", + "search.filters.head": "Filters", + "search.filters.reset": "Reset filters", + "search.form.search": "Search", + "search.form.search_dspace": "Search DSpace", + "search.form.search_mydspace": "Search MyDSpace", + "search.results.head": "Search Results", + "search.results.no-results": "Your search returned no results. Having trouble finding what you're looking for? Try putting", + "search.results.no-results-link": "quotes around it", + "search.sidebar.close": "Back to results", + "search.sidebar.filters.title": "Filters", + "search.sidebar.open": "Search Tools", + "search.sidebar.results": "results", + "search.sidebar.settings.rpp": "Results per page", + "search.sidebar.settings.sort-by": "Sort By", + "search.sidebar.settings.title": "Settings", + "search.switch-configuration.title": "Show", + "search.title": "DSpace Angular :: Search", + "search.view-switch.show-detail": "Show detail", + "search.view-switch.show-grid": "Show as grid", + "search.view-switch.show-list": "Show as list", + "sorting.dc.title.ASC": "Title Ascending", + "sorting.dc.title.DESC": "Title Descending", + "sorting.score.DESC": "Relevance", + "submission.edit.title": "Edit Submission", + "submission.general.cannot_submit": "You have not the privilege to make a new submission.", + "submission.general.deposit": "Deposit", + "submission.general.discard.confirm.cancel": "Cancel", + "submission.general.discard.confirm.info": "This operation can't be undone. Are you sure?", + "submission.general.discard.confirm.submit": "Yes, I'm sure", + "submission.general.discard.confirm.title": "Discard submission", + "submission.general.discard.submit": "Discard", + "submission.general.save": "Save", + "submission.general.save-later": "Save for later", + "submission.mydspace": {}, + "submission.sections.general.add-more": "Add more", + "submission.sections.general.collection": "Collection", + "submission.sections.general.deposit_error_notice": "There was an issue when submitting the item, please try again later.", + "submission.sections.general.deposit_success_notice": "Submission deposited successfully.", + "submission.sections.general.discard_error_notice": "There was an issue when discarding the item, please try again later.", + "submission.sections.general.discard_success_notice": "Submission discarded successfully.", + "submission.sections.general.metadata-extracted": "New metadata have been extracted and added to the <strong>{{sectionId}}</strong> section.", + "submission.sections.general.metadata-extracted-new-section": "New <strong>{{sectionId}}</strong> section has been added to submission.", + "submission.sections.general.no-collection": "No collection found", + "submission.sections.general.no-sections": "No options available", + "submission.sections.general.save_error_notice": "There was an issue when saving the item, please try again later.", + "submission.sections.general.save_success_notice": "Submission saved successfully.", + "submission.sections.general.search-collection": "Search for a collection", + "submission.sections.general.sections_not_valid": "There are incomplete sections.", + "submission.sections.submit.progressbar.cclicense": "Creative commons license", + "submission.sections.submit.progressbar.describe.recycle": "Recycle", + "submission.sections.submit.progressbar.describe.stepcustom": "Describe", + "submission.sections.submit.progressbar.describe.stepone": "Describe", + "submission.sections.submit.progressbar.describe.steptwo": "Describe", + "submission.sections.submit.progressbar.detect-duplicate": "Potential duplicates", + "submission.sections.submit.progressbar.license": "Deposit license", + "submission.sections.submit.progressbar.upload": "Upload files", + "submission.sections.upload.delete.confirm.cancel": "Cancel", + "submission.sections.upload.delete.confirm.info": "This operation can't be undone. Are you sure?", + "submission.sections.upload.delete.confirm.submit": "Yes, I'm sure", + "submission.sections.upload.delete.confirm.title": "Delete bitstream", + "submission.sections.upload.delete.submit": "Delete", + "submission.sections.upload.drop-message": "Drop files to attach them to the item", + "submission.sections.upload.form.access-condition-label": "Access condition type", + "submission.sections.upload.form.date-required": "Date is required.", + "submission.sections.upload.form.from-label": "Access grant from", + "submission.sections.upload.form.from-placeholder": "From", + "submission.sections.upload.form.group-label": "Group", + "submission.sections.upload.form.group-required": "Group is required.", + "submission.sections.upload.form.until-label": "Access grant until", + "submission.sections.upload.form.until-placeholder": "Until", + "submission.sections.upload.header.policy.default.nolist": "Uploaded files in the {{collectionName}} collection will be accessible according to the following group(s):", + "submission.sections.upload.header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):", + "submission.sections.upload.info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or <strong>upload additional files just dragging & dropping them everywhere in the page</strong>", + "submission.sections.upload.no-entry": "No", + "submission.sections.upload.no-file-uploaded": "No file uploaded yet.", + "submission.sections.upload.save-metadata": "Save metadata", + "submission.sections.upload.undo": "Cancel", + "submission.sections.upload.upload-failed": "Upload failed", + "submission.sections.upload.upload-successful": "Upload successful", + "submission.submit.title": "Submission", + "submission.workflow.generic.delete": "Delete", + "submission.workflow.generic.delete-help": "If you would to discard this item, select \"Delete\". You will then be asked to confirm it.", + "submission.workflow.generic.edit": "Edit", + "submission.workflow.generic.edit-help": "Select this option to change the item's metadata.", + "submission.workflow.generic.view": "View", + "submission.workflow.generic.view-help": "Select this option to view the item's metadata.", + "submission.workflow.tasks.claimed.approve": "Approve", + "submission.workflow.tasks.claimed.approve_help": "If you have reviewed the item and it is suitable for inclusion in the collection, select \"Approve\".", + "submission.workflow.tasks.claimed.edit": "Edit", + "submission.workflow.tasks.claimed.edit_help": "Select this option to change the item's metadata.", + "submission.workflow.tasks.claimed.reject.reason.info": "Please enter your reason for rejecting the submission into the box below, indicating whether the submitter may fix a problem and resubmit.", + "submission.workflow.tasks.claimed.reject.reason.placeholder": "Describe the reason of reject", + "submission.workflow.tasks.claimed.reject.reason.submit": "Reject item", + "submission.workflow.tasks.claimed.reject.reason.title": "Reason", + "submission.workflow.tasks.claimed.reject.submit": "Reject", + "submission.workflow.tasks.claimed.reject_help": "If you have reviewed the item and found it is <strong>not</strong> suitable for inclusion in the collection, select \"Reject\". You will then be asked to enter a message indicating why the item is unsuitable, and whether the submitter should change something and resubmit.", + "submission.workflow.tasks.claimed.return": "Return to pool", + "submission.workflow.tasks.claimed.return_help": "Return the task to the pool so that another user may perform the task.", + "submission.workflow.tasks.generic.error": "Error occurred during operation...", + "submission.workflow.tasks.generic.processing": "Processing...", + "submission.workflow.tasks.generic.submitter": "Submitter", + "submission.workflow.tasks.generic.success": "Operation successful", + "submission.workflow.tasks.pool.claim": "Claim", + "submission.workflow.tasks.pool.claim_help": "Assign this task to yourself.", + "submission.workflow.tasks.pool.hide-detail": "Hide detail", + "submission.workflow.tasks.pool.show-detail": "Show detail", "title": "DSpace", - "404": { - "help": "We can't find the page you're looking for. The page may have been moved or deleted. You can use the button below to get back to the home page. ", - "page-not-found": "page not found", - "link": { - "home-page": "Take me to the home page" - } - }, - "home": { - "title": "DSpace Angular :: Home", - "description": "", - "top-level-communities": { - "head": "Communities in DSpace", - "help": "Select a community to browse its collections." - } - }, - "mydspace": { - "title": "MyDSpace", - "description": "", - "new-submission": "New submission", - "results": { - "head": "Your submissions", - "no-results": "There were no items to show", - "no-title": "No title", - "no-authors": "No Authors", - "no-date": "No Date", - "no-abstract": "No Abstract", - "no-files": "No Files", - "no-uri": "No Uri", - "no-collections": "No Collections" - }, - "messages": { - "title": "Messages", - "to": "To", - "hide-msg": "Hide message", - "show-msg": "Show message", - "no-messages": "No messages yet.", - "no-content": "No content.", - "send-btn": "Send", - "subject-placeholder": "Subject...", - "description-placeholder": "Insert your message here...", - "mark-as-read": "Mark as read", - "mark-as-unread": "Mark as unread", - "submitter-help": "Select this option to send a message to controller.", - "controller-help": "Select this option to send a message to item's submitter." - }, - "show": { - "workspace": "Your Submissions", - "workflow": "All tasks" - }, - "status": { - "workflow": "Workflow", - "validation": "Validation", - "waiting-for-controller": "Waiting for controller", - "workspace": "Workspace", - "archived": "Archived" - }, - "view-btn": "View", - "general": { - "text-here": "HERE" - }, - "upload": { - "upload-successful": "New workspace item created. Click {{here}} for edit it.", - "upload-multiple-successful": "{{qty}} new workspace items created.", - "upload-failed": "Error creating new workspace. Please verify the content uploaded before retry." - } - }, - "search": { - "title": "DSpace Angular :: Search", - "description": "", - "form": { - "search": "Search", - "search_dspace": "Search DSpace", - "search_mydspace": "Search MyDSpace" - }, - "results": { - "head": "Search Results", - "no-results": "Your search returned no results. Having trouble finding what you're looking for? Try putting", - "no-results-link": "quotes around it" - }, - "sidebar": { - "close": "Back to results", - "open": "Search Tools", - "results": "results", - "filters": { - "title": "Filters" - }, - "settings": { - "title": "Settings", - "sort-by": "Sort By", - "rpp": "Results per page" - } - }, - "switch-configuration": { - "title":"Show" - }, - "view-switch": { - "show-list": "Show as list", - "show-grid": "Show as grid", - "show-detail": "Show detail" - }, - "filters": { - "head": "Filters", - "reset": "Reset filters", - "applied": { - "f.author": "Author", - "f.dateIssued.min": "Start date", - "f.dateIssued.max": "End date", - "f.subject": "Subject", - "f.has_content_in_original_bundle": "Has files", - "f.entityType": "Item Type", - "f.namedresourcetype": "Status", - "f.dateSubmitted": "Date submitted", - "f.itemtype": "Type", - "f.submitter": "Submitter" - }, - "filter": { - "show-more": "Show more", - "show-less": "Collapse", - "author": { - "placeholder": "Author name", - "head": "Author" - }, - "scope": { - "placeholder": "Scope filter", - "head": "Scope" - }, - "subject": { - "placeholder": "Subject", - "head": "Subject" - }, - "dateIssued": { - "max": { - "placeholder": "Minimum Date" - }, - "min": { - "placeholder": "Maximum Date" - }, - "head": "Date" - }, - "has_content_in_original_bundle": { - "head": "Has files" - }, - "entityType": { - "placeholder": "Item Type", - "head": "Item Type" - }, - "namedresourcetype": { - "placeholder": "Status", - "head": "Status" - }, - "dateSubmitted": { - "placeholder": "Date submitted", - "head": "Date submitted" - }, - "itemtype": { - "placeholder": "Type", - "head": "Type" - }, - "submitter": { - "placeholder": "Submitter", - "head": "Submitter" - }, - "objectpeople": { - "placeholder": "People", - "head": "People" - }, - "jobTitle": { - "placeholder": "Job Title", - "head": "Job Title" - }, - "knowsLanguage": { - "placeholder": "Known language", - "head": "Known language" - }, - "birthDate": { - "placeholder": "Birth Date", - "head": "Birth Date" - }, - "creativeWorkPublisher": { - "placeholder": "Publisher", - "head": "Publisher" - }, - "creativeWorkEditor": { - "placeholder": "Editor", - "head": "Editor" - }, - "creativeWorkKeywords": { - "placeholder": "Subject", - "head": "Subject" - }, - "creativeDatePublished": { - "placeholder": "Date Published", - "head": "Date Published" - }, - "organizationAddressCountry": { - "placeholder": "Country", - "head": "Country" - }, - "organizationAddressLocality": { - "placeholder": "City", - "head": "City" - }, - "organizationFoundingDate": { - "placeholder": "Date Founded", - "head": "Date Founded" - } - } - } - }, - "browse": { - "title": "Browsing {{ collection }} by {{ field }} {{ value }}", - "startsWith": { - "jump": "Jump to a point in the index:", - "choose_year": "(Choose year)", - "choose_start": "(Choose start)", - "type_date": "Or type in a date (year-month):", - "type_text": "Or enter first few letters:", - "months": { - "none": "(Choose month)", - "january": "January", - "february": "February", - "march": "March", - "april": "April", - "may": "May", - "june": "June", - "july": "July", - "august": "August", - "september": "September", - "october": "October", - "november": "November", - "december": "December" - }, - "submit": "Go" - }, - "metadata": { - "title": "Title", - "author": "Author", - "subject": "Subject", - "dateissued": "Issue Date" - }, - "comcol": { - "head": "Browse", - "by": { - "title": "By Title", - "dateissued": "By Issue Date", - "author": "By Author", - "subject": "By Subject" - } - }, - "empty": "No items to show." - }, - "admin": { - "registries": { - "metadata": { - "title": "DSpace Angular :: Metadata Registry", - "head": "Metadata Registry", - "description": "The metadata registry maintains a list of all metadata fields available in the repository. These fields may be divided amongst multiple schemas. However, DSpace requires the qualified Dublin Core schema.", - "form": { - "create": "Create metadata schema", - "edit": "Edit metadata schema", - "namespace": "Namespace", - "name": "Name" - }, - "schemas": { - "table": { - "id": "ID", - "namespace": "Namespace", - "name": "Name", - "delete": "Delete selected" - }, - "no-items": "No metadata schemas to show." - } - }, - "schema": { - "title": "DSpace Angular :: Metadata Schema Registry", - "head": "Metadata Schema", - "description": "This is the metadata schema for \"{{namespace}}\".", - "return": "Return", - "form": { - "create": "Create metadata field", - "edit": "Edit metadata field", - "element": "Element", - "qualifier": "Qualifier", - "scopenote": "Scope Note" - }, - "fields": { - "head": "Schema metadata fields", - "table": { - "field": "Field", - "scopenote": "Scope Note", - "delete": "Delete selected" - }, - "no-items": "No metadata fields to show." - }, - "notification": { - "success": "Success", - "failure": "Error", - "created": "Successfully created metadata schema \"{{prefix}}\"", - "edited": "Successfully edited metadata schema \"{{prefix}}\"", - "deleted": { - "success": "Successfully deleted {{amount}} metadata schemas", - "failure": "Failed to delete {{amount}} metadata schemas" - }, - "field": { - "created": "Successfully created metadata field \"{{field}}\"", - "edited": "Successfully edited metadata field \"{{field}}\"", - "deleted": { - "success": "Successfully deleted {{amount}} metadata fields", - "failure": "Failed to delete {{amount}} metadata fields" - } - } - } - }, - "bitstream-formats": { - "title": "DSpace Angular :: Bitstream Format Registry", - "head": "Bitstream Format Registry", - "description": "This list of bitstream formats provides information about known formats and their support level.", - "formats": { - "table": { - "name": "Name", - "mimetype": "MIME Type", - "supportLevel": { - "head": "Support Level", - "0": "Unknown", - "1": "Known", - "2": "Support" - }, - "internal": "internal" - }, - "no-items": "No bitstream formats to show." - } - } - } - }, - "menu": { - "header": { - "admin": "Admin", - "image": { - "logo": "Repository logo" - } - }, - "section": { - "pin": "Pin sidebar", - "unpin": "Unpin sidebar", - "new": "New", - "new_community": "Community", - "new_collection": "Collection", - "new_item": "Item", - "new_item_version": "Item Version", - "edit": "Edit", - "edit_community": "Community", - "edit_collection": "Collection", - "edit_item": "Item", - "import": "Import", - "import_metadata": "Metadata", - "import_batch": "Batch Import (ZIP)", - "export": "Export", - "export_community": "Community", - "export_collection": "Collection", - "export_item": "Item", - "export_metadata": "Metadata", - "access_control": "Access Control", - "access_control_people": "People", - "access_control_groups": "Groups", - "access_control_authorizations": "Authorizations", - "find": "Find", - "find_items": "Items", - "find_withdrawn_items": "Withdrawn Items", - "find_private_items": "Private Items", - "registries": "Registries", - "registries_metadata": "Metadata", - "registries_format": "Format", - "curation_task": "Curation Task", - "statistics_task": "Statistics Task", - "control_panel": "Control Panel", - "browse_global": "All of DSpace", - "browse_global_communities_and_collections": "Communities & Collections", - "browse_global_by_dateissued": "By Issue Date", - "browse_global_by_author": "By Author", - "browse_global_by_title": "By Title", - "browse_global_by_subject": "By Subject", - "statistics": "Statistics", - "browse_community": "This Community", - "browse_community_by_issue_date": "By Issue Date", - "browse_community_by_author": "By Author", - "browse_community_by_title": "By Title", - "icon": { - "pin": "Pin sidebar", - "unpin": "Unpin sidebar", - "new": "New menu section", - "edit": "Edit menu section", - "import": "Import menu section", - "export": "Export menu section", - "access_control": "Access Control menu section", - "find": "Find menu section", - "registries": "Registries menu section", - "curation_task": "Curation Task menu section", - "statistics_task": "Statistics Task menu section", - "control_panel": "Control Panel menu section" - }, - "toggle": { - "new": "Toggle New section", - "edit": "Toggle Edit section", - "import": "Toggle Import section", - "export": "Toggle Export section", - "access_control": "Toggle Access Control section", - "find": "Toggle Find section", - "registries": "Toggle Registries section", - "curation_task": "Toggle Curation Task section", - "statistics_task": "Toggle Statistics Task section", - "control_panel": "Toggle Control Panel section" - } - } - }, - "loading": { - "default": "Loading...", - "top-level-communities": "Loading top-level communities...", - "community": "Loading community...", - "collection": "Loading collection...", - "sub-collections": "Loading sub-collections...", - "sub-communities": "Loading sub-communities...", - "recent-submissions": "Loading recent submissions...", - "item": "Loading item...", - "objects": "Loading...", - "search-results": "Loading search results...", - "mydspace-results": "Loading items...", - "browse-by": "Loading items...", - "browse-by-page": "Loading page..." - }, - "error": { - "default": "Error", - "top-level-communities": "Error fetching top-level communities", - "community": "Error fetching community", - "collection": "Error fetching collection", - "sub-collections": "Error fetching sub-collections", - "sub-communities": "Error fetching sub-communities", - "recent-submissions": "Error fetching recent submissions", - "item": "Error fetching item", - "objects": "Error fetching objects", - "search-results": "Error fetching search results", - "browse-by": "Error fetching items", - "validation": { - "pattern": "This input is restricted by the current pattern: {{ pattern }}.", - "license": { - "notgranted": "You must grant this license to complete your submission. If you are unable to grant this license at this time you may save your work and return later or remove the submission." - } - }, - "submission": { - "sections": { - "init-form-error": "An error occurred during section initialize, please check your input-form configuration. Details are below : <br> <br>" - } - } - }, - "form": { - "submit": "Submit", - "cancel": "Cancel", - "search": "Search", - "search-help": "Click here to looking for an existing correspondence", - "remove": "Remove", - "clear": "Clear", - "clear-help": "Click here to remove the selected value", - "edit": "Edit", - "edit-help": "Click here to edit the selected value", - "save": "Save", - "save-help": "Save changes", - "first-name": "First name", - "last-name": "Last name", - "loading": "Loading...", - "no-results": "No results found", - "no-value": "No value entered", - "group-collapse": "Collapse", - "group-expand": "Expand", - "group-collapse-help": "Click here to collapse", - "group-expand-help": "Click here to expand and add more elements", - "other-information": { - } - }, - "login": { - "title": "Login", - "form": { - "header": "Please log in to DSpace", - "email": "Email address", - "forgot-password": "Have you forgotten your password?", - "new-user": "New user? Click here to register.", - "password": "Password", - "submit": "Log in" - } - }, - "logout": { - "title": "Logout", - "form": { - "header": "Log out from DSpace", - "submit": "Log out" - } - }, - "auth": { - "messages": { - "expired": "Your session has expired. Please log in again." - }, - "errors": { - "invalid-user": "Invalid email address or password." - } - }, - "chips": { - "remove": "Remove chip" - }, - "dso-selector": { - "create": { - "community": { - "head": "New community", - "sub-level": "Create a new community in", - "top-level": "Create a new top-level community" - }, - "collection": { - "head": "New collection" - }, - "item": { - "head": "New item" - } - }, - "edit": { - "community": { - "head": "Edit community" - }, - "collection": { - "head": "Edit collection" - }, - "item": { - "head": "Edit item" - } - }, - "placeholder": "Search for a {{ type }}", - "no-results": "No {{ type }} found" - }, - "submission": { - "general":{ - "cannot_submit": "You have not the privilege to make a new submission.", - "deposit": "Deposit", - "discard": { - "submit": "Discard", - "confirm": { - "cancel": "Cancel", - "submit": "Yes, I'm sure", - "title": "Discard submission", - "info": "This operation can't be undone. Are you sure?" - } - }, - "save": "Save", - "save-later": "Save for later" - }, - "submit": { - "title": "Submission" - }, - "edit": { - "title": "Edit Submission" - }, - "mydspace": { - - }, - "sections": { - - "general": { - "add-more": "Add more", - "no-sections": "No options available", - "sections_not_valid": "There are incomplete sections.", - "collection": "Collection", - "no-collection": "No collection found", - "search-collection": "Search for a collection", - "save_error_notice": "There was an issue when saving the item, please try again later.", - "deposit_success_notice": "Submission deposited successfully.", - "deposit_error_notice": "There was an issue when submitting the item, please try again later.", - "discard_success_notice": "Submission discarded successfully.", - "discard_error_notice": "There was an issue when discarding the item, please try again later.", - "save_success_notice": "Submission saved successfully.", - "metadata-extracted": "New metadata have been extracted and added to the <strong>{{sectionId}}</strong> section.", - "metadata-extracted-new-section": "New <strong>{{sectionId}}</strong> section has been added to submission." - }, - "submit.progressbar.describe.stepone": "Describe", - "submit.progressbar.describe.steptwo": "Describe", - "submit.progressbar.describe.stepcustom": "Describe", - "submit.progressbar.describe.recycle": "Recycle", - "submit.progressbar.upload": "Upload files", - "submit.progressbar.license": "Deposit license", - "submit.progressbar.cclicense": "Creative commons license", - "submit.progressbar.detect-duplicate": "Potential duplicates", - - "upload": { - "no-entry": "No", - "no-file-uploaded": "No file uploaded yet.", - "info": "Here you will find all the files currently in the item. You can update the fle metadata and access conditions or <strong>upload additional files just dragging & dropping them everywhere in the page</strong>", - "drop-message": "Drop files to attach them to the item", - "upload-successful": "Upload successful", - "upload-failed": "Upload failed", - "header.policy.default.nolist": "Uploaded files in the {{collectionName}} collection will be accessible according to the following group(s):", - "header.policy.default.withlist": "Please note that uploaded files in the {{collectionName}} collection will be accessible, in addition to what is explicitly decided for the single file, with the following group(s):", - "form": { - "access-condition-label": "Access condition type", - "from-label": "Access grant from", - "from-placeholder": "From", - "until-label": "Access grant until", - "until-placeholder": "Until", - "group-label": "Group", - "group-required": "Group is required.", - "date-required": "Date is required." - }, - "save-metadata": "Save metadata", - "undo": "Cancel", - "delete": { - "submit": "Delete", - "confirm": { - "cancel": "Cancel", - "submit": "Yes, I'm sure", - "title": "Delete bitstream", - "info": "This operation can't be undone. Are you sure?" - } - } - } - }, - "workflow": { - "generic": { - "delete": "Delete", - "delete-help": "If you would to discard this item, select \"Delete\". You will then be asked to confirm it.", - "edit": "Edit", - "edit-help": "Select this option to change the item's metadata.", - "view": "View", - "view-help": "Select this option to view the item's metadata." - }, - "tasks": { - "generic": { - "processing": "Processing...", - "success": "Operation successful", - "error": "Error occurred during operation...", - "submitter": "Submitter" - }, - "claimed": { - "approve": "Approve", - "approve_help": "If you have reviewed the item and it is suitable for inclusion in the collection, select \"Approve\".", - "edit": "Edit", - "edit_help": "Select this option to change the item's metadata.", - "reject": { - "submit": "Reject", - "reason": { - "submit": "Reject item", - "title": "Reason", - "info": "Please enter your reason for rejecting the submission into the box below, indicating whether the submitter may fix a problem and resubmit.", - "placeholder": "Describe the reason of reject" - } - }, - "reject_help": "If you have reviewed the item and found it is <strong>not</strong> suitable for inclusion in the collection, select \"Reject\". You will then be asked to enter a message indicating why the item is unsuitable, and whether the submitter should change something and resubmit.", - "return": "Return to pool", - "return_help": "Return the task to the pool so that another user may perform the task." - - }, - "pool": { - "claim": "Claim", - "claim_help": "Assign this task to yourself.", - "show-detail": "Show detail", - "hide-detail": "Hide detail" - } - } - } - }, - "uploader": { - "drag-message": "Drag & Drop your files here", - "or": ", or", - "browse": "browse", - "queue-lenght": "Queue length", - "processing": "Processing" - } + "uploader.browse": "browse", + "uploader.drag-message": "Drag & Drop your files here", + "uploader.or": ", or", + "uploader.processing": "Processing", + "uploader.queue-lenght": "Queue length" } diff --git a/resources/i18n/nl.json b/resources/i18n/nl.json index f4dda3b3c804d024928368accc109ca271a74f65..da12ff051839b6fa7b0fe4fd84d68cdccfa082f7 100644 --- a/resources/i18n/nl.json +++ b/resources/i18n/nl.json @@ -1,277 +1,149 @@ { - "footer": { - "copyright": "copyright © 2002-{{ year }}", - "link.dspace": "DSpace software", - "link.duraspace": "DuraSpace" - }, - "collection": { - "page": { - "news": "Nieuws", - "license": "Licentie", - "browse": { - "recent": { - "head": "Recent toegevoegd" - } - } - } - }, - "community": { - "page": { - "news": "Nieuws", - "license": "Licentie" - }, - "sub-collection-list": { - "head": "Collecties in deze Community" - } - }, - "item": { - "page": { - "author": "Auteur", - "abstract": "Abstract", - "date": "Datum", - "uri": "URI", - "files": "Bestanden", - "collections": "Collecties", - "filesection": { - "download": "Download", - "name": "Naam:", - "format": "Formaat:", - "size": "Grootte:", - "description": "Beschrijving:" - }, - "link": { - "simple": "Eenvoudige itemweergave", - "full": "Volledige itemweergave" - } - } - }, - "nav": { - "home": "Home", - "login": "Log In", - "logout": "Log Uit" - }, - "pagination": { - "results-per-page": "Resultaten per pagina", - "sort-direction": "Sorteermogelijkheden", - "showing": { - "label": "Resultaten ", - "detail": "{{ range }} van {{ total }}" - } - }, - "sorting": { - "score": { - "DESC": "Relevantie" - }, - "dc.title": { - "ASC": "Oplopend op titel", - "DESC": "Aflopend op titel" - } - }, - "title": "DSpace", - "404": { - "help": "De pagina die u zoekt kan niet gevonden worden. De pagina werd mogelijk verplaatst of verwijderd. U kan onderstaande knop gebruiken om terug naar de homepagina te gaan. ", - "page-not-found": "Pagina niet gevonden", - "link": { - "home-page": "Terug naar de homepagina" - } - }, - "home": { - "title": "DSpace Angular :: Home", - "description": "", - "top-level-communities": { - "head": "Communities in DSpace", - "help": "Selecteer een community om diens collecties te verkennen." - } - }, - "search": { - "title": "DSpace Angular :: Zoek", - "description": "", - "form": { - "search": "Zoek", - "search_dspace": "Zoek in DSpace" - }, - "results": { - "head": "Zoekresultaten", - "no-results": "Er waren geen resultaten voor deze zoekopdracht" - }, - "sidebar": { - "close": "Terug naar de resultaten", - "open": "Zoek Tools", - "results": "resultaten", - "filters": { - "title": "Filters" - }, - "settings": { - "title": "Instellingen", - "sort-by": "Sorteer volgens", - "rpp": "Resultaten per pagina" - } - }, - "view-switch": { - "show-list": "Toon als lijst", - "show-grid": "Toon in raster" - }, - "filters": { - "head": "Filters", - "reset": "Filters verwijderen", - "applied": { - "f.author": "Auteur", - "f.dateIssued.min": "Startdatum", - "f.dateIssued.max": "Einddatum", - "f.subject": "Sleutelwoord", - "f.has_content_in_original_bundle": "Heeft bestanden" - }, - "filter": { - "show-more": "Toon meer", - "show-less": "Inklappen", - "author": { - "placeholder": "Auteursnaam", - "head": "Auteur" - }, - "scope": { - "placeholder": "Bereikfilter", - "head": "Bereik" - }, - "subject": { - "placeholder": "Onderwerp", - "head": "Onderwerp" - }, - "dateIssued": { - "max": { - "placeholder": "Vroegste Datum" - }, - "min": { - "placeholder": "Laatste Datum" - }, - "head": "Datum" - }, - "has_content_in_original_bundle": { - "head": "Heeft bestanden" - } - } - } - }, - "browse": { - "title": "Verken {{ collection }} volgens {{ field }} {{ value }}" - }, - "admin": { - "registries": { - "metadata": { - "title": "DSpace Angular :: Metadata Register", - "head": "Metadata Register", - "description": "Het metadataregister omvat de lijst van alle metadatavelden die beschikbaar zijn in het systeem. Deze velden kunnen verspreid zijn over verschillende metadataschema's. Het qualified Dublin Core schema (dc) is een verplicht schema en kan niet worden verwijderd.", - "schemas": { - "table": { - "id": "ID", - "namespace": "Naamruimte", - "name": "Naam" - }, - "no-items": "Er kunnen geen metadataschema's getoond worden." - } - }, - "schema": { - "title": "DSpace Angular :: Metadata Schema Register", - "head": "Metadata Schema", - "description": "Dit is het metadataschema voor \"{{namespace}}\".", - "fields": { - "head": "Schema metadatavelden", - "table": { - "field": "Veld", - "scopenote": "Opmerking over bereik" - }, - "no-items": "Er kunnen geen metadatavelden getoond worden." - } - }, - "bitstream-formats": { - "title": "DSpace Angular :: Bitstream Formaat Register", - "head": "Bitstream Formaat Register", - "description": "Deze lijst van Bitstream formaten biedt informatie over de formaten die in deze repository zijn toegelaten en op welke manier ze ondersteund worden. De term Bitstream wordt in DSpace gebruikt om een bestand aan te duiden dat samen met metadata onderdeel uitmaakt van een item. De naam bitstream duidt op het feit dat het bestand achterliggend wordt opgeslaan zonder bestandsextensie.", - "formats": { - "table": { - "name": "Naam", - "mimetype": "MIME Type", - "supportLevel": { - "head": "Ondersteuning", - "0": "Onbekend", - "1": "Gekend", - "2": "Ondersteund" - }, - "internal": "intern" - }, - "no-items": "Er kunnen geen bitstreamformaten getoond worden." - } - } - } - }, - "loading": { - "default": "Laden...", - "top-level-communities": "Inladen van de Communities op het hoogste niveau...", - "community": "Community wordt ingeladen...", - "collection": "Collectie wordt ingeladen...", - "sub-collections": "De sub-collecties worden ingeladen...", - "recent-submissions": "Recent toegevoegde items worden ingeladen...", - "item": "Item wordt ingeladen...", - "objects": "Laden...", - "search-results": "Zoekresultaten worden ingeladen...", - "browse-by": "Items worden ingeladen..." - }, - "error": { - "default": "Fout", - "top-level-communities": "Fout bij het inladen van communities op het hoogste niveau", - "community": "Fout bij het ophalen van een community", - "collection": "Fout bij het ophalen van een collectie", - "sub-collections": "Fout bij het ophalen van sub-collecties", - "recent-submissions": "Fout bij het ophalen van recent toegevoegde items", - "item": "Fout bij het ophalen van items", - "objects": "Fout bij het ophalen van objecten", - "search-results": "Fout bij het ophalen van zoekresultaten", - "browse-by": "Fout bij het ophalen van items", - "validation": { - "pattern": "Deze invoer is niet toegelaten volgens dit patroon: {{ pattern }}.", - "license": { - "notgranted": "U moet de invoerlicentie goedkeuren om de invoer af te werken. Indien u deze licentie momenteel niet kan of mag goedkeuren, kan u uw werk opslaan en de invoer later afwerken. U kunt dit nieuwe item ook verwijderen indien u niet voldoet aan de vereisten van de invoerlicentie." - } - } - }, - "form": { - "submit": "Verstuur", - "cancel": "Annuleer", - "search": "Zoek", - "remove": "Verwijder", - "first-name": "Voornaam", - "last-name": "Achternaam", - "loading": "Inladen...", - "no-results": "Geen resultaten gevonden", - "no-value": "Geen waarde ingevoerd", - "group-collapse": "Inklappen", - "group-expand": "Uitklappen", - "group-collapse-help": "Klik hier op in te klappen", - "group-expand-help": "Klik hier om uit te klappen en om meer onderdelen toe te voegen" - }, - "login": { - "title": "Aanmelden", - "form": { - "header": "Gelieve in te loggen in DSpace", - "email": "Email adres", - "forgot-password": "Bent u uw wachtwoord vergeten?", - "new-user": "Nieuwe gebruiker? Gelieve u hier te registreren", - "password": "Wachtwoord", - "submit": "Aanmelden" - } - }, - "logout": { - "title": "Afmelden", - "form": { - "header": "Afmelden in DSpace", - "submit": "Afmelden" - } - }, - "auth": { - "messages": { - "expired": "Uw sessie is vervallen. Gelieve opnieuw aan te melden." - }, - "errors": { - "invalid-user": "Ongeldig e-mailadres of wachtwoord." - } - } + "404.help": "De pagina die u zoekt kan niet gevonden worden. De pagina werd mogelijk verplaatst of verwijderd. U kan onderstaande knop gebruiken om terug naar de homepagina te gaan. ", + "404.link.home-page": "Terug naar de homepagina", + "404.page-not-found": "Pagina niet gevonden", + "admin.registries.bitstream-formats.description": "Deze lijst van Bitstream formaten biedt informatie over de formaten die in deze repository zijn toegelaten en op welke manier ze ondersteund worden. De term Bitstream wordt in DSpace gebruikt om een bestand aan te duiden dat samen met metadata onderdeel uitmaakt van een item. De naam bitstream duidt op het feit dat het bestand achterliggend wordt opgeslaan zonder bestandsextensie.", + "admin.registries.bitstream-formats.formats.no-items": "Er kunnen geen bitstreamformaten getoond worden.", + "admin.registries.bitstream-formats.formats.table.internal": "intern", + "admin.registries.bitstream-formats.formats.table.mimetype": "MIME Type", + "admin.registries.bitstream-formats.formats.table.name": "Naam", + "admin.registries.bitstream-formats.formats.table.supportLevel.0": "Onbekend", + "admin.registries.bitstream-formats.formats.table.supportLevel.1": "Gekend", + "admin.registries.bitstream-formats.formats.table.supportLevel.2": "Ondersteund", + "admin.registries.bitstream-formats.formats.table.supportLevel.head": "Ondersteuning", + "admin.registries.bitstream-formats.head": "Bitstream Formaat Register", + "admin.registries.bitstream-formats.title": "DSpace Angular :: Bitstream Formaat Register", + "admin.registries.metadata.description": "Het metadataregister omvat de lijst van alle metadatavelden die beschikbaar zijn in het systeem. Deze velden kunnen verspreid zijn over verschillende metadataschema's. Het qualified Dublin Core schema (dc) is een verplicht schema en kan niet worden verwijderd.", + "admin.registries.metadata.head": "Metadata Register", + "admin.registries.metadata.schemas.no-items": "Er kunnen geen metadataschema's getoond worden.", + "admin.registries.metadata.schemas.table.id": "ID", + "admin.registries.metadata.schemas.table.name": "Naam", + "admin.registries.metadata.schemas.table.namespace": "Naamruimte", + "admin.registries.metadata.title": "DSpace Angular :: Metadata Register", + "admin.registries.schema.description": "Dit is het metadataschema voor \"{{namespace}}\".", + "admin.registries.schema.fields.head": "Schema metadatavelden", + "admin.registries.schema.fields.no-items": "Er kunnen geen metadatavelden getoond worden.", + "admin.registries.schema.fields.table.field": "Veld", + "admin.registries.schema.fields.table.scopenote": "Opmerking over bereik", + "admin.registries.schema.head": "Metadata Schema", + "admin.registries.schema.title": "DSpace Angular :: Metadata Schema Register", + "auth.errors.invalid-user": "Ongeldig e-mailadres of wachtwoord.", + "auth.messages.expired": "Uw sessie is vervallen. Gelieve opnieuw aan te melden.", + "browse.title": "Verken {{ collection }} volgens {{ field }} {{ value }}", + "collection.page.browse.recent.head": "Recent toegevoegd", + "collection.page.license": "Licentie", + "collection.page.news": "Nieuws", + "community.page.license": "Licentie", + "community.page.news": "Nieuws", + "community.sub-collection-list.head": "Collecties in deze Community", + "error.browse-by": "Fout bij het ophalen van items", + "error.collection": "Fout bij het ophalen van een collectie", + "error.community": "Fout bij het ophalen van een community", + "error.default": "Fout", + "error.item": "Fout bij het ophalen van items", + "error.objects": "Fout bij het ophalen van objecten", + "error.recent-submissions": "Fout bij het ophalen van recent toegevoegde items", + "error.search-results": "Fout bij het ophalen van zoekresultaten", + "error.sub-collections": "Fout bij het ophalen van sub-collecties", + "error.top-level-communities": "Fout bij het inladen van communities op het hoogste niveau", + "error.validation.license.notgranted": "U moet de invoerlicentie goedkeuren om de invoer af te werken. Indien u deze licentie momenteel niet kan of mag goedkeuren, kan u uw werk opslaan en de invoer later afwerken. U kunt dit nieuwe item ook verwijderen indien u niet voldoet aan de vereisten van de invoerlicentie.", + "error.validation.pattern": "Deze invoer is niet toegelaten volgens dit patroon: {{ pattern }}.", + "footer.copyright": "copyright © 2002-{{ year }}", + "footer.link.dspace": "DSpace software", + "footer.link.duraspace": "DuraSpace", + "form.cancel": "Annuleer", + "form.first-name": "Voornaam", + "form.group-collapse": "Inklappen", + "form.group-collapse-help": "Klik hier op in te klappen", + "form.group-expand": "Uitklappen", + "form.group-expand-help": "Klik hier om uit te klappen en om meer onderdelen toe te voegen", + "form.last-name": "Achternaam", + "form.loading": "Inladen...", + "form.no-results": "Geen resultaten gevonden", + "form.no-value": "Geen waarde ingevoerd", + "form.remove": "Verwijder", + "form.search": "Zoek", + "form.submit": "Verstuur", + "home.description": "", + "home.title": "DSpace Angular :: Home", + "home.top-level-communities.head": "Communities in DSpace", + "home.top-level-communities.help": "Selecteer een community om diens collecties te verkennen.", + "item.page.abstract": "Abstract", + "item.page.author": "Auteur", + "item.page.collections": "Collecties", + "item.page.date": "Datum", + "item.page.files": "Bestanden", + "item.page.filesection.description": "Beschrijving:", + "item.page.filesection.download": "Download", + "item.page.filesection.format": "Formaat:", + "item.page.filesection.name": "Naam:", + "item.page.filesection.size": "Grootte:", + "item.page.link.full": "Volledige itemweergave", + "item.page.link.simple": "Eenvoudige itemweergave", + "item.page.uri": "URI", + "loading.browse-by": "Items worden ingeladen...", + "loading.collection": "Collectie wordt ingeladen...", + "loading.community": "Community wordt ingeladen...", + "loading.default": "Laden...", + "loading.item": "Item wordt ingeladen...", + "loading.objects": "Laden...", + "loading.recent-submissions": "Recent toegevoegde items worden ingeladen...", + "loading.search-results": "Zoekresultaten worden ingeladen...", + "loading.sub-collections": "De sub-collecties worden ingeladen...", + "loading.top-level-communities": "Inladen van de Communities op het hoogste niveau...", + "login.form.email": "Email adres", + "login.form.forgot-password": "Bent u uw wachtwoord vergeten?", + "login.form.header": "Gelieve in te loggen in DSpace", + "login.form.new-user": "Nieuwe gebruiker? Gelieve u hier te registreren", + "login.form.password": "Wachtwoord", + "login.form.submit": "Aanmelden", + "login.title": "Aanmelden", + "logout.form.header": "Afmelden in DSpace", + "logout.form.submit": "Afmelden", + "logout.title": "Afmelden", + "nav.home": "Home", + "nav.login": "Log In", + "nav.logout": "Log Uit", + "pagination.results-per-page": "Resultaten per pagina", + "pagination.showing.detail": "{{ range }} van {{ total }}", + "pagination.showing.label": "Resultaten ", + "pagination.sort-direction": "Sorteermogelijkheden", + "search.description": "", + "search.filters.applied.f.author": "Auteur", + "search.filters.applied.f.dateIssued.max": "Einddatum", + "search.filters.applied.f.dateIssued.min": "Startdatum", + "search.filters.applied.f.has_content_in_original_bundle": "Heeft bestanden", + "search.filters.applied.f.subject": "Sleutelwoord", + "search.filters.filter.author.head": "Auteur", + "search.filters.filter.author.placeholder": "Auteursnaam", + "search.filters.filter.dateIssued.head": "Datum", + "search.filters.filter.dateIssued.max.placeholder": "Vroegste Datum", + "search.filters.filter.dateIssued.min.placeholder": "Laatste Datum", + "search.filters.filter.has_content_in_original_bundle.head": "Heeft bestanden", + "search.filters.filter.scope.head": "Bereik", + "search.filters.filter.scope.placeholder": "Bereikfilter", + "search.filters.filter.show-less": "Inklappen", + "search.filters.filter.show-more": "Toon meer", + "search.filters.filter.subject.head": "Onderwerp", + "search.filters.filter.subject.placeholder": "Onderwerp", + "search.filters.head": "Filters", + "search.filters.reset": "Filters verwijderen", + "search.form.search": "Zoek", + "search.form.search_dspace": "Zoek in DSpace", + "search.results.head": "Zoekresultaten", + "search.results.no-results": "Er waren geen resultaten voor deze zoekopdracht", + "search.sidebar.close": "Terug naar de resultaten", + "search.sidebar.filters.title": "Filters", + "search.sidebar.open": "Zoek Tools", + "search.sidebar.results": "resultaten", + "search.sidebar.settings.rpp": "Resultaten per pagina", + "search.sidebar.settings.sort-by": "Sorteer volgens", + "search.sidebar.settings.title": "Instellingen", + "search.title": "DSpace Angular :: Zoek", + "search.view-switch.show-grid": "Toon in raster", + "search.view-switch.show-list": "Toon als lijst", + "sorting.dc.title.ASC": "Oplopend op titel", + "sorting.dc.title.DESC": "Aflopend op titel", + "sorting.score.DESC": "Relevantie", + "title": "DSpace" } diff --git a/src/app/+admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts b/src/app/+admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts index b6e3b7e9895ad0a158740722794c4952151f1ac3..3a680c906b7dbd3c8f2d528df06cb623ea4d57ca 100644 --- a/src/app/+admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts +++ b/src/app/+admin/admin-registries/bitstream-formats/bitstream-formats.component.spec.ts @@ -13,6 +13,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { EnumKeysPipe } from '../../../shared/utils/enum-keys-pipe'; import { HostWindowService } from '../../../shared/host-window.service'; import { HostWindowServiceStub } from '../../../shared/testing/host-window-service-stub'; +import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils'; describe('BitstreamFormatsComponent', () => { let comp: BitstreamFormatsComponent; @@ -52,7 +53,7 @@ describe('BitstreamFormatsComponent', () => { extensions: null } ]; - const mockFormats = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockFormatsList))); + const mockFormats = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockFormatsList)); const registryServiceStub = { getBitstreamFormats: () => mockFormats }; diff --git a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.actions.ts b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.actions.ts index 7358123462d095887c99b41d878310d12c5131a8..96f9d345f59b57ac3e4e8ff0dc5e1f09fb3335b1 100644 --- a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.actions.ts +++ b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.actions.ts @@ -1,7 +1,7 @@ import { Action } from '@ngrx/store'; import { type } from '../../../shared/ngrx/type'; -import { MetadataSchema } from '../../../core/metadata/metadataschema.model'; -import { MetadataField } from '../../../core/metadata/metadatafield.model'; +import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; +import { MetadataField } from '../../../core/metadata/metadata-field.model'; /** * For each action type in an action group, make a simple diff --git a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.spec.ts b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.spec.ts index d641c973522d14667bbcc7c70d9f3837399f27e0..4a5e301921b604e44a56573d627af40c10c606f6 100644 --- a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.spec.ts +++ b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.spec.ts @@ -17,6 +17,7 @@ import { ChangeDetectionStrategy, NO_ERRORS_SCHEMA } from '@angular/core'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub'; import { RestResponse } from '../../../core/cache/response.models'; +import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils'; describe('MetadataRegistryComponent', () => { let comp: MetadataRegistryComponent; @@ -36,7 +37,7 @@ describe('MetadataRegistryComponent', () => { namespace: 'http://dspace.org/mockschema' } ]; - const mockSchemas = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockSchemasList))); + const mockSchemas = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockSchemasList)); /* tslint:disable:no-empty */ const registryServiceStub = { getMetadataSchemas: () => mockSchemas, diff --git a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts index 88c807e3bc4dbff1032054c121d87e0d32924a21..302974b5c2f2853fa8472f9dd1cf9664603db624 100644 --- a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts +++ b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.component.ts @@ -3,7 +3,6 @@ import { RegistryService } from '../../../core/registry/registry.service'; import { Observable, combineLatest as observableCombineLatest } from 'rxjs'; import { RemoteData } from '../../../core/data/remote-data'; import { PaginatedList } from '../../../core/data/paginated-list'; -import { MetadataSchema } from '../../../core/metadata/metadataschema.model'; import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model'; import { map, take } from 'rxjs/operators'; import { hasValue } from '../../../shared/empty.util'; @@ -12,6 +11,7 @@ import { zip } from 'rxjs/internal/observable/zip'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { Route, Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; +import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; @Component({ selector: 'ds-metadata-registry', diff --git a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.reducers.spec.ts b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.reducers.spec.ts index f23c12c1091e9929beae2d98370ab5bfec09e506..2f7d606c60a656c46c4ebb4d38f143d7ca100b2b 100644 --- a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.reducers.spec.ts +++ b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.reducers.spec.ts @@ -7,8 +7,8 @@ import { MetadataRegistrySelectSchemaAction } from './metadata-registry.actions'; import { metadataRegistryReducer, MetadataRegistryState } from './metadata-registry.reducers'; -import { MetadataSchema } from '../../../core/metadata/metadataschema.model'; -import { MetadataField } from '../../../core/metadata/metadatafield.model'; +import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; +import { MetadataField } from '../../../core/metadata/metadata-field.model'; class NullAction extends MetadataRegistryEditSchemaAction { type = null; diff --git a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.reducers.ts b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.reducers.ts index d20e3d5bcc7e46b3002cc9e6f6987789d980af1d..e805c8b8fc4a1f5fd8c3b2c9d251cd88bab11629 100644 --- a/src/app/+admin/admin-registries/metadata-registry/metadata-registry.reducers.ts +++ b/src/app/+admin/admin-registries/metadata-registry/metadata-registry.reducers.ts @@ -1,4 +1,3 @@ -import { MetadataSchema } from '../../../core/metadata/metadataschema.model'; import { MetadataRegistryAction, MetadataRegistryActionTypes, @@ -9,7 +8,8 @@ import { MetadataRegistrySelectFieldAction, MetadataRegistrySelectSchemaAction } from './metadata-registry.actions'; -import { MetadataField } from '../../../core/metadata/metadatafield.model'; +import { MetadataField } from '../../../core/metadata/metadata-field.model'; +import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; /** * The metadata registry state. diff --git a/src/app/+admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.spec.ts b/src/app/+admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.spec.ts index 42b6d1f1332a399540d57ddcb12b76d0b3e86e2d..fb76035d4b5349e69bc06a7293549a30b7ad4f01 100644 --- a/src/app/+admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.spec.ts +++ b/src/app/+admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.spec.ts @@ -10,7 +10,7 @@ import { EnumKeysPipe } from '../../../../shared/utils/enum-keys-pipe'; import { RegistryService } from '../../../../core/registry/registry.service'; import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service'; import { of as observableOf } from 'rxjs/internal/observable/of'; -import { MetadataSchema } from '../../../../core/metadata/metadataschema.model'; +import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; describe('MetadataSchemaFormComponent', () => { let component: MetadataSchemaFormComponent; diff --git a/src/app/+admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts b/src/app/+admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts index 23a5765058ae5c1d602cdaa4988902a11b523053..23e7309a00d3a95a4baa6b221a1dd71c5119fae5 100644 --- a/src/app/+admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts +++ b/src/app/+admin/admin-registries/metadata-registry/metadata-schema-form/metadata-schema-form.component.ts @@ -9,9 +9,9 @@ import { FormGroup } from '@angular/forms'; import { RegistryService } from '../../../../core/registry/registry.service'; import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service'; import { take } from 'rxjs/operators'; -import { MetadataSchema } from '../../../../core/metadata/metadataschema.model'; import { TranslateService } from '@ngx-translate/core'; import { combineLatest } from 'rxjs/internal/observable/combineLatest'; +import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; @Component({ selector: 'ds-metadata-schema-form', diff --git a/src/app/+admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.spec.ts b/src/app/+admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.spec.ts index c6402c1f3b2219a38db310e90bccd233463aff47..3c4f858c5584fd594f976b9c0f61b7c410ea6e49 100644 --- a/src/app/+admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.spec.ts +++ b/src/app/+admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.spec.ts @@ -3,7 +3,6 @@ import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing' import { MetadataFieldFormComponent } from './metadata-field-form.component'; import { RegistryService } from '../../../../core/registry/registry.service'; import { of as observableOf } from 'rxjs/internal/observable/of'; -import { MetadataField } from '../../../../core/metadata/metadatafield.model'; import { CommonModule } from '@angular/common'; import { RouterTestingModule } from '@angular/router/testing'; import { TranslateModule } from '@ngx-translate/core'; @@ -11,7 +10,8 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { EnumKeysPipe } from '../../../../shared/utils/enum-keys-pipe'; import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service'; import { NO_ERRORS_SCHEMA } from '@angular/core'; -import { MetadataSchema } from '../../../../core/metadata/metadataschema.model'; +import { MetadataField } from '../../../../core/metadata/metadata-field.model'; +import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; describe('MetadataFieldFormComponent', () => { let component: MetadataFieldFormComponent; diff --git a/src/app/+admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts b/src/app/+admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts index 2da2b45021a477aa2b61f31ddcf7c42882e6093f..0811530343979729e2c9f7c3e74d2dbaf308c23c 100644 --- a/src/app/+admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts +++ b/src/app/+admin/admin-registries/metadata-schema/metadata-field-form/metadata-field-form.component.ts @@ -1,5 +1,4 @@ import { Component, EventEmitter, Input, OnDestroy, OnInit, Output } from '@angular/core'; -import { MetadataSchema } from '../../../../core/metadata/metadataschema.model'; import { DynamicFormControlModel, DynamicFormLayout, @@ -8,10 +7,11 @@ import { import { FormGroup } from '@angular/forms'; import { RegistryService } from '../../../../core/registry/registry.service'; import { FormBuilderService } from '../../../../shared/form/builder/form-builder.service'; -import { MetadataField } from '../../../../core/metadata/metadatafield.model'; import { take } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; import { combineLatest } from 'rxjs/internal/observable/combineLatest'; +import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; +import { MetadataField } from '../../../../core/metadata/metadata-field.model'; @Component({ selector: 'ds-metadata-field-form', diff --git a/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts b/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts index 674798848b0c13c002c528e246fc3a3072a7c424..e23a9691c47c401ec4ac6190691ccf08a5e58d88 100644 --- a/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts +++ b/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.spec.ts @@ -3,7 +3,6 @@ import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing' import { of as observableOf } from 'rxjs'; import { RemoteData } from '../../../core/data/remote-data'; import { PaginatedList } from '../../../core/data/paginated-list'; -import { MetadataSchema } from '../../../core/metadata/metadataschema.model'; import { TranslateModule } from '@ngx-translate/core'; import { CommonModule } from '@angular/common'; import { ActivatedRoute, Router } from '@angular/router'; @@ -21,6 +20,8 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub'; import { RestResponse } from '../../../core/cache/response.models'; +import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; +import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils'; describe('MetadataSchemaComponent', () => { let comp: MetadataSchemaComponent; @@ -74,12 +75,12 @@ describe('MetadataSchemaComponent', () => { schema: mockSchemasList[1] } ]; - const mockSchemas = observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockSchemasList))); + const mockSchemas = createSuccessfulRemoteDataObject$(new PaginatedList(null, mockSchemasList)); /* tslint:disable:no-empty */ const registryServiceStub = { getMetadataSchemas: () => mockSchemas, - getMetadataFieldsBySchema: (schema: MetadataSchema) => observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(null, mockFieldsList.filter((value) => value.schema === schema)))), - getMetadataSchemaByName: (schemaName: string) => observableOf(new RemoteData(false, false, true, undefined, mockSchemasList.filter((value) => value.prefix === schemaName)[0])), + getMetadataFieldsBySchema: (schema: MetadataSchema) => createSuccessfulRemoteDataObject$(new PaginatedList(null, mockFieldsList.filter((value) => value.schema === schema))), + getMetadataSchemaByName: (schemaName: string) => createSuccessfulRemoteDataObject$(mockSchemasList.filter((value) => value.prefix === schemaName)[0]), getActiveMetadataField: () => observableOf(undefined), getSelectedMetadataFields: () => observableOf([]), editMetadataField: (schema) => {}, diff --git a/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts b/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts index bdc7d5ed270ef8eaefe07497f90bbeb7f2b71bd5..2974c1c08787559bd253c094e0be420e071e7d69 100644 --- a/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts +++ b/src/app/+admin/admin-registries/metadata-schema/metadata-schema.component.ts @@ -4,8 +4,6 @@ import { ActivatedRoute, Router } from '@angular/router'; import { Observable, combineLatest as observableCombineLatest } from 'rxjs'; import { RemoteData } from '../../../core/data/remote-data'; import { PaginatedList } from '../../../core/data/paginated-list'; -import { MetadataField } from '../../../core/metadata/metadatafield.model'; -import { MetadataSchema } from '../../../core/metadata/metadataschema.model'; import { PaginationComponentOptions } from '../../../shared/pagination/pagination-component-options.model'; import { map, take } from 'rxjs/operators'; import { hasValue } from '../../../shared/empty.util'; @@ -13,6 +11,8 @@ import { RestResponse } from '../../../core/cache/response.models'; import { zip } from 'rxjs/internal/observable/zip'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { TranslateService } from '@ngx-translate/core'; +import { MetadataField } from '../../../core/metadata/metadata-field.model'; +import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; @Component({ selector: 'ds-metadata-schema', diff --git a/src/app/+browse-by/+browse-by-date-page/browse-by-date-page.component.spec.ts b/src/app/+browse-by/+browse-by-date-page/browse-by-date-page.component.spec.ts index ccf7cde67bc1089cbf1fa08c20f8af20f4e068f7..78f5d52511ca6884900b2a64a6eaa1399431cf24 100644 --- a/src/app/+browse-by/+browse-by-date-page/browse-by-date-page.component.spec.ts +++ b/src/app/+browse-by/+browse-by-date-page/browse-by-date-page.component.spec.ts @@ -18,6 +18,7 @@ import { Item } from '../../core/shared/item.model'; import { ENV_CONFIG, GLOBAL_CONFIG } from '../../../config'; import { BrowseEntrySearchOptions } from '../../core/browse/browse-entry-search-options.model'; import { toRemoteData } from '../+browse-by-metadata-page/browse-by-metadata-page.component.spec'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; describe('BrowseByDatePageComponent', () => { let comp: BrowseByDatePageComponent; @@ -48,11 +49,11 @@ describe('BrowseByDatePageComponent', () => { const mockBrowseService = { getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData([]), getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData([firstItem]), - getFirstItemFor: () => observableOf(new RemoteData(false, false, true, undefined, firstItem)) + getFirstItemFor: () => createSuccessfulRemoteDataObject$(firstItem) }; const mockDsoService = { - findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity)) + findById: () => createSuccessfulRemoteDataObject$(mockCommunity) }; const activatedRouteStub = Object.assign(new ActivatedRouteStub(), { diff --git a/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.spec.ts b/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.spec.ts index 98d72999841060512814e628704ac6fea8003efd..927effd30308d3659b91b5750e92d37685ec08b4 100644 --- a/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.spec.ts +++ b/src/app/+browse-by/+browse-by-metadata-page/browse-by-metadata-page.component.spec.ts @@ -20,6 +20,9 @@ import { Item } from '../../core/shared/item.model'; import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service'; import { Community } from '../../core/shared/community.model'; import { MockRouter } from '../../shared/mocks/mock-router'; +import { ResourceType } from '../../core/shared/resource-type'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; +import { BrowseEntry } from '../../core/shared/browse-entry.model'; describe('BrowseByMetadataPageComponent', () => { let comp: BrowseByMetadataPageComponent; @@ -39,21 +42,21 @@ describe('BrowseByMetadataPageComponent', () => { const mockEntries = [ { - type: 'author', + type: BrowseEntry.type, authority: null, value: 'John Doe', language: 'en', count: 1 }, { - type: 'author', + type: BrowseEntry.type, authority: null, value: 'James Doe', language: 'en', count: 3 }, { - type: 'subject', + type: BrowseEntry.type, authority: null, value: 'Fake subject', language: 'en', @@ -68,12 +71,12 @@ describe('BrowseByMetadataPageComponent', () => { ]; const mockBrowseService = { - getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData(mockEntries.filter((entry) => entry.type === options.metadataDefinition)), + getBrowseEntriesFor: (options: BrowseEntrySearchOptions) => toRemoteData(mockEntries), getBrowseItemsFor: (value: string, options: BrowseEntrySearchOptions) => toRemoteData(mockItems) }; const mockDsoService = { - findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity)) + findById: () => createSuccessfulRemoteDataObject$(mockCommunity) }; const activatedRouteStub = Object.assign(new ActivatedRouteStub(), { @@ -105,12 +108,6 @@ describe('BrowseByMetadataPageComponent', () => { fixture.detectChanges(); }); - it('should fetch the correct entries depending on the metadata definition', () => { - comp.browseEntries$.subscribe((result) => { - expect(result.payload.page).toEqual(mockEntries.filter((entry) => entry.type === 'author')); - }); - }); - it('should not fetch any items when no value is provided', () => { expect(comp.items$).toBeUndefined(); }); @@ -160,5 +157,5 @@ describe('BrowseByMetadataPageComponent', () => { }); export function toRemoteData(objects: any[]): Observable<RemoteData<PaginatedList<any>>> { - return observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), objects))); + return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), objects)); } diff --git a/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.spec.ts b/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.spec.ts index 855101bb9d6d45c1224c21bfd41b8de6002cc946..3bc69e5fcbdabae4531feca030437c524a279392 100644 --- a/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.spec.ts +++ b/src/app/+browse-by/+browse-by-title-page/browse-by-title-page.component.spec.ts @@ -17,6 +17,7 @@ import { RemoteData } from '../../core/data/remote-data'; import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service'; import { BrowseService } from '../../core/browse/browse.service'; import { MockRouter } from '../../shared/mocks/mock-router'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; describe('BrowseByTitlePageComponent', () => { let comp: BrowseByTitlePageComponent; @@ -52,7 +53,7 @@ describe('BrowseByTitlePageComponent', () => { }; const mockDsoService = { - findById: () => observableOf(new RemoteData(false, false, true, null, mockCommunity)) + findById: () => createSuccessfulRemoteDataObject$(mockCommunity) }; const activatedRouteStub = Object.assign(new ActivatedRouteStub(), { diff --git a/src/app/+collection-page/collection-form/collection-form.component.ts b/src/app/+collection-page/collection-form/collection-form.component.ts index 22f2f1271d21886fbabdfc68464e6ef219ef3a0b..21b494f41f1a5c196bafe1a383d30c995ef9b54f 100644 --- a/src/app/+collection-page/collection-form/collection-form.component.ts +++ b/src/app/+collection-page/collection-form/collection-form.component.ts @@ -1,12 +1,9 @@ import { Component, Input } from '@angular/core'; -import { - DynamicInputModel, - DynamicTextAreaModel -} from '@ng-dynamic-forms/core'; +import { DynamicInputModel, DynamicTextAreaModel } from '@ng-dynamic-forms/core'; import { DynamicFormControlModel } from '@ng-dynamic-forms/core/src/model/dynamic-form-control.model'; -import { ResourceType } from '../../core/shared/resource-type'; import { Collection } from '../../core/shared/collection.model'; import { ComColFormComponent } from '../../shared/comcol-forms/comcol-form/comcol-form.component'; +import { NormalizedCollection } from '../../core/cache/models/normalized-collection.model'; /** * Form used for creating and editing collections @@ -23,9 +20,9 @@ export class CollectionFormComponent extends ComColFormComponent<Collection> { @Input() dso: Collection = new Collection(); /** - * @type {ResourceType.Collection} This is a collection-type form + * @type {Collection.type} This is a collection-type form */ - protected type = ResourceType.Collection; + protected type = Collection.type; /** * The dynamic form fields used for creating/editing a collection diff --git a/src/app/+collection-page/create-collection-page/create-collection-page.guard.spec.ts b/src/app/+collection-page/create-collection-page/create-collection-page.guard.spec.ts index 5d21ae36b3ed74bb8faa65093d7d0fc9ad0bb624..a5618d76ed515972e0ef21b2e3499956c51f76ec 100644 --- a/src/app/+collection-page/create-collection-page/create-collection-page.guard.spec.ts +++ b/src/app/+collection-page/create-collection-page/create-collection-page.guard.spec.ts @@ -1,9 +1,11 @@ import { CreateCollectionPageGuard } from './create-collection-page.guard'; import { MockRouter } from '../../shared/mocks/mock-router'; -import { RemoteData } from '../../core/data/remote-data'; import { Community } from '../../core/shared/community.model'; -import { of as observableOf } from 'rxjs'; import { first } from 'rxjs/operators'; +import { + createFailedRemoteDataObject$, + createSuccessfulRemoteDataObject$ +} from '../../shared/testing/utils'; describe('CreateCollectionPageGuard', () => { describe('canActivate', () => { @@ -15,11 +17,11 @@ describe('CreateCollectionPageGuard', () => { communityDataServiceStub = { findById: (id: string) => { if (id === 'valid-id') { - return observableOf(new RemoteData(false, false, true, null, new Community())); + return createSuccessfulRemoteDataObject$(new Community()); } else if (id === 'invalid-id') { - return observableOf(new RemoteData(false, false, true, null, undefined)); + return createSuccessfulRemoteDataObject$(undefined); } else if (id === 'error-id') { - return observableOf(new RemoteData(false, false, false, null, new Community())); + return createFailedRemoteDataObject$(new Community()); } } }; diff --git a/src/app/+community-page/community-form/community-form.component.ts b/src/app/+community-page/community-form/community-form.component.ts index 9ae6f0955ddca4bd75eae2e6067110e16c6a149f..17d601e251ef1f45f940ebf194930fc807e5880a 100644 --- a/src/app/+community-page/community-form/community-form.component.ts +++ b/src/app/+community-page/community-form/community-form.component.ts @@ -20,9 +20,9 @@ export class CommunityFormComponent extends ComColFormComponent<Community> { @Input() dso: Community = new Community(); /** - * @type {ResourceType.Community} This is a community-type form + * @type {Community.type} This is a community-type form */ - protected type = ResourceType.Community; + protected type = Community.type; /** * The dynamic form fields used for creating/editing a community diff --git a/src/app/+community-page/create-community-page/create-community-page.guard.spec.ts b/src/app/+community-page/create-community-page/create-community-page.guard.spec.ts index 0cc7232871ded5d4331df9aba3193140233bc6b1..c246f5e68968771c086afe3624f22e30dd01f6f9 100644 --- a/src/app/+community-page/create-community-page/create-community-page.guard.spec.ts +++ b/src/app/+community-page/create-community-page/create-community-page.guard.spec.ts @@ -1,9 +1,11 @@ import { CreateCommunityPageGuard } from './create-community-page.guard'; import { MockRouter } from '../../shared/mocks/mock-router'; -import { RemoteData } from '../../core/data/remote-data'; import { Community } from '../../core/shared/community.model'; -import { of as observableOf } from 'rxjs'; import { first } from 'rxjs/operators'; +import { + createFailedRemoteDataObject$, + createSuccessfulRemoteDataObject$ +} from '../../shared/testing/utils'; describe('CreateCommunityPageGuard', () => { describe('canActivate', () => { @@ -15,11 +17,11 @@ describe('CreateCommunityPageGuard', () => { communityDataServiceStub = { findById: (id: string) => { if (id === 'valid-id') { - return observableOf(new RemoteData(false, false, true, null, new Community())); + return createSuccessfulRemoteDataObject$(new Community()); } else if (id === 'invalid-id') { - return observableOf(new RemoteData(false, false, true, null, undefined)); + return createSuccessfulRemoteDataObject$(undefined); } else if (id === 'error-id') { - return observableOf(new RemoteData(false, false, false, null, new Community())); + return createFailedRemoteDataObject$(new Community()); } } }; diff --git a/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.spec.ts b/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.spec.ts index 3e6190ae6d2d87dea8aa6a6bff4f87bc035f907f..2feaa3afa6286e36f53a735fdd220a8e440cc01c 100644 --- a/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.spec.ts +++ b/src/app/+community-page/sub-community-list/community-page-sub-community-list.component.spec.ts @@ -11,6 +11,7 @@ import {RouterTestingModule} from '@angular/router/testing'; import {NoopAnimationsModule} from '@angular/platform-browser/animations'; import {By} from '@angular/platform-browser'; import {of as observableOf, Observable } from 'rxjs'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; describe('SubCommunityList Component', () => { let comp: CommunityPageSubCommunityListComponent; @@ -40,8 +41,7 @@ describe('SubCommunityList Component', () => { { language: 'en_US', value: 'Test title' } ] }, - subcommunities: observableOf(new RemoteData(true, true, true, - undefined, new PaginatedList(new PageInfo(), []))) + subcommunities: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])) }); const mockCommunity = Object.assign(new Community(), { @@ -50,8 +50,7 @@ describe('SubCommunityList Component', () => { { language: 'en_US', value: 'Test title' } ] }, - subcommunities: observableOf(new RemoteData(true, true, true, - undefined, new PaginatedList(new PageInfo(), subcommunities))) + subcommunities: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), subcommunities)) }) ; diff --git a/src/app/+item-page/edit-item-page/edit-item-operators.spec.ts b/src/app/+item-page/edit-item-page/edit-item-operators.spec.ts index 8086a62b8fce1286bb310d08c164880b5ec01f59..ec087e3b1ce21042b925b04bd30c57a018abe247 100644 --- a/src/app/+item-page/edit-item-page/edit-item-operators.spec.ts +++ b/src/app/+item-page/edit-item-page/edit-item-operators.spec.ts @@ -2,6 +2,10 @@ import {RemoteData} from '../../core/data/remote-data'; import {hot} from 'jasmine-marbles'; import {Item} from '../../core/shared/item.model'; import {findSuccessfulAccordingTo} from './edit-item-operators'; +import { + createFailedRemoteDataObject, + createSuccessfulRemoteDataObject +} from '../../shared/testing/utils'; describe('findSuccessfulAccordingTo', () => { let mockItem1; @@ -19,11 +23,11 @@ describe('findSuccessfulAccordingTo', () => { }); it('should return first successful RemoteData Observable that complies to predicate', () => { const testRD = { - a: new RemoteData(false, false, true, null, undefined), - b: new RemoteData(false, false, false, null, mockItem1), - c: new RemoteData(false, false, true, null, mockItem2), - d: new RemoteData(false, false, true, null, mockItem1), - e: new RemoteData(false, false, true, null, mockItem2), + a: createSuccessfulRemoteDataObject(undefined), + b: createFailedRemoteDataObject(mockItem1), + c: createSuccessfulRemoteDataObject(mockItem2), + d: createSuccessfulRemoteDataObject(mockItem1), + e: createSuccessfulRemoteDataObject(mockItem2), }; const source = hot('abcde', testRD); diff --git a/src/app/+item-page/edit-item-page/item-delete/item-delete.component.spec.ts b/src/app/+item-page/edit-item-page/item-delete/item-delete.component.spec.ts index 6d435c8de826b484569193977a10e7719bbabafe..82d03f1f1bd2648333458bd4e5d7046fb710b267 100644 --- a/src/app/+item-page/edit-item-page/item-delete/item-delete.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-delete/item-delete.component.spec.ts @@ -17,6 +17,7 @@ import { By } from '@angular/platform-browser'; import { ItemDeleteComponent } from './item-delete.component'; import { getItemEditPath } from '../../item-page-routing.module'; import { RestResponse } from '../../../core/cache/response.models'; +import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils'; let comp: ItemDeleteComponent; let fixture: ComponentFixture<ItemDeleteComponent>; @@ -49,7 +50,7 @@ describe('ItemDeleteComponent', () => { routeStub = { data: observableOf({ - item: new RemoteData(false, false, true, null, mockItem) + item: createSuccessfulRemoteDataObject(mockItem) }) }; diff --git a/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.spec.ts b/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.spec.ts index 09363b9964a5310f71875cf2aa58159b2efc604f..b8d122d4f6c9c209130cf750504dd768980f717f 100644 --- a/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.spec.ts @@ -6,17 +6,18 @@ import { ObjectUpdatesService } from '../../../../core/data/object-updates/objec import { of as observableOf } from 'rxjs'; import { RemoteData } from '../../../../core/data/remote-data'; import { PaginatedList } from '../../../../core/data/paginated-list'; -import { MetadataField } from '../../../../core/metadata/metadatafield.model'; import { By } from '@angular/platform-browser'; import { FormsModule } from '@angular/forms'; import { SharedModule } from '../../../../shared/shared.module'; import { getTestScheduler } from 'jasmine-marbles'; import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model'; import { TestScheduler } from 'rxjs/testing'; -import { MetadataSchema } from '../../../../core/metadata/metadataschema.model'; import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions'; import { TranslateModule } from '@ngx-translate/core'; import { MetadatumViewModel } from '../../../../core/shared/metadata.models'; +import { MetadataSchema } from '../../../../core/metadata/metadata-schema.model'; +import { MetadataField } from '../../../../core/metadata/metadata-field.model'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; let comp: EditInPlaceFieldComponent; let fixture: ComponentFixture<EditInPlaceFieldComponent>; @@ -59,7 +60,7 @@ describe('EditInPlaceFieldComponent', () => { paginatedMetadataFields = new PaginatedList(undefined, [mdField1, mdField2, mdField3]); metadataFieldService = jasmine.createSpyObj({ - queryMetadataFields: observableOf(new RemoteData(false, false, true, undefined, paginatedMetadataFields)), + queryMetadataFields: createSuccessfulRemoteDataObject$(paginatedMetadataFields), }); objectUpdatesService = jasmine.createSpyObj('objectUpdatesService', { diff --git a/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts b/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts index 0b9bc62c55a8cfbb410b7ec93152a601fcb1c6cf..1722cde8bc2602ffb1d93f6d690f983d7167a60e 100644 --- a/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts +++ b/src/app/+item-page/edit-item-page/item-metadata/edit-in-place-field/edit-in-place-field.component.ts @@ -4,13 +4,13 @@ import { RegistryService } from '../../../../core/registry/registry.service'; import { cloneDeep } from 'lodash'; import { BehaviorSubject, Observable, of as observableOf } from 'rxjs'; import { map, take } from 'rxjs/operators'; -import { MetadataField } from '../../../../core/metadata/metadatafield.model'; import { InputSuggestion } from '../../../../shared/input-suggestions/input-suggestions.model'; import { FieldChangeType } from '../../../../core/data/object-updates/object-updates.actions'; import { FieldUpdate } from '../../../../core/data/object-updates/object-updates.reducer'; import { ObjectUpdatesService } from '../../../../core/data/object-updates/object-updates.service'; import { NgModel } from '@angular/forms'; import { MetadatumViewModel } from '../../../../core/shared/metadata.models'; +import { MetadataField } from '../../../../core/metadata/metadata-field.model'; @Component({ // tslint:disable-next-line:component-selector diff --git a/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.spec.ts b/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.spec.ts index f2cd74fc2feaa069366d66f9de233a072da0525c..e51182e7b3046658ed494bb07524efe1fd54de3e 100644 --- a/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.spec.ts @@ -20,13 +20,16 @@ import { RouterStub } from '../../../shared/testing/router-stub'; import { GLOBAL_CONFIG } from '../../../../config'; import { Item } from '../../../core/shared/item.model'; import { FieldChangeType } from '../../../core/data/object-updates/object-updates.actions'; -import { RemoteData } from '../../../core/data/remote-data'; import { MetadatumViewModel } from '../../../core/shared/metadata.models'; import { RegistryService } from '../../../core/registry/registry.service'; import { PaginatedList } from '../../../core/data/paginated-list'; -import { MetadataSchema } from '../../../core/metadata/metadataschema.model'; -import { MetadataField } from '../../../core/metadata/metadatafield.model'; import { Metadata } from '../../../core/shared/metadata.utils'; +import { MetadataSchema } from '../../../core/metadata/metadata-schema.model'; +import { MetadataField } from '../../../core/metadata/metadata-field.model'; +import { + createSuccessfulRemoteDataObject, + createSuccessfulRemoteDataObject$ +} from '../../../shared/testing/utils'; let comp: ItemMetadataComponent; let fixture: ComponentFixture<ItemMetadataComponent>; @@ -116,18 +119,18 @@ describe('ItemMetadataComponent', () => { ) ; itemService = jasmine.createSpyObj('itemService', { - update: observableOf(new RemoteData(false, false, true, undefined, item)), + update: createSuccessfulRemoteDataObject$(item), commitUpdates: {} }); routeStub = { parent: { - data: observableOf({ item: new RemoteData(false, false, true, null, item) }) + data: observableOf({ item: createSuccessfulRemoteDataObject(item) }) } }; paginatedMetadataFields = new PaginatedList(undefined, [mdField1, mdField2, mdField3]); metadataFieldService = jasmine.createSpyObj({ - getAllMetadataFields: observableOf(new RemoteData(false, false, true, undefined, paginatedMetadataFields)) + getAllMetadataFields:createSuccessfulRemoteDataObject$(paginatedMetadataFields) }); scheduler = getTestScheduler(); objectUpdatesService = jasmine.createSpyObj('objectUpdatesService', diff --git a/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts b/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts index 6b3e05c818bfa6a795cac2c7543c7d9ca611f3f6..8148b89bd4cbccc2b5156040c7ef104fe9e0eff6 100644 --- a/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts +++ b/src/app/+item-page/edit-item-page/item-metadata/item-metadata.component.ts @@ -17,9 +17,9 @@ import { NotificationsService } from '../../../shared/notifications/notification import { GLOBAL_CONFIG, GlobalConfig } from '../../../../config'; import { TranslateService } from '@ngx-translate/core'; import { RegistryService } from '../../../core/registry/registry.service'; -import { MetadataField } from '../../../core/metadata/metadatafield.model'; import { MetadatumViewModel } from '../../../core/shared/metadata.models'; import { Metadata } from '../../../core/shared/metadata.utils'; +import { MetadataField } from '../../../core/metadata/metadata-field.model'; @Component({ selector: 'ds-item-metadata', diff --git a/src/app/+item-page/edit-item-page/item-private/item-private.component.spec.ts b/src/app/+item-page/edit-item-page/item-private/item-private.component.spec.ts index 651bebde58751a72aa165fa8570d5f51a7abb638..827a4bb55ad27f532e7c9c4fd5050eca37342f9e 100644 --- a/src/app/+item-page/edit-item-page/item-private/item-private.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-private/item-private.component.spec.ts @@ -16,6 +16,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { By } from '@angular/platform-browser'; import { ItemPrivateComponent } from './item-private.component'; import { RestResponse } from '../../../core/cache/response.models'; +import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils'; let comp: ItemPrivateComponent; let fixture: ComponentFixture<ItemPrivateComponent>; @@ -50,7 +51,7 @@ describe('ItemPrivateComponent', () => { routeStub = { data: observableOf({ - item: new RemoteData(false, false, true, null, { + item: createSuccessfulRemoteDataObject({ id: 'fake-id' }) }) diff --git a/src/app/+item-page/edit-item-page/item-public/item-public.component.spec.ts b/src/app/+item-page/edit-item-page/item-public/item-public.component.spec.ts index 7516a842658f88ee447ec9354e4de79faa9218a3..9cd75088684e038b6605ab48c3aa4f11c57e158e 100644 --- a/src/app/+item-page/edit-item-page/item-public/item-public.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-public/item-public.component.spec.ts @@ -16,6 +16,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { By } from '@angular/platform-browser'; import { ItemPublicComponent } from './item-public.component'; import { RestResponse } from '../../../core/cache/response.models'; +import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils'; let comp: ItemPublicComponent; let fixture: ComponentFixture<ItemPublicComponent>; @@ -50,7 +51,7 @@ describe('ItemPublicComponent', () => { routeStub = { data: observableOf({ - item: new RemoteData(false, false, true, null, { + item: createSuccessfulRemoteDataObject({ id: 'fake-id' }) }) diff --git a/src/app/+item-page/edit-item-page/item-reinstate/item-reinstate.component.spec.ts b/src/app/+item-page/edit-item-page/item-reinstate/item-reinstate.component.spec.ts index f606fb4a83a29b7f9ee55e61467ef0a89a0bf533..8dfc403bd36fd9440a26fe4f846a84e97ac9b60a 100644 --- a/src/app/+item-page/edit-item-page/item-reinstate/item-reinstate.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-reinstate/item-reinstate.component.spec.ts @@ -16,6 +16,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { By } from '@angular/platform-browser'; import { ItemReinstateComponent } from './item-reinstate.component'; import { RestResponse } from '../../../core/cache/response.models'; +import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils'; let comp: ItemReinstateComponent; let fixture: ComponentFixture<ItemReinstateComponent>; @@ -50,7 +51,7 @@ describe('ItemReinstateComponent', () => { routeStub = { data: observableOf({ - item: new RemoteData(false, false, true, null, { + item: createSuccessfulRemoteDataObject({ id: 'fake-id' }) }) diff --git a/src/app/+item-page/edit-item-page/item-status/item-status.component.html b/src/app/+item-page/edit-item-page/item-status/item-status.component.html index e60fa0490d2de536d2d48e703bd518ade8bee48a..83662c9d7c192720f54c199612b518fb7626ccae 100644 --- a/src/app/+item-page/edit-item-page/item-status/item-status.component.html +++ b/src/app/+item-page/edit-item-page/item-status/item-status.component.html @@ -12,7 +12,7 @@ {{'item.edit.tabs.status.labels.itemPage' | translate}}: </div> <div class="col-9 float-left status-data" id="status-itemPage"> - <a href="{{getItemPage((itemRD$ | async)?.payload)}}">{{getItemPage((itemRD$ | async)?.payload)}}</a> + <a [routerLink]="getItemPage((itemRD$ | async)?.payload)">{{getItemPage((itemRD$ | async)?.payload)}}</a> </div> <div *ngFor="let operation of operations" class="w-100 pt-3"> diff --git a/src/app/+item-page/edit-item-page/item-status/item-status.component.spec.ts b/src/app/+item-page/edit-item-page/item-status/item-status.component.spec.ts index 00ea9b9f62c3917e912053c237030fd4d4a78b07..30f326bec4a573dd9d5196b3c7d91ecc04f8cf83 100644 --- a/src/app/+item-page/edit-item-page/item-status/item-status.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-status/item-status.component.spec.ts @@ -11,7 +11,7 @@ import { Item } from '../../../core/shared/item.model'; import { By } from '@angular/platform-browser'; import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { of as observableOf } from 'rxjs'; -import { RemoteData } from '../../../core/data/remote-data'; +import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils'; describe('ItemStatusComponent', () => { let comp: ItemStatusComponent; @@ -27,7 +27,7 @@ describe('ItemStatusComponent', () => { const routeStub = { parent: { - data: observableOf({ item: new RemoteData(false, false, true, null, mockItem) }) + data: observableOf({ item: createSuccessfulRemoteDataObject(mockItem) }) } }; diff --git a/src/app/+item-page/edit-item-page/item-withdraw/item-withdraw.component.spec.ts b/src/app/+item-page/edit-item-page/item-withdraw/item-withdraw.component.spec.ts index ac49eee7e725dd6ff5bca90c0262a9594183d6c6..4c23a1d1e5ab312caaddcdc39f1edb49271f0201 100644 --- a/src/app/+item-page/edit-item-page/item-withdraw/item-withdraw.component.spec.ts +++ b/src/app/+item-page/edit-item-page/item-withdraw/item-withdraw.component.spec.ts @@ -16,6 +16,7 @@ import { CUSTOM_ELEMENTS_SCHEMA } from '@angular/core'; import { ItemWithdrawComponent } from './item-withdraw.component'; import { By } from '@angular/platform-browser'; import { RestResponse } from '../../../core/cache/response.models'; +import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils'; let comp: ItemWithdrawComponent; let fixture: ComponentFixture<ItemWithdrawComponent>; @@ -50,7 +51,7 @@ describe('ItemWithdrawComponent', () => { routeStub = { data: observableOf({ - item: new RemoteData(false, false, true, null, { + item: createSuccessfulRemoteDataObject({ id: 'fake-id' }) }) diff --git a/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts b/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts index 32acdef46794d5d581699e6deb77ecec86ca511a..e4413e47c607c1ecd3d1170ee1ef62755bc9c09f 100644 --- a/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts +++ b/src/app/+item-page/edit-item-page/simple-item-action/abstract-simple-item-action.component.spec.ts @@ -17,6 +17,10 @@ import { By } from '@angular/platform-browser'; import { of as observableOf } from 'rxjs'; import { getItemEditPath } from '../../item-page-routing.module'; import { RestResponse } from '../../../core/cache/response.models'; +import { + createSuccessfulRemoteDataObject, + createSuccessfulRemoteDataObject$ +} from '../../../shared/testing/utils'; /** * Test component that implements the AbstractSimpleItemActionComponent used to test the @@ -65,12 +69,12 @@ describe('AbstractSimpleItemActionComponent', () => { }); mockItemDataService = jasmine.createSpyObj({ - findById: observableOf(new RemoteData(false, false, true, undefined, mockItem)) + findById: createSuccessfulRemoteDataObject$(mockItem) }); routeStub = { data: observableOf({ - item: new RemoteData(false, false, true, null, { + item: createSuccessfulRemoteDataObject({ id: 'fake-id' }) }) diff --git a/src/app/+item-page/field-components/collections/collections.component.spec.ts b/src/app/+item-page/field-components/collections/collections.component.spec.ts index 53fcded9e3e2d3454deae0cfa3f9b4dd259b9848..b53f4998811b078ca1e7f21a8a4a1d3e939294a2 100644 --- a/src/app/+item-page/field-components/collections/collections.component.spec.ts +++ b/src/app/+item-page/field-components/collections/collections.component.spec.ts @@ -9,6 +9,10 @@ import { Item } from '../../../core/shared/item.model'; import { of as observableOf } from 'rxjs'; import { RemoteData } from '../../../core/data/remote-data'; import { TranslateModule } from '@ngx-translate/core'; +import { + createFailedRemoteDataObject$, + createSuccessfulRemoteDataObject$ +} from '../../../shared/testing/utils'; let collectionsComponent: CollectionsComponent; let fixture: ComponentFixture<CollectionsComponent>; @@ -24,8 +28,8 @@ const mockCollection1: Collection = Object.assign(new Collection(), { } }); -const succeededMockItem: Item = Object.assign(new Item(), {owningCollection: observableOf(new RemoteData(false, false, true, null, mockCollection1))}); -const failedMockItem: Item = Object.assign(new Item(), {owningCollection: observableOf(new RemoteData(false, false, false, null, mockCollection1))}); +const succeededMockItem: Item = Object.assign(new Item(), {owningCollection: createSuccessfulRemoteDataObject$(mockCollection1)}); +const failedMockItem: Item = Object.assign(new Item(), {owningCollection: createFailedRemoteDataObject$(mockCollection1)}); describe('CollectionsComponent', () => { beforeEach(async(() => { diff --git a/src/app/+item-page/full/full-item-page.component.spec.ts b/src/app/+item-page/full/full-item-page.component.spec.ts index 15dd0019642d67ae7029499f775ca8b45dbe240f..2f151b4997e6c4e3d315f849b3b2937d1bc98148 100644 --- a/src/app/+item-page/full/full-item-page.component.spec.ts +++ b/src/app/+item-page/full/full-item-page.component.spec.ts @@ -17,9 +17,13 @@ import { RemoteData } from '../../core/data/remote-data'; import { of as observableOf } from 'rxjs'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { By } from '@angular/platform-browser'; +import { + createSuccessfulRemoteDataObject, + createSuccessfulRemoteDataObject$ +} from '../../shared/testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: { 'dc.title': [ { @@ -30,7 +34,7 @@ const mockItem: Item = Object.assign(new Item(), { } }); const routeStub = Object.assign(new ActivatedRouteStub(), { - data: observableOf({ item: new RemoteData(false, false, true, null, mockItem) }) + data: observableOf({ item: createSuccessfulRemoteDataObject(mockItem) }) }); const metadataServiceStub = { /* tslint:disable:no-empty */ diff --git a/src/app/+item-page/simple/field-components/specific-field/item-page-field.component.spec.ts b/src/app/+item-page/simple/field-components/specific-field/item-page-field.component.spec.ts index ea6e722c66853e9dfcd101fef5df2be68f7aee0c..1b7acb2e3b94d0707a2caff5fc77f733cca92ac0 100644 --- a/src/app/+item-page/simple/field-components/specific-field/item-page-field.component.spec.ts +++ b/src/app/+item-page/simple/field-components/specific-field/item-page-field.component.spec.ts @@ -11,6 +11,7 @@ import { ItemPageFieldComponent } from './item-page-field.component'; import { MetadataValuesComponent } from '../../../field-components/metadata-values/metadata-values.component'; import { of as observableOf } from 'rxjs'; import { MetadataMap, MetadataValue } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; let comp: ItemPageFieldComponent; let fixture: ComponentFixture<ItemPageFieldComponent>; @@ -52,7 +53,7 @@ describe('ItemPageFieldComponent', () => { export function mockItemWithMetadataFieldAndValue(field: string, value: string): Item { const item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: new MetadataMap() }); item.metadata[field] = [{ diff --git a/src/app/+item-page/simple/item-page.component.spec.ts b/src/app/+item-page/simple/item-page.component.spec.ts index e1202ab7256ee6588f587611f6996c0bc2530497..cd5c3856714fa021b3c3032bb70360019e3b31bd 100644 --- a/src/app/+item-page/simple/item-page.component.spec.ts +++ b/src/app/+item-page/simple/item-page.component.spec.ts @@ -16,9 +16,13 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { By } from '@angular/platform-browser'; import { createRelationshipsObservable } from './item-types/shared/item.component.spec'; import { of as observableOf } from 'rxjs'; +import { + createFailedRemoteDataObject$, createPendingRemoteDataObject$, createSuccessfulRemoteDataObject, + createSuccessfulRemoteDataObject$ +} from '../../shared/testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: [], relationships: createRelationshipsObservable() }); @@ -33,7 +37,7 @@ describe('ItemPageComponent', () => { /* tslint:enable:no-empty */ }; const mockRoute = Object.assign(new ActivatedRouteStub(), { - data: observableOf({ item: new RemoteData(false, false, true, null, mockItem) }) + data: observableOf({ item: createSuccessfulRemoteDataObject(mockItem) }) }); beforeEach(async(() => { @@ -66,7 +70,8 @@ describe('ItemPageComponent', () => { describe('when the item is loading', () => { beforeEach(() => { - comp.itemRD$ = observableOf(new RemoteData(true, true, true, null, undefined)); + comp.itemRD$ = createPendingRemoteDataObject$(undefined); + // comp.itemRD$ = observableOf(new RemoteData(true, true, true, null, undefined)); fixture.detectChanges(); }); @@ -78,7 +83,7 @@ describe('ItemPageComponent', () => { describe('when the item failed loading', () => { beforeEach(() => { - comp.itemRD$ = observableOf(new RemoteData(false, false, false, null, undefined)); + comp.itemRD$ = createFailedRemoteDataObject$(undefined); fixture.detectChanges(); }); diff --git a/src/app/+item-page/simple/item-types/publication/publication.component.spec.ts b/src/app/+item-page/simple/item-types/publication/publication.component.spec.ts index 48a7a05f459cbef454c0829ce5fd2e457c80aad0..eac23a9748ef3ef69e00f90860cb8325c4813832 100644 --- a/src/app/+item-page/simple/item-types/publication/publication.component.spec.ts +++ b/src/app/+item-page/simple/item-types/publication/publication.component.spec.ts @@ -17,9 +17,10 @@ import { createRelationshipsObservable } from '../shared/item.component.spec'; import { PublicationComponent } from './publication.component'; import { of as observableOf } from 'rxjs'; import { MetadataMap } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: new MetadataMap(), relationships: createRelationshipsObservable() }); diff --git a/src/app/+item-page/simple/item-types/shared/item.component.spec.ts b/src/app/+item-page/simple/item-types/shared/item.component.spec.ts index 12312656f693ae9e5c276227e0219716c7424f4b..3f525e6a25b9b03214a3a41346af8c402ab24ae0 100644 --- a/src/app/+item-page/simple/item-types/shared/item.component.spec.ts +++ b/src/app/+item-page/simple/item-types/shared/item.component.spec.ts @@ -26,6 +26,7 @@ import { MetadatumRepresentation } from '../../../../core/shared/metadata-repres import { ItemMetadataRepresentation } from '../../../../core/shared/metadata-representation/item/item-metadata-representation.model'; import { MetadataMap, MetadataValue } from '../../../../core/shared/metadata.models'; import { compareArraysUsing, compareArraysUsingIds } from './item-relationships-utils'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; /** * Create a generic test for an item-page-fields component using a mockItem and the type of component @@ -102,13 +103,13 @@ export function containsFieldInput(fields: DebugElement[], metadataKey: string): } export function createRelationshipsObservable() { - return observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), [ + return createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [ Object.assign(new Relationship(), { - relationshipType: observableOf(new RemoteData(false, false, true, null, new RelationshipType())), - leftItem: observableOf(new RemoteData(false, false, true, null, new Item())), - rightItem: observableOf(new RemoteData(false, false, true, null, new Item())) + relationshipType: createSuccessfulRemoteDataObject$(new RelationshipType()), + leftItem: createSuccessfulRemoteDataObject$(new Item()), + rightItem: createSuccessfulRemoteDataObject$(new Item()) }) - ]))); + ])); } describe('ItemComponent', () => { const arr1 = [ @@ -337,15 +338,15 @@ describe('ItemComponent', () => { uuid: '1', metadata: new MetadataMap() }); - mockItem.relationships = observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), [ + mockItem.relationships = createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [ Object.assign(new Relationship(), { uuid: '123', id: '123', - leftItem: observableOf(new RemoteData(false, false, true, null, mockItem)), - rightItem: observableOf(new RemoteData(false, false, true, null, relatedItem)), - relationshipType: observableOf(new RemoteData(false, false, true, null, new RelationshipType())) + leftItem: createSuccessfulRemoteDataObject$(mockItem), + rightItem: createSuccessfulRemoteDataObject$(relatedItem), + relationshipType: createSuccessfulRemoteDataObject$(new RelationshipType()) }) - ]))); + ])); mockItem.metadata[metadataField] = [ { value: 'Second value', @@ -369,7 +370,7 @@ describe('ItemComponent', () => { const mockItemDataService = Object.assign({ findById: (id) => { if (id === relatedItem.id) { - return observableOf(new RemoteData(false, false, true, null, relatedItem)) + return createSuccessfulRemoteDataObject$(relatedItem) } } }) as ItemDataService; diff --git a/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.html b/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.html index 9ec082db733d9eecd468b6d44b1a18d334e96202..c7e1f77264f13fb5969aa2858e9626d89a52932b 100644 --- a/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.html +++ b/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.html @@ -1,6 +1,6 @@ <ds-filtered-search-page [fixedFilterQuery]="fixedFilter" - [fixedFilter$]="fixedFilter$" + [configuration$]="configuration$" [searchEnabled]="searchEnabled" [sideBarWidth]="sideBarWidth"> </ds-filtered-search-page> diff --git a/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.spec.ts b/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.spec.ts index e76a9cf3d069325dd339de36e09748502c071fe5..711e1b9d3d974dd1c5ceba1c2213b8ebc64b4e18 100644 --- a/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.spec.ts +++ b/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.spec.ts @@ -47,9 +47,9 @@ describe('RelatedEntitiesSearchComponent', () => { expect(comp.fixedFilter).toEqual(mockFilter); }); - it('should create a fixedFilter$', () => { - comp.fixedFilter$.subscribe((fixedFilter) => { - expect(fixedFilter).toEqual(mockRelationEntityType); + it('should create a configuration$', () => { + comp.configuration$.subscribe((configuration) => { + expect(configuration).toEqual(mockRelationEntityType); }) }); diff --git a/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.ts b/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.ts index 672655a8b83adbcb82c4482981f10e7cd5f1a96e..4c0b127925b8e7d210dfe8de0a980d679344cdec 100644 --- a/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.ts +++ b/src/app/+item-page/simple/related-entities/related-entities-search/related-entities-search.component.ts @@ -47,7 +47,7 @@ export class RelatedEntitiesSearchComponent implements OnInit { @Input() sideBarWidth = 4; fixedFilter: string; - fixedFilter$: Observable<string>; + configuration$: Observable<string>; constructor(private fixedFilterService: SearchFixedFilterService) { } @@ -57,7 +57,7 @@ export class RelatedEntitiesSearchComponent implements OnInit { this.fixedFilter = this.fixedFilterService.getFilterByRelation(this.relationType, this.item.id); } if (isNotEmpty(this.relationEntityType)) { - this.fixedFilter$ = of(this.relationEntityType); + this.configuration$ = of(this.relationEntityType); } } diff --git a/src/app/+item-page/simple/related-items/related-items.component.spec.ts b/src/app/+item-page/simple/related-items/related-items.component.spec.ts index ef42ab1098482e8ece1cbbafda0d606a39763e92..1896f460157a79812e24d1f67f688d0694ef0c82 100644 --- a/src/app/+item-page/simple/related-items/related-items.component.spec.ts +++ b/src/app/+item-page/simple/related-items/related-items.component.spec.ts @@ -8,14 +8,15 @@ import { PageInfo } from '../../../core/shared/page-info.model'; import { By } from '@angular/platform-browser'; import { createRelationshipsObservable } from '../item-types/shared/item.component.spec'; import { of as observableOf } from 'rxjs'; +import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils'; const mockItem1: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: [], relationships: createRelationshipsObservable() }); const mockItem2: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: [], relationships: createRelationshipsObservable() }); diff --git a/src/app/+my-dspace-page/my-dspace-page.component.spec.ts b/src/app/+my-dspace-page/my-dspace-page.component.spec.ts index 9658814a6aca4b1bd2d67617325fe352bc385f72..34af21073fe5109f1f1d9690b02a74dbb60c63b6 100644 --- a/src/app/+my-dspace-page/my-dspace-page.component.spec.ts +++ b/src/app/+my-dspace-page/my-dspace-page.component.spec.ts @@ -29,6 +29,7 @@ import { RoleDirective } from '../shared/roles/role.directive'; import { RoleService } from '../core/roles/role.service'; import { MockRoleService } from '../shared/mocks/mock-role-service'; import { SearchFixedFilterService } from '../+search-page/search-filters/search-filter/search-fixed-filter.service'; +import { createSuccessfulRemoteDataObject$ } from '../shared/testing/utils'; describe('MyDSpacePageComponent', () => { let comp: MyDSpacePageComponent; @@ -46,7 +47,7 @@ describe('MyDSpacePageComponent', () => { pagination.currentPage = 1; pagination.pageSize = 10; const sort: SortOptions = new SortOptions('score', SortDirection.DESC); - const mockResults = observableOf(new RemoteData(false, false, true, null, ['test', 'data'])); + const mockResults = createSuccessfulRemoteDataObject$(['test', 'data']); const searchServiceStub = jasmine.createSpyObj('SearchService', { search: mockResults, getSearchLink: '/mydspace', diff --git a/src/app/+search-page/configuration-search-page.component.spec.ts b/src/app/+search-page/configuration-search-page.component.spec.ts new file mode 100644 index 0000000000000000000000000000000000000000..a18dd38f7851f203c54175de003f2f1bab9c7295 --- /dev/null +++ b/src/app/+search-page/configuration-search-page.component.spec.ts @@ -0,0 +1,21 @@ +import { async, ComponentFixture, TestBed } from '@angular/core/testing'; +import { configureSearchComponentTestingModule } from './search-page.component.spec'; +import { SearchConfigurationService } from './search-service/search-configuration.service'; +import { ConfigurationSearchPageComponent } from './configuration-search-page.component'; + +describe('ConfigurationSearchPageComponent', () => { + let comp: ConfigurationSearchPageComponent; + let fixture: ComponentFixture<ConfigurationSearchPageComponent>; + let searchConfigService: SearchConfigurationService; + + beforeEach(async(() => { + configureSearchComponentTestingModule(ConfigurationSearchPageComponent); + })); + + beforeEach(() => { + fixture = TestBed.createComponent(ConfigurationSearchPageComponent); + comp = fixture.componentInstance; + searchConfigService = (comp as any).searchConfigService; + fixture.detectChanges(); + }); +}); diff --git a/src/app/+search-page/configuration-search-page.component.ts b/src/app/+search-page/configuration-search-page.component.ts new file mode 100644 index 0000000000000000000000000000000000000000..85619e8f0432ff050f6c939b8a5d9188ee268e70 --- /dev/null +++ b/src/app/+search-page/configuration-search-page.component.ts @@ -0,0 +1,71 @@ +import { HostWindowService } from '../shared/host-window.service'; +import { SearchService } from './search-service/search.service'; +import { SearchSidebarService } from './search-sidebar/search-sidebar.service'; +import { SearchPageComponent } from './search-page.component'; +import { ChangeDetectionStrategy, Component, Inject, Input, OnInit } from '@angular/core'; +import { pushInOut } from '../shared/animations/push'; +import { RouteService } from '../shared/services/route.service'; +import { SearchConfigurationService } from './search-service/search-configuration.service'; +import { Observable } from 'rxjs'; +import { PaginatedSearchOptions } from './paginated-search-options.model'; +import { SEARCH_CONFIG_SERVICE } from '../+my-dspace-page/my-dspace-page.component'; +import { map } from 'rxjs/operators'; + +/** + * This component renders a search page using a configuration as input. + */ +@Component({ + selector: 'ds-configuration-search-page', + styleUrls: ['./search-page.component.scss'], + templateUrl: './search-page.component.html', + changeDetection: ChangeDetectionStrategy.OnPush, + animations: [pushInOut], + providers: [ + { + provide: SEARCH_CONFIG_SERVICE, + useClass: SearchConfigurationService + } + ] +}) + +export class ConfigurationSearchPageComponent extends SearchPageComponent implements OnInit { + /** + * The configuration to use for the search options + * If empty, the configuration will be determined by the route parameter called 'configuration' + */ + @Input() configuration: string; + + constructor(protected service: SearchService, + protected sidebarService: SearchSidebarService, + protected windowService: HostWindowService, + @Inject(SEARCH_CONFIG_SERVICE) public searchConfigService: SearchConfigurationService, + protected routeService: RouteService) { + super(service, sidebarService, windowService, searchConfigService, routeService); + } + + /** + * Listening to changes in the paginated search options + * If something changes, update the search results + * + * Listen to changes in the scope + * If something changes, update the list of scopes for the dropdown + */ + ngOnInit(): void { + super.ngOnInit(); + } + + /** + * Get the current paginated search options after updating the configuration using the configuration input + * This is to make sure the configuration is included in the paginated search options, as it is not part of any + * query or route parameters + * @returns {Observable<PaginatedSearchOptions>} + */ + protected getSearchOptions(): Observable<PaginatedSearchOptions> { + return this.searchConfigService.paginatedSearchOptions.pipe( + map((options: PaginatedSearchOptions) => { + const config = this.configuration || options.configuration; + return Object.assign(options, { configuration: config }); + }) + ); + } +} diff --git a/src/app/+search-page/configuration-search-page.guard.ts b/src/app/+search-page/configuration-search-page.guard.ts new file mode 100644 index 0000000000000000000000000000000000000000..c52a0a6d8e69ed659c22403ee8de18360daf757a --- /dev/null +++ b/src/app/+search-page/configuration-search-page.guard.ts @@ -0,0 +1,22 @@ +import { Injectable } from '@angular/core'; +import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; +import { Observable } from 'rxjs'; + +@Injectable() +/** + * Assemble the correct i18n key for the configuration search page's title depending on the current route's configuration parameter. + * The format of the key will be "{configuration}.search.title" with: + * - configuration: The current configuration stored in route.params + */ +export class ConfigurationSearchPageGuard implements CanActivate { + canActivate( + route: ActivatedRouteSnapshot, + state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean { + const configuration = route.params.configuration; + + const newTitle = configuration + '.search.title'; + + route.data = { title: newTitle }; + return true; + } +} diff --git a/src/app/+search-page/filtered-search-page.guard.ts b/src/app/+search-page/filtered-search-page.guard.ts deleted file mode 100644 index 6d41d4965d296ff4a5ac6ce1d12a446195bfe1b9..0000000000000000000000000000000000000000 --- a/src/app/+search-page/filtered-search-page.guard.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { Injectable } from '@angular/core'; -import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot } from '@angular/router'; -import { Observable } from 'rxjs'; - -@Injectable() -/** - * Assemble the correct i18n key for the filtered search page's title depending on the current route's filter parameter. - * The format of the key will be "{filter}.search.title" with: - * - filter: The current filter stored in route.params - */ -export class FilteredSearchPageGuard implements CanActivate { - canActivate( - route: ActivatedRouteSnapshot, - state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean { - const filter = route.params.filter; - - const newTitle = filter + '.search.title'; - - route.data = { title: newTitle }; - return true; - } -} diff --git a/src/app/+search-page/normalized-search-result.model.ts b/src/app/+search-page/normalized-search-result.model.ts index 32f3217b54b66ef397587c35f8c3d34e94d880ae..abb5f21250de59c71fbfd7fe78dd2530c2c5f582 100644 --- a/src/app/+search-page/normalized-search-result.model.ts +++ b/src/app/+search-page/normalized-search-result.model.ts @@ -1,10 +1,12 @@ -import { autoserialize, autoserializeAs } from 'cerialize'; +import { autoserialize, inheritSerialization } from 'cerialize'; import { MetadataMap } from '../core/shared/metadata.models'; import { ListableObject } from '../shared/object-collection/shared/listable-object.model'; +import { NormalizedObject } from '../core/cache/models/normalized-object.model'; /** * Represents a normalized version of a search result object of a certain DSpaceObject */ +@inheritSerialization(NormalizedObject) export class NormalizedSearchResult implements ListableObject { /** * The UUID of the DSpaceObject that was found diff --git a/src/app/+search-page/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts b/src/app/+search-page/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts index 5d8b51de960e02ce773a603357f8ea475075da51..af5ca68de1e57d6039ac401fdb158d3c17374107 100644 --- a/src/app/+search-page/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts +++ b/src/app/+search-page/search-filters/search-filter/search-facet-filter/search-facet-filter.component.spec.ts @@ -20,6 +20,7 @@ import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-d import { SearchConfigurationServiceStub } from '../../../../shared/testing/search-configuration-service-stub'; import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component'; import { tap } from 'rxjs/operators'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; describe('SearchFacetFilterComponent', () => { let comp: SearchFacetFilterComponent; @@ -61,7 +62,7 @@ describe('SearchFacetFilterComponent', () => { let router; const page = observableOf(0); - const mockValues = observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), values))); + const mockValues = createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), values)); beforeEach(async(() => { TestBed.configureTestingModule({ imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], diff --git a/src/app/+search-page/search-filters/search-filter/search-range-filter/search-range-filter.component.spec.ts b/src/app/+search-page/search-filters/search-filter/search-range-filter/search-range-filter.component.spec.ts index 119f3f92a9400772f06dc6e98b8a2a9ea603f871..da86e3a75900d50f6480bec449f8d1b4c3582c43 100644 --- a/src/app/+search-page/search-filters/search-filter/search-range-filter/search-range-filter.component.spec.ts +++ b/src/app/+search-page/search-filters/search-filter/search-range-filter/search-range-filter.component.spec.ts @@ -20,6 +20,7 @@ import { RouteService } from '../../../../shared/services/route.service'; import { RemoteDataBuildService } from '../../../../core/cache/builders/remote-data-build.service'; import { SEARCH_CONFIG_SERVICE } from '../../../../+my-dspace-page/my-dspace-page.component'; import { SearchConfigurationServiceStub } from '../../../../shared/testing/search-configuration-service-stub'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; describe('SearchRangeFilterComponent', () => { let comp: SearchRangeFilterComponent; @@ -66,7 +67,7 @@ describe('SearchRangeFilterComponent', () => { let router; const page = observableOf(0); - const mockValues = observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), values))); + const mockValues = createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), values)); beforeEach(async(() => { TestBed.configureTestingModule({ imports: [TranslateModule.forRoot(), NoopAnimationsModule, FormsModule], diff --git a/src/app/+search-page/search-page-routing.module.ts b/src/app/+search-page/search-page-routing.module.ts index c3cf4e13436d93256372fc3946011e53bd467f97..d1ab02945e380a764758ce17d946755293e871e0 100644 --- a/src/app/+search-page/search-page-routing.module.ts +++ b/src/app/+search-page/search-page-routing.module.ts @@ -2,14 +2,14 @@ import { NgModule } from '@angular/core'; import { RouterModule } from '@angular/router'; import { SearchPageComponent } from './search-page.component'; -import { FilteredSearchPageComponent } from './filtered-search-page.component'; -import { FilteredSearchPageGuard } from './filtered-search-page.guard'; +import { ConfigurationSearchPageGuard } from './configuration-search-page.guard'; +import { ConfigurationSearchPageComponent } from './configuration-search-page.component'; @NgModule({ imports: [ RouterModule.forChild([ { path: '', component: SearchPageComponent, data: { title: 'search.title' } }, - { path: ':filter', component: FilteredSearchPageComponent, canActivate: [FilteredSearchPageGuard]} + { path: ':configuration', component: ConfigurationSearchPageComponent, canActivate: [ConfigurationSearchPageGuard]} ]) ] }) diff --git a/src/app/+search-page/search-page.component.html b/src/app/+search-page/search-page.component.html index b4d8c70f111b6a62fbca3dee70d5609e5afb0a2c..ea04a2b04eb7e757e47bac52910d99b183df128e 100644 --- a/src/app/+search-page/search-page.component.html +++ b/src/app/+search-page/search-page.component.html @@ -33,7 +33,7 @@ </div> <ds-search-results [searchResults]="resultsRD$ | async" [searchConfig]="searchOptions$ | async" - [fixedFilter]="fixedFilter$ | async" + [configuration]="configuration$ | async" [disableHeader]="!searchEnabled"></ds-search-results> </div> </div> diff --git a/src/app/+search-page/search-page.component.spec.ts b/src/app/+search-page/search-page.component.spec.ts index 88c7c693d39a84069c4098bcd8c74f76f12bca7a..fe4c301bd5c21927f0dce3979ebe93a93a846414 100644 --- a/src/app/+search-page/search-page.component.spec.ts +++ b/src/app/+search-page/search-page.component.spec.ts @@ -25,6 +25,7 @@ import { RouteService } from '../shared/services/route.service'; import { SearchConfigurationServiceStub } from '../shared/testing/search-configuration-service-stub'; import { PaginatedSearchOptions } from './paginated-search-options.model'; import { SearchFixedFilterService } from './search-filters/search-filter/search-fixed-filter.service'; +import { createSuccessfulRemoteDataObject$ } from '../shared/testing/utils'; let comp: SearchPageComponent; let fixture: ComponentFixture<SearchPageComponent>; @@ -41,7 +42,7 @@ pagination.id = 'search-results-pagination'; pagination.currentPage = 1; pagination.pageSize = 10; const sort: SortOptions = new SortOptions('score', SortDirection.DESC); -const mockResults = observableOf(new RemoteData(false, false, true, null, ['test', 'data'])); +const mockResults = createSuccessfulRemoteDataObject$(['test', 'data']); const searchServiceStub = jasmine.createSpyObj('SearchService', { search: mockResults, getSearchLink: '/search', diff --git a/src/app/+search-page/search-page.component.ts b/src/app/+search-page/search-page.component.ts index f23bff96f357fa889407aa445836b3830440450a..03433d1da1b03517bace513a98c0374a36b02393 100644 --- a/src/app/+search-page/search-page.component.ts +++ b/src/app/+search-page/search-page.component.ts @@ -86,10 +86,10 @@ export class SearchPageComponent implements OnInit { sideBarWidth = 3; /** - * The currently applied filter (determines title of search) + * The currently applied configuration (determines title of search) */ @Input() - fixedFilter$: Observable<string>; + configuration$: Observable<string>; constructor(protected service: SearchService, protected sidebarService: SearchSidebarService, @@ -116,8 +116,8 @@ export class SearchPageComponent implements OnInit { this.scopeListRD$ = this.searchConfigService.getCurrentScope('').pipe( switchMap((scopeId) => this.service.getScopes(scopeId)) ); - if (!isNotEmpty(this.fixedFilter$)) { - this.fixedFilter$ = this.routeService.getRouteParameterValue('filter'); + if (!isNotEmpty(this.configuration$)) { + this.configuration$ = this.routeService.getRouteParameterValue('configuration'); } } diff --git a/src/app/+search-page/search-page.module.ts b/src/app/+search-page/search-page.module.ts index 65558eae175e1f934ff2eaa0ef7bab0dc54ac0c7..d7d66d854c0fe944eac593a150aad4550892fa70 100644 --- a/src/app/+search-page/search-page.module.ts +++ b/src/app/+search-page/search-page.module.ts @@ -17,9 +17,7 @@ import { SearchFiltersComponent } from './search-filters/search-filters.componen import { SearchFilterComponent } from './search-filters/search-filter/search-filter.component'; import { SearchFacetFilterComponent } from './search-filters/search-filter/search-facet-filter/search-facet-filter.component'; import { SearchFilterService } from './search-filters/search-filter/search-filter.service'; -import { FilteredSearchPageComponent } from './filtered-search-page.component'; import { SearchFixedFilterService } from './search-filters/search-filter/search-fixed-filter.service'; -import { FilteredSearchPageGuard } from './filtered-search-page.guard'; import { SearchLabelsComponent } from './search-labels/search-labels.component'; import { SearchRangeFilterComponent } from './search-filters/search-filter/search-range-filter/search-range-filter.component'; import { SearchTextFilterComponent } from './search-filters/search-filter/search-text-filter/search-text-filter.component'; @@ -32,6 +30,9 @@ import { SearchFacetSelectedOptionComponent } from './search-filters/search-filt import { SearchFacetRangeOptionComponent } from './search-filters/search-filter/search-facet-filter-options/search-facet-range-option/search-facet-range-option.component'; import { SearchSwitchConfigurationComponent } from './search-switch-configuration/search-switch-configuration.component'; import { SearchAuthorityFilterComponent } from './search-filters/search-filter/search-authority-filter/search-authority-filter.component'; +import { ConfigurationSearchPageComponent } from './configuration-search-page.component'; +import { ConfigurationSearchPageGuard } from './configuration-search-page.guard'; +import { FilteredSearchPageComponent } from './filtered-search-page.component'; const effects = [ SearchSidebarEffects @@ -60,7 +61,8 @@ const components = [ SearchFacetRangeOptionComponent, SearchSwitchConfigurationComponent, SearchAuthorityFilterComponent, - FilteredSearchPageComponent + FilteredSearchPageComponent, + ConfigurationSearchPageComponent ]; @NgModule({ @@ -76,7 +78,7 @@ const components = [ SearchSidebarService, SearchFilterService, SearchFixedFilterService, - FilteredSearchPageGuard, + ConfigurationSearchPageGuard, SearchFilterService, SearchConfigurationService ], diff --git a/src/app/+search-page/search-results/search-results.component.html b/src/app/+search-page/search-results/search-results.component.html index 824d531155421981add90b4622fb06a3a6f7a5fa..5a1e89858bd6314782e304e424f3d02b390b9cc3 100644 --- a/src/app/+search-page/search-results/search-results.component.html +++ b/src/app/+search-page/search-results/search-results.component.html @@ -1,4 +1,4 @@ -<h2 *ngIf="!disableHeader">{{ getTitleKey() | translate }}</h2> +<h2 *ngIf="!disableHeader">{{ (configuration ? configuration + '.search.results.head' : 'search.results.head') | translate }}</h2> <div *ngIf="searchResults?.hasSucceeded && !searchResults?.isLoading && searchResults?.payload?.page.length > 0" @fadeIn> <ds-viewable-collection [config]="searchConfig.pagination" diff --git a/src/app/+search-page/search-results/search-results.component.spec.ts b/src/app/+search-page/search-results/search-results.component.spec.ts index 518829e69f831c30e3d4a4f79665c93877b31aea..6eb48bb037f53559ebdd7106f068eaee5e42b764 100644 --- a/src/app/+search-page/search-results/search-results.component.spec.ts +++ b/src/app/+search-page/search-results/search-results.component.spec.ts @@ -114,7 +114,7 @@ export const objects = [ self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/communities/7669c72a-3f2a-451f-a3b9-9210e7a4c02f', id: '7669c72a-3f2a-451f-a3b9-9210e7a4c02f', uuid: '7669c72a-3f2a-451f-a3b9-9210e7a4c02f', - type: ResourceType.Community, + type: Community.type, metadata: { 'dc.description': [ { @@ -168,7 +168,7 @@ export const objects = [ self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/communities/9076bd16-e69a-48d6-9e41-0238cb40d863', id: '9076bd16-e69a-48d6-9e41-0238cb40d863', uuid: '9076bd16-e69a-48d6-9e41-0238cb40d863', - type: ResourceType.Community, + type: Community.type, metadata: { 'dc.description': [ { diff --git a/src/app/+search-page/search-results/search-results.component.ts b/src/app/+search-page/search-results/search-results.component.ts index ea6b407ee7f3b391964cc311575ab84f4b08f59a..0ad1fd46bfa41d7028611a0f29c2c8c527625e24 100644 --- a/src/app/+search-page/search-results/search-results.component.ts +++ b/src/app/+search-page/search-results/search-results.component.ts @@ -45,9 +45,9 @@ export class SearchResultsComponent { @Input() viewMode: SetViewMode; /** - * An optional fixed filter to filter the result on one type + * An optional configuration to filter the result on one type */ - @Input() fixedFilter: string; + @Input() configuration: string; /** * Whether or not to hide the header of the results @@ -55,19 +55,6 @@ export class SearchResultsComponent { */ @Input() disableHeader = false; - /** - * Get the i18n key for the title depending on the fixed filter - * Defaults to 'search.results.head' if there's no fixed filter found - * @returns {string} - */ - getTitleKey() { - if (isNotEmpty(this.fixedFilter)) { - return this.fixedFilter + '.search.results.head' - } else { - return 'search.results.head'; - } - } - /** * Method to change the given string by surrounding it by quotes if not already present. */ diff --git a/src/app/+search-page/search-service/search-configuration.service.ts b/src/app/+search-page/search-service/search-configuration.service.ts index 14fcdd8d6053e5ba062ca437adbdef1b0ea01795..06efc16be208a52499a45d4bf303a76c3aabfcb0 100644 --- a/src/app/+search-page/search-service/search-configuration.service.ts +++ b/src/app/+search-page/search-service/search-configuration.service.ts @@ -9,7 +9,7 @@ import { of as observableOf, Subscription } from 'rxjs'; -import { filter, flatMap, map, switchMap, tap } from 'rxjs/operators'; +import { filter, flatMap, map, startWith, switchMap, tap } from 'rxjs/operators'; import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model'; import { PaginationComponentOptions } from '../../shared/pagination/pagination-component-options.model'; import { SearchOptions } from '../search-options.model'; @@ -21,6 +21,7 @@ import { getSucceededRemoteData } from '../../core/shared/operators'; import { SearchFilter } from '../search-filter.model'; import { DSpaceObjectType } from '../../core/shared/dspace-object-type.model'; import { SearchFixedFilterService } from '../search-filters/search-filter/search-fixed-filter.service'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; /** * Service that performs all actions that have to do with the current search configuration @@ -109,9 +110,14 @@ export class SearchConfigurationService implements OnDestroy { * @returns {Observable<string>} Emits the current configuration string */ getCurrentConfiguration(defaultConfiguration: string) { - return this.routeService.getQueryParameterValue('configuration').pipe(map((configuration) => { - return configuration || defaultConfiguration; - })); + return observableCombineLatest( + this.routeService.getQueryParameterValue('configuration').pipe(startWith(undefined)), + this.routeService.getRouteParameterValue('configuration').pipe(startWith(undefined)) + ).pipe( + map(([queryConfig, routeConfig]) => { + return queryConfig || routeConfig || defaultConfiguration; + }) + ); } /** @@ -269,7 +275,7 @@ export class SearchConfigurationService implements OnDestroy { scope: this.defaultScope, query: this.defaultQuery }); - this._defaults = observableOf(new RemoteData(false, false, true, null, options)); + this._defaults = createSuccessfulRemoteDataObject$(options); } return this._defaults; } diff --git a/src/app/+search-page/search-service/search-result-element-decorator.ts b/src/app/+search-page/search-service/search-result-element-decorator.ts index 59446480a3af0577aa61ced3b87de71f46842bfc..e804a5d8ee99e10d06eaf1e588e80c8a73341190 100644 --- a/src/app/+search-page/search-service/search-result-element-decorator.ts +++ b/src/app/+search-page/search-service/search-result-element-decorator.ts @@ -1,6 +1,6 @@ import { GenericConstructor } from '../../core/shared/generic-constructor'; import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; -import { isNull } from '../../shared/empty.util'; +import { hasNoValue, isNull } from '../../shared/empty.util'; /** * Contains the mapping between a search result component and a DSpaceObject @@ -34,7 +34,7 @@ export function searchResultFor(domainConstructor: GenericConstructor<ListableOb * @returns The component's constructor that matches the given DSpaceObject */ export function getSearchResultFor(domainConstructor: GenericConstructor<ListableObject>, configuration: string = null) { - if (isNull(configuration) || configuration === 'default') { + if (isNull(configuration) || configuration === 'default' || hasNoValue(searchResultMap.get(configuration))) { return searchResultMap.get(domainConstructor); } else { return searchResultMap.get(configuration).get(domainConstructor); diff --git a/src/app/+search-page/search-service/search.service.spec.ts b/src/app/+search-page/search-service/search.service.spec.ts index 9ec5bc35f212fedc72ca371d22396df6907c4cd5..4ae9876159f856caf1de9f5f4a4c2ff6eb370458 100644 --- a/src/app/+search-page/search-service/search.service.spec.ts +++ b/src/app/+search-page/search-service/search.service.spec.ts @@ -28,6 +28,7 @@ import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.serv import { map } from 'rxjs/operators'; import { RouteService } from '../../shared/services/route.service'; import { routeServiceStub } from '../../shared/testing/route-service-stub'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; @Component({ template: '' }) class DummyComponent { @@ -91,7 +92,7 @@ describe('SearchService', () => { ); }, aggregate: (input: Array<Observable<RemoteData<any>>>): Observable<RemoteData<any[]>> => { - return observableOf(new RemoteData(false, false, true, null, [])); + return createSuccessfulRemoteDataObject$([]); } }; diff --git a/src/app/+search-page/search-service/search.service.ts b/src/app/+search-page/search-service/search.service.ts index 598657a1b288cc03a97c96bea3b0bd50002a45d0..86611cc87be612cbd079aa3504db03e21e2b1b18 100644 --- a/src/app/+search-page/search-service/search.service.ts +++ b/src/app/+search-page/search-service/search.service.ts @@ -1,6 +1,6 @@ import { combineLatest as observableCombineLatest, Observable, of as observableOf } from 'rxjs'; import { Injectable, OnDestroy } from '@angular/core'; -import { NavigationExtras, PRIMARY_OUTLET, Router, UrlSegmentGroup } from '@angular/router'; +import { NavigationExtras, Router } from '@angular/router'; import { first, map, switchMap } from 'rxjs/operators'; import { RemoteDataBuildService } from '../../core/cache/builders/remote-data-build.service'; import { @@ -40,7 +40,6 @@ import { PaginatedSearchOptions } from '../paginated-search-options.model'; import { Community } from '../../core/shared/community.model'; import { CommunityDataService } from '../../core/data/community-data.service'; import { ViewMode } from '../../core/shared/view-mode.model'; -import { ResourceType } from '../../core/shared/resource-type'; import { DSpaceObjectDataService } from '../../core/data/dspace-object-data.service'; import { RouteService } from '../../shared/services/route.service'; @@ -296,7 +295,7 @@ export class SearchService implements OnDestroy { const scopeObject: Observable<RemoteData<DSpaceObject>> = this.dspaceObjectService.findById(scopeId).pipe(getSucceededRemoteData()); const scopeList: Observable<DSpaceObject[]> = scopeObject.pipe( switchMap((dsoRD: RemoteData<DSpaceObject>) => { - if (dsoRD.payload.type === ResourceType.Community) { + if ((dsoRD.payload as any).type === Community.type.value) { const community: Community = dsoRD.payload as Community; return observableCombineLatest(community.subcommunities, community.collections).pipe( map(([subCommunities, collections]) => { diff --git a/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts b/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts index aa182eb29119867419f96033c13b0fc4d815eba1..d5df70698c569a8cc524871507cebfa28087018e 100644 --- a/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts +++ b/src/app/+workflowitems-edit-page/workflowitems-edit-page-routing.module.ts @@ -20,4 +20,4 @@ import { SubmissionEditComponent } from '../submission/edit/submission-edit.comp /** * This module defines the default component to load when navigating to the workflowitems edit page path. */ -export class WorkflowitemsEditPageRoutingModule { } +export class WorkflowItemsEditPageRoutingModule { } diff --git a/src/app/+workflowitems-edit-page/workflowitems-edit-page.module.ts b/src/app/+workflowitems-edit-page/workflowitems-edit-page.module.ts index fbb53d8dcc80c613f61dc97a977d2413c4c1a3ef..7a89f18c7d980729e62ca19c212a1d5735c8919b 100644 --- a/src/app/+workflowitems-edit-page/workflowitems-edit-page.module.ts +++ b/src/app/+workflowitems-edit-page/workflowitems-edit-page.module.ts @@ -1,12 +1,12 @@ import { CommonModule } from '@angular/common'; import { NgModule } from '@angular/core'; import { SharedModule } from '../shared/shared.module'; -import { WorkflowitemsEditPageRoutingModule } from './workflowitems-edit-page-routing.module'; +import { WorkflowItemsEditPageRoutingModule } from './workflowitems-edit-page-routing.module'; import { SubmissionModule } from '../submission/submission.module'; @NgModule({ imports: [ - WorkflowitemsEditPageRoutingModule, + WorkflowItemsEditPageRoutingModule, CommonModule, SharedModule, SubmissionModule, @@ -16,6 +16,6 @@ import { SubmissionModule } from '../submission/submission.module'; /** * This module handles all modules that need to access the workflowitems edit page. */ -export class WorkflowitemsEditPageModule { +export class WorkflowItemsEditPageModule { } diff --git a/src/app/app-routing.module.ts b/src/app/app-routing.module.ts index cb80d0165e2238ba5acc0b175dd42c8b8c7177d1..86364aca895d831432b60da2d21137da9e20180a 100644 --- a/src/app/app-routing.module.ts +++ b/src/app/app-routing.module.ts @@ -32,7 +32,7 @@ export function getCommunityModulePath() { { path: 'logout', loadChildren: './+logout-page/logout-page.module#LogoutPageModule' }, { path: 'submit', loadChildren: './+submit-page/submit-page.module#SubmitPageModule' }, { path: 'workspaceitems', loadChildren: './+workspaceitems-edit-page/workspaceitems-edit-page.module#WorkspaceitemsEditPageModule' }, - { path: 'workflowitems', loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowitemsEditPageModule' }, + { path: 'workflowitems', loadChildren: './+workflowitems-edit-page/workflowitems-edit-page.module#WorkflowItemsEditPageModule' }, { path: '**', pathMatch: 'full', component: PageNotFoundComponent }, ]) ], diff --git a/src/app/core/auth/auth-object-factory.ts b/src/app/core/auth/auth-object-factory.ts deleted file mode 100644 index 02458f4e3ed0134ee374d928ad4e5b033c641be2..0000000000000000000000000000000000000000 --- a/src/app/core/auth/auth-object-factory.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { AuthType } from './auth-type'; -import { GenericConstructor } from '../shared/generic-constructor'; -import { NormalizedAuthStatus } from './models/normalized-auth-status.model'; -import { NormalizedEPerson } from '../eperson/models/normalized-eperson.model'; -import { NormalizedObject } from '../cache/models/normalized-object.model'; -import { CacheableObject } from '../cache/object-cache.reducer'; -import { NormalizedGroup } from '../eperson/models/normalized-group.model'; - -export class AuthObjectFactory { - public static getConstructor(type): GenericConstructor<NormalizedObject<CacheableObject>> { - switch (type) { - case AuthType.EPerson: { - return NormalizedEPerson - } - - case AuthType.Group: { - return NormalizedGroup - } - - case AuthType.Status: { - return NormalizedAuthStatus - } - - default: { - return undefined; - } - } - } -} diff --git a/src/app/core/auth/auth-response-parsing.service.spec.ts b/src/app/core/auth/auth-response-parsing.service.spec.ts index 0b2c32fc047898bde62f10f53ae5550e9dd89dd7..112d60b8d208652509f517ee29b792a8e5319efa 100644 --- a/src/app/core/auth/auth-response-parsing.service.spec.ts +++ b/src/app/core/auth/auth-response-parsing.service.spec.ts @@ -35,95 +35,103 @@ describe('AuthResponseParsingService', () => { }); describe('parse', () => { - const validRequest = new AuthPostRequest( - '69f375b5-19f4-4453-8c7a-7dc5c55aafbb', - 'https://rest.api/dspace-spring-rest/api/authn/login', - 'password=test&user=myself@testshib.org'); - - const validRequest2 = new AuthGetRequest( - '69f375b5-19f4-4453-8c7a-7dc5c55aafbb', - 'https://rest.api/dspace-spring-rest/api/authn/status'); - - const validResponse = { - payload: { - authenticated: true, - id: null, - okay: true, - token: { - accessToken: 'eyJhbGciOiJIUzI1NiJ9.eyJlaWQiOiI0ZGM3MGFiNS1jZDczLTQ5MmYtYjAwNy0zMTc5ZDJkOTI5NmIiLCJzZyI6W10sImV4cCI6MTUyNjMxODMyMn0.ASmvcbJFBfzhN7D5ncloWnaVZr5dLtgTuOgHaCKiimc', - expires: 1526318322000 - }, - } as AuthStatus, - statusCode: 200, - statusText: '200' - }; - - const validResponse1 = { - payload: {}, - statusCode: 404, - statusText: '404' - }; - - const validResponse2 = { - payload: { - authenticated: true, - id: null, - okay: true, - type: 'status', - _embedded: { - eperson: { - canLogIn: true, - email: 'myself@testshib.org', - groups: [], - handle: null, - id: '4dc70ab5-cd73-492f-b007-3179d2d9296b', - lastActive: '2018-05-14T17:03:31.277+0000', - metadata: { - 'eperson.firstname': [ - { - language: null, - value: 'User' - } - ], - 'eperson.lastname': [ - { - language: null, - value: 'Test' - } - ], - 'eperson.language': [ - { - language: null, - value: 'en' + let validRequest; + let validRequest2; + let validResponse; + let validResponse1; + let validResponse2; + beforeEach(() => { + + validRequest = new AuthPostRequest( + '69f375b5-19f4-4453-8c7a-7dc5c55aafbb', + 'https://rest.api/dspace-spring-rest/api/authn/login', + 'password=test&user=myself@testshib.org'); + + validRequest2 = new AuthGetRequest( + '69f375b5-19f4-4453-8c7a-7dc5c55aafbb', + 'https://rest.api/dspace-spring-rest/api/authn/status'); + + validResponse = { + payload: { + authenticated: true, + id: null, + okay: true, + token: { + accessToken: 'eyJhbGciOiJIUzI1NiJ9.eyJlaWQiOiI0ZGM3MGFiNS1jZDczLTQ5MmYtYjAwNy0zMTc5ZDJkOTI5NmIiLCJzZyI6W10sImV4cCI6MTUyNjMxODMyMn0.ASmvcbJFBfzhN7D5ncloWnaVZr5dLtgTuOgHaCKiimc', + expires: 1526318322000 + }, + } as AuthStatus, + statusCode: 200, + statusText: '200' + }; + + validResponse1 = { + payload: {}, + statusCode: 404, + statusText: '404' + }; + + validResponse2 = { + payload: { + authenticated: true, + id: null, + okay: true, + type: 'status', + _embedded: { + eperson: { + canLogIn: true, + email: 'myself@testshib.org', + groups: [], + handle: null, + id: '4dc70ab5-cd73-492f-b007-3179d2d9296b', + lastActive: '2018-05-14T17:03:31.277+0000', + metadata: { + 'eperson.firstname': [ + { + language: null, + value: 'User' + } + ], + 'eperson.lastname': [ + { + language: null, + value: 'Test' + } + ], + 'eperson.language': [ + { + language: null, + value: 'en' + } + ] + }, + name: 'User Test', + netid: 'myself@testshib.org', + requireCertificate: false, + selfRegistered: false, + type: 'eperson', + uuid: '4dc70ab5-cd73-492f-b007-3179d2d9296b', + _links: { + self: { + href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/eperson/epersons/4dc70ab5-cd73-492f-b007-3179d2d9296b' } - ] - }, - name: 'User Test', - netid: 'myself@testshib.org', - requireCertificate: false, - selfRegistered: false, - type: 'eperson', - uuid: '4dc70ab5-cd73-492f-b007-3179d2d9296b', - _links: { - self: { - href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/eperson/epersons/4dc70ab5-cd73-492f-b007-3179d2d9296b' } } - } - }, - _links: { - eperson: { - href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/eperson/epersons/4dc70ab5-cd73-492f-b007-3179d2d9296b' }, - self: { - href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/authn/status' + _links: { + eperson: { + href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/eperson/epersons/4dc70ab5-cd73-492f-b007-3179d2d9296b' + }, + self: { + href: 'https://hasselt-dspace.dev01.4science.it/dspace-spring-rest/api/authn/status' + } } - } - }, - statusCode: 200, - statusText: '200' + }, + statusCode: 200, + statusText: '200' - }; + }; + }); it('should return a AuthStatusResponse if data contains a valid AuthStatus object as payload', () => { const response = service.parse(validRequest, validResponse); diff --git a/src/app/core/auth/auth-response-parsing.service.ts b/src/app/core/auth/auth-response-parsing.service.ts index c736c3b22b47c144af423b25e0fffc289a10187b..a5a160531c29d9163f8b9a7554c8367adbe90094 100644 --- a/src/app/core/auth/auth-response-parsing.service.ts +++ b/src/app/core/auth/auth-response-parsing.service.ts @@ -1,6 +1,5 @@ import { Inject, Injectable } from '@angular/core'; -import { AuthObjectFactory } from './auth-object-factory'; import { BaseResponseParsingService } from '../data/base-response-parsing.service'; import { AuthStatusResponse, RestResponse } from '../cache/response.models'; import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model'; @@ -10,7 +9,6 @@ import { isNotEmpty } from '../../shared/empty.util'; import { ObjectCacheService } from '../cache/object-cache.service'; import { ResponseParsingService } from '../data/parsing.service'; import { RestRequest } from '../data/request.models'; -import { AuthType } from './auth-type'; import { AuthStatus } from './models/auth-status.model'; import { NormalizedAuthStatus } from './models/normalized-auth-status.model'; import { NormalizedObject } from '../cache/models/normalized-object.model'; @@ -18,7 +16,6 @@ import { NormalizedObject } from '../cache/models/normalized-object.model'; @Injectable() export class AuthResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - protected objectFactory = AuthObjectFactory; protected toCache = true; constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig, @@ -28,7 +25,7 @@ export class AuthResponseParsingService extends BaseResponseParsingService imple parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse { if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links) && (data.statusCode === 200)) { - const response = this.process<NormalizedObject<AuthStatus>, AuthType>(data.payload, request.uuid); + const response = this.process<NormalizedObject<AuthStatus>>(data.payload, request.uuid); return new AuthStatusResponse(response, data.statusCode, data.statusText); } else { return new AuthStatusResponse(data.payload as NormalizedAuthStatus, data.statusCode, data.statusText); diff --git a/src/app/core/auth/auth-type.ts b/src/app/core/auth/auth-type.ts deleted file mode 100644 index f0460449ea78304acb9596d89bac7a5bf715a17d..0000000000000000000000000000000000000000 --- a/src/app/core/auth/auth-type.ts +++ /dev/null @@ -1,5 +0,0 @@ -export enum AuthType { - EPerson = 'eperson', - Status = 'status', - Group = 'group' -} diff --git a/src/app/core/auth/models/auth-status.model.ts b/src/app/core/auth/models/auth-status.model.ts index 6e722a80c907f6e51b57b85ee15ae765d26aff4e..e0d568397a5cf1d612e1d57ac8eaffc3a744db6f 100644 --- a/src/app/core/auth/models/auth-status.model.ts +++ b/src/app/core/auth/models/auth-status.model.ts @@ -4,20 +4,51 @@ import { EPerson } from '../../eperson/models/eperson.model'; import { RemoteData } from '../../data/remote-data'; import { Observable } from 'rxjs'; import { CacheableObject } from '../../cache/object-cache.reducer'; +import { ResourceType } from '../../shared/resource-type'; +/** + * Object that represents the authenticated status of a user + */ export class AuthStatus implements CacheableObject { + static type = new ResourceType('status'); + /** + * The unique identifier of this auth status + */ id: string; + /** + * The unique uuid of this auth status + */ + uuid: string; + + /** + * True if REST API is up and running, should never return false + */ okay: boolean; + /** + * If the auth status represents an authenticated state + */ authenticated: boolean; + /** + * Authentication error if there was one for this status + */ error?: AuthError; + /** + * The eperson of this auth status + */ eperson: Observable<RemoteData<EPerson>>; + /** + * True if the token is valid, false if there was no token or the token wasn't valid + */ token?: AuthTokenInfo; + /** + * The self link of this auth status' REST object + */ self: string; } diff --git a/src/app/core/auth/models/normalized-auth-status.model.ts b/src/app/core/auth/models/normalized-auth-status.model.ts index a13a9966045b28149d27195ffb90d4d1e961811d..3892bee408a8ed3f3bb388e7b06d7b10f26da7f6 100644 --- a/src/app/core/auth/models/normalized-auth-status.model.ts +++ b/src/app/core/auth/models/normalized-auth-status.model.ts @@ -1,16 +1,22 @@ import { AuthStatus } from './auth-status.model'; import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize'; import { mapsTo, relationship } from '../../cache/builders/build-decorators'; -import { ResourceType } from '../../shared/resource-type'; import { NormalizedObject } from '../../cache/models/normalized-object.model'; import { IDToUUIDSerializer } from '../../cache/id-to-uuid-serializer'; +import { EPerson } from '../../eperson/models/eperson.model'; @mapsTo(AuthStatus) @inheritSerialization(NormalizedObject) export class NormalizedAuthStatus extends NormalizedObject<AuthStatus> { + /** + * The unique identifier of this auth status + */ @autoserialize id: string; + /** + * The unique generated uuid of this auth status + */ @autoserializeAs(new IDToUUIDSerializer('auth-status'), 'id') uuid: string; @@ -26,7 +32,10 @@ export class NormalizedAuthStatus extends NormalizedObject<AuthStatus> { @autoserialize authenticated: boolean; - @relationship(ResourceType.EPerson, false) + /** + * The self link to the eperson of this auth status + */ + @relationship(EPerson, false) @autoserialize eperson: string; } diff --git a/src/app/core/browse/browse.service.ts b/src/app/core/browse/browse.service.ts index bf368e37ce73b84d1808222158eae9c8e67a9e61..eb494d7bdb5572e6ccc4b05670a769b6cb79cc69 100644 --- a/src/app/core/browse/browse.service.ts +++ b/src/app/core/browse/browse.service.ts @@ -1,8 +1,9 @@ import { Injectable } from '@angular/core'; import { Observable, of as observableOf } from 'rxjs'; -import { distinctUntilChanged, map, startWith, take } from 'rxjs/operators'; +import { distinctUntilChanged, map, startWith } from 'rxjs/operators'; import { - ensureArrayHasValue, hasValue, + ensureArrayHasValue, + hasValue, hasValueOperator, isEmpty, isNotEmpty, @@ -23,7 +24,9 @@ import { BrowseEntry } from '../shared/browse-entry.model'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { configureRequest, - filterSuccessfulResponses, getBrowseDefinitionLinks, getFirstOccurrence, + filterSuccessfulResponses, + getBrowseDefinitionLinks, + getFirstOccurrence, getRemoteDataPayload, getRequestFromRequestHref } from '../shared/operators'; @@ -32,7 +35,6 @@ import { Item } from '../shared/item.model'; import { DSpaceObject } from '../shared/dspace-object.model'; import { BrowseEntrySearchOptions } from './browse-entry-search-options.model'; import { GenericSuccessResponse } from '../cache/response.models'; -import { RequestEntry } from '../data/request.reducer'; /** * The service handling all browse requests diff --git a/src/app/core/cache/builders/build-decorators.ts b/src/app/core/cache/builders/build-decorators.ts index 937fb37cd30f5ed6032bff16692b541e61be73ef..0bfb5f0321b6a52c39e074eac643e0702cb12016 100644 --- a/src/app/core/cache/builders/build-decorators.ts +++ b/src/app/core/cache/builders/build-decorators.ts @@ -1,23 +1,59 @@ import 'reflect-metadata'; import { GenericConstructor } from '../../shared/generic-constructor'; -import { CacheableObject } from '../object-cache.reducer'; +import { CacheableObject, TypedObject } from '../object-cache.reducer'; import { ResourceType } from '../../shared/resource-type'; const mapsToMetadataKey = Symbol('mapsTo'); const relationshipKey = Symbol('relationship'); const relationshipMap = new Map(); +const typeMap = new Map(); -export function mapsTo(value: GenericConstructor<CacheableObject>) { - return Reflect.metadata(mapsToMetadataKey, value); +/** + * Decorator function to map a normalized class to it's not-normalized counter part class + * It will also maps a type to the matching class + * @param value The not-normalized class to map to + */ +export function mapsTo(value: GenericConstructor<TypedObject>) { + return function decorator(objectConstructor: GenericConstructor<TypedObject>) { + Reflect.defineMetadata(mapsToMetadataKey, value, objectConstructor); + mapsToType((value as any).type, objectConstructor); + } } +/** + * Maps a type to the matching class + * @param value The resourse type + * @param objectConstructor The class to map to + */ +function mapsToType(value: ResourceType, objectConstructor: GenericConstructor<TypedObject>) { + if (!objectConstructor || !value) { + return; + } + typeMap.set(value.value, objectConstructor); +} + +/** + * Returns the mapped class for the given normalized class + * @param target The normalized class + */ export function getMapsTo(target: any) { return Reflect.getOwnMetadata(mapsToMetadataKey, target); } -export function relationship(value: ResourceType, isList: boolean = false): any { +/** + * Returns the mapped class for the given type + * @param type The resource type + */ +export function getMapsToType(type: string | ResourceType) { + if (typeof(type) === 'object') { + type = (type as ResourceType).value; + } + return typeMap.get(type); +} + +export function relationship<T extends CacheableObject>(value: GenericConstructor<T>, isList: boolean = false): any { return function r(target: any, propertyKey: string, descriptor: PropertyDescriptor) { if (!target || !propertyKey) { return; @@ -28,8 +64,10 @@ export function relationship(value: ResourceType, isList: boolean = false): any metaDataList.push(propertyKey); } relationshipMap.set(target.constructor, metaDataList); - - return Reflect.metadata(relationshipKey, { resourceType: value, isList }).apply(this, arguments); + return Reflect.metadata(relationshipKey, { + resourceType: (value as any).type.value, + isList + }).apply(this, arguments); }; } diff --git a/src/app/core/cache/builders/normalized-object-build.service.ts b/src/app/core/cache/builders/normalized-object-build.service.ts index 79665fec3d237fbcbdc9e322a16d0c7a2668d464..936548cdd4271677558a41617dec0fd8acc7f274 100644 --- a/src/app/core/cache/builders/normalized-object-build.service.ts +++ b/src/app/core/cache/builders/normalized-object-build.service.ts @@ -1,9 +1,8 @@ import { Injectable } from '@angular/core'; import { NormalizedObject } from '../models/normalized-object.model'; -import { CacheableObject } from '../object-cache.reducer'; -import { getRelationships } from './build-decorators'; -import { NormalizedObjectFactory } from '../models/normalized-object-factory'; +import { getMapsToType, getRelationships } from './build-decorators'; import { hasValue, isNotEmpty } from '../../../shared/empty.util'; +import { TypedObject } from '../object-cache.reducer'; /** * Return true if halObj has a value for `_links.self` @@ -35,8 +34,8 @@ export class NormalizedObjectBuildService { * * @param {TDomain} domainModel a domain model */ - normalize<T extends CacheableObject>(domainModel: T): NormalizedObject<T> { - const normalizedConstructor = NormalizedObjectFactory.getConstructor(domainModel.type); + normalize<T extends TypedObject>(domainModel: T): NormalizedObject<T> { + const normalizedConstructor = getMapsToType((domainModel as any).type); const relationships = getRelationships(normalizedConstructor) || []; const normalizedModel = Object.assign({}, domainModel) as any; diff --git a/src/app/core/cache/builders/remote-data-build.service.spec.ts b/src/app/core/cache/builders/remote-data-build.service.spec.ts index 272969050d8f7fe3dffc717e6b8f752f8fd7a56a..2f0e024521d3ad61b51038cecd3bb5fb494a8354 100644 --- a/src/app/core/cache/builders/remote-data-build.service.spec.ts +++ b/src/app/core/cache/builders/remote-data-build.service.spec.ts @@ -4,6 +4,7 @@ import { PaginatedList } from '../../data/paginated-list'; import { PageInfo } from '../../shared/page-info.model'; import { RemoteData } from '../../data/remote-data'; import { of as observableOf } from 'rxjs'; +import { createSuccessfulRemoteDataObject } from '../../../shared/testing/utils'; const pageInfo = new PageInfo(); const array = [ @@ -29,8 +30,8 @@ const array = [ }) ]; const paginatedList = new PaginatedList(pageInfo, array); -const arrayRD = new RemoteData(false, false, true, undefined, array); -const paginatedListRD = new RemoteData(false, false, true, undefined, paginatedList); +const arrayRD = createSuccessfulRemoteDataObject(array); +const paginatedListRD = createSuccessfulRemoteDataObject(paginatedList); describe('RemoteDataBuildService', () => { let service: RemoteDataBuildService; diff --git a/src/app/core/cache/builders/remote-data-build.service.ts b/src/app/core/cache/builders/remote-data-build.service.ts index 563dce23d145ada5de5746030012764ecbcb8cf6..85ba7636b682d5bc4fbfe8e87f505e093b384039 100644 --- a/src/app/core/cache/builders/remote-data-build.service.ts +++ b/src/app/core/cache/builders/remote-data-build.service.ts @@ -21,7 +21,8 @@ import { getRequestFromRequestUUID, getResourceLinksFromResponse } from '../../shared/operators'; -import { CacheableObject } from '../object-cache.reducer'; +import { CacheableObject, TypedObject } from '../object-cache.reducer'; +import { createSuccessfulRemoteDataObject$ } from '../../../shared/testing/utils'; @Injectable() export class RemoteDataBuildService { @@ -200,7 +201,7 @@ export class RemoteDataBuildService { aggregate<T>(input: Array<Observable<RemoteData<T>>>): Observable<RemoteData<T[]>> { if (isEmpty(input)) { - return observableOf(new RemoteData(false, false, true, null, [])); + return createSuccessfulRemoteDataObject$([]); } return observableCombineLatest(...input).pipe( diff --git a/src/app/core/cache/models/items/normalized-item-type.model.ts b/src/app/core/cache/models/items/normalized-item-type.model.ts index ed38d80a4baf8332743baa8e797119d968cfd254..fdb3b9e455547eb4efc06f650eb7f347c1fa0fd8 100644 --- a/src/app/core/cache/models/items/normalized-item-type.model.ts +++ b/src/app/core/cache/models/items/normalized-item-type.model.ts @@ -1,6 +1,5 @@ import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize'; import { ItemType } from '../../../shared/item-relationships/item-type.model'; -import { ResourceType } from '../../../shared/resource-type'; import { mapsTo } from '../../builders/build-decorators'; import { NormalizedObject } from '../normalized-object.model'; import { IDToUUIDSerializer } from '../../id-to-uuid-serializer'; @@ -11,7 +10,6 @@ import { IDToUUIDSerializer } from '../../id-to-uuid-serializer'; @mapsTo(ItemType) @inheritSerialization(NormalizedObject) export class NormalizedItemType extends NormalizedObject<ItemType> { - /** * The label that describes the ResourceType of the Item */ @@ -27,6 +25,6 @@ export class NormalizedItemType extends NormalizedObject<ItemType> { /** * The universally unique identifier of this ItemType */ - @autoserializeAs(new IDToUUIDSerializer(ResourceType.ItemType), 'id') + @autoserializeAs(new IDToUUIDSerializer(ItemType.type.value), 'id') uuid: string; } diff --git a/src/app/core/cache/models/items/normalized-relationship-type.model.ts b/src/app/core/cache/models/items/normalized-relationship-type.model.ts index d201fb27462d861db0eee1ec793c2b6ff27ed6dc..800b27cd7e3d2c432133a9db06264f70c25b746c 100644 --- a/src/app/core/cache/models/items/normalized-relationship-type.model.ts +++ b/src/app/core/cache/models/items/normalized-relationship-type.model.ts @@ -5,6 +5,7 @@ import { mapsTo, relationship } from '../../builders/build-decorators'; import { NormalizedDSpaceObject } from '../normalized-dspace-object.model'; import { NormalizedObject } from '../normalized-object.model'; import { IDToUUIDSerializer } from '../../id-to-uuid-serializer'; +import { ItemType } from '../../../shared/item-relationships/item-type.model'; /** * Normalized model class for a DSpace RelationshipType @@ -12,7 +13,6 @@ import { IDToUUIDSerializer } from '../../id-to-uuid-serializer'; @mapsTo(RelationshipType) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedRelationshipType extends NormalizedObject<RelationshipType> { - /** * The identifier of this RelationshipType */ @@ -59,19 +59,19 @@ export class NormalizedRelationshipType extends NormalizedObject<RelationshipTyp * The type of Item found to the left of this RelationshipType */ @autoserialize - @relationship(ResourceType.ItemType, false) + @relationship(ItemType, false) leftType: string; /** * The type of Item found to the right of this RelationshipType */ @autoserialize - @relationship(ResourceType.ItemType, false) + @relationship(ItemType, false) rightType: string; /** * The universally unique identifier of this RelationshipType */ - @autoserializeAs(new IDToUUIDSerializer(ResourceType.RelationshipType), 'id') + @autoserializeAs(new IDToUUIDSerializer(RelationshipType.type.value), 'id') uuid: string; } diff --git a/src/app/core/cache/models/items/normalized-relationship.model.ts b/src/app/core/cache/models/items/normalized-relationship.model.ts index 92ef96f5d6f5dda5ef807a61f9949d11a8c41323..0930134b18c0548084095ebe4a5c401b4cbd9455 100644 --- a/src/app/core/cache/models/items/normalized-relationship.model.ts +++ b/src/app/core/cache/models/items/normalized-relationship.model.ts @@ -1,9 +1,10 @@ import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize'; import { Relationship } from '../../../shared/item-relationships/relationship.model'; -import { ResourceType } from '../../../shared/resource-type'; import { mapsTo, relationship } from '../../builders/build-decorators'; import { NormalizedObject } from '../normalized-object.model'; import { IDToUUIDSerializer } from '../../id-to-uuid-serializer'; +import { RelationshipType } from '../../../shared/item-relationships/relationship-type.model'; +import { Item } from '../../../shared/item.model'; /** * Normalized model class for a DSpace Relationship @@ -22,14 +23,14 @@ export class NormalizedRelationship extends NormalizedObject<Relationship> { * The item to the left of this relationship */ @autoserialize - @relationship(ResourceType.Item, false) + @relationship(Item, false) leftItem: string; /** * The item to the right of this relationship */ @autoserialize - @relationship(ResourceType.Item, false) + @relationship(Item, false) rightItem: string; /** @@ -48,12 +49,12 @@ export class NormalizedRelationship extends NormalizedObject<Relationship> { * The type of Relationship */ @autoserialize - @relationship(ResourceType.RelationshipType, false) + @relationship(RelationshipType, false) relationshipType: string; /** * The universally unique identifier of this Relationship */ - @autoserializeAs(new IDToUUIDSerializer(ResourceType.Relationship), 'id') + @autoserializeAs(new IDToUUIDSerializer(Relationship.type.value), 'id') uuid: string; } diff --git a/src/app/core/cache/models/normalized-bitstream-format.model.ts b/src/app/core/cache/models/normalized-bitstream-format.model.ts index 994792d53529ceb09af54ff2ea8b561dc85ba6f5..5ee135b530a8e629288b15243f58cae7c9a6219a 100644 --- a/src/app/core/cache/models/normalized-bitstream-format.model.ts +++ b/src/app/core/cache/models/normalized-bitstream-format.model.ts @@ -12,7 +12,6 @@ import { SupportLevel } from './support-level.model'; @mapsTo(BitstreamFormat) @inheritSerialization(NormalizedObject) export class NormalizedBitstreamFormat extends NormalizedObject<BitstreamFormat> { - /** * Short description of this Bitstream Format */ diff --git a/src/app/core/cache/models/normalized-bitstream.model.ts b/src/app/core/cache/models/normalized-bitstream.model.ts index 64a17aae8484e877b884f505180656e4cbf7191e..a9e389fd41a77d1e1d22126c74196bb86fa83673 100644 --- a/src/app/core/cache/models/normalized-bitstream.model.ts +++ b/src/app/core/cache/models/normalized-bitstream.model.ts @@ -1,9 +1,10 @@ -import { inheritSerialization, autoserialize } from 'cerialize'; +import { autoserialize, inheritSerialization } from 'cerialize'; import { NormalizedDSpaceObject } from './normalized-dspace-object.model'; import { Bitstream } from '../../shared/bitstream.model'; import { mapsTo, relationship } from '../builders/build-decorators'; -import { ResourceType } from '../../shared/resource-type'; +import { Item } from '../../shared/item.model'; +import { BitstreamFormat } from '../../shared/bitstream-format.model'; /** * Normalized model class for a DSpace Bitstream @@ -11,7 +12,6 @@ import { ResourceType } from '../../shared/resource-type'; @mapsTo(Bitstream) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedBitstream extends NormalizedDSpaceObject<Bitstream> { - /** * The size of this bitstream in bytes */ @@ -28,7 +28,7 @@ export class NormalizedBitstream extends NormalizedDSpaceObject<Bitstream> { * The format of this Bitstream */ @autoserialize - @relationship(ResourceType.BitstreamFormat, false) + @relationship(BitstreamFormat, false) format: string; /** @@ -41,14 +41,14 @@ export class NormalizedBitstream extends NormalizedDSpaceObject<Bitstream> { * An array of Bundles that are direct parents of this Bitstream */ @autoserialize - @relationship(ResourceType.Item, true) + @relationship(Item, true) parents: string[]; /** * The Bundle that owns this Bitstream */ @autoserialize - @relationship(ResourceType.Item, false) + @relationship(Item, false) owner: string; /** diff --git a/src/app/core/cache/models/normalized-bundle.model.ts b/src/app/core/cache/models/normalized-bundle.model.ts index 342b13629f2ba1eed41e8ea2443b04c650348734..3f4e28bca5365fd2488b99532e6198f6ef0e03a9 100644 --- a/src/app/core/cache/models/normalized-bundle.model.ts +++ b/src/app/core/cache/models/normalized-bundle.model.ts @@ -3,7 +3,7 @@ import { autoserialize, inheritSerialization } from 'cerialize'; import { NormalizedDSpaceObject } from './normalized-dspace-object.model'; import { Bundle } from '../../shared/bundle.model'; import { mapsTo, relationship } from '../builders/build-decorators'; -import { ResourceType } from '../../shared/resource-type'; +import { Bitstream } from '../../shared/bitstream.model'; /** * Normalized model class for a DSpace Bundle @@ -15,7 +15,7 @@ export class NormalizedBundle extends NormalizedDSpaceObject<Bundle> { * The primary bitstream of this Bundle */ @autoserialize - @relationship(ResourceType.Bitstream, false) + @relationship(Bitstream, false) primaryBitstream: string; /** @@ -32,7 +32,7 @@ export class NormalizedBundle extends NormalizedDSpaceObject<Bundle> { * List of Bitstreams that are part of this Bundle */ @autoserialize - @relationship(ResourceType.Bitstream, true) + @relationship(Bitstream, true) bitstreams: string[]; } diff --git a/src/app/core/cache/models/normalized-collection.model.ts b/src/app/core/cache/models/normalized-collection.model.ts index ddfcc29a2cb3ecf9e69c3ee382ac0e94050ef6fa..9b3419675a3c2266c0f6f70eb4ad708abd3ed54c 100644 --- a/src/app/core/cache/models/normalized-collection.model.ts +++ b/src/app/core/cache/models/normalized-collection.model.ts @@ -3,7 +3,15 @@ import { autoserialize, deserialize, inheritSerialization } from 'cerialize'; import { NormalizedDSpaceObject } from './normalized-dspace-object.model'; import { Collection } from '../../shared/collection.model'; import { mapsTo, relationship } from '../builders/build-decorators'; -import { ResourceType } from '../../shared/resource-type'; +import { NormalizedResourcePolicy } from './normalized-resource-policy.model'; +import { NormalizedBitstream } from './normalized-bitstream.model'; +import { NormalizedCommunity } from './normalized-community.model'; +import { NormalizedItem } from './normalized-item.model'; +import { License } from '../../shared/license.model'; +import { ResourcePolicy } from '../../shared/resource-policy.model'; +import { Bitstream } from '../../shared/bitstream.model'; +import { Community } from '../../shared/community.model'; +import { Item } from '../../shared/item.model'; /** * Normalized model class for a DSpace Collection @@ -22,42 +30,42 @@ export class NormalizedCollection extends NormalizedDSpaceObject<Collection> { * The Bitstream that represents the license of this Collection */ @autoserialize - @relationship(ResourceType.License, false) + @relationship(License, false) license: string; /** * The Bitstream that represents the default Access Conditions of this Collection */ @autoserialize - @relationship(ResourceType.ResourcePolicy, false) + @relationship(ResourcePolicy, false) defaultAccessConditions: string; /** * The Bitstream that represents the logo of this Collection */ @deserialize - @relationship(ResourceType.Bitstream, false) + @relationship(Bitstream, false) logo: string; /** * An array of Communities that are direct parents of this Collection */ @deserialize - @relationship(ResourceType.Community, true) + @relationship(Community, true) parents: string[]; /** * The Community that owns this Collection */ @deserialize - @relationship(ResourceType.Community, false) + @relationship(Community, false) owner: string; /** * List of Items that are part of (not necessarily owned by) this Collection */ @deserialize - @relationship(ResourceType.Item, true) + @relationship(Item, true) items: string[]; } diff --git a/src/app/core/cache/models/normalized-community.model.ts b/src/app/core/cache/models/normalized-community.model.ts index f5610899495167480b82be7b9d7411404c76d04d..173760ca720607fbd6d471e89cf704af536a7e37 100644 --- a/src/app/core/cache/models/normalized-community.model.ts +++ b/src/app/core/cache/models/normalized-community.model.ts @@ -1,9 +1,13 @@ -import { autoserialize, deserialize, inheritSerialization, serialize } from 'cerialize'; +import { autoserialize, deserialize, inheritSerialization } from 'cerialize'; import { NormalizedDSpaceObject } from './normalized-dspace-object.model'; import { Community } from '../../shared/community.model'; import { mapsTo, relationship } from '../builders/build-decorators'; import { ResourceType } from '../../shared/resource-type'; +import { NormalizedBitstream } from './normalized-bitstream.model'; +import { NormalizedCollection } from './normalized-collection.model'; +import { Bitstream } from '../../shared/bitstream.model'; +import { Collection } from '../../shared/collection.model'; /** * Normalized model class for a DSpace Community @@ -11,7 +15,6 @@ import { ResourceType } from '../../shared/resource-type'; @mapsTo(Community) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedCommunity extends NormalizedDSpaceObject<Community> { - /** * A string representing the unique handle of this Community */ @@ -22,32 +25,32 @@ export class NormalizedCommunity extends NormalizedDSpaceObject<Community> { * The Bitstream that represents the logo of this Community */ @deserialize - @relationship(ResourceType.Bitstream, false) + @relationship(Bitstream, false) logo: string; /** * An array of Communities that are direct parents of this Community */ @deserialize - @relationship(ResourceType.Community, true) + @relationship(Community, true) parents: string[]; /** * The Community that owns this Community */ @deserialize - @relationship(ResourceType.Community, false) + @relationship(Community, false) owner: string; /** * List of Collections that are owned by this Community */ @deserialize - @relationship(ResourceType.Collection, true) + @relationship(Collection, true) collections: string[]; @deserialize - @relationship(ResourceType.Community, true) + @relationship(Community, true) subcommunities: string[]; } diff --git a/src/app/core/cache/models/normalized-dspace-object.model.ts b/src/app/core/cache/models/normalized-dspace-object.model.ts index e12faa4a7794fd9e35800ec1d6be9963b6e39358..3c43dd85dc8579974d041bcaabb5c253f401a4ef 100644 --- a/src/app/core/cache/models/normalized-dspace-object.model.ts +++ b/src/app/core/cache/models/normalized-dspace-object.model.ts @@ -1,15 +1,15 @@ -import { autoserializeAs, deserializeAs } from 'cerialize'; +import { autoserializeAs, deserializeAs, autoserialize } from 'cerialize'; import { DSpaceObject } from '../../shared/dspace-object.model'; import { MetadataMap, MetadataMapSerializer } from '../../shared/metadata.models'; -import { ResourceType } from '../../shared/resource-type'; import { mapsTo } from '../builders/build-decorators'; import { NormalizedObject } from './normalized-object.model'; +import { TypedObject } from '../object-cache.reducer'; /** * An model class for a DSpaceObject. */ @mapsTo(DSpaceObject) -export class NormalizedDSpaceObject<T extends DSpaceObject> extends NormalizedObject<T> { +export class NormalizedDSpaceObject<T extends DSpaceObject> extends NormalizedObject<T> implements TypedObject { /** * The link to the rest endpoint where this object can be found @@ -38,8 +38,8 @@ export class NormalizedDSpaceObject<T extends DSpaceObject> extends NormalizedOb /** * A string representing the kind of DSpaceObject, e.g. community, item, … */ - @autoserializeAs(String) - type: ResourceType; + @autoserialize + type: string; /** * All metadata of this DSpaceObject diff --git a/src/app/core/cache/models/normalized-item.model.ts b/src/app/core/cache/models/normalized-item.model.ts index d2b7b9c92d9b27d5e213cbaee1acfb1599c70299..4afceb7612b0d08e42abe65866d6e0ff557c6311 100644 --- a/src/app/core/cache/models/normalized-item.model.ts +++ b/src/app/core/cache/models/normalized-item.model.ts @@ -4,6 +4,12 @@ import { NormalizedDSpaceObject } from './normalized-dspace-object.model'; import { Item } from '../../shared/item.model'; import { mapsTo, relationship } from '../builders/build-decorators'; import { ResourceType } from '../../shared/resource-type'; +import { NormalizedCollection } from './normalized-collection.model'; +import { NormalizedBitstream } from './normalized-bitstream.model'; +import { NormalizedRelationship } from './items/normalized-relationship.model'; +import { Collection } from '../../shared/collection.model'; +import { Bitstream } from '../../shared/bitstream.model'; +import { Relationship } from '../../shared/item-relationships/relationship.model'; /** * Normalized model class for a DSpace Item @@ -46,25 +52,25 @@ export class NormalizedItem extends NormalizedDSpaceObject<Item> { * An array of Collections that are direct parents of this Item */ @deserialize - @relationship(ResourceType.Collection, true) + @relationship(Collection, true) parents: string[]; /** * The Collection that owns this Item */ @deserialize - @relationship(ResourceType.Collection, false) + @relationship(Collection, false) owningCollection: string; /** * List of Bitstreams that are owned by this Item */ @deserialize - @relationship(ResourceType.Bitstream, true) + @relationship(Bitstream, true) bitstreams: string[]; @autoserialize - @relationship(ResourceType.Relationship, true) + @relationship(Relationship, true) relationships: string[]; } diff --git a/src/app/core/cache/models/normalized-object-factory.ts b/src/app/core/cache/models/normalized-object-factory.ts deleted file mode 100644 index aa1f6f2958df116dc76c55d63710503e6c15d51e..0000000000000000000000000000000000000000 --- a/src/app/core/cache/models/normalized-object-factory.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { NormalizedItemType } from './items/normalized-item-type.model'; -import { NormalizedRelationshipType } from './items/normalized-relationship-type.model'; -import { NormalizedRelationship } from './items/normalized-relationship.model'; -import { NormalizedBitstream } from './normalized-bitstream.model'; -import { NormalizedBundle } from './normalized-bundle.model'; -import { NormalizedItem } from './normalized-item.model'; -import { NormalizedCollection } from './normalized-collection.model'; -import { GenericConstructor } from '../../shared/generic-constructor'; -import { NormalizedCommunity } from './normalized-community.model'; -import { ResourceType } from '../../shared/resource-type'; -import { NormalizedObject } from './normalized-object.model'; -import { NormalizedLicense } from './normalized-license.model'; -import { NormalizedResourcePolicy } from './normalized-resource-policy.model'; -import { NormalizedWorkspaceItem } from '../../submission/models/normalized-workspaceitem.model'; -import { NormalizedEPerson } from '../../eperson/models/normalized-eperson.model'; -import { NormalizedGroup } from '../../eperson/models/normalized-group.model'; -import { NormalizedWorkflowItem } from '../../submission/models/normalized-workflowitem.model'; -import { NormalizedClaimedTask } from '../../tasks/models/normalized-claimed-task-object.model'; -import { NormalizedPoolTask } from '../../tasks/models/normalized-pool-task-object.model'; -import { NormalizedBitstreamFormat } from './normalized-bitstream-format.model'; -import { NormalizedMetadataSchema } from '../../metadata/normalized-metadata-schema.model'; -import { CacheableObject } from '../object-cache.reducer'; -import { NormalizedSubmissionDefinitionsModel } from '../../config/models/normalized-config-submission-definitions.model'; -import { NormalizedSubmissionFormsModel } from '../../config/models/normalized-config-submission-forms.model'; -import { NormalizedSubmissionSectionModel } from '../../config/models/normalized-config-submission-section.model'; - -export class NormalizedObjectFactory { - public static getConstructor(type: ResourceType): GenericConstructor<NormalizedObject<CacheableObject>> { - switch (type) { - case ResourceType.Bitstream: { - return NormalizedBitstream - } - case ResourceType.Bundle: { - return NormalizedBundle - } - case ResourceType.Item: { - return NormalizedItem - } - case ResourceType.Collection: { - return NormalizedCollection - } - case ResourceType.Community: { - return NormalizedCommunity - } - case ResourceType.BitstreamFormat: { - return NormalizedBitstreamFormat - } - case ResourceType.License: { - return NormalizedLicense - } - case ResourceType.ResourcePolicy: { - return NormalizedResourcePolicy - } - case ResourceType.Relationship: { - return NormalizedRelationship - } - case ResourceType.RelationshipType: { - return NormalizedRelationshipType - } - case ResourceType.ItemType: { - return NormalizedItemType - } - case ResourceType.EPerson: { - return NormalizedEPerson - } - case ResourceType.Group: { - return NormalizedGroup - } - case ResourceType.MetadataSchema: { - return NormalizedMetadataSchema - } - case ResourceType.MetadataField: { - return NormalizedGroup - } - case ResourceType.Workspaceitem: { - return NormalizedWorkspaceItem - } - case ResourceType.Workflowitem: { - return NormalizedWorkflowItem - } - case ResourceType.ClaimedTask: { - return NormalizedClaimedTask - } - case ResourceType.PoolTask: { - return NormalizedPoolTask - } - case ResourceType.SubmissionDefinition: - case ResourceType.SubmissionDefinitions: { - return NormalizedSubmissionDefinitionsModel - } - case ResourceType.SubmissionForm: - case ResourceType.SubmissionForms: { - return NormalizedSubmissionFormsModel - } - case ResourceType.SubmissionSection: - case ResourceType.SubmissionSections: { - return NormalizedSubmissionSectionModel - } - default: { - return undefined; - } - } - } -} diff --git a/src/app/core/cache/models/normalized-object.model.ts b/src/app/core/cache/models/normalized-object.model.ts index 6ac8985d64c9233a08afb2eca8a2c53dc46d6d48..bb5f192a7ade69964806b8981640493ecd4a4dcf 100644 --- a/src/app/core/cache/models/normalized-object.model.ts +++ b/src/app/core/cache/models/normalized-object.model.ts @@ -1,25 +1,24 @@ -import { CacheableObject } from '../object-cache.reducer'; +import { CacheableObject, TypedObject } from '../object-cache.reducer'; import { autoserialize } from 'cerialize'; import { ResourceType } from '../../shared/resource-type'; /** * An abstract model class for a NormalizedObject. */ -export abstract class NormalizedObject<T extends CacheableObject> implements CacheableObject { - +export abstract class NormalizedObject<T extends TypedObject> implements CacheableObject { /** * The link to the rest endpoint where this object can be found */ @autoserialize self: string; - /** - * A string representing the kind of DSpaceObject, e.g. community, item, … - */ - @autoserialize - type: ResourceType; - @autoserialize _links: { [name: string]: string - } + }; + + /** + * A string representing the kind of object + */ + @autoserialize + type: string; } diff --git a/src/app/core/cache/models/normalized-resource-policy.model.ts b/src/app/core/cache/models/normalized-resource-policy.model.ts index 9438c1da0ab48a6f9acd1b43851ace7608c45298..cd25a0af056c223324c037c74de15f629b9bd19b 100644 --- a/src/app/core/cache/models/normalized-resource-policy.model.ts +++ b/src/app/core/cache/models/normalized-resource-policy.model.ts @@ -12,7 +12,6 @@ import { ActionType } from './action-type.model'; @mapsTo(ResourcePolicy) @inheritSerialization(NormalizedObject) export class NormalizedResourcePolicy extends NormalizedObject<ResourcePolicy> { - /** * The action that is allowed by this Resource Policy */ diff --git a/src/app/core/cache/models/support-level.model.ts b/src/app/core/cache/models/support-level.model.ts index 30f759d55ffa23eeb07fba8469ced22ba116a725..103ff2c6269832fc770f60d37cb810d9ca1c6c67 100644 --- a/src/app/core/cache/models/support-level.model.ts +++ b/src/app/core/cache/models/support-level.model.ts @@ -8,7 +8,7 @@ export enum SupportLevel { Unknown = 0, /** - * Unknown for Bitstream Formats that are known to the system, but not fully supported + * Known for Bitstream Formats that are known to the system, but not fully supported */ Known = 1, diff --git a/src/app/core/cache/object-cache.reducer.spec.ts b/src/app/core/cache/object-cache.reducer.spec.ts index efa28d724993015968dde3123181e55ab1f648b3..a65e63ab8624e07af0c07afde8fb822c32240e34 100644 --- a/src/app/core/cache/object-cache.reducer.spec.ts +++ b/src/app/core/cache/object-cache.reducer.spec.ts @@ -9,6 +9,7 @@ import { ResetObjectCacheTimestampsAction } from './object-cache.actions'; import { Operation } from 'fast-json-patch'; +import { Item } from '../shared/item.model'; class NullAction extends RemoveFromObjectCacheAction { type = null; @@ -28,6 +29,7 @@ describe('objectCacheReducer', () => { const testState = { [selfLink1]: { data: { + type: Item.type, self: selfLink1, foo: 'bar' }, @@ -39,6 +41,7 @@ describe('objectCacheReducer', () => { }, [selfLink2]: { data: { + type: Item.type, self: requestUUID2, foo: 'baz' }, @@ -67,7 +70,7 @@ describe('objectCacheReducer', () => { it('should add the payload to the cache in response to an ADD action', () => { const state = Object.create(null); - const objectToCache = { self: selfLink1 }; + const objectToCache = { self: selfLink1, type: Item.type }; const timeAdded = new Date().getTime(); const msToLive = 900000; const requestUUID = requestUUID1; @@ -80,7 +83,12 @@ describe('objectCacheReducer', () => { }); it('should overwrite an object in the cache in response to an ADD action if it already exists', () => { - const objectToCache = { self: selfLink1, foo: 'baz', somethingElse: true }; + const objectToCache = { + self: selfLink1, + foo: 'baz', + somethingElse: true, + type: Item.type + }; const timeAdded = new Date().getTime(); const msToLive = 900000; const requestUUID = requestUUID1; @@ -95,7 +103,7 @@ describe('objectCacheReducer', () => { it('should perform the ADD action without affecting the previous state', () => { const state = Object.create(null); - const objectToCache = { self: selfLink1 }; + const objectToCache = { self: selfLink1, type: Item.type }; const timeAdded = new Date().getTime(); const msToLive = 900000; const requestUUID = requestUUID1; diff --git a/src/app/core/cache/object-cache.reducer.ts b/src/app/core/cache/object-cache.reducer.ts index 982c77341e397de6c88a625ae934af4475accb59..f41151fd90a9d6d11bc65cba612edb7bf815b2a3 100644 --- a/src/app/core/cache/object-cache.reducer.ts +++ b/src/app/core/cache/object-cache.reducer.ts @@ -32,15 +32,19 @@ export interface Patch { operations: Operation[]; } +export abstract class TypedObject { + static type: ResourceType; +} + +/* tslint:disable:max-classes-per-file */ /** * An interface to represent objects that can be cached * * A cacheable object should have a self link */ -export interface CacheableObject { +export class CacheableObject extends TypedObject { uuid?: string; self: string; - type?: ResourceType; // isNew: boolean; // dirtyType: DirtyType; // hasDirtyAttributes: boolean; @@ -59,6 +63,7 @@ export class ObjectCacheEntry implements CacheEntry { patches: Patch[] = []; isDirty: boolean; } +/* tslint:enable:max-classes-per-file */ /** * The ObjectCache State diff --git a/src/app/core/cache/object-cache.service.spec.ts b/src/app/core/cache/object-cache.service.spec.ts index 20e12108ad91bf394da0393d2e29caa856272739..39dc10de2cf26047a520e6ecc9ea5f69299cafc8 100644 --- a/src/app/core/cache/object-cache.service.spec.ts +++ b/src/app/core/cache/object-cache.service.spec.ts @@ -10,13 +10,13 @@ import { RemoveFromObjectCacheAction } from './object-cache.actions'; import { CoreState } from '../core.reducers'; -import { ResourceType } from '../shared/resource-type'; import { NormalizedItem } from './models/normalized-item.model'; import { first } from 'rxjs/operators'; import { Operation } from 'fast-json-patch'; import { RestRequestMethod } from '../data/rest-request-method'; import { AddToSSBAction } from './server-sync-buffer.actions'; import { Patch } from './object-cache.reducer'; +import { Item } from '../shared/item.model'; describe('ObjectCacheService', () => { let service: ObjectCacheService; @@ -28,7 +28,7 @@ describe('ObjectCacheService', () => { const msToLive = 900000; let objectToCache = { self: selfLink, - type: ResourceType.Item + type: Item.type }; let cacheEntry; let invalidCacheEntry; @@ -37,7 +37,7 @@ describe('ObjectCacheService', () => { function init() { objectToCache = { self: selfLink, - type: ResourceType.Item + type: Item.type }; cacheEntry = { data: objectToCache, diff --git a/src/app/core/cache/object-cache.service.ts b/src/app/core/cache/object-cache.service.ts index e6384571c32fbd033dc682620ac14983232b3642..e18ff3b3a4b23b9c674b0e732eef9cfb33417a38 100644 --- a/src/app/core/cache/object-cache.service.ts +++ b/src/app/core/cache/object-cache.service.ts @@ -10,7 +10,6 @@ import { coreSelector } from '../core.selectors'; import { RestRequestMethod } from '../data/rest-request-method'; import { selfLinkFromUuidSelector } from '../index/index.selectors'; import { GenericConstructor } from '../shared/generic-constructor'; -import { NormalizedObjectFactory } from './models/normalized-object-factory'; import { NormalizedObject } from './models/normalized-object.model'; import { AddPatchObjectCacheAction, @@ -21,6 +20,7 @@ import { import { CacheableObject, ObjectCacheEntry, ObjectCacheState } from './object-cache.reducer'; import { AddToSSBAction } from './server-sync-buffer.actions'; +import { getMapsToType } from './builders/build-decorators'; /** * The base selector function to select the object cache in the store @@ -109,7 +109,7 @@ export class ObjectCacheService { } ), map((entry: ObjectCacheEntry) => { - const type: GenericConstructor<NormalizedObject<T>> = NormalizedObjectFactory.getConstructor(entry.data.type); + const type: GenericConstructor<NormalizedObject<T>> = getMapsToType((entry.data as any).type); return Object.assign(new type(), entry.data) as NormalizedObject<T> }) ); diff --git a/src/app/core/cache/response.models.ts b/src/app/core/cache/response.models.ts index b3523addc5b4cd5d1f84b6b761152c61e6e930f7..03233e616b09332296e6158c017674e154142c48 100644 --- a/src/app/core/cache/response.models.ts +++ b/src/app/core/cache/response.models.ts @@ -8,12 +8,12 @@ import { IntegrationModel } from '../integration/models/integration.model'; import { RegistryMetadataschemasResponse } from '../registry/registry-metadataschemas-response.model'; import { RegistryMetadatafieldsResponse } from '../registry/registry-metadatafields-response.model'; import { RegistryBitstreamformatsResponse } from '../registry/registry-bitstreamformats-response.model'; -import { MetadataSchema } from '../metadata/metadataschema.model'; -import { MetadataField } from '../metadata/metadatafield.model'; import { PaginatedList } from '../data/paginated-list'; import { SubmissionObject } from '../submission/models/submission-object.model'; import { DSpaceObject } from '../shared/dspace-object.model'; import { NormalizedAuthStatus } from '../auth/models/normalized-auth-status.model'; +import { MetadataSchema } from '../metadata/metadata-schema.model'; +import { MetadataField } from '../metadata/metadata-field.model'; /* tslint:disable:max-classes-per-file */ export class RestResponse { diff --git a/src/app/core/config/config-response-parsing.service.spec.ts b/src/app/core/config/config-response-parsing.service.spec.ts index 7c69f1bdb3d60cee2d82977084e40751677370e4..90dd1670b8c225ad83e25ad9c285759bbc3de27c 100644 --- a/src/app/core/config/config-response-parsing.service.spec.ts +++ b/src/app/core/config/config-response-parsing.service.spec.ts @@ -8,8 +8,8 @@ import { Store } from '@ngrx/store'; import { CoreState } from '../core.reducers'; import { PaginatedList } from '../data/paginated-list'; import { PageInfo } from '../shared/page-info.model'; -import { NormalizedSubmissionDefinitionsModel } from './models/normalized-config-submission-definitions.model'; import { NormalizedSubmissionSectionModel } from './models/normalized-config-submission-section.model'; +import { NormalizedSubmissionDefinitionModel } from './models/normalized-config-submission-definition.model'; describe('ConfigResponseParsingService', () => { let service: ConfigResponseParsingService; @@ -173,7 +173,7 @@ describe('ConfigResponseParsingService', () => { self: 'https://rest.api/config/submissiondefinitions/traditional/sections' }); const definitions = - Object.assign(new NormalizedSubmissionDefinitionsModel(), { + Object.assign(new NormalizedSubmissionDefinitionModel(), { isDefault: true, name: 'traditional', type: 'submissiondefinition', diff --git a/src/app/core/config/config-response-parsing.service.ts b/src/app/core/config/config-response-parsing.service.ts index b81dc07624b9ca9a61d9366848a674899960292c..08fe581406dccac49c98b23a840954dcf0b3f0b5 100644 --- a/src/app/core/config/config-response-parsing.service.ts +++ b/src/app/core/config/config-response-parsing.service.ts @@ -5,10 +5,8 @@ import { RestRequest } from '../data/request.models'; import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model'; import { ConfigSuccessResponse, ErrorResponse, RestResponse } from '../cache/response.models'; import { isNotEmpty } from '../../shared/empty.util'; -import { ConfigObjectFactory } from './models/config-object-factory'; import { ConfigObject } from './models/config.model'; -import { ConfigType } from './models/config-type'; import { BaseResponseParsingService } from '../data/base-response-parsing.service'; import { GLOBAL_CONFIG } from '../../../config'; import { GlobalConfig } from '../../../config/global-config.interface'; @@ -16,8 +14,6 @@ import { ObjectCacheService } from '../cache/object-cache.service'; @Injectable() export class ConfigResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - - protected objectFactory = ConfigObjectFactory; protected toCache = false; constructor( @@ -28,7 +24,7 @@ export class ConfigResponseParsingService extends BaseResponseParsingService imp parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse { if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links) && (data.statusCode === 201 || data.statusCode === 200)) { - const configDefinition = this.process<ConfigObject,ConfigType>(data.payload, request.uuid); + const configDefinition = this.process<ConfigObject>(data.payload, request.uuid); return new ConfigSuccessResponse(configDefinition, data.statusCode, data.statusText, this.processPageInfo(data.payload)); } else { return new ErrorResponse( diff --git a/src/app/core/config/models/config-object-factory.ts b/src/app/core/config/models/config-object-factory.ts deleted file mode 100644 index 44b2e377c45a95fd6100552900c7a3a75cda9398..0000000000000000000000000000000000000000 --- a/src/app/core/config/models/config-object-factory.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { GenericConstructor } from '../../shared/generic-constructor'; -import { ConfigType } from './config-type'; -import { ConfigObject } from './config.model'; -import { NormalizedSubmissionDefinitionsModel } from './normalized-config-submission-definitions.model'; -import { NormalizedSubmissionFormsModel } from './normalized-config-submission-forms.model'; -import { NormalizedSubmissionSectionModel } from './normalized-config-submission-section.model'; -import { NormalizedSubmissionUploadsModel } from './normalized-config-submission-uploads.model'; - -/** - * Class to return normalized models for config objects - */ -export class ConfigObjectFactory { - public static getConstructor(type): GenericConstructor<ConfigObject> { - switch (type) { - case ConfigType.SubmissionDefinition: - case ConfigType.SubmissionDefinitions: { - return NormalizedSubmissionDefinitionsModel - } - case ConfigType.SubmissionForm: - case ConfigType.SubmissionForms: { - return NormalizedSubmissionFormsModel - } - case ConfigType.SubmissionSection: - case ConfigType.SubmissionSections: { - return NormalizedSubmissionSectionModel - } - case ConfigType.SubmissionUpload: - case ConfigType.SubmissionUploads: { - return NormalizedSubmissionUploadsModel - } - default: { - return undefined; - } - } - } -} diff --git a/src/app/core/config/models/config-submission-definition.model.ts b/src/app/core/config/models/config-submission-definition.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..0449e6a964c3f0c21b0ad50c9a26f35ca91b1004 --- /dev/null +++ b/src/app/core/config/models/config-submission-definition.model.ts @@ -0,0 +1,22 @@ +import { ConfigObject } from './config.model'; +import { SubmissionSectionModel } from './config-submission-section.model'; +import { PaginatedList } from '../../data/paginated-list'; +import { ResourceType } from '../../shared/resource-type'; + +/** + * Class for the configuration describing the submission + */ +export class SubmissionDefinitionModel extends ConfigObject { + static type = new ResourceType('submissiondefinition'); + + /** + * A boolean representing if this submission definition is the default or not + */ + isDefault: boolean; + + /** + * A list of SubmissionSectionModel that are present in this submission definition + */ + sections: PaginatedList<SubmissionSectionModel>; + +} diff --git a/src/app/core/config/models/config-submission-definitions.model.ts b/src/app/core/config/models/config-submission-definitions.model.ts index 8bbbc900566bf1c48c69f1c066013343da3f75e0..d9892f542f3d703116017e813add318d5a290880 100644 --- a/src/app/core/config/models/config-submission-definitions.model.ts +++ b/src/app/core/config/models/config-submission-definitions.model.ts @@ -1,17 +1,7 @@ -import { ConfigObject } from './config.model'; -import { SubmissionSectionModel } from './config-submission-section.model'; -import { PaginatedList } from '../../data/paginated-list'; +import { SubmissionDefinitionModel } from './config-submission-definition.model'; +import { ResourceType } from '../../shared/resource-type'; -export class SubmissionDefinitionsModel extends ConfigObject { - - /** - * A boolean representing if this submission definition is the default or not - */ - isDefault: boolean; - - /** - * A list of SubmissionSectionModel that are present in this submission definition - */ - sections: PaginatedList<SubmissionSectionModel>; +export class SubmissionDefinitionsModel extends SubmissionDefinitionModel { + static type = new ResourceType('submissiondefinitions'); } diff --git a/src/app/core/config/models/config-submission-form.model.ts b/src/app/core/config/models/config-submission-form.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..a65d285c95e9eae45c4a7a34dc3ba4ccc8ab5f88 --- /dev/null +++ b/src/app/core/config/models/config-submission-form.model.ts @@ -0,0 +1,22 @@ +import { ConfigObject } from './config.model'; +import { FormFieldModel } from '../../../shared/form/builder/models/form-field.model'; +import { ResourceType } from '../../shared/resource-type'; + +/** + * An interface that define a form row and its properties. + */ +export interface FormRowModel { + fields: FormFieldModel[]; +} + +/** + * A model class for a NormalizedObject. + */ +export class SubmissionFormModel extends ConfigObject { + static type = new ResourceType('submissionform'); + + /** + * An array of [FormRowModel] that are present in this form + */ + rows: FormRowModel[]; +} diff --git a/src/app/core/config/models/config-submission-forms.model.ts b/src/app/core/config/models/config-submission-forms.model.ts index ee0962f0e959afccb54fa8054b49eab225bda195..017d7d68cc1f813bd1ec68c95727865956c44f6c 100644 --- a/src/app/core/config/models/config-submission-forms.model.ts +++ b/src/app/core/config/models/config-submission-forms.model.ts @@ -1,20 +1,9 @@ -import { ConfigObject } from './config.model'; -import { FormFieldModel } from '../../../shared/form/builder/models/form-field.model'; - -/** - * An interface that define a form row and its properties. - */ -export interface FormRowModel { - fields: FormFieldModel[]; -} +import { SubmissionFormModel } from './config-submission-form.model'; +import { ResourceType } from '../../shared/resource-type'; /** * A model class for a NormalizedObject. */ -export class SubmissionFormsModel extends ConfigObject { - - /** - * An array of [FormRowModel] that are present in this form - */ - rows: FormRowModel[]; +export class SubmissionFormsModel extends SubmissionFormModel { + static type = new ResourceType('submissionforms'); } diff --git a/src/app/core/config/models/config-submission-section.model.ts b/src/app/core/config/models/config-submission-section.model.ts index 377a8869e1e45715158c51a8dc4bdb291b1fc90c..4c560fa631b9e2ccf24c0a434c4a1c2b465e77db 100644 --- a/src/app/core/config/models/config-submission-section.model.ts +++ b/src/app/core/config/models/config-submission-section.model.ts @@ -1,5 +1,6 @@ import { ConfigObject } from './config.model'; import { SectionsType } from '../../../submission/sections/sections-type'; +import { ResourceType } from '../../shared/resource-type'; /** * An interface that define section visibility and its properties. @@ -10,6 +11,7 @@ export interface SubmissionSectionVisibility { } export class SubmissionSectionModel extends ConfigObject { + static type = new ResourceType('submissionsection'); /** * The header for this section diff --git a/src/app/core/config/models/config-submission-sections.model.ts b/src/app/core/config/models/config-submission-sections.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..ae7b1333916fab1c931f368b18ff8b7d7a116845 --- /dev/null +++ b/src/app/core/config/models/config-submission-sections.model.ts @@ -0,0 +1,6 @@ +import { SubmissionSectionModel } from './config-submission-section.model'; +import { ResourceType } from '../../shared/resource-type'; + +export class SubmissionSectionsModel extends SubmissionSectionModel { + static type = new ResourceType('submissionsections'); +} diff --git a/src/app/core/config/models/config-submission-uploads.model.ts b/src/app/core/config/models/config-submission-uploads.model.ts index 8bb9ba7f1e14a3b5a1fb1569429676b7627365cf..812a59004144ce349ced902e0b88dddd3941079e 100644 --- a/src/app/core/config/models/config-submission-uploads.model.ts +++ b/src/app/core/config/models/config-submission-uploads.model.ts @@ -1,9 +1,10 @@ import { ConfigObject } from './config.model'; import { AccessConditionOption } from './config-access-condition-option.model'; import { SubmissionFormsModel } from './config-submission-forms.model'; +import { ResourceType } from '../../shared/resource-type'; export class SubmissionUploadsModel extends ConfigObject { - + static type = new ResourceType('submissionupload'); /** * A list of available bitstream access conditions */ diff --git a/src/app/core/config/models/config.model.ts b/src/app/core/config/models/config.model.ts index 81f20a0b3c00a660817ba7ff227a1ebc5f9a7af1..20d67ec69d3d16691971742bd1ee266929275de9 100644 --- a/src/app/core/config/models/config.model.ts +++ b/src/app/core/config/models/config.model.ts @@ -8,11 +8,6 @@ export abstract class ConfigObject implements CacheableObject { */ public name: string; - /** - * A string representing the kind of config object - */ - public type: ResourceType; - /** * The links to all related resources returned by the rest api. */ diff --git a/src/app/core/config/models/normalized-config-submission-definition.model.ts b/src/app/core/config/models/normalized-config-submission-definition.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..cb56e01acf4a820e3339f8f88e1a8ba8b189bba0 --- /dev/null +++ b/src/app/core/config/models/normalized-config-submission-definition.model.ts @@ -0,0 +1,28 @@ +import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize'; +import { SubmissionSectionModel } from './config-submission-section.model'; +import { PaginatedList } from '../../data/paginated-list'; +import { NormalizedConfigObject } from './normalized-config.model'; +import { SubmissionDefinitionsModel } from './config-submission-definitions.model'; +import { mapsTo } from '../../cache/builders/build-decorators'; +import { SubmissionDefinitionModel } from './config-submission-definition.model'; + +/** + * Normalized class for the configuration describing the submission + */ +@mapsTo(SubmissionDefinitionModel) +@inheritSerialization(NormalizedConfigObject) +export class NormalizedSubmissionDefinitionModel extends NormalizedConfigObject<SubmissionDefinitionModel> { + + /** + * A boolean representing if this submission definition is the default or not + */ + @autoserialize + isDefault: boolean; + + /** + * A list of SubmissionSectionModel that are present in this submission definition + */ + @autoserializeAs(SubmissionSectionModel) + sections: PaginatedList<SubmissionSectionModel>; + +} diff --git a/src/app/core/config/models/normalized-config-submission-definitions.model.ts b/src/app/core/config/models/normalized-config-submission-definitions.model.ts index 3887c566c156a5ef68bcf5e1c0d94f3195100057..4c52d96458d3dbf7039450386fea36319f07fb08 100644 --- a/src/app/core/config/models/normalized-config-submission-definitions.model.ts +++ b/src/app/core/config/models/normalized-config-submission-definitions.model.ts @@ -1,25 +1,13 @@ -import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize'; -import { SubmissionSectionModel } from './config-submission-section.model'; -import { PaginatedList } from '../../data/paginated-list'; +import { inheritSerialization } from 'cerialize'; import { NormalizedConfigObject } from './normalized-config.model'; import { SubmissionDefinitionsModel } from './config-submission-definitions.model'; +import { mapsTo } from '../../cache/builders/build-decorators'; +import { NormalizedSubmissionDefinitionModel } from './normalized-config-submission-definition.model'; /** * Normalized class for the configuration describing the submission */ +@mapsTo(SubmissionDefinitionsModel) @inheritSerialization(NormalizedConfigObject) -export class NormalizedSubmissionDefinitionsModel extends NormalizedConfigObject<SubmissionDefinitionsModel> { - - /** - * A boolean representing if this submission definition is the default or not - */ - @autoserialize - isDefault: boolean; - - /** - * A list of SubmissionSectionModel that are present in this submission definition - */ - @autoserializeAs(SubmissionSectionModel) - sections: PaginatedList<SubmissionSectionModel>; - +export class NormalizedSubmissionDefinitionsModel extends NormalizedSubmissionDefinitionModel { } diff --git a/src/app/core/config/models/normalized-config-submission-form.model.ts b/src/app/core/config/models/normalized-config-submission-form.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..afdfef481854b6015e284aee84326ab9dc4e0f67 --- /dev/null +++ b/src/app/core/config/models/normalized-config-submission-form.model.ts @@ -0,0 +1,18 @@ +import { autoserialize, inheritSerialization } from 'cerialize'; +import { NormalizedConfigObject } from './normalized-config.model'; +import { mapsTo } from '../../cache/builders/build-decorators'; +import { FormRowModel, SubmissionFormModel } from './config-submission-form.model'; + +/** + * Normalized class for the configuration describing the submission form + */ +@mapsTo(SubmissionFormModel) +@inheritSerialization(NormalizedConfigObject) +export class NormalizedSubmissionFormModel extends NormalizedConfigObject<SubmissionFormModel> { + + /** + * An array of [FormRowModel] that are present in this form + */ + @autoserialize + rows: FormRowModel[]; +} diff --git a/src/app/core/config/models/normalized-config-submission-forms.model.ts b/src/app/core/config/models/normalized-config-submission-forms.model.ts index a957e8c7fa6c8b8b9f00aeabcd8cfabd0ea23e81..c040a945874451aa5e2483a56907d8a6de064471 100644 --- a/src/app/core/config/models/normalized-config-submission-forms.model.ts +++ b/src/app/core/config/models/normalized-config-submission-forms.model.ts @@ -1,16 +1,12 @@ -import { autoserialize, inheritSerialization } from 'cerialize'; -import { NormalizedConfigObject } from './normalized-config.model'; -import { FormRowModel, SubmissionFormsModel } from './config-submission-forms.model'; +import { inheritSerialization } from 'cerialize'; +import { mapsTo } from '../../cache/builders/build-decorators'; +import { SubmissionFormsModel } from './config-submission-forms.model'; +import { NormalizedSubmissionFormModel } from './normalized-config-submission-form.model'; /** * Normalized class for the configuration describing the submission form */ -@inheritSerialization(NormalizedConfigObject) -export class NormalizedSubmissionFormsModel extends NormalizedConfigObject<SubmissionFormsModel> { - - /** - * An array of [FormRowModel] that are present in this form - */ - @autoserialize - rows: FormRowModel[]; +@mapsTo(SubmissionFormsModel) +@inheritSerialization(NormalizedSubmissionFormModel) +export class NormalizedSubmissionFormsModel extends NormalizedSubmissionFormModel { } diff --git a/src/app/core/config/models/normalized-config-submission-section.model.ts b/src/app/core/config/models/normalized-config-submission-section.model.ts index c876acf6073b0edb2e1e831e8dd7e17f335f0318..364a981060584192a18df26211b7549b03064abd 100644 --- a/src/app/core/config/models/normalized-config-submission-section.model.ts +++ b/src/app/core/config/models/normalized-config-submission-section.model.ts @@ -1,14 +1,18 @@ import { autoserialize, inheritSerialization } from 'cerialize'; import { SectionsType } from '../../../submission/sections/sections-type'; import { NormalizedConfigObject } from './normalized-config.model'; -import { SubmissionFormsModel } from './config-submission-forms.model'; -import { SubmissionSectionVisibility } from './config-submission-section.model'; +import { + SubmissionSectionModel, + SubmissionSectionVisibility +} from './config-submission-section.model'; +import { mapsTo } from '../../cache/builders/build-decorators'; /** * Normalized class for the configuration describing the submission section */ +@mapsTo(SubmissionSectionModel) @inheritSerialization(NormalizedConfigObject) -export class NormalizedSubmissionSectionModel extends NormalizedConfigObject<SubmissionFormsModel> { +export class NormalizedSubmissionSectionModel extends NormalizedConfigObject<SubmissionSectionModel> { /** * The header for this section diff --git a/src/app/core/config/models/normalized-config-submission-sections.model.ts b/src/app/core/config/models/normalized-config-submission-sections.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..fb1e4c671ab2e56b4ac75131508b2d0306450b04 --- /dev/null +++ b/src/app/core/config/models/normalized-config-submission-sections.model.ts @@ -0,0 +1,18 @@ +import { autoserialize, inheritSerialization } from 'cerialize'; +import { SectionsType } from '../../../submission/sections/sections-type'; +import { NormalizedConfigObject } from './normalized-config.model'; +import { + SubmissionSectionModel, + SubmissionSectionVisibility +} from './config-submission-section.model'; +import { mapsTo } from '../../cache/builders/build-decorators'; +import { SubmissionSectionsModel } from './config-submission-sections.model'; +import { NormalizedSubmissionSectionModel } from './normalized-config-submission-section.model'; + +/** + * Normalized class for the configuration describing the submission section + */ +@mapsTo(SubmissionSectionsModel) +@inheritSerialization(NormalizedSubmissionSectionModel) +export class NormalizedSubmissionSectionsModel extends NormalizedSubmissionSectionModel { +} diff --git a/src/app/core/config/models/normalized-config-submission-uploads.model.ts b/src/app/core/config/models/normalized-config-submission-uploads.model.ts index e49171d6a75f252e83b897fd9408f7ab1c21c3c8..7a21c15912694fccb583e9c7af604a5e401fc9fa 100644 --- a/src/app/core/config/models/normalized-config-submission-uploads.model.ts +++ b/src/app/core/config/models/normalized-config-submission-uploads.model.ts @@ -3,10 +3,12 @@ import { AccessConditionOption } from './config-access-condition-option.model'; import { SubmissionFormsModel } from './config-submission-forms.model'; import { NormalizedConfigObject } from './normalized-config.model'; import { SubmissionUploadsModel } from './config-submission-uploads.model'; +import { mapsTo } from '../../cache/builders/build-decorators'; /** * Normalized class for the configuration describing the submission upload section */ +@mapsTo(SubmissionUploadsModel) @inheritSerialization(NormalizedConfigObject) export class NormalizedSubmissionUploadsModel extends NormalizedConfigObject<SubmissionUploadsModel> { diff --git a/src/app/core/config/models/normalized-config.model.ts b/src/app/core/config/models/normalized-config.model.ts index 0b751585885658ec6e8af666a83d996793ac02f0..1bf4ffb826c17dd9f90420e5ba44916f069f4af8 100644 --- a/src/app/core/config/models/normalized-config.model.ts +++ b/src/app/core/config/models/normalized-config.model.ts @@ -1,6 +1,6 @@ import { autoserialize, inheritSerialization } from 'cerialize'; import { NormalizedObject } from '../../cache/models/normalized-object.model'; -import { CacheableObject } from '../../cache/object-cache.reducer'; +import { CacheableObject, TypedObject } from '../../cache/object-cache.reducer'; import { ResourceType } from '../../shared/resource-type'; /** @@ -15,12 +15,6 @@ export abstract class NormalizedConfigObject<T extends CacheableObject> implemen @autoserialize public name: string; - /** - * A string representing the kind of config object - */ - @autoserialize - public type: ResourceType; - /** * The links to all related resources returned by the rest api. */ diff --git a/src/app/core/core.module.ts b/src/app/core/core.module.ts index 418b22351b22fb5d626f6a27a95a486e3b2779c9..1d22b5fefe23467c0225a7d8cc37b62ec185ae17 100644 --- a/src/app/core/core.module.ts +++ b/src/app/core/core.module.ts @@ -1,14 +1,13 @@ -import { - ModuleWithProviders, - NgModule, - Optional, - SkipSelf -} from '@angular/core'; +import { ModuleWithProviders, NgModule, Optional, SkipSelf } from '@angular/core'; import { CommonModule } from '@angular/common'; import { StoreModule } from '@ngrx/store'; import { EffectsModule } from '@ngrx/effects'; -import { DynamicFormLayoutService, DynamicFormService, DynamicFormValidationService } from '@ng-dynamic-forms/core'; +import { + DynamicFormLayoutService, + DynamicFormService, + DynamicFormValidationService +} from '@ng-dynamic-forms/core'; import { coreEffects } from './core.effects'; import { coreReducers } from './core.reducers'; @@ -65,7 +64,7 @@ import { RegistryService } from './registry/registry.service'; import { RegistryMetadataschemasResponseParsingService } from './data/registry-metadataschemas-response-parsing.service'; import { RegistryMetadatafieldsResponseParsingService } from './data/registry-metadatafields-response-parsing.service'; import { RegistryBitstreamformatsResponseParsingService } from './data/registry-bitstreamformats-response-parsing.service'; -import { WorkflowitemDataService } from './submission/workflowitem-data.service'; +import { WorkflowItemDataService } from './submission/workflowitem-data.service'; import { NotificationsService } from '../shared/notifications/notifications.service'; import { UploaderService } from '../shared/uploader/uploader.service'; import { FileService } from './shared/file.service'; @@ -82,12 +81,42 @@ import { DSOChangeAnalyzer } from './data/dso-change-analyzer.service'; import { ObjectUpdatesService } from './data/object-updates/object-updates.service'; import { DefaultChangeAnalyzer } from './data/default-change-analyzer.service'; import { SearchService } from '../+search-page/search-service/search.service'; +import { NormalizedCollection } from './cache/models/normalized-collection.model'; +import { NormalizedCommunity } from './cache/models/normalized-community.model'; +import { NormalizedDSpaceObject } from './cache/models/normalized-dspace-object.model'; +import { NormalizedBitstream } from './cache/models/normalized-bitstream.model'; +import { NormalizedBundle } from './cache/models/normalized-bundle.model'; +import { NormalizedBitstreamFormat } from './cache/models/normalized-bitstream-format.model'; +import { NormalizedItem } from './cache/models/normalized-item.model'; +import { NormalizedEPerson } from './eperson/models/normalized-eperson.model'; +import { NormalizedGroup } from './eperson/models/normalized-group.model'; +import { NormalizedResourcePolicy } from './cache/models/normalized-resource-policy.model'; +import { NormalizedMetadataSchema } from './metadata/normalized-metadata-schema.model'; +import { NormalizedMetadataField } from './metadata/normalized-metadata-field.model'; +import { NormalizedLicense } from './cache/models/normalized-license.model'; +import { NormalizedWorkflowItem } from './submission/models/normalized-workflowitem.model'; +import { NormalizedWorkspaceItem } from './submission/models/normalized-workspaceitem.model'; +import { NormalizedSubmissionDefinitionsModel } from './config/models/normalized-config-submission-definitions.model'; +import { NormalizedSubmissionFormsModel } from './config/models/normalized-config-submission-forms.model'; +import { NormalizedSubmissionSectionModel } from './config/models/normalized-config-submission-section.model'; +import { NormalizedAuthStatus } from './auth/models/normalized-auth-status.model'; +import { NormalizedAuthorityValue } from './integration/models/normalized-authority-value.model'; import { RoleService } from './roles/role.service'; import { MyDSpaceGuard } from '../+my-dspace-page/my-dspace.guard'; import { MyDSpaceResponseParsingService } from './data/mydspace-response-parsing.service'; import { ClaimedTaskDataService } from './tasks/claimed-task-data.service'; import { PoolTaskDataService } from './tasks/pool-task-data.service'; import { TaskResponseParsingService } from './tasks/task-response-parsing.service'; +import { NormalizedClaimedTask } from './tasks/models/normalized-claimed-task-object.model'; +import { NormalizedTaskObject } from './tasks/models/normalized-task-object.model'; +import { NormalizedPoolTask } from './tasks/models/normalized-pool-task-object.model'; +import { NormalizedRelationship } from './cache/models/items/normalized-relationship.model'; +import { NormalizedRelationshipType } from './cache/models/items/normalized-relationship-type.model'; +import { NormalizedItemType } from './cache/models/items/normalized-item-type.model'; +import { MetadatafieldParsingService } from './data/metadatafield-parsing.service'; +import { NormalizedSubmissionUploadsModel } from './config/models/normalized-config-submission-uploads.model'; +import { NormalizedBrowseEntry } from './shared/normalized-browse-entry.model'; +import { BrowseDefinition } from './shared/browse-definition.model'; const IMPORTS = [ CommonModule, @@ -95,13 +124,9 @@ const IMPORTS = [ EffectsModule.forFeature(coreEffects) ]; -const DECLARATIONS = [ - -]; - -const EXPORTS = [ +const DECLARATIONS = []; -]; +const EXPORTS = []; const PROVIDERS = [ ApiService, @@ -158,11 +183,12 @@ const PROVIDERS = [ AuthorityService, IntegrationResponseParsingService, MetadataschemaParsingService, + MetadatafieldParsingService, UploaderService, UUIDService, NotificationsService, WorkspaceitemDataService, - WorkflowitemDataService, + WorkflowItemDataService, UploaderService, FileService, DSpaceObjectDataService, @@ -188,6 +214,42 @@ const PROVIDERS = [ { provide: NativeWindowService, useFactory: NativeWindowFactory } ]; +/** + * Declaration needed to make sure all decorator functions are called in time + */ +export const normalizedModels = + [ + NormalizedDSpaceObject, + NormalizedBundle, + NormalizedBitstream, + NormalizedBitstreamFormat, + NormalizedItem, + NormalizedCollection, + NormalizedCommunity, + NormalizedEPerson, + NormalizedGroup, + NormalizedResourcePolicy, + NormalizedMetadataSchema, + NormalizedMetadataField, + NormalizedLicense, + NormalizedWorkflowItem, + NormalizedWorkspaceItem, + NormalizedSubmissionDefinitionsModel, + NormalizedSubmissionFormsModel, + NormalizedSubmissionSectionModel, + NormalizedSubmissionUploadsModel, + NormalizedAuthStatus, + NormalizedAuthorityValue, + NormalizedBrowseEntry, + BrowseDefinition, + NormalizedClaimedTask, + NormalizedTaskObject, + NormalizedPoolTask, + NormalizedRelationship, + NormalizedRelationshipType, + NormalizedItemType + ]; + @NgModule({ imports: [ ...IMPORTS @@ -202,8 +264,8 @@ const PROVIDERS = [ ...PROVIDERS ] }) -export class CoreModule { +export class CoreModule { static forRoot(): ModuleWithProviders { return { ngModule: CoreModule, @@ -213,10 +275,9 @@ export class CoreModule { }; } - constructor( @Optional() @SkipSelf() parentModule: CoreModule) { + constructor(@Optional() @SkipSelf() parentModule: CoreModule) { if (isNotEmpty(parentModule)) { throw new Error('CoreModule is already loaded. Import it in the AppModule only'); } } - } diff --git a/src/app/core/data/base-response-parsing.service.ts b/src/app/core/data/base-response-parsing.service.ts index 4ede02778c2c3fc8d459b3f0859199f1eaa89417..0ed5dc363c6ead28b62d93d39c171e02d4d4e2ec 100644 --- a/src/app/core/data/base-response-parsing.service.ts +++ b/src/app/core/data/base-response-parsing.service.ts @@ -7,16 +7,16 @@ import { GlobalConfig } from '../../../config/global-config.interface'; import { GenericConstructor } from '../shared/generic-constructor'; import { PaginatedList } from './paginated-list'; import { isRestDataObject, isRestPaginatedList } from '../cache/builders/normalized-object-build.service'; - +import { ResourceType } from '../shared/resource-type'; +import { getMapsToType } from '../cache/builders/build-decorators'; /* tslint:disable:max-classes-per-file */ export abstract class BaseResponseParsingService { protected abstract EnvConfig: GlobalConfig; protected abstract objectCache: ObjectCacheService; - protected abstract objectFactory: any; protected abstract toCache: boolean; - protected process<ObjectDomain, ObjectType>(data: any, requestUUID: string): any { + protected process<ObjectDomain>(data: any, requestUUID: string): any { if (isNotEmpty(data)) { if (hasNoValue(data) || (typeof data !== 'object')) { return data; @@ -31,7 +31,7 @@ export abstract class BaseResponseParsingService { .keys(data._embedded) .filter((property) => data._embedded.hasOwnProperty(property)) .forEach((property) => { - const parsedObj = this.process<ObjectDomain, ObjectType>(data._embedded[property], requestUUID); + const parsedObj = this.process<ObjectDomain>(data._embedded[property], requestUUID); if (isNotEmpty(parsedObj)) { if (isRestPaginatedList(data._embedded[property])) { object[property] = parsedObj; @@ -60,7 +60,7 @@ export abstract class BaseResponseParsingService { } } - protected processPaginatedList<ObjectDomain, ObjectType>(data: any, requestUUID: string): PaginatedList<ObjectDomain> { + protected processPaginatedList<ObjectDomain>(data: any, requestUUID: string): PaginatedList<ObjectDomain> { const pageInfo: PageInfo = this.processPageInfo(data); let list = data._embedded; @@ -74,7 +74,7 @@ export abstract class BaseResponseParsingService { return new PaginatedList<ObjectDomain>(pageInfo, page, ); } - protected processArray<ObjectDomain, ObjectType>(data: any, requestUUID: string): ObjectDomain[] { + protected processArray<ObjectDomain>(data: any, requestUUID: string): ObjectDomain[] { let array: ObjectDomain[] = []; data.forEach((datum) => { array = [...array, this.process(datum, requestUUID)]; @@ -83,10 +83,10 @@ export abstract class BaseResponseParsingService { return array; } - protected deserialize<ObjectDomain, ObjectType>(obj): any { - const type: ObjectType = obj.type; + protected deserialize<ObjectDomain>(obj): any { + const type: string = obj.type; if (hasValue(type)) { - const normObjConstructor = this.objectFactory.getConstructor(type) as GenericConstructor<ObjectDomain>; + const normObjConstructor = getMapsToType(type) as GenericConstructor<ObjectDomain>; if (hasValue(normObjConstructor)) { const serializer = new DSpaceRESTv2Serializer(normObjConstructor); @@ -104,7 +104,7 @@ export abstract class BaseResponseParsingService { } } - protected cache<ObjectDomain, ObjectType>(obj, requestUUID) { + protected cache<ObjectDomain>(obj, requestUUID) { if (this.toCache) { this.addToObjectCache(obj, requestUUID); } diff --git a/src/app/core/data/browse-entries-response-parsing.service.ts b/src/app/core/data/browse-entries-response-parsing.service.ts index 4690d738ed6e3e324933abfd612ce5dd1cc68a20..a2f5f213123fdecca3a5557c32284ebc51597974 100644 --- a/src/app/core/data/browse-entries-response-parsing.service.ts +++ b/src/app/core/data/browse-entries-response-parsing.service.ts @@ -3,24 +3,17 @@ import { GLOBAL_CONFIG } from '../../../config'; import { GlobalConfig } from '../../../config/global-config.interface'; import { isNotEmpty } from '../../shared/empty.util'; import { ObjectCacheService } from '../cache/object-cache.service'; -import { - ErrorResponse, - GenericSuccessResponse, - RestResponse -} from '../cache/response.models'; +import { ErrorResponse, GenericSuccessResponse, RestResponse } from '../cache/response.models'; import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model'; import { DSpaceRESTv2Serializer } from '../dspace-rest-v2/dspace-rest-v2.serializer'; -import { BrowseEntry } from '../shared/browse-entry.model'; import { BaseResponseParsingService } from './base-response-parsing.service'; import { ResponseParsingService } from './parsing.service'; import { RestRequest } from './request.models'; +import { NormalizedBrowseEntry } from '../shared/normalized-browse-entry.model'; @Injectable() export class BrowseEntriesResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - protected objectFactory = { - getConstructor: () => BrowseEntry - }; protected toCache = false; constructor( @@ -33,7 +26,7 @@ export class BrowseEntriesResponseParsingService extends BaseResponseParsingServ if (isNotEmpty(data.payload)) { let browseEntries = []; if (isNotEmpty(data.payload._embedded) && Array.isArray(data.payload._embedded[Object.keys(data.payload._embedded)[0]])) { - const serializer = new DSpaceRESTv2Serializer(BrowseEntry); + const serializer = new DSpaceRESTv2Serializer(NormalizedBrowseEntry); browseEntries = serializer.deserializeArray(data.payload._embedded[Object.keys(data.payload._embedded)[0]]); } return new GenericSuccessResponse(browseEntries, data.statusCode, data.statusText, this.processPageInfo(data.payload)); diff --git a/src/app/core/data/browse-items-response-parsing-service.ts b/src/app/core/data/browse-items-response-parsing-service.ts index fb950f6c6833f3cb34ade4943da240f5c14a7623..324b36199abad6a765be423921d75fdcfb13cd44 100644 --- a/src/app/core/data/browse-items-response-parsing-service.ts +++ b/src/app/core/data/browse-items-response-parsing-service.ts @@ -18,10 +18,6 @@ import { NormalizedDSpaceObject } from '../cache/models/normalized-dspace-object */ @Injectable() export class BrowseItemsResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - - protected objectFactory = { - getConstructor: () => DSpaceObject - }; protected toCache = false; constructor( diff --git a/src/app/core/data/browse-response-parsing.service.spec.ts b/src/app/core/data/browse-response-parsing.service.spec.ts index c1b0566e0b6c3bb5f90d495d121db9df7f2c94d0..8d0fe7cd41353f590f0828f98d75239092abc425 100644 --- a/src/app/core/data/browse-response-parsing.service.spec.ts +++ b/src/app/core/data/browse-response-parsing.service.spec.ts @@ -113,7 +113,6 @@ describe('BrowseResponseParsingService', () => { } ], defaultSortOrder: 'ASC', - type: 'browse', metadataKeys: [ 'dc.date.issued' ], @@ -139,7 +138,6 @@ describe('BrowseResponseParsingService', () => { } ], defaultSortOrder: 'ASC', - type: 'browse', metadataKeys: [ 'dc.contributor.*', 'dc.creator' @@ -173,6 +171,5 @@ describe('BrowseResponseParsingService', () => { const response = service.parse(validRequest, validResponse); expect((response as GenericSuccessResponse<BrowseDefinition[]>).payload).toEqual(definitions); }); - }); }); diff --git a/src/app/core/data/data.service.ts b/src/app/core/data/data.service.ts index fc4da69a5cd0764ab03a72b86e7b4bd76b669b4e..ad0db51980b2b804edd6f3ca4061da087bde8aff 100644 --- a/src/app/core/data/data.service.ts +++ b/src/app/core/data/data.service.ts @@ -31,12 +31,12 @@ import { configureRequest, getResponseFromEntry } from '../shared/operators'; import { ErrorResponse, RestResponse } from '../cache/response.models'; import { NotificationOptions } from '../../shared/notifications/models/notification-options.model'; import { DSpaceRESTv2Serializer } from '../dspace-rest-v2/dspace-rest-v2.serializer'; -import { NormalizedObjectFactory } from '../cache/models/normalized-object-factory'; import { CacheableObject } from '../cache/object-cache.reducer'; import { RequestEntry } from './request.reducer'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; import { ChangeAnalyzer } from './change-analyzer'; import { RestRequestMethod } from './rest-request-method'; +import { getMapsToType } from '../cache/builders/build-decorators'; export abstract class DataService<T extends CacheableObject> { protected abstract requestService: RequestService; @@ -243,7 +243,7 @@ export abstract class DataService<T extends CacheableObject> { ); const normalizedObject: NormalizedObject<T> = this.dataBuildService.normalize<T>(dso); - const serializedDso = new DSpaceRESTv2Serializer(NormalizedObjectFactory.getConstructor(dso.type)).serialize(normalizedObject); + const serializedDso = new DSpaceRESTv2Serializer(getMapsToType((dso as any).type)).serialize(normalizedObject); const request$ = endpoint$.pipe( take(1), diff --git a/src/app/core/data/dso-response-parsing.service.ts b/src/app/core/data/dso-response-parsing.service.ts index eb95cdae8ac15f1ba951cf9a8647856dd092854d..d6c3b2caa601afa20f197841141df5957f7f910c 100644 --- a/src/app/core/data/dso-response-parsing.service.ts +++ b/src/app/core/data/dso-response-parsing.service.ts @@ -4,8 +4,6 @@ import { ObjectCacheService } from '../cache/object-cache.service'; import { GlobalConfig } from '../../../config/global-config.interface'; import { GLOBAL_CONFIG } from '../../../config'; import { NormalizedObject } from '../cache/models/normalized-object.model'; -import { ResourceType } from '../shared/resource-type'; -import { NormalizedObjectFactory } from '../cache/models/normalized-object-factory'; import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model'; import { RestResponse, DSOSuccessResponse } from '../cache/response.models'; import { RestRequest } from './request.models'; @@ -17,8 +15,6 @@ import { DSpaceObject } from '../shared/dspace-object.model'; @Injectable() export class DSOResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - - protected objectFactory = NormalizedObjectFactory; protected toCache = true; constructor( @@ -34,7 +30,7 @@ export class DSOResponseParsingService extends BaseResponseParsingService implem if (hasValue(data.payload) && hasValue(data.payload.page) && data.payload.page.totalElements === 0) { processRequestDTO = { page: [] }; } else { - processRequestDTO = this.process<NormalizedObject<DSpaceObject>, ResourceType>(data.payload, request.uuid); + processRequestDTO = this.process<NormalizedObject<DSpaceObject>>(data.payload, request.uuid); } let objectList = processRequestDTO; diff --git a/src/app/core/data/facet-config-response-parsing.service.ts b/src/app/core/data/facet-config-response-parsing.service.ts index e65e31764204434bb48d10c20901505393186f2d..15f520b2496f7086ac47e0fb665f6a3328051edc 100644 --- a/src/app/core/data/facet-config-response-parsing.service.ts +++ b/src/app/core/data/facet-config-response-parsing.service.ts @@ -15,7 +15,6 @@ import { GLOBAL_CONFIG } from '../../../config'; @Injectable() export class FacetConfigResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - objectFactory = {}; toCache = false; constructor( @Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig, diff --git a/src/app/core/data/facet-value-map-response-parsing.service.ts b/src/app/core/data/facet-value-map-response-parsing.service.ts index e03c1a78df68191fe4e1f44889fd297a9f419a0d..b67cef97c00be8be3e40261249cfcfdffe3740c9 100644 --- a/src/app/core/data/facet-value-map-response-parsing.service.ts +++ b/src/app/core/data/facet-value-map-response-parsing.service.ts @@ -17,7 +17,6 @@ import { GLOBAL_CONFIG } from '../../../config'; @Injectable() export class FacetValueMapResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - objectFactory = {}; toCache = false; constructor( diff --git a/src/app/core/data/facet-value-response-parsing.service.ts b/src/app/core/data/facet-value-response-parsing.service.ts index e7665ebed2d1ae1397e4d073df4edbbba59227bd..49d72e0a01b4279d8aef790f2d0353e69aae2758 100644 --- a/src/app/core/data/facet-value-response-parsing.service.ts +++ b/src/app/core/data/facet-value-response-parsing.service.ts @@ -12,7 +12,6 @@ import { GlobalConfig } from '../../../config/global-config.interface'; @Injectable() export class FacetValueResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - objectFactory = {}; toCache = false; constructor( @Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig, diff --git a/src/app/core/data/metadata-schema-data.service.ts b/src/app/core/data/metadata-schema-data.service.ts index 5e58d972f79c1cb99785f30c3a82eca7a1175f7b..4baca6e8ed09e2d3c6f967cdaf2b378e40d3613c 100644 --- a/src/app/core/data/metadata-schema-data.service.ts +++ b/src/app/core/data/metadata-schema-data.service.ts @@ -9,12 +9,12 @@ import { RequestService } from './request.service'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { FindAllOptions } from './request.models'; import { ObjectCacheService } from '../cache/object-cache.service'; -import { MetadataSchema } from '../metadata/metadataschema.model'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; import { HttpClient } from '@angular/common/http'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { ChangeAnalyzer } from './change-analyzer'; import { DefaultChangeAnalyzer } from './default-change-analyzer.service'; +import { MetadataSchema } from '../metadata/metadata-schema.model'; /* tslint:disable:max-classes-per-file */ class DataServiceImpl extends DataService<MetadataSchema> { diff --git a/src/app/core/data/metadatafield-parsing.service.ts b/src/app/core/data/metadatafield-parsing.service.ts index f9582c394d836d79f930d307d80629326ae34e7a..092285e9c502e722d820377411e7d24304e9ee44 100644 --- a/src/app/core/data/metadatafield-parsing.service.ts +++ b/src/app/core/data/metadatafield-parsing.service.ts @@ -3,8 +3,8 @@ import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response. import { RestRequest } from './request.models'; import { ResponseParsingService } from './parsing.service'; import { Injectable } from '@angular/core'; -import { MetadatafieldSuccessResponse, MetadataschemaSuccessResponse, RestResponse } from '../cache/response.models'; -import { MetadataField } from '../metadata/metadatafield.model'; +import { MetadatafieldSuccessResponse, RestResponse } from '../cache/response.models'; +import { MetadataField } from '../metadata/metadata-field.model'; /** * A service responsible for parsing DSpaceRESTV2Response data related to a single MetadataField to a valid RestResponse diff --git a/src/app/core/data/metadataschema-parsing.service.ts b/src/app/core/data/metadataschema-parsing.service.ts index f76d6ed2e3b8ee1850e20e56032e05c0718194a1..3e9fd257bb03579326baf206dfbddc7d84fb22d1 100644 --- a/src/app/core/data/metadataschema-parsing.service.ts +++ b/src/app/core/data/metadataschema-parsing.service.ts @@ -1,10 +1,10 @@ -import { MetadataSchema } from '../metadata/metadataschema.model'; import { DSpaceRESTv2Serializer } from '../dspace-rest-v2/dspace-rest-v2.serializer'; import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model'; import { RestRequest } from './request.models'; import { ResponseParsingService } from './parsing.service'; import { Injectable } from '@angular/core'; import { MetadataschemaSuccessResponse, RestResponse } from '../cache/response.models'; +import { MetadataSchema } from '../metadata/metadata-schema.model'; @Injectable() export class MetadataschemaParsingService implements ResponseParsingService { diff --git a/src/app/core/data/request.effects.ts b/src/app/core/data/request.effects.ts index 5e7bec698bf38fc0e0d89dff8aae2bc7f30890bd..9ef85bfe8b26cd1f76eb75b91e5f43ecd2b740dd 100644 --- a/src/app/core/data/request.effects.ts +++ b/src/app/core/data/request.effects.ts @@ -17,10 +17,10 @@ import { RequestError, RestRequest } from './request.models'; import { RequestEntry } from './request.reducer'; import { RequestService } from './request.service'; import { DSpaceRESTv2Serializer } from '../dspace-rest-v2/dspace-rest-v2.serializer'; -import { NormalizedObjectFactory } from '../cache/models/normalized-object-factory'; import { catchError, filter, flatMap, map, take, tap } from 'rxjs/operators'; import { ErrorResponse, RestResponse } from '../cache/response.models'; import { StoreActionTypes } from '../../store.actions'; +import { getMapsToType } from '../cache/builders/build-decorators'; export const addToResponseCacheAndCompleteAction = (request: RestRequest, envConfig: GlobalConfig) => (source: Observable<RestResponse>): Observable<RequestCompleteAction> => @@ -45,7 +45,7 @@ export class RequestEffects { flatMap((request: RestRequest) => { let body; if (isNotEmpty(request.body)) { - const serializer = new DSpaceRESTv2Serializer(NormalizedObjectFactory.getConstructor(request.body.type)); + const serializer = new DSpaceRESTv2Serializer(getMapsToType(request.body.type)); body = serializer.serialize(request.body); } return this.restApi.request(request.method, request.href, body, request.options).pipe( diff --git a/src/app/core/eperson/eperson-response-parsing.service.ts b/src/app/core/eperson/eperson-response-parsing.service.ts index 6c591b0b99391ed7bc97cf6ed55c9d7d81755092..481f37d1fa54731f9953f9ff92826722859ab57f 100644 --- a/src/app/core/eperson/eperson-response-parsing.service.ts +++ b/src/app/core/eperson/eperson-response-parsing.service.ts @@ -9,8 +9,6 @@ import { BaseResponseParsingService } from '../data/base-response-parsing.servic import { GLOBAL_CONFIG } from '../../../config'; import { GlobalConfig } from '../../../config/global-config.interface'; import { ObjectCacheService } from '../cache/object-cache.service'; -import { NormalizedObjectFactory } from '../cache/models/normalized-object-factory'; -import { ResourceType } from '../shared/resource-type'; import { DSpaceObject } from '../shared/dspace-object.model'; /** @@ -19,7 +17,6 @@ import { DSpaceObject } from '../shared/dspace-object.model'; @Injectable() export class EpersonResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - protected objectFactory = NormalizedObjectFactory; protected toCache = false; constructor( @@ -31,7 +28,7 @@ export class EpersonResponseParsingService extends BaseResponseParsingService im parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse { if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links)) { - const epersonDefinition = this.process<DSpaceObject,ResourceType>(data.payload, request.href); + const epersonDefinition = this.process<DSpaceObject>(data.payload, request.href); return new EpersonSuccessResponse(epersonDefinition[Object.keys(epersonDefinition)[0]], data.statusCode, data.statusText, this.processPageInfo(data.payload)); } else { return new ErrorResponse( diff --git a/src/app/core/eperson/models/eperson.model.ts b/src/app/core/eperson/models/eperson.model.ts index f8c11c120157489911cd8492a29e455f63dd808d..d99a059e8b873ed7c0e230e598a04c710388e306 100644 --- a/src/app/core/eperson/models/eperson.model.ts +++ b/src/app/core/eperson/models/eperson.model.ts @@ -4,8 +4,10 @@ import { DSpaceObject } from '../../shared/dspace-object.model'; import { Group } from './group.model'; import { RemoteData } from '../../data/remote-data'; import { PaginatedList } from '../../data/paginated-list'; +import { ResourceType } from '../../shared/resource-type'; export class EPerson extends DSpaceObject { + static type = new ResourceType('eperson'); /** * A string representing the unique handle of this Collection diff --git a/src/app/core/eperson/models/group.model.ts b/src/app/core/eperson/models/group.model.ts index 91ce5d90f3206aca302c163a1321540240182260..9c14c20de77274b6d2846584d868882b7e490d34 100644 --- a/src/app/core/eperson/models/group.model.ts +++ b/src/app/core/eperson/models/group.model.ts @@ -3,8 +3,10 @@ import { Observable } from 'rxjs'; import { DSpaceObject } from '../../shared/dspace-object.model'; import { PaginatedList } from '../../data/paginated-list'; import { RemoteData } from '../../data/remote-data'; +import { ResourceType } from '../../shared/resource-type'; export class Group extends DSpaceObject { + static type = new ResourceType('group'); /** * List of Groups that this Group belong to diff --git a/src/app/core/eperson/models/normalized-eperson.model.ts b/src/app/core/eperson/models/normalized-eperson.model.ts index ad4b20ee8066ad723db5370dd6a787d240e7d375..bf644a83ef6212a4daa8583696e0e33cda911a80 100644 --- a/src/app/core/eperson/models/normalized-eperson.model.ts +++ b/src/app/core/eperson/models/normalized-eperson.model.ts @@ -5,12 +5,11 @@ import { ListableObject } from '../../../shared/object-collection/shared/listabl import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model'; import { EPerson } from './eperson.model'; import { mapsTo, relationship } from '../../cache/builders/build-decorators'; -import { ResourceType } from '../../shared/resource-type'; +import { Group } from './group.model'; @mapsTo(EPerson) @inheritSerialization(NormalizedDSpaceObject) export class NormalizedEPerson extends NormalizedDSpaceObject<EPerson> implements CacheableObject, ListableObject { - /** * A string representing the unique handle of this EPerson */ @@ -21,7 +20,7 @@ export class NormalizedEPerson extends NormalizedDSpaceObject<EPerson> implement * List of Groups that this EPerson belong to */ @deserialize - @relationship(ResourceType.Group, true) + @relationship(Group, true) groups: string[]; /** diff --git a/src/app/core/eperson/models/normalized-group.model.ts b/src/app/core/eperson/models/normalized-group.model.ts index f86bec86281a5ec19d40772e10419d9d96123e6a..329ffb8adfca8976c604d70a8e590afa852be2f3 100644 --- a/src/app/core/eperson/models/normalized-group.model.ts +++ b/src/app/core/eperson/models/normalized-group.model.ts @@ -5,7 +5,6 @@ import { ListableObject } from '../../../shared/object-collection/shared/listabl import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model'; import { mapsTo, relationship } from '../../cache/builders/build-decorators'; import { Group } from './group.model'; -import { ResourceType } from '../../shared/resource-type'; @mapsTo(Group) @inheritSerialization(NormalizedDSpaceObject) @@ -15,7 +14,7 @@ export class NormalizedGroup extends NormalizedDSpaceObject<Group> implements Ca * List of Groups that this Group belong to */ @deserialize - @relationship(ResourceType.Group, true) + @relationship(Group, true) groups: string[]; /** diff --git a/src/app/core/integration/integration-object-factory.ts b/src/app/core/integration/integration-object-factory.ts deleted file mode 100644 index f66a070fdfa3c5bbdbc5484909dbef51d85a95ce..0000000000000000000000000000000000000000 --- a/src/app/core/integration/integration-object-factory.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { GenericConstructor } from '../shared/generic-constructor'; -import { IntegrationType } from './intergration-type'; -import { IntegrationModel } from './models/integration.model'; -import { NormalizedAuthorityValue } from './models/normalized-authority-value.model'; - -export class IntegrationObjectFactory { - public static getConstructor(type): GenericConstructor<IntegrationModel> { - switch (type) { - case IntegrationType.Authority: { - return NormalizedAuthorityValue; - } - default: { - return undefined; - } - } - } -} diff --git a/src/app/core/integration/integration-response-parsing.service.ts b/src/app/core/integration/integration-response-parsing.service.ts index 2d3693cf3d007f360d534acbf3b8d12310ed7147..8cc0f8d2528a5d24e747c95d54873ef57f4dbed5 100644 --- a/src/app/core/integration/integration-response-parsing.service.ts +++ b/src/app/core/integration/integration-response-parsing.service.ts @@ -2,27 +2,20 @@ import { Inject, Injectable } from '@angular/core'; import { RestRequest } from '../data/request.models'; import { ResponseParsingService } from '../data/parsing.service'; import { DSpaceRESTV2Response } from '../dspace-rest-v2/dspace-rest-v2-response.model'; -import { - ErrorResponse, - IntegrationSuccessResponse, - RestResponse -} from '../cache/response.models'; +import { ErrorResponse, IntegrationSuccessResponse, RestResponse } from '../cache/response.models'; import { isNotEmpty } from '../../shared/empty.util'; -import { IntegrationObjectFactory } from './integration-object-factory'; import { BaseResponseParsingService } from '../data/base-response-parsing.service'; import { GLOBAL_CONFIG } from '../../../config'; import { GlobalConfig } from '../../../config/global-config.interface'; import { ObjectCacheService } from '../cache/object-cache.service'; import { IntegrationModel } from './models/integration.model'; -import { IntegrationType } from './intergration-type'; import { AuthorityValue } from './models/authority.value'; import { PaginatedList } from '../data/paginated-list'; @Injectable() export class IntegrationResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - protected objectFactory = IntegrationObjectFactory; protected toCache = true; constructor( @@ -34,7 +27,7 @@ export class IntegrationResponseParsingService extends BaseResponseParsingServic parse(request: RestRequest, data: DSpaceRESTV2Response): RestResponse { if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links)) { - const dataDefinition = this.process<IntegrationModel,IntegrationType>(data.payload, request.uuid); + const dataDefinition = this.process<IntegrationModel>(data.payload, request.uuid); return new IntegrationSuccessResponse(this.processResponse(dataDefinition), data.statusCode, data.statusText, this.processPageInfo(data.payload)); } else { return new ErrorResponse( @@ -49,7 +42,7 @@ export class IntegrationResponseParsingService extends BaseResponseParsingServic protected processResponse(data: PaginatedList<IntegrationModel>): any { const returnList = Array.of(); data.page.forEach((item, index) => { - if (item.type === IntegrationType.Authority) { + if (item.type === AuthorityValue.type.value) { data.page[index] = Object.assign(new AuthorityValue(), item); } }); diff --git a/src/app/core/integration/intergration-type.ts b/src/app/core/integration/intergration-type.ts deleted file mode 100644 index 882dc6d8ce51f11e67c6bcfae0f9454c993c437e..0000000000000000000000000000000000000000 --- a/src/app/core/integration/intergration-type.ts +++ /dev/null @@ -1,4 +0,0 @@ - -export enum IntegrationType { - Authority = 'authority' -} diff --git a/src/app/core/integration/models/authority.value.ts b/src/app/core/integration/models/authority.value.ts index 31cb0a5787f9966584e036b8cca01b9691076449..4c6a7c01cb0a9ad9f14afe5e217dffc0aeedfc48 100644 --- a/src/app/core/integration/models/authority.value.ts +++ b/src/app/core/integration/models/authority.value.ts @@ -3,11 +3,13 @@ import { isNotEmpty } from '../../../shared/empty.util'; import { PLACEHOLDER_PARENT_METADATA } from '../../../shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model'; import { OtherInformation } from '../../../shared/form/builder/models/form-field-metadata-value.model'; import { MetadataValueInterface } from '../../shared/metadata.models'; +import { ResourceType } from '../../shared/resource-type'; /** * Class representing an authority object */ export class AuthorityValue extends IntegrationModel implements MetadataValueInterface { + static type = new ResourceType('authority'); /** * The identifier of this authority diff --git a/src/app/core/metadata/metadata-field.model.ts b/src/app/core/metadata/metadata-field.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..288934e52d7159d39f45350a4c11cbc3fea60cd7 --- /dev/null +++ b/src/app/core/metadata/metadata-field.model.ts @@ -0,0 +1,53 @@ +import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; +import { isNotEmpty } from '../../shared/empty.util'; +import { MetadataSchema } from './metadata-schema.model'; +import { ResourceType } from '../shared/resource-type'; + +/** + * Class the represents a metadata field + */ +export class MetadataField implements ListableObject { + static type = new ResourceType('metadatafield'); + + /** + * The identifier of this metadata field + */ + id: number; + + /** + * The self link of this metadata field + */ + self: string; + + /** + * The element of this metadata field + */ + element: string; + + /** + * The qualifier of this metadata field + */ + qualifier: string; + + /** + * The scope note of this metadata field + */ + scopeNote: string; + + /** + * The metadata schema object of this metadata field + */ + schema: MetadataSchema; + + /** + * Method to print this metadata field as a string + * @param separator The separator between the schema, element and qualifier in the string + */ + toString(separator: string = '.'): string { + let key = this.schema.prefix + separator + this.element; + if (isNotEmpty(this.qualifier)) { + key += separator + this.qualifier; + } + return key; + } +} diff --git a/src/app/core/metadata/metadata-schema.model.ts b/src/app/core/metadata/metadata-schema.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..bc05e475cc4588e82f43469c08de7ce424ea44d3 --- /dev/null +++ b/src/app/core/metadata/metadata-schema.model.ts @@ -0,0 +1,29 @@ +import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; +import { ResourceType } from '../shared/resource-type'; + +/** + * Class that represents a metadata schema + */ +export class MetadataSchema implements ListableObject { + static type = new ResourceType('metadataschema'); + + /** + * The unique identifier for this metadata schema + */ + id: number; + + /** + * The REST link to itself + */ + self: string; + + /** + * A unique prefix that defines this schema + */ + prefix: string; + + /** + * The namespace of this metadata schema + */ + namespace: string; +} diff --git a/src/app/core/metadata/metadata.service.spec.ts b/src/app/core/metadata/metadata.service.spec.ts index cfb5a0751dd664e3b9acc45d5298c30208cd6d69..80ce33b370f7837c22d94c58aed4202fc0a9d75f 100644 --- a/src/app/core/metadata/metadata.service.spec.ts +++ b/src/app/core/metadata/metadata.service.spec.ts @@ -38,6 +38,7 @@ import { EmptyError } from 'rxjs/internal-compatibility'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; import { DSOChangeAnalyzer } from '../data/dso-change-analyzer.service'; import { MetadataValue } from '../shared/metadata.models'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; /* tslint:disable:max-classes-per-file */ @Component({ @@ -206,13 +207,7 @@ describe('MetadataService', () => { }); const mockRemoteData = (mockItem: Item): Observable<RemoteData<Item>> => { - return observableOf(new RemoteData<Item>( - false, - false, - true, - undefined, - MockItem - )); + return createSuccessfulRemoteDataObject$(MockItem); }; const mockType = (mockItem: Item, type: string): Item => { diff --git a/src/app/core/metadata/metadatafield.model.ts b/src/app/core/metadata/metadatafield.model.ts deleted file mode 100644 index ba28b59d0eabb4f283df43235f44b1385fd58c5d..0000000000000000000000000000000000000000 --- a/src/app/core/metadata/metadatafield.model.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { MetadataSchema } from './metadataschema.model'; -import { autoserialize } from 'cerialize'; -import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; -import { isNotEmpty } from '../../shared/empty.util'; - -export class MetadataField implements ListableObject { - @autoserialize - id: number; - - @autoserialize - self: string; - - @autoserialize - element: string; - - @autoserialize - qualifier: string; - - @autoserialize - scopeNote: string; - - @autoserialize - schema: MetadataSchema; - - toString(separator: string = '.'): string { - let key = this.schema.prefix + separator + this.element; - if (isNotEmpty(this.qualifier)) { - key += separator + this.qualifier; - } - return key; - } -} diff --git a/src/app/core/metadata/metadataschema.model.ts b/src/app/core/metadata/metadataschema.model.ts deleted file mode 100644 index 13fb8e8b4e60994d27b0bafd2147d5b115d8716d..0000000000000000000000000000000000000000 --- a/src/app/core/metadata/metadataschema.model.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { autoserialize } from 'cerialize'; -import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; - -export class MetadataSchema implements ListableObject { - @autoserialize - id: number; - - @autoserialize - self: string; - - @autoserialize - prefix: string; - - @autoserialize - namespace: string; -} diff --git a/src/app/core/metadata/normalized-metadata-field.model.ts b/src/app/core/metadata/normalized-metadata-field.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..c6b2ee32f8f24c887eed3f4b00cb7bb005db5269 --- /dev/null +++ b/src/app/core/metadata/normalized-metadata-field.model.ts @@ -0,0 +1,51 @@ +import { autoserialize, deserialize, inheritSerialization } from 'cerialize'; +import { mapsTo, relationship } from '../cache/builders/build-decorators'; +import { MetadataField } from './metadata-field.model'; +import { NormalizedObject } from '../cache/models/normalized-object.model'; +import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; +import { MetadataSchema } from './metadata-schema.model'; + +/** + * Class the represents a normalized metadata field + */ +@mapsTo(MetadataField) +@inheritSerialization(NormalizedObject) +export class NormalizedMetadataField extends NormalizedObject<MetadataField> implements ListableObject { + + /** + * The identifier of this normalized metadata field + */ + @autoserialize + id: number; + + /** + * The self link of this normalized metadata field + */ + @autoserialize + self: string; + + /** + * The element of this normalized metadata field + */ + @autoserialize + element: string; + + /** + * The qualifier of this normalized metadata field + */ + @autoserialize + qualifier: string; + + /** + * The scope note of this normalized metadata field + */ + @autoserialize + scopeNote: string; + + /** + * The link to the metadata schema of this normalized metadata field + */ + @deserialize + @relationship(MetadataSchema) + schema: string; +} diff --git a/src/app/core/metadata/normalized-metadata-schema.model.ts b/src/app/core/metadata/normalized-metadata-schema.model.ts index c1219389403f74fb326030c6b04696db22fbe261..47c7233d81f47387cc4287865b85d5c3b1fc9fec 100644 --- a/src/app/core/metadata/normalized-metadata-schema.model.ts +++ b/src/app/core/metadata/normalized-metadata-schema.model.ts @@ -1,13 +1,14 @@ -import { autoserialize } from 'cerialize'; +import { autoserialize, inheritSerialization } from 'cerialize'; import { NormalizedObject } from '../cache/models/normalized-object.model'; import { mapsTo } from '../cache/builders/build-decorators'; import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; -import { MetadataSchema } from './metadataschema.model'; +import { MetadataSchema } from './metadata-schema.model'; /** * Normalized class for a DSpace MetadataSchema */ @mapsTo(MetadataSchema) +@inheritSerialization(NormalizedObject) export class NormalizedMetadataSchema extends NormalizedObject<MetadataSchema> implements ListableObject { /** * The unique identifier for this schema diff --git a/src/app/core/registry/registry-bitstreamformats-response.model.ts b/src/app/core/registry/registry-bitstreamformats-response.model.ts index 81de379e9e465583961d2054c556724e8d9df5f8..ddf926f3be81458156f6c18f6c55c20dfe52bc28 100644 --- a/src/app/core/registry/registry-bitstreamformats-response.model.ts +++ b/src/app/core/registry/registry-bitstreamformats-response.model.ts @@ -1,9 +1,11 @@ -import { autoserialize, autoserializeAs } from 'cerialize'; +import { autoserialize, deserialize } from 'cerialize'; import { PageInfo } from '../shared/page-info.model'; import { BitstreamFormat } from '../shared/bitstream-format.model'; +import { relationship } from '../cache/builders/build-decorators'; export class RegistryBitstreamformatsResponse { - @autoserializeAs(BitstreamFormat) + @deserialize + @relationship(BitstreamFormat, true) bitstreamformats: BitstreamFormat[]; @autoserialize diff --git a/src/app/core/registry/registry-metadatafields-response.model.ts b/src/app/core/registry/registry-metadatafields-response.model.ts index 19ec537dfbda7fc558ef35027c0b2ab9b6dec07f..984603e42ed63de37ae9f65d298006a5ad26bdbb 100644 --- a/src/app/core/registry/registry-metadatafields-response.model.ts +++ b/src/app/core/registry/registry-metadatafields-response.model.ts @@ -1,14 +1,31 @@ import { PageInfo } from '../shared/page-info.model'; -import { autoserialize, autoserializeAs } from 'cerialize'; -import { MetadataField } from '../metadata/metadatafield.model'; +import { autoserialize, deserialize } from 'cerialize'; +import { ResourceType } from '../shared/resource-type'; +import { relationship } from '../cache/builders/build-decorators'; +import { NormalizedMetadataField } from '../metadata/normalized-metadata-field.model'; +import { MetadataField } from '../metadata/metadata-field.model'; +/** + * Class that represents a response with a registry's metadata fields + */ export class RegistryMetadatafieldsResponse { - @autoserializeAs(MetadataField) + static type = new ResourceType('metadatafield'); + /** + * List of metadata fields in the response + */ + @deserialize + @relationship(MetadataField, true) metadatafields: MetadataField[]; + /** + * Page info of this response + */ @autoserialize page: PageInfo; + /** + * The REST link to this response + */ @autoserialize self: string; } diff --git a/src/app/core/registry/registry-metadataschemas-response.model.ts b/src/app/core/registry/registry-metadataschemas-response.model.ts index 5f4799abd79e630e37cd7652db19f27126a9e9f9..fc53b354a59e3b7f2f825ce3c39ea40e716e7e14 100644 --- a/src/app/core/registry/registry-metadataschemas-response.model.ts +++ b/src/app/core/registry/registry-metadataschemas-response.model.ts @@ -1,9 +1,11 @@ -import { MetadataSchema } from '../metadata/metadataschema.model'; import { PageInfo } from '../shared/page-info.model'; -import { autoserialize, autoserializeAs } from 'cerialize'; +import { autoserialize, deserialize } from 'cerialize'; +import { MetadataSchema } from '../metadata/metadata-schema.model'; +import { relationship } from '../cache/builders/build-decorators'; export class RegistryMetadataschemasResponse { - @autoserializeAs(MetadataSchema) + @deserialize + @relationship(MetadataSchema, true) metadataschemas: MetadataSchema[]; @autoserialize diff --git a/src/app/core/registry/registry.service.spec.ts b/src/app/core/registry/registry.service.spec.ts index 8274ceef609708a20b3bebb5e1d4cd0ada6ca767..47e306d62483e06988c518b775f440b4d24c9e31 100644 --- a/src/app/core/registry/registry.service.spec.ts +++ b/src/app/core/registry/registry.service.spec.ts @@ -39,8 +39,10 @@ import { MetadataRegistrySelectFieldAction, MetadataRegistrySelectSchemaAction } from '../../+admin/admin-registries/metadata-registry/metadata-registry.actions'; -import { MetadataSchema } from '../metadata/metadataschema.model'; -import { MetadataField } from '../metadata/metadatafield.model'; +import { ResourceType } from '../shared/resource-type'; +import { MetadataSchema } from '../metadata/metadata-schema.model'; +import { MetadataField } from '../metadata/metadata-field.model'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; @Component({ template: '' }) class DummyComponent { @@ -59,13 +61,15 @@ describe('RegistryService', () => { id: 1, self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadataschemas/1', prefix: 'dc', - namespace: 'http://dublincore.org/documents/dcmi-terms/' - }, + namespace: 'http://dublincore.org/documents/dcmi-terms/', + type: MetadataSchema.type +}, { id: 2, self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/metadataschemas/2', prefix: 'mock', - namespace: 'http://dspace.org/mockschema' + namespace: 'http://dspace.org/mockschema', + type: MetadataSchema.type } ]; const mockFieldsList = [ @@ -75,7 +79,8 @@ describe('RegistryService', () => { element: 'contributor', qualifier: 'advisor', scopeNote: null, - schema: mockSchemasList[0] + schema: mockSchemasList[0], + type: MetadataField.type }, { id: 2, @@ -83,7 +88,8 @@ describe('RegistryService', () => { element: 'contributor', qualifier: 'author', scopeNote: null, - schema: mockSchemasList[0] + schema: mockSchemasList[0], + type: MetadataField.type }, { id: 3, @@ -91,7 +97,8 @@ describe('RegistryService', () => { element: 'contributor', qualifier: 'editor', scopeNote: 'test scope note', - schema: mockSchemasList[1] + schema: mockSchemasList[1], + type: MetadataField.type }, { id: 4, @@ -99,7 +106,8 @@ describe('RegistryService', () => { element: 'contributor', qualifier: 'illustrator', scopeNote: null, - schema: mockSchemasList[1] + schema: mockSchemasList[1], + type: MetadataField.type } ]; @@ -124,7 +132,7 @@ describe('RegistryService', () => { ); }, aggregate: (input: Array<Observable<RemoteData<any>>>): Observable<RemoteData<any[]>> => { - return observableOf(new RemoteData(false, false, true, null, [])); + return createSuccessfulRemoteDataObject$([]); } }; diff --git a/src/app/core/registry/registry.service.ts b/src/app/core/registry/registry.service.ts index 137b4c3a8727113a8fd9d55b7512a5534f58d750..d816c5eab8681f860bfe278da967e66a0eab28f7 100644 --- a/src/app/core/registry/registry.service.ts +++ b/src/app/core/registry/registry.service.ts @@ -3,8 +3,6 @@ import { Injectable } from '@angular/core'; import { RemoteData } from '../data/remote-data'; import { PaginatedList } from '../data/paginated-list'; import { PageInfo } from '../shared/page-info.model'; -import { MetadataSchema } from '../metadata/metadataschema.model'; -import { MetadataField } from '../metadata/metadatafield.model'; import { BitstreamFormat } from './mock-bitstream-format.model'; import { CreateMetadataFieldRequest, @@ -56,7 +54,6 @@ import { } from '../../+admin/admin-registries/metadata-registry/metadata-registry.actions'; import { distinctUntilChanged, flatMap, map, switchMap, take, tap } from 'rxjs/operators'; import { DSpaceRESTv2Serializer } from '../dspace-rest-v2/dspace-rest-v2.serializer'; -import { NormalizedObjectFactory } from '../cache/models/normalized-object-factory'; import { ResourceType } from '../shared/resource-type'; import { NormalizedMetadataSchema } from '../metadata/normalized-metadata-schema.model'; import { NotificationsService } from '../../shared/notifications/notifications.service'; @@ -64,6 +61,9 @@ import { NotificationOptions } from '../../shared/notifications/models/notificat import { HttpOptions } from '../dspace-rest-v2/dspace-rest-v2.service'; import { HttpHeaders } from '@angular/common/http'; import { TranslateService } from '@ngx-translate/core'; +import { MetadataSchema } from '../metadata/metadata-schema.model'; +import { MetadataField } from '../metadata/metadata-field.model'; +import { getMapsToType } from '../cache/builders/build-decorators'; const metadataRegistryStateSelector = (state: AppState) => state.metadataRegistry; const editMetadataSchemaSelector = createSelector(metadataRegistryStateSelector, (metadataState: MetadataRegistryState) => metadataState.editSchema); @@ -71,6 +71,9 @@ const selectedMetadataSchemasSelector = createSelector(metadataRegistryStateSele const editMetadataFieldSelector = createSelector(metadataRegistryStateSelector, (metadataState: MetadataRegistryState) => metadataState.editField); const selectedMetadataFieldsSelector = createSelector(metadataRegistryStateSelector, (metadataState: MetadataRegistryState) => metadataState.selectedFields); +/** + * Service for registry related CRUD actions such as metadata schema, metadata field and bitstream format + */ @Injectable() export class RegistryService { @@ -87,6 +90,10 @@ export class RegistryService { } + /** + * Retrieves all metadata schemas + * @param pagination The pagination info used to retrieve the schemas + */ public getMetadataSchemas(pagination: PaginationComponentOptions): Observable<RemoteData<PaginatedList<MetadataSchema>>> { const requestObs = this.getMetadataSchemasRequestObs(pagination); @@ -117,6 +124,10 @@ export class RegistryService { return this.rdb.toRemoteDataObservable(requestEntryObs, payloadObs); } + /** + * Retrieves a metadata schema by its name + * @param schemaName The name of the schema to find + */ public getMetadataSchemaByName(schemaName: string): Observable<RemoteData<MetadataSchema>> { // Temporary pagination to get ALL metadataschemas until there's a rest api endpoint for fetching a specific schema const pagination: PaginationComponentOptions = Object.assign(new PaginationComponentOptions(), { @@ -142,6 +153,11 @@ export class RegistryService { return this.rdb.toRemoteDataObservable(requestEntryObs, metadataschemaObs); } + /** + * retrieves all metadata fields that belong to a certain metadata schema + * @param schema The schema to filter by + * @param pagination The pagination info used to retrieve the fields + */ public getMetadataFieldsBySchema(schema: MetadataSchema, pagination: PaginationComponentOptions): Observable<RemoteData<PaginatedList<MetadataField>>> { const requestObs = this.getMetadataFieldsBySchemaRequestObs(pagination, schema); @@ -215,6 +231,10 @@ export class RegistryService { return this.rdb.toRemoteDataObservable(requestEntryObs, payloadObs); } + /** + * Retrieves all bitstream formats + * @param pagination The pagination info used to retrieve the bitstream formats + */ public getBitstreamFormats(pagination: PaginationComponentOptions): Observable<RemoteData<PaginatedList<BitstreamFormat>>> { const requestObs = this.getBitstreamFormatsRequestObs(pagination); @@ -245,7 +265,7 @@ export class RegistryService { return this.rdb.toRemoteDataObservable(requestEntryObs, payloadObs); } - public getMetadataSchemasRequestObs(pagination: PaginationComponentOptions): Observable<RestRequest> { + private getMetadataSchemasRequestObs(pagination: PaginationComponentOptions): Observable<RestRequest> { return this.halService.getEndpoint(this.metadataSchemasPath).pipe( map((url: string) => { const args: string[] = []; @@ -327,58 +347,101 @@ export class RegistryService { ); } + /** + * Method to start editing a metadata schema, dispatches an edit schema action + * @param schema The schema that's being edited + */ public editMetadataSchema(schema: MetadataSchema) { this.store.dispatch(new MetadataRegistryEditSchemaAction(schema)); } + /** + * Method to cancel editing a metadata schema, dispatches a cancel schema action + */ public cancelEditMetadataSchema() { this.store.dispatch(new MetadataRegistryCancelSchemaAction()); } + /** + * Method to retrieve the metadata schema that are currently being edited + */ public getActiveMetadataSchema(): Observable<MetadataSchema> { return this.store.pipe(select(editMetadataSchemaSelector)); } + /** + * Method to select a metadata schema, dispatches a select schema action + * @param schema The schema that's being selected + */ public selectMetadataSchema(schema: MetadataSchema) { this.store.dispatch(new MetadataRegistrySelectSchemaAction(schema)) } + /** + * Method to deselect a metadata schema, dispatches a deselect schema action + * @param schema The schema that's it being deselected + */ public deselectMetadataSchema(schema: MetadataSchema) { this.store.dispatch(new MetadataRegistryDeselectSchemaAction(schema)) } + /** + * Method to deselect all currently selected metadata schema, dispatches a deselect all schema action + */ public deselectAllMetadataSchema() { this.store.dispatch(new MetadataRegistryDeselectAllSchemaAction()) } + /** + * Method to retrieve the metadata schemas that are currently selected + */ public getSelectedMetadataSchemas(): Observable<MetadataSchema[]> { return this.store.pipe(select(selectedMetadataSchemasSelector)); } - + /** + * Method to start editing a metadata field, dispatches an edit field action + * @param field The field that's being edited + */ public editMetadataField(field: MetadataField) { this.store.dispatch(new MetadataRegistryEditFieldAction(field)); } + /** + * Method to cancel editing a metadata field, dispatches a cancel field action + */ public cancelEditMetadataField() { this.store.dispatch(new MetadataRegistryCancelFieldAction()); } - + /** + * Method to retrieve the metadata field that are currently being edited + */ public getActiveMetadataField(): Observable<MetadataField> { return this.store.pipe(select(editMetadataFieldSelector)); } - + /** + * Method to select a metadata field, dispatches a select field action + * @param field The field that's being selected + */ public selectMetadataField(field: MetadataField) { this.store.dispatch(new MetadataRegistrySelectFieldAction(field)) } - + /** + * Method to deselect a metadata field, dispatches a deselect field action + * @param field The field that's it being deselected + */ public deselectMetadataField(field: MetadataField) { this.store.dispatch(new MetadataRegistryDeselectFieldAction(field)) } - + /** + * Method to deselect all currently selected metadata fields, dispatches a deselect all field action + */ public deselectAllMetadataField() { this.store.dispatch(new MetadataRegistryDeselectAllFieldAction()) } + /** + * Method to retrieve the metadata fields that are currently selected + */ public getSelectedMetadataFields(): Observable<MetadataField[]> { return this.store.pipe(select(selectedMetadataFieldsSelector)); } @@ -400,7 +463,7 @@ export class RegistryService { distinctUntilChanged() ); - const serializedSchema = new DSpaceRESTv2Serializer(NormalizedObjectFactory.getConstructor(ResourceType.MetadataSchema)).serialize(schema as NormalizedMetadataSchema); + const serializedSchema = new DSpaceRESTv2Serializer(getMapsToType(MetadataSchema.type)).serialize(schema as NormalizedMetadataSchema); const request$ = endpoint$.pipe( take(1), @@ -444,10 +507,17 @@ export class RegistryService { ); } + /** + * Method to delete a metadata schema + * @param id The id of the metadata schema to delete + */ public deleteMetadataSchema(id: number): Observable<RestResponse> { return this.delete(this.metadataSchemasPath, id); } + /** + * Method that clears a cached metadata schema request and returns its REST url + */ public clearMetadataSchemaRequests(): Observable<string> { return this.halService.getEndpoint(this.metadataSchemasPath).pipe( tap((href: string) => this.requestService.removeByHrefSubstring(href)) @@ -514,10 +584,16 @@ export class RegistryService { ); } + /** + * Method to delete a metadata field + * @param id The id of the metadata field to delete + */ public deleteMetadataField(id: number): Observable<RestResponse> { return this.delete(this.metadataFieldsPath, id); } - + /** + * Method that clears a cached metadata field request and returns its REST url + */ public clearMetadataFieldRequests(): Observable<string> { return this.halService.getEndpoint(this.metadataFieldsPath).pipe( tap((href: string) => this.requestService.removeByHrefSubstring(href)) diff --git a/src/app/core/shared/bitstream-format.model.ts b/src/app/core/shared/bitstream-format.model.ts index 9af345e6074f6f64c48cdb9b520042aaf2868ad5..bf50cd832f552962fca735319c4bd2784855cc57 100644 --- a/src/app/core/shared/bitstream-format.model.ts +++ b/src/app/core/shared/bitstream-format.model.ts @@ -1,12 +1,14 @@ -import { CacheableObject } from '../cache/object-cache.reducer'; +import { CacheableObject, TypedObject } from '../cache/object-cache.reducer'; import { ResourceType } from './resource-type'; /** * Model class for a Bitstream Format */ export class BitstreamFormat implements CacheableObject { + static type = new ResourceType('bitstreamformat'); + bitstreamformat /** * Short description of this Bitstream Format */ @@ -42,11 +44,6 @@ export class BitstreamFormat implements CacheableObject { */ self: string; - /** - * A ResourceType representing the kind of Object of this BitstreamFormat - */ - type: ResourceType; - /** * Universally unique identifier for this Bitstream Format */ diff --git a/src/app/core/shared/bitstream.model.ts b/src/app/core/shared/bitstream.model.ts index 794282e867fa3260f4e87a826ea6f0091d10e4ae..887f7d08439bbca02f70e30d302980054d2d78bb 100644 --- a/src/app/core/shared/bitstream.model.ts +++ b/src/app/core/shared/bitstream.model.ts @@ -3,8 +3,10 @@ import { RemoteData } from '../data/remote-data'; import { Item } from './item.model'; import { BitstreamFormat } from './bitstream-format.model'; import { Observable } from 'rxjs'; +import { ResourceType } from './resource-type'; export class Bitstream extends DSpaceObject { + static type = new ResourceType('bitstream'); /** * The size of this bitstream in bytes @@ -40,5 +42,4 @@ export class Bitstream extends DSpaceObject { * The URL to retrieve this Bitstream's file */ content: string; - } diff --git a/src/app/core/shared/browse-definition.model.ts b/src/app/core/shared/browse-definition.model.ts index 05263858c6072bda8b4fcd740c17340624c29787..9fafe7e3214ba833efe912e0184f8fc57a940487 100644 --- a/src/app/core/shared/browse-definition.model.ts +++ b/src/app/core/shared/browse-definition.model.ts @@ -1,7 +1,11 @@ import { autoserialize, autoserializeAs } from 'cerialize'; import { SortOption } from './sort-option.model'; +import { ResourceType } from './resource-type'; +import { TypedObject } from '../cache/object-cache.reducer'; + +export class BrowseDefinition implements TypedObject { + static type = new ResourceType('browse'); -export class BrowseDefinition { @autoserialize id: string; @@ -14,9 +18,6 @@ export class BrowseDefinition { @autoserializeAs('order') defaultSortOrder: string; - @autoserialize - type: string; - @autoserializeAs('metadata') metadataKeys: string[]; diff --git a/src/app/core/shared/browse-entry.model.ts b/src/app/core/shared/browse-entry.model.ts index 932c6946d16ab22894523cd99fba8cea4a1ad379..d5d4093c81bd0b8375fdd07b02a363cd4c1cc489 100644 --- a/src/app/core/shared/browse-entry.model.ts +++ b/src/app/core/shared/browse-entry.model.ts @@ -1,21 +1,31 @@ -import { autoserialize, autoserializeAs } from 'cerialize'; import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; +import { TypedObject } from '../cache/object-cache.reducer'; +import { ResourceType } from './resource-type'; -export class BrowseEntry implements ListableObject { +/** + * Class object representing a browse entry + * This class is not normalized because browse entries do not have self links + */ +export class BrowseEntry implements ListableObject, TypedObject { + static type = new ResourceType('browseEntry'); - @autoserialize - type: string; - - @autoserialize + /** + * The authority string of this browse entry + */ authority: string; - @autoserialize + /** + * The value of this browse entry + */ value: string; - @autoserializeAs('valueLang') + /** + * The language of the value of this browse entry + */ language: string; - @autoserialize + /** + * The count of this browse entry + */ count: number; - } diff --git a/src/app/core/shared/bundle.model.ts b/src/app/core/shared/bundle.model.ts index 3f5b5df87726bc29027a3117b9d6fd2f3e1ca5cd..9b00f6efa0e0d30d84e40d5e569b1a52a81edaf8 100644 --- a/src/app/core/shared/bundle.model.ts +++ b/src/app/core/shared/bundle.model.ts @@ -3,8 +3,11 @@ import { Bitstream } from './bitstream.model'; import { Item } from './item.model'; import { RemoteData } from '../data/remote-data'; import { Observable } from 'rxjs'; +import { ResourceType } from './resource-type'; export class Bundle extends DSpaceObject { + static type = new ResourceType('bundle'); + /** * The primary bitstream of this Bundle */ diff --git a/src/app/core/shared/collection.model.ts b/src/app/core/shared/collection.model.ts index 0471d1fbbba5f265757f1c19339f7757d3728a9d..642fe5073642ea1bafe214a9de0dd481d00c1ef1 100644 --- a/src/app/core/shared/collection.model.ts +++ b/src/app/core/shared/collection.model.ts @@ -6,8 +6,10 @@ import { Observable } from 'rxjs'; import { License } from './license.model'; import { ResourcePolicy } from './resource-policy.model'; import { PaginatedList } from '../data/paginated-list'; +import { ResourceType } from './resource-type'; export class Collection extends DSpaceObject { + static type = new ResourceType('collection'); /** * A string representing the unique handle of this Collection @@ -80,5 +82,4 @@ export class Collection extends DSpaceObject { owner: Observable<RemoteData<Collection>>; items: Observable<RemoteData<Item[]>>; - } diff --git a/src/app/core/shared/community.model.ts b/src/app/core/shared/community.model.ts index c4e703fd7f88d50a50e9a239d666c17bc6f7b39a..b61ddfd7f9927e27146b2b7cf0337a5296ebf7e4 100644 --- a/src/app/core/shared/community.model.ts +++ b/src/app/core/shared/community.model.ts @@ -4,8 +4,10 @@ import { Collection } from './collection.model'; import { RemoteData } from '../data/remote-data'; import { Observable } from 'rxjs'; import { PaginatedList } from '../data/paginated-list'; +import { ResourceType } from './resource-type'; export class Community extends DSpaceObject { + static type = new ResourceType('community'); /** * A string representing the unique handle of this Community diff --git a/src/app/core/shared/dspace-object.model.ts b/src/app/core/shared/dspace-object.model.ts index 063398b339d6256636783dd55227ae4abe54b600..26f76c5ce2bdf1d086311257d2c849471f910fbf 100644 --- a/src/app/core/shared/dspace-object.model.ts +++ b/src/app/core/shared/dspace-object.model.ts @@ -1,18 +1,26 @@ import { Observable } from 'rxjs'; -import { MetadataMap, MetadataValue, MetadataValueFilter, MetadatumViewModel } from './metadata.models'; +import { + MetadataMap, + MetadataValue, + MetadataValueFilter, + MetadatumViewModel +} from './metadata.models'; import { Metadata } from './metadata.utils'; -import { isUndefined } from '../../shared/empty.util'; +import { hasNoValue, isUndefined } from '../../shared/empty.util'; import { CacheableObject } from '../cache/object-cache.reducer'; import { RemoteData } from '../data/remote-data'; -import { ResourceType } from './resource-type'; import { ListableObject } from '../../shared/object-collection/shared/listable-object.model'; -import { hasNoValue } from '../../shared/empty.util'; +import { ResourceType } from './resource-type'; /** * An abstract model class for a DSpaceObject. */ export class DSpaceObject implements CacheableObject, ListableObject { + /** + * A string representing the kind of DSpaceObject, e.g. community, item, … + */ + static type = new ResourceType('dspaceobject'); private _name: string; @@ -28,11 +36,6 @@ export class DSpaceObject implements CacheableObject, ListableObject { */ uuid: string; - /** - * A string representing the kind of DSpaceObject, e.g. community, item, … - */ - type: ResourceType; - /** * The name for this DSpaceObject */ diff --git a/src/app/core/shared/item-relationships/item-type.model.ts b/src/app/core/shared/item-relationships/item-type.model.ts index e4f98ab653071f3f774c769bb6ce4d8214ded0df..2635f154a8afb7bac9f44f7cd53b041d042247b2 100644 --- a/src/app/core/shared/item-relationships/item-type.model.ts +++ b/src/app/core/shared/item-relationships/item-type.model.ts @@ -5,6 +5,8 @@ import { ResourceType } from '../resource-type'; * Describes a type of Item */ export class ItemType implements CacheableObject { + static type = new ResourceType('entitytype'); + /** * The identifier of this ItemType */ @@ -15,11 +17,6 @@ export class ItemType implements CacheableObject { */ self: string; - /** - * The type of Resource this is - */ - type: ResourceType; - /** * The universally unique identifier of this ItemType */ diff --git a/src/app/core/shared/item-relationships/relationship-type.model.ts b/src/app/core/shared/item-relationships/relationship-type.model.ts index 404d8cdb4b50e727efd17c065cd29b8c9dc4381c..98454bc000121fdef59abfec1d3c6826318c9ce6 100644 --- a/src/app/core/shared/item-relationships/relationship-type.model.ts +++ b/src/app/core/shared/item-relationships/relationship-type.model.ts @@ -8,16 +8,13 @@ import { ItemType } from './item-type.model'; * Describes a type of Relationship between multiple possible Items */ export class RelationshipType implements CacheableObject { + static type = new ResourceType('relationshiptype'); + /** * The link to the rest endpoint where this object can be found */ self: string; - /** - * The type of Resource this is - */ - type: ResourceType; - /** * The label that describes this RelationshipType */ diff --git a/src/app/core/shared/item-relationships/relationship.model.ts b/src/app/core/shared/item-relationships/relationship.model.ts index 63fe7987ab608ab14f75482049f6841eb647b984..9ab9751489298a786e00fafd2c76098d83f09675 100644 --- a/src/app/core/shared/item-relationships/relationship.model.ts +++ b/src/app/core/shared/item-relationships/relationship.model.ts @@ -9,16 +9,13 @@ import { Item } from '../item.model'; * Describes a Relationship between two Items */ export class Relationship implements CacheableObject { + static type = new ResourceType('relationship'); + /** * The link to the rest endpoint where this object can be found */ self: string; - /** - * The type of Resource this is - */ - type: ResourceType; - /** * The universally unique identifier of this Relationship */ diff --git a/src/app/core/shared/item.model.spec.ts b/src/app/core/shared/item.model.spec.ts index 2e5388dc4d507924f96541e1cd30e41fe57a3974..f20fb3299a2fcb1a842af28cde7ede3a0ca7ed83 100644 --- a/src/app/core/shared/item.model.spec.ts +++ b/src/app/core/shared/item.model.spec.ts @@ -1,10 +1,10 @@ import { Observable, of as observableOf } from 'rxjs'; import { Item } from './item.model'; -import { RemoteData } from '../data/remote-data'; import { Bitstream } from './bitstream.model'; import { isEmpty } from '../../shared/empty.util'; import { first, map } from 'rxjs/operators'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; describe('Item', () => { @@ -32,12 +32,11 @@ describe('Item', () => { content: bitstream2Path }]; - remoteDataThumbnail = createRemoteDataObject(thumbnail); - remoteDataFiles = createRemoteDataObject(bitstreams); - remoteDataAll = createRemoteDataObject([...bitstreams, thumbnail]); + remoteDataThumbnail = createSuccessfulRemoteDataObject$(thumbnail); + remoteDataFiles = createSuccessfulRemoteDataObject$(bitstreams); + remoteDataAll = createSuccessfulRemoteDataObject$([...bitstreams, thumbnail]); // Create Bundles - const bundles = [ { @@ -51,7 +50,6 @@ describe('Item', () => { }]; item = Object.assign(new Item(), { bitstreams: remoteDataAll }); - }); it('should return the bitstreams related to this item with the specified bundle name', () => { @@ -99,16 +97,4 @@ describe('Item', () => { }); }); - }); - -function createRemoteDataObject(object: any) { - return observableOf(new RemoteData( - false, - false, - true, - undefined, - object - )); - -} diff --git a/src/app/core/shared/item.model.ts b/src/app/core/shared/item.model.ts index 839103b9f599d8d3bf2d25077c393bedf871dca3..515ea3cd694f98daca658ffe3949b5dde9e9c004 100644 --- a/src/app/core/shared/item.model.ts +++ b/src/app/core/shared/item.model.ts @@ -8,8 +8,10 @@ import { Bitstream } from './bitstream.model'; import { hasValue, isNotEmpty, isNotUndefined } from '../../shared/empty.util'; import { PaginatedList } from '../data/paginated-list'; import { Relationship } from './item-relationships/relationship.model'; +import { ResourceType } from './resource-type'; export class Item extends DSpaceObject { + static type = new ResourceType('item'); /** * A string representing the unique handle of this Item diff --git a/src/app/core/shared/license.model.ts b/src/app/core/shared/license.model.ts index a04422242ac6f2e721616d5c54006e365d51a45a..fa49e1f430f9ee8cdac6e4dfce262b754d0cc560 100644 --- a/src/app/core/shared/license.model.ts +++ b/src/app/core/shared/license.model.ts @@ -1,6 +1,8 @@ import { DSpaceObject } from './dspace-object.model'; +import { ResourceType } from './resource-type'; export class License extends DSpaceObject { + static type = new ResourceType('license'); /** * Is the license custom? diff --git a/src/app/core/shared/normalized-browse-entry.model.ts b/src/app/core/shared/normalized-browse-entry.model.ts new file mode 100644 index 0000000000000000000000000000000000000000..949758cb673354d1240a733de32b86aba9953188 --- /dev/null +++ b/src/app/core/shared/normalized-browse-entry.model.ts @@ -0,0 +1,36 @@ +import { autoserialize, autoserializeAs, inheritSerialization } from 'cerialize'; +import { BrowseEntry } from './browse-entry.model'; +import { NormalizedObject } from '../cache/models/normalized-object.model'; +import { mapsTo } from '../cache/builders/build-decorators'; + +/** + * Class object representing a browse entry + * This class is not normalized because browse entries do not have self links + */ +@mapsTo(BrowseEntry) +@inheritSerialization(NormalizedObject) +export class NormalizedBrowseEntry extends NormalizedObject<BrowseEntry> { + /** + * The authority string of this browse entry + */ + @autoserialize + authority: string; + + /** + * The value of this browse entry + */ + @autoserialize + value: string; + + /** + * The language of the value of this browse entry + */ + @autoserializeAs('valueLang') + language: string; + + /** + * The count of this browse entry + */ + @autoserialize + count: number; +} diff --git a/src/app/core/shared/operators.spec.ts b/src/app/core/shared/operators.spec.ts index 564b0ff31999fe15b54a5d57a2aca79dbe729407..56b5d5db7e738a4c094c4a16e9f1ad6af06ec01a 100644 --- a/src/app/core/shared/operators.spec.ts +++ b/src/app/core/shared/operators.spec.ts @@ -18,6 +18,10 @@ import { import { RemoteData } from '../data/remote-data'; import { RemoteDataError } from '../data/remote-data-error'; import { of as observableOf } from 'rxjs'; +import { + createFailedRemoteDataObject, + createSuccessfulRemoteDataObject +} from '../../shared/testing/utils'; describe('Core Module - RxJS Operators', () => { let scheduler: TestScheduler; @@ -180,17 +184,17 @@ describe('Core Module - RxJS Operators', () => { describe('getSucceededRemoteData', () => { it('should return the first() hasSucceeded RemoteData Observable', () => { const testRD = { - a: new RemoteData(false, false, true, null, undefined), - b: new RemoteData(false, false, false, null, 'b'), + a: createSuccessfulRemoteDataObject(undefined), + b: createFailedRemoteDataObject( 'b'), c: new RemoteData(false, false, undefined, null, 'c'), - d: new RemoteData(false, false, true, null, 'd'), - e: new RemoteData(false, false, true, null, 'e'), + d: createSuccessfulRemoteDataObject('d'), + e: createSuccessfulRemoteDataObject('e'), }; const source = hot('abcde', testRD); const result = source.pipe(getSucceededRemoteData()); result.subscribe((value) => expect(value) - .toEqual(new RemoteData(false, false, true, null, 'd'))); + .toEqual(createSuccessfulRemoteDataObject('d'))); }); }); @@ -202,21 +206,21 @@ describe('Core Module - RxJS Operators', () => { }); it('should call navigateByUrl to a 404 page, when the remote data contains a 404 error', () => { - const testRD = new RemoteData(false, false, false, new RemoteDataError(404, 'Not Found', 'Object was not found'), undefined); + const testRD = createFailedRemoteDataObject(undefined, new RemoteDataError(404, 'Not Found', 'Object was not found')); observableOf(testRD).pipe(redirectToPageNotFoundOn404(router)).subscribe(); expect(router.navigateByUrl).toHaveBeenCalledWith('/404', { skipLocationChange: true }); }); it('should not call navigateByUrl to a 404 page, when the remote data contains another error than a 404', () => { - const testRD = new RemoteData(false, false, false, new RemoteDataError(500, 'Server Error', 'Something went wrong'), undefined); + const testRD = createFailedRemoteDataObject(undefined, new RemoteDataError(500, 'Server Error', 'Something went wrong')); observableOf(testRD).pipe(redirectToPageNotFoundOn404(router)).subscribe(); expect(router.navigateByUrl).not.toHaveBeenCalled(); }); it('should not call navigateByUrl to a 404 page, when the remote data contains no error', () => { - const testRD = new RemoteData(false, false, true, null, undefined); + const testRD = createSuccessfulRemoteDataObject(undefined); observableOf(testRD).pipe(redirectToPageNotFoundOn404(router)).subscribe(); expect(router.navigateByUrl).not.toHaveBeenCalled(); @@ -242,11 +246,11 @@ describe('Core Module - RxJS Operators', () => { describe('getAllSucceededRemoteData', () => { it('should return all hasSucceeded RemoteData Observables', () => { const testRD = { - a: new RemoteData(false, false, true, null, undefined), - b: new RemoteData(false, false, false, null, 'b'), + a: createSuccessfulRemoteDataObject(undefined), + b: createFailedRemoteDataObject('b'), c: new RemoteData(false, false, undefined, null, 'c'), - d: new RemoteData(false, false, true, null, 'd'), - e: new RemoteData(false, false, true, null, 'e'), + d: createSuccessfulRemoteDataObject('d'), + e: createSuccessfulRemoteDataObject('e'), }; const source = hot('abcde', testRD); const result = source.pipe(getAllSucceededRemoteData()); diff --git a/src/app/core/shared/resource-policy.model.ts b/src/app/core/shared/resource-policy.model.ts index ee3d5293f52c2c60db6220255b2b65228065283d..a80446a369eb2e689d47484282be1d79f5da5f80 100644 --- a/src/app/core/shared/resource-policy.model.ts +++ b/src/app/core/shared/resource-policy.model.ts @@ -1,12 +1,13 @@ import { CacheableObject } from '../cache/object-cache.reducer'; import { ResourceType } from './resource-type'; -import { Group } from '../eperson/models/group.model'; import { ActionType } from '../cache/models/action-type.model'; /** * Model class for a Resource Policy */ export class ResourcePolicy implements CacheableObject { + static type = new ResourceType('resourcePolicy'); + /** * The action that is allowed by this Resource Policy */ @@ -27,11 +28,6 @@ export class ResourcePolicy implements CacheableObject { */ self: string; - /** - * A ResourceType representing the kind of Object of this ResourcePolicy - */ - type: ResourceType; - /** * The universally unique identifier for this Resource Policy */ diff --git a/src/app/core/shared/resource-type.ts b/src/app/core/shared/resource-type.ts index bdcc3a52f679a1339f1ce89f6e158be3cb810bc3..657837fbec810717cd5c37c0c7f40141163538bf 100644 --- a/src/app/core/shared/resource-type.ts +++ b/src/app/core/shared/resource-type.ts @@ -1,28 +1,7 @@ -export enum ResourceType { - DSpaceObject = 'dspaceobject', - Bundle = 'bundle', - Bitstream = 'bitstream', - BitstreamFormat = 'bitstreamformat', - Item = 'item', - Collection = 'collection', - Community = 'community', - EPerson = 'eperson', - Group = 'group', - ResourcePolicy = 'resourcePolicy', - MetadataSchema = 'metadataschema', - MetadataField = 'metadatafield', - Relationship = 'relationship', - RelationshipType = 'relationshiptype', - ItemType = 'entitytype', - License = 'license', - Workflowitem = 'workflowitem', - Workspaceitem = 'workspaceitem', - SubmissionDefinitions = 'submissiondefinitions', - SubmissionDefinition = 'submissiondefinition', - SubmissionForm = 'submissionform', - SubmissionForms = 'submissionforms', - SubmissionSections = 'submissionsections', - SubmissionSection = 'submissionsection', - ClaimedTask = 'claimedtask', - PoolTask = 'pooltask' +/** + * Class that represents the type of an object as returned by the REST server + */ +export class ResourceType { + constructor(public value: string) { + } } diff --git a/src/app/core/submission/models/normalized-workflowitem.model.ts b/src/app/core/submission/models/normalized-workflowitem.model.ts index a3fa8992a225cf6852b233cc85927e78165907d1..e96024b4aefbb4a1cbb9c2b24a8f11795b7210b0 100644 --- a/src/app/core/submission/models/normalized-workflowitem.model.ts +++ b/src/app/core/submission/models/normalized-workflowitem.model.ts @@ -1,43 +1,46 @@ import { autoserialize, inheritSerialization } from 'cerialize'; import { mapsTo, relationship } from '../../cache/builders/build-decorators'; -import { Workflowitem } from './workflowitem.model'; +import { WorkflowItem } from './workflowitem.model'; import { NormalizedSubmissionObject } from './normalized-submission-object.model'; -import { ResourceType } from '../../shared/resource-type'; +import { Collection } from '../../shared/collection.model'; +import { Item } from '../../shared/item.model'; +import { SubmissionDefinitionsModel } from '../../config/models/config-submission-definitions.model'; +import { EPerson } from '../../eperson/models/eperson.model'; /** * An model class for a NormalizedWorkflowItem. */ -@mapsTo(Workflowitem) +@mapsTo(WorkflowItem) @inheritSerialization(NormalizedSubmissionObject) -export class NormalizedWorkflowItem extends NormalizedSubmissionObject<Workflowitem> { +export class NormalizedWorkflowItem extends NormalizedSubmissionObject<WorkflowItem> { /** * The collection this workflowitem belonging to */ @autoserialize - @relationship(ResourceType.Collection, false) + @relationship(Collection, false) collection: string; /** * The item created with this workflowitem */ @autoserialize - @relationship(ResourceType.Item, false) + @relationship(Item, false) item: string; /** * The configuration object that define this workflowitem */ @autoserialize - @relationship(ResourceType.SubmissionDefinition, false) + @relationship(SubmissionDefinitionsModel, false) submissionDefinition: string; /** * The EPerson who submit this workflowitem */ @autoserialize - @relationship(ResourceType.EPerson, false) + @relationship(EPerson, false) submitter: string; } diff --git a/src/app/core/submission/models/normalized-workspaceitem.model.ts b/src/app/core/submission/models/normalized-workspaceitem.model.ts index 7c15925c98001493918a2492dfc009c83e800e70..427542019146a20a7d13551001250815acf47a47 100644 --- a/src/app/core/submission/models/normalized-workspaceitem.model.ts +++ b/src/app/core/submission/models/normalized-workspaceitem.model.ts @@ -1,45 +1,47 @@ import { autoserialize, inheritSerialization } from 'cerialize'; -import { Workspaceitem } from './workspaceitem.model'; +import { WorkspaceItem } from './workspaceitem.model'; import { NormalizedSubmissionObject } from './normalized-submission-object.model'; import { mapsTo, relationship } from '../../cache/builders/build-decorators'; import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model'; -import { ResourceType } from '../../shared/resource-type'; -import { Workflowitem } from './workflowitem.model'; +import { Item } from '../../shared/item.model'; +import { Collection } from '../../shared/collection.model'; +import { SubmissionDefinitionModel } from '../../config/models/config-submission-definition.model'; +import { EPerson } from '../../eperson/models/eperson.model'; /** * An model class for a NormalizedWorkspaceItem. */ -@mapsTo(Workspaceitem) +@mapsTo(WorkspaceItem) @inheritSerialization(NormalizedDSpaceObject) @inheritSerialization(NormalizedSubmissionObject) -export class NormalizedWorkspaceItem extends NormalizedSubmissionObject<Workflowitem> { +export class NormalizedWorkspaceItem extends NormalizedSubmissionObject<WorkspaceItem> { /** * The collection this workspaceitem belonging to */ @autoserialize - @relationship(ResourceType.Collection, false) + @relationship(Collection, false) collection: string; /** * The item created with this workspaceitem */ @autoserialize - @relationship(ResourceType.Item, false) + @relationship(Item, false) item: string; /** * The configuration object that define this workspaceitem */ @autoserialize - @relationship(ResourceType.SubmissionDefinition, false) + @relationship(SubmissionDefinitionModel, false) submissionDefinition: string; /** * The EPerson who submit this workspaceitem */ @autoserialize - @relationship(ResourceType.EPerson, false) + @relationship(EPerson, false) submitter: string; } diff --git a/src/app/core/submission/models/workflowitem.model.ts b/src/app/core/submission/models/workflowitem.model.ts index f1a0467f4362e65346db99968247c5fa34631ca3..4cfc4d7fa13473a7af0791d10502b2fd9121ce7c 100644 --- a/src/app/core/submission/models/workflowitem.model.ts +++ b/src/app/core/submission/models/workflowitem.model.ts @@ -1,7 +1,9 @@ -import { Workspaceitem } from './workspaceitem.model'; +import { WorkspaceItem } from './workspaceitem.model'; +import { ResourceType } from '../../shared/resource-type'; /** - * A model class for a Workflowitem. + * A model class for a WorkflowItem. */ -export class Workflowitem extends Workspaceitem { +export class WorkflowItem extends WorkspaceItem { + static type = new ResourceType('workflowitem'); } diff --git a/src/app/core/submission/models/workspaceitem.model.ts b/src/app/core/submission/models/workspaceitem.model.ts index 6548191ba28e14690bc52d1c70c3e3270fd1910f..c4bb5b75201589274d932f53e6d298f34f53ad1a 100644 --- a/src/app/core/submission/models/workspaceitem.model.ts +++ b/src/app/core/submission/models/workspaceitem.model.ts @@ -1,8 +1,10 @@ import { SubmissionObject } from './submission-object.model'; +import { ResourceType } from '../../shared/resource-type'; /** - * A model class for a Workspaceitem. + * A model class for a WorkspaceItem. */ -export class Workspaceitem extends SubmissionObject { +export class WorkspaceItem extends SubmissionObject { + static type = new ResourceType('workspaceitem'); } diff --git a/src/app/core/submission/submission-resource-type.ts b/src/app/core/submission/submission-resource-type.ts deleted file mode 100644 index f5b8e2c42344305d984e06831a1cded5e7450e8e..0000000000000000000000000000000000000000 --- a/src/app/core/submission/submission-resource-type.ts +++ /dev/null @@ -1,21 +0,0 @@ -export enum SubmissionResourceType { - Bundle = 'bundle', - Bitstream = 'bitstream', - BitstreamFormat = 'bitstreamformat', - Item = 'item', - Collection = 'collection', - Community = 'community', - ResourcePolicy = 'resourcePolicy', - License = 'license', - EPerson = 'eperson', - Group = 'group', - WorkspaceItem = 'workspaceitem', - WorkflowItem = 'workflowitem', - SubmissionDefinitions = 'submissiondefinitions', - SubmissionDefinition = 'submissiondefinition', - SubmissionForm = 'submissionform', - SubmissionForms = 'submissionforms', - SubmissionSections = 'submissionsections', - SubmissionSection = 'submissionsection', - Authority = 'authority' -} diff --git a/src/app/core/submission/submission-response-parsing.service.ts b/src/app/core/submission/submission-response-parsing.service.ts index 5206227d4e3d5dc8962383abe062b2e434e2e3b1..de7d683d912bc5f91e34e3cceb01a288a64cc5ad 100644 --- a/src/app/core/submission/submission-response-parsing.service.ts +++ b/src/app/core/submission/submission-response-parsing.service.ts @@ -10,12 +10,10 @@ import { BaseResponseParsingService } from '../data/base-response-parsing.servic import { GLOBAL_CONFIG } from '../../../config'; import { GlobalConfig } from '../../../config/global-config.interface'; import { ObjectCacheService } from '../cache/object-cache.service'; -import { SubmissionResourceType } from './submission-resource-type'; import { NormalizedWorkspaceItem } from './models/normalized-workspaceitem.model'; import { NormalizedWorkflowItem } from './models/normalized-workflowitem.model'; import { FormFieldMetadataValueObject } from '../../shared/form/builder/models/form-field-metadata-value.model'; import { SubmissionObject } from './models/submission-object.model'; -import { NormalizedObjectFactory } from '../cache/models/normalized-object-factory'; /** * Export a function to check if object has same properties of FormFieldMetadataValueObject @@ -75,7 +73,6 @@ export function normalizeSectionData(obj: any, objIndex?: number) { @Injectable() export class SubmissionResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - protected objectFactory = NormalizedObjectFactory; protected toCache = false; constructor(@Inject(GLOBAL_CONFIG) protected EnvConfig: GlobalConfig, @@ -94,7 +91,7 @@ export class SubmissionResponseParsingService extends BaseResponseParsingService if (isNotEmpty(data.payload) && isNotEmpty(data.payload._links) && this.isSuccessStatus(data.statusCode)) { - const dataDefinition = this.processResponse<SubmissionObject | ConfigObject, SubmissionResourceType>(data.payload, request.href); + const dataDefinition = this.processResponse<SubmissionObject | ConfigObject>(data.payload, request.href); return new SubmissionSuccessResponse(dataDefinition, data.statusCode, data.statusText, this.processPageInfo(data.payload)); } else if (isEmpty(data.payload) && this.isSuccessStatus(data.statusCode)) { return new SubmissionSuccessResponse(null, data.statusCode, data.statusText); @@ -115,8 +112,8 @@ export class SubmissionResponseParsingService extends BaseResponseParsingService * @param {string} requestHref * @returns {any[]} */ - protected processResponse<ObjectDomain, ObjectType>(data: any, requestHref: string): any[] { - const dataDefinition = this.process<ObjectDomain, ObjectType>(data, requestHref); + protected processResponse<ObjectDomain>(data: any, requestHref: string): any[] { + const dataDefinition = this.process<ObjectDomain>(data, requestHref); const normalizedDefinition = Array.of(); const processedList = Array.isArray(dataDefinition) ? dataDefinition : Array.of(dataDefinition); diff --git a/src/app/core/submission/workflowitem-data.service.ts b/src/app/core/submission/workflowitem-data.service.ts index e739a62e8196a859174135b85d5aec2aef35ae87..fd769745dadfa550150d3fffb5982e9941a91868 100644 --- a/src/app/core/submission/workflowitem-data.service.ts +++ b/src/app/core/submission/workflowitem-data.service.ts @@ -6,7 +6,7 @@ import { RemoteDataBuildService } from '../cache/builders/remote-data-build.serv import { CoreState } from '../core.reducers'; import { DataService } from '../data/data.service'; import { RequestService } from '../data/request.service'; -import { Workflowitem } from './models/workflowitem.model'; +import { WorkflowItem } from './models/workflowitem.model'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { FindAllOptions } from '../data/request.models'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; @@ -18,12 +18,12 @@ import { DSOChangeAnalyzer } from '../data/dso-change-analyzer.service'; * A service that provides methods to make REST requests with workflowitems endpoint. */ @Injectable() -export class WorkflowitemDataService extends DataService<Workflowitem> { +export class WorkflowItemDataService extends DataService<WorkflowItem> { protected linkPath = 'workflowitems'; protected forceBypassCache = true; constructor( - protected comparator: DSOChangeAnalyzer<Workflowitem>, + protected comparator: DSOChangeAnalyzer<WorkflowItem>, protected dataBuildService: NormalizedObjectBuildService, protected halService: HALEndpointService, protected http: HttpClient, diff --git a/src/app/core/submission/workspaceitem-data.service.ts b/src/app/core/submission/workspaceitem-data.service.ts index 3bb3eb1ee8513ca910c75d10d584482285b5b038..de671d57c71b4c483216d1715d13983fc98ce916 100644 --- a/src/app/core/submission/workspaceitem-data.service.ts +++ b/src/app/core/submission/workspaceitem-data.service.ts @@ -6,24 +6,24 @@ import { RemoteDataBuildService } from '../cache/builders/remote-data-build.serv import { CoreState } from '../core.reducers'; import { DataService } from '../data/data.service'; import { RequestService } from '../data/request.service'; -import { Workspaceitem } from './models/workspaceitem.model'; import { HALEndpointService } from '../shared/hal-endpoint.service'; import { FindAllOptions } from '../data/request.models'; import { NormalizedObjectBuildService } from '../cache/builders/normalized-object-build.service'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { ObjectCacheService } from '../cache/object-cache.service'; import { DSOChangeAnalyzer } from '../data/dso-change-analyzer.service'; +import { WorkspaceItem } from './models/workspaceitem.model'; /** * A service that provides methods to make REST requests with workspaceitems endpoint. */ @Injectable() -export class WorkspaceitemDataService extends DataService<Workspaceitem> { +export class WorkspaceitemDataService extends DataService<WorkspaceItem> { protected linkPath = 'workspaceitems'; protected forceBypassCache = true; constructor( - protected comparator: DSOChangeAnalyzer<Workspaceitem>, + protected comparator: DSOChangeAnalyzer<WorkspaceItem>, protected dataBuildService: NormalizedObjectBuildService, protected halService: HALEndpointService, protected http: HttpClient, diff --git a/src/app/core/tasks/models/claimed-task-object.model.ts b/src/app/core/tasks/models/claimed-task-object.model.ts index 212e75ed95126495cb84cd450b957a00553011ec..2f427f586f46c5be11a33057efa2405cece1bf80 100644 --- a/src/app/core/tasks/models/claimed-task-object.model.ts +++ b/src/app/core/tasks/models/claimed-task-object.model.ts @@ -1,8 +1,9 @@ import { TaskObject } from './task-object.model'; +import { ResourceType } from '../../shared/resource-type'; /** * A model class for a ClaimedTask. */ export class ClaimedTask extends TaskObject { - + static type = new ResourceType('claimedtask'); } diff --git a/src/app/core/tasks/models/normalized-claimed-task-object.model.ts b/src/app/core/tasks/models/normalized-claimed-task-object.model.ts index c2c3f12bc48554e766e899721fed08d16e7af034..d43a277f028ba7eb0c5a0e497aba10eb74bca7b8 100644 --- a/src/app/core/tasks/models/normalized-claimed-task-object.model.ts +++ b/src/app/core/tasks/models/normalized-claimed-task-object.model.ts @@ -2,7 +2,9 @@ import { NormalizedTaskObject } from './normalized-task-object.model'; import { mapsTo, relationship } from '../../cache/builders/build-decorators'; import { autoserialize, inheritSerialization } from 'cerialize'; import { ClaimedTask } from './claimed-task-object.model'; -import { ResourceType } from '../../shared/resource-type'; +import { EPerson } from '../../eperson/models/eperson.model'; +import { Group } from '../../eperson/models/group.model'; +import { WorkflowItem } from '../../submission/models/workflowitem.model'; /** * A normalized model class for a ClaimedTask. @@ -10,7 +12,6 @@ import { ResourceType } from '../../shared/resource-type'; @mapsTo(ClaimedTask) @inheritSerialization(NormalizedTaskObject) export class NormalizedClaimedTask extends NormalizedTaskObject<ClaimedTask> { - /** * The task identifier */ @@ -29,11 +30,25 @@ export class NormalizedClaimedTask extends NormalizedTaskObject<ClaimedTask> { @autoserialize action: string; + /** + * The eperson object for this task + */ + @autoserialize + @relationship(EPerson, false) + eperson: string; + + /** + * The group object for this task + */ + @autoserialize + @relationship(Group, false) + group: string; + /** * The workflowitem object whom this task is related */ @autoserialize - @relationship(ResourceType.Workflowitem, false) + @relationship(WorkflowItem, false) workflowitem: string; } diff --git a/src/app/core/tasks/models/normalized-pool-task-object.model.ts b/src/app/core/tasks/models/normalized-pool-task-object.model.ts index 22cda6ff9cb6e77b0e60faea71c5919168864bb8..bfc782f182f2d7728e1c6213082dccb308d933a7 100644 --- a/src/app/core/tasks/models/normalized-pool-task-object.model.ts +++ b/src/app/core/tasks/models/normalized-pool-task-object.model.ts @@ -2,7 +2,8 @@ import { NormalizedTaskObject } from './normalized-task-object.model'; import { PoolTask } from './pool-task-object.model'; import { autoserialize, inheritSerialization } from 'cerialize'; import { mapsTo, relationship } from '../../cache/builders/build-decorators'; -import { ResourceType } from '../../shared/resource-type'; +import { Group } from '../../eperson/models/group.model'; +import { WorkflowItem } from '../../submission/models/workflowitem.model'; /** * A normalized model class for a PoolTask. @@ -10,7 +11,6 @@ import { ResourceType } from '../../shared/resource-type'; @mapsTo(PoolTask) @inheritSerialization(NormalizedTaskObject) export class NormalizedPoolTask extends NormalizedTaskObject<PoolTask> { - /** * The task identifier */ @@ -29,10 +29,17 @@ export class NormalizedPoolTask extends NormalizedTaskObject<PoolTask> { @autoserialize action: string; + /** + * The group object for this task + */ + @autoserialize + @relationship(Group, false) + group: string; + /** * The workflowitem object whom this task is related */ @autoserialize - @relationship(ResourceType.Workflowitem, false) + @relationship(WorkflowItem, false) workflowitem: string; } diff --git a/src/app/core/tasks/models/normalized-task-object.model.ts b/src/app/core/tasks/models/normalized-task-object.model.ts index 52c274e3a8b14d5ccb46975456319dec5633e21a..2c96b9539300df3f3295c291a162ae264e699249 100644 --- a/src/app/core/tasks/models/normalized-task-object.model.ts +++ b/src/app/core/tasks/models/normalized-task-object.model.ts @@ -1,16 +1,18 @@ import { autoserialize, inheritSerialization } from 'cerialize'; import { mapsTo, relationship } from '../../cache/builders/build-decorators'; -import { ResourceType } from '../../shared/resource-type'; import { NormalizedDSpaceObject } from '../../cache/models/normalized-dspace-object.model'; import { TaskObject } from './task-object.model'; import { DSpaceObject } from '../../shared/dspace-object.model'; +import { Group } from '../../eperson/models/group.model'; +import { EPerson } from '../../eperson/models/eperson.model'; +import { WorkflowItem } from '../../submission/models/workflowitem.model'; /** * An abstract normalized model class for a TaskObject. */ @mapsTo(TaskObject) @inheritSerialization(NormalizedDSpaceObject) -export abstract class NormalizedTaskObject<T extends DSpaceObject> extends NormalizedDSpaceObject<T> { +export class NormalizedTaskObject<T extends DSpaceObject> extends NormalizedDSpaceObject<T> { /** * The task identifier @@ -30,10 +32,24 @@ export abstract class NormalizedTaskObject<T extends DSpaceObject> extends Norma @autoserialize action: string; + /** + * The eperson object for this task + */ + @autoserialize + @relationship(EPerson, false) + eperson: string; + + /** + * The group object for this task + */ + @autoserialize + @relationship(Group, false) + group: string; + /** * The workflowitem object whom this task is related */ @autoserialize - @relationship(ResourceType.Workflowitem, false) + @relationship(WorkflowItem, false) workflowitem: string; } diff --git a/src/app/core/tasks/models/pool-task-object.model.ts b/src/app/core/tasks/models/pool-task-object.model.ts index 8d98d3e1a5776e6ffce820d029d16e29476854d2..876b62373df32c413fc2e6b250b1ff91c40c697e 100644 --- a/src/app/core/tasks/models/pool-task-object.model.ts +++ b/src/app/core/tasks/models/pool-task-object.model.ts @@ -1,8 +1,9 @@ import { TaskObject } from './task-object.model'; +import { ResourceType } from '../../shared/resource-type'; /** * A model class for a PoolTask. */ export class PoolTask extends TaskObject { - + static type = new ResourceType('pooltask'); } diff --git a/src/app/core/tasks/models/task-object.model.ts b/src/app/core/tasks/models/task-object.model.ts index 97a1c9f59e57ce456cc1fb89198222bca92b0ff8..14dbbd730192182293805ef7d34491121db879b0 100644 --- a/src/app/core/tasks/models/task-object.model.ts +++ b/src/app/core/tasks/models/task-object.model.ts @@ -4,12 +4,16 @@ import { CacheableObject } from '../../cache/object-cache.reducer'; import { DSpaceObject } from '../../shared/dspace-object.model'; import { ListableObject } from '../../../shared/object-collection/shared/listable-object.model'; import { RemoteData } from '../../data/remote-data'; -import { Workflowitem } from '../../submission/models/workflowitem.model'; +import { WorkflowItem } from '../../submission/models/workflowitem.model'; +import { Group } from '../../eperson/models/group.model'; +import { EPerson } from '../../eperson/models/eperson.model'; +import { ResourceType } from '../../shared/resource-type'; /** * An abstract model class for a TaskObject. */ export class TaskObject extends DSpaceObject implements CacheableObject, ListableObject { + static type = new ResourceType('taskobject'); /** * The task identifier @@ -26,8 +30,18 @@ export class TaskObject extends DSpaceObject implements CacheableObject, Listabl */ action: string; + /** + * The group of this task + */ + eperson: Observable<RemoteData<EPerson>>; + + /** + * The group of this task + */ + group: Observable<RemoteData<Group>>; + /** * The workflowitem object whom this task is related */ - workflowitem: Observable<RemoteData<Workflowitem>> | Workflowitem; + workflowitem: Observable<RemoteData<WorkflowItem>> | WorkflowItem; } diff --git a/src/app/core/tasks/task-response-parsing.service.ts b/src/app/core/tasks/task-response-parsing.service.ts index 7445f9d26729556cfa9bd47f6fd263124918239a..090b67ccbb1994a09c792bcab8c552158d340efd 100644 --- a/src/app/core/tasks/task-response-parsing.service.ts +++ b/src/app/core/tasks/task-response-parsing.service.ts @@ -8,7 +8,6 @@ import { BaseResponseParsingService } from '../data/base-response-parsing.servic import { GLOBAL_CONFIG } from '../../../config'; import { GlobalConfig } from '../../../config/global-config.interface'; import { ObjectCacheService } from '../cache/object-cache.service'; -import { NormalizedObjectFactory } from '../cache/models/normalized-object-factory'; import { ErrorResponse, RestResponse, TaskResponse } from '../cache/response.models'; /** @@ -17,7 +16,6 @@ import { ErrorResponse, RestResponse, TaskResponse } from '../cache/response.mod @Injectable() export class TaskResponseParsingService extends BaseResponseParsingService implements ResponseParsingService { - protected objectFactory = NormalizedObjectFactory; protected toCache = false; /** diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.spec.ts b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.spec.ts index 7c4f4349c317e957ee7880d9ba9858bd11c8998c..00403473a7917a68fe1a392ebded4844cfafb448 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-pages/journal-issue/journal-issue.component.spec.ts @@ -8,9 +8,10 @@ import { createRelationshipsObservable, getItemPageFieldsTest } from '../../../../+item-page/simple/item-types/shared/item.component.spec'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: { 'publicationissue.issueNumber': [ { diff --git a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.spec.ts b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.spec.ts index e5da5675f47ec2fd0946a65faf4207820093ee78..d2b3420b2abccac03192a711fc546782eda6d259 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-pages/journal-volume/journal-volume.component.spec.ts @@ -8,9 +8,10 @@ import { createRelationshipsObservable, getItemPageFieldsTest } from '../../../../+item-page/simple/item-types/shared/item.component.spec'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: { 'publicationvolume.volumeNumber': [ { diff --git a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts index 9690c74966258bf984743cadd553417bd3fab465..c66c3a246241f86893d4e95ebf4d7f50b8cc987c 100644 --- a/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts +++ b/src/app/entity-groups/journal-entities/item-pages/journal/journal.component.spec.ts @@ -15,12 +15,13 @@ import { isNotEmpty } from '../../../../shared/empty.util'; import { JournalComponent } from './journal.component'; import { of as observableOf } from 'rxjs'; import { GenericItemPageFieldComponent } from '../../../../+item-page/simple/field-components/specific-field/generic/generic-item-page-field.component'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; let comp: JournalComponent; let fixture: ComponentFixture<JournalComponent>; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: { 'creativeworkseries.issn': [ { diff --git a/src/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.spec.ts b/src/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.spec.ts index b415879df33312f0778d094301e5ce6d6b46b2ec..a49105b2e3751e45676d6bc475fba236cb1dc4af 100644 --- a/src/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-pages/orgunit/orgunit.component.spec.ts @@ -8,9 +8,10 @@ import { createRelationshipsObservable, getItemPageFieldsTest } from '../../../../+item-page/simple/item-types/shared/item.component.spec'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: { 'organization.foundingDate': [ { diff --git a/src/app/entity-groups/research-entities/item-pages/person/person.component.spec.ts b/src/app/entity-groups/research-entities/item-pages/person/person.component.spec.ts index 73f61983fc0bccdd13b7b7885a51a4d01ebf16dc..4c523b81cb27ef5962f5735e953705cf4434f211 100644 --- a/src/app/entity-groups/research-entities/item-pages/person/person.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-pages/person/person.component.spec.ts @@ -8,9 +8,10 @@ import { createRelationshipsObservable, getItemPageFieldsTest } from '../../../../+item-page/simple/item-types/shared/item.component.spec'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: { 'person.email': [ { diff --git a/src/app/entity-groups/research-entities/item-pages/project/project.component.spec.ts b/src/app/entity-groups/research-entities/item-pages/project/project.component.spec.ts index ad4b70e2aa83e45a7a6759457d65dcb585b81cad..5185857494395b48b68acc431748d4fa6f878e3a 100644 --- a/src/app/entity-groups/research-entities/item-pages/project/project.component.spec.ts +++ b/src/app/entity-groups/research-entities/item-pages/project/project.component.spec.ts @@ -8,9 +8,10 @@ import { createRelationshipsObservable, getItemPageFieldsTest } from '../../../../+item-page/simple/item-types/shared/item.component.spec'; +import { createSuccessfulRemoteDataObject$ } from '../../../../shared/testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: { // 'project.identifier.status': [ // { diff --git a/src/app/shared/browse-by/browse-by.component.spec.ts b/src/app/shared/browse-by/browse-by.component.spec.ts index bae345d009dd1d83d02fc4aa10089df6307c555c..5592b88c86481c88b5ccd5eb82ff2f4a7a47cbe1 100644 --- a/src/app/shared/browse-by/browse-by.component.spec.ts +++ b/src/app/shared/browse-by/browse-by.component.spec.ts @@ -17,6 +17,7 @@ import { RouterTestingModule } from '@angular/router/testing'; import { BrowserAnimationsModule } from '@angular/platform-browser/animations'; import { PaginationComponentOptions } from '../pagination/pagination-component-options.model'; import { SortDirection, SortOptions } from '../../core/cache/models/sort-options.model'; +import { createSuccessfulRemoteDataObject$ } from '../testing/utils'; describe('BrowseByComponent', () => { let comp: BrowseByComponent; @@ -42,7 +43,7 @@ describe('BrowseByComponent', () => { ] }) ]; - const mockItemsRD$ = observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), mockItems))); + const mockItemsRD$ = createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), mockItems)); beforeEach(async(() => { TestBed.configureTestingModule({ diff --git a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.spec.ts b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.spec.ts index 3f52f0e46aaf6248ff2493e1d0fd62a36748030c..1b4497040276a70c2211e633d18158c9a004afcf 100644 --- a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.spec.ts +++ b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.spec.ts @@ -103,7 +103,7 @@ describe('ComColFormComponent', () => { ...randomMD, ...abstractMD }, - type: ResourceType.Community + type: Community.type }, ) ); diff --git a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts index e24676a6460258ce44be8862295733653357f2b5..6a96892b06cd8a587446512086535e2443b9c877 100644 --- a/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts +++ b/src/app/shared/comcol-forms/comcol-form/comcol-form.component.ts @@ -10,7 +10,7 @@ import { TranslateService } from '@ngx-translate/core'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { MetadataMap, MetadataValue } from '../../../core/shared/metadata.models'; import { isNotEmpty } from '../../empty.util'; -import { ResourceType } from '../../../core/shared/resource-type'; +import { Community } from '../../../core/shared/community.model'; /** * A form for creating and editing Communities or Collections @@ -99,7 +99,7 @@ export class ComColFormComponent<T extends DSpaceObject> implements OnInit { ...this.dso.metadata, ...formMetadata }, - type: ResourceType.Community + type: Community.type }); this.submitForm.emit(updatedDSO); } diff --git a/src/app/shared/comcol-forms/create-comcol-page/create-comcol-page.component.spec.ts b/src/app/shared/comcol-forms/create-comcol-page/create-comcol-page.component.spec.ts index 4dad4a703f72ae909807eefb7f64c85451fca00f..08f15ad0528deb35a1c81edbf6b0b9be262c1b8e 100644 --- a/src/app/shared/comcol-forms/create-comcol-page/create-comcol-page.component.spec.ts +++ b/src/app/shared/comcol-forms/create-comcol-page/create-comcol-page.component.spec.ts @@ -4,7 +4,6 @@ import { RouteService } from '../../services/route.service'; import { Router } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { of as observableOf } from 'rxjs'; -import { RemoteData } from '../../../core/data/remote-data'; import { Community } from '../../../core/shared/community.model'; import { SharedModule } from '../../shared.module'; import { CommonModule } from '@angular/common'; @@ -13,6 +12,10 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { CreateComColPageComponent } from './create-comcol-page.component'; import { DataService } from '../../../core/data/data.service'; +import { + createFailedRemoteDataObject$, + createSuccessfulRemoteDataObject$ +} from '../../testing/utils'; describe('CreateComColPageComponent', () => { let comp: CreateComColPageComponent<DSpaceObject>; @@ -46,14 +49,14 @@ describe('CreateComColPageComponent', () => { }); communityDataServiceStub = { - findById: (uuid) => observableOf(new RemoteData(false, false, true, null, Object.assign(new Community(), { + findById: (uuid) => createSuccessfulRemoteDataObject$(Object.assign(new Community(), { uuid: uuid, metadata: [{ key: 'dc.title', value: community.name }] - }))), - create: (com, uuid?) => observableOf(new RemoteData(false, false, true, undefined, newCommunity)) + })), + create: (com, uuid?) => createSuccessfulRemoteDataObject$(newCommunity) }; @@ -109,7 +112,7 @@ describe('CreateComColPageComponent', () => { it('should not navigate on failure', () => { spyOn(router, 'navigate'); - spyOn(dsoDataService, 'create').and.returnValue(observableOf(new RemoteData(true, true, false, undefined, newCommunity))); + spyOn(dsoDataService, 'create').and.returnValue(createFailedRemoteDataObject$(newCommunity)); comp.onSubmit(data); fixture.detectChanges(); expect(router.navigate).not.toHaveBeenCalled(); diff --git a/src/app/shared/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts b/src/app/shared/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts index e2e73bae14d154641d1fe514cb26dea0678a1bf2..57c860e04fa65e9068bc037fb56feb82c879a4d2 100644 --- a/src/app/shared/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts +++ b/src/app/shared/comcol-forms/delete-comcol-page/delete-comcol-page.component.ts @@ -47,10 +47,10 @@ export class DeleteComColPageComponent<TDomain extends DSpaceObject> implements .pipe(first()) .subscribe((success: boolean) => { if (success) { - const successMessage = this.translate.instant(dso.type + '.delete.notification.success'); + const successMessage = this.translate.instant((dso as any).type + '.delete.notification.success'); this.notifications.success(successMessage) } else { - const errorMessage = this.translate.instant(dso.type + '.delete.notification.fail'); + const errorMessage = this.translate.instant((dso as any).type + '.delete.notification.fail'); this.notifications.error(errorMessage) } this.router.navigate(['/']); diff --git a/src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.spec.ts b/src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.spec.ts index 75b7fe40e76ec9a293b9f57fdfeac1fb97ec1ce6..03f751599f8e53b81b426435d6b31b0c67424e78 100644 --- a/src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.spec.ts +++ b/src/app/shared/comcol-forms/edit-comcol-page/edit-comcol-page.component.spec.ts @@ -3,7 +3,6 @@ import { CommunityDataService } from '../../../core/data/community-data.service' import { ActivatedRoute, Router } from '@angular/router'; import { TranslateModule } from '@ngx-translate/core'; import { of as observableOf } from 'rxjs'; -import { RemoteData } from '../../../core/data/remote-data'; import { Community } from '../../../core/shared/community.model'; import { SharedModule } from '../../shared.module'; import { CommonModule } from '@angular/common'; @@ -12,6 +11,10 @@ import { NO_ERRORS_SCHEMA } from '@angular/core'; import { DSpaceObject } from '../../../core/shared/dspace-object.model'; import { EditComColPageComponent } from './edit-comcol-page.component'; import { DataService } from '../../../core/data/data.service'; +import { + createFailedRemoteDataObject$, + createSuccessfulRemoteDataObject$ +} from '../../testing/utils'; describe('EditComColPageComponent', () => { let comp: EditComColPageComponent<DSpaceObject>; @@ -43,7 +46,7 @@ describe('EditComColPageComponent', () => { }); communityDataServiceStub = { - update: (com, uuid?) => observableOf(new RemoteData(false, false, true, undefined, newCommunity)) + update: (com, uuid?) => createSuccessfulRemoteDataObject$(newCommunity) }; @@ -97,7 +100,7 @@ describe('EditComColPageComponent', () => { it('should not navigate on failure', () => { spyOn(router, 'navigate'); - spyOn(dsoDataService, 'update').and.returnValue(observableOf(new RemoteData(true, true, false, undefined, newCommunity))); + spyOn(dsoDataService, 'update').and.returnValue(createFailedRemoteDataObject$(newCommunity)); comp.onSubmit(data); fixture.detectChanges(); expect(router.navigate).not.toHaveBeenCalled(); diff --git a/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts b/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts index 5ec553222b1c47bf01664828991ea67f3b24c75b..234f13f4b111de57bcc1c43f75ac2c2cf51473cc 100644 --- a/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts +++ b/src/app/shared/dso-selector/dso-selector/dso-selector.component.spec.ts @@ -5,12 +5,11 @@ import { DSOSelectorComponent } from './dso-selector.component'; import { SearchService } from '../../../+search-page/search-service/search.service'; import { DSpaceObjectType } from '../../../core/shared/dspace-object-type.model'; import { PaginatedSearchOptions } from '../../../+search-page/paginated-search-options.model'; -import { RemoteData } from '../../../core/data/remote-data'; import { ItemSearchResult } from '../../object-collection/shared/item-search-result.model'; import { Item } from '../../../core/shared/item.model'; -import { of as observableOf } from 'rxjs'; import { PaginatedList } from '../../../core/data/paginated-list'; import { MetadataValue } from '../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject$ } from '../../testing/utils'; describe('DSOSelectorComponent', () => { let component: DSOSelectorComponent; @@ -30,7 +29,7 @@ describe('DSOSelectorComponent', () => { searchResult.indexableObject = item; searchResult.hitHighlights = {}; const searchService = jasmine.createSpyObj('searchService', { - search: observableOf(new RemoteData(false, false, true, undefined, new PaginatedList(undefined, [searchResult]))) + search: createSuccessfulRemoteDataObject$(new PaginatedList(undefined, [searchResult])) }); beforeEach(async(() => { @@ -68,6 +67,4 @@ describe('DSOSelectorComponent', () => { expect(searchService.search).toHaveBeenCalledWith(searchOptions); }); - -}) -; +}); diff --git a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts index 9efeddeeabc1b764ab05184ea80da307ae0e163e..97957d5250a4dae8629603f7a105b0979a4a75cb 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-collection-parent-selector/create-collection-parent-selector.component.spec.ts @@ -10,6 +10,7 @@ import * as collectionRouter from '../../../../+collection-page/collection-page- import { Community } from '../../../../core/shared/community.model'; import { CreateCollectionParentSelectorComponent } from './create-collection-parent-selector.component'; import { MetadataValue } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; describe('CreateCollectionParentSelectorComponent', () => { let component: CreateCollectionParentSelectorComponent; @@ -26,7 +27,7 @@ describe('CreateCollectionParentSelectorComponent', () => { })] }; const router = new RouterStub(); - const communityRD = new RemoteData(false, false, true, undefined, community); + const communityRD = createSuccessfulRemoteDataObject(community); const modalStub = jasmine.createSpyObj('modalStub', ['close']); const createPath = 'testCreatePath'; diff --git a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts index e1bb9c7997d1135efb1cf645e1e9bf3d937a0a32..4871d74b98db337d070060209ffcbc02db3d8bf6 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-community-parent-selector/create-community-parent-selector.component.spec.ts @@ -10,6 +10,7 @@ import * as communityRouter from '../../../../+community-page/community-page-rou import { Community } from '../../../../core/shared/community.model'; import { CreateCommunityParentSelectorComponent } from './create-community-parent-selector.component'; import { MetadataValue } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; describe('CreateCommunityParentSelectorComponent', () => { let component: CreateCommunityParentSelectorComponent; @@ -20,7 +21,7 @@ describe('CreateCommunityParentSelectorComponent', () => { community.uuid = '1234-1234-1234-1234'; community.metadata = { 'dc.title': [Object.assign(new MetadataValue(), { value: 'Community title', language: undefined })] }; const router = new RouterStub(); - const communityRD = new RemoteData(false, false, true, undefined, community); + const communityRD = createSuccessfulRemoteDataObject(community); const modalStub = jasmine.createSpyObj('modalStub', ['close']); const createPath = 'testCreatePath'; diff --git a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.spec.ts index 19bb58eb5aa86120e78652dd533bd266ae622a45..2c9b2499ab1bc316b1b4ef6ef5edc21c87fa0566 100644 --- a/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/create-item-parent-selector/create-item-parent-selector.component.spec.ts @@ -9,6 +9,7 @@ import { RouterStub } from '../../../testing/router-stub'; import { Collection } from '../../../../core/shared/collection.model'; import { CreateItemParentSelectorComponent } from './create-item-parent-selector.component'; import { MetadataValue } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; describe('CreateItemParentSelectorComponent', () => { let component: CreateItemParentSelectorComponent; @@ -19,7 +20,7 @@ describe('CreateItemParentSelectorComponent', () => { collection.uuid = '1234-1234-1234-1234'; collection.metadata = { 'dc.title': [Object.assign(new MetadataValue(), { value: 'Collection title', language: undefined })] }; const router = new RouterStub(); - const collectionRD = new RemoteData(false, false, true, undefined, collection); + const collectionRD = createSuccessfulRemoteDataObject(collection); const modalStub = jasmine.createSpyObj('modalStub', ['close']); const createPath = 'testCreatePath'; diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html index 88f4a6f9174d0b1528b717ec6fe45176fa1930fe..1181e097eb3be22187597ac892bc47f2f4d38c97 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.html @@ -5,6 +5,6 @@ </button> </div> <div class="modal-body"> - <ds-dso-selector [currentDSOId]="(dsoRD$ | async)?.payload.uuid" [type]="selectorType" (onSelect)="selectObject($event)"></ds-dso-selector> + <ds-dso-selector [currentDSOId]="(dsoRD$ | async)?.payload.uuid ? 'search.resourceid:' + (dsoRD$ | async)?.payload.uuid : null" [type]="selectorType" (onSelect)="selectObject($event)"></ds-dso-selector> </div> -</div> \ No newline at end of file +</div> diff --git a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts index 4ceaeccb3a3053558a77077708dc9bfbee3d82e0..15f23d1fe62c29693f88a9e935e95a435e0f1831 100644 --- a/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/dso-selector-modal-wrapper.component.spec.ts @@ -14,6 +14,7 @@ import { By } from '@angular/platform-browser'; import { DSOSelectorComponent } from '../dso-selector/dso-selector.component'; import { MockComponent } from 'ng-mocks'; import { MetadataValue } from '../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject } from '../../testing/utils'; describe('DSOSelectorModalWrapperComponent', () => { let component: DSOSelectorModalWrapperComponent; @@ -29,7 +30,7 @@ describe('DSOSelectorModalWrapperComponent', () => { })] }; - const itemRD = new RemoteData(false, false, true, undefined, item); + const itemRD = createSuccessfulRemoteDataObject(item); const modalStub = jasmine.createSpyObj('modalStub', ['close']); beforeEach(async(() => { diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts index 5e6034852727e0caf7a5c16e585e3c7a74103ba9..cbb8fb654e5601a79926864f28a0d105c5e98e5b 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-collection-selector/edit-collection-selector.component.spec.ts @@ -10,6 +10,7 @@ import * as collectionRouter from '../../../../+collection-page/collection-page- import { EditCollectionSelectorComponent } from './edit-collection-selector.component'; import { Collection } from '../../../../core/shared/collection.model'; import { MetadataValue } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; describe('EditCollectionSelectorComponent', () => { let component: EditCollectionSelectorComponent; @@ -20,7 +21,7 @@ describe('EditCollectionSelectorComponent', () => { collection.uuid = '1234-1234-1234-1234'; collection.metadata = { 'dc.title': [Object.assign(new MetadataValue(), { value: 'Collection title', language: undefined })] }; const router = new RouterStub(); - const collectionRD = new RemoteData(false, false, true, undefined, collection); + const collectionRD = createSuccessfulRemoteDataObject(collection); const modalStub = jasmine.createSpyObj('modalStub', ['close']); const editPath = 'testEditPath'; diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts index ac558a074ad3eed461074efcbc64f39d106afb95..46684e6cfbfb25d8ad12daf362885ecb45c14682 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-community-selector/edit-community-selector.component.spec.ts @@ -10,6 +10,7 @@ import * as communityRouter from '../../../../+community-page/community-page-rou import { EditCommunitySelectorComponent } from './edit-community-selector.component'; import { Community } from '../../../../core/shared/community.model'; import { MetadataValue } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; describe('EditCommunitySelectorComponent', () => { let component: EditCommunitySelectorComponent; @@ -20,7 +21,7 @@ describe('EditCommunitySelectorComponent', () => { community.uuid = '1234-1234-1234-1234'; community.metadata = { 'dc.title': [Object.assign(new MetadataValue(), { value: 'Community title', language: undefined })] }; const router = new RouterStub(); - const communityRD = new RemoteData(false, false, true, undefined, community); + const communityRD = createSuccessfulRemoteDataObject(community); const modalStub = jasmine.createSpyObj('modalStub', ['close']); const editPath = 'testEditPath'; diff --git a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts index 8ac04bb335f4d500c75e4a76db45754f446bcf1c..86066916a60207988b73bf136e377cc1d610f2b0 100644 --- a/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts +++ b/src/app/shared/dso-selector/modal-wrappers/edit-item-selector/edit-item-selector.component.spec.ts @@ -10,6 +10,7 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { RouterStub } from '../../../testing/router-stub'; import * as itemRouter from '../../../../+item-page/item-page-routing.module'; import { MetadataValue } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; describe('EditItemSelectorComponent', () => { let component: EditItemSelectorComponent; @@ -20,7 +21,7 @@ describe('EditItemSelectorComponent', () => { item.uuid = '1234-1234-1234-1234'; item.metadata = { 'dc.title': [Object.assign(new MetadataValue(), { value: 'Item title', language: undefined })] }; const router = new RouterStub(); - const itemRD = new RemoteData(false, false, true, undefined, item); + const itemRD = createSuccessfulRemoteDataObject(item); const modalStub = jasmine.createSpyObj('modalStub', ['close']); const editPath = 'testEditPath'; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts index 200cc08aae381b130752ad8df3ec58f0a5c840a1..6d5839f8674638ebadd1af91efcac0022ab072ef 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.component.spec.ts @@ -8,7 +8,7 @@ import { NgbModule } from '@ng-bootstrap/ng-bootstrap'; import { DsDynamicRelationGroupComponent } from './dynamic-relation-group.components'; import { DynamicRelationGroupModel, DynamicRelationGroupModelConfig } from './dynamic-relation-group.model'; -import { FormRowModel, SubmissionFormsModel } from '../../../../../../core/config/models/config-submission-forms.model'; +import { SubmissionFormsModel } from '../../../../../../core/config/models/config-submission-forms.model'; import { FormFieldModel } from '../../../models/form-field.model'; import { FormBuilderService } from '../../../form-builder.service'; import { FormService } from '../../../../form.service'; @@ -25,6 +25,7 @@ import { AuthorityServiceStub } from '../../../../../testing/authority-service-s import { MOCK_SUBMISSION_CONFIG } from '../../../../../testing/mock-submission-config'; import { Store, StoreModule } from '@ngrx/store'; import { MockStore } from '../../../../../testing/mock-store'; +import { FormRowModel } from '../../../../../../core/config/models/config-submission-form.model'; export let FORM_GROUP_TEST_MODEL_CONFIG; diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model.ts index 7a357dfc31901bfec4fbf3a971b93caed9aa34df..e6d2b95afc48d89e730f8ab25dd1dd959cf976bc 100644 --- a/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model.ts +++ b/src/app/shared/form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model.ts @@ -1,7 +1,7 @@ import { DynamicFormControlLayout, serializable } from '@ng-dynamic-forms/core'; -import { FormRowModel } from '../../../../../../core/config/models/config-submission-forms.model'; import { DsDynamicInputModel, DsDynamicInputModelConfig } from '../ds-dynamic-input.model'; import { isEmpty, isNull } from '../../../../../empty.util'; +import { FormRowModel } from '../../../../../../core/config/models/config-submission-form.model'; export const DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP = 'RELATION'; export const PLACEHOLDER_PARENT_METADATA = '#PLACEHOLDER_PARENT_METADATA_VALUE#'; diff --git a/src/app/shared/form/builder/form-builder.service.spec.ts b/src/app/shared/form/builder/form-builder.service.spec.ts index b092b87a5a953dea3e10659186e5ee82331c182c..58a1696a920cf1ab5c092b5ed6846a2193a34311 100644 --- a/src/app/shared/form/builder/form-builder.service.spec.ts +++ b/src/app/shared/form/builder/form-builder.service.spec.ts @@ -39,7 +39,6 @@ import { DynamicListRadioGroupModel } from './ds-dynamic-form-ui/models/list/dyn import { AuthorityOptions } from '../../../core/integration/models/authority-options.model'; import { FormFieldModel } from './models/form-field.model'; import { - FormRowModel, SubmissionFormsModel } from '../../../core/config/models/config-submission-forms.model'; import { FormBuilderService } from './form-builder.service'; @@ -49,6 +48,7 @@ import { FormFieldMetadataValueObject } from './models/form-field-metadata-value import { DynamicConcatModel } from './ds-dynamic-form-ui/models/ds-dynamic-concat.model'; import { DynamicLookupNameModel } from './ds-dynamic-form-ui/models/lookup/dynamic-lookup-name.model'; import { DynamicRowArrayModel } from './ds-dynamic-form-ui/models/ds-dynamic-row-array-model'; +import { FormRowModel } from '../../../core/config/models/config-submission-form.model'; describe('FormBuilderService test suite', () => { diff --git a/src/app/shared/form/builder/models/form-field.model.ts b/src/app/shared/form/builder/models/form-field.model.ts index 439bf89f8fc29e05d9063e50aa4f9d057a67851d..39f2d6b9f8cae9ff323a258b80f1075228124c6f 100644 --- a/src/app/shared/form/builder/models/form-field.model.ts +++ b/src/app/shared/form/builder/models/form-field.model.ts @@ -1,7 +1,7 @@ import { autoserialize } from 'cerialize'; -import { FormRowModel } from '../../../../core/config/models/config-submission-forms.model'; import { LanguageCode } from './form-field-language-value.model'; import { FormFieldMetadataValueObject } from './form-field-metadata-value.model'; +import { FormRowModel } from '../../../../core/config/models/config-submission-form.model'; export class FormFieldModel { diff --git a/src/app/shared/form/builder/parsers/relation-group-field-parser.ts b/src/app/shared/form/builder/parsers/relation-group-field-parser.ts index ca0469ef1ae007405469e8a833fb8b4eaaf26da7..b3f6e749f3c78479394ed8a18f7d4e43548d4b63 100644 --- a/src/app/shared/form/builder/parsers/relation-group-field-parser.ts +++ b/src/app/shared/form/builder/parsers/relation-group-field-parser.ts @@ -3,12 +3,12 @@ import { FormFieldMetadataValueObject } from '../models/form-field-metadata-valu import { FormFieldModel } from '../models/form-field.model'; import { isNotEmpty } from '../../../empty.util'; -import { FormRowModel } from '../../../../core/config/models/config-submission-forms.model'; import { DynamicRelationGroupModel, DynamicRelationGroupModelConfig, PLACEHOLDER_PARENT_METADATA } from '../ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model'; +import { FormRowModel } from '../../../../core/config/models/config-submission-form.model'; export class RelationGroupFieldParser extends FieldParser { diff --git a/src/app/shared/form/builder/parsers/row-parser.spec.ts b/src/app/shared/form/builder/parsers/row-parser.spec.ts index 3f10b7127985e7cfd79806e3504c4b7565b6346b..58b1d1de99c47d46bb6263b9dbb2337d2646554d 100644 --- a/src/app/shared/form/builder/parsers/row-parser.spec.ts +++ b/src/app/shared/form/builder/parsers/row-parser.spec.ts @@ -1,8 +1,8 @@ import { FormFieldModel } from '../models/form-field.model'; -import { FormRowModel } from '../../../../core/config/models/config-submission-forms.model'; import { RowParser } from './row-parser'; import { DynamicRowGroupModel } from '../ds-dynamic-form-ui/models/ds-dynamic-row-group-model'; import { DynamicRowArrayModel } from '../ds-dynamic-form-ui/models/ds-dynamic-row-array-model'; +import { FormRowModel } from '../../../../core/config/models/config-submission-form.model'; describe('RowParser test suite', () => { diff --git a/src/app/shared/items/switcher/item-type-switcher.component.spec.ts b/src/app/shared/items/switcher/item-type-switcher.component.spec.ts index 3b13abf2efca8bc1e787af1de5e3c3e06c2678e6..3f5b7c7f9045d93c2da78a22c3da5b948b6d29e7 100644 --- a/src/app/shared/items/switcher/item-type-switcher.component.spec.ts +++ b/src/app/shared/items/switcher/item-type-switcher.component.spec.ts @@ -10,10 +10,11 @@ import * as decorator from '../item-type-decorator'; import { getComponentByItemType, ItemViewMode } from '../item-type-decorator'; import { ItemMetadataRepresentation } from '../../../core/shared/metadata-representation/item/item-metadata-representation.model'; import createSpy = jasmine.createSpy; +import { createSuccessfulRemoteDataObject$ } from '../../testing/utils'; const relationType = 'type'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: { 'dc.title': [ { diff --git a/src/app/shared/mocks/mock-form-models.ts b/src/app/shared/mocks/mock-form-models.ts index 5851da94be1bc8d0d913616f7d3a64b087e43fc3..f2fc38c420c72232a98b260876c1547439c1c954 100644 --- a/src/app/shared/mocks/mock-form-models.ts +++ b/src/app/shared/mocks/mock-form-models.ts @@ -5,7 +5,6 @@ import { DynamicRowArrayModelConfig } from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-array-model'; import { DynamicSelectModel } from '@ng-dynamic-forms/core'; -import { FormRowModel } from '../../core/config/models/config-submission-forms.model'; import { SubmissionScopeType } from '../../core/submission/submission-scope-type'; import { DynamicRelationGroupModel } from '../form/builder/ds-dynamic-form-ui/models/relation-group/dynamic-relation-group.model'; import { FormFieldModel } from '../form/builder/models/form-field.model'; @@ -13,6 +12,7 @@ import { AuthorityOptions } from '../../core/integration/models/authority-option import { AuthorityValue } from '../../core/integration/models/authority.value'; import { FormFieldMetadataValueObject } from '../form/builder/models/form-field-metadata-value.model'; import { DynamicRowGroupModel } from '../form/builder/ds-dynamic-form-ui/models/ds-dynamic-row-group-model'; +import { FormRowModel } from '../../core/config/models/config-submission-form.model'; export const qualdropSelectConfig = { name: 'dc.identifier_QUALDROP_METADATA', diff --git a/src/app/shared/mocks/mock-remote-data-build.service.ts b/src/app/shared/mocks/mock-remote-data-build.service.ts index 6a05c9bf3688cdd1ffb22410ad65993747f83696..888327bbda9cce8b4ca79b447b9e2eabbbbd4f37 100644 --- a/src/app/shared/mocks/mock-remote-data-build.service.ts +++ b/src/app/shared/mocks/mock-remote-data-build.service.ts @@ -5,6 +5,7 @@ import { RemoteData } from '../../core/data/remote-data'; import { RequestEntry } from '../../core/data/request.reducer'; import { hasValue } from '../empty.util'; import { NormalizedObject } from '../../core/cache/models/normalized-object.model'; +import { createSuccessfulRemoteDataObject$ } from '../testing/utils'; export function getMockRemoteDataBuildService(toRemoteDataObservable$?: Observable<RemoteData<any>>): RemoteDataBuildService { return { @@ -18,7 +19,7 @@ export function getMockRemoteDataBuildService(toRemoteDataObservable$?: Observab } as RemoteData<any>))) } }, - buildSingle: (href$: string | Observable<string>) => observableOf(new RemoteData(false, false, true, undefined, {})), + buildSingle: (href$: string | Observable<string>) => createSuccessfulRemoteDataObject$({}), build: (normalized: NormalizedObject<any>) => Object.create({}) } as RemoteDataBuildService; diff --git a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts index 4144cb3760c4420285bc7d3e49152e83de7b48a9..5084b3e9fe47d1e0c27bd4df7f8a1374258e9771 100644 --- a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.spec.ts @@ -11,12 +11,13 @@ import { MockTranslateLoader } from '../../mocks/mock-translate-loader'; import { NotificationsService } from '../../notifications/notifications.service'; import { NotificationsServiceStub } from '../../testing/notifications-service-stub'; import { RouterStub } from '../../testing/router-stub'; -import { RemoteData } from '../../../core/data/remote-data'; import { Item } from '../../../core/shared/item.model'; import { ClaimedTaskDataService } from '../../../core/tasks/claimed-task-data.service'; import { ClaimedTaskActionsComponent } from './claimed-task-actions.component'; import { ClaimedTask } from '../../../core/tasks/models/claimed-task-object.model'; -import { Workflowitem } from '../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; +import { createSuccessfulRemoteDataObject } from '../../testing/utils'; +import { CoreModule } from '../../../core/core.module'; let component: ClaimedTaskActionsComponent; let fixture: ComponentFixture<ClaimedTaskActionsComponent>; @@ -25,7 +26,7 @@ let mockObject: ClaimedTask; let notificationsServiceStub: NotificationsServiceStub; let router: RouterStub; -const mockDataService = jasmine.createSpyObj('PoolTaskDataService', { +const mockDataService = jasmine.createSpyObj('ClaimedTaskDataService', { approveTask: jasmine.createSpy('approveTask'), rejectTask: jasmine.createSpy('rejectTask'), returnToPoolTask: jasmine.createSpy('returnToPoolTask'), @@ -60,9 +61,9 @@ const item = Object.assign(new Item(), { ] } }); -const rdItem = new RemoteData(false, false, true, null, item); -const workflowitem = Object.assign(new Workflowitem(), { item: observableOf(rdItem) }); -const rdWorkflowitem = new RemoteData(false, false, true, null, workflowitem); +const rdItem = createSuccessfulRemoteDataObject(item); +const workflowitem = Object.assign(new WorkflowItem(), { item: observableOf(rdItem) }); +const rdWorkflowitem = createSuccessfulRemoteDataObject(workflowitem); mockObject = Object.assign(new ClaimedTask(), { workflowitem: observableOf(rdWorkflowitem), id: '1234' }); describe('ClaimedTaskActionsComponent', () => { diff --git a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts index 2a7669f5b11301682ceb9581119e5b334bc7fca4..0ddb24ec2f208a57fb94a23d06c1639f9ba8b7f6 100644 --- a/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts +++ b/src/app/shared/mydspace-actions/claimed-task/claimed-task-actions.component.ts @@ -9,10 +9,9 @@ import { ClaimedTaskDataService } from '../../../core/tasks/claimed-task-data.se import { ClaimedTask } from '../../../core/tasks/models/claimed-task-object.model'; import { ProcessTaskResponse } from '../../../core/tasks/models/process-task-response'; import { isNotUndefined } from '../../empty.util'; -import { Workflowitem } from '../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; import { RemoteData } from '../../../core/data/remote-data'; import { MyDSpaceActionsComponent } from '../mydspace-actions'; -import { ResourceType } from '../../../core/shared/resource-type'; import { NotificationsService } from '../../notifications/notifications.service'; /** @@ -33,7 +32,7 @@ export class ClaimedTaskActionsComponent extends MyDSpaceActionsComponent<Claime /** * The workflowitem object that belonging to the ClaimedTask object */ - public workflowitem$: Observable<Workflowitem>; + public workflowitem$: Observable<WorkflowItem>; /** * A boolean representing if an approve operation is pending @@ -62,7 +61,7 @@ export class ClaimedTaskActionsComponent extends MyDSpaceActionsComponent<Claime protected router: Router, protected notificationsService: NotificationsService, protected translate: TranslateService) { - super(ResourceType.ClaimedTask, injector, router, notificationsService, translate); + super(ClaimedTask.type, injector, router, notificationsService, translate); } /** @@ -73,15 +72,15 @@ export class ClaimedTaskActionsComponent extends MyDSpaceActionsComponent<Claime } /** - * Init the ClaimedTask and Workflowitem objects + * Init the ClaimedTask and WorkflowItem objects * * @param {PoolTask} object */ initObjects(object: ClaimedTask) { this.object = object; - this.workflowitem$ = (this.object.workflowitem as Observable<RemoteData<Workflowitem>>).pipe( - filter((rd: RemoteData<Workflowitem>) => ((!rd.isRequestPending) && isNotUndefined(rd.payload))), - map((rd: RemoteData<Workflowitem>) => rd.payload)); + this.workflowitem$ = (this.object.workflowitem as Observable<RemoteData<WorkflowItem>>).pipe( + filter((rd: RemoteData<WorkflowItem>) => ((!rd.isRequestPending) && isNotUndefined(rd.payload))), + map((rd: RemoteData<WorkflowItem>) => rd.payload)); } /** diff --git a/src/app/shared/mydspace-actions/item/item-actions.component.ts b/src/app/shared/mydspace-actions/item/item-actions.component.ts index 0760fe54e03d600543dca7e1de589fc1300ee706..eeb6e49ad9dcfa0ff757b9addcb28fcfd82454e9 100644 --- a/src/app/shared/mydspace-actions/item/item-actions.component.ts +++ b/src/app/shared/mydspace-actions/item/item-actions.component.ts @@ -6,7 +6,6 @@ import { TranslateService } from '@ngx-translate/core'; import { MyDSpaceActionsComponent } from '../mydspace-actions'; import { ItemDataService } from '../../../core/data/item-data.service'; import { Item } from '../../../core/shared/item.model'; -import { ResourceType } from '../../../core/shared/resource-type'; import { NotificationsService } from '../../notifications/notifications.service'; /** @@ -37,7 +36,7 @@ export class ItemActionsComponent extends MyDSpaceActionsComponent<Item, ItemDat protected router: Router, protected notificationsService: NotificationsService, protected translate: TranslateService) { - super(ResourceType.Item, injector, router, notificationsService, translate); + super(Item.type, injector, router, notificationsService, translate); } /** diff --git a/src/app/shared/mydspace-actions/mydspace-actions-service.factory.ts b/src/app/shared/mydspace-actions/mydspace-actions-service.factory.ts index 7aa948f68905a84b1b7df59473239e92bad91128..48a0630778be8a982a1107b31e6e80335b965b01 100644 --- a/src/app/shared/mydspace-actions/mydspace-actions-service.factory.ts +++ b/src/app/shared/mydspace-actions/mydspace-actions-service.factory.ts @@ -3,9 +3,14 @@ import { ResourceType } from '../../core/shared/resource-type'; import { WorkspaceitemDataService } from '../../core/submission/workspaceitem-data.service'; import { ClaimedTaskDataService } from '../../core/tasks/claimed-task-data.service'; import { PoolTaskDataService } from '../../core/tasks/pool-task-data.service'; -import { WorkflowitemDataService } from '../../core/submission/workflowitem-data.service'; +import { WorkflowItemDataService } from '../../core/submission/workflowitem-data.service'; import { CacheableObject } from '../../core/cache/object-cache.reducer'; import { ItemDataService } from '../../core/data/item-data.service'; +import { Item } from '../../core/shared/item.model'; +import { PoolTask } from '../../core/tasks/models/pool-task-object.model'; +import { ClaimedTask } from '../../core/tasks/models/claimed-task-object.model'; +import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model'; +import { WorkflowItem } from '../../core/submission/models/workflowitem.model'; /** * Class to return DataService for given ResourceType @@ -13,19 +18,19 @@ import { ItemDataService } from '../../core/data/item-data.service'; export class MydspaceActionsServiceFactory<T extends CacheableObject, TService extends DataService<T>> { public getConstructor(type: ResourceType): TService { switch (type) { - case ResourceType.Item: { + case Item.type: { return ItemDataService as any; } - case ResourceType.Workspaceitem: { + case WorkspaceItem.type: { return WorkspaceitemDataService as any; } - case ResourceType.Workflowitem: { - return WorkflowitemDataService as any; + case WorkflowItem.type: { + return WorkflowItemDataService as any; } - case ResourceType.ClaimedTask: { + case ClaimedTask.type: { return ClaimedTaskDataService as any; } - case ResourceType.PoolTask: { + case PoolTask.type: { return PoolTaskDataService as any; } default: { diff --git a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts index 1c0e8e71facba6c0836b1561deb1cf13446f3dc2..c06cec3422d64bdc5d8c2f2262a3847ccdd8e5fe 100644 --- a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.spec.ts @@ -11,12 +11,12 @@ import { MockTranslateLoader } from '../../mocks/mock-translate-loader'; import { NotificationsService } from '../../notifications/notifications.service'; import { NotificationsServiceStub } from '../../testing/notifications-service-stub'; import { RouterStub } from '../../testing/router-stub'; -import { RemoteData } from '../../../core/data/remote-data'; import { Item } from '../../../core/shared/item.model'; import { PoolTaskDataService } from '../../../core/tasks/pool-task-data.service'; import { PoolTaskActionsComponent } from './pool-task-actions.component'; import { PoolTask } from '../../../core/tasks/models/pool-task-object.model'; -import { Workflowitem } from '../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; +import { createSuccessfulRemoteDataObject } from '../../testing/utils'; let component: PoolTaskActionsComponent; let fixture: ComponentFixture<PoolTaskActionsComponent>; @@ -58,9 +58,9 @@ const item = Object.assign(new Item(), { ] } }); -const rdItem = new RemoteData(false, false, true, null, item); -const workflowitem = Object.assign(new Workflowitem(), { item: observableOf(rdItem) }); -const rdWorkflowitem = new RemoteData(false, false, true, null, workflowitem); +const rdItem = createSuccessfulRemoteDataObject(item); +const workflowitem = Object.assign(new WorkflowItem(), { item: observableOf(rdItem) }); +const rdWorkflowitem = createSuccessfulRemoteDataObject(workflowitem); mockObject = Object.assign(new PoolTask(), { workflowitem: observableOf(rdWorkflowitem), id: '1234' }); describe('PoolTaskActionsComponent', () => { diff --git a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.ts b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.ts index bd8f3f1a373a2b3e995add3ccf4b2948ceec2cc2..2124c0d9b658dad491685b3fd526e5e88f2db791 100644 --- a/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.ts +++ b/src/app/shared/mydspace-actions/pool-task/pool-task-actions.component.ts @@ -5,14 +5,13 @@ import { BehaviorSubject, Observable } from 'rxjs'; import { filter, map } from 'rxjs/operators'; import { TranslateService } from '@ngx-translate/core'; -import { Workflowitem } from '../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; import { ProcessTaskResponse } from '../../../core/tasks/models/process-task-response'; import { RemoteData } from '../../../core/data/remote-data'; import { PoolTask } from '../../../core/tasks/models/pool-task-object.model'; import { PoolTaskDataService } from '../../../core/tasks/pool-task-data.service'; import { isNotUndefined } from '../../empty.util'; import { MyDSpaceActionsComponent } from '../mydspace-actions'; -import { ResourceType } from '../../../core/shared/resource-type'; import { NotificationsService } from '../../notifications/notifications.service'; /** @@ -39,7 +38,7 @@ export class PoolTaskActionsComponent extends MyDSpaceActionsComponent<PoolTask, /** * The workflowitem object that belonging to the PoolTask object */ - public workflowitem$: Observable<Workflowitem>; + public workflowitem$: Observable<WorkflowItem>; /** * Initialize instance variables @@ -53,7 +52,7 @@ export class PoolTaskActionsComponent extends MyDSpaceActionsComponent<PoolTask, protected router: Router, protected notificationsService: NotificationsService, protected translate: TranslateService) { - super(ResourceType.PoolTask, injector, router, notificationsService, translate); + super(PoolTask.type, injector, router, notificationsService, translate); } /** @@ -64,15 +63,15 @@ export class PoolTaskActionsComponent extends MyDSpaceActionsComponent<PoolTask, } /** - * Init the PoolTask and Workflowitem objects + * Init the PoolTask and WorkflowItem objects * * @param {PoolTask} object */ initObjects(object: PoolTask) { this.object = object; - this.workflowitem$ = (this.object.workflowitem as Observable<RemoteData<Workflowitem>>).pipe( - filter((rd: RemoteData<Workflowitem>) => ((!rd.isRequestPending) && isNotUndefined(rd.payload))), - map((rd: RemoteData<Workflowitem>) => rd.payload)); + this.workflowitem$ = (this.object.workflowitem as Observable<RemoteData<WorkflowItem>>).pipe( + filter((rd: RemoteData<WorkflowItem>) => ((!rd.isRequestPending) && isNotUndefined(rd.payload))), + map((rd: RemoteData<WorkflowItem>) => rd.payload)); } /** diff --git a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts index 7533565afeb470cd513a80d93cd318e4e3152065..e2f0e49104d417e6634d3064b951c32e4d25e835 100644 --- a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.spec.ts @@ -9,16 +9,17 @@ import { MockTranslateLoader } from '../../mocks/mock-translate-loader'; import { RouterStub } from '../../testing/router-stub'; import { RemoteData } from '../../../core/data/remote-data'; import { Item } from '../../../core/shared/item.model'; -import { Workflowitem } from '../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; import { WorkflowitemActionsComponent } from './workflowitem-actions.component'; -import { WorkflowitemDataService } from '../../../core/submission/workflowitem-data.service'; +import { WorkflowItemDataService } from '../../../core/submission/workflowitem-data.service'; import { NotificationsService } from '../../notifications/notifications.service'; import { NotificationsServiceStub } from '../../testing/notifications-service-stub'; +import { createSuccessfulRemoteDataObject } from '../../testing/utils'; let component: WorkflowitemActionsComponent; let fixture: ComponentFixture<WorkflowitemActionsComponent>; -let mockObject: Workflowitem; +let mockObject: WorkflowItem; const mockDataService = {}; @@ -51,8 +52,8 @@ const item = Object.assign(new Item(), { ] } }); -const rd = new RemoteData(false, false, true, null, item); -mockObject = Object.assign(new Workflowitem(), { item: observableOf(rd), id: '1234', uuid: '1234' }); +const rd = createSuccessfulRemoteDataObject(item); +mockObject = Object.assign(new WorkflowItem(), { item: observableOf(rd), id: '1234', uuid: '1234' }); describe('WorkflowitemActionsComponent', () => { beforeEach(async(() => { @@ -69,7 +70,7 @@ describe('WorkflowitemActionsComponent', () => { providers: [ { provide: Injector, useValue: {} }, { provide: Router, useValue: new RouterStub() }, - { provide: WorkflowitemDataService, useValue: mockDataService }, + { provide: WorkflowItemDataService, useValue: mockDataService }, { provide: NotificationsService, useValue: new NotificationsServiceStub() }, ], schemas: [NO_ERRORS_SCHEMA] diff --git a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.ts b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.ts index a6304bf5d400a736cb5ac87b1046c231c1caf566..71f854c5e73a9d1834f220e30afcc8b16985c988 100644 --- a/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.ts +++ b/src/app/shared/mydspace-actions/workflowitem/workflowitem-actions.component.ts @@ -4,25 +4,24 @@ import { Router } from '@angular/router'; import { TranslateService } from '@ngx-translate/core'; import { MyDSpaceActionsComponent } from '../mydspace-actions'; -import { Workflowitem } from '../../../core/submission/models/workflowitem.model'; -import { WorkflowitemDataService } from '../../../core/submission/workflowitem-data.service'; -import { ResourceType } from '../../../core/shared/resource-type'; +import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; +import { WorkflowItemDataService } from '../../../core/submission/workflowitem-data.service'; import { NotificationsService } from '../../notifications/notifications.service'; /** - * This component represents mydspace actions related to Workflowitem object. + * This component represents mydspace actions related to WorkflowItem object. */ @Component({ selector: 'ds-workflowitem-actions', styleUrls: ['./workflowitem-actions.component.scss'], templateUrl: './workflowitem-actions.component.html', }) -export class WorkflowitemActionsComponent extends MyDSpaceActionsComponent<Workflowitem, WorkflowitemDataService> { +export class WorkflowitemActionsComponent extends MyDSpaceActionsComponent<WorkflowItem, WorkflowItemDataService> { /** - * The Workflowitem object + * The WorkflowItem object */ - @Input() object: Workflowitem; + @Input() object: WorkflowItem; /** * Initialize instance variables @@ -36,15 +35,15 @@ export class WorkflowitemActionsComponent extends MyDSpaceActionsComponent<Workf protected router: Router, protected notificationsService: NotificationsService, protected translate: TranslateService) { - super(ResourceType.Workflowitem, injector, router, notificationsService, translate); + super(WorkflowItem.type, injector, router, notificationsService, translate); } /** * Init the target object * - * @param {Workflowitem} object + * @param {WorkflowItem} object */ - initObjects(object: Workflowitem) { + initObjects(object: WorkflowItem) { this.object = object; } diff --git a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts index ec8bc4a11c2cf8483b85d26e9b5794bd6f4f665c..507a466858b175724c8945860279b2ed9989258c 100644 --- a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts +++ b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.spec.ts @@ -13,14 +13,15 @@ import { NotificationsServiceStub } from '../../testing/notifications-service-st import { RouterStub } from '../../testing/router-stub'; import { RemoteData } from '../../../core/data/remote-data'; import { Item } from '../../../core/shared/item.model'; -import { Workspaceitem } from '../../../core/submission/models/workspaceitem.model'; +import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model'; import { WorkspaceitemActionsComponent } from './workspaceitem-actions.component'; import { WorkspaceitemDataService } from '../../../core/submission/workspaceitem-data.service'; +import { createSuccessfulRemoteDataObject } from '../../testing/utils'; let component: WorkspaceitemActionsComponent; let fixture: ComponentFixture<WorkspaceitemActionsComponent>; -let mockObject: Workspaceitem; +let mockObject: WorkspaceItem; let notificationsServiceStub: NotificationsServiceStub; const mockDataService = jasmine.createSpyObj('WorkspaceitemDataService', { @@ -56,8 +57,8 @@ const item = Object.assign(new Item(), { ] } }); -const rd = new RemoteData(false, false, true, null, item); -mockObject = Object.assign(new Workspaceitem(), { item: observableOf(rd), id: '1234', uuid: '1234' }); +const rd = createSuccessfulRemoteDataObject(item); +mockObject = Object.assign(new WorkspaceItem(), { item: observableOf(rd), id: '1234', uuid: '1234' }); describe('WorkspaceitemActionsComponent', () => { beforeEach(async(() => { diff --git a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts index cea4c3746e321a96a833a945c1ab066a1f15f748..69214e800e35fa44c37fd253808f8ee692277eda 100644 --- a/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts +++ b/src/app/shared/mydspace-actions/workspaceitem/workspaceitem-actions.component.ts @@ -5,26 +5,26 @@ import { BehaviorSubject } from 'rxjs'; import { NgbModal } from '@ng-bootstrap/ng-bootstrap'; import { TranslateService } from '@ngx-translate/core'; -import { Workspaceitem } from '../../../core/submission/models/workspaceitem.model'; +import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model'; import { MyDSpaceActionsComponent } from '../mydspace-actions'; import { WorkspaceitemDataService } from '../../../core/submission/workspaceitem-data.service'; import { ResourceType } from '../../../core/shared/resource-type'; import { NotificationsService } from '../../notifications/notifications.service'; /** - * This component represents mydspace actions related to Workspaceitem object. + * This component represents mydspace actions related to WorkspaceItem object. */ @Component({ selector: 'ds-workspaceitem-actions', styleUrls: ['./workspaceitem-actions.component.scss'], templateUrl: './workspaceitem-actions.component.html', }) -export class WorkspaceitemActionsComponent extends MyDSpaceActionsComponent<Workspaceitem, WorkspaceitemDataService> { +export class WorkspaceitemActionsComponent extends MyDSpaceActionsComponent<WorkspaceItem, WorkspaceitemDataService> { /** * The workspaceitem object */ - @Input() object: Workspaceitem; + @Input() object: WorkspaceItem; /** * A boolean representing if a delete operation is pending @@ -46,7 +46,7 @@ export class WorkspaceitemActionsComponent extends MyDSpaceActionsComponent<Work protected modalService: NgbModal, protected notificationsService: NotificationsService, protected translate: TranslateService) { - super(ResourceType.Workspaceitem, injector, router, notificationsService, translate); + super(WorkspaceItem.type, injector, router, notificationsService, translate); } /** @@ -70,9 +70,9 @@ export class WorkspaceitemActionsComponent extends MyDSpaceActionsComponent<Work /** * Init the target object * - * @param {Workspaceitem} object + * @param {WorkspaceItem} object */ - initObjects(object: Workspaceitem) { + initObjects(object: WorkspaceItem) { this.object = object; } diff --git a/src/app/shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component.spec.ts b/src/app/shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component.spec.ts index 9c23ab3603b0d8dfbe85a557155660a63141dcb5..712e478f865fd8ecd0c5a6d9cf7444a3afcc1a0c 100644 --- a/src/app/shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component.spec.ts +++ b/src/app/shared/object-collection/shared/mydspace-item-status/my-dspace-item-status.component.spec.ts @@ -6,22 +6,23 @@ import { TranslateLoader, TranslateModule } from '@ngx-translate/core'; import { RemoteData } from '../../../../core/data/remote-data'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { PoolTask } from '../../../../core/tasks/models/pool-task-object.model'; import { EPersonMock } from '../../../testing/eperson-mock'; import { MyDSpaceItemStatusComponent } from './my-dspace-item-status.component'; import { MyDspaceItemStatusType } from './my-dspace-item-status-type'; import { MockTranslateLoader } from '../../../mocks/mock-translate-loader'; import { By } from '@angular/platform-browser'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: MyDSpaceItemStatusComponent; let fixture: ComponentFixture<MyDSpaceItemStatusComponent>; let mockResultObject: PoolTask; -const rdSumbitter = new RemoteData(false, false, true, null, EPersonMock); -const workflowitem = Object.assign(new Workflowitem(), { submitter: observableOf(rdSumbitter) }); -const rdWorkflowitem = new RemoteData(false, false, true, null, workflowitem); +const rdSumbitter = createSuccessfulRemoteDataObject(EPersonMock); +const workflowitem = Object.assign(new WorkflowItem(), { submitter: observableOf(rdSumbitter) }); +const rdWorkflowitem = createSuccessfulRemoteDataObject(workflowitem); mockResultObject = Object.assign(new PoolTask(), { workflowitem: observableOf(rdWorkflowitem) }); describe('MyDSpaceItemStatusComponent', () => { diff --git a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts index 77460a3674eaa71cdc03c86a4111cdb64374b97a..0641a79378ee93d37e3bf9049895fbcd17329b0a 100644 --- a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts +++ b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.spec.ts @@ -7,11 +7,12 @@ import { cold } from 'jasmine-marbles'; import { RemoteData } from '../../../../core/data/remote-data'; import { ItemSubmitterComponent } from './item-submitter.component'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { PoolTask } from '../../../../core/tasks/models/pool-task-object.model'; import { EPersonMock } from '../../../testing/eperson-mock'; import { MockTranslateLoader } from '../../../mocks/mock-translate-loader'; import { By } from '@angular/platform-browser'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: ItemSubmitterComponent; let fixture: ComponentFixture<ItemSubmitterComponent>; @@ -20,9 +21,9 @@ const compIndex = 1; let mockResultObject: PoolTask; -const rdSumbitter = new RemoteData(false, false, true, null, EPersonMock); -const workflowitem = Object.assign(new Workflowitem(), { submitter: observableOf(rdSumbitter) }); -const rdWorkflowitem = new RemoteData(false, false, true, null, workflowitem); +const rdSumbitter = createSuccessfulRemoteDataObject(EPersonMock); +const workflowitem = Object.assign(new WorkflowItem(), { submitter: observableOf(rdSumbitter) }); +const rdWorkflowitem = createSuccessfulRemoteDataObject(workflowitem); mockResultObject = Object.assign(new PoolTask(), { workflowitem: observableOf(rdWorkflowitem) }); describe('ItemSubmitterComponent', () => { diff --git a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.ts b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.ts index f752fa6f04d6955db49c9c18045bdd75bbff68b5..01c0dd9f3515ab699fe460728315f97b8c2b5f3a 100644 --- a/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.ts +++ b/src/app/shared/object-collection/shared/mydspace-item-submitter/item-submitter.component.ts @@ -6,7 +6,7 @@ import { filter, find, flatMap, map } from 'rxjs/operators'; import { EPerson } from '../../../../core/eperson/models/eperson.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { isNotEmpty, isNotUndefined } from '../../../empty.util'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; /** * This component represents a badge with submitter information. @@ -32,9 +32,9 @@ export class ItemSubmitterComponent implements OnInit { * Initialize submitter object */ ngOnInit() { - this.submitter$ = (this.object.workflowitem as Observable<RemoteData<Workflowitem>>).pipe( - filter((rd: RemoteData<Workflowitem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))), - flatMap((rd: RemoteData<Workflowitem>) => rd.payload.submitter as Observable<RemoteData<EPerson>>), + this.submitter$ = (this.object.workflowitem as Observable<RemoteData<WorkflowItem>>).pipe( + filter((rd: RemoteData<WorkflowItem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))), + flatMap((rd: RemoteData<WorkflowItem>) => rd.payload.submitter as Observable<RemoteData<EPerson>>), find((rd: RemoteData<EPerson>) => rd.hasSucceeded && isNotEmpty(rd.payload)), map((rd: RemoteData<EPerson>) => rd.payload)); } diff --git a/src/app/shared/object-collection/shared/workflowitem-my-dspace-result.model.ts b/src/app/shared/object-collection/shared/workflowitem-my-dspace-result.model.ts index 89f6f351adacfff6f588248eeb6bc508af60fd65..d91c03b5491c27dc44ee427bcfd4bc31d6957234 100644 --- a/src/app/shared/object-collection/shared/workflowitem-my-dspace-result.model.ts +++ b/src/app/shared/object-collection/shared/workflowitem-my-dspace-result.model.ts @@ -1,11 +1,11 @@ -import { Workflowitem } from '../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../core/submission/models/workflowitem.model'; import { SearchResult } from '../../../+search-page/search-result.model'; import { MyDSpaceConfigurationValueType } from '../../../+my-dspace-page/my-dspace-configuration-value-type'; import { searchResultFor } from '../../../+search-page/search-service/search-result-element-decorator'; /** - * Represents a search result object of a Workflowitem object + * Represents a search result object of a WorkflowItem object */ -@searchResultFor(Workflowitem, MyDSpaceConfigurationValueType.Workspace) -export class WorkflowitemMyDSpaceResult extends SearchResult<Workflowitem> { +@searchResultFor(WorkflowItem, MyDSpaceConfigurationValueType.Workspace) +export class WorkflowitemMyDSpaceResult extends SearchResult<WorkflowItem> { } diff --git a/src/app/shared/object-collection/shared/workspaceitem-my-dspace-result.model.ts b/src/app/shared/object-collection/shared/workspaceitem-my-dspace-result.model.ts index 20474c9ad3fa2ed8e085b80858740e280b1123c3..b7bd5e31d64d613551176097551b05b6bbe1d0c9 100644 --- a/src/app/shared/object-collection/shared/workspaceitem-my-dspace-result.model.ts +++ b/src/app/shared/object-collection/shared/workspaceitem-my-dspace-result.model.ts @@ -1,11 +1,11 @@ -import { Workspaceitem } from '../../../core/submission/models/workspaceitem.model'; +import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model'; import { MyDSpaceConfigurationValueType } from '../../../+my-dspace-page/my-dspace-configuration-value-type'; import { searchResultFor } from '../../../+search-page/search-service/search-result-element-decorator'; import { SearchResult } from '../../../+search-page/search-result.model'; /** - * Represents a search result object of a Workspaceitem object + * Represents a search result object of a WorkspaceItem object */ -@searchResultFor(Workspaceitem, MyDSpaceConfigurationValueType.Workspace) -export class WorkspaceitemMyDSpaceResult extends SearchResult<Workspaceitem> { +@searchResultFor(WorkspaceItem, MyDSpaceConfigurationValueType.Workspace) +export class WorkspaceitemMyDSpaceResult extends SearchResult<WorkspaceItem> { } diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-my-dspace-result/claimed-my-dspace-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-my-dspace-result/claimed-my-dspace-result-detail-element.component.spec.ts index d3307721ff29e6cde777bb56d01f81a22eef0ca7..f57eb6420e0dd6ab692fd70513b381e9b8a6859d 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-my-dspace-result/claimed-my-dspace-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-my-dspace-result/claimed-my-dspace-result-detail-element.component.spec.ts @@ -10,7 +10,8 @@ import { ClaimedTaskMyDSpaceResult } from '../../../object-collection/shared/cla import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: ClaimedMyDSpaceResultDetailElementComponent; let fixture: ComponentFixture<ClaimedMyDSpaceResultDetailElementComponent>; @@ -49,9 +50,9 @@ const item = Object.assign(new Item(), { ] } }); -const rdItem = new RemoteData(false, false, true, null, item); -const workflowitem = Object.assign(new Workflowitem(), { item: observableOf(rdItem) }); -const rdWorkflowitem = new RemoteData(false, false, true, null, workflowitem); +const rdItem = createSuccessfulRemoteDataObject(item); +const workflowitem = Object.assign(new WorkflowItem(), { item: observableOf(rdItem) }); +const rdWorkflowitem = createSuccessfulRemoteDataObject(workflowitem); mockResultObject.indexableObject = Object.assign(new ClaimedTask(), { workflowitem: observableOf(rdWorkflowitem) }); describe('ClaimedMyDSpaceResultDetailElementComponent', () => { diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-my-dspace-result/claimed-my-dspace-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-my-dspace-result/claimed-my-dspace-result-detail-element.component.ts index 5f7b0aab5509167498cfbe4449628833c1802789..581d52c05f7b8901520e8073ed5cabfde5043870 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-my-dspace-result/claimed-my-dspace-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/claimed-my-dspace-result/claimed-my-dspace-result-detail-element.component.ts @@ -8,7 +8,7 @@ import { RemoteData } from '../../../../core/data/remote-data'; import { ViewMode } from '../../../../core/shared/view-mode.model'; import { isNotUndefined } from '../../../empty.util'; import { ListableObject } from '../../../object-collection/shared/listable-object.model'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model'; import { ClaimedTaskMyDSpaceResult } from '../../../object-collection/shared/claimed-task-my-dspace-result.model'; import { MyDSpaceResultDetailElementComponent } from '../my-dspace-result-detail-element.component'; @@ -41,7 +41,7 @@ export class ClaimedMyDSpaceResultDetailElementComponent extends MyDSpaceResultD /** * The workflowitem object that belonging to the result object */ - public workflowitem: Workflowitem; + public workflowitem: WorkflowItem; constructor(@Inject('objectElementProvider') public listable: ListableObject) { super(listable); @@ -51,16 +51,16 @@ export class ClaimedMyDSpaceResultDetailElementComponent extends MyDSpaceResultD * Initialize all instance variables */ ngOnInit() { - this.initWorkflowItem(this.dso.workflowitem as Observable<RemoteData<Workflowitem>>); + this.initWorkflowItem(this.dso.workflowitem as Observable<RemoteData<WorkflowItem>>); } /** * Retrieve workflowitem from result object */ - initWorkflowItem(wfi$: Observable<RemoteData<Workflowitem>>) { + initWorkflowItem(wfi$: Observable<RemoteData<WorkflowItem>>) { wfi$.pipe( - find((rd: RemoteData<Workflowitem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))) - ).subscribe((rd: RemoteData<Workflowitem>) => { + find((rd: RemoteData<WorkflowItem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))) + ).subscribe((rd: RemoteData<WorkflowItem>) => { this.workflowitem = rd.payload; }); } diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-my-dspace-result/pool-my-dspace-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-my-dspace-result/pool-my-dspace-result-detail-element.component.spec.ts index 0eea01aa1cb3146601389fb736b7ca0bd74f57ac..a031ac3a49939bec16544db1968a5ff0a089945f 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-my-dspace-result/pool-my-dspace-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-my-dspace-result/pool-my-dspace-result-detail-element.component.spec.ts @@ -10,7 +10,8 @@ import { PoolTaskMyDSpaceResult } from '../../../object-collection/shared/pool-t import { PoolTask } from '../../../../core/tasks/models/pool-task-object.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: PoolMyDSpaceResultDetailElementComponent; let fixture: ComponentFixture<PoolMyDSpaceResultDetailElementComponent>; @@ -49,9 +50,9 @@ const item = Object.assign(new Item(), { ] } }); -const rdItem = new RemoteData(false, false, true, null, item); -const workflowitem = Object.assign(new Workflowitem(), { item: observableOf(rdItem) }); -const rdWorkflowitem = new RemoteData(false, false, true, null, workflowitem); +const rdItem = createSuccessfulRemoteDataObject(item); +const workflowitem = Object.assign(new WorkflowItem(), { item: observableOf(rdItem) }); +const rdWorkflowitem = createSuccessfulRemoteDataObject(workflowitem); mockResultObject.indexableObject = Object.assign(new PoolTask(), { workflowitem: observableOf(rdWorkflowitem) }); describe('PoolMyDSpaceResultDetailElementComponent', () => { diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-my-dspace-result/pool-my-dspace-result-detail-lement.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-my-dspace-result/pool-my-dspace-result-detail-lement.component.ts index ef7bcadebfd61d5fc935c6b54d3ff1094e317ddd..0b5b6c6524cf1c5e5d4865c5f2292361c0eb9e6c 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/pool-my-dspace-result/pool-my-dspace-result-detail-lement.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/pool-my-dspace-result/pool-my-dspace-result-detail-lement.component.ts @@ -2,18 +2,16 @@ import { Component, Inject } from '@angular/core'; import { Observable } from 'rxjs'; import { find } from 'rxjs/operators'; - -import { ViewMode } from '../../../../core/shared/view-mode.model'; import { renderElementsFor } from '../../../object-collection/shared/dso-element-decorator'; import { RemoteData } from '../../../../core/data/remote-data'; import { isNotUndefined } from '../../../empty.util'; import { ListableObject } from '../../../object-collection/shared/listable-object.model'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; import { PoolTask } from '../../../../core/tasks/models/pool-task-object.model'; import { PoolTaskMyDSpaceResult } from '../../../object-collection/shared/pool-task-my-dspace-result.model'; import { MyDSpaceResultDetailElementComponent } from '../my-dspace-result-detail-element.component'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; import { SetViewMode } from '../../../view-mode'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; /** * This component renders pool task object for the mydspace result in the detail view. @@ -41,7 +39,7 @@ export class PoolMyDSpaceResultDetailElementComponent extends MyDSpaceResultDeta /** * The workflowitem object that belonging to the result object */ - public workflowitem: Workflowitem; + public workflowitem: WorkflowItem; constructor(@Inject('objectElementProvider') public listable: ListableObject) { super(listable); @@ -51,16 +49,16 @@ export class PoolMyDSpaceResultDetailElementComponent extends MyDSpaceResultDeta * Initialize all instance variables */ ngOnInit() { - this.initWorkflowItem(this.dso.workflowitem as Observable<RemoteData<Workflowitem>>); + this.initWorkflowItem(this.dso.workflowitem as Observable<RemoteData<WorkflowItem>>); } /** * Retrieve workflowitem from result object */ - initWorkflowItem(wfi$: Observable<RemoteData<Workflowitem>>) { + initWorkflowItem(wfi$: Observable<RemoteData<WorkflowItem>>) { wfi$.pipe( - find((rd: RemoteData<Workflowitem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))) - ).subscribe((rd: RemoteData<Workflowitem>) => { + find((rd: RemoteData<WorkflowItem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))) + ).subscribe((rd: RemoteData<WorkflowItem>) => { this.workflowitem = rd.payload; }); } diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-detail-element.component.spec.ts index f8bdbf9fd6b81e02df26013b9660287b55b38967..2a4b1321e2e408bc850dc066031a57728eb6027c 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-detail-element.component.spec.ts @@ -7,9 +7,10 @@ import { of as observableOf } from 'rxjs'; import { Item } from '../../../../core/shared/item.model'; import { WorkflowitemMyDSpaceResultDetailElementComponent } from './workflowitem-my-dspace-result-detail-element.component'; import { WorkflowitemMyDSpaceResult } from '../../../object-collection/shared/workflowitem-my-dspace-result.model'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: WorkflowitemMyDSpaceResultDetailElementComponent; let fixture: ComponentFixture<WorkflowitemMyDSpaceResultDetailElementComponent>; @@ -48,8 +49,8 @@ const item = Object.assign(new Item(), { ] } }); -const rd = new RemoteData(false, false, true, null, item); -mockResultObject.indexableObject = Object.assign(new Workflowitem(), { item: observableOf(rd) }); +const rd = createSuccessfulRemoteDataObject(item); +mockResultObject.indexableObject = Object.assign(new WorkflowItem(), { item: observableOf(rd) }); describe('WorkflowitemMyDSpaceResultDetailElementComponent', () => { beforeEach(async(() => { diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-detail-element.component.ts index 1c4b0c668f59538f48949ccf14d17a4876a251d6..c28f044e6e21b273627920bf0c9aacc3d66d1395 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-detail-element.component.ts @@ -5,7 +5,7 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { Item } from '../../../../core/shared/item.model'; import { ListableObject } from '../../../object-collection/shared/listable-object.model'; import { WorkflowitemMyDSpaceResult } from '../../../object-collection/shared/workflowitem-my-dspace-result.model'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { MyDSpaceResultDetailElementComponent } from '../my-dspace-result-detail-element.component'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; import { Observable } from 'rxjs/internal/Observable'; @@ -24,8 +24,8 @@ import { SetViewMode } from '../../../view-mode'; }) @renderElementsFor(WorkflowitemMyDSpaceResult, SetViewMode.Detail) -@renderElementsFor(Workflowitem, SetViewMode.Detail) -export class WorkflowitemMyDSpaceResultDetailElementComponent extends MyDSpaceResultDetailElementComponent<WorkflowitemMyDSpaceResult, Workflowitem> { +@renderElementsFor(WorkflowItem, SetViewMode.Detail) +export class WorkflowitemMyDSpaceResultDetailElementComponent extends MyDSpaceResultDetailElementComponent<WorkflowitemMyDSpaceResult, WorkflowItem> { /** * The item object that belonging to the result object diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-detail-element.component.spec.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-detail-element.component.spec.ts index af67bf53ea1bc2c4cda908b3b61980d4a68b9816..0e16b9c0f6e8c7347e866764c9a9b5fb1145a195 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-detail-element.component.spec.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-detail-element.component.spec.ts @@ -7,9 +7,10 @@ import { of as observableOf } from 'rxjs'; import { Item } from '../../../../core/shared/item.model'; import { WorkspaceitemMyDSpaceResultDetailElementComponent } from './workspaceitem-my-dspace-result-detail-element.component'; import { WorkspaceitemMyDSpaceResult } from '../../../object-collection/shared/workspaceitem-my-dspace-result.model'; -import { Workspaceitem } from '../../../../core/submission/models/workspaceitem.model'; +import { WorkspaceItem } from '../../../../core/submission/models/workspaceitem.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: WorkspaceitemMyDSpaceResultDetailElementComponent; let fixture: ComponentFixture<WorkspaceitemMyDSpaceResultDetailElementComponent>; @@ -48,8 +49,8 @@ const item = Object.assign(new Item(), { ] } }); -const rd = new RemoteData(false, false, true, null, item); -mockResultObject.indexableObject = Object.assign(new Workspaceitem(), { item: observableOf(rd) }); +const rd = createSuccessfulRemoteDataObject(item); +mockResultObject.indexableObject = Object.assign(new WorkspaceItem(), { item: observableOf(rd) }); describe('WorkspaceitemMyDSpaceResultDetailElementComponent', () => { beforeEach(async(() => { diff --git a/src/app/shared/object-detail/my-dspace-result-detail-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-detail-element.component.ts b/src/app/shared/object-detail/my-dspace-result-detail-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-detail-element.component.ts index 390db7ec284147ca19d0649e8a425061e8312d1f..af735ecb1ebec11f8a6e40cc1feebc3aa659d475 100644 --- a/src/app/shared/object-detail/my-dspace-result-detail-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-detail-element.component.ts +++ b/src/app/shared/object-detail/my-dspace-result-detail-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-detail-element.component.ts @@ -4,8 +4,9 @@ import { Observable } from 'rxjs'; import { find } from 'rxjs/operators'; import { renderElementsFor } from '../../../object-collection/shared/dso-element-decorator'; -import { ViewMode } from '../../../../core/shared/view-mode.model'; -import { Workspaceitem } from '../../../../core/submission/models/workspaceitem.model'; +import { + WorkspaceItem +} from '../../../../core/submission/models/workspaceitem.model'; import { WorkspaceitemMyDSpaceResult } from '../../../object-collection/shared/workspaceitem-my-dspace-result.model'; import { Item } from '../../../../core/shared/item.model'; import { RemoteData } from '../../../../core/data/remote-data'; @@ -25,8 +26,8 @@ import { SetViewMode } from '../../../view-mode'; }) @renderElementsFor(WorkspaceitemMyDSpaceResult, SetViewMode.Detail) -@renderElementsFor(Workspaceitem, SetViewMode.Detail) -export class WorkspaceitemMyDSpaceResultDetailElementComponent extends MyDSpaceResultDetailElementComponent<WorkspaceitemMyDSpaceResult, Workspaceitem> { +@renderElementsFor(WorkspaceItem, SetViewMode.Detail) +export class WorkspaceitemMyDSpaceResultDetailElementComponent extends MyDSpaceResultDetailElementComponent<WorkspaceitemMyDSpaceResult, WorkspaceItem> { /** * The item object that belonging to the result object diff --git a/src/app/shared/object-detail/object-detail.component.spec.ts b/src/app/shared/object-detail/object-detail.component.spec.ts index 9b81f1019f2bec0cb2410f6249ed9b2360ed5554..651e6a89a8f6a63dcdbc84bb4c011852837ef6a0 100644 --- a/src/app/shared/object-detail/object-detail.component.spec.ts +++ b/src/app/shared/object-detail/object-detail.component.spec.ts @@ -8,6 +8,7 @@ import { RemoteData } from '../../core/data/remote-data'; import { PaginatedList } from '../../core/data/paginated-list'; import { PageInfo } from '../../core/shared/page-info.model'; import { NoopAnimationsModule } from '@angular/platform-browser/animations'; +import { createSuccessfulRemoteDataObject } from '../testing/utils'; describe('ObjectDetailComponent', () => { let comp: ObjectDetailComponent; @@ -27,7 +28,7 @@ describe('ObjectDetailComponent', () => { { ten: 10 } ]; const pageInfo = Object.assign(new PageInfo(), {elementsPerPage: 1, totalElements: 10, totalPages: 10, currentPage: 1}) - const mockRD = new RemoteData(false, false, true, null, new PaginatedList(pageInfo, testObjects)); + const mockRD = createSuccessfulRemoteDataObject(new PaginatedList(pageInfo, testObjects)); beforeEach(async(() => { TestBed.configureTestingModule({ diff --git a/src/app/shared/object-list/item-list-element/item-list-element.component.spec.ts b/src/app/shared/object-list/item-list-element/item-list-element.component.spec.ts index 11fdae7e6dd3957e891012767fec1cf02a312050..2c0c8b0aa2a9e7bb2ca482ca9c19813351ffc549 100644 --- a/src/app/shared/object-list/item-list-element/item-list-element.component.spec.ts +++ b/src/app/shared/object-list/item-list-element/item-list-element.component.spec.ts @@ -8,9 +8,10 @@ import { PageInfo } from '../../../core/shared/page-info.model'; import { By } from '@angular/platform-browser'; import { createRelationshipsObservable } from '../../../+item-page/simple/item-types/shared/item.component.spec'; import { of as observableOf } from 'rxjs'; +import { createSuccessfulRemoteDataObject$ } from '../../testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: [], relationships: createRelationshipsObservable() }); diff --git a/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.spec.ts b/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.spec.ts index f320ff2efc9ee656640168be5905777434aedc4f..9adf255523b2da9d616a3c3d31fec1844569c8ab 100644 --- a/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/item-list-element/item-types/typed-item-search-result-list-element.component.spec.ts @@ -12,9 +12,10 @@ import { ItemSearchResult } from '../../../object-collection/shared/item-search- import { createRelationshipsObservable } from '../../../../+item-page/simple/item-types/shared/item.component.spec'; import { of as observableOf } from 'rxjs'; import { MetadataMap } from '../../../../core/shared/metadata.models'; +import { createSuccessfulRemoteDataObject$ } from '../../../testing/utils'; const mockItem: Item = Object.assign(new Item(), { - bitstreams: observableOf(new RemoteData(false, false, true, null, new PaginatedList(new PageInfo(), []))), + bitstreams: createSuccessfulRemoteDataObject$(new PaginatedList(new PageInfo(), [])), metadata: [], relationships: createRelationshipsObservable() }); diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-my-dspace-result/claimed-my-dspace-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-my-dspace-result/claimed-my-dspace-result-list-element.component.spec.ts index 7c30b2ef8c8d475ed528f7826a2afd0924f7af80..5815cd54017bbfcf429c7a6c1b6ed5ebd556f7d1 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-my-dspace-result/claimed-my-dspace-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-my-dspace-result/claimed-my-dspace-result-list-element.component.spec.ts @@ -10,7 +10,8 @@ import { ClaimedTaskMyDSpaceResult } from '../../../object-collection/shared/cla import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: ClaimedMyDSpaceResultListElementComponent; let fixture: ComponentFixture<ClaimedMyDSpaceResultListElementComponent>; @@ -49,9 +50,9 @@ const item = Object.assign(new Item(), { ] } }); -const rdItem = new RemoteData(false, false, true, null, item); -const workflowitem = Object.assign(new Workflowitem(), { item: observableOf(rdItem) }); -const rdWorkflowitem = new RemoteData(false, false, true, null, workflowitem); +const rdItem = createSuccessfulRemoteDataObject(item); +const workflowitem = Object.assign(new WorkflowItem(), { item: observableOf(rdItem) }); +const rdWorkflowitem = createSuccessfulRemoteDataObject(workflowitem); mockResultObject.indexableObject = Object.assign(new ClaimedTask(), { workflowitem: observableOf(rdWorkflowitem) }); describe('ClaimedMyDSpaceResultListElementComponent', () => { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/claimed-my-dspace-result/claimed-my-dspace-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/claimed-my-dspace-result/claimed-my-dspace-result-list-element.component.ts index 0725f98897e355abb3d0dd73d16977b3e10f6557..3423df7009ceac41e8a59907e70534647e49e8c6 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/claimed-my-dspace-result/claimed-my-dspace-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/claimed-my-dspace-result/claimed-my-dspace-result-list-element.component.ts @@ -9,7 +9,7 @@ import { MyDSpaceResultListElementComponent, } from '../my-dspace-result-list-el import { ViewMode } from '../../../../core/shared/view-mode.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { isNotUndefined } from '../../../empty.util'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { ClaimedTask } from '../../../../core/tasks/models/claimed-task-object.model'; import { ClaimedTaskMyDSpaceResult } from '../../../object-collection/shared/claimed-task-my-dspace-result.model'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; @@ -42,22 +42,22 @@ export class ClaimedMyDSpaceResultListElementComponent extends MyDSpaceResultLis /** * The workflowitem object that belonging to the result object */ - public workflowitem: Workflowitem; + public workflowitem: WorkflowItem; /** * Initialize all instance variables */ ngOnInit() { - this.initWorkflowItem(this.dso.workflowitem as Observable<RemoteData<Workflowitem>>); + this.initWorkflowItem(this.dso.workflowitem as Observable<RemoteData<WorkflowItem>>); } /** * Retrieve workflowitem from result object */ - initWorkflowItem(wfi$: Observable<RemoteData<Workflowitem>>) { + initWorkflowItem(wfi$: Observable<RemoteData<WorkflowItem>>) { wfi$.pipe( - find((rd: RemoteData<Workflowitem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))) - ).subscribe((rd: RemoteData<Workflowitem>) => { + find((rd: RemoteData<WorkflowItem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))) + ).subscribe((rd: RemoteData<WorkflowItem>) => { this.workflowitem = rd.payload; }); } diff --git a/src/app/shared/object-list/my-dspace-result-list-element/pool-my-dspace-result/pool-my-dspace-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/pool-my-dspace-result/pool-my-dspace-result-list-element.component.spec.ts index 36eb8f253ad7c0ac4407d3e2a2ec069df58086bd..22804a3a30593c36188d67b91b0e1b5c826329be 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/pool-my-dspace-result/pool-my-dspace-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/pool-my-dspace-result/pool-my-dspace-result-list-element.component.spec.ts @@ -10,7 +10,8 @@ import { PoolTaskMyDSpaceResult } from '../../../object-collection/shared/pool-t import { PoolTask } from '../../../../core/tasks/models/pool-task-object.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: PoolMyDSpaceResultListElementComponent; let fixture: ComponentFixture<PoolMyDSpaceResultListElementComponent>; @@ -49,9 +50,9 @@ const item = Object.assign(new Item(), { ] } }); -const rdItem = new RemoteData(false, false, true, null, item); -const workflowitem = Object.assign(new Workflowitem(), { item: observableOf(rdItem) }); -const rdWorkflowitem = new RemoteData(false, false, true, null, workflowitem); +const rdItem = createSuccessfulRemoteDataObject(item); +const workflowitem = Object.assign(new WorkflowItem(), { item: observableOf(rdItem) }); +const rdWorkflowitem = createSuccessfulRemoteDataObject(workflowitem); mockResultObject.indexableObject = Object.assign(new PoolTask(), { workflowitem: observableOf(rdWorkflowitem) }); describe('PoolMyDSpaceResultListElementComponent', () => { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/pool-my-dspace-result/pool-my-dspace-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/pool-my-dspace-result/pool-my-dspace-result-list-element.component.ts index 2d78a7e2e8e2087957529689b1cacd79bb43b064..0b60c60dc1ceb66ad9179881748bf04ee5855b01 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/pool-my-dspace-result/pool-my-dspace-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/pool-my-dspace-result/pool-my-dspace-result-list-element.component.ts @@ -9,7 +9,7 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { isNotUndefined } from '../../../empty.util'; import { ListableObject } from '../../../object-collection/shared/listable-object.model'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { PoolTask } from '../../../../core/tasks/models/pool-task-object.model'; import { PoolTaskMyDSpaceResult } from '../../../object-collection/shared/pool-task-my-dspace-result.model'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; @@ -41,7 +41,7 @@ export class PoolMyDSpaceResultListElementComponent extends MyDSpaceResultListEl /** * The workflowitem object that belonging to the result object */ - public workflowitem: Workflowitem; + public workflowitem: WorkflowItem; constructor(@Inject('objectElementProvider') public listable: ListableObject, @Inject('indexElementProvider') public index: number) { @@ -52,16 +52,16 @@ export class PoolMyDSpaceResultListElementComponent extends MyDSpaceResultListEl * Initialize all instance variables */ ngOnInit() { - this.initWorkflowItem(this.dso.workflowitem as Observable<RemoteData<Workflowitem>>); + this.initWorkflowItem(this.dso.workflowitem as Observable<RemoteData<WorkflowItem>>); } /** * Retrieve workflowitem from result object */ - initWorkflowItem(wfi$: Observable<RemoteData<Workflowitem>>) { + initWorkflowItem(wfi$: Observable<RemoteData<WorkflowItem>>) { wfi$.pipe( - find((rd: RemoteData<Workflowitem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))) - ).subscribe((rd: RemoteData<Workflowitem>) => { + find((rd: RemoteData<WorkflowItem>) => (rd.hasSucceeded && isNotUndefined(rd.payload))) + ).subscribe((rd: RemoteData<WorkflowItem>) => { this.workflowitem = rd.payload; }); } diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-list-element.component.spec.ts index 2bcd4d46b07c3a43d12f17df3d05e197107c5c94..ab472b401473bd67d69d23560d190a36ff87e844 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-list-element.component.spec.ts @@ -7,9 +7,10 @@ import { of as observableOf } from 'rxjs'; import { Item } from '../../../../core/shared/item.model'; import { WorkflowitemMyDSpaceResultListElementComponent } from './workflowitem-my-dspace-result-list-element.component'; import { WorkflowitemMyDSpaceResult } from '../../../object-collection/shared/workflowitem-my-dspace-result.model'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: WorkflowitemMyDSpaceResultListElementComponent; let fixture: ComponentFixture<WorkflowitemMyDSpaceResultListElementComponent>; @@ -48,8 +49,8 @@ const item = Object.assign(new Item(), { ] } }); -const rd = new RemoteData(false, false, true, null, item); -mockResultObject.indexableObject = Object.assign(new Workflowitem(), { item: observableOf(rd) }); +const rd = createSuccessfulRemoteDataObject(item); +mockResultObject.indexableObject = Object.assign(new WorkflowItem(), { item: observableOf(rd) }); describe('WorkflowitemMyDSpaceResultListElementComponent', () => { beforeEach(async(() => { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-list-element.component.ts index 9a5038225cb0a8a39dddba86c3be18a1bf5bb2b0..b5d11b8b137a829fb4ef2b8ea06a692ce4ebad78 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workflowitem-my-dspace-result/workflowitem-my-dspace-result-list-element.component.ts @@ -9,7 +9,7 @@ import { ViewMode } from '../../../../core/shared/view-mode.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { isNotUndefined } from '../../../empty.util'; import { WorkflowitemMyDSpaceResult } from '../../../object-collection/shared/workflowitem-my-dspace-result.model'; -import { Workflowitem } from '../../../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../../../core/submission/models/workflowitem.model'; import { Item } from '../../../../core/shared/item.model'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; import { SetViewMode } from '../../../view-mode'; @@ -24,8 +24,8 @@ import { SetViewMode } from '../../../view-mode'; }) @renderElementsFor(WorkflowitemMyDSpaceResult, SetViewMode.List) -@renderElementsFor(Workflowitem, SetViewMode.List) -export class WorkflowitemMyDSpaceResultListElementComponent extends MyDSpaceResultListElementComponent<WorkflowitemMyDSpaceResult, Workflowitem> { +@renderElementsFor(WorkflowItem, SetViewMode.List) +export class WorkflowitemMyDSpaceResultListElementComponent extends MyDSpaceResultListElementComponent<WorkflowitemMyDSpaceResult, WorkflowItem> { /** * The item object that belonging to the result object diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-list-element.component.spec.ts b/src/app/shared/object-list/my-dspace-result-list-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-list-element.component.spec.ts index 789b69da1b2c53dfbd7ccc65a5ebe2f73859d3e9..a1c2472d2749c28d9144b71bd24c9c89d840cf55 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-list-element.component.spec.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-list-element.component.spec.ts @@ -7,9 +7,10 @@ import { of as observableOf } from 'rxjs'; import { Item } from '../../../../core/shared/item.model'; import { WorkspaceitemMyDSpaceResultListElementComponent } from './workspaceitem-my-dspace-result-list-element.component'; import { WorkspaceitemMyDSpaceResult } from '../../../object-collection/shared/workspaceitem-my-dspace-result.model'; -import { Workspaceitem } from '../../../../core/submission/models/workspaceitem.model'; +import { WorkspaceItem } from '../../../../core/submission/models/workspaceitem.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { MyDspaceItemStatusType } from '../../../object-collection/shared/mydspace-item-status/my-dspace-item-status-type'; +import { createSuccessfulRemoteDataObject } from '../../../testing/utils'; let component: WorkspaceitemMyDSpaceResultListElementComponent; let fixture: ComponentFixture<WorkspaceitemMyDSpaceResultListElementComponent>; @@ -48,8 +49,8 @@ const item = Object.assign(new Item(), { ] } }); -const rd = new RemoteData(false, false, true, null, item); -mockResultObject.indexableObject = Object.assign(new Workspaceitem(), { item: observableOf(rd) }); +const rd = createSuccessfulRemoteDataObject(item); +mockResultObject.indexableObject = Object.assign(new WorkspaceItem(), { item: observableOf(rd) }); describe('WorkspaceitemMyDSpaceResultListElementComponent', () => { beforeEach(async(() => { diff --git a/src/app/shared/object-list/my-dspace-result-list-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-list-element.component.ts b/src/app/shared/object-list/my-dspace-result-list-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-list-element.component.ts index 9ea647b4ba40a0d6a96eeefc01528dcb6b92af52..118965c64a846d71b5df4bd9d530a9c9e81ffd0f 100644 --- a/src/app/shared/object-list/my-dspace-result-list-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-list-element.component.ts +++ b/src/app/shared/object-list/my-dspace-result-list-element/workspaceitem-my-dspace-result/workspaceitem-my-dspace-result-list-element.component.ts @@ -6,7 +6,7 @@ import { find } from 'rxjs/operators'; import { renderElementsFor } from '../../../object-collection/shared/dso-element-decorator'; import { MyDSpaceResultListElementComponent, } from '../my-dspace-result-list-element.component'; import { ViewMode } from '../../../../core/shared/view-mode.model'; -import { Workspaceitem } from '../../../../core/submission/models/workspaceitem.model'; +import { WorkspaceItem } from '../../../../core/submission/models/workspaceitem.model'; import { WorkspaceitemMyDSpaceResult } from '../../../object-collection/shared/workspaceitem-my-dspace-result.model'; import { RemoteData } from '../../../../core/data/remote-data'; import { isNotUndefined } from '../../../empty.util'; @@ -24,7 +24,7 @@ import { SetViewMode } from '../../../view-mode'; }) @renderElementsFor(WorkspaceitemMyDSpaceResult, SetViewMode.List) -export class WorkspaceitemMyDSpaceResultListElementComponent extends MyDSpaceResultListElementComponent<WorkspaceitemMyDSpaceResult, Workspaceitem> { +export class WorkspaceitemMyDSpaceResultListElementComponent extends MyDSpaceResultListElementComponent<WorkspaceitemMyDSpaceResult, WorkspaceItem> { /** * The item object that belonging to the result object diff --git a/src/app/shared/search-form/search-form.component.spec.ts b/src/app/shared/search-form/search-form.component.spec.ts index a60aeb8054d11b2e405e2921595f2f7ee1e0505a..fb632c533a2fc3758fe6e5ed2eea75e1403544a7 100644 --- a/src/app/shared/search-form/search-form.component.spec.ts +++ b/src/app/shared/search-form/search-form.component.spec.ts @@ -128,7 +128,7 @@ export const objects: DSpaceObject[] = [ self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/communities/7669c72a-3f2a-451f-a3b9-9210e7a4c02f', id: '7669c72a-3f2a-451f-a3b9-9210e7a4c02f', uuid: '7669c72a-3f2a-451f-a3b9-9210e7a4c02f', - type: ResourceType.Community, + type: Community.type, metadata: { 'dc.description': [ { @@ -182,7 +182,7 @@ export const objects: DSpaceObject[] = [ self: 'https://dspace7.4science.it/dspace-spring-rest/api/core/communities/9076bd16-e69a-48d6-9e41-0238cb40d863', id: '9076bd16-e69a-48d6-9e41-0238cb40d863', uuid: '9076bd16-e69a-48d6-9e41-0238cb40d863', - type: ResourceType.Community, + type: Community.type, metadata: { 'dc.description': [ { diff --git a/src/app/shared/testing/auth-request-service-stub.ts b/src/app/shared/testing/auth-request-service-stub.ts index 7f4c171bff72ffb9cc40a2b45dcff9046b0778a5..82ce682a9b427d11db5cc67116f8fa18f90eb1b0 100644 --- a/src/app/shared/testing/auth-request-service-stub.ts +++ b/src/app/shared/testing/auth-request-service-stub.ts @@ -6,6 +6,7 @@ import { EPerson } from '../../core/eperson/models/eperson.model'; import { isNotEmpty } from '../empty.util'; import { EPersonMock } from './eperson-mock'; import { RemoteData } from '../../core/data/remote-data'; +import { createSuccessfulRemoteDataObject$ } from './utils'; export class AuthRequestServiceStub { protected mockUser: EPerson = EPersonMock; @@ -27,7 +28,7 @@ export class AuthRequestServiceStub { if (this.validateToken(token)) { authStatusStub.authenticated = true; authStatusStub.token = this.mockTokenInfo; - authStatusStub.eperson = observableOf(new RemoteData<EPerson>(false, false, true, undefined, this.mockUser)); + authStatusStub.eperson = createSuccessfulRemoteDataObject$(this.mockUser); } else { authStatusStub.authenticated = false; } @@ -46,7 +47,7 @@ export class AuthRequestServiceStub { if (this.validateToken(token)) { authStatusStub.authenticated = true; authStatusStub.token = this.mockTokenInfo; - authStatusStub.eperson = observableOf(new RemoteData<EPerson>(false, false, true, undefined, this.mockUser)); + authStatusStub.eperson = createSuccessfulRemoteDataObject$(this.mockUser); } else { authStatusStub.authenticated = false; } diff --git a/src/app/shared/testing/auth-service-stub.ts b/src/app/shared/testing/auth-service-stub.ts index fa263da31f89cfa955fd4972d40c1159d836c513..a65923dcab1a3ac8463c703398eee6f6df55d5a2 100644 --- a/src/app/shared/testing/auth-service-stub.ts +++ b/src/app/shared/testing/auth-service-stub.ts @@ -4,6 +4,7 @@ import { AuthTokenInfo } from '../../core/auth/models/auth-token-info.model'; import { EPersonMock } from './eperson-mock'; import { EPerson } from '../../core/eperson/models/eperson.model'; import { RemoteData } from '../../core/data/remote-data'; +import { createSuccessfulRemoteDataObject$ } from './utils'; export class AuthServiceStub { @@ -20,7 +21,7 @@ export class AuthServiceStub { authStatus.okay = true; authStatus.authenticated = true; authStatus.token = this.token; - authStatus.eperson = observableOf(new RemoteData<EPerson>(false, false, true, undefined, EPersonMock)); + authStatus.eperson = createSuccessfulRemoteDataObject$(EPersonMock); return observableOf(authStatus); } else { console.log('error'); diff --git a/src/app/shared/testing/utils.ts b/src/app/shared/testing/utils.ts index 770a5544397efc5d4158470f66a2d4a2f550e847..4a551582ee044a14fa80324503e7aa95fd7bc817 100644 --- a/src/app/shared/testing/utils.ts +++ b/src/app/shared/testing/utils.ts @@ -1,4 +1,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; +import { RemoteData } from '../../core/data/remote-data'; +import { Observable, of as observableOf } from 'rxjs'; +import { RemoteDataError } from '../../core/data/remote-data-error'; /** * Returns true if a Native Element has a specified css class. @@ -23,7 +26,7 @@ export const hasClass = (element: any, className: string): boolean => { */ export const createTestComponent = <T>(html: string, type: { new(...args: any[]): T }): ComponentFixture<T> => { TestBed.overrideComponent(type, { - set: {template: html} + set: { template: html } }); const fixture = TestBed.createComponent(type); @@ -50,3 +53,71 @@ export function spyOnOperator(obj: any, prop: string): any { return spyOn(obj, prop); } + +/** + * Method to create a remote data object that has succeeded + * @param object The object to wrap + */ +export function createSuccessfulRemoteDataObject<T>(object: T): RemoteData<T> { + return new RemoteData( + false, + false, + true, + undefined, + object + ); +} + +/** + * Method to create a remote data object that has succeeded, wrapped in an observable + * @param object The object to wrap + */ +export function createSuccessfulRemoteDataObject$<T>(object: T): Observable<RemoteData<T>> { + return observableOf(createSuccessfulRemoteDataObject(object)); +} + +/** + * Method to create a remote data object that has failed + * @param object The object to wrap + * @param error The RemoteDataError that caused the failure + */ +export function createFailedRemoteDataObject<T>(object?: T, error?: RemoteDataError): RemoteData<T> { + return new RemoteData( + false, + false, + false, + error, + object + ); +} + +/** + * Method to create a remote data object that has failed, wrapped in an observable + * @param object The object to wrap + * @param error The RemoteDataError that caused the failure + */ +export function createFailedRemoteDataObject$<T>(object?: T, error?: RemoteDataError): Observable<RemoteData<T>> { + return observableOf(createFailedRemoteDataObject(object, error)); +} + +/** + * Method to create a remote data object that is still pending + * @param object The object to wrap + */ +export function createPendingRemoteDataObject<T>(object?: T): RemoteData<T> { + return new RemoteData( + true, + true, + true, + null, + object + ); +} + +/** + * Method to create a remote data object that is still pending, wrapped in an observable + * @param object The object to wrap + */ +export function createPendingRemoteDataObject$<T>(object?: T): Observable<RemoteData<T>> { + return observableOf(createPendingRemoteDataObject(object)); +} diff --git a/src/app/submission/edit/submission-edit.component.spec.ts b/src/app/submission/edit/submission-edit.component.spec.ts index 5c9a247aa248d2a42d1d04b6980c63705b375b7d..115016d2feb89f8d6505213a8d830fc01de55c48 100644 --- a/src/app/submission/edit/submission-edit.component.spec.ts +++ b/src/app/submission/edit/submission-edit.component.spec.ts @@ -16,7 +16,7 @@ import { getMockTranslateService } from '../../shared/mocks/mock-translate.servi import { RouterStub } from '../../shared/testing/router-stub'; import { ActivatedRouteStub } from '../../shared/testing/active-router-stub'; import { mockSubmissionObject } from '../../shared/mocks/mock-submission'; -import { RemoteData } from '../../core/data/remote-data'; +import { createSuccessfulRemoteDataObject$ } from '../../shared/testing/utils'; describe('SubmissionEditComponent Component', () => { @@ -66,14 +66,9 @@ describe('SubmissionEditComponent Component', () => { it('should init properly when a valid SubmissionObject has been retrieved', fakeAsync(() => { route.testParams = { id: submissionId }; - submissionServiceStub.retrieveSubmission.and.returnValue(observableOf( - new RemoteData( - false, - false, - true, - null, - submissionObject) - )); + submissionServiceStub.retrieveSubmission.and.returnValue( + createSuccessfulRemoteDataObject$(submissionObject) + ); fixture.detectChanges(); @@ -88,14 +83,8 @@ describe('SubmissionEditComponent Component', () => { it('should redirect to mydspace when an empty SubmissionObject has been retrieved', fakeAsync(() => { route.testParams = { id: submissionId }; - submissionServiceStub.retrieveSubmission.and.returnValue(observableOf( - new RemoteData( - false, - false, - true, - null, - {}) - )); + submissionServiceStub.retrieveSubmission.and.returnValue(createSuccessfulRemoteDataObject$({}) + ); fixture.detectChanges(); diff --git a/src/app/submission/form/submission-upload-files/submission-upload-files.component.ts b/src/app/submission/form/submission-upload-files/submission-upload-files.component.ts index be3e6b5c8c1f6ce50ee456f22d3349624d7b7a75..dfa1c58f9bf6bcec0c03579e614b4262d4c5ad82 100644 --- a/src/app/submission/form/submission-upload-files/submission-upload-files.component.ts +++ b/src/app/submission/form/submission-upload-files/submission-upload-files.component.ts @@ -6,13 +6,13 @@ import { first } from 'rxjs/operators'; import { SectionsService } from '../../sections/sections.service'; import { hasValue, isEmpty, isNotEmpty } from '../../../shared/empty.util'; -import { Workspaceitem } from '../../../core/submission/models/workspaceitem.model'; import { normalizeSectionData } from '../../../core/submission/submission-response-parsing.service'; import { SubmissionService } from '../../submission.service'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { UploaderOptions } from '../../../shared/uploader/uploader-options.model'; import parseSectionErrors from '../../utils/parseSectionErrors'; import { SubmissionJsonPatchOperationsService } from '../../../core/submission/submission-json-patch-operations.service'; +import { WorkspaceItem } from '../../../core/submission/models/workspaceitem.model'; /** * This component represents the drop zone that provides to add files to the submission. @@ -119,7 +119,7 @@ export class SubmissionUploadFilesComponent implements OnChanges { * @param workspaceitem * The submission object retrieved from REST */ - public onCompleteItem(workspaceitem: Workspaceitem) { + public onCompleteItem(workspaceitem: WorkspaceItem) { // Checks if upload section is enabled so do upload this.subs.push( this.uploadEnabled diff --git a/src/app/submission/objects/submission-objects.effects.ts b/src/app/submission/objects/submission-objects.effects.ts index f5c88873202020a9531308b5076ed0b94f98ed39..ba82fe1e650c1a5aa757218e3c22b8f778123aa8 100644 --- a/src/app/submission/objects/submission-objects.effects.ts +++ b/src/app/submission/objects/submission-objects.effects.ts @@ -30,9 +30,9 @@ import { } from './submission-objects.actions'; import { SectionsService } from '../sections/sections.service'; import { isEmpty, isNotEmpty, isNotUndefined } from '../../shared/empty.util'; -import { Workspaceitem } from '../../core/submission/models/workspaceitem.model'; +import { WorkspaceItem } from '../../core/submission/models/workspaceitem.model'; import { SubmissionService } from '../submission.service'; -import { Workflowitem } from '../../core/submission/models/workflowitem.model'; +import { WorkflowItem } from '../../core/submission/models/workflowitem.model'; import { NotificationsService } from '../../shared/notifications/notifications.service'; import { SubmissionObject } from '../../core/submission/models/submission-object.model'; import { TranslateService } from '@ngx-translate/core'; @@ -265,7 +265,7 @@ export class SubmissionObjectEffects { let canDeposit = true; if (isNotEmpty(response)) { - response.forEach((item: Workspaceitem | Workflowitem) => { + response.forEach((item: WorkspaceItem | WorkflowItem) => { const {errors} = item; if (errors && !isEmpty(errors)) { @@ -303,7 +303,7 @@ export class SubmissionObjectEffects { this.notificationsService.success(null, this.translate.get('submission.sections.general.save_success_notice')); } - response.forEach((item: Workspaceitem | Workflowitem) => { + response.forEach((item: WorkspaceItem | WorkflowItem) => { let errorsList = Object.create({}); const {errors} = item; diff --git a/src/app/submission/sections/form/section-form.component.spec.ts b/src/app/submission/sections/form/section-form.component.spec.ts index 477d42a0a1430772decdf9c6e0ac0c8e1dfeffcc..eb56a921131e1352848aedf2053e63015648a30e 100644 --- a/src/app/submission/sections/form/section-form.component.spec.ts +++ b/src/app/submission/sections/form/section-form.component.spec.ts @@ -34,7 +34,6 @@ import { CommonModule } from '@angular/common'; import { FormsModule, ReactiveFormsModule } from '@angular/forms'; import { FormComponent } from '../../../shared/form/form.component'; import { FormFieldModel } from '../../../shared/form/builder/models/form-field.model'; -import { FormRowModel } from '../../../core/config/models/config-submission-forms.model'; import { ConfigData } from '../../../core/config/config-data'; import { PageInfo } from '../../../core/shared/page-info.model'; import { FormFieldMetadataValueObject } from '../../../shared/form/builder/models/form-field-metadata-value.model'; @@ -43,6 +42,7 @@ import { DsDynamicInputModel } from '../../../shared/form/builder/ds-dynamic-for import { SubmissionSectionError } from '../../objects/submission-objects.reducer'; import { DynamicFormControlEvent, DynamicFormControlEventType } from '@ng-dynamic-forms/core'; import { JsonPatchOperationPathCombiner } from '../../../core/json-patch/builder/json-patch-operation-path-combiner'; +import { FormRowModel } from '../../../core/config/models/config-submission-form.model'; function getMockSubmissionFormsConfigService(): SubmissionFormsConfigService { return jasmine.createSpyObj('FormOperationsService', { diff --git a/src/app/submission/sections/license/section-license.component.spec.ts b/src/app/submission/sections/license/section-license.component.spec.ts index 6d8f82c0f8cae7b0043fe6d484941ec18cc95ce7..a9a72f0a51c5f6310681c083433dd9395af36270 100644 --- a/src/app/submission/sections/license/section-license.component.spec.ts +++ b/src/app/submission/sections/license/section-license.component.spec.ts @@ -6,9 +6,13 @@ import { async, ComponentFixture, inject, TestBed } from '@angular/core/testing' import { of as observableOf } from 'rxjs'; import { TranslateModule } from '@ngx-translate/core'; -import { DynamicCheckboxModel, DynamicFormControlEvent, DynamicFormControlEventType } from '@ng-dynamic-forms/core'; +import { + DynamicCheckboxModel, + DynamicFormControlEvent, + DynamicFormControlEventType +} from '@ng-dynamic-forms/core'; -import { createTestComponent } from '../../../shared/testing/utils'; +import { createSuccessfulRemoteDataObject$, createTestComponent } from '../../../shared/testing/utils'; import { NotificationsService } from '../../../shared/notifications/notifications.service'; import { NotificationsServiceStub } from '../../../shared/testing/notifications-service-stub'; import { SubmissionService } from '../../submission.service'; @@ -109,8 +113,7 @@ describe('SubmissionSectionLicenseComponent test suite', () => { language: 'en_US', value: 'Community 1-Collection 1' }], - license: observableOf(new RemoteData(false, false, true, - undefined, Object.assign(new License(), { text: licenseText }))) + license: createSuccessfulRemoteDataObject$(Object.assign(new License(), { text: licenseText })) }); beforeEach(async(() => { @@ -193,8 +196,7 @@ describe('SubmissionSectionLicenseComponent test suite', () => { }); it('should init section properly', () => { - collectionDataService.findById.and.returnValue(observableOf(new RemoteData(false, false, true, - undefined, mockCollection))); + collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection)); sectionsServiceStub.getSectionErrors.and.returnValue(observableOf([])); sectionsServiceStub.isSectionReadOnly.and.returnValue(observableOf(false)); spyOn(compAsAny, 'getSectionStatus'); @@ -219,8 +221,7 @@ describe('SubmissionSectionLicenseComponent test suite', () => { granted: true } as any; - collectionDataService.findById.and.returnValue(observableOf(new RemoteData(false, false, true, - undefined, mockCollection))); + collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection)); sectionsServiceStub.getSectionErrors.and.returnValue(observableOf([])); sectionsServiceStub.isSectionReadOnly.and.returnValue(observableOf(false)); spyOn(compAsAny, 'getSectionStatus'); @@ -239,8 +240,7 @@ describe('SubmissionSectionLicenseComponent test suite', () => { }); it('should set section errors properly', () => { - collectionDataService.findById.and.returnValue(observableOf(new RemoteData(false, false, true, - undefined, mockCollection))); + collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection)); sectionsServiceStub.getSectionErrors.and.returnValue(observableOf(mockLicenseParsedErrors.license)); sectionsServiceStub.isSectionReadOnly.and.returnValue(observableOf(false)); @@ -259,8 +259,7 @@ describe('SubmissionSectionLicenseComponent test suite', () => { granted: true } as any; - collectionDataService.findById.and.returnValue(observableOf(new RemoteData(false, false, true, - undefined, mockCollection))); + collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection)); sectionsServiceStub.getSectionErrors.and.returnValue(observableOf(mockLicenseParsedErrors.license)); sectionsServiceStub.isSectionReadOnly.and.returnValue(observableOf(false)); @@ -272,8 +271,7 @@ describe('SubmissionSectionLicenseComponent test suite', () => { it('should have status true when checkbox is selected', () => { - collectionDataService.findById.and.returnValue(observableOf(new RemoteData(false, false, true, - undefined, mockCollection))); + collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection)); sectionsServiceStub.getSectionErrors.and.returnValue(observableOf([])); sectionsServiceStub.isSectionReadOnly.and.returnValue(observableOf(false)); @@ -289,8 +287,7 @@ describe('SubmissionSectionLicenseComponent test suite', () => { it('should have status false when checkbox is not selected', () => { - collectionDataService.findById.and.returnValue(observableOf(new RemoteData(false, false, true, - undefined, mockCollection))); + collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection)); sectionsServiceStub.getSectionErrors.and.returnValue(observableOf([])); sectionsServiceStub.isSectionReadOnly.and.returnValue(observableOf(false)); diff --git a/src/app/submission/sections/upload/section-upload.component.spec.ts b/src/app/submission/sections/upload/section-upload.component.spec.ts index f84ece496929b52d0fae77f0afb451b62ed85af4..fd9f88d9392ffa62e4328264f5457a317caa537b 100644 --- a/src/app/submission/sections/upload/section-upload.component.spec.ts +++ b/src/app/submission/sections/upload/section-upload.component.spec.ts @@ -4,7 +4,7 @@ import { TranslateModule } from '@ngx-translate/core'; import { of as observableOf } from 'rxjs'; -import { createTestComponent } from '../../../shared/testing/utils'; +import { createSuccessfulRemoteDataObject$, createTestComponent } from '../../../shared/testing/utils'; import { SubmissionService } from '../../submission.service'; import { SubmissionServiceStub } from '../../../shared/testing/submission-service-stub'; import { SectionsService } from '../sections.service'; @@ -189,24 +189,17 @@ describe('SubmissionSectionUploadComponent test suite', () => { submissionServiceStub.getSubmissionObject.and.returnValue(observableOf(submissionState)); - collectionDataService.findById.and.returnValue(observableOf( - new RemoteData(false, false, true, - undefined, mockCollection))); + collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection)); - resourcePolicyService.findByHref.and.returnValue(observableOf( - new RemoteData(false, false, true, - undefined, mockDefaultAccessCondition) - )); + resourcePolicyService.findByHref.and.returnValue(createSuccessfulRemoteDataObject$(mockDefaultAccessCondition)); uploadsConfigService.getConfigByHref.and.returnValue(observableOf( new ConfigData(new PageInfo(), mockUploadConfigResponse as any) )); groupService.findById.and.returnValues( - observableOf(new RemoteData(false, false, true, - undefined, Object.assign(new Group(), mockGroup))), - observableOf(new RemoteData(false, false, true, - undefined, Object.assign(new Group(), mockGroup))) + createSuccessfulRemoteDataObject$(Object.assign(new Group(), mockGroup)), + createSuccessfulRemoteDataObject$(Object.assign(new Group(), mockGroup)) ); bitstreamService.getUploadedFileList.and.returnValue(observableOf([])); @@ -235,24 +228,17 @@ describe('SubmissionSectionUploadComponent test suite', () => { submissionServiceStub.getSubmissionObject.and.returnValue(observableOf(submissionState)); - collectionDataService.findById.and.returnValue(observableOf( - new RemoteData(false, false, true, - undefined, mockCollection))); + collectionDataService.findById.and.returnValue(createSuccessfulRemoteDataObject$(mockCollection)); - resourcePolicyService.findByHref.and.returnValue(observableOf( - new RemoteData(false, false, true, - undefined, mockDefaultAccessCondition) - )); + resourcePolicyService.findByHref.and.returnValue(createSuccessfulRemoteDataObject$(mockDefaultAccessCondition)); uploadsConfigService.getConfigByHref.and.returnValue(observableOf( new ConfigData(new PageInfo(), mockUploadConfigResponse as any) )); groupService.findById.and.returnValues( - observableOf(new RemoteData(false, false, true, - undefined, Object.assign(new Group(), mockGroup))), - observableOf(new RemoteData(false, false, true, - undefined, Object.assign(new Group(), mockGroup))) + createSuccessfulRemoteDataObject$(Object.assign(new Group(), mockGroup)), + createSuccessfulRemoteDataObject$(Object.assign(new Group(), mockGroup)) ); bitstreamService.getUploadedFileList.and.returnValue(observableOf(mockUploadFiles)); diff --git a/src/app/submission/submission.service.spec.ts b/src/app/submission/submission.service.spec.ts index d764f095381da3efe3f8525a291e4d6303e92efd..79061987020149b22339d31dd0dbc90dbb386a67 100644 --- a/src/app/submission/submission.service.spec.ts +++ b/src/app/submission/submission.service.spec.ts @@ -18,7 +18,10 @@ import { MockActivatedRoute } from '../shared/mocks/mock-active-router'; import { GLOBAL_CONFIG } from '../../config'; import { HttpOptions } from '../core/dspace-rest-v2/dspace-rest-v2.service'; import { SubmissionScopeType } from '../core/submission/submission-scope-type'; -import { mockSubmissionDefinition, mockSubmissionRestResponse } from '../shared/mocks/mock-submission'; +import { + mockSubmissionDefinition, + mockSubmissionRestResponse +} from '../shared/mocks/mock-submission'; import { NotificationsService } from '../shared/notifications/notifications.service'; import { MockTranslateLoader } from '../shared/mocks/mock-translate-loader'; import { MOCK_SUBMISSION_CONFIG } from '../shared/testing/mock-submission-config'; @@ -37,6 +40,11 @@ import { import { RemoteData } from '../core/data/remote-data'; import { RemoteDataError } from '../core/data/remote-data-error'; import { throwError as observableThrowError } from 'rxjs/internal/observable/throwError'; +import { + createFailedRemoteDataObject, + createSuccessfulRemoteDataObject, + createSuccessfulRemoteDataObject$ +} from '../shared/testing/utils'; describe('SubmissionService test suite', () => { const config = MOCK_SUBMISSION_CONFIG; @@ -344,7 +352,7 @@ describe('SubmissionService test suite', () => { beforeEach(async(() => { TestBed.configureTestingModule({ imports: [ - StoreModule.forRoot({submissionReducers} as any), + StoreModule.forRoot({ submissionReducers } as any), TranslateModule.forRoot({ loader: { provide: TranslateLoader, @@ -353,10 +361,10 @@ describe('SubmissionService test suite', () => { }) ], providers: [ - {provide: GLOBAL_CONFIG, useValue: config}, - {provide: Router, useValue: router}, - {provide: SubmissionRestService, useValue: restService}, - {provide: ActivatedRoute, useValue: new MockActivatedRoute()}, + { provide: GLOBAL_CONFIG, useValue: config }, + { provide: Router, useValue: router }, + { provide: SubmissionRestService, useValue: restService }, + { provide: ActivatedRoute, useValue: new MockActivatedRoute() }, NotificationsService, RouteService, SubmissionService, @@ -482,7 +490,7 @@ describe('SubmissionService test suite', () => { })); const result = service.getSubmissionObject('826'); - const expected = cold('b', {b: subState.objects[826]}); + const expected = cold('b', { b: subState.objects[826] }); expect(result).toBeObservable(expected); }); @@ -495,7 +503,7 @@ describe('SubmissionService test suite', () => { })); const result = service.getActiveSectionId('826'); - const expected = cold('b', {b: 'keyinformation'}); + const expected = cold('b', { b: 'keyinformation' }); expect(result).toBeObservable(expected); @@ -747,7 +755,7 @@ describe('SubmissionService test suite', () => { describe('isSubmissionLoading', () => { it('should return true/false when section is loading/not loading', () => { - const spy = spyOn(service, 'getSubmissionObject').and.returnValue(observableOf({isLoading: true})); + const spy = spyOn(service, 'getSubmissionObject').and.returnValue(observableOf({ isLoading: true })); let expected = cold('(b|)', { b: true @@ -755,7 +763,7 @@ describe('SubmissionService test suite', () => { expect(service.isSubmissionLoading(submissionId)).toBeObservable(expected); - spy.and.returnValue(observableOf({isLoading: false})); + spy.and.returnValue(observableOf({ isLoading: false })); expected = cold('(b|)', { b: false @@ -841,11 +849,7 @@ describe('SubmissionService test suite', () => { const result = service.retrieveSubmission('826'); const expected = cold('(b|)', { - b: new RemoteData( - false, - false, - true, - null, + b: createSuccessfulRemoteDataObject( mockSubmissionRestResponse[0]) }); @@ -862,12 +866,8 @@ describe('SubmissionService test suite', () => { ); service.retrieveSubmission('826').subscribe((r) => { - expect(r).toEqual(new RemoteData( - false, - false, - false, - new RemoteDataError(500, 'Internal Server Error', 'Error message'), - null + expect(r).toEqual(createFailedRemoteDataObject(null, + new RemoteDataError(500, 'Internal Server Error', 'Error message') )) }); }); diff --git a/src/app/submission/submission.service.ts b/src/app/submission/submission.service.ts index f35536d56038fdb1c0795d9b6a08f8a3daffa57e..8935ed2259ada1cc3fbf728a921c583fb81d32f9 100644 --- a/src/app/submission/submission.service.ts +++ b/src/app/submission/submission.service.ts @@ -3,7 +3,15 @@ import { HttpHeaders } from '@angular/common/http'; import { Router } from '@angular/router'; import { Observable, of as observableOf, Subscription, timer as observableTimer } from 'rxjs'; -import { catchError, distinctUntilChanged, filter, find, first, map, startWith } from 'rxjs/operators'; +import { + catchError, + distinctUntilChanged, + filter, + find, + first, + map, + startWith +} from 'rxjs/operators'; import { Store } from '@ngrx/store'; import { TranslateService } from '@ngx-translate/core'; @@ -43,6 +51,11 @@ import { WorkspaceitemSectionsObject } from '../core/submission/models/workspace import { RemoteData } from '../core/data/remote-data'; import { ErrorResponse } from '../core/cache/response.models'; import { RemoteDataError } from '../core/data/remote-data-error'; +import { + createFailedRemoteDataObject$, + createSuccessfulRemoteDataObject, + createSuccessfulRemoteDataObject$ +} from '../shared/testing/utils'; /** * A service that provides methods used in submission process. @@ -499,20 +512,12 @@ export class SubmissionService { retrieveSubmission(submissionId): Observable<RemoteData<SubmissionObject>> { return this.restService.getDataById(this.getSubmissionObjectLinkName(), submissionId).pipe( find((submissionObjects: SubmissionObject[]) => isNotUndefined(submissionObjects)), - map((submissionObjects: SubmissionObject[]) => new RemoteData( - false, - false, - true, - null, + map((submissionObjects: SubmissionObject[]) => createSuccessfulRemoteDataObject( submissionObjects[0])), catchError((errorResponse: ErrorResponse) => { - return observableOf(new RemoteData( - false, - false, - false, - new RemoteDataError(errorResponse.statusCode, errorResponse.statusText, errorResponse.errorMessage), - null - )) + return createFailedRemoteDataObject$(null, + new RemoteDataError(errorResponse.statusCode, errorResponse.statusText, errorResponse.errorMessage) + ) }) ); } diff --git a/src/modules/app/browser-app.module.ts b/src/modules/app/browser-app.module.ts index b20894880b174baf9a00b0ff85d6bd09ea66e02f..ee826c680db1b82ccdce2f12bd4445b6db37eda0 100644 --- a/src/modules/app/browser-app.module.ts +++ b/src/modules/app/browser-app.module.ts @@ -20,7 +20,6 @@ import { CookieService } from '../../app/shared/services/cookie.service'; import { AuthService } from '../../app/core/auth/auth.service'; import { Angulartics2Module } from 'angulartics2'; import { Angulartics2GoogleAnalytics } from 'angulartics2/ga'; -import { ServerSubmissionService } from '../../app/submission/server-submission.service'; import { SubmissionService } from '../../app/submission/submission.service'; export const REQ_KEY = makeStateKey<string>('req'); diff --git a/yarn.lock b/yarn.lock index eb0733e6955b47178d57a28ae5a51f51b422f28f..0829523983dd85f6fb298e71b08377f2f3b6c59e 100644 --- a/yarn.lock +++ b/yarn.lock @@ -346,6 +346,15 @@ dependencies: "@types/node" "*" +"@types/glob@^7.1.1": + version "7.1.1" + resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.1.1.tgz#aa59a1c6e3fbc421e07ccd31a944c30eba521575" + integrity sha512-1Bh06cbWJUHMC97acuD6UMG29nMt0Aqz1vF3guLfG+kHHJhy3AyohZFFxYk2f7Q1SQIrNwvncxAE0N/9s70F2w== + dependencies: + "@types/events" "*" + "@types/minimatch" "*" + "@types/node" "*" + "@types/hammerjs@2.0.35": version "2.0.35" resolved "https://registry.yarnpkg.com/@types/hammerjs/-/hammerjs-2.0.35.tgz#7b7c950c7d54593e23bffc8d2b4feba9866a7277" @@ -396,6 +405,11 @@ resolved "https://registry.yarnpkg.com/@types/mime/-/mime-2.0.0.tgz#5a7306e367c539b9f6543499de8dd519fac37a8b" integrity sha512-A2TAGbTFdBw9azHbpVd+/FkdW2T6msN1uct1O9bH3vTerEHKZhTXJUQXy+hNq1B0RagfU8U+KBdqiZpxjhOUQA== +"@types/minimatch@*": + version "3.0.3" + resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.3.tgz#3dca0e3f33b200fc7d1139c0cd96c1268cadfd9d" + integrity sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA== + "@types/minimatch@2.0.29": version "2.0.29" resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-2.0.29.tgz#5002e14f75e2d71e564281df0431c8c1b4a2a36a" @@ -411,11 +425,6 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-10.9.4.tgz#0f4cb2dc7c1de6096055357f70179043c33e9897" integrity sha512-fCHV45gS+m3hH17zgkgADUSi2RR1Vht6wOZ0jyHP8rjiQra9f+mIcgwPQHllmDocYOstIEbKlxbFDYlgrTPYqw== -"@types/node@^6.0.46": - version "6.0.116" - resolved "https://registry.yarnpkg.com/@types/node/-/node-6.0.116.tgz#2f9cd62b4ecc4927e3942e2655c182eecf5b45f1" - integrity sha512-vToa8YEeulfyYg1gSOeHjvvIRqrokng62VMSj2hoZrwZNcYrp2h3AWo6KeBVuymIklQUaY5zgVJvVsC4KiiLkQ== - "@types/q@^0.0.32": version "0.0.32" resolved "https://registry.yarnpkg.com/@types/q/-/q-0.0.32.tgz#bd284e57c84f1325da702babfc82a5328190c0c5" @@ -725,7 +734,7 @@ ajv-keywords@^3.1.0: resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.2.0.tgz#e86b819c602cf8821ad637413698f1dec021847a" integrity sha1-6GuBnGAs+IIa1jdBNpjx3sAhhHo= -ajv@^5.0.0, ajv@^5.1.0, ajv@^5.3.0: +ajv@^5.0.0, ajv@^5.3.0: version "5.5.2" resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d3f9422b341ad42205dc965" integrity sha1-c7Xuyj+rZT49P5Qis0GtQiBdyWU= @@ -755,15 +764,6 @@ ajv@~6.4.0: json-schema-traverse "^0.3.0" uri-js "^3.0.2" -align-text@^0.1.1, align-text@^0.1.3: - version "0.1.4" - resolved "https://registry.yarnpkg.com/align-text/-/align-text-0.1.4.tgz#0cd90a561093f35d0a99256c22b7069433fad117" - integrity sha1-DNkKVhCT810KmSVsIrcGlDP60Rc= - dependencies: - kind-of "^3.0.2" - longest "^1.0.1" - repeat-string "^1.5.2" - alphanum-sort@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" @@ -812,6 +812,13 @@ ansi-align@^2.0.0: dependencies: string-width "^2.0.0" +ansi-colors@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-1.1.0.tgz#6374b4dd5d4718ff3ce27a671a3b1cad077132a9" + integrity sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA== + dependencies: + ansi-wrap "^0.1.0" + ansi-colors@^3.0.0: version "3.0.5" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.0.5.tgz#cb9dc64993b64fd6945485f797fc3853137d9a7b" @@ -863,6 +870,11 @@ ansi-regex@^3.0.0: resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-3.0.0.tgz#ed0317c322064f79466c02966bddb605ab37d998" integrity sha1-7QMXwyIGT3lGbAKWa922Bas32Zg= +ansi-regex@^4.1.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-4.1.0.tgz#8b9f8f08cf1acb843756a839ca8c7e3168c51997" + integrity sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg== + ansi-styles@^2.2.1: version "2.2.1" resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-2.2.1.tgz#b432dd3358b634cf75e1e4664368240533c1ddbe" @@ -875,7 +887,7 @@ ansi-styles@^3.2.0, ansi-styles@^3.2.1: dependencies: color-convert "^1.9.0" -ansi-wrap@0.1.0: +ansi-wrap@0.1.0, ansi-wrap@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/ansi-wrap/-/ansi-wrap-0.1.0.tgz#a82250ddb0015e9a27ca82e82ea603bbfa45efaf" integrity sha1-qCJQ3bABXponyoLoLqYDu/pF768= @@ -911,31 +923,34 @@ aproba@^1.0.3, aproba@^1.1.1: resolved "https://registry.yarnpkg.com/aproba/-/aproba-1.2.0.tgz#6802e6264efd18c790a1b0d517f0f2627bf2c94a" integrity sha512-Y9J6ZjXtoYh8RnXVCMOU/ttDmk1aBjunq9vO0ta5x85WDQiQfUF9sIPBITdbiiIVcBo03Hi3jMxigBtsddlXRw== -archiver-utils@^1.3.0: - version "1.3.0" - resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-1.3.0.tgz#e50b4c09c70bf3d680e32ff1b7994e9f9d895174" - integrity sha1-5QtMCccL89aA4y/xt5lOn52JUXQ= +archiver-utils@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/archiver-utils/-/archiver-utils-2.1.0.tgz#e8a460e94b693c3e3da182a098ca6285ba9249e2" + integrity sha512-bEL/yUb/fNNiNTuUz979Z0Yg5L+LzLxGJz8x79lYmR54fmTIb6ob/hNQgkQnIUDWIFjZVQwl9Xs356I6BAMHfw== dependencies: - glob "^7.0.0" - graceful-fs "^4.1.0" + glob "^7.1.4" + graceful-fs "^4.2.0" lazystream "^1.0.0" - lodash "^4.8.0" - normalize-path "^2.0.0" + lodash.defaults "^4.2.0" + lodash.difference "^4.5.0" + lodash.flatten "^4.4.0" + lodash.isplainobject "^4.0.6" + lodash.union "^4.6.0" + normalize-path "^3.0.0" readable-stream "^2.0.0" -archiver@2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/archiver/-/archiver-2.1.1.tgz#ff662b4a78201494a3ee544d3a33fe7496509ebc" - integrity sha1-/2YrSnggFJSj7lRNOjP+dJZQnrw= +archiver@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/archiver/-/archiver-3.1.1.tgz#9db7819d4daf60aec10fe86b16cb9258ced66ea0" + integrity sha512-5Hxxcig7gw5Jod/8Gq0OneVgLYET+oNHcxgWItq4TbhOzRLKNAFUb9edAftiMKXvXfCB0vbGrJdZDNq0dWMsxg== dependencies: - archiver-utils "^1.3.0" - async "^2.0.0" + archiver-utils "^2.1.0" + async "^2.6.3" buffer-crc32 "^0.2.1" - glob "^7.0.0" - lodash "^4.8.0" - readable-stream "^2.0.0" - tar-stream "^1.5.0" - zip-stream "^1.2.0" + glob "^7.1.4" + readable-stream "^3.4.0" + tar-stream "^2.1.0" + zip-stream "^2.1.2" are-we-there-yet@~1.1.2: version "1.1.5" @@ -1097,6 +1112,11 @@ async-each@^1.0.0: resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.1.tgz#19d386a1d9edc6e7c1c85d388aedbcc56d33602d" integrity sha1-GdOGodntxufByF04iu28xW0zYC0= +async-each@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/async-each/-/async-each-1.0.3.tgz#b727dbf87d7651602f06f4d4ac387f47d91b0cbf" + integrity sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ== + async-foreach@^0.1.3: version "0.1.3" resolved "https://registry.yarnpkg.com/async-foreach/-/async-foreach-0.1.3.tgz#36121f845c0578172de419a97dbeb1d16ec34542" @@ -1107,18 +1127,11 @@ async-limiter@~1.0.0: resolved "https://registry.yarnpkg.com/async-limiter/-/async-limiter-1.0.0.tgz#78faed8c3d074ab81f22b4e985d79e8738f720f8" integrity sha512-jp/uFnooOiO+L211eZOoSyzpOITMXx1rBITauYykG3BRYPu8h0UcxsPNB04RR5vo4Tyz3+ay17tR6JVf9qzYWg== -async@1.x, async@^1.4.0, async@^1.5.2: +async@1.x, async@^1.5.2: version "1.5.2" resolved "https://registry.yarnpkg.com/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" integrity sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo= -async@2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/async/-/async-2.0.1.tgz#b709cc0280a9c36f09f4536be823c838a9049e25" - integrity sha1-twnMAoCpw28J9FNr6CPIOKkEniU= - dependencies: - lodash "^4.8.0" - async@^2.0.0, async@^2.5.0: version "2.6.1" resolved "https://registry.yarnpkg.com/async/-/async-2.6.1.tgz#b245a23ca71930044ec53fa46aa00a3e87c6a610" @@ -1132,6 +1145,13 @@ async@^2.1.4: dependencies: lodash "^4.17.11" +async@^2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/async/-/async-2.6.3.tgz#d72625e2344a3656e3a3ad4fa749fa83299d82ff" + integrity sha512-zflvls11DCy+dQWzTW2dzuilv8Z5X/pjfmZOWba6TNIVDm+2UDaJmXSOXlasHKfNBs8oo3M0aT50fDEWfKZjXg== + dependencies: + lodash "^4.17.14" + asynckit@^0.4.0: version "0.4.0" resolved "https://registry.yarnpkg.com/asynckit/-/asynckit-0.4.0.tgz#c79ed97f7f34cb8f2ba1bc9790bcc366474b4b79" @@ -1171,7 +1191,7 @@ aws-sign2@~0.7.0: resolved "https://registry.yarnpkg.com/aws-sign2/-/aws-sign2-0.7.0.tgz#b46e890934a9591f2d2f6f86d7e6a9f1b3fe76a8" integrity sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg= -aws4@^1.6.0, aws4@^1.8.0: +aws4@^1.8.0: version "1.8.0" resolved "https://registry.yarnpkg.com/aws4/-/aws4-1.8.0.tgz#f0e003d9ca9e7f59c7a508945d7b2ef9a04a542f" integrity sha512-ReZxvNHIOv88FlT7rxcXIIC0fPt4KZqZbOlivyWtXLt8ESx84zd3kMC6iK5jVeS2qt+g7ftS7ye4fi06X5rtRQ== @@ -1367,13 +1387,12 @@ binary-extensions@^1.0.0: resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.11.0.tgz#46aa1751fb6a2f93ee5e689bb1087d4b14c6c205" integrity sha1-RqoXUftqL5PuXmibsQh9SxTGwgU= -bl@^1.0.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/bl/-/bl-1.2.2.tgz#a160911717103c07410cef63ef51b397c025af9c" - integrity sha512-e8tQYnZodmebYDWGH7KMRvtzKXaJHx3BbilrgZCfvyLUYdKpK1t5PSPmpkny/SgiTSCnjfLW7v5rlONXVFkQEA== +bl@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/bl/-/bl-3.0.0.tgz#3611ec00579fd18561754360b21e9f784500ff88" + integrity sha512-EUAyP5UHU5hxF8BPT0LKW8gjYLhq1DQIcneOX/pL/m2Alo+OYDQAJlHq+yseMP50Os2nHXOSic6Ss3vSQeyf4A== dependencies: - readable-stream "^2.3.5" - safe-buffer "^5.1.1" + readable-stream "^3.0.1" blob@0.0.4: version "0.0.4" @@ -1469,20 +1488,6 @@ boolbase@^1.0.0, boolbase@~1.0.0: resolved "https://registry.yarnpkg.com/boolbase/-/boolbase-1.0.0.tgz#68dff5fbe60c51eb37725ea9e3ed310dcc1e776e" integrity sha1-aN/1++YMUes3cl6p4+0xDcwed24= -boom@4.x.x: - version "4.3.1" - resolved "https://registry.yarnpkg.com/boom/-/boom-4.3.1.tgz#4f8a3005cb4a7e3889f749030fd25b96e01d2e31" - integrity sha1-T4owBctKfjiJ90kDD9JbluAdLjE= - dependencies: - hoek "4.x.x" - -boom@5.x.x: - version "5.2.0" - resolved "https://registry.yarnpkg.com/boom/-/boom-5.2.0.tgz#5dd9da6ee3a5f302077436290cb717d3f4a54e02" - integrity sha512-Z5BTk6ZRe4tXXQlkqftmsAUANpXmuwlsF5Oov8ThoMbQRzdGTA1ngYRW160GexgOgjsFOKJz0LYhoNi+2AMBUw== - dependencies: - hoek "4.x.x" - bootstrap@4.3.1: version "4.3.1" resolved "https://registry.yarnpkg.com/bootstrap/-/bootstrap-4.3.1.tgz#280ca8f610504d99d7b6b4bfc4b68cec601704ac" @@ -1525,7 +1530,7 @@ braces@^1.8.2: preserve "^0.2.0" repeat-element "^1.1.2" -braces@^2.3.0, braces@^2.3.1: +braces@^2.3.0, braces@^2.3.1, braces@^2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729" integrity sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w== @@ -1546,6 +1551,11 @@ brorand@^1.0.1: resolved "https://registry.yarnpkg.com/brorand/-/brorand-1.1.0.tgz#12c25efe40a45e3c323eb8675a0a0ce57b22371f" integrity sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8= +browser-stdout@1.3.1: + version "1.3.1" + resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" + integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== + browserify-aes@^1.0.0, browserify-aes@^1.0.4: version "1.2.0" resolved "https://registry.yarnpkg.com/browserify-aes/-/browserify-aes-1.2.0.tgz#326734642f403dabc3003209853bb70ad428ef48" @@ -1643,7 +1653,7 @@ buffer-alloc-unsafe@^1.1.0: resolved "https://registry.yarnpkg.com/buffer-alloc-unsafe/-/buffer-alloc-unsafe-1.1.0.tgz#bd7dc26ae2972d0eda253be061dba992349c19f0" integrity sha512-TEM2iMIEQdJ2yjPJoSIsldnleVaAk1oW3DBVUykyOLsEsFmEc9kn+SFFPz+gl54KQNxlDnAwCXosOS9Okx2xAg== -buffer-alloc@^1.1.0, buffer-alloc@^1.2.0: +buffer-alloc@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/buffer-alloc/-/buffer-alloc-1.2.0.tgz#890dd90d923a873e08e10e5fd51a57e5b7cce0ec" integrity sha512-CFsHQgjtW1UChdXgbyJGtnm+O/uLQeZdtbDo8mfUgYXCHSM1wgrVxXm6bSyrUuErEb+4sYVGCzASBRot7zyrow== @@ -1651,7 +1661,7 @@ buffer-alloc@^1.1.0, buffer-alloc@^1.2.0: buffer-alloc-unsafe "^1.1.0" buffer-fill "^1.0.0" -buffer-crc32@^0.2.1: +buffer-crc32@^0.2.1, buffer-crc32@^0.2.13: version "0.2.13" resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242" integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI= @@ -1807,7 +1817,7 @@ camelcase-keys@^2.0.0: camelcase "^2.0.0" map-obj "^1.0.0" -camelcase@^1.0.2, camelcase@^1.2.1: +camelcase@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-1.2.1.tgz#9bb5304d2e0b56698b2c758b08a3eaa9daa58a39" integrity sha1-m7UwTS4LVmmLLHWLCKPqqdqlijk= @@ -1827,6 +1837,11 @@ camelcase@^4.0.0, camelcase@^4.1.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-4.1.0.tgz#d545635be1e33c542649c69173e5de6acfae34dd" integrity sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0= +camelcase@^5.0.0: + version "5.3.1" + resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-5.3.1.tgz#e3c9b31569e106811df242f715725a1f4c494320" + integrity sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg== + caniuse-api@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/caniuse-api/-/caniuse-api-2.0.0.tgz#b1ddb5a5966b16f48dc4998444d4bbc6c7d9d834" @@ -1867,14 +1882,6 @@ caseless@~0.12.0: resolved "https://registry.yarnpkg.com/caseless/-/caseless-0.12.0.tgz#1b681c21ff84033c826543090689420d187151dc" integrity sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw= -center-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/center-align/-/center-align-0.1.3.tgz#aa0d32629b6ee972200411cbd4461c907bc2b7ad" - integrity sha1-qg0yYptu6XIgBBHL1EYckHvCt60= - dependencies: - align-text "^0.1.3" - lazy-cache "^1.0.3" - cerialize@0.1.18: version "0.1.18" resolved "https://registry.yarnpkg.com/cerialize/-/cerialize-0.1.18.tgz#d0f4f1b61cec7e4ed16a3eda0cac2bc99787414d" @@ -1958,6 +1965,25 @@ chokidar@^2.0.0, chokidar@^2.0.2, chokidar@^2.0.3, chokidar@^2.0.4: optionalDependencies: fsevents "^1.2.2" +chokidar@^2.1.6: + version "2.1.6" + resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.6.tgz#b6cad653a929e244ce8a834244164d241fa954c5" + integrity sha512-V2jUo67OKkc6ySiRpJrjlpJKl9kDuG+Xb8VgsGzb+aEouhgS1D0weyPU4lEzdAcsCAvrih2J2BqyXqHWvVLw5g== + dependencies: + anymatch "^2.0.0" + async-each "^1.0.1" + braces "^2.3.2" + glob-parent "^3.1.0" + inherits "^2.0.3" + is-binary-path "^1.0.0" + is-glob "^4.0.0" + normalize-path "^3.0.0" + path-is-absolute "^1.0.0" + readdirp "^2.2.1" + upath "^1.1.1" + optionalDependencies: + fsevents "^1.2.7" + chownr@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/chownr/-/chownr-1.0.1.tgz#e2a75042a9551908bebd25b8523d5f9769d79181" @@ -2027,15 +2053,6 @@ cli-width@^2.0.0: resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639" integrity sha1-/xnt6Kml5XkyQUewwR8PvLq+1jk= -cliui@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/cliui/-/cliui-2.1.0.tgz#4b475760ff80264c762c3a1719032e91c7fea0d1" - integrity sha1-S0dXYP+AJkx2LDoXGQMukcf+oNE= - dependencies: - center-align "^0.1.1" - right-align "^0.1.1" - wordwrap "0.0.2" - cliui@^3.2.0: version "3.2.0" resolved "https://registry.yarnpkg.com/cliui/-/cliui-3.2.0.tgz#120601537a916d29940f934da3b48d585a39213d" @@ -2054,6 +2071,15 @@ cliui@^4.0.0: strip-ansi "^4.0.0" wrap-ansi "^2.0.0" +cliui@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/cliui/-/cliui-5.0.0.tgz#deefcfdb2e800784aa34f46fa08e06851c7bbbc5" + integrity sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA== + dependencies: + string-width "^3.1.0" + strip-ansi "^5.2.0" + wrap-ansi "^5.1.0" + clone-deep@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/clone-deep/-/clone-deep-2.0.2.tgz#00db3a1e173656730d1188c3d6aced6d7ea97713" @@ -2200,19 +2226,24 @@ combine-lists@^1.0.0: dependencies: lodash "^4.5.0" -combined-stream@1.0.6, combined-stream@~1.0.5, combined-stream@~1.0.6: +combined-stream@1.0.6, combined-stream@~1.0.6: version "1.0.6" resolved "https://registry.yarnpkg.com/combined-stream/-/combined-stream-1.0.6.tgz#723e7df6e801ac5613113a7e445a9b69cb632818" integrity sha1-cj599ugBrFYTETp+RFqbactjKBg= dependencies: delayed-stream "~1.0.0" +commander@2.15.1: + version "2.15.1" + resolved "https://registry.yarnpkg.com/commander/-/commander-2.15.1.tgz#df46e867d0fc2aec66a34662b406a9ccafff5b0f" + integrity sha512-VlfT9F3V0v+jr4yxPc5gg9s62/fIVWsd2Bk2iD435um1NlGMYdVCq+MjcXnhYq2icNOizHr1kK+5TI6H0Hy0ag== + commander@2.17.x, commander@~2.17.1: version "2.17.1" resolved "https://registry.yarnpkg.com/commander/-/commander-2.17.1.tgz#bd77ab7de6de94205ceacc72f1716d29f20a77bf" integrity sha512-wPMUt6FnH2yzG95SA6mzjQOEKUU3aLaDEmzs1ti+1E9h+CsrZghRlqEM/EJ4KscsQVG8uNN4uVreUeT8+drlgg== -commander@^2.12.1, commander@^2.18.0: +commander@^2.12.1, commander@^2.18.0, commander@~2.20.0: version "2.20.0" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.0.tgz#d58bb2b5c1ee8f87b0d340027e9e94e222c5a422" integrity sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ== @@ -2242,23 +2273,30 @@ component-inherit@0.0.3: resolved "https://registry.yarnpkg.com/component-inherit/-/component-inherit-0.0.3.tgz#645fc4adf58b72b649d5cae65135619db26ff143" integrity sha1-ZF/ErfWLcrZJ1crmUTVhnbJv8UM= -compress-commons@^1.2.0: - version "1.2.2" - resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-1.2.2.tgz#524a9f10903f3a813389b0225d27c48bb751890f" - integrity sha1-UkqfEJA/OoEzibAiXSfEi7dRiQ8= +compress-commons@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/compress-commons/-/compress-commons-2.1.1.tgz#9410d9a534cf8435e3fbbb7c6ce48de2dc2f0610" + integrity sha512-eVw6n7CnEMFzc3duyFVrQEuY1BlHR3rYsSztyG32ibGMW722i3C6IizEGMFmfMU+A+fALvBIwxN3czffTcdA+Q== dependencies: - buffer-crc32 "^0.2.1" - crc32-stream "^2.0.0" - normalize-path "^2.0.0" - readable-stream "^2.0.0" + buffer-crc32 "^0.2.13" + crc32-stream "^3.0.1" + normalize-path "^3.0.0" + readable-stream "^2.3.6" -compressible@~2.0.11, compressible@~2.0.14: +compressible@~2.0.11: version "2.0.14" resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.14.tgz#326c5f507fbb055f54116782b969a81b67a29da7" integrity sha1-MmxfUH+7BV9UEWeCuWmoG2einac= dependencies: mime-db ">= 1.34.0 < 2" +compressible@~2.0.16: + version "2.0.17" + resolved "https://registry.yarnpkg.com/compressible/-/compressible-2.0.17.tgz#6e8c108a16ad58384a977f3a482ca20bff2f38c1" + integrity sha512-BGHeLCK1GV7j1bSmQQAi26X+GgWcTjLr/0tzSvMCl3LH1w1IJ4PFSPoV5316b30cneTziC+B1a+3OjoSUcQYmw== + dependencies: + mime-db ">= 1.40.0 < 2" + compression-webpack-plugin@^1.1.6: version "1.1.12" resolved "https://registry.yarnpkg.com/compression-webpack-plugin/-/compression-webpack-plugin-1.1.12.tgz#becd2aec620ace96bb3fe9a42a55cf48acc8b4d4" @@ -2283,16 +2321,16 @@ compression@1.7.1: safe-buffer "5.1.1" vary "~1.1.2" -compression@^1.5.2: - version "1.7.3" - resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.3.tgz#27e0e176aaf260f7f2c2813c3e440adb9f1993db" - integrity sha512-HSjyBG5N1Nnz7tF2+O7A9XUhyjru71/fwgNb7oIsEVHR0WShfs2tIS/EySLgiTe98aOK18YDlMXpzjCXY/n9mg== +compression@^1.7.4: + version "1.7.4" + resolved "https://registry.yarnpkg.com/compression/-/compression-1.7.4.tgz#95523eff170ca57c29a0ca41e6fe131f41e5bb8f" + integrity sha512-jaSIDzP9pZVS4ZfQ+TzvtiWhdpFhE2RDHz8QJkpX9SIpLq88VueF5jJw6t+6CUQcAoA6t+x89MLrWAqpfDE8iQ== dependencies: accepts "~1.3.5" bytes "3.0.0" - compressible "~2.0.14" + compressible "~2.0.16" debug "2.6.9" - on-headers "~1.0.1" + on-headers "~1.0.2" safe-buffer "5.1.2" vary "~1.1.2" @@ -2323,10 +2361,10 @@ configstore@^3.0.0: write-file-atomic "^2.0.0" xdg-basedir "^3.0.0" -connect-history-api-fallback@^1.3.0: - version "1.5.0" - resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.5.0.tgz#b06873934bc5e344fef611a196a6faae0aee015a" - integrity sha1-sGhzk0vF40T+9hGhlqb6rgruAVo= +connect-history-api-fallback@^1.6.0: + version "1.6.0" + resolved "https://registry.yarnpkg.com/connect-history-api-fallback/-/connect-history-api-fallback-1.6.0.tgz#8b32089359308d111115d81cad3fceab888f97bc" + integrity sha512-e54B99q/OUoH64zYYRf3HBP5z24G38h5D3qXu23JGRoigpX5Ss4r9ZnDk3g0Z8uQC2x2lPaJ+UlWBc1ZWBWdLg== connect@^3.6.0: version "3.6.6" @@ -2436,17 +2474,17 @@ copy-webpack-plugin@^4.4.1: p-limit "^1.0.0" serialize-javascript "^1.4.0" -copyfiles@^2.1.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.1.0.tgz#0e2a4188162d6b2f3c5adfe34e9c0bd564d23164" - integrity sha512-cAeDE0vL/koE9WSEGxqPpSyvU638Kgfu6wfrnj7kqp9FWa1CWsU54Coo6sdYZP4GstWa39tL/wIVJWfXcujgNA== +copyfiles@^2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/copyfiles/-/copyfiles-2.1.1.tgz#d430e122d7880f92c45d372208b0af03b0c39db6" + integrity sha512-y6DZHve80whydXzBal7r70TBgKMPKesVRR1Sn/raUu7Jh/i7iSLSyGvYaq0eMJ/3Y/CKghwzjY32q1WzEnpp3Q== dependencies: glob "^7.0.5" minimatch "^3.0.3" mkdirp "^0.5.1" noms "0.0.0" through2 "^2.0.1" - yargs "^11.0.0" + yargs "^13.2.4" core-js@^2.2.0, core-js@^2.4.0, core-js@^2.5.7: version "2.5.7" @@ -2500,13 +2538,13 @@ coveralls@3.0.0: minimist "^1.2.0" request "^2.79.0" -crc32-stream@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-2.0.0.tgz#e3cdd3b4df3168dd74e3de3fbbcb7b297fe908f4" - integrity sha1-483TtN8xaN10494/u8t7KX/pCPQ= +crc32-stream@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/crc32-stream/-/crc32-stream-3.0.1.tgz#cae6eeed003b0e44d739d279de5ae63b171b4e85" + integrity sha512-mctvpXlbzsvK+6z8kJwSJ5crm7yBwrQMTybJzMw1O4lLGJqjlDCXY2Zw7KheiA6XBEcBmfLx1D88mjRGVJtY9w== dependencies: crc "^3.4.4" - readable-stream "^2.0.0" + readable-stream "^3.4.0" crc@3.4.4: version "3.4.4" @@ -2591,13 +2629,6 @@ crypt@~0.0.1: resolved "https://registry.yarnpkg.com/crypt/-/crypt-0.0.2.tgz#88d7ff7ec0dfb86f713dc87bbb42d044d3e6c41b" integrity sha1-iNf/fsDfuG9xPch7u0LQRNPmxBs= -cryptiles@3.x.x: - version "3.1.2" - resolved "https://registry.yarnpkg.com/cryptiles/-/cryptiles-3.1.2.tgz#a89fbb220f5ce25ec56e8c4aa8a4fd7b5b0d29fe" - integrity sha1-qJ+7Ig9c4l7FboxKqKT9e1sNKf4= - dependencies: - boom "5.x.x" - crypto-browserify@^3.11.0: version "3.12.0" resolved "https://registry.yarnpkg.com/crypto-browserify/-/crypto-browserify-3.12.0.tgz#396cf9f3137f03e4b8e532c58f698254e00f80ec" @@ -2857,6 +2888,11 @@ d@1: dependencies: es5-ext "^0.10.9" +dargs@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/dargs/-/dargs-5.1.0.tgz#ec7ea50c78564cd36c9d5ec18f66329fade27829" + integrity sha1-7H6lDHhWTNNsnV7Bj2Yyn63ieCk= + dashdash@^1.12.0: version "1.14.1" resolved "https://registry.yarnpkg.com/dashdash/-/dashdash-1.14.1.tgz#853cfa0f7cbe2fed5de20326b8dd581035f6e2f0" @@ -2888,32 +2924,39 @@ debug-loader@^0.0.1: dependencies: loader-utils "^0.2.12" -debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.6, debug@^2.6.8: +debug@2.6.9, debug@^2.1.2, debug@^2.2.0, debug@^2.3.3, debug@^2.6.8: version "2.6.9" resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f" integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA== dependencies: ms "2.0.0" -debug@^3.1.0, debug@~3.1.0: +debug@3.1.0, debug@^3.1.0, debug@~3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/debug/-/debug-3.1.0.tgz#5bb5a0672628b64149566ba16819e61518c67261" integrity sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g== dependencies: ms "2.0.0" -decamelize@^1.0.0, decamelize@^1.1.1, decamelize@^1.1.2: +debug@^3.2.5: + version "3.2.6" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.6.tgz#e83d17de16d8a7efb7717edbe5fb10135eee629b" + integrity sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ== + dependencies: + ms "^2.1.1" + +debug@^4.1.0, debug@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/debug/-/debug-4.1.1.tgz#3b72260255109c6b589cee050f1d516139664791" + integrity sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw== + dependencies: + ms "^2.1.1" + +decamelize@^1.1.1, decamelize@^1.1.2, decamelize@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-1.2.0.tgz#f6534d15148269b20352e7bee26f501f9a191290" integrity sha1-9lNNFRSCabIDUue+4m9QH5oZEpA= -decamelize@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/decamelize/-/decamelize-2.0.0.tgz#656d7bbc8094c4c788ea53c5840908c9c7d063c7" - integrity sha512-Ikpp5scV3MSYxY39ymh45ZLEecsTdv/Xj2CaQfI8RLMuwi7XvjX9H/fhraiSuU+C5w5NTDu4ZU72xNiZnurBPg== - dependencies: - xregexp "4.0.0" - decode-uri-component@^0.2.0: version "0.2.0" resolved "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.0.tgz#eb3913333458775cb84cd1a1fae062106bb87545" @@ -2944,12 +2987,12 @@ deep-is@~0.1.3: resolved "https://registry.yarnpkg.com/deep-is/-/deep-is-0.1.3.tgz#b369d6fb5dbc13eecf524f91b070feedc357cf34" integrity sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ= -default-gateway@^2.6.0: - version "2.7.2" - resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-2.7.2.tgz#b7ef339e5e024b045467af403d50348db4642d0f" - integrity sha512-lAc4i9QJR0YHSDFdzeBQKfZ1SRDG3hsJNEkrpcZa8QhBfidLAilT60BDEIVUUGqosFp425KOgB3uYqcnQrWafQ== +default-gateway@^4.2.0: + version "4.2.0" + resolved "https://registry.yarnpkg.com/default-gateway/-/default-gateway-4.2.0.tgz#167104c7500c2115f6dd69b0a536bb8ed720552b" + integrity sha512-h6sMrVB1VMWVrW13mSc6ia/DwYYw5MN6+exNu1OaJeFac5aSAvwM7lZ0NVfTABuSkQelr4h5oebg3KB1XPdjgA== dependencies: - execa "^0.10.0" + execa "^1.0.0" ip-regex "^2.1.0" define-properties@^1.1.2, define-properties@^1.1.3: @@ -2994,17 +3037,18 @@ del@^2.2.0: pinkie-promise "^2.0.0" rimraf "^2.2.8" -del@^3.0.0: - version "3.0.0" - resolved "https://registry.yarnpkg.com/del/-/del-3.0.0.tgz#53ecf699ffcbcb39637691ab13baf160819766e5" - integrity sha1-U+z2mf/LyzljdpGrE7rxYIGXZuU= +del@^4.1.1: + version "4.1.1" + resolved "https://registry.yarnpkg.com/del/-/del-4.1.1.tgz#9e8f117222ea44a31ff3a156c049b99052a9f0b4" + integrity sha512-QwGuEUouP2kVwQenAsOof5Fv8K9t3D8Ca8NxcXKrIpEHjTXK5J2nXLdP+ALI1cgv8wj7KuwBhTwBkOZSJKM5XQ== dependencies: + "@types/glob" "^7.1.1" globby "^6.1.0" - is-path-cwd "^1.0.0" - is-path-in-cwd "^1.0.0" - p-map "^1.1.1" - pify "^3.0.0" - rimraf "^2.2.8" + is-path-cwd "^2.0.0" + is-path-in-cwd "^2.0.0" + p-map "^2.0.0" + pify "^4.0.1" + rimraf "^2.6.3" delayed-stream@~1.0.0: version "1.0.0" @@ -3056,17 +3100,17 @@ detect-libc@^1.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha1-+hN8S9aY7fVc1c0CrFWfkaTEups= -detect-node@^2.0.3: - version "2.0.3" - resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.3.tgz#a2033c09cc8e158d37748fbde7507832bd6ce127" - integrity sha1-ogM8CcyOFY03dI+951B4Mr1s4Sc= +detect-node@^2.0.4: + version "2.0.4" + resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c" + integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw== di@^0.0.1: version "0.0.1" resolved "https://registry.yarnpkg.com/di/-/di-0.0.1.tgz#806649326ceaa7caa3306d75d985ea2748ba913c" integrity sha1-gGZJMmzqp8qjMG112YXqJ0i6kTw= -diff@^3.1.0, diff@^3.2.0: +diff@3.5.0, diff@^3.1.0, diff@^3.2.0: version "3.5.0" resolved "https://registry.yarnpkg.com/diff/-/diff-3.5.0.tgz#800c0dd1e0a8bfbc95835c202ad220fe317e5a12" integrity sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA== @@ -3226,9 +3270,9 @@ ecc-jsbn@~0.1.1: safer-buffer "^2.1.0" ecstatic@^3.0.0: - version "3.2.2" - resolved "https://registry.yarnpkg.com/ecstatic/-/ecstatic-3.2.2.tgz#4cc37c80ea88c021ca7cde66a15606ceaa9348e7" - integrity sha512-khJlPch7aw/Gx+cKabpt0l2kVychBpGuwVKVMb8rhui00kHWwETDN000Z2CxJl1XaZI4xEkoPD/uezmP28c0/Q== + version "3.3.2" + resolved "https://registry.yarnpkg.com/ecstatic/-/ecstatic-3.3.2.tgz#6d1dd49814d00594682c652adb66076a69d46c48" + integrity sha512-fLf9l1hnwrHI2xn9mEDT7KIi22UDqA2jaCwyCbSUJh9a1V+LEUSL/JO/6TIz/QyuBURWUHrFL5Kg2TtO1bkkog== dependencies: he "^1.1.1" mime "^1.6.0" @@ -3268,6 +3312,11 @@ elliptic@^6.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.0" +emoji-regex@^7.0.1: + version "7.0.3" + resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-7.0.3.tgz#933a04052860c85e83c122479c4748a8e4c72156" + integrity sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA== + emojis-list@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/emojis-list/-/emojis-list-2.1.0.tgz#4daa4d9db00f9819880c79fa457ae5b09a1fd389" @@ -3285,7 +3334,7 @@ encoding@^0.1.11: dependencies: iconv-lite "~0.4.13" -end-of-stream@^1.0.0, 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.1" resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.1.tgz#ed29634d19baba463b6ce6b80a37213eab71ec43" integrity sha512-1MkrZNvWTKCaigbn+W15elq2BB/L22nqrSY5DKlo3X6+vclJm8Bb5djXJBmEX6fS3+zCh/F4VBK5Z2KxJt4s2Q== @@ -3448,6 +3497,11 @@ es6-promisify@^5.0.0: dependencies: es6-promise "^4.0.3" +es6-promisify@^6.0.0: + version "6.0.1" + resolved "https://registry.yarnpkg.com/es6-promisify/-/es6-promisify-6.0.1.tgz#6edaa45f3bd570ffe08febce66f7116be4b1cdb6" + integrity sha512-J3ZkwbEnnO+fGAKrjVpeUAnZshAdfZvbhQpqfIH9kSAspReRC4nJnu8ewm55b4y9ElyeuhCTzJD0XiH8Tsbhlw== + es6-symbol@^3.1.1, es6-symbol@~3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/es6-symbol/-/es6-symbol-3.1.1.tgz#bf00ef4fdab6ba1b46ecb7b629b4c7ed5715cc77" @@ -3461,7 +3515,7 @@ escape-html@~1.0.3: resolved "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988" integrity sha1-Aljq5NPQwJdN4cFpGI7wBR0dGYg= -escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: +escape-string-regexp@1.0.5, escape-string-regexp@^1.0.2, escape-string-regexp@^1.0.5: version "1.0.5" resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= @@ -3551,12 +3605,12 @@ events@^1.0.0: resolved "https://registry.yarnpkg.com/events/-/events-1.1.1.tgz#9ebdb7635ad099c70dcc4c2a1f5004288e8bd924" integrity sha1-nr23Y1rQmccNzEwqH1AEKI6L2SQ= -eventsource@0.1.6: - version "0.1.6" - resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-0.1.6.tgz#0acede849ed7dd1ccc32c811bb11b944d4f29232" - integrity sha1-Cs7ehJ7X3RzMMsgRuxG5RNTykjI= +eventsource@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/eventsource/-/eventsource-1.0.7.tgz#8fbc72c93fcd34088090bc0a4e64f4b5cee6d8d0" + integrity sha512-4Ln17+vVT0k8aWq+t/bF5arcS3EpT9gYtW66EPacdj/mAFevznsnyoHLPy2BA8gbIQeIHoPsvwmfBftfcG//BQ== dependencies: - original ">=0.0.5" + original "^1.0.0" evp_bytestokey@^1.0.0, evp_bytestokey@^1.0.3: version "1.0.3" @@ -3592,6 +3646,19 @@ execa@^0.7.0: signal-exit "^3.0.0" strip-eof "^1.0.0" +execa@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/execa/-/execa-1.0.0.tgz#c6236a5bb4df6d6f15e88e7f017798216749ddd8" + integrity sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA== + dependencies: + cross-spawn "^6.0.0" + get-stream "^4.0.0" + is-stream "^1.1.0" + npm-run-path "^2.0.0" + p-finally "^1.0.0" + signal-exit "^3.0.0" + strip-eof "^1.0.0" + exit@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/exit/-/exit-0.1.2.tgz#0632638f8d877cc82107d30a0fff1a17cba1cd0c" @@ -3700,7 +3767,7 @@ express@4.16.2: utils-merge "1.0.1" vary "~1.1.2" -express@^4.16.2, express@^4.16.3: +express@^4.16.3, express@^4.17.1: version "4.17.1" resolved "https://registry.yarnpkg.com/express/-/express-4.17.1.tgz#4491fc38605cf51f8629d39c2b5d026f98a4c134" integrity sha512-mHJ9O79RqluphRrcw2X/GTh3k9tVv8YcoyY4Kkh4WDMUYKRZUq0h1o0w2rrrxBqM7VoeUVqgb27xlEMXTnYt4g== @@ -3758,7 +3825,7 @@ extend-shallow@^3.0.0, extend-shallow@^3.0.2: assign-symbols "^1.0.0" is-extendable "^1.0.1" -extend@^3.0.0, extend@~3.0.1, extend@~3.0.2: +extend@^3.0.0, extend@~3.0.2: version "3.0.2" resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.2.tgz#f8b1136b4071fbd8eb140aff858b1019ec2915fa" integrity sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g== @@ -3831,6 +3898,16 @@ fancy-log@^1.1.0: color-support "^1.1.3" time-stamp "^1.0.0" +fancy-log@^1.3.3: + version "1.3.3" + resolved "https://registry.yarnpkg.com/fancy-log/-/fancy-log-1.3.3.tgz#dbc19154f558690150a23953a0adbd035be45fc7" + integrity sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw== + dependencies: + ansi-gray "^0.1.1" + color-support "^1.1.3" + parse-node-version "^1.0.0" + time-stamp "^1.0.0" + fast-deep-equal@^1.0.0: version "1.1.0" resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-1.1.0.tgz#c053477817c86b51daa853c81e059b733d023614" @@ -3882,10 +3959,10 @@ faye-websocket@^0.10.0: dependencies: websocket-driver ">=0.5.1" -faye-websocket@~0.11.0: - version "0.11.1" - resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.1.tgz#f0efe18c4f56e4f40afc7e06c719fd5ee6188f38" - integrity sha1-8O/hjE9W5PQK/H4Gxxn9XuYYjzg= +faye-websocket@~0.11.1: + version "0.11.3" + resolved "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.3.tgz#5c0e9a8968e8912c286639fde977a8b209f2508e" + integrity sha512-D2y4bovYpzziGgbHYtGCMjlJM36vAl/y+xUyn1C+FVx8szd1E+86KwVw6XvYSzOP8iMpm1X0I4xJD+QtUb36OA== dependencies: websocket-driver ">=0.5.1" @@ -4066,7 +4143,7 @@ fork-ts-checker-webpack-plugin@^0.4.10: resolve "^1.5.0" tapable "^1.0.0" -form-data@~2.3.1, form-data@~2.3.2: +form-data@~2.3.2: version "2.3.2" resolved "https://registry.yarnpkg.com/form-data/-/form-data-2.3.2.tgz#4970498be604c20c005d4f5c23aecd21d6b49099" integrity sha1-SXBJi+YEwgwAXU9cI67NIda0kJk= @@ -4183,10 +4260,18 @@ fsevents@^1.0.0, fsevents@^1.2.2: nan "^2.9.2" node-pre-gyp "^0.10.0" +fsevents@^1.2.7: + version "1.2.9" + resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.9.tgz#3f5ed66583ccd6f400b5a00db6f7e861363e388f" + integrity sha512-oeyj2H3EjjonWcFjD5NvZNE9Rqe4UW+nQBU2HNeKw0koVLEFIhtyETyAakeAM3de7Z/SW5kcA+fZUait9EApnw== + dependencies: + nan "^2.12.1" + node-pre-gyp "^0.12.0" + fstream@^1.0.0, fstream@^1.0.2: - version "1.0.11" - resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.11.tgz#5c1fb1f117477114f0632a0eb4b71b3cb0fd3171" - integrity sha1-XB+x8RdHcRTwYyoOtLcbPLD9MXE= + version "1.0.12" + resolved "https://registry.yarnpkg.com/fstream/-/fstream-1.0.12.tgz#4e8ba8ee2d48be4f7d0de505455548eae5932045" + integrity sha512-WvJ193OHa0GHPEL+AycEJgxvBEwyfRkN1vhjca23OaPVMCaLCXTd5qAu82AjTcgP1UJmytkOKb63Ypde7raDIg== dependencies: graceful-fs "^4.1.2" inherits "~2.0.0" @@ -4224,6 +4309,11 @@ get-caller-file@^1.0.1: resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-1.0.3.tgz#f978fa4c90d1dfe7ff2d6beda2a515e713bdcf4a" integrity sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w== +get-caller-file@^2.0.1: + version "2.0.5" + resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" + integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg== + get-stdin@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/get-stdin/-/get-stdin-4.0.1.tgz#b968c6b0a04384324902e8bf1a5df32579a450fe" @@ -4239,6 +4329,13 @@ get-stream@^3.0.0: resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-3.0.0.tgz#8e943d1358dc37555054ecbe2edb05aa174ede14" integrity sha1-jpQ9E1jcN1VQVOy+LtsFqhdO3hQ= +get-stream@^4.0.0: + version "4.1.0" + resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5" + integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w== + dependencies: + pump "^3.0.0" + get-value@^2.0.3, get-value@^2.0.6: version "2.0.6" resolved "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28" @@ -4279,6 +4376,18 @@ glob-to-regexp@^0.3.0: resolved "https://registry.yarnpkg.com/glob-to-regexp/-/glob-to-regexp-0.3.0.tgz#8c5a1494d2066c570cc3bfe4496175acc4d502ab" integrity sha1-jFoUlNIGbFcMw7/kSWF1rMTVAqs= +glob@7.1.2: + version "7.1.2" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.2.tgz#c19c9df9a028702d678612384a6552404c636d15" + integrity sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ== + 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" + glob@^5.0.15: version "5.0.15" resolved "https://registry.yarnpkg.com/glob/-/glob-5.0.15.tgz#1bc936b9e02f4a603fcc222ecf7633d30b8b93b1" @@ -4302,6 +4411,18 @@ glob@^7.0.0, glob@^7.0.3, glob@^7.0.5, glob@^7.0.6, glob@^7.1.1, glob@^7.1.2, gl once "^1.3.0" path-is-absolute "^1.0.0" +glob@^7.1.3, glob@^7.1.4: + version "7.1.4" + resolved "https://registry.yarnpkg.com/glob/-/glob-7.1.4.tgz#aa608a2f6c577ad357e1ae5a5c26d9a8d1969255" + integrity sha512-hkLPepehmnKk41pUGm3sYxoFs/umurYfYJCerbXEyFIWcAzvpipAgVkBqqT9RBKMGjnq6kMuyYwha6csxbiM1A== + 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.0: version "0.1.1" resolved "https://registry.yarnpkg.com/global-dirs/-/global-dirs-0.1.1.tgz#b319c0dd4607f353f3be9cca4c72fc148c49f445" @@ -4407,11 +4528,34 @@ got@^6.7.1: unzip-response "^2.0.1" url-parse-lax "^1.0.0" -graceful-fs@^4.1.0, graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: +graceful-fs@^4.1.11, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.1.9: version "4.1.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.1.11.tgz#0e8bdfe4d1ddb8854d64e04ea7c00e2a026e5658" integrity sha1-Dovf5NHduIVNZOBOp8AOKgJuVlg= +graceful-fs@^4.2.0: + version "4.2.1" + resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.1.tgz#1c1f0c364882c868f5bff6512146328336a11b1d" + integrity sha512-b9usnbDGnD928gJB3LrCmxoibr3VE4U2SMo5PBuBnokWyDADTqDPXg4YpwKF1trpH+UbGp7QLicO3+aWEy0+mw== + +growl@1.10.5: + version "1.10.5" + resolved "https://registry.yarnpkg.com/growl/-/growl-1.10.5.tgz#f2735dc2283674fa67478b10181059355c369e5e" + integrity sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA== + +gulp-mocha@^6.0.0: + version "6.0.0" + resolved "https://registry.yarnpkg.com/gulp-mocha/-/gulp-mocha-6.0.0.tgz#80f32bc705ce30747f355ddb8ccd96a1c73bef13" + integrity sha512-FfBldW5ttnDpKf4Sg6/BLOOKCCbr5mbixDGK1t02/8oSrTCwNhgN/mdszG3cuQuYNzuouUdw4EH/mlYtgUscPg== + dependencies: + dargs "^5.1.0" + execa "^0.10.0" + mocha "^5.2.0" + npm-run-path "^2.0.2" + plugin-error "^1.0.1" + supports-color "^5.4.0" + through2 "^2.0.3" + gulp-util@3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/gulp-util/-/gulp-util-3.0.7.tgz#78925c4b8f8b49005ac01a011c557e6218941cbb" @@ -4451,35 +4595,27 @@ gzip-size@^5.0.0: duplexer "^0.1.1" pify "^4.0.1" -handle-thing@^1.2.5: - version "1.2.5" - resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-1.2.5.tgz#fd7aad726bf1a5fd16dfc29b2f7a6601d27139c4" - integrity sha1-/Xqtcmvxpf0W38KbL3pmAdJxOcQ= +handle-thing@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/handle-thing/-/handle-thing-2.0.0.tgz#0e039695ff50c93fc288557d696f3c1dc6776754" + integrity sha512-d4sze1JNC454Wdo2fkuyzCr6aHcbL6PGGuFAz0Li/NcOm1tCHGnWDRmJP85dh9IhQErTc2svWFEX5xHIOo//kQ== handlebars@^4.0.1, handlebars@^4.0.6: - version "4.0.11" - resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.0.11.tgz#630a35dfe0294bc281edae6ffc5d329fc7982dcc" - integrity sha1-Ywo13+ApS8KB7a5v/F0yn8eYLcw= + version "4.1.2" + resolved "https://registry.yarnpkg.com/handlebars/-/handlebars-4.1.2.tgz#b6b37c1ced0306b221e094fc7aca3ec23b131b67" + integrity sha512-nvfrjqvt9xQ8Z/w0ijewdD/vvWDTOweBUm96NTr66Wfvo1mJenBLwcYmPs3TIBP5ruzYGD7Hx/DaM9RmhroGPw== dependencies: - async "^1.4.0" + neo-async "^2.6.0" optimist "^0.6.1" - source-map "^0.4.4" + source-map "^0.6.1" optionalDependencies: - uglify-js "^2.6" + uglify-js "^3.1.4" har-schema@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/har-schema/-/har-schema-2.0.0.tgz#a94c2224ebcac04782a0d9035521f24735b7ec92" integrity sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI= -har-validator@~5.0.3: - version "5.0.3" - resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.0.3.tgz#ba402c266194f15956ef15e0fcf242993f6a7dfd" - integrity sha1-ukAsJmGU8VlW7xXg/PJCmT9qff0= - dependencies: - ajv "^5.1.0" - har-schema "^2.0.0" - har-validator@~5.1.0: version "5.1.0" resolved "https://registry.yarnpkg.com/har-validator/-/har-validator-5.1.0.tgz#44657f5688a22cfd4b72486e81b3a3fb11742c29" @@ -4596,21 +4732,16 @@ hasha@^2.2.0: is-stream "^1.0.1" pinkie-promise "^2.0.0" -hawk@~6.0.2: - version "6.0.2" - resolved "https://registry.yarnpkg.com/hawk/-/hawk-6.0.2.tgz#af4d914eb065f9b5ce4d9d11c1cb2126eecc3038" - integrity sha512-miowhl2+U7Qle4vdLqDdPt9m09K6yZhkLDTWGoUiUzrQCn+mHHSmfJgAyGaLRZbPmTqfFFjRV1QWCW0VWUJBbQ== - dependencies: - boom "4.x.x" - cryptiles "3.x.x" - hoek "4.x.x" - sntp "2.x.x" - -he@1.1.x, he@^1.1.1: +he@1.1.1, he@1.1.x: version "1.1.1" resolved "https://registry.yarnpkg.com/he/-/he-1.1.1.tgz#93410fd21b009735151f8868c2f271f3427e23fd" integrity sha1-k0EP0hsAlzUVH4howvJx80J+I/0= +he@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/he/-/he-1.2.0.tgz#84ae65fa7eafb165fddb61566ae14baf05664f0f" + integrity sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw== + hex-color-regex@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e" @@ -4630,11 +4761,6 @@ hmac-drbg@^1.0.0: minimalistic-assert "^1.0.0" minimalistic-crypto-utils "^1.0.1" -hoek@4.x.x: - version "4.2.1" - resolved "https://registry.yarnpkg.com/hoek/-/hoek-4.2.1.tgz#9634502aa12c445dd5a7c5734b572bb8738aacbb" - integrity sha512-QLg82fGkfnJ/4iy1xZ81/9SIJiq1NGFUMGs6ParyjBZr6jW2Ufj/snDqTHixNlHdPNwN2RLVD0Pi3igeK9+JfA== - homedir-polyfill@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/homedir-polyfill/-/homedir-polyfill-1.0.1.tgz#4c2bbc8a758998feebf5ed68580f76d46768b4bc" @@ -4677,7 +4803,7 @@ html-comment-regex@^1.1.0: resolved "https://registry.yarnpkg.com/html-comment-regex/-/html-comment-regex-1.1.2.tgz#97d4688aeb5c81886a364faa0cad1dda14d433a7" integrity sha512-P+M65QY2JQ5Y0G9KKdlDpo0zK+/OHptU5AaBwUfAIDJZk1MYf32Frm84EcOytfJE0t5JvkAnKlmjsXDnWzCJmQ== -html-entities@^1.2.0: +html-entities@^1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/html-entities/-/html-entities-1.2.1.tgz#0df29351f0721163515dfb9e5543e5f6eed5162f" integrity sha1-DfKTUfByEWNRXfueVUPl9u7VFi8= @@ -4759,17 +4885,17 @@ http-parser-js@>=0.4.0: resolved "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.4.13.tgz#3bd6d6fde6e3172c9334c3b33b6c193d80fe1137" integrity sha1-O9bW/ebjFyyTNMOzO2wZPYD+ETc= -http-proxy-middleware@~0.18.0: - version "0.18.0" - resolved "http://registry.npmjs.org/http-proxy-middleware/-/http-proxy-middleware-0.18.0.tgz#0987e6bb5a5606e5a69168d8f967a87f15dd8aab" - integrity sha512-Fs25KVMPAIIcgjMZkVHJoKg9VcXcC1C8yb9JUgeDvVXY0S/zgVIhMb+qVswDIgtJe2DfckMSY2d6TuTEutlk6Q== +http-proxy-middleware@^0.19.1: + version "0.19.1" + resolved "https://registry.yarnpkg.com/http-proxy-middleware/-/http-proxy-middleware-0.19.1.tgz#183c7dc4aa1479150306498c210cdaf96080a43a" + integrity sha512-yHYTgWMQO8VvwNS22eLLloAkvungsKdKTLO8AJlftYIKNfJr3GK3zK0ZCfzDDGUBttdGc8xFy1mCitvNKQtC3Q== dependencies: - http-proxy "^1.16.2" + http-proxy "^1.17.0" is-glob "^4.0.0" - lodash "^4.17.5" - micromatch "^3.1.9" + lodash "^4.17.11" + micromatch "^3.1.10" -http-proxy@^1.13.0, http-proxy@^1.16.2, http-proxy@^1.8.1: +http-proxy@^1.13.0, http-proxy@^1.17.0, http-proxy@^1.8.1: version "1.17.0" resolved "https://registry.yarnpkg.com/http-proxy/-/http-proxy-1.17.0.tgz#7ad38494658f84605e2f6db4436df410f4e5be9a" integrity sha512-Taqn+3nNvYRfJ3bGvKfBSRwy1v6eePlm3oc/aWVxZp57DQr5Eq3xhKJi7Z4hZpS8PC3H4qI+Yly5EmFacGuA/g== @@ -4917,6 +5043,14 @@ import-local@^1.0.0: pkg-dir "^2.0.0" resolve-cwd "^2.0.0" +import-local@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/import-local/-/import-local-2.0.0.tgz#55070be38a5993cf18ef6db7e961f5bee5c5a09d" + integrity sha512-b6s04m3O+s3CGSbqDIyP4R6aAwAeYlVq9+WUWep6iHa8ETRf9yei1U48C5MmfJmV9AiLYYBKPMq/W+/WRpQmCQ== + dependencies: + pkg-dir "^3.0.0" + resolve-cwd "^2.0.0" + imports-loader@0.8.0: version "0.8.0" resolved "https://registry.yarnpkg.com/imports-loader/-/imports-loader-0.8.0.tgz#030ea51b8ca05977c40a3abfd9b4088fe0be9a69" @@ -5013,13 +5147,13 @@ inquirer@^6.0.0: strip-ansi "^4.0.0" through "^2.3.6" -internal-ip@^3.0.1: - version "3.0.1" - resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-3.0.1.tgz#df5c99876e1d2eb2ea2d74f520e3f669a00ece27" - integrity sha512-NXXgESC2nNVtU+pqmC9e6R8B1GpKxzsAQhffvh5AL79qKnodd+L7tnEQmTiUAVngqLalPbSqRA7XGIEL5nCd0Q== +internal-ip@^4.3.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-4.3.0.tgz#845452baad9d2ca3b69c635a137acb9a0dad0907" + integrity sha512-S1zBo1D6zcsyuC6PMmY5+55YMILQ9av8lotMx447Bq6SAgo/sDK6y6uUKmuYhW7eacnIhFfsPmCNYdDzsnnDCg== dependencies: - default-gateway "^2.6.0" - ipaddr.js "^1.5.2" + default-gateway "^4.2.0" + ipaddr.js "^1.9.0" interpret@^1.0.0, interpret@^1.1.0: version "1.1.0" @@ -5038,6 +5172,11 @@ invert-kv@^1.0.0: resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-1.0.0.tgz#104a8e4aaca6d3d8cd157a8ef8bfab2d7a3ffdb6" integrity sha1-EEqOSqym09jNFXqO+L+rLXo//bY= +invert-kv@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/invert-kv/-/invert-kv-2.0.0.tgz#7393f5afa59ec9ff5f67a27620d11c226e3eec02" + integrity sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA== + ip-regex@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/ip-regex/-/ip-regex-2.1.0.tgz#fa78bf5d2e6913c911ce9f819ee5146bb6d844e9" @@ -5058,10 +5197,10 @@ ipaddr.js@1.9.0: resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.0.tgz#37df74e430a0e47550fe54a2defe30d8acd95f65" integrity sha512-M4Sjn6N/+O6/IXSJseKqHoFc+5FdGJ22sXqnjTpdZweHK64MzEPAyQZyEU3R/KRv2GLoa7nNtg/C2Ev6m7z+eA== -ipaddr.js@^1.5.2: - version "1.8.1" - resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.8.1.tgz#fa4b79fa47fd3def5e3b159825161c0a519c9427" - integrity sha1-+kt5+kf9Pe9eOxWYJRYcClGclCc= +ipaddr.js@^1.9.0: + version "1.9.1" + resolved "https://registry.yarnpkg.com/ipaddr.js/-/ipaddr.js-1.9.1.tgz#bff38543eeb8984825079ff3a2a8e6cbd46781b3" + integrity sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g== is-absolute-url@^2.0.0: version "2.1.0" @@ -5303,6 +5442,11 @@ is-path-cwd@^1.0.0: resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-1.0.0.tgz#d225ec23132e89edd38fda767472e62e65f1106d" integrity sha1-0iXsIxMuie3Tj9p2dHLmLmXxEG0= +is-path-cwd@^2.0.0: + version "2.2.0" + resolved "https://registry.yarnpkg.com/is-path-cwd/-/is-path-cwd-2.2.0.tgz#67d43b82664a7b5191fd9119127eb300048a9fdb" + integrity sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ== + is-path-in-cwd@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-1.0.1.tgz#5ac48b345ef675339bd6c7a48a912110b241cf52" @@ -5310,6 +5454,13 @@ is-path-in-cwd@^1.0.0: dependencies: is-path-inside "^1.0.0" +is-path-in-cwd@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-in-cwd/-/is-path-in-cwd-2.1.0.tgz#bfe2dca26c69f397265a4009963602935a053acb" + integrity sha512-rNocXHgipO+rvnP6dk3zI20RpOtrAM/kzbB258Uw5BWr3TpXi861yzjo16Dn4hUox07iw5AyeMLHWsujkjzvRQ== + dependencies: + is-path-inside "^2.1.0" + is-path-inside@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-1.0.1.tgz#8ef5b7de50437a3fdca6b4e865ef7aa55cb48036" @@ -5317,6 +5468,13 @@ is-path-inside@^1.0.0: dependencies: path-is-inside "^1.0.1" +is-path-inside@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-2.1.0.tgz#7c9810587d659a40d27bcdb4d5616eab059494b2" + integrity sha512-wiyhTzfDWsvwAW53OBWF5zuvaOGlZ6PwYxAbPVDhpm+gM09xKQGjBq/8uYN12aDvMxnAnq3dxTyoSoRNmg5YFg== + dependencies: + path-is-inside "^1.0.2" + is-plain-object@^2.0.1, is-plain-object@^2.0.3, is-plain-object@^2.0.4: version "2.0.4" resolved "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677" @@ -5574,18 +5732,10 @@ js-tokens@^3.0.2: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b" integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls= -js-yaml@3.x, js-yaml@^3.6.1, js-yaml@^3.7.0, js-yaml@^3.9.0: - version "3.12.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.0.tgz#eaed656ec8344f10f527c6bfa1b6e2244de167d1" - integrity sha512-PIt2cnwmPfL4hKNwqeiuz4bKfnzHTBv6HyVgjahA6mPLwPDzjDWrplJBMjHUFxku/N3FlmrbyPclad+I+4mJ3A== - dependencies: - argparse "^1.0.7" - esprima "^4.0.0" - -js-yaml@^3.12.0: - version "3.12.2" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.12.2.tgz#ef1d067c5a9d9cb65bd72f285b5d8105c77f14fc" - integrity sha512-QHn/Lh/7HhZ/Twc7vJYQTkjuCa0kaCcDcjK5Zlk2rvnUpy7DxMJ23+Jc2dcyvltwQVg1nygAVlB2oRDFHoRS5Q== +js-yaml@3.x, js-yaml@^3.12.0, js-yaml@^3.6.1, js-yaml@^3.7.0, js-yaml@^3.9.0: + version "3.13.1" + resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847" + integrity sha512-YfbcO7jXDdyj0DGxYVSlSeQNHbD7XPWvrVWeVUujrQEoZzWJIRrCPoyk6kL6IAjAG2IolMK4T0hNUe0HOUs5Jw== dependencies: argparse "^1.0.7" esprima "^4.0.0" @@ -5778,12 +5928,12 @@ karma-sourcemap-loader@0.3.7: dependencies: graceful-fs "^4.1.2" -karma-webdriver-launcher@1.0.5: - version "1.0.5" - resolved "https://registry.yarnpkg.com/karma-webdriver-launcher/-/karma-webdriver-launcher-1.0.5.tgz#b1c3cb347f26e786039c15abf7f19a7791e8ddd7" - integrity sha1-scPLNH8m54YDnBWr9/Gad5Ho3dc= +karma-webdriver-launcher@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/karma-webdriver-launcher/-/karma-webdriver-launcher-1.0.7.tgz#fad955be541e0c41e2a19cfa2b4b9022e5b77626" + integrity sha512-LFO3EYQPjMXvilZ6ZJVfc2SRJpSDdhv73kmPVjDJy7vqC+wIuF7kUqKUuP0feHcJQnEGsj85SE4H3QFj1YObuw== dependencies: - wd "^1.0.0" + wd "^1.11.0" karma-webpack@3.0.0: version "3.0.0" @@ -5835,10 +5985,10 @@ kew@^0.7.0: resolved "https://registry.yarnpkg.com/kew/-/kew-0.7.0.tgz#79d93d2d33363d6fdd2970b335d9141ad591d79b" integrity sha1-edk9LTM2PW/dKXCzNdkUGtWR15s= -killable@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.0.tgz#da8b84bd47de5395878f95d64d02f2449fe05e6b" - integrity sha1-2ouEvUfeU5WHj5XWTQLyRJ/gXms= +killable@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/killable/-/killable-1.0.1.tgz#4c8ce441187a061c7474fb87ca08e2a638194892" + integrity sha512-LzqtLKlUwirEUyl/nicirVmNiPvYs7l5n8wOPP7fyJVpUPkvCnW/vuiXGpylGUlnPDnB7311rARzAt3Mhswpjg== kind-of@^1.1.0: version "1.1.0" @@ -5891,11 +6041,6 @@ latest-version@^3.0.0: dependencies: package-json "^4.0.0" -lazy-cache@^1.0.3: - version "1.0.4" - resolved "https://registry.yarnpkg.com/lazy-cache/-/lazy-cache-1.0.4.tgz#a1d78fc3a50474cb80845d3b3b6e1da49a446e8e" - integrity sha1-odePw6UEdMuAhF07O24dpJpEbo4= - lazystream@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/lazystream/-/lazystream-1.0.0.tgz#f6995fe0f820392f61396be89462407bb77168e4" @@ -5910,6 +6055,13 @@ lcid@^1.0.0: dependencies: invert-kv "^1.0.0" +lcid@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/lcid/-/lcid-2.0.0.tgz#6ef5d2df60e52f82eb228a4c373e8d1f397253cf" + integrity sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA== + dependencies: + invert-kv "^2.0.0" + lcov-parse@^0.0.10: version "0.0.10" resolved "https://registry.yarnpkg.com/lcov-parse/-/lcov-parse-0.0.10.tgz#1b0b8ff9ac9c7889250582b70b71315d9da6d9a3" @@ -6056,7 +6208,7 @@ lodash._reevaluate@^3.0.0: resolved "https://registry.yarnpkg.com/lodash._reevaluate/-/lodash._reevaluate-3.0.0.tgz#58bc74c40664953ae0b124d806996daca431e2ed" integrity sha1-WLx0xAZklTrgsSTYBpltrKQx4u0= -lodash._reinterpolate@^3.0.0, lodash._reinterpolate@~3.0.0: +lodash._reinterpolate@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/lodash._reinterpolate/-/lodash._reinterpolate-3.0.0.tgz#0ccf2d89166af03b3663c796538b75ac6e114d9d" integrity sha1-DM8tiRZq8Ds2Y8eWU4t1rG4RTZ0= @@ -6103,11 +6255,16 @@ lodash.defaults@^3.1.2: lodash.assign "^3.0.0" lodash.restparam "^3.0.0" -lodash.defaults@^4.0.0: +lodash.defaults@^4.0.0, lodash.defaults@^4.2.0: version "4.2.0" resolved "https://registry.yarnpkg.com/lodash.defaults/-/lodash.defaults-4.2.0.tgz#d09178716ffea4dde9e5fb7b37f6f0802274580c" integrity sha1-0JF4cW/+pN3p5ft7N/bwgCJ0WAw= +lodash.difference@^4.5.0: + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.difference/-/lodash.difference-4.5.0.tgz#9ccb4e505d486b91651345772885a2df27fd017c" + integrity sha1-nMtOUF1Ia5FlE0V3KIWi3yf9AXw= + lodash.endswith@^4.2.1: version "4.2.1" resolved "https://registry.yarnpkg.com/lodash.endswith/-/lodash.endswith-4.2.1.tgz#fed59ac1738ed3e236edd7064ec456448b37bc09" @@ -6120,6 +6277,11 @@ lodash.escape@^3.0.0: dependencies: lodash._root "^3.0.0" +lodash.flatten@^4.4.0: + version "4.4.0" + resolved "https://registry.yarnpkg.com/lodash.flatten/-/lodash.flatten-4.4.0.tgz#f31c22225a9632d2bbf8e4addbef240aa765a61f" + integrity sha1-8xwiIlqWMtK7+OSt2+8kCqdlph8= + lodash.get@^4.4.2: version "4.4.2" resolved "https://registry.yarnpkg.com/lodash.get/-/lodash.get-4.4.2.tgz#2d177f652fa31e939b4438d5341499dfa3825e99" @@ -6140,6 +6302,11 @@ lodash.isfunction@^3.0.8: resolved "https://registry.yarnpkg.com/lodash.isfunction/-/lodash.isfunction-3.0.9.tgz#06de25df4db327ac931981d1bdb067e5af68d051" integrity sha512-AirXNj15uRIMMPihnkInB4i3NHeb4iBtNg9WRWuK2o31S+ePwwNmDPaTL3o7dTJ+VXNZim7rFs4rxN4YU1oUJw== +lodash.isplainobject@^4.0.6: + version "4.0.6" + resolved "https://registry.yarnpkg.com/lodash.isplainobject/-/lodash.isplainobject-4.0.6.tgz#7c526a52d89b45c45cc690b88163be0497f550cb" + integrity sha1-fFJqUtibRcRcxpC4gWO+BJf1UMs= + lodash.isstring@^4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/lodash.isstring/-/lodash.isstring-4.0.1.tgz#d527dfb5456eca7cc9bb95d5daeaf88ba54a5451" @@ -6160,9 +6327,9 @@ lodash.memoize@^4.1.2: integrity sha1-vMbEmkKihA7Zl/Mj6tpezRguC/4= lodash.mergewith@^4.6.0: - version "4.6.1" - resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.1.tgz#639057e726c3afbdb3e7d42741caa8d6e4335927" - integrity sha512-eWw5r+PYICtEBgrBE5hhlT6aAa75f411bgDz/ZL2KZqYV03USvucsxcHUIlGTDTECs1eunpI7HOV7U+WLDvNdQ== + version "4.6.2" + resolved "https://registry.yarnpkg.com/lodash.mergewith/-/lodash.mergewith-4.6.2.tgz#617121f89ac55f59047c7aec1ccd6654c6590f55" + integrity sha512-GK3g5RPZWTRSeLSpgP8Xhra+pnjBC56q9FZYe1d5RN3TJ35dbkGy3YqBSMbyCrlbi+CM9Z3Jk5yTL7RCsqboyQ== lodash.restparam@^3.0.0: version "3.6.1" @@ -6195,11 +6362,11 @@ lodash.template@^3.0.0: lodash.templatesettings "^3.0.0" lodash.template@^4.2.4: - version "4.4.0" - resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.4.0.tgz#e73a0385c8355591746e020b99679c690e68fba0" - integrity sha1-5zoDhcg1VZF0bgILmWecaQ5o+6A= + version "4.5.0" + resolved "https://registry.yarnpkg.com/lodash.template/-/lodash.template-4.5.0.tgz#f976195cf3f347d0d5f52483569fe8031ccce8ab" + integrity sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A== dependencies: - lodash._reinterpolate "~3.0.0" + lodash._reinterpolate "^3.0.0" lodash.templatesettings "^4.0.0" lodash.templatesettings@^3.0.0: @@ -6211,25 +6378,26 @@ lodash.templatesettings@^3.0.0: lodash.escape "^3.0.0" lodash.templatesettings@^4.0.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.1.0.tgz#2b4d4e95ba440d915ff08bc899e4553666713316" - integrity sha1-K01OlbpEDZFf8IvImeRVNmZxMxY= + version "4.2.0" + resolved "https://registry.yarnpkg.com/lodash.templatesettings/-/lodash.templatesettings-4.2.0.tgz#e481310f049d3cf6d47e912ad09313b154f0fb33" + integrity sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ== dependencies: - lodash._reinterpolate "~3.0.0" + lodash._reinterpolate "^3.0.0" + +lodash.union@^4.6.0: + version "4.6.0" + resolved "https://registry.yarnpkg.com/lodash.union/-/lodash.union-4.6.0.tgz#48bb5088409f16f1821666641c44dd1aaae3cd88" + integrity sha1-SLtQiECfFvGCFmZkHETdGqrjzYg= lodash.uniq@^4.5.0: version "4.5.0" resolved "https://registry.yarnpkg.com/lodash.uniq/-/lodash.uniq-4.5.0.tgz#d0225373aeb652adc1bc82e4945339a842754773" integrity sha1-0CJTc662Uq3BvILklFM5qEJ1R3M= -lodash@4.17.10, lodash@^4.0.0, lodash@^4.0.1, lodash@^4.13.1, lodash@^4.17.0, lodash@^4.17.10, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.0, lodash@^4.8.0, lodash@~4.17.10: - version "4.17.10" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.10.tgz#1b7793cf7259ea38fb3661d4d38b3260af8ae4e7" - integrity sha512-UejweD1pDoXu+AD825lWwp4ZGtSwgnpZxb3JDViD7StjQz+Nb/6l093lx4OQ0foGWNRoc19mWy7BzL+UAK2iVg== - -lodash@^4.17.11: - version "4.17.11" - resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d" +lodash@^4.0.0, lodash@^4.0.1, lodash@^4.13.1, lodash@^4.17.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.14, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.5.0, lodash@~4.17.10: + version "4.17.15" + resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548" + integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A== log-driver@^1.2.5: version "1.2.7" @@ -6254,10 +6422,10 @@ log4js@^3.0.0: rfdc "^1.1.2" streamroller "0.7.0" -loglevel@^1.4.1: - version "1.6.1" - resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa" - integrity sha1-4PyVEztu8nbNyIh82vJKpvFW+Po= +loglevel@^1.6.3: + version "1.6.3" + resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.3.tgz#77f2eb64be55a404c9fd04ad16d57c1d6d6b1280" + integrity sha512-LoEDv5pgpvWgPF4kNYuIp0qqSJVWak/dML0RY74xlzMZiT9w77teNAwKYKWBTYjlokMirg+o3jBwp+vlLrcfAA== loglevelnext@^1.0.1: version "1.0.5" @@ -6277,11 +6445,6 @@ long@^3.2.0: resolved "https://registry.yarnpkg.com/long/-/long-3.2.0.tgz#d821b7138ca1cb581c172990ef14db200b5c474b" integrity sha1-2CG3E4yhy1gcFymQ7xTbIAtcR0s= -longest@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/longest/-/longest-1.0.1.tgz#30a0b2da38f73770e8294a0d22e6625ed77d0097" - integrity sha1-MKCy2jj3N3DoKUoNIuZiXtd9AJc= - loose-envify@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/loose-envify/-/loose-envify-1.4.0.tgz#71ee51fa7be4caec1a63839f7e682d8132d30caf" @@ -6344,6 +6507,13 @@ mamacro@^0.0.3: resolved "https://registry.yarnpkg.com/mamacro/-/mamacro-0.0.3.tgz#ad2c9576197c9f1abf308d0787865bd975a3f3e4" integrity sha512-qMEwh+UujcQ+kbz3T6V+wAmO2U8veoq2w+3wY8MquqwVA3jChfwY+Tk52GZKDfACEPjuZ7r2oJLejwpt8jtwTA== +map-age-cleaner@^0.1.1: + version "0.1.3" + resolved "https://registry.yarnpkg.com/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz#7d583a7306434c055fe474b0f45078e6e1b4b92a" + integrity sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w== + dependencies: + p-defer "^1.0.0" + map-cache@^0.2.2: version "0.2.2" resolved "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf" @@ -6408,14 +6578,16 @@ media-typer@0.3.0: resolved "https://registry.yarnpkg.com/media-typer/-/media-typer-0.3.0.tgz#8710d7af0aa626f8fffa1ce00168545263255748" integrity sha1-hxDXrwqmJvj/+hzgAWhUUmMlV0g= -mem@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/mem/-/mem-1.1.0.tgz#5edd52b485ca1d900fe64895505399a0dfa45f76" - integrity sha1-Xt1StIXKHZAP5kiVUFOZoN+kX3Y= +mem@^4.0.0: + version "4.3.0" + resolved "https://registry.yarnpkg.com/mem/-/mem-4.3.0.tgz#461af497bc4ae09608cdb2e60eefb69bff744178" + integrity sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w== dependencies: - mimic-fn "^1.0.0" + map-age-cleaner "^0.1.1" + mimic-fn "^2.0.0" + p-is-promise "^2.0.0" -memory-fs@^0.4.0, memory-fs@~0.4.1: +memory-fs@^0.4.0, memory-fs@^0.4.1, memory-fs@~0.4.1: version "0.4.1" resolved "https://registry.yarnpkg.com/memory-fs/-/memory-fs-0.4.1.tgz#3a9a20b8462523e447cfbc7e8bb80ed667bfc552" integrity sha1-OpoguEYlI+RHz7x+i7gO1me/xVI= @@ -6462,9 +6634,9 @@ merge2@^1.2.1: integrity sha512-bgM8twH86rWni21thii6WCMQMRMmwqqdW3sGWi9IipnVAszdLXRjwDwAnyrVXo6DuP3AjRMMttZKUB48QWIFGg== merge@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da" - integrity sha1-dTHjnUlJwoGma4xabgJl6LBYlNo= + version "1.2.1" + resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.1.tgz#38bebf80c3220a8a487b6fcfb3941bb11720c145" + integrity sha512-VjFo4P5Whtj4vsLzsYBu5ayHhoHJ0UqNm7ibvShmbmoz7tGi0vXaoJbGdB+GmDMLUdg8DpQXEIeVDAe8MaABvQ== methods@1.1.2, methods@~1.1.2: version "1.1.2" @@ -6490,7 +6662,7 @@ micromatch@^2.1.5, micromatch@^2.3.11: parse-glob "^3.0.4" regex-cache "^0.4.2" -micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8, micromatch@^3.1.9: +micromatch@^3.1.10, micromatch@^3.1.4, micromatch@^3.1.8: version "3.1.10" resolved "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23" integrity sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg== @@ -6517,7 +6689,7 @@ miller-rabin@^4.0.0: bn.js "^4.0.0" brorand "^1.0.1" -mime-db@1.40.0: +mime-db@1.40.0, "mime-db@>= 1.40.0 < 2": version "1.40.0" resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.40.0.tgz#a65057e998db090f732a68f6c276d387d4126c32" integrity sha512-jYdeOMPy9vnxEqFRRo6ZvTZ8d9oPb+k18PKoYNYUe2stVEBPPwsln/qWzdbmaIvnhZ9v2P+CuecK+fpUfsV2mA== @@ -6556,11 +6728,21 @@ mime@^2.1.0, mime@^2.3.1: resolved "https://registry.yarnpkg.com/mime/-/mime-2.3.1.tgz#b1621c54d63b97c47d3cfe7f7215f7d64517c369" integrity sha512-OEUllcVoydBHGN1z84yfQDimn58pZNNNXgZlHXSboxMlFvgI6MXSWpWKpFRra7H1HxpVhHTkrghfRW49k6yjeg== +mime@^2.4.2: + version "2.4.4" + resolved "https://registry.yarnpkg.com/mime/-/mime-2.4.4.tgz#bd7b91135fc6b01cde3e9bae33d659b63d8857e5" + integrity sha512-LRxmNwziLPT828z+4YkNzloCFC2YM4wrB99k+AV5ZbEyfGNWfG8SO1FUXLmLDBSo89NrJZ4DIWeLjy1CHGhMGA== + mimic-fn@^1.0.0: version "1.2.0" resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-1.2.0.tgz#820c86a39334640e99516928bd03fca88057d022" integrity sha512-jf84uxzwiuiIVKiOLpfYk7N46TSy8ubTonmneY9vrpHNAnp0QBt2BxWV9dO3/j+BoVAb+a5G6YDPW3M5HOdMWQ== +mimic-fn@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/mimic-fn/-/mimic-fn-2.1.0.tgz#7ed2c2ccccaf84d3ffcb7a69b57711fc2083401b" + integrity sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg== + minimalistic-assert@^1.0.0, minimalistic-assert@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz#2e194de044626d4a10e7f7fbc00ce73e83e4d5c7" @@ -6571,7 +6753,7 @@ minimalistic-crypto-utils@^1.0.0, minimalistic-crypto-utils@^1.0.1: resolved "https://registry.yarnpkg.com/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz#f6c00c1c0b082246e5c4d99dfb8c7c083b2b582a" integrity sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo= -"minimatch@2 || 3", minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: +"minimatch@2 || 3", minimatch@3.0.4, minimatch@^3.0.0, minimatch@^3.0.2, minimatch@^3.0.3, minimatch@^3.0.4, minimatch@~3.0.2: version "3.0.4" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.0.4.tgz#5166e286457f03306064be5497e8dbb0c3d32083" integrity sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA== @@ -6652,6 +6834,23 @@ mkdirp@0.5.1, mkdirp@0.5.x, "mkdirp@>=0.5 0", mkdirp@^0.5.0, mkdirp@^0.5.1, mkdi dependencies: minimist "0.0.8" +mocha@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/mocha/-/mocha-5.2.0.tgz#6d8ae508f59167f940f2b5b3c4a612ae50c90ae6" + integrity sha512-2IUgKDhc3J7Uug+FxMXuqIyYzH7gJjXECKe/w43IGgQHTSj3InJi+yAA7T24L9bQMRKiUEHxEX37G5JpVUGLcQ== + dependencies: + browser-stdout "1.3.1" + commander "2.15.1" + debug "3.1.0" + diff "3.5.0" + escape-string-regexp "1.0.5" + glob "7.1.2" + growl "1.10.5" + he "1.1.1" + minimatch "3.0.4" + mkdirp "0.5.1" + supports-color "5.4.0" + moment@^2.22.1: version "2.22.2" resolved "https://registry.yarnpkg.com/moment/-/moment-2.22.2.tgz#3c257f9839fc0e93ff53149632239eb90783ff66" @@ -6690,6 +6889,11 @@ ms@2.1.1: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.1.tgz#30a5864eb3ebb0a66f2ebe6d727af06a09d86e0a" integrity sha512-tgp+dl5cGk28utYktBsrFqA7HKgrhgPsg6Z/EfhWI4gl1Hwq8B/GmY/0oXZ6nF8hDVesS/FpnYaD/kOWhYQvyg== +ms@^2.1.1: + version "2.1.2" + resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" + integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== + multicast-dns-service-types@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/multicast-dns-service-types/-/multicast-dns-service-types-1.1.0.tgz#899f11d9686e5e05cb91b35d5f0e63b773cfc901" @@ -6720,6 +6924,11 @@ nan@^2.10.0, nan@^2.9.2: resolved "https://registry.yarnpkg.com/nan/-/nan-2.11.0.tgz#574e360e4d954ab16966ec102c0c049fd961a099" integrity sha512-F4miItu2rGnV2ySkXOQoA8FKz/SR2Q2sWP0sbTxNxz/tuokeC8WxOhPMcwi0qIyGtVn/rrSeLbvVkznqCdwYnw== +nan@^2.12.1: + version "2.14.0" + resolved "https://registry.yarnpkg.com/nan/-/nan-2.14.0.tgz#7818f722027b2459a86f0295d434d1fc2336c52c" + integrity sha512-INOFj37C7k3AfaNTtX8RhsTw7qRy7eLET14cROi9+5HAVbbHuIWUHEauBv5qT4Av2tWasiTY1Jw6puUNqRJXQg== + nanomatch@^1.2.9: version "1.2.13" resolved "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119" @@ -6737,6 +6946,11 @@ nanomatch@^1.2.9: snapdragon "^0.8.1" to-regex "^3.0.1" +ncp@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/ncp/-/ncp-2.0.0.tgz#195a21d6c46e361d2fb1281ba38b91e9df7bdbb3" + integrity sha1-GVoh1sRuNh0vsSgbo4uR6d9727M= + needle@^2.2.1: version "2.2.2" resolved "https://registry.yarnpkg.com/needle/-/needle-2.2.2.tgz#1120ca4c41f2fcc6976fd28a8968afe239929418" @@ -6756,10 +6970,10 @@ negotiator@0.6.2: resolved "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.2.tgz#feacf7ccf525a77ae9634436a64883ffeca346fb" integrity sha512-hZXc7K2e+PgeI1eDBe/10Ard4ekbfrrqG8Ep+8Jmf4JID2bNg7NvCPOZN+kfF574pFQI7mum2AUqDidoKqcTOw== -neo-async@^2.5.0: - version "2.5.2" - resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.5.2.tgz#489105ce7bc54e709d736b195f82135048c50fcc" - integrity sha512-vdqTKI9GBIYcAEbFAcpKPErKINfPF5zIuz3/niBfq8WUZjpT2tytLlFVrBgWdOtqI4uaA/Rb6No0hux39XXDuw== +neo-async@^2.5.0, neo-async@^2.6.0: + version "2.6.1" + resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.1.tgz#ac27ada66167fa8849a6addd837f6b189ad2081c" + integrity sha512-iyam8fBuCUpWeKPGpaNMetEocMt364qkCsfL9JuhjXX6dRnguRVOfk2GZaDpPjcOKiiXCPINZC1GczQ7iTq3Zw== next-tick@1: version "1.0.0" @@ -6900,6 +7114,22 @@ node-pre-gyp@^0.10.0: semver "^5.3.0" tar "^4" +node-pre-gyp@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/node-pre-gyp/-/node-pre-gyp-0.12.0.tgz#39ba4bb1439da030295f899e3b520b7785766149" + integrity sha512-4KghwV8vH5k+g2ylT+sLTjy5wmUOb9vPhnM8NHvRf9dHmnW/CndrFXy2aRPaPST6dugXSdHXfeaHQm77PIz/1A== + dependencies: + detect-libc "^1.0.2" + mkdirp "^0.5.1" + needle "^2.2.1" + nopt "^4.0.1" + npm-packlist "^1.1.6" + npmlog "^4.0.2" + rc "^1.2.7" + rimraf "^2.6.1" + semver "^5.3.0" + tar "^4" + node-releases@^1.0.0-alpha.11: version "1.0.0-alpha.11" resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-1.0.0-alpha.11.tgz#73c810acc2e5b741a17ddfbb39dfca9ab9359d8a" @@ -7002,6 +7232,11 @@ normalize-path@^2.0.0, normalize-path@^2.0.1, normalize-path@^2.1.1: dependencies: remove-trailing-separator "^1.0.1" +normalize-path@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65" + integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA== + normalize-range@^0.1.2: version "0.1.2" resolved "https://registry.yarnpkg.com/normalize-range/-/normalize-range-0.1.2.tgz#2d10c06bdfd312ea9777695a4d28439456b75942" @@ -7074,7 +7309,7 @@ npm-run-all@4.1.3: shell-quote "^1.6.1" string.prototype.padend "^3.0.0" -npm-run-path@^2.0.0: +npm-run-path@^2.0.0, npm-run-path@^2.0.2: version "2.0.2" resolved "https://registry.yarnpkg.com/npm-run-path/-/npm-run-path-2.0.2.tgz#35a9232dfa35d7067b4cb2ddf2357b1871536c5f" integrity sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8= @@ -7120,11 +7355,6 @@ number-is-nan@^1.0.0: resolved "https://registry.yarnpkg.com/number-is-nan/-/number-is-nan-1.0.1.tgz#097b602b53422a522c1afb8790318336941a011d" integrity sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0= -oauth-sign@~0.8.2: - version "0.8.2" - resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.8.2.tgz#46a6ab7f0aead8deae9ec0565780b7d4efeb9d43" - integrity sha1-Rqarfwrq2N6unsBWV4C31O/rnUM= - oauth-sign@~0.9.0: version "0.9.0" resolved "https://registry.yarnpkg.com/oauth-sign/-/oauth-sign-0.9.0.tgz#47a7b016baa68b5fa0ecf3dee08a85c679ac6455" @@ -7214,7 +7444,7 @@ object.values@^1.1.0: function-bind "^1.1.1" has "^1.0.3" -obuf@^1.0.0, obuf@^1.1.1: +obuf@^1.0.0, obuf@^1.1.2: version "1.1.2" resolved "https://registry.yarnpkg.com/obuf/-/obuf-1.1.2.tgz#09bea3343d41859ebd446292d11c9d4db619084e" integrity sha512-PX1wu0AmAdPqOL1mWhqmlOd8kOIZQwGZw6rh7uby9fTc5lhaOWFLX3I6R1hrF9k3zUY40e6igsLGkDXK92LJNg== @@ -7231,6 +7461,11 @@ on-headers@~1.0.1: resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.1.tgz#928f5d0f470d49342651ea6794b0857c100693f7" integrity sha1-ko9dD0cNSTQmUepnlLCFfBAGk/c= +on-headers@~1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f" + integrity sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA== + once@1.x, once@^1.3.0, once@^1.3.1, once@^1.3.3, once@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -7280,13 +7515,20 @@ opn@4.0.2: object-assign "^4.0.1" pinkie-promise "^2.0.0" -opn@^5.1.0, opn@^5.3.0: +opn@^5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/opn/-/opn-5.3.0.tgz#64871565c863875f052cfdf53d3e3cb5adb53b1c" integrity sha512-bYJHo/LOmoTd+pfiYhfZDnf9zekVJrY+cnS2a5F2x+w5ppvTqObojTP7WiFG+kVZs9Inw+qQ/lw7TroWwhdd2g== dependencies: is-wsl "^1.1.0" +opn@^5.5.0: + version "5.5.0" + resolved "https://registry.yarnpkg.com/opn/-/opn-5.5.0.tgz#fc7164fab56d235904c51c3b27da6758ca3b9bfc" + integrity sha512-PqHpggC9bLV0VeWcdKhkpxY+3JTzetLSqTCWL/z/tFIbI6G8JCjondXklT1JinczLz2Xib62sSp0T/gKT4KksA== + dependencies: + is-wsl "^1.1.0" + optimist@0.6.x, optimist@^0.6.1, optimist@~0.6.0: version "0.6.1" resolved "https://registry.yarnpkg.com/optimist/-/optimist-0.6.1.tgz#da3ea74686fa21a19a111c326e90eb15a0196686" @@ -7315,7 +7557,7 @@ optionator@^0.8.1: type-check "~0.3.2" wordwrap "~1.0.0" -original@>=0.0.5: +original@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/original/-/original-1.0.2.tgz#e442a61cffe1c5fd20a65f3261c26663b303f25f" integrity sha512-hyBVl6iqqUOJ8FqRe+l/gS8H+kKYjrEndd5Pm1MfBtsEKA038HkkdbAl/72EAXGyonD/PFsvmVG+EvcIpliMBg== @@ -7339,14 +7581,14 @@ os-locale@^1.4.0: dependencies: lcid "^1.0.0" -os-locale@^2.0.0: - version "2.1.0" - resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-2.1.0.tgz#42bc2900a6b5b8bd17376c8e882b65afccf24bf2" - integrity sha512-3sslG3zJbEYcaC4YVAvDorjGxc7tv6KVATnLPZONiljsUncvihe9BQoVCEs0RZ1kmf4Hk9OBqlZfJZWI4GanKA== +os-locale@^3.0.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/os-locale/-/os-locale-3.1.0.tgz#a802a6ee17f24c10483ab9935719cef4ed16bf1a" + integrity sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q== dependencies: - execa "^0.7.0" - lcid "^1.0.0" - mem "^1.1.0" + execa "^1.0.0" + lcid "^2.0.0" + mem "^4.0.0" os-tmpdir@^1.0.0, os-tmpdir@^1.0.1, os-tmpdir@~1.0.1, os-tmpdir@~1.0.2: version "1.0.2" @@ -7361,11 +7603,21 @@ osenv@0, osenv@^0.1.4, osenv@^0.1.5: os-homedir "^1.0.0" os-tmpdir "^1.0.0" +p-defer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/p-defer/-/p-defer-1.0.0.tgz#9f6eb182f6c9aa8cd743004a7d4f96b196b0fb0c" + integrity sha1-n26xgvbJqozXQwBKfU+WsZaw+ww= + p-finally@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/p-finally/-/p-finally-1.0.0.tgz#3fbcfb15b899a44123b34b6dcc18b724336a2cae" integrity sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4= +p-is-promise@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-is-promise/-/p-is-promise-2.1.0.tgz#918cebaea248a62cf7ffab8e3bca8c5f882fc42e" + integrity sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg== + p-limit@^1.0.0, p-limit@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/p-limit/-/p-limit-1.3.0.tgz#b86bd5f0c25690911c7590fcbfc2010d54b3ccb8" @@ -7394,10 +7646,17 @@ p-locate@^3.0.0: dependencies: p-limit "^2.0.0" -p-map@^1.1.1: - version "1.2.0" - resolved "https://registry.yarnpkg.com/p-map/-/p-map-1.2.0.tgz#e4e94f311eabbc8633a1e79908165fca26241b6b" - integrity sha512-r6zKACMNhjPJMTl8KcFH4li//gkrXWfbD6feV8l6doRHlzljFWGJ2AP6iKaCJXyZmAUMOPtvbW7EXkbWO/pLEA== +p-map@^2.0.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/p-map/-/p-map-2.1.0.tgz#310928feef9c9ecc65b68b17693018a665cea175" + integrity sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw== + +p-retry@^3.0.1: + version "3.0.1" + resolved "https://registry.yarnpkg.com/p-retry/-/p-retry-3.0.1.tgz#316b4c8893e2c8dc1cfa891f406c4b422bebf328" + integrity sha512-XE6G4+YTTkT2a0UWb2kjZe8xNwf8bIbnqpc/IS/idOBVhyves0mK5OJgeocjx7q5pvX/6m23xuzVPYT1uGM73w== + dependencies: + retry "^0.12.0" p-try@^1.0.0: version "1.0.0" @@ -7476,6 +7735,11 @@ parse-json@^4.0.0: error-ex "^1.3.1" json-parse-better-errors "^1.0.1" +parse-node-version@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/parse-node-version/-/parse-node-version-1.0.1.tgz#e2b5dbede00e7fa9bc363607f53327e8b073189b" + integrity sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA== + parse-passwd@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/parse-passwd/-/parse-passwd-1.0.0.tgz#6d5b934a456993b23d37f40a382d6f1666a8e5c6" @@ -7537,7 +7801,7 @@ path-is-absolute@^1.0.0: resolved "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f" integrity sha1-F0uSaHNVNP+8es5r9TpanhtcX18= -path-is-inside@^1.0.1: +path-is-inside@^1.0.1, path-is-inside@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/path-is-inside/-/path-is-inside-1.0.2.tgz#365417dede44430d1c11af61027facf074bdfc53" integrity sha1-NlQX3t5EQw0cEa9hAn+s8HS9/FM= @@ -7591,15 +7855,15 @@ pbkdf2@^3.0.3: safe-buffer "^5.0.1" sha.js "^2.4.8" -pem@1.12.3: - version "1.12.3" - resolved "https://registry.yarnpkg.com/pem/-/pem-1.12.3.tgz#b1fb5c8b79da8d18146c27fee79b0d4ddf9905b3" - integrity sha512-hT7GwvQL35+0iqgYUl8vn5I5pAVR0HcJas07TXL8bNaR4c5kAFRquk4ZqQk1F9YMcQOr6WjGdY5OnDC0RBnzig== +pem@1.13.2: + version "1.13.2" + resolved "https://registry.yarnpkg.com/pem/-/pem-1.13.2.tgz#7b68acbb590fdc13772bca487983cb84cd7b443e" + integrity sha512-MPJWuEb/r6AG+GpZi2JnfNtGAZDeL/8+ERKwXEWRuST5i+4lq/Uy36B352OWIUSPQGH+HR1HEDcIDi+8cKxXNg== dependencies: + es6-promisify "^6.0.0" md5 "^2.2.1" os-tmpdir "^1.0.1" - safe-buffer "^5.1.1" - which "^1.2.4" + which "^1.3.1" pend@~1.2.0: version "1.2.0" @@ -7669,6 +7933,13 @@ pkg-dir@^2.0.0: dependencies: find-up "^2.1.0" +pkg-dir@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-3.0.0.tgz#2749020f239ed990881b1f71210d51eb6523bea3" + integrity sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw== + dependencies: + find-up "^3.0.0" + pleeease-filters@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/pleeease-filters/-/pleeease-filters-4.0.0.tgz#6632b2fb05648d2758d865384fbced79e1ccaec7" @@ -7688,7 +7959,17 @@ plugin-error@^0.1.2: arr-union "^2.0.1" extend-shallow "^1.1.2" -portfinder@^1.0.13, portfinder@^1.0.9: +plugin-error@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/plugin-error/-/plugin-error-1.0.1.tgz#77016bd8919d0ac377fdcdd0322328953ca5781c" + integrity sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA== + dependencies: + ansi-colors "^1.0.1" + arr-diff "^4.0.0" + arr-union "^3.1.0" + extend-shallow "^3.0.2" + +portfinder@^1.0.13: version "1.0.17" resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.17.tgz#a8a1691143e46c4735edefcf4fbcccedad26456a" integrity sha512-syFcRIRzVI1BoEFOCaAiizwDolh1S1YXSodsVhncbhjzjZQulhczNRbqnUl9N31Q4dKGOXsNDqxC2BWBgSMqeQ== @@ -7697,6 +7978,15 @@ portfinder@^1.0.13, portfinder@^1.0.9: debug "^2.2.0" mkdirp "0.5.x" +portfinder@^1.0.20: + version "1.0.21" + resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.21.tgz#60e1397b95ac170749db70034ece306b9a27e324" + integrity sha512-ESabpDCzmBS3ekHbmpAIiESq3udRsCBGiBZLsC+HgBKv2ezb0R4oG+7RnYEVZ/ZCfhel5Tx3UzdNWA0Lox2QCA== + dependencies: + async "^1.5.2" + debug "^2.2.0" + mkdirp "0.5.x" + posix-character-classes@^0.1.0: version "0.1.1" resolved "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab" @@ -8480,12 +8770,11 @@ protractor-istanbul-plugin@2.0.0: q "^1.4.1" uuid "^2.0.1" -protractor@^5.3.0: - version "5.4.0" - resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.0.tgz#e71c9c1f5cf6c5e9bdbcdb71e7f31b17ffd2878f" - integrity sha512-6TSYqMhUUzxr4/wN0ttSISqPMKvcVRXF4k8jOEpGWD8OioLak4KLgfzHK9FJ49IrjzRrZ+Mx1q2Op8Rk0zEcnQ== +protractor@^5.4.2: + version "5.4.2" + resolved "https://registry.yarnpkg.com/protractor/-/protractor-5.4.2.tgz#329efe37f48b2141ab9467799be2d4d12eb48c13" + integrity sha512-zlIj64Cr6IOWP7RwxVeD8O4UskLYPoyIcg0HboWJL9T79F1F0VWtKkGTr/9GN6BKL+/Q/GmM7C9kFVCfDbP5sA== dependencies: - "@types/node" "^6.0.46" "@types/q" "^0.0.32" "@types/selenium-webdriver" "^3.0.0" blocking-proxy "^1.0.0" @@ -8499,7 +8788,7 @@ protractor@^5.3.0: saucelabs "^1.5.0" selenium-webdriver "3.6.0" source-map-support "~0.4.0" - webdriver-js-extender "2.0.0" + webdriver-js-extender "2.1.0" webdriver-manager "^12.0.6" proxy-addr@~2.0.2: @@ -8566,6 +8855,14 @@ pump@^2.0.0, pump@^2.0.1: end-of-stream "^1.1.0" once "^1.3.1" +pump@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64" + integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww== + dependencies: + end-of-stream "^1.1.0" + once "^1.3.1" + pumpify@^1.3.3: version "1.5.1" resolved "https://registry.yarnpkg.com/pumpify/-/pumpify-1.5.1.tgz#36513be246ab27570b1a374a5ce278bfd74370ce" @@ -8595,7 +8892,7 @@ q@1.4.1: resolved "https://registry.yarnpkg.com/q/-/q-1.4.1.tgz#55705bcd93c5f3673530c2c2cbc0c2b3addc286e" integrity sha1-VXBbzZPF82c1MMLCy8DCs63cKG4= -q@^1.1.2, q@^1.4.1: +q@^1.1.2, q@^1.4.1, q@^1.5.1: version "1.5.1" resolved "https://registry.yarnpkg.com/q/-/q-1.5.1.tgz#7e32f75b41381291d04611f1bf14109ac00651d7" integrity sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc= @@ -8610,7 +8907,7 @@ qs@6.5.1: resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.1.tgz#349cdf6eef89ec45c12d7d5eb3fc0c870343a6d8" integrity sha512-eRzhrN1WSINYCDCbrz796z37LOe3m5tmW7RQf6oBntukAG1nmovJvhnwHHRMAfeoItc1m2Hk02WER2aQ/iqs+A== -qs@6.5.2, qs@~6.5.1, qs@~6.5.2: +qs@6.5.2, qs@~6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/qs/-/qs-6.5.2.tgz#cb3ae806e8740444584ef154ce8ee98d403f3e36" integrity sha512-N5ZAX4/LxJmF+7wN74pUD6qAh9/wnvdQcjq9TZjevvXzSUo7bfmw91saqMjzGS2xq91/odN2dW/WOl7qQHNDGA== @@ -8674,7 +8971,7 @@ range-parser@^1.0.3, range-parser@^1.2.0, range-parser@~1.2.0: resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.0.tgz#f49be6b487894ddc40dcc94a322f611092e00d5e" integrity sha1-9JvmtIeJTdxA3MlKMi9hEJLgDV4= -range-parser@~1.2.1: +range-parser@^1.2.1, range-parser@~1.2.1: version "1.2.1" resolved "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031" integrity sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg== @@ -8757,7 +9054,7 @@ read-pkg@^3.0.0: normalize-package-data "^2.3.2" path-type "^3.0.0" -"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.2.9, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.5, readable-stream@^2.3.6, readable-stream@~2.3.6: +"readable-stream@1 || 2", readable-stream@^2.0.0, readable-stream@^2.0.1, readable-stream@^2.0.2, readable-stream@^2.0.4, readable-stream@^2.0.5, readable-stream@^2.0.6, readable-stream@^2.1.5, readable-stream@^2.2.2, readable-stream@^2.3.0, readable-stream@^2.3.3, readable-stream@^2.3.6, readable-stream@~2.3.6: version "2.3.6" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.6.tgz#b11c27d88b8ff1fbe070643cf94b0c79ae1b0aaf" integrity sha512-tQtKA9WIAhBF3+VLAseyMqZeBjW0AHJoxOtYqSUZNJxauErmLbVm2FW1y+J/YA9dUrAC39ITejlZWhVIwawkKw== @@ -8780,6 +9077,15 @@ readable-stream@1.0, readable-stream@~1.0.31: isarray "0.0.1" string_decoder "~0.10.x" +readable-stream@^3.0.1, readable-stream@^3.0.6, readable-stream@^3.1.1, readable-stream@^3.4.0: + version "3.4.0" + resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-3.4.0.tgz#a51c26754658e0a3c21dbf59163bd45ba6f447fc" + integrity sha512-jItXPLmrSR8jmTRmRWJXCnGJsfy85mB3Wd/uINMXA65yrnFo0cPClFIUWzo2najVNSl+mx7/4W8ttlLWJe99pQ== + dependencies: + inherits "^2.0.3" + string_decoder "^1.1.1" + util-deprecate "^1.0.1" + readable-stream@~1.1.9: version "1.1.14" resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-1.1.14.tgz#7cf4c54ef648e3813084c636dd2079e166c081d9" @@ -8812,6 +9118,15 @@ readdirp@^2.0.0: readable-stream "^2.0.2" set-immediate-shim "^1.0.1" +readdirp@^2.2.1: + version "2.2.1" + resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525" + integrity sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ== + dependencies: + graceful-fs "^4.1.11" + micromatch "^3.1.10" + readable-stream "^2.0.2" + rechoir@^0.6.2: version "0.6.2" resolved "https://registry.yarnpkg.com/rechoir/-/rechoir-0.6.2.tgz#85204b54dba82d5742e28c96756ef43af50e3384" @@ -9006,35 +9321,7 @@ request-progress@^2.0.1: dependencies: throttleit "^1.0.0" -request@2.85.0: - version "2.85.0" - resolved "http://registry.npmjs.org/request/-/request-2.85.0.tgz#5a03615a47c61420b3eb99b7dba204f83603e1fa" - integrity sha512-8H7Ehijd4js+s6wuVPLjwORxD4zeuyjYugprdOXlPSqaApmL/QOy+EB/beICHVCHkGMKNh5rvihb5ov+IDw4mg== - dependencies: - aws-sign2 "~0.7.0" - aws4 "^1.6.0" - caseless "~0.12.0" - combined-stream "~1.0.5" - extend "~3.0.1" - forever-agent "~0.6.1" - form-data "~2.3.1" - har-validator "~5.0.3" - hawk "~6.0.2" - http-signature "~1.2.0" - is-typedarray "~1.0.0" - isstream "~0.1.2" - json-stringify-safe "~5.0.1" - mime-types "~2.1.17" - oauth-sign "~0.8.2" - performance-now "^2.1.0" - qs "~6.5.1" - safe-buffer "^5.1.1" - stringstream "~0.0.5" - tough-cookie "~2.3.3" - tunnel-agent "^0.6.0" - uuid "^3.1.0" - -request@^2.74.0, request@^2.79.0, request@^2.81.0, request@^2.87.0, request@^2.88.0: +request@2.88.0, request@^2.74.0, request@^2.79.0, request@^2.81.0, request@^2.87.0, request@^2.88.0: version "2.88.0" resolved "https://registry.yarnpkg.com/request/-/request-2.88.0.tgz#9c2fca4f7d35b592efe57c7f0a55e81052124fef" integrity sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg== @@ -9075,6 +9362,11 @@ require-main-filename@^1.0.1: resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-1.0.1.tgz#97f717b69d48784f5f526a6c5aa8ffdda055a4d1" integrity sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE= +require-main-filename@^2.0.0: + version "2.0.0" + resolved "https://registry.yarnpkg.com/require-main-filename/-/require-main-filename-2.0.0.tgz#d0b329ecc7cc0f61649f62215be69af54aa8989b" + integrity sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg== + requires-port@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/requires-port/-/requires-port-1.0.0.tgz#925d2601d39ac485e091cf0da5c6e694dc3dcaff" @@ -9142,6 +9434,11 @@ retry@^0.10.0: resolved "https://registry.yarnpkg.com/retry/-/retry-0.10.1.tgz#e76388d217992c252750241d3d3956fed98d8ff4" integrity sha1-52OI0heZLCUnUCQdPTlW/tmNj/Q= +retry@^0.12.0: + version "0.12.0" + resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" + integrity sha1-G0KmJmoh8HQh0bC1S33BZ7AcATs= + rework-visit@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/rework-visit/-/rework-visit-1.0.0.tgz#9945b2803f219e2f7aca00adb8bc9f640f842c9a" @@ -9180,13 +9477,6 @@ rgba-regex@^1.0.0: resolved "https://registry.yarnpkg.com/rgba-regex/-/rgba-regex-1.0.0.tgz#43374e2e2ca0968b0ef1523460b7d730ff22eeb3" integrity sha1-QzdOLiyglosO8VI0YLfXMP8i7rM= -right-align@^0.1.1: - version "0.1.3" - resolved "https://registry.yarnpkg.com/right-align/-/right-align-0.1.3.tgz#61339b722fe6a3515689210d24e14c96148613ef" - integrity sha1-YTObci/mo1FWiSENJOFMlhSGE+8= - dependencies: - align-text "^0.1.1" - rimraf@2, rimraf@2.6.2, rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6.0, rimraf@^2.6.1, rimraf@^2.6.2: version "2.6.2" resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.2.tgz#2ed8150d24a16ea8651e6d6ef0f47c4158ce7a36" @@ -9194,6 +9484,13 @@ rimraf@2, rimraf@2.6.2, rimraf@^2.2.8, rimraf@^2.5.2, rimraf@^2.5.4, rimraf@^2.6 dependencies: glob "^7.0.5" +rimraf@^2.6.3: + version "2.6.3" + resolved "https://registry.yarnpkg.com/rimraf/-/rimraf-2.6.3.tgz#b2d104fe0d8fb27cf9e0a1cda8262dd3833c6cab" + integrity sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA== + dependencies: + glob "^7.1.3" + ripemd160@^2.0.0, ripemd160@^2.0.1: version "2.0.2" resolved "https://registry.yarnpkg.com/ripemd160/-/ripemd160-2.0.2.tgz#a1c1a6f624751577ba5d07914cbc92850585890c" @@ -9414,10 +9711,10 @@ selenium-webdriver@3.6.0, selenium-webdriver@^3.0.1: tmp "0.0.30" xml2js "^0.4.17" -selfsigned@^1.9.1: - version "1.10.3" - resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.3.tgz#d628ecf9e3735f84e8bafba936b3cf85bea43823" - integrity sha512-vmZenZ+8Al3NLHkWnhBQ0x6BkML1eCP2xEi3JE+f3D9wW9fipD9NNJHYtE9XJM4TsPaHGZJIamrSI6MTg1dU2Q== +selfsigned@^1.10.4: + version "1.10.4" + resolved "https://registry.yarnpkg.com/selfsigned/-/selfsigned-1.10.4.tgz#cdd7eccfca4ed7635d47a08bf2d5d3074092e2cd" + integrity sha512-9AukTiDmHXGXWtWjembZ5NDmVvP2695EtpgbCsxCa68w3c88B+alqbmZ4O3hZ4VWGXeGWzEVdvqgAJD8DQPCDw== dependencies: node-forge "0.7.5" @@ -9452,6 +9749,11 @@ semver@^5.0.1: resolved "https://registry.yarnpkg.com/semver/-/semver-5.6.0.tgz#7e74256fbaa49c75aa7c7a205cc22799cac80004" integrity sha512-RS9R6R35NYgQn++fkDWaOmqGoj4Ek9gGs+DPxNUZKuwE183xjJroKvyo1IzVFeXvUrvmALy6FWD5xrdJT25gMg== +semver@^6.1.1: + version "6.3.0" + resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d" + integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw== + semver@~5.3.0: version "5.3.0" resolved "https://registry.yarnpkg.com/semver/-/semver-5.3.0.tgz#9b2ce5d3de02d17c6012ad326aa6b4d0cf54f94f" @@ -9500,7 +9802,7 @@ serialize-javascript@^1.4.0: resolved "https://registry.yarnpkg.com/serialize-javascript/-/serialize-javascript-1.5.0.tgz#1aa336162c88a890ddad5384baebc93a655161fe" integrity sha512-Ga8c8NjAAp46Br4+0oZ2WxJCwIzwP60Gq1YPgU+39PiTVxyed/iKE/zyZI6+UlVYH5Q4PaQdHhcegIFPZTUfoQ== -serve-index@^1.7.2: +serve-index@^1.9.1: version "1.9.1" resolved "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239" integrity sha1-03aNabHn2C5c4FD/9bRTvqEqkjk= @@ -9683,13 +9985,6 @@ snapdragon@^0.8.1: source-map-resolve "^0.5.0" use "^3.1.0" -sntp@2.x.x: - version "2.1.0" - resolved "https://registry.yarnpkg.com/sntp/-/sntp-2.1.0.tgz#2c6cec14fedc2222739caf9b5c3d85d1cc5a2cc8" - integrity sha512-FL1b58BDrqS3A11lJ0zEdnJ3UOKqVxawAkF3k7F0CVN7VQ34aZrV+G8BZ1WC9ZL7NyrwsW0oviwsWDgRuVYtJg== - dependencies: - hoek "4.x.x" - socket.io-adapter@~1.1.0: version "1.1.1" resolved "https://registry.yarnpkg.com/socket.io-adapter/-/socket.io-adapter-1.1.1.tgz#2a805e8a14d6372124dd9159ad4502f8cb07f06b" @@ -9736,17 +10031,17 @@ socket.io@2.1.1: socket.io-client "2.1.1" socket.io-parser "~3.2.0" -sockjs-client@1.1.5: - version "1.1.5" - resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.1.5.tgz#1bb7c0f7222c40f42adf14f4442cbd1269771a83" - integrity sha1-G7fA9yIsQPQq3xT0RCy9Eml3GoM= +sockjs-client@1.3.0: + version "1.3.0" + resolved "https://registry.yarnpkg.com/sockjs-client/-/sockjs-client-1.3.0.tgz#12fc9d6cb663da5739d3dc5fb6e8687da95cb177" + integrity sha512-R9jxEzhnnrdxLCNln0xg5uGHqMnkhPSTzUZH2eXcR03S/On9Yvoq2wyUZILRUhZCNVu2PmwWVoyuiPz8th8zbg== dependencies: - debug "^2.6.6" - eventsource "0.1.6" - faye-websocket "~0.11.0" - inherits "^2.0.1" + debug "^3.2.5" + eventsource "^1.0.7" + faye-websocket "~0.11.1" + inherits "^2.0.3" json3 "^3.3.2" - url-parse "^1.1.8" + url-parse "^1.4.3" sockjs@0.3.19: version "0.3.19" @@ -9827,14 +10122,14 @@ source-map@^0.1.38: dependencies: amdefine ">=0.0.4" -source-map@^0.4.2, source-map@^0.4.4: +source-map@^0.4.2: version "0.4.4" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.4.4.tgz#eba4f5da9c0dc999de68032d8b4f76173652036b" integrity sha1-66T12pwNyZneaAMti092FzZSA2s= dependencies: amdefine ">=0.0.4" -source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1: +source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -9882,30 +10177,28 @@ spdx-license-ids@^3.0.0: resolved "https://registry.yarnpkg.com/spdx-license-ids/-/spdx-license-ids-3.0.0.tgz#7a7cd28470cc6d3a1cfe6d66886f6bc430d3ac87" integrity sha512-2+EPwgbnmOIl8HjGBXXMd9NAu02vLjOO1nWw4kmeRDFyHn+M/ETfHxQUK0oXg8ctgVnl9t3rosNVsZ1jG61nDA== -spdy-transport@^2.0.18: - version "2.1.0" - resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-2.1.0.tgz#4bbb15aaffed0beefdd56ad61dbdc8ba3e2cb7a1" - integrity sha512-bpUeGpZcmZ692rrTiqf9/2EUakI6/kXX1Rpe0ib/DyOzbiexVfXkw6GnvI9hVGvIwVaUhkaBojjCZwLNRGQg1g== +spdy-transport@^3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/spdy-transport/-/spdy-transport-3.0.0.tgz#00d4863a6400ad75df93361a1608605e5dcdcf31" + integrity sha512-hsLVFE5SjA6TCisWeJXFKniGGOpBgMLmerfO2aCyCU5s7nJ/rpAepqmFifv/GCbSbueEeAJJnmSQ2rKC/g8Fcw== dependencies: - debug "^2.6.8" - detect-node "^2.0.3" + debug "^4.1.0" + detect-node "^2.0.4" hpack.js "^2.1.6" - obuf "^1.1.1" - readable-stream "^2.2.9" - safe-buffer "^5.0.1" - wbuf "^1.7.2" + obuf "^1.1.2" + readable-stream "^3.0.6" + wbuf "^1.7.3" -spdy@^3.4.1: - version "3.4.7" - resolved "https://registry.yarnpkg.com/spdy/-/spdy-3.4.7.tgz#42ff41ece5cc0f99a3a6c28aabb73f5c3b03acbc" - integrity sha1-Qv9B7OXMD5mjpsKKq7c/XDsDrLw= +spdy@^4.0.0: + version "4.0.1" + resolved "https://registry.yarnpkg.com/spdy/-/spdy-4.0.1.tgz#6f12ed1c5db7ea4f24ebb8b89ba58c87c08257f2" + integrity sha512-HeZS3PBdMA+sZSu0qwpCxl3DeALD5ASx8pAX0jZdKXSpPWbQ6SYGnlg3BBmYLx5LtiZrmkAZfErCm2oECBcioA== dependencies: - debug "^2.6.8" - handle-thing "^1.2.5" + debug "^4.1.0" + handle-thing "^2.0.0" http-deceiver "^1.2.7" - safe-buffer "^5.0.1" select-hose "^2.0.0" - spdy-transport "^2.0.18" + spdy-transport "^3.0.0" split-string@^3.0.1, split-string@^3.0.2: version "3.1.0" @@ -10071,6 +10364,15 @@ string-width@^1.0.1, string-width@^1.0.2: is-fullwidth-code-point "^2.0.0" strip-ansi "^4.0.0" +string-width@^3.0.0, string-width@^3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961" + integrity sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w== + dependencies: + emoji-regex "^7.0.1" + is-fullwidth-code-point "^2.0.0" + strip-ansi "^5.1.0" + string.prototype.padend@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/string.prototype.padend/-/string.prototype.padend-3.0.0.tgz#f3aaef7c1719f170c5eab1c32bf780d96e21f2f0" @@ -10087,16 +10389,18 @@ string_decoder@^1.0.0, string_decoder@~1.1.1: dependencies: safe-buffer "~5.1.0" +string_decoder@^1.1.1: + version "1.2.0" + resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.2.0.tgz#fe86e738b19544afe70469243b2a1ee9240eae8d" + integrity sha512-6YqyX6ZWEYguAxgZzHGL7SsCeGx3V2TtOTqZz1xSTSWnqsbWwbptafNyvf/ACquZUXV3DANr5BDIwNYe1mN42w== + dependencies: + safe-buffer "~5.1.0" + string_decoder@~0.10.x: version "0.10.31" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-0.10.31.tgz#62e203bc41766c6c28c9fc84301dab1c5310fa94" integrity sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ= -stringstream@~0.0.5: - version "0.0.6" - resolved "https://registry.yarnpkg.com/stringstream/-/stringstream-0.0.6.tgz#7880225b0d4ad10e30927d167a1d6f2fd3b33a72" - integrity sha512-87GEBAkegbBcweToUrdzf3eLhWNg06FJTebl4BVJz/JgWy8CvEr9dRtX5qWphiynMSQlxxi+QqN0z5T32SLlhA== - strip-ansi@^3.0.0, strip-ansi@^3.0.1: version "3.0.1" resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-3.0.1.tgz#6a385fb8853d952d5ff05d0e8aaf94278dc63dcf" @@ -10111,6 +10415,13 @@ strip-ansi@^4.0.0: dependencies: ansi-regex "^3.0.0" +strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0: + version "5.2.0" + resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-5.2.0.tgz#8c9a536feb6afc962bdfa5b104a5091c1ad9c0ae" + integrity sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA== + dependencies: + ansi-regex "^4.1.0" + strip-bom@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/strip-bom/-/strip-bom-2.0.0.tgz#6219a85616520491f35788bdbf1447a99c7e6b0e" @@ -10156,6 +10467,13 @@ sugarss@^1.0.1: dependencies: postcss "^6.0.14" +supports-color@5.4.0: + version "5.4.0" + resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.4.0.tgz#1c6b337402c2137605efe19f10fec390f6faab54" + integrity sha512-zjaXglF5nnWpsq470jSv6P9DwPvgLkuapYmfDm3JWOm0vkNTVF2tI4UrN2r6jH1qM/uc/WtxYY1hYoA2dOKj5w== + dependencies: + has-flag "^3.0.0" + supports-color@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-2.0.0.tgz#535d045ce6b6363fa40117084629995e9df324c7" @@ -10168,7 +10486,7 @@ supports-color@^3.1.0: dependencies: has-flag "^1.0.0" -supports-color@^5.1.0, supports-color@^5.2.0, supports-color@^5.3.0, supports-color@^5.4.0: +supports-color@^5.2.0, supports-color@^5.3.0, supports-color@^5.4.0: version "5.5.0" resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f" integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow== @@ -10212,18 +10530,16 @@ tapable@^1.0.0: resolved "https://registry.yarnpkg.com/tapable/-/tapable-1.0.0.tgz#cbb639d9002eed9c6b5975eb20598d7936f1f9f2" integrity sha512-dQRhbNQkRnaqauC7WqSJ21EEksgT0fYZX2lqXzGkpo8JNig9zGZTYoMGvyI2nWmXlE2VSVXVDu7wLVGu/mQEsg== -tar-stream@^1.5.0: - version "1.6.1" - resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-1.6.1.tgz#f84ef1696269d6223ca48f6e1eeede3f7e81f395" - integrity sha512-IFLM5wp3QrJODQFPm6/to3LJZrONdBY/otxcvDIQzu217zKye6yVR3hhi9lAjrC2Z+m/j5oDxMPb1qcd8cIvpA== +tar-stream@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/tar-stream/-/tar-stream-2.1.0.tgz#d1aaa3661f05b38b5acc9b7020efdca5179a2cc3" + integrity sha512-+DAn4Nb4+gz6WZigRzKEZl1QuJVOLtAwwF+WUxy1fJ6X63CaGaUAxJRD2KEn1OMfcbCjySTYpNC6WmfQoIEOdw== dependencies: - bl "^1.0.0" - buffer-alloc "^1.1.0" - end-of-stream "^1.0.0" + bl "^3.0.0" + end-of-stream "^1.4.1" fs-constants "^1.0.0" - readable-stream "^2.3.0" - to-buffer "^1.1.0" - xtend "^4.0.0" + inherits "^2.0.3" + readable-stream "^3.1.1" tar@^2.0.0: version "2.2.1" @@ -10294,7 +10610,7 @@ through2@^2.0.0: readable-stream "^2.1.5" xtend "~4.0.1" -through2@^2.0.1: +through2@^2.0.1, 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== @@ -10358,11 +10674,6 @@ to-arraybuffer@^1.0.0: resolved "https://registry.yarnpkg.com/to-arraybuffer/-/to-arraybuffer-1.0.1.tgz#7d229b1fcc637e466ca081180836a7aabff83f43" integrity sha1-fSKbH8xjfkZsoIEYCDanqr/4P0M= -to-buffer@^1.1.0: - version "1.1.1" - resolved "https://registry.yarnpkg.com/to-buffer/-/to-buffer-1.1.1.tgz#493bd48f62d7c43fcded313a03dcadb2e1213a80" - integrity sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg== - to-fast-properties@^1.0.3: version "1.0.3" resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-1.0.3.tgz#b83571fa4d8c25b82e231b06e3a3055de4ca1a47" @@ -10412,13 +10723,6 @@ touch@^3.1.0: dependencies: nopt "~1.0.10" -tough-cookie@~2.3.3: - version "2.3.4" - resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.3.4.tgz#ec60cee38ac675063ffc97a5c18970578ee83655" - integrity sha512-TZ6TTfI5NtZnuyy/Kecv+CnoROnyXn2DN97LontgQpCwsX2XyLYCC0ENhYkehSOwAp8rTQKc/NUIF7BkQ5rKLA== - dependencies: - punycode "^1.4.1" - tough-cookie@~2.4.3: version "2.4.3" resolved "https://registry.yarnpkg.com/tough-cookie/-/tough-cookie-2.4.3.tgz#53f36da3f47783b0925afa06ff9f3b165280f781" @@ -10641,20 +10945,13 @@ uglify-js@3.4.x: commander "~2.17.1" source-map "~0.6.1" -uglify-js@^2.6: - version "2.8.29" - resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-2.8.29.tgz#29c5733148057bb4e1f75df35b7a9cb72e6a59dd" - integrity sha1-KcVzMUgFe7Th913zW3qcty5qWd0= +uglify-js@^3.1.4: + version "3.6.0" + resolved "https://registry.yarnpkg.com/uglify-js/-/uglify-js-3.6.0.tgz#704681345c53a8b2079fb6cec294b05ead242ff5" + integrity sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg== dependencies: - source-map "~0.5.1" - yargs "~3.10.0" - optionalDependencies: - uglify-to-browserify "~1.0.0" - -uglify-to-browserify@~1.0.0: - version "1.0.2" - resolved "https://registry.yarnpkg.com/uglify-to-browserify/-/uglify-to-browserify-1.0.2.tgz#6e0924d6bda6b5afe349e39a6d632850a0f882b7" - integrity sha1-bgkk1r2mta/jSeOabWMoUKD4grc= + commander "~2.20.0" + source-map "~0.6.1" uglifyjs-webpack-plugin@^1.2.4: version "1.3.0" @@ -10778,6 +11075,11 @@ upath@^1.0.5: resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.0.tgz#35256597e46a581db4793d0ce47fa9aebfc9fabd" integrity sha512-bzpH/oBhoS/QI/YtbkqCg6VEiPYjSZtrHQM6/QnJS6OL9pKUFLqb3aFh4Scvwm45+7iAgiMkLhSbaZxUqmrprw== +upath@^1.1.1: + version "1.1.2" + resolved "https://registry.yarnpkg.com/upath/-/upath-1.1.2.tgz#3db658600edaeeccbe6db5e684d67ee8c2acd068" + integrity sha512-kXpym8nmDmlCBr7nKdIx8P2jNBa+pBpIUFRnKJ4dr8htyYGJFokkr2ZvERRtUN+9SY+JqXouNgUPtv6JQva/2Q== + update-notifier@^2.3.0: version "2.5.0" resolved "https://registry.yarnpkg.com/update-notifier/-/update-notifier-2.5.0.tgz#d0744593e13f161e406acb1d9408b72cad08aff6" @@ -10835,7 +11137,7 @@ url-parse-lax@^1.0.0: dependencies: prepend-http "^1.0.1" -url-parse@^1.1.8, url-parse@^1.4.3: +url-parse@^1.4.3: version "1.4.3" resolved "https://registry.yarnpkg.com/url-parse/-/url-parse-1.4.3.tgz#bfaee455c889023219d757e045fa6a684ec36c15" integrity sha512-rh+KuAW36YKo0vClhQzLLveoj8FwPJNu65xLb7Mrt+eZht0IPT0IXgSv8gcMegZ6NvjJUALf6Mf25POlMwD1Fw== @@ -10864,7 +11166,7 @@ useragent@2.2.1: lru-cache "2.2.x" tmp "0.0.x" -util-deprecate@~1.0.1: +util-deprecate@^1.0.1, util-deprecate@~1.0.1: version "1.0.2" resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf" integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8= @@ -10943,7 +11245,7 @@ validate-npm-package-name@^3.0.0: dependencies: builtins "^1.0.3" -vargs@0.1.0: +vargs@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/vargs/-/vargs-0.1.0.tgz#6b6184da6520cc3204ce1b407cac26d92609ebff" integrity sha1-a2GE2mUgzDIEzhtAfKwm2SYJ6/8= @@ -11007,30 +11309,32 @@ watchpack@^1.5.0: graceful-fs "^4.1.2" neo-async "^2.5.0" -wbuf@^1.1.0, wbuf@^1.7.2: +wbuf@^1.1.0, wbuf@^1.7.3: version "1.7.3" resolved "https://registry.yarnpkg.com/wbuf/-/wbuf-1.7.3.tgz#c1d8d149316d3ea852848895cb6a0bfe887b87df" integrity sha512-O84QOnr0icsbFGLS0O3bI5FswxzRr8/gHwWkDlQFskhSPryQXvrTMxjxGP4+iWYoauLoBvfDpkrOauZ+0iZpDA== dependencies: minimalistic-assert "^1.0.0" -wd@^1.0.0: - version "1.10.3" - resolved "https://registry.yarnpkg.com/wd/-/wd-1.10.3.tgz#395ac7eb58a98e556369f8f8e5f845d91fb152a3" - integrity sha512-ffqqZDtFFLeg5u/4pw2vYKECW+z+vW6vc+7rcqF15uu1/rmw3BydV84BONNc9DIcQ5Z7gQFS/hAuMvj53eVtSg== +wd@^1.11.0: + version "1.11.3" + resolved "https://registry.yarnpkg.com/wd/-/wd-1.11.3.tgz#db228863e15648e0c1466df45b263fc30470dbc4" + integrity sha512-doB7E6DDhis6sSCfWps9Uz0UBBPAySv1x96KH6klfHp8y89HvhqEq3c0O8LPZhG37egJULN0m7+M9t16xUTG0g== dependencies: - archiver "2.1.1" - async "2.0.1" - lodash "4.17.10" + archiver "^3.0.0" + async "^2.0.0" + fancy-log "^1.3.3" + gulp-mocha "^6.0.0" + lodash "^4.0.0" mkdirp "^0.5.1" - q "1.4.1" - request "2.85.0" - vargs "0.1.0" + q "^1.5.1" + request "2.88.0" + vargs "^0.1.0" -webdriver-js-extender@2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-2.0.0.tgz#b27fc1ed1afbf78f0ac57e4c878f31b10e57f146" - integrity sha512-fbyKiVu3azzIc5d4+26YfuPQcFTlgFQV5yQ/0OQj4Ybkl4g1YQuIPskf5v5wqwRJhHJnPHthB6tqCjWHOKLWag== +webdriver-js-extender@2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/webdriver-js-extender/-/webdriver-js-extender-2.1.0.tgz#57d7a93c00db4cc8d556e4d3db4b5db0a80c3bb7" + integrity sha512-lcUKrjbBfCK6MNsh7xaY2UAUmZwe+/ib03AjVOpFobX4O7+83BUveSrLfU0Qsyb1DaKJdQRbuU+kM9aZ6QUhiQ== dependencies: "@types/selenium-webdriver" "^3.0.0" selenium-webdriver "^3.0.1" @@ -11052,6 +11356,23 @@ webdriver-manager@^12.0.6: semver "^5.3.0" xml2js "^0.4.17" +webdriver-manager@^12.1.6: + version "12.1.6" + resolved "https://registry.yarnpkg.com/webdriver-manager/-/webdriver-manager-12.1.6.tgz#9e5410c506d1a7e0a7aa6af91ba3d5bb37f362b6" + integrity sha512-B1mOycNCrbk7xODw7Jgq/mdD3qzPxMaTsnKIQDy2nXlQoyjTrJTTD0vRpEZI9b8RibPEyQvh9zIZ0M1mpOxS3w== + dependencies: + adm-zip "^0.4.9" + chalk "^1.1.1" + del "^2.2.0" + glob "^7.0.3" + ini "^1.3.4" + minimist "^1.2.0" + q "^1.4.1" + request "^2.87.0" + rimraf "^2.5.2" + semver "^5.3.0" + xml2js "^0.4.17" + webfontloader@1.6.28: version "1.6.28" resolved "https://registry.yarnpkg.com/webfontloader/-/webfontloader-1.6.28.tgz#db786129253cb6e8eae54c2fb05f870af6675bae" @@ -11119,39 +11440,52 @@ webpack-dev-middleware@^2.0.6: url-join "^2.0.2" webpack-log "^1.0.1" -webpack-dev-server@^3.1.5: - version "3.1.7" - resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.1.7.tgz#cbf8071cc092d9493732aee4f062f0e065994854" - integrity sha512-KagFrNHf3QKndS61cXqzkQ4gpdXo0d1LZTTplAJzNK1Ev2ZyJiu+BzerW/2dixYYfpnGzp0AcvCXpmYXIOkFOA== +webpack-dev-middleware@^3.7.0: + version "3.7.0" + resolved "https://registry.yarnpkg.com/webpack-dev-middleware/-/webpack-dev-middleware-3.7.0.tgz#ef751d25f4e9a5c8a35da600c5fda3582b5c6cff" + integrity sha512-qvDesR1QZRIAZHOE3iQ4CXLZZSQ1lAUsSpnQmlB1PBfoN/xdRjmge3Dok0W4IdaVLJOGJy3sGI4sZHwjRU0PCA== + dependencies: + memory-fs "^0.4.1" + mime "^2.4.2" + range-parser "^1.2.1" + webpack-log "^2.0.0" + +webpack-dev-server@^3.1.11: + version "3.7.2" + resolved "https://registry.yarnpkg.com/webpack-dev-server/-/webpack-dev-server-3.7.2.tgz#f79caa5974b7f8b63268ef5421222a8486d792f5" + integrity sha512-mjWtrKJW2T9SsjJ4/dxDC2fkFVUw8jlpemDERqV0ZJIkjjjamR2AbQlr3oz+j4JLhYCHImHnXZK5H06P2wvUew== dependencies: ansi-html "0.0.7" bonjour "^3.5.0" - chokidar "^2.0.0" - compression "^1.5.2" - connect-history-api-fallback "^1.3.0" - debug "^3.1.0" - del "^3.0.0" - express "^4.16.2" - html-entities "^1.2.0" - http-proxy-middleware "~0.18.0" - import-local "^1.0.0" - internal-ip "^3.0.1" + chokidar "^2.1.6" + compression "^1.7.4" + connect-history-api-fallback "^1.6.0" + debug "^4.1.1" + del "^4.1.1" + express "^4.17.1" + html-entities "^1.2.1" + http-proxy-middleware "^0.19.1" + import-local "^2.0.0" + internal-ip "^4.3.0" ip "^1.1.5" - killable "^1.0.0" - loglevel "^1.4.1" - opn "^5.1.0" - portfinder "^1.0.9" + killable "^1.0.1" + loglevel "^1.6.3" + opn "^5.5.0" + p-retry "^3.0.1" + portfinder "^1.0.20" schema-utils "^1.0.0" - selfsigned "^1.9.1" - serve-index "^1.7.2" + selfsigned "^1.10.4" + semver "^6.1.1" + serve-index "^1.9.1" sockjs "0.3.19" - sockjs-client "1.1.5" - spdy "^3.4.1" - strip-ansi "^3.0.0" - supports-color "^5.1.0" - webpack-dev-middleware "3.2.0" + sockjs-client "1.3.0" + spdy "^4.0.0" + strip-ansi "^3.0.1" + supports-color "^6.1.0" + url "^0.11.0" + webpack-dev-middleware "^3.7.0" webpack-log "^2.0.0" - yargs "12.0.1" + yargs "12.0.5" webpack-import-glob-loader@^1.6.3: version "1.6.3" @@ -11251,7 +11585,7 @@ which-module@^2.0.0: resolved "https://registry.yarnpkg.com/which-module/-/which-module-2.0.0.tgz#d9ef07dce77b9902b8a3a8fa4b31c3e3f7e6e87a" integrity sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho= -which@1, which@^1.1.1, which@^1.2.1, which@^1.2.10, which@^1.2.4, which@^1.2.9: +which@1, which@^1.1.1, which@^1.2.1, which@^1.2.10, which@^1.2.9, which@^1.3.1: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ== @@ -11272,16 +11606,6 @@ widest-line@^2.0.0: dependencies: string-width "^2.1.1" -window-size@0.1.0: - version "0.1.0" - resolved "https://registry.yarnpkg.com/window-size/-/window-size-0.1.0.tgz#5438cd2ea93b202efa3a19fe8887aee7c94f9c9d" - integrity sha1-VDjNLqk7IC76Ohn+iIeu58lPnJ0= - -wordwrap@0.0.2: - version "0.0.2" - resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-0.0.2.tgz#b79669bb42ecb409f83d583cad52ca17eaa1643f" - integrity sha1-t5Zpu0LstAn4PVg8rVLKF+qhZD8= - wordwrap@^1.0.0, wordwrap@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/wordwrap/-/wordwrap-1.0.0.tgz#27584810891456a4171c8d0226441ade90cbcaeb" @@ -11307,6 +11631,15 @@ wrap-ansi@^2.0.0: string-width "^1.0.1" strip-ansi "^3.0.1" +wrap-ansi@^5.1.0: + version "5.1.0" + resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-5.1.0.tgz#1fd1f67235d5b6d0fee781056001bfb694c03b09" + integrity sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q== + dependencies: + ansi-styles "^3.2.0" + string-width "^3.0.0" + strip-ansi "^5.0.0" + wrappy@1: version "1.0.2" resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f" @@ -11365,11 +11698,6 @@ xmlhttprequest-ssl@~1.5.4: resolved "https://registry.yarnpkg.com/xmlhttprequest-ssl/-/xmlhttprequest-ssl-1.5.5.tgz#c2876b06168aadc40e57d97e81191ac8f4398b3e" integrity sha1-wodrBhaKrcQOV9l+gRkayPQ5iz4= -xregexp@4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/xregexp/-/xregexp-4.0.0.tgz#e698189de49dd2a18cc5687b05e17c8e43943020" - integrity sha512-PHyM+sQouu7xspQQwELlGwwd05mXUFqwFYfqPO0cC7x4fxyHnnuetmQr6CjJiafIDoH4MogHb9dOoJzR/Y4rFg== - xtend@^4.0.0, xtend@~4.0.0, xtend@~4.0.1: version "4.0.1" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.1.tgz#a5c6d532be656e23db820efb943a1f04998d63af" @@ -11395,13 +11723,29 @@ yallist@^3.0.0, yallist@^3.0.2: resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.0.2.tgz#8452b4bb7e83c7c188d8041c1a837c773d6d8bb9" integrity sha1-hFK0u36Dx8GI2AQcGoN8dz1ti7k= -yargs-parser@^10.0.0, yargs-parser@^10.1.0: +yargs-parser@^10.0.0: version "10.1.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-10.1.0.tgz#7202265b89f7e9e9f2e5765e0fe735a905edbaa8" integrity sha512-VCIyR1wJoEBZUqk5PA+oOBF6ypbwh5aNB3I50guxAL/quggdfs4TtNHQrSazFA3fYZ+tEqfs0zIGlv0c/rgjbQ== dependencies: camelcase "^4.1.0" +yargs-parser@^11.1.1: + version "11.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-11.1.1.tgz#879a0865973bca9f6bab5cbdf3b1c67ec7d3bcf4" + integrity sha512-C6kB/WJDiaxONLJQnF8ccx9SEeoTTLek8RVbaOIsrAUS8VrBEXfmeSnCZxygc+XC2sNMBIwOOnfcxiynjHsVSQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + +yargs-parser@^13.1.1: + version "13.1.1" + resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-13.1.1.tgz#d26058532aa06d365fe091f6a1fc06b2f7e5eca0" + integrity sha512-oVAVsHz6uFrg3XQheFII8ESO2ssAf9luWuAd6Wexsu4F3OtIW0o8IribPXYrD4WC24LWtPrJlGy87y5udK+dxQ== + dependencies: + camelcase "^5.0.0" + decamelize "^1.2.0" + yargs-parser@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-5.0.0.tgz#275ecf0d7ffe05c77e64e7c86e4cd94bf0e1228a" @@ -11409,48 +11753,39 @@ yargs-parser@^5.0.0: dependencies: camelcase "^3.0.0" -yargs-parser@^9.0.2: - version "9.0.2" - resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-9.0.2.tgz#9ccf6a43460fe4ed40a9bb68f48d43b8a68cc077" - integrity sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc= - dependencies: - camelcase "^4.1.0" - -yargs@12.0.1, yargs@^12.0.1: - version "12.0.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.1.tgz#6432e56123bb4e7c3562115401e98374060261c2" - integrity sha512-B0vRAp1hRX4jgIOWFtjfNjd9OA9RWYZ6tqGA9/I/IrTMsxmKvtWy+ersM+jzpQqbC3YfLzeABPdeTgcJ9eu1qQ== +yargs@12.0.5, yargs@^12.0.1: + version "12.0.5" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-12.0.5.tgz#05f5997b609647b64f66b81e3b4b10a368e7ad13" + integrity sha512-Lhz8TLaYnxq/2ObqHDql8dX8CJi97oHxrjUcYtzKbbykPtVW9WB+poxI+NM2UIzsMgNCZTIf0AQwsjK5yMAqZw== dependencies: cliui "^4.0.0" - decamelize "^2.0.0" + decamelize "^1.2.0" find-up "^3.0.0" get-caller-file "^1.0.1" - os-locale "^2.0.0" + os-locale "^3.0.0" require-directory "^2.1.1" require-main-filename "^1.0.1" set-blocking "^2.0.0" string-width "^2.0.0" which-module "^2.0.0" y18n "^3.2.1 || ^4.0.0" - yargs-parser "^10.1.0" + yargs-parser "^11.1.1" -yargs@^11.0.0: - version "11.1.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-11.1.0.tgz#90b869934ed6e871115ea2ff58b03f4724ed2d77" - integrity sha512-NwW69J42EsCSanF8kyn5upxvjp5ds+t3+udGBeTbFnERA+lF541DDpMawzo4z6W/QrzNM18D+BPMiOBibnFV5A== +yargs@^13.2.4: + version "13.3.0" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-13.3.0.tgz#4c657a55e07e5f2cf947f8a366567c04a0dedc83" + integrity sha512-2eehun/8ALW8TLoIl7MVaRUrg+yCnenu8B4kBlRxj3GJGDKU1Og7sMXPNm1BYyM1DOJmTZ4YeN/Nwxv+8XJsUA== dependencies: - cliui "^4.0.0" - decamelize "^1.1.1" - find-up "^2.1.0" - get-caller-file "^1.0.1" - os-locale "^2.0.0" + cliui "^5.0.0" + find-up "^3.0.0" + get-caller-file "^2.0.1" require-directory "^2.1.1" - require-main-filename "^1.0.1" + require-main-filename "^2.0.0" set-blocking "^2.0.0" - string-width "^2.0.0" + string-width "^3.0.0" which-module "^2.0.0" - y18n "^3.2.1" - yargs-parser "^9.0.2" + y18n "^4.0.0" + yargs-parser "^13.1.1" yargs@^7.0.0: version "7.1.0" @@ -11471,16 +11806,6 @@ yargs@^7.0.0: y18n "^3.2.1" yargs-parser "^5.0.0" -yargs@~3.10.0: - version "3.10.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-3.10.0.tgz#f7ee7bd857dd7c1d2d38c0e74efbd681d1431fd1" - integrity sha1-9+572FfdfB0tOMDnTvvWgdFDH9E= - dependencies: - camelcase "^1.0.2" - cliui "^2.1.0" - decamelize "^1.0.0" - window-size "0.1.0" - yauzl@2.4.1: version "2.4.1" resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.4.1.tgz#9528f442dab1b2284e58b4379bb194e22e0c4005" @@ -11498,15 +11823,14 @@ yn@^2.0.0: resolved "https://registry.yarnpkg.com/yn/-/yn-2.0.0.tgz#e5adabc8acf408f6385fc76495684c88e6af689a" integrity sha1-5a2ryKz0CPY4X8dklWhMiOavaJo= -zip-stream@^1.2.0: - version "1.2.0" - resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-1.2.0.tgz#a8bc45f4c1b49699c6b90198baacaacdbcd4ba04" - integrity sha1-qLxF9MG0lpnGuQGYuqyqzbzUugQ= +zip-stream@^2.1.2: + version "2.1.2" + resolved "https://registry.yarnpkg.com/zip-stream/-/zip-stream-2.1.2.tgz#841efd23214b602ff49c497cba1a85d8b5fbc39c" + integrity sha512-ykebHGa2+uzth/R4HZLkZh3XFJzivhVsjJt8bN3GvBzLaqqrUdRacu+c4QtnUgjkkQfsOuNE1JgLKMCPNmkKgg== dependencies: - archiver-utils "^1.3.0" - compress-commons "^1.2.0" - lodash "^4.8.0" - readable-stream "^2.0.0" + archiver-utils "^2.1.0" + compress-commons "^2.1.1" + readable-stream "^3.4.0" zone.js@^0.8.26: version "0.8.26"