diff --git a/Dockerfile b/Dockerfile
index 8eb3582ba3..61d960e7d3 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -6,6 +6,10 @@ WORKDIR /app
ADD . /app/
EXPOSE 4000
+# Ensure Python and other build tools are available
+# These are needed to install some node modules, especially on linux/arm64
+RUN apk add --update python3 make g++ && rm -rf /var/cache/apk/*
+
# We run yarn install with an increased network timeout (5min) to avoid "ESOCKETTIMEDOUT" errors from hub.docker.com
# See, for example https://github.com/yarnpkg/yarn/issues/5540
RUN yarn install --network-timeout 300000
diff --git a/angular.json b/angular.json
index 2ece0c5e7d..b32670ad77 100644
--- a/angular.json
+++ b/angular.json
@@ -25,12 +25,10 @@
}
},
"allowedCommonJsDependencies": [
- "angular2-text-mask",
"cerialize",
"core-js",
"lodash",
"jwt-decode",
- "url-parse",
"uuid",
"webfontloader",
"zone.js"
diff --git a/config/config.example.yml b/config/config.example.yml
index 1e55dfda5f..9abf167b90 100644
--- a/config/config.example.yml
+++ b/config/config.example.yml
@@ -55,6 +55,8 @@ auth:
# Form settings
form:
+ # Sets the spellcheck textarea attribute value
+ spellCheck: true
# NOTE: Map server-side validators to comparative Angular form validators
validatorMap:
required: required
@@ -143,6 +145,9 @@ languages:
- code: nl
label: Nederlands
active: true
+ - code: pl
+ label: Polski
+ active: true
- code: pt-PT
label: Português
active: true
@@ -174,6 +179,7 @@ languages:
label: Yкраї́нська
active: true
+
# Browse-By Pages
browseBy:
# Amount of years to display using jumps of one year (current year - oneYearLimit)
diff --git a/package.json b/package.json
index 993b8e079e..52b089be37 100644
--- a/package.json
+++ b/package.json
@@ -54,18 +54,18 @@
"ts-node": "10.2.1"
},
"dependencies": {
- "@angular/animations": "~13.2.6",
+ "@angular/animations": "~13.3.12",
"@angular/cdk": "^13.2.6",
- "@angular/common": "~13.2.6",
- "@angular/compiler": "~13.2.6",
- "@angular/core": "~13.2.6",
- "@angular/forms": "~13.2.6",
- "@angular/localize": "13.2.6",
- "@angular/platform-browser": "~13.2.6",
- "@angular/platform-browser-dynamic": "~13.2.6",
- "@angular/platform-server": "~13.2.6",
- "@angular/router": "~13.2.6",
- "@babel/runtime": "^7.17.2",
+ "@angular/common": "~13.3.12",
+ "@angular/compiler": "~13.3.12",
+ "@angular/core": "~13.3.12",
+ "@angular/forms": "~13.3.12",
+ "@angular/localize": "13.3.12",
+ "@angular/platform-browser": "~13.3.12",
+ "@angular/platform-browser-dynamic": "~13.3.12",
+ "@angular/platform-server": "~13.3.12",
+ "@angular/router": "~13.3.12",
+ "@babel/runtime": "7.17.2",
"@kolkov/ngx-gallery": "^2.0.1",
"@material-ui/core": "^4.11.0",
"@material-ui/icons": "^4.9.1",
@@ -77,15 +77,15 @@
"@ngrx/store": "^13.0.2",
"@nguniversal/express-engine": "^13.0.2",
"@ngx-translate/core": "^13.0.0",
- "@nicky-lenaers/ngx-scroll-to": "^9.0.0",
+ "@nicky-lenaers/ngx-scroll-to": "^13.0.0",
"@types/grecaptcha": "^3.0.4",
"angular-idle-preload": "3.0.0",
"angulartics2": "^12.0.0",
"axios": "^0.27.2",
- "bootstrap": "4.3.1",
- "caniuse-lite": "^1.0.30001165",
+ "bootstrap": "^4.6.1",
"cerialize": "0.1.18",
"cli-progress": "^3.8.0",
+ "colors": "^1.4.0",
"compression": "^1.7.4",
"cookie-parser": "1.4.5",
"core-js": "^3.7.0",
@@ -95,11 +95,8 @@
"express": "^4.17.1",
"express-rate-limit": "^5.1.3",
"fast-json-patch": "^3.0.0-1",
- "file-saver": "^2.0.5",
"filesize": "^6.1.0",
- "font-awesome": "4.7.0",
"http-proxy-middleware": "^1.0.5",
- "https": "1.0.0",
"js-cookie": "2.2.1",
"js-yaml": "^4.1.0",
"json5": "^2.1.3",
@@ -119,43 +116,38 @@
"ngx-infinite-scroll": "^10.0.1",
"ngx-pagination": "5.0.0",
"ngx-sortablejs": "^11.1.0",
- "ngx-ui-switch": "^11.0.1",
+ "ngx-ui-switch": "^13.0.2",
"nouislider": "^14.6.3",
"pem": "1.14.4",
- "postcss-cli": "^9.1.0",
"prop-types": "^15.7.2",
"react-copy-to-clipboard": "^5.0.1",
"reflect-metadata": "^0.1.13",
"rxjs": "^7.5.5",
"sanitize-html": "^2.7.2",
"sortablejs": "1.13.0",
- "tslib": "^2.0.0",
- "url-parse": "^1.5.6",
"uuid": "^8.3.2",
"webfontloader": "1.6.28",
"zone.js": "~0.11.5"
},
"devDependencies": {
"@angular-builders/custom-webpack": "~13.1.0",
- "@angular-devkit/build-angular": "~13.2.6",
+ "@angular-devkit/build-angular": "~13.3.10",
"@angular-eslint/builder": "13.1.0",
"@angular-eslint/eslint-plugin": "13.1.0",
"@angular-eslint/eslint-plugin-template": "13.1.0",
"@angular-eslint/schematics": "13.1.0",
"@angular-eslint/template-parser": "13.1.0",
- "@angular/cli": "~13.2.6",
- "@angular/compiler-cli": "~13.2.6",
- "@angular/language-service": "~13.2.6",
+ "@angular/cli": "~13.3.10",
+ "@angular/compiler-cli": "~13.3.12",
+ "@angular/language-service": "~13.3.12",
"@cypress/schematic": "^1.5.0",
- "@fortawesome/fontawesome-free": "^5.5.0",
+ "@fortawesome/fontawesome-free": "^6.2.1",
"@ngrx/store-devtools": "^13.0.2",
"@ngtools/webpack": "^13.2.6",
- "@nguniversal/builders": "^13.0.2",
+ "@nguniversal/builders": "^13.1.1",
"@types/deep-freeze": "0.1.2",
"@types/express": "^4.17.9",
- "@types/file-saver": "^2.0.1",
"@types/jasmine": "~3.6.0",
- "@types/jasminewd2": "~2.0.8",
"@types/js-cookie": "2.2.6",
"@types/lodash": "^4.14.165",
"@types/node": "^14.14.9",
@@ -166,26 +158,18 @@
"compression-webpack-plugin": "^9.2.0",
"copy-webpack-plugin": "^6.4.1",
"cross-env": "^7.0.3",
- "css-loader": "^6.2.0",
- "css-minimizer-webpack-plugin": "^3.4.1",
- "cssnano": "^5.0.6",
"cypress": "9.7.0",
"cypress-axe": "^0.14.0",
- "debug-loader": "^0.0.1",
"deep-freeze": "0.0.1",
- "dotenv": "^8.2.0",
"eslint": "^8.2.0",
"eslint-plugin-deprecation": "^1.3.2",
"eslint-plugin-import": "^2.25.4",
- "eslint-plugin-jsdoc": "^39.3.6",
+ "eslint-plugin-jsdoc": "^39.6.4",
"eslint-plugin-lodash": "^7.4.0",
"eslint-plugin-unused-imports": "^2.0.0",
"express-static-gzip": "^2.1.5",
- "fork-ts-checker-webpack-plugin": "^6.0.3",
- "html-loader": "^1.3.2",
"jasmine-core": "^3.8.0",
"jasmine-marbles": "0.9.2",
- "jasmine-spec-reporter": "~5.0.0",
"karma": "^6.3.14",
"karma-chrome-launcher": "~3.1.0",
"karma-coverage-istanbul-reporter": "~3.0.2",
@@ -193,26 +177,20 @@
"karma-jasmine-html-reporter": "^1.5.0",
"karma-mocha-reporter": "2.2.5",
"ngx-mask": "^13.1.7",
- "nodemon": "^2.0.15",
+ "nodemon": "^2.0.20",
"postcss": "^8.1",
"postcss-apply": "0.12.0",
"postcss-import": "^14.0.0",
"postcss-loader": "^4.0.3",
"postcss-preset-env": "^7.4.2",
"postcss-responsive-type": "1.0.0",
- "protractor": "^7.0.0",
- "protractor-istanbul-plugin": "2.0.0",
- "raw-loader": "0.5.1",
"react": "^16.14.0",
"react-dom": "^16.14.0",
"rimraf": "^3.0.2",
"rxjs-spy": "^8.0.2",
- "sass": "~1.32.6",
+ "sass": "~1.33.0",
"sass-loader": "^12.6.0",
"sass-resources-loader": "^2.1.1",
- "string-replace-loader": "^3.1.0",
- "terser-webpack-plugin": "^2.3.1",
- "ts-loader": "^5.2.0",
"ts-node": "^8.10.2",
"typescript": "~4.5.5",
"webpack": "^5.69.1",
diff --git a/src/app/access-control/group-registry/group-form/group-form.component.ts b/src/app/access-control/group-registry/group-form/group-form.component.ts
index b0178f1294..584b28ba1e 100644
--- a/src/app/access-control/group-registry/group-form/group-form.component.ts
+++ b/src/app/access-control/group-registry/group-form/group-form.component.ts
@@ -46,6 +46,7 @@ import { followLink } from '../../../shared/utils/follow-link-config.model';
import { NoContent } from '../../../core/shared/NoContent.model';
import { Operation } from 'fast-json-patch';
import { ValidateGroupExists } from './validators/group-exists.validator';
+import { environment } from '../../../../environments/environment';
@Component({
selector: 'ds-group-form',
@@ -194,6 +195,7 @@ export class GroupFormComponent implements OnInit, OnDestroy {
label: groupDescription,
name: 'groupDescription',
required: false,
+ spellCheck: environment.form.spellCheck,
});
this.formModel = [
this.groupName,
diff --git a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts
index 161cfa7ecf..142f6fb83d 100644
--- a/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts
+++ b/src/app/admin/admin-registries/bitstream-formats/format-form/format-form.component.ts
@@ -15,6 +15,7 @@ import { Router } from '@angular/router';
import { hasValue, isEmpty } from '../../../../shared/empty.util';
import { TranslateService } from '@ngx-translate/core';
import { getBitstreamFormatsModuleRoute } from '../../admin-registries-routing-paths';
+import { environment } from '../../../../../environments/environment';
/**
* The component responsible for rendering the form to create/edit a bitstream format
@@ -90,6 +91,7 @@ export class FormatFormComponent implements OnInit {
name: 'description',
label: 'admin.registries.bitstream-formats.edit.description.label',
hint: 'admin.registries.bitstream-formats.edit.description.hint',
+ spellCheck: environment.form.spellCheck,
}),
new DynamicSelectModel({
diff --git a/src/app/breadcrumbs/breadcrumbs.component.html b/src/app/breadcrumbs/breadcrumbs.component.html
index 51524fde48..bff792eeff 100644
--- a/src/app/breadcrumbs/breadcrumbs.component.html
+++ b/src/app/breadcrumbs/breadcrumbs.component.html
@@ -10,7 +10,7 @@
-
+
diff --git a/src/app/collection-page/collection-form/collection-form.models.ts b/src/app/collection-page/collection-form/collection-form.models.ts
index 37e9d8a9a0..1a009d95a1 100644
--- a/src/app/collection-page/collection-form/collection-form.models.ts
+++ b/src/app/collection-page/collection-form/collection-form.models.ts
@@ -1,5 +1,6 @@
import { DynamicFormControlModel, DynamicInputModel, DynamicTextAreaModel } from '@ng-dynamic-forms/core';
import { DynamicSelectModelConfig } from '@ng-dynamic-forms/core/lib/model/select/dynamic-select.model';
+import { environment } from '../../../environments/environment';
export const collectionFormEntityTypeSelectionConfig: DynamicSelectModelConfig = {
id: 'entityType',
@@ -26,21 +27,26 @@ export const collectionFormModels: DynamicFormControlModel[] = [
new DynamicTextAreaModel({
id: 'description',
name: 'dc.description',
+ spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'abstract',
name: 'dc.description.abstract',
+ spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'rights',
name: 'dc.rights',
+ spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'tableofcontents',
name: 'dc.description.tableofcontents',
+ spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'license',
name: 'dc.rights.license',
+ spellCheck: environment.form.spellCheck,
})
];
diff --git a/src/app/collection-page/collection-page-routing.module.ts b/src/app/collection-page/collection-page-routing.module.ts
index 678c745c01..819ee8ca16 100644
--- a/src/app/collection-page/collection-page-routing.module.ts
+++ b/src/app/collection-page/collection-page-routing.module.ts
@@ -72,6 +72,7 @@ import { MenuItemType } from '../shared/menu/menu-item-type.model';
id: 'statistics_collection_:id',
active: true,
visible: true,
+ index: 2,
model: {
type: MenuItemType.LINK,
text: 'menu.section.statistics',
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 a3730fd418..c6dd1147c3 100644
--- a/src/app/community-page/community-form/community-form.component.ts
+++ b/src/app/community-page/community-form/community-form.component.ts
@@ -13,6 +13,7 @@ import { CommunityDataService } from '../../core/data/community-data.service';
import { AuthService } from '../../core/auth/auth.service';
import { RequestService } from '../../core/data/request.service';
import { ObjectCacheService } from '../../core/cache/object-cache.service';
+import { environment } from '../../../environments/environment';
/**
* Form used for creating and editing communities
@@ -52,18 +53,22 @@ export class CommunityFormComponent extends ComColFormComponent {
new DynamicTextAreaModel({
id: 'description',
name: 'dc.description',
+ spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'abstract',
name: 'dc.description.abstract',
+ spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'rights',
name: 'dc.rights',
+ spellCheck: environment.form.spellCheck,
}),
new DynamicTextAreaModel({
id: 'tableofcontents',
name: 'dc.description.tableofcontents',
+ spellCheck: environment.form.spellCheck,
}),
];
diff --git a/src/app/community-page/community-page-routing.module.ts b/src/app/community-page/community-page-routing.module.ts
index 25326448a8..4870d52dd9 100644
--- a/src/app/community-page/community-page-routing.module.ts
+++ b/src/app/community-page/community-page-routing.module.ts
@@ -55,6 +55,7 @@ import { MenuItemType } from '../shared/menu/menu-item-type.model';
id: 'statistics_community_:id',
active: true,
visible: true,
+ index: 2,
model: {
type: MenuItemType.LINK,
text: 'menu.section.statistics',
diff --git a/src/app/core/locale/locale.service.ts b/src/app/core/locale/locale.service.ts
index 68d2839d42..16a35b8ae5 100644
--- a/src/app/core/locale/locale.service.ts
+++ b/src/app/core/locale/locale.service.ts
@@ -40,7 +40,7 @@ export class LocaleService {
protected translate: TranslateService,
protected authService: AuthService,
protected routeService: RouteService,
- @Inject(DOCUMENT) private document: any
+ @Inject(DOCUMENT) protected document: any
) {
}
diff --git a/src/app/core/locale/server-locale.service.ts b/src/app/core/locale/server-locale.service.ts
index f438643e49..556619b946 100644
--- a/src/app/core/locale/server-locale.service.ts
+++ b/src/app/core/locale/server-locale.service.ts
@@ -1,12 +1,31 @@
import { LANG_ORIGIN, LocaleService } from './locale.service';
-import { Injectable } from '@angular/core';
+import { Inject, Injectable } from '@angular/core';
import { combineLatest, Observable, of as observableOf } from 'rxjs';
import { map, mergeMap, take } from 'rxjs/operators';
-import { isEmpty, isNotEmpty } from '../../shared/empty.util';
+import { hasValue, isEmpty, isNotEmpty } from '../../shared/empty.util';
+import { NativeWindowRef, NativeWindowService } from '../services/window.service';
+import { REQUEST } from '@nguniversal/express-engine/tokens';
+import { CookieService } from '../services/cookie.service';
+import { TranslateService } from '@ngx-translate/core';
+import { AuthService } from '../auth/auth.service';
+import { RouteService } from '../services/route.service';
+import { DOCUMENT } from '@angular/common';
@Injectable()
export class ServerLocaleService extends LocaleService {
+ constructor(
+ @Inject(NativeWindowService) protected _window: NativeWindowRef,
+ @Inject(REQUEST) protected req: Request,
+ protected cookie: CookieService,
+ protected translate: TranslateService,
+ protected authService: AuthService,
+ protected routeService: RouteService,
+ @Inject(DOCUMENT) protected document: any
+ ) {
+ super(_window, cookie, translate, authService, routeService, document);
+ }
+
/**
* Get the languages list of the user in Accept-Language format
*
@@ -50,6 +69,10 @@ export class ServerLocaleService extends LocaleService {
if (isNotEmpty(epersonLang)) {
languages.push(...epersonLang);
}
+ if (hasValue(this.req.headers['accept-language'])) {
+ languages.push(...this.req.headers['accept-language'].split(',')
+ );
+ }
return languages;
})
);
diff --git a/src/app/item-page/item-page-routing.module.ts b/src/app/item-page/item-page-routing.module.ts
index add2c3d768..ac14ca8402 100644
--- a/src/app/item-page/item-page-routing.module.ts
+++ b/src/app/item-page/item-page-routing.module.ts
@@ -67,6 +67,7 @@ import { OrcidPageGuard } from './orcid-page/orcid-page.guard';
id: 'statistics_item_:id',
active: true,
visible: true,
+ index: 2,
model: {
type: MenuItemType.LINK,
text: 'menu.section.statistics',
diff --git a/src/app/my-dspace-page/collection-selector/collection-selector.component.html b/src/app/my-dspace-page/collection-selector/collection-selector.component.html
index a87118fc4e..6e2a1925c5 100644
--- a/src/app/my-dspace-page/collection-selector/collection-selector.component.html
+++ b/src/app/my-dspace-page/collection-selector/collection-selector.component.html
@@ -5,7 +5,7 @@
-
-
+
+
diff --git a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts
index ce54d326fc..af043b447b 100644
--- a/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts
+++ b/src/app/my-dspace-page/collection-selector/collection-selector.component.spec.ts
@@ -128,10 +128,13 @@ describe('CollectionSelectorComponent', () => {
beforeEach(() => {
scheduler = getTestScheduler();
- fixture = TestBed.createComponent(CollectionSelectorComponent);
+ fixture = TestBed.overrideComponent(CollectionSelectorComponent, {
+ set: {
+ template: ''
+ }
+ }).createComponent(CollectionSelectorComponent);
component = fixture.componentInstance;
fixture.detectChanges();
-
});
it('should create', () => {
diff --git a/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts b/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts
new file mode 100644
index 0000000000..27c883099d
--- /dev/null
+++ b/src/app/shared/collection-dropdown/themed-collection-dropdown.component.ts
@@ -0,0 +1,33 @@
+import { CollectionDropdownComponent, CollectionListEntry } from './collection-dropdown.component';
+import { ThemedComponent } from '../theme-support/themed.component';
+import { Component, Input, Output, EventEmitter } from '@angular/core';
+
+@Component({
+ selector: 'ds-themed-collection-dropdown',
+ styleUrls: [],
+ templateUrl: '../../shared/theme-support/themed.component.html',
+})
+export class ThemedCollectionDropdownComponent extends ThemedComponent {
+
+ @Input() entityType: string;
+
+ @Output() searchComplete = new EventEmitter();
+
+ @Output() theOnlySelectable = new EventEmitter();
+
+ @Output() selectionChange = new EventEmitter();
+
+ protected inAndOutputNames: (keyof CollectionDropdownComponent & keyof this)[] = ['entityType', 'searchComplete', 'theOnlySelectable', 'selectionChange'];
+
+ protected getComponentName(): string {
+ return 'CollectionDropdownComponent';
+ }
+
+ protected importThemedComponent(themeName: string): Promise {
+ return import(`../../../themes/${themeName}/app/shared/collection-dropdown/collection-dropdown.component`);
+ }
+
+ protected importUnthemedComponent(): Promise {
+ return import(`./collection-dropdown.component`);
+ }
+}
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts
index e0e519aaa9..925fabe5e0 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.spec.ts
@@ -79,6 +79,8 @@ import { FormService } from '../../form.service';
import { SubmissionService } from '../../../../submission/submission.service';
import { FormBuilderService } from '../form-builder.service';
import { NgxMaskModule } from 'ngx-mask';
+import { APP_CONFIG } from '../../../../../config/app-config.interface';
+import { environment } from '../../../../../environments/environment';
function getMockDsDynamicTypeBindRelationService(): DsDynamicTypeBindRelationService {
return jasmine.createSpyObj('DsDynamicTypeBindRelationService', {
@@ -230,7 +232,8 @@ describe('DsDynamicFormControlContainerComponent test suite', () => {
findById: () => observableOf(createSuccessfulRemoteDataObject(testWSI))
}
},
- { provide: NgZone, useValue: new NgZone({}) }
+ { provide: NgZone, useValue: new NgZone({}) },
+ { provide: APP_CONFIG, useValue: environment }
],
schemas: [CUSTOM_ELEMENTS_SCHEMA]
}).compileComponents().then(() => {
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
index 812735e69c..77ce65675a 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/ds-dynamic-form-control-container.component.ts
@@ -4,7 +4,7 @@ import {
Component,
ComponentFactoryResolver,
ContentChildren,
- EventEmitter,
+ EventEmitter, Inject,
Input,
NgZone,
OnChanges,
@@ -118,6 +118,8 @@ import { RelationshipOptions } from '../models/relationship-options.model';
import { FormBuilderService } from '../form-builder.service';
import { DYNAMIC_FORM_CONTROL_TYPE_RELATION_GROUP } from './ds-dynamic-form-constants';
import { FormFieldMetadataValueObject } from '../models/form-field-metadata-value.model';
+import { APP_CONFIG, AppConfig } from '../../../../../config/app-config.interface';
+import { itemLinksToFollow } from '../../../utils/relation-query.utils';
export function dsDynamicFormControlMapFn(model: DynamicFormControlModel): Type | null {
switch (model.type) {
@@ -231,6 +233,11 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
private showErrorMessagesPreviousStage: boolean;
+ /**
+ * Determines whether to request embedded thumbnail.
+ */
+ fetchThumbnail: boolean;
+
get componentType(): Type | null {
return dsDynamicFormControlMapFn(this.model);
}
@@ -253,9 +260,11 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
private ref: ChangeDetectorRef,
private formService: FormService,
private formBuilderService: FormBuilderService,
- private submissionService: SubmissionService
+ private submissionService: SubmissionService,
+ @Inject(APP_CONFIG) protected appConfig: AppConfig,
) {
super(ref, componentFactoryResolver, layoutService, validationService, dynamicFormComponentService, relationService);
+ this.fetchThumbnail = this.appConfig.browseBy.showThumbnails;
}
/**
@@ -285,7 +294,6 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
followLink('rightItem'),
followLink('relationshipType')
);
-
relationshipsRD$.pipe(
getFirstSucceededRemoteDataPayload(),
getPaginatedListPayload()
@@ -317,8 +325,10 @@ export class DsDynamicFormControlContainerComponent extends DynamicFormControlCo
}
if (hasValue(this.value) && this.value.isVirtual) {
- const relationship$ = this.relationshipService.findById(this.value.virtualValue, true, true, followLink('leftItem'), followLink('rightItem'), followLink('relationshipType'))
- .pipe(
+ const relationship$ = this.relationshipService.findById(this.value.virtualValue,
+ true,
+ true,
+ ... itemLinksToFollow(this.fetchThumbnail)).pipe(
getAllSucceededRemoteData(),
getRemoteDataPayload());
this.relationshipValue$ = observableCombineLatest([this.item$.pipe(take(1)), relationship$]).pipe(
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.scss b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.scss
index 1146e55750..8b13789179 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.scss
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-metadata-list-element/existing-metadata-list-element.component.scss
@@ -1,3 +1 @@
-span.text-contents{
- padding: var(--bs-btn-padding-y) 0;
-}
+
diff --git a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html
index ff91b18e1c..64ace2296e 100644
--- a/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html
+++ b/src/app/shared/form/builder/ds-dynamic-form-ui/existing-relation-list-element/existing-relation-list-element.component.html
@@ -1,12 +1,12 @@
-
+
-
+