Skip to content

Commit a6a9e93

Browse files
Merge remote-tracking branch 'upstream/main' into theme-fixes_contribute-main
# Conflicts: # src/app/shared/object-collection/shared/listable-object/listable-object-component-loader.component.spec.ts # src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.spec.ts # src/app/shared/object-list/item-list-element/item-types/item/item-list-element.component.ts
2 parents 10c9895 + a8f3194 commit a6a9e93

2,942 files changed

Lines changed: 85366 additions & 36110 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.

.eslintrc.json

Lines changed: 55 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88
"eslint-plugin-deprecation",
99
"unused-imports",
1010
"eslint-plugin-lodash",
11-
"eslint-plugin-jsonc"
11+
"eslint-plugin-jsonc",
12+
"eslint-plugin-rxjs",
13+
"eslint-plugin-simple-import-sort",
14+
"eslint-plugin-import-newlines"
1215
],
1316
"overrides": [
1417
{
@@ -27,17 +30,29 @@
2730
"plugin:@typescript-eslint/recommended",
2831
"plugin:@typescript-eslint/recommended-requiring-type-checking",
2932
"plugin:@angular-eslint/recommended",
30-
"plugin:@angular-eslint/template/process-inline-templates"
33+
"plugin:@angular-eslint/template/process-inline-templates",
34+
"plugin:rxjs/recommended"
3135
],
3236
"rules": {
37+
"indent": [
38+
"error",
39+
2,
40+
{
41+
"SwitchCase": 1
42+
}
43+
],
3344
"max-classes-per-file": [
3445
"error",
3546
1
3647
],
3748
"comma-dangle": [
38-
"off",
49+
"error",
3950
"always-multiline"
4051
],
52+
"object-curly-spacing": [
53+
"error",
54+
"always"
55+
],
4156
"eol-last": [
4257
"error",
4358
"always"
@@ -104,15 +119,13 @@
104119
"allowTernary": true
105120
}
106121
],
107-
"prefer-const": "off", // todo: re-enable & fix errors (more strict than it used to be in TSLint)
122+
"prefer-const": "error",
123+
"no-case-declarations": "error",
124+
"no-extra-boolean-cast": "error",
108125
"prefer-spread": "off",
109126
"no-underscore-dangle": "off",
110-
111-
// todo: disabled rules from eslint:recommended, consider re-enabling & fixing
112127
"no-prototype-builtins": "off",
113128
"no-useless-escape": "off",
114-
"no-case-declarations": "off",
115-
"no-extra-boolean-cast": "off",
116129

117130
"@angular-eslint/directive-selector": [
118131
"error",
@@ -183,7 +196,7 @@
183196
],
184197
"@typescript-eslint/type-annotation-spacing": "error",
185198
"@typescript-eslint/unified-signatures": "error",
186-
"@typescript-eslint/ban-types": "warn", // todo: deal with {} type issues & re-enable
199+
"@typescript-eslint/ban-types": "error",
187200
"@typescript-eslint/no-floating-promises": "warn",
188201
"@typescript-eslint/no-misused-promises": "warn",
189202
"@typescript-eslint/restrict-plus-operands": "warn",
@@ -203,14 +216,45 @@
203216

204217
"deprecation/deprecation": "warn",
205218

219+
"simple-import-sort/imports": "error",
220+
"simple-import-sort/exports": "error",
206221
"import/order": "off",
222+
"import/first": "error",
223+
"import/newline-after-import": "error",
224+
"import/no-duplicates": "error",
207225
"import/no-deprecated": "warn",
208226
"import/no-namespace": "error",
227+
"import-newlines/enforce": [
228+
"error",
229+
{
230+
"items": 1,
231+
"semi": true,
232+
"forceSingleLine": true
233+
}
234+
],
235+
209236
"unused-imports/no-unused-imports": "error",
210237
"lodash/import-scope": [
211238
"error",
212239
"method"
213-
]
240+
],
241+
242+
"rxjs/no-nested-subscribe": "off" // todo: go over _all_ cases
243+
}
244+
},
245+
{
246+
"files": [
247+
"*.spec.ts"
248+
],
249+
"parserOptions": {
250+
"project": [
251+
"./tsconfig.json",
252+
"./cypress/tsconfig.json"
253+
],
254+
"createDefaultProgram": true
255+
},
256+
"rules": {
257+
"prefer-const": "off"
214258
}
215259
},
216260
{
@@ -219,12 +263,7 @@
219263
],
220264
"extends": [
221265
"plugin:@angular-eslint/template/recommended"
222-
],
223-
"rules": {
224-
// todo: re-enable & fix errors
225-
"@angular-eslint/template/no-negated-async": "off",
226-
"@angular-eslint/template/eqeqeq": "off"
227-
}
266+
]
228267
},
229268
{
230269
"files": [

config/config.example.yml

Lines changed: 115 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ cache:
7575
anonymousCache:
7676
# Maximum number of pages to cache. Default is zero (0) which means anonymous user cache is disabled.
7777
# As all pages are cached in server memory, increasing this value will increase memory needs.
78-
# Individual cached pages are usually small (<100KB), so a value of max=1000 would only require ~100MB of memory.
78+
# Individual cached pages are usually small (<100KB), so a value of max=1000 would only require ~100MB of memory.
7979
max: 0
8080
# Amount of time after which cached pages are considered stale (in ms). After becoming stale, the cached
8181
# copy is automatically refreshed on the next request.
@@ -131,12 +131,16 @@ submission:
131131
# NOTE: after how many time (milliseconds) submission is saved automatically
132132
# eg. timer: 5 * (1000 * 60); // 5 minutes
133133
timer: 0
134+
# Always show the duplicate detection section if enabled, even if there are no potential duplicates detected
135+
# (a message will be displayed to indicate no matches were found)
136+
duplicateDetection:
137+
alwaysShowSection: false
134138
icons:
135139
metadata:
136140
# NOTE: example of configuration
137141
# # NOTE: metadata name
138142
# - name: dc.author
139-
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
143+
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
140144
# style: fas fa-user
141145
- name: dc.author
142146
style: fas fa-user
@@ -147,18 +151,40 @@ submission:
147151
confidence:
148152
# NOTE: example of configuration
149153
# # NOTE: confidence value
150-
# - name: dc.author
151-
# # NOTE: fontawesome (v5.x) icon classes and bootstrap utility classes can be used
152-
# style: fa-user
154+
# - value: 600
155+
# # NOTE: fontawesome (v6.x) icon classes and bootstrap utility classes can be used
156+
# style: text-success
157+
# icon: fa-circle-check
158+
# # NOTE: the class configured in property style is used by default, the icon property could be used in component
159+
# configured to use a 'icon mode' display (mainly in edit-item page)
153160
- value: 600
154161
style: text-success
162+
icon: fa-circle-check
155163
- value: 500
156164
style: text-info
165+
icon: fa-gear
157166
- value: 400
158167
style: text-warning
168+
icon: fa-circle-question
169+
- value: 300
170+
style: text-muted
171+
icon: fa-thumbs-down
172+
- value: 200
173+
style: text-muted
174+
icon: fa-circle-exclamation
175+
- value: 100
176+
style: text-muted
177+
icon: fa-circle-stop
178+
- value: 0
179+
style: text-muted
180+
icon: fa-ban
181+
- value: -1
182+
style: text-muted
183+
icon: fa-circle-xmark
159184
# default configuration
160185
- value: default
161186
style: text-muted
187+
icon: fa-circle-xmark
162188

163189
# Default Language in which the UI will be rendered if the user's browser language is not an active language
164190
defaultLanguage: en
@@ -272,6 +298,8 @@ homePage:
272298
# No. of communities to list per page on the home page
273299
# This will always round to the nearest number from the list of page sizes. e.g. if you set it to 7 it'll use 10
274300
pageSize: 5
301+
# Enable or disable the Discover filters on the homepage
302+
showDiscoverFilters: false
275303

276304
# Item Config
277305
item:
@@ -285,8 +313,17 @@ item:
285313
# settings menu. See pageSizeOptions in 'pagination-component-options.model.ts'.
286314
pageSize: 5
287315

316+
# Community Page Config
317+
community:
318+
# Search tab config
319+
searchSection:
320+
showSidebar: true
321+
288322
# Collection Page Config
289323
collection:
324+
# Search tab config
325+
searchSection:
326+
showSidebar: true
290327
edit:
291328
undoTimeout: 10000 # 10 seconds
292329

@@ -382,7 +419,79 @@ vocabularies:
382419
vocabulary: 'srsc'
383420
enabled: true
384421

385-
# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
422+
# Default collection/community sorting order at Advanced search, Create/update community and collection when there are not a query.
386423
comcolSelectionSort:
387424
sortField: 'dc.title'
388425
sortDirection: 'ASC'
426+
427+
# Example of fallback collection for suggestions import
428+
# suggestion:
429+
# - collectionId: 8f7df5ca-f9c2-47a4-81ec-8a6393d6e5af
430+
# source: "openaire"
431+
432+
433+
# Search settings
434+
search:
435+
# Settings to enable/disable or configure advanced search filters.
436+
advancedFilters:
437+
enabled: false
438+
# List of filters to enable in "Advanced Search" dropdown
439+
filter: [ 'title', 'author', 'subject', 'entityType' ]
440+
441+
442+
# Notify metrics
443+
# Configuration for Notify Admin Dashboard for metrics visualization
444+
notifyMetrics:
445+
# Configuration for received messages
446+
- title: 'admin-notify-dashboard.received-ldn'
447+
boxes:
448+
- color: '#B8DAFF'
449+
title: 'admin-notify-dashboard.NOTIFY.incoming.accepted'
450+
config: 'NOTIFY.incoming.accepted'
451+
description: 'admin-notify-dashboard.NOTIFY.incoming.accepted.description'
452+
- color: '#D4EDDA'
453+
title: 'admin-notify-dashboard.NOTIFY.incoming.processed'
454+
config: 'NOTIFY.incoming.processed'
455+
description: 'admin-notify-dashboard.NOTIFY.incoming.processed.description'
456+
- color: '#FDBBC7'
457+
title: 'admin-notify-dashboard.NOTIFY.incoming.failure'
458+
config: 'NOTIFY.incoming.failure'
459+
description: 'admin-notify-dashboard.NOTIFY.incoming.failure.description'
460+
- color: '#FDBBC7'
461+
title: 'admin-notify-dashboard.NOTIFY.incoming.untrusted'
462+
config: 'NOTIFY.incoming.untrusted'
463+
description: 'admin-notify-dashboard.NOTIFY.incoming.untrusted.description'
464+
- color: '#43515F'
465+
title: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems'
466+
textColor: '#fff'
467+
config: 'NOTIFY.incoming.involvedItems'
468+
description: 'admin-notify-dashboard.NOTIFY.incoming.involvedItems.description'
469+
# Configuration for outgoing messages
470+
- title: 'admin-notify-dashboard.generated-ldn'
471+
boxes:
472+
- color: '#B8DAFF'
473+
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued'
474+
config: 'NOTIFY.outgoing.queued'
475+
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued.description'
476+
- color: '#FDEEBB'
477+
title: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry'
478+
config: 'NOTIFY.outgoing.queued_for_retry'
479+
description: 'admin-notify-dashboard.NOTIFY.outgoing.queued_for_retry.description'
480+
- color: '#FDBBC7'
481+
title: 'admin-notify-dashboard.NOTIFY.outgoing.failure'
482+
config: 'NOTIFY.outgoing.failure'
483+
description: 'admin-notify-dashboard.NOTIFY.outgoing.failure.description'
484+
- color: '#43515F'
485+
title: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems'
486+
textColor: '#fff'
487+
config: 'NOTIFY.outgoing.involvedItems'
488+
description: 'admin-notify-dashboard.NOTIFY.outgoing.involvedItems.description'
489+
- color: '#D4EDDA'
490+
title: 'admin-notify-dashboard.NOTIFY.outgoing.delivered'
491+
config: 'NOTIFY.outgoing.delivered'
492+
description: 'admin-notify-dashboard.NOTIFY.outgoing.delivered.description'
493+
494+
495+
496+
497+

cypress/e2e/browse-by-author.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ describe('Browse By Author', () => {
55
cy.visit('/browse/author');
66

77
// Wait for <ds-browse-by-metadata-page> to be visible
8-
cy.get('ds-browse-by-metadata-page').should('be.visible');
8+
cy.get('ds-browse-by-metadata').should('be.visible');
99

1010
// Analyze <ds-browse-by-metadata-page> for accessibility
11-
testA11y('ds-browse-by-metadata-page');
11+
testA11y('ds-browse-by-metadata');
1212
});
1313
});

cypress/e2e/browse-by-dateissued.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ describe('Browse By Date Issued', () => {
55
cy.visit('/browse/dateissued');
66

77
// Wait for <ds-browse-by-date-page> to be visible
8-
cy.get('ds-browse-by-date-page').should('be.visible');
8+
cy.get('ds-browse-by-date').should('be.visible');
99

1010
// Analyze <ds-browse-by-date-page> for accessibility
11-
testA11y('ds-browse-by-date-page');
11+
testA11y('ds-browse-by-date');
1212
});
1313
});

cypress/e2e/browse-by-subject.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ describe('Browse By Subject', () => {
55
cy.visit('/browse/subject');
66

77
// Wait for <ds-browse-by-metadata-page> to be visible
8-
cy.get('ds-browse-by-metadata-page').should('be.visible');
8+
cy.get('ds-browse-by-metadata').should('be.visible');
99

1010
// Analyze <ds-browse-by-metadata-page> for accessibility
11-
testA11y('ds-browse-by-metadata-page');
11+
testA11y('ds-browse-by-metadata');
1212
});
1313
});

cypress/e2e/browse-by-title.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ describe('Browse By Title', () => {
55
cy.visit('/browse/title');
66

77
// Wait for <ds-browse-by-title-page> to be visible
8-
cy.get('ds-browse-by-title-page').should('be.visible');
8+
cy.get('ds-browse-by-title').should('be.visible');
99

1010
// Analyze <ds-browse-by-title-page> for accessibility
11-
testA11y('ds-browse-by-title-page');
11+
testA11y('ds-browse-by-title');
1212
});
1313
});

cypress/e2e/collection-edit.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ describe('Edit Collection > Content Source tab', () => {
4545
cy.get('#externalSourceCheck').check();
4646

4747
// Wait for the source controls to appear
48-
cy.get('ds-collection-source-controls').should('be.visible');
48+
// cy.get('ds-collection-source-controls').should('be.visible');
4949

5050
// Analyze entire page for accessibility issues
5151
testA11y('ds-collection-source');

cypress/e2e/collection-statistics.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('Collection Statistics Page', () => {
66

77
it('should load if you click on "Statistics" from a Collection page', () => {
88
cy.visit('/collections/'.concat(Cypress.env('DSPACE_TEST_COLLECTION')));
9-
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
9+
cy.get('ds-navbar ds-link-menu-item a[data-test="link-menu-item.menu.section.statistics"]').click();
1010
cy.location('pathname').should('eq', COLLECTIONSTATISTICSPAGE);
1111
});
1212

cypress/e2e/community-statistics.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ describe('Community Statistics Page', () => {
66

77
it('should load if you click on "Statistics" from a Community page', () => {
88
cy.visit('/communities/'.concat(Cypress.env('DSPACE_TEST_COMMUNITY')));
9-
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
9+
cy.get('ds-navbar ds-link-menu-item a[data-test="link-menu-item.menu.section.statistics"]').click();
1010
cy.location('pathname').should('eq', COMMUNITYSTATISTICSPAGE);
1111
});
1212

cypress/e2e/homepage-statistics.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import '../support/commands';
55
describe('Site Statistics Page', () => {
66
it('should load if you click on "Statistics" from homepage', () => {
77
cy.visit('/');
8-
cy.get('ds-navbar ds-link-menu-item a[title="Statistics"]').click();
8+
cy.get('ds-navbar ds-link-menu-item a[data-test="link-menu-item.menu.section.statistics"]').click();
99
cy.location('pathname').should('eq', '/statistics');
1010
});
1111

0 commit comments

Comments
 (0)