Skip to content

Commit 16101c4

Browse files
committed
Merged ux-plus-2023_02_x into ux-plus-2023_02_x-UXP-123
2 parents c1dbc0f + 6777a20 commit 16101c4

138 files changed

Lines changed: 3738 additions & 8825 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bitbucket-pipelines.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
options:
2-
runs-on: ubuntu-latest
2+
runs-on: self.hosted
33

44
definitions:
55
steps:
@@ -15,7 +15,7 @@ definitions:
1515
- yarn install --frozen-lockfile
1616
- yarn run lint --quiet
1717
- yarn run check-circ-deps
18-
- yarn run build:prod
18+
- yarn run build:prod:ci
1919
- yarn run test:headless
2020

2121
pipelines:

config/config.example.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,10 @@ item:
308308
# Rounded to the nearest size in the list of selectable sizes on the
309309
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
310310
pageSize: 5
311+
# The maximum number of metadata values to add to the metatag list of the item page
312+
metatagLimit: 20
313+
# The maximum number of values for repeatable metadata to show in the full item
314+
metadataLimit: 20
311315

312316
# When the search results are retrieved, for each item type the metadata with a valid authority value are inspected.
313317
# Referenced items will be fetched with a find all by id strategy to avoid individual rest requests

nohup.out

Lines changed: 0 additions & 7948 deletions
This file was deleted.

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,11 @@
1717
"build:stats": "ng build --stats-json",
1818
"build:ci": "ng config cli.cache.environment ci && yarn run build:ssr",
1919
"build:prod": "cross-env NODE_ENV=production yarn run build:ssr",
20-
"build:ssr": "npm run ng-high-memory -- build --configuration production && ng run dspace-angular:server:production",
21-
"ng-high-memory": "node --max_old_space_size=8192 node_modules/@angular/cli/bin/ng",
20+
"build:prod:ci": "cross-env NODE_ENV=production yarn run build:ssr:ci",
21+
"build:ssr": "npm run ng-high-memory -- build --configuration production && npm run ng-high-memory -- run dspace-angular:server:production",
22+
"build:ssr:ci": "npm run ng-mid-memory -- build --configuration production && npm run ng-mid-memory -- run dspace-angular:server:production",
23+
"ng-high-memory": "node --max-old-space-size=8192 node_modules/@angular/cli/bin/ng",
24+
"ng-mid-memory": "node --max-old-space-size=4096 node_modules/@angular/cli/bin/ng",
2225
"test": "npm run ng-high-memory -- test --source-map=true --watch=false --configuration test",
2326
"test:watch": "nodemon --exec \"npm run ng-high-memory -- test --source-map=true --watch=true --configuration test\"",
2427
"test:headless": "npm run ng-high-memory -- test --source-map=true --watch=false --configuration test --browsers=ChromeHeadless --code-coverage",
@@ -143,8 +146,8 @@
143146
"ng2-nouislider": "^2.0.0",
144147
"ng2-pdfjs-viewer": "^15.0.0",
145148
"ngx-infinite-scroll": "^15.0.0",
149+
"ngx-openlayers": "0.8.22",
146150
"ngx-pagination": "6.0.3",
147-
"ngx-sortablejs": "^11.1.0",
148151
"ngx-ui-switch": "^14.0.3",
149152
"nouislider": "^15.7.1",
150153
"pem": "1.14.7",
@@ -153,7 +156,6 @@
153156
"reflect-metadata": "^0.1.13",
154157
"rxjs": "^7.8.0",
155158
"sanitize-html": "^2.10.0",
156-
"sortablejs": "1.15.0",
157159
"uuid": "^8.3.2",
158160
"video.js": "^7.21.4",
159161
"videojs-contrib-quality-levels": "^2.0.9",

src/app/core/json-patch/builder/json-patch-operations-builder.ts

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -110,27 +110,25 @@ export class JsonPatchOperationsBuilder {
110110
operationValue = [];
111111
value.forEach((entry) => {
112112
if ((typeof entry === 'object')) {
113-
if (securityLevel != null) {
113+
if (isNotEmpty(securityLevel)) {
114114
operationValue.push(this.prepareObjectValue(entry, securityLevel));
115115
} else {
116116
operationValue.push(this.prepareObjectValue(entry));
117117
}
118-
119118
} else {
120119
operationValue.push(new FormFieldMetadataValueObject(entry, null, securityLevel));
121120
}
122121
});
123122
} else if (typeof value === 'object') {
124-
if (securityLevel != null) {
123+
if (isNotEmpty(securityLevel)) {
125124
operationValue = this.prepareObjectValue(value, securityLevel);
126125
} else {
127126
operationValue = this.prepareObjectValue(value);
128127
}
129-
130128
} else {
131129
// add the possibility to add security level when value is string
132130
// in this case security level is set on metadata value
133-
if (securityLevel != null) {
131+
if (isNotEmpty(securityLevel)) {
134132
operationValue = new FormFieldMetadataValueObject(value, null, securityLevel);
135133
} else {
136134
operationValue = new FormFieldMetadataValueObject(value, null);
@@ -143,21 +141,21 @@ export class JsonPatchOperationsBuilder {
143141
}
144142

145143
protected prepareObjectValue(value: any, securityLevel = null) {
146-
let operationValue = Object.create({});
144+
let operationValue = Object.create({});
147145
if (isEmpty(value) || value instanceof FormFieldMetadataValueObject) {
148-
if (securityLevel != null) {
149-
operationValue = {...value, securityLevel: securityLevel};
150-
} else {
146+
if (isNotEmpty(securityLevel)) {
147+
operationValue = { ...value, securityLevel: securityLevel };
148+
} else {
151149
operationValue = value;
152150
}
153151
} else if (value instanceof Date) {
154152
if (securityLevel != null) {
155-
operationValue = new FormFieldMetadataValueObject(dateToISOFormat(value), null, securityLevel);
153+
operationValue = new FormFieldMetadataValueObject(dateToISOFormat(value), null, securityLevel);
156154
} else {
157155
operationValue = new FormFieldMetadataValueObject(dateToISOFormat(value));
158156
}
159157
} else if (value instanceof VocabularyEntry) {
160-
operationValue = this.prepareAuthorityValue(value);
158+
operationValue = new FormFieldMetadataValueObject(value.value, null, value.securityLevel, value.authority);
161159
} else if (value instanceof FormFieldLanguageValueObject) {
162160
operationValue = new FormFieldMetadataValueObject(value.value, value.language, securityLevel);
163161
} else if (value.hasOwnProperty('authority')) {
@@ -170,11 +168,10 @@ export class JsonPatchOperationsBuilder {
170168
Object.keys(value)
171169
.forEach((key) => {
172170
if (typeof value[key] === 'object') {
173-
if (securityLevel != null) {
174-
operationValue[key] = this.prepareObjectValue(value[key], securityLevel);
171+
if (isNotEmpty(securityLevel)) {
172+
operationValue[key] = this.prepareObjectValue(value[key], securityLevel);
175173
} else {
176-
operationValue[key] = this.prepareObjectValue(value[key]);
177-
174+
operationValue[key] = this.prepareObjectValue(value[key]);
178175
}
179176
} else {
180177
operationValue[key] = value[key];
@@ -184,14 +181,4 @@ export class JsonPatchOperationsBuilder {
184181
return operationValue;
185182
}
186183

187-
protected prepareAuthorityValue(value: any): FormFieldMetadataValueObject {
188-
let operationValue: FormFieldMetadataValueObject;
189-
if (isNotEmpty(value.authority)) {
190-
operationValue = new FormFieldMetadataValueObject(value.value, value.language, value.securityLevel, value.authority);
191-
} else {
192-
operationValue = new FormFieldMetadataValueObject(value.value, value.language, value.securityLevel,);
193-
}
194-
return operationValue;
195-
}
196-
197184
}

0 commit comments

Comments
 (0)