diff --git a/package-lock.json b/package-lock.json index 2b31dd305..9b822d3f7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1837,9 +1837,9 @@ } }, "@ngx-formly/bootstrap": { - "version": "5.10.11", - "resolved": "https://registry.npmjs.org/@ngx-formly/bootstrap/-/bootstrap-5.10.11.tgz", - "integrity": "sha512-BOhf7lxiqMR5RGG+RUOf7EVZS7M5h+vQ5rcjpMFlcwe+jdYcoCqGH7NzUB+0/l6SXeDVvNMRndEVs2ObLSpHTg==", + "version": "5.10.12", + "resolved": "https://registry.npmjs.org/@ngx-formly/bootstrap/-/bootstrap-5.10.12.tgz", + "integrity": "sha512-8cbVVA80UF9rr2rXhqWvfK99ytuYzAPd9SY7pxzJEoed/KRaZXS6a36j/JgsqKKR1O6BO59WOuFDTyA6Cir1JA==", "requires": { "tslib": "^1.9.0" }, @@ -1852,9 +1852,9 @@ } }, "@ngx-formly/core": { - "version": "5.10.11", - "resolved": "https://registry.npmjs.org/@ngx-formly/core/-/core-5.10.11.tgz", - "integrity": "sha512-vi+UZC+eSnPQjwyMfZs42Zl8TucAedtpNC5YV44AknFNvdPqWU/ZXGi1zVXWWAcSS/0sIbfFyUrSlW++zW/b6A==", + "version": "5.10.12", + "resolved": "https://registry.npmjs.org/@ngx-formly/core/-/core-5.10.12.tgz", + "integrity": "sha512-fv9tBjjXZnqqzUim03vta6xIXEUi2cKL80N1xk7t7BLurlygfNgPQQaeTb1hJw1grfQfLAEg6noxVFnvLo8QpQ==", "requires": { "tslib": "^1.7.1" }, @@ -6507,7 +6507,8 @@ "ini": { "version": "1.3.8", "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==" + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true }, "injection-js": { "version": "2.4.0", diff --git a/package.json b/package.json index d35e5b126..ec78f9eba 100644 --- a/package.json +++ b/package.json @@ -72,8 +72,8 @@ "@angular/platform-browser-dynamic": "^11.0.9", "@angular/router": "^11.0.9", "@ngneat/hotkeys": "^1.1.2", - "@ngx-formly/bootstrap": "^5.10.11", - "@ngx-formly/core": "^5.10.11", + "@ngx-formly/bootstrap": "^5.10.12", + "@ngx-formly/core": "^5.10.12", "@ngx-translate/core": "^13.0.0", "@rero/ng-core": "^1.1.2", "bootstrap": "^4.5.3", diff --git a/projects/admin/src/app/class/typeahead/mef-typeahead.ts b/projects/admin/src/app/class/typeahead/mef-typeahead.ts index 32af5431a..c870392b4 100644 --- a/projects/admin/src/app/class/typeahead/mef-typeahead.ts +++ b/projects/admin/src/app/class/typeahead/mef-typeahead.ts @@ -72,12 +72,13 @@ export class MefTypeahead implements ITypeahead { ) { return { source: source.toUpperCase(), - name: data.hits.hits[0].metadata[source].authorized_access_point + name: data.hits.hits[0].metadata[source].authorized_access_point, + url: data.hits.hits[0].metadata[source].identifier }; } }), - map((v: { name: string, source: string }) => ` - ${v.name} + map((v: { name: string, source: string, url: string }) => ` + ${v.name} ${v.source} `) ); @@ -136,8 +137,11 @@ export class MefTypeahead implements ITypeahead { * @return Metadata the label, $ref and group. */ private _getNameRef(metadata: any, sourceName: string): SuggestionMetadata { + const label = metadata[sourceName].authorized_access_point; + const url = metadata[sourceName].identifier; return { - label: metadata[sourceName].authorized_access_point, + label: `${label}`, + externalLink: url, value: `https://mef.rero.ch/api/${sourceName}/${metadata[sourceName].pid}`, group: this._translateService.instant( 'link to authority {{ sourceName }}', diff --git a/projects/admin/src/app/record/custom-editor/document-editor/document-editor.component.html b/projects/admin/src/app/record/custom-editor/document-editor/document-editor.component.html index 77e2bcbab..5a92375ba 100644 --- a/projects/admin/src/app/record/custom-editor/document-editor/document-editor.component.html +++ b/projects/admin/src/app/record/custom-editor/document-editor/document-editor.component.html @@ -14,5 +14,4 @@  You should have received a copy of the GNU Affero General Public License  along with this program. If not, see . --> - diff --git a/projects/admin/src/app/service/app-config.service.ts b/projects/admin/src/app/service/app-config.service.ts index f557a610a..627b4ff20 100644 --- a/projects/admin/src/app/service/app-config.service.ts +++ b/projects/admin/src/app/service/app-config.service.ts @@ -40,7 +40,7 @@ export class AppConfigService extends CoreConfigService { this.production = environment.production; this.apiBaseUrl = environment.apiBaseUrl; this.$refPrefix = environment.$refPrefix; - this.schemaFormEndpoint = '/schemaform'; + this.schemaFormEndpoint = '/schemas'; this.languages = environment.languages; this.defaultLanguage = environment.defaultLanguage; this.adminRoles = environment.adminRoles; diff --git a/proxy.conf.json b/proxy.conf.json index 7c7396d62..e2eaefe87 100644 --- a/proxy.conf.json +++ b/proxy.conf.json @@ -8,13 +8,13 @@ "^/patrons": "https://localhost:5000/patrons" } }, - "/schemaform": { + "/schemas": { "target": "https://localhost:5000", "secure": false, "logLevel": "debug", "changeOrigin": true, "pathRewrite": { - "^/schemaform": "https://localhost:5000/schemaform" + "^/schemas": "https://localhost:5000/schemas" } }, "/api/*": {