Skip to content

Commit

Permalink
Merge branch 'main' into dev-4393
Browse files Browse the repository at this point in the history
  • Loading branch information
mpro7 authored Feb 26, 2025
2 parents aa1441d + 593c19d commit 7b89f51
Show file tree
Hide file tree
Showing 48 changed files with 1,548 additions and 561 deletions.
5 changes: 5 additions & 0 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"plugins": [
"istanbul"
]
}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ Thumbs.db

.angular
/libs/jdnconvertiblecalendar/coverage/
apps/dsp-app/coverage/
apps/dsp-app/.nyc_output/

#E2E
/.nx
Expand Down
5 changes: 5 additions & 0 deletions apps/dsp-app/cypress.config.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
// eslint-disable-next-line import/no-extraneous-dependencies
import { nxE2EPreset } from '@nx/cypress/plugins/cypress-preset';
import { defineConfig } from 'cypress';

export default defineConfig({
projectId: 'n5b5id',
e2e: {
...nxE2EPreset(__dirname),
specPattern: 'cypress/**/**/**/*.cy.ts',
excludeSpecPattern: ['*.spec.js', '*.spec.ts'],
viewportHeight: 768,
Expand All @@ -22,6 +24,8 @@ export default defineConfig({
screenshotsFolder: 'cypress/fixtures/screenshots',

setupNodeEvents(on, config) {
// eslint-disable-next-line
require('@cypress/code-coverage/task')(on, config);
on('before:browser:launch', (browser, launchOptions) => {
if (browser.name === 'chrome' && browser.isHeadless) {
// fullPage screenshot size is 1600x1400 on non-retina screens
Expand All @@ -48,6 +52,7 @@ export default defineConfig({

return launchOptions;
});
return config;
},
},
});
1 change: 1 addition & 0 deletions apps/dsp-app/cypress/support/e2e.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import './commands/api-commands';
import './commands/auth-commands';
import './commands/data-model-class-command';
import './commands/ontology-command';
import '@cypress/code-coverage/support';

const resizeObserverLoopErrRe = /^[^(ResizeObserver loop limit exceeded)]/;
Cypress.on('uncaught:exception', err => {
Expand Down
40 changes: 33 additions & 7 deletions apps/dsp-app/project.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
"targets": {
"build": {
"executor": "@angular-devkit/build-angular:browser",
"outputs": ["{options.outputPath}"],
"outputs": [
"{options.outputPath}"
],
"options": {
"outputPath": "dist/apps/dsp-app",
"index": "apps/dsp-app/src/index.html",
Expand All @@ -37,11 +39,17 @@
"output": "/assets/"
}
],
"styles": ["apps/dsp-app/src/styles.scss"],
"styles": [
"apps/dsp-app/src/styles.scss"
],
"stylePreprocessorOptions": {
"includePaths": ["apps/dsp-app/src/styles"]
"includePaths": [
"apps/dsp-app/src/styles"
]
},
"scripts": ["node_modules/openseadragon/build/openseadragon/openseadragon.min.js"]
"scripts": [
"node_modules/openseadragon/build/openseadragon/openseadragon.min.js"
]
},
"configurations": {
"production": {
Expand Down Expand Up @@ -189,7 +197,9 @@
},
"lint": {
"executor": "@nx/eslint:lint",
"outputs": ["{options.outputFile}"]
"outputs": [
"{options.outputFile}"
]
},
"test": {
"executor": "@angular-devkit/build-angular:karma",
Expand All @@ -199,8 +209,12 @@
"tsConfig": "apps/dsp-app/tsconfig.spec.json",
"inlineStyleLanguage": "scss",
"karmaConfig": "apps/dsp-app/karma.conf.js",
"styles": ["apps/dsp-app/src/styles.scss"],
"scripts": ["node_modules/openseadragon/build/openseadragon/openseadragon.min.js"],
"styles": [
"apps/dsp-app/src/styles.scss"
],
"scripts": [
"node_modules/openseadragon/build/openseadragon/openseadragon.min.js"
],
"assets": [
"apps/dsp-app/src/favicon.ico",
"apps/dsp-app/src/config",
Expand Down Expand Up @@ -242,8 +256,20 @@
"env": {
"API_URL": "http://0.0.0.0:3333/api"
}
},
"coverage": {
"devServerTarget": "dsp-app:serve-app-e2e"
}
}
},
"serve-app-e2e": {
"executor": "ngx-build-plus:dev-server",
"defaultConfiguration": "",
"options": {
"browserTarget": "dsp-app:build:development",
"extraWebpackConfig": "./webpack.coverage.js",
"port": 3000
}
}
}
}
16 changes: 3 additions & 13 deletions apps/dsp-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {
UsersComponent,
} from '@dasch-swiss/vre/pages/system/system';
import { OverviewComponent, UserComponent } from '@dasch-swiss/vre/pages/user-settings/user';
import { ResourcePage2Component, ResourcePageComponent } from '@dasch-swiss/vre/resource-editor/resource-editor';
import { ResourcePageComponent, SingleResourcePageComponent } from '@dasch-swiss/vre/resource-editor/resource-editor';
import { CreateResourcePageComponent } from '@dasch-swiss/vre/resource-editor/resource-properties';
import { StatusComponent } from '@dasch-swiss/vre/shared/app-common-to-move';
import { HelpPageComponent } from '@dasch-swiss/vre/shared/app-help-page';
Expand Down Expand Up @@ -171,18 +171,8 @@ const routes: Routes = [
],
},
{
path: RouteConstants.resource,
children: [
{
path: RouteConstants.projectResourceValueRelative,
component: ResourcePage2Component,
},
{
path: RouteConstants.projectResourceRelative,
component: ResourcePage2Component,
},
],
runGuardsAndResolvers: 'always',
path: RouteConstants.projectResourceRelative,
component: SingleResourcePageComponent,
},
{
path: RouteConstants.cookiePolicy,
Expand Down
19 changes: 18 additions & 1 deletion apps/dsp-app/src/assets/i18n/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,24 @@
"tooltip": "Represent a link in standoff markup from one resource to another",
"label": "has Standoff link"
},
"footnotes": "Fussnoten"
"footnotes": "Fussnoten",
"permissions": {
"groups": {
"projectAdmin": "Project Admin",
"creator": "Creator",
"projectMember": "Project Member",
"knownUser": "Known User",
"unknownUser": "Unknown User",
"usersPermissions": "Your permissions"
},
"interactions": {
"restrictedView": "Restricted view permission (RV)",
"view": "View permission (V)",
"modify": "Modify permission (M)",
"delete": "Delete permission (D)",
"changeRights": "Change rights permission (CR)"
}
}
},
"searchPanel": {
"howToSearch": "Wie suchen?",
Expand Down
19 changes: 18 additions & 1 deletion apps/dsp-app/src/assets/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,24 @@
"tooltip": "Represent a link in standoff markup from one resource to another",
"label": "has Standoff link"
},
"footnotes": "Footnotes"
"footnotes": "Footnotes",
"permissions": {
"groups": {
"projectAdmin": "Project Admin",
"creator": "Creator",
"projectMember": "Project Member",
"knownUser": "Known User",
"unknownUser": "Unknown User",
"usersPermissions": "Your permissions"
},
"interactions": {
"restrictedView": "Restricted view permission (RV)",
"view": "View permission (V)",
"modify": "Modify permission (M)",
"delete": "Delete permission (D)",
"changeRights": "Change rights permission (CR)"
}
}
},
"searchPanel": {
"howToSearch": "How to search",
Expand Down
19 changes: 18 additions & 1 deletion apps/dsp-app/src/assets/i18n/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,24 @@
"tooltip": "Represent a link in standoff markup from one resource to another",
"label": "has Standoff link"
},
"footnotes": "Notes"
"footnotes": "Notes",
"permissions": {
"groups": {
"projectAdmin": "Project Admin",
"creator": "Creator",
"projectMember": "Project Member",
"knownUser": "Known User",
"unknownUser": "Unknown User",
"usersPermissions": "Your permissions"
},
"interactions": {
"restrictedView": "Restricted view permission (RV)",
"view": "View permission (V)",
"modify": "Modify permission (M)",
"delete": "Delete permission (D)",
"changeRights": "Change rights permission (CR)"
}
}
},
"searchPanel": {
"howToSearch": "How to search",
Expand Down
19 changes: 18 additions & 1 deletion apps/dsp-app/src/assets/i18n/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,24 @@
"tooltip": "Represent a link in standoff markup from one resource to another",
"label": "has Standoff link"
},
"footnotes": "Footnotes"
"footnotes": "Footnotes",
"permissions": {
"groups": {
"projectAdmin": "Project Admin",
"creator": "Creator",
"projectMember": "Project Member",
"knownUser": "Known User",
"unknownUser": "Unknown User",
"usersPermissions": "Your permissions"
},
"interactions": {
"restrictedView": "Restricted view permission (RV)",
"view": "View permission (V)",
"modify": "Modify permission (M)",
"delete": "Delete permission (D)",
"changeRights": "Change rights permission (CR)"
}
}
},
"searchPanel": {
"howToSearch": "How to search",
Expand Down
19 changes: 18 additions & 1 deletion apps/dsp-app/src/assets/i18n/rm.json
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,24 @@
"tooltip": "Represent a link in standoff markup from one resource to another",
"label": "has Standoff link"
},
"footnotes": "Footnotes"
"footnotes": "Footnotes",
"permissions": {
"groups": {
"projectAdmin": "Project Admin",
"creator": "Creator",
"projectMember": "Project Member",
"knownUser": "Known User",
"unknownUser": "Unknown User",
"usersPermissions": "Your permissions"
},
"interactions": {
"restrictedView": "Restricted view permission (RV)",
"view": "View permission (V)",
"modify": "Modify permission (M)",
"delete": "Delete permission (D)",
"changeRights": "Change rights permission (CR)"
}
}
},
"searchPanel": {
"howToSearch": "How to search",
Expand Down
4 changes: 1 addition & 3 deletions libs/vre/core/config/src/lib/app-config/app-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,12 +88,10 @@ export class RouteConstants {
static readonly projectsRelative = `/${RouteConstants.projects}`;
static readonly projectRelative = `/${RouteConstants.project}`;
static readonly projectEditRelative = `${RouteConstants.settings}/${RouteConstants.edit}`;
static readonly newProjectRelative = `/${RouteConstants.project}/${RouteConstants.createNew}`;
static readonly ontologyRelative = `${RouteConstants.ontology}/:${RouteConstants.ontoParameter}`;
static readonly projectUuidRelative = `${RouteConstants.project}/:${RouteConstants.uuidParameter}`;
static readonly createNewProjectRelative = `${RouteConstants.project}/${RouteConstants.createNew}`;
static readonly projectResourceValueRelative = `:${RouteConstants.projectParameter}/:${RouteConstants.resourceParameter}/:${RouteConstants.valueParameter}`;
static readonly projectResourceRelative = `:${RouteConstants.projectParameter}/:${RouteConstants.resourceParameter}`;
static readonly projectResourceRelative = `${RouteConstants.resource}/:${RouteConstants.projectParameter}/:${RouteConstants.resourceParameter}`;

static readonly OntologyEditorViewRelative = `${RouteConstants.ontology}/:${RouteConstants.ontoParameter}/${RouteConstants.editor}/:${RouteConstants.viewParameter}`;
static readonly OntologyClassAddRelative = `${RouteConstants.ontology}/:${RouteConstants.ontoParameter}/:${RouteConstants.classParameter}/${RouteConstants.addClassInstance}`;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ export class ListViewComponent implements OnChanges, OnInit, OnDestroy {
this.initSearch();
});
}
}),
this._componentCommsService.on([Events.resourceDeleted], () => this.doSearch())
})
);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ import { ResourceUtil } from '../resource.util';
<mat-menu #more="matMenu" class="representation-menu">
<button mat-menu-item (click)="openIIIFnewTab()">Open audio in new tab</button>
<button mat-menu-item [cdkCopyToClipboard]="src.fileValue.fileUrl">Copy audio URL to clipboard</button>
<button mat-menu-item (click)="download(src.fileValue.fileUrl)">Download audio</button>
<button mat-menu-item (click)="download()">Download audio</button>
<button mat-menu-item [disabled]="!userCanEdit" (click)="openReplaceFileDialog()">Replace file</button>
</mat-menu>`,
})
Expand Down Expand Up @@ -75,7 +75,7 @@ export class AudioMoreButtonComponent {
window.open(this.src.fileValue.fileUrl, '_blank');
}

download(url: string) {
download() {
this._rs.downloadProjectFile(this.src.fileValue, this.parentResource);
}

Expand Down

This file was deleted.

Empty file.
Loading

0 comments on commit 7b89f51

Please sign in to comment.