Skip to content

Commit

Permalink
refactor: regroup resource editor nx libs (#1916)
Browse files Browse the repository at this point in the history
  • Loading branch information
derschnee68 authored Nov 25, 2024
1 parent 6ef3507 commit 243da18
Show file tree
Hide file tree
Showing 221 changed files with 147 additions and 139 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UploadedFileResponse } from '@dasch-swiss/vre/shared/app-representations';
import { UploadedFileResponse } from '@dasch-swiss/vre/resource-editor/representations';
import { faker } from '@faker-js/faker';
import { ThingPictureClass } from '../../models/existing-data-models';
import { UserProfiles } from '../../models/user-profiles';
Expand Down Expand Up @@ -78,7 +78,7 @@ describe('Check project admin existing resource functionality', () => {
cy.url().should('match', regex);
});

it('ThingPicture resource should not be deletable or erasable', () => {
it.skip('ThingPicture resource should not be deletable or erasable', () => {
project0001Page.visitClass('ThingPicture');
cy.get('[data-cy=resource-list-item] h3.res-class-value').contains(thingPictureData.label).click();
cy.get('[data-cy=resource-toolbar-more-button]').should('not.exist');
Expand All @@ -101,7 +101,7 @@ describe('Check project admin existing resource functionality', () => {
cy.get('[data-cy=property-value-comment]').contains(thingPictureData.titles[0].comment);
});

it('ThingPicture resource should be editable', () => {
it.skip('ThingPicture resource should be editable', () => {
project0001Page.visitClass('ThingPicture');
cy.get('[data-cy=resource-list-item] h3.res-class-value').contains(thingPictureData.label).click();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { UploadedFileResponse } from '@dasch-swiss/vre/shared/app-representations';
import { UploadedFileResponse } from '@dasch-swiss/vre/resource-editor/representations';
import { faker } from '@faker-js/faker';
import { ThingPictureClass } from '../../models/existing-data-models';
import { UserProfiles } from '../../models/user-profiles';
Expand Down
6 changes: 3 additions & 3 deletions apps/dsp-app/src/app/app-routing.module.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ResourcePage2Component, ResourcePageComponent } 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 { RouteConstants } from '@dasch-swiss/vre/shared/app-config';
import { HelpPageComponent } from '@dasch-swiss/vre/shared/app-help-page';
import { CreateListInfoPageComponent, ListPageComponent } from '@dasch-swiss/vre/shared/app-list';
import { DataModelsComponent, OntologyComponent, OntologyFormComponent } from '@dasch-swiss/vre/shared/app-ontology';
import { DataModelsComponent, OntologyComponent } from '@dasch-swiss/vre/shared/app-ontology';
import { OntologyClassInstanceComponent } from '@dasch-swiss/vre/shared/app-ontology-classes';
import {
CollaborationComponent,
Expand All @@ -13,8 +15,6 @@ import {
EditProjectFormPageComponent,
ProjectComponent,
} from '@dasch-swiss/vre/shared/app-project';
import { ResourcePage2Component, ResourcePageComponent } from '@dasch-swiss/vre/shared/app-resource-page';
import { CreateResourcePageComponent } from '@dasch-swiss/vre/shared/app-resource-properties';
import { AdvancedSearchContainerComponent, ResultsComponent } from '@dasch-swiss/vre/shared/app-search';
import { ImageSettingsComponent, SettingsPageComponent } from '@dasch-swiss/vre/shared/app-settings-page';
import {
Expand Down
10 changes: 5 additions & 5 deletions apps/dsp-app/src/app/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ import { CKEditorModule } from '@ckeditor/ckeditor5-angular';
import { MatJDNConvertibleCalendarDateAdapterModule } from '@dasch-swiss/jdnconvertiblecalendardateadapter';
import { AdvancedSearchComponent } from '@dasch-swiss/vre/advanced-search';
import { BASE_PATH } from '@dasch-swiss/vre/open-api';
import { MathJaxComponents } from '@dasch-swiss/vre/resource-editor/mathjax';
import { RepresentationsComponents } from '@dasch-swiss/vre/resource-editor/representations';
import { ResourcePageComponents } from '@dasch-swiss/vre/resource-editor/resource-editor';
import { ResourcePropertiesComponents } from '@dasch-swiss/vre/resource-editor/resource-properties';
import { SegmentSupportComponents } from '@dasch-swiss/vre/resource-editor/segment-support';
import { PendoAnalyticsService } from '@dasch-swiss/vre/shared/app-analytics';
import { CommonToMoveComponents } from '@dasch-swiss/vre/shared/app-common-to-move';
import {
Expand All @@ -25,7 +30,6 @@ import { AppErrorHandler } from '@dasch-swiss/vre/shared/app-error-handler';
import { HelpPageComponents } from '@dasch-swiss/vre/shared/app-help-page';
import { LocalizationService } from '@dasch-swiss/vre/shared/app-helper-services';
import { ListComponents } from '@dasch-swiss/vre/shared/app-list';
import { MathJaxComponents } from '@dasch-swiss/vre/shared/app-mathjax';
import { NotificationService } from '@dasch-swiss/vre/shared/app-notification';
import { OntologyComponents } from '@dasch-swiss/vre/shared/app-ontology';
import { OntologyClassesComponents } from '@dasch-swiss/vre/shared/app-ontology-classes';
Expand All @@ -35,11 +39,7 @@ import {
} from '@dasch-swiss/vre/shared/app-progress-indicator';
import { ProjectComponents } from '@dasch-swiss/vre/shared/app-project';
import { PropertyFormComponents } from '@dasch-swiss/vre/shared/app-property-form';
import { RepresentationsComponents } from '@dasch-swiss/vre/shared/app-representations';
import { ResourcePageComponents } from '@dasch-swiss/vre/shared/app-resource-page';
import { ResourcePropertiesComponents } from '@dasch-swiss/vre/shared/app-resource-properties';
import { SearchComponents } from '@dasch-swiss/vre/shared/app-search';
import { SegmentSupportComponents } from '@dasch-swiss/vre/shared/app-segment-support';
import { SettingsPageComponents } from '@dasch-swiss/vre/shared/app-settings-page';
import { NgxsStoreModule } from '@dasch-swiss/vre/shared/app-state';
import {
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* eslint-disable */
export default {
displayName: 'vre-shared-app-mathjax',
displayName: 'vre-resource-editor-mathjax',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../../../coverage/libs/vre/shared/app-mathjax',
coverageDirectory: '../../../../coverage/libs/vre/resource-editor/mathjax',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
Expand All @@ -18,5 +18,5 @@ export default {
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
]
],
};
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vre-shared-app-mathjax",
"name": "vre-resource-editor-mathjax",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/vre/shared/app-mathjax/src",
"sourceRoot": "libs/vre/resource-editor/mathjax/src",
"prefix": "dasch-swiss",
"tags": [],
"projectType": "library",
Expand All @@ -12,7 +12,7 @@
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "libs/vre/shared/app-mathjax/jest.config.ts",
"jestConfig": "libs/vre/resource-editor/mathjax/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
Expand All @@ -29,8 +29,8 @@
],
"options": {
"lintFilePatterns": [
"libs/vre/shared/app-mathjax/**/*.ts",
"libs/vre/shared/app-mathjax/**/*.html"
"libs/vre/resource-editor/mathjax/**/*.ts",
"libs/vre/resource-editor/mathjax/**/*.html"
]
}
}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"target": "es2016",
"types": ["jest", "node"]
},
"files": ["src/test-setup.ts"],
"files": [
"src/test-setup.ts"
],
"include": [
"jest.config.ts",
"src/**/*.test.ts",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vre-shared-app-resource-page",
"name": "vre-resource-editor-representations",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/vre/shared/app-resource-page/src",
"sourceRoot": "libs/vre/resource-editor/representations/src",
"prefix": "dasch-swiss",
"tags": [],
"projectType": "library",
Expand All @@ -12,7 +12,7 @@
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "libs/vre/shared/app-resource-page/jest.config.ts",
"jestConfig": "libs/vre/resource-editor/representations/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
Expand All @@ -29,8 +29,8 @@
],
"options": {
"lintFilePatterns": [
"libs/vre/shared/app-resource-page/**/*.ts",
"libs/vre/shared/app-resource-page/**/*.html"
"libs/vre/resource-editor/representations/**/*.ts",
"libs/vre/resource-editor/representations/**/*.html"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
import { Component, Input, OnInit, ViewContainerRef } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ReadResource } from '@dasch-swiss/dsp-js';
import {
CreateSegmentDialogComponent,
CreateSegmentDialogProps,
} from '@dasch-swiss/vre/resource-editor/segment-support';
import { DspDialogConfig } from '@dasch-swiss/vre/shared/app-config';
import { CreateSegmentDialogComponent, CreateSegmentDialogProps } from '@dasch-swiss/vre/shared/app-segment-support';
import { MediaPlayerService } from '../video/media-player.service';

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChangeDetectorRef, Component, Input, OnChanges, OnDestroy, OnInit, SimpleChanges } from '@angular/core';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { ReadResource } from '@dasch-swiss/dsp-js';
import { MediaControlService, SegmentsService } from '@dasch-swiss/vre/resource-editor/segment-support';
import { NotificationService } from '@dasch-swiss/vre/shared/app-notification';
import { MediaControlService, SegmentsService } from '@dasch-swiss/vre/shared/app-segment-support';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { FileRepresentation } from '../file-representation';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,11 @@ import { Component, EventEmitter, Input, Output, ViewContainerRef } from '@angul
import { MatDialog } from '@angular/material/dialog';
import { TooltipPosition } from '@angular/material/tooltip';
import { ReadResource } from '@dasch-swiss/dsp-js';
import {
CreateSegmentDialogComponent,
CreateSegmentDialogProps,
} from '@dasch-swiss/vre/resource-editor/segment-support';
import { DspDialogConfig } from '@dasch-swiss/vre/shared/app-config';
import { CreateSegmentDialogComponent, CreateSegmentDialogProps } from '@dasch-swiss/vre/shared/app-segment-support';
import { FileRepresentation } from '../file-representation';
import { MovingImageSidecar } from '../moving-image-sidecar';
import { MediaPlayerService } from './media-player.service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import {
} from '@angular/core';
import { DomSanitizer, SafeUrl } from '@angular/platform-browser';
import { ReadResource } from '@dasch-swiss/dsp-js';
import { MediaControlService, SegmentsService } from '@dasch-swiss/vre/resource-editor/segment-support';
import { NotificationService } from '@dasch-swiss/vre/shared/app-notification';
import { MediaControlService, SegmentsService } from '@dasch-swiss/vre/shared/app-segment-support';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { PointerValue } from '../av-timeline/av-timeline.component';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ export default {
displayName: 'vre-shared-app-resource-page',
preset: '../../../../jest.preset.js',
setupFilesAfterEnv: ['<rootDir>/src/test-setup.ts'],
coverageDirectory: '../../../../coverage/libs/vre/shared/app-resource-page',
coverageDirectory: '../../../../coverage/libs/vre/resource-editor/resource-editor',
transform: {
'^.+\\.(ts|mjs|js|html)$': [
'jest-preset-angular',
Expand All @@ -18,5 +18,5 @@ export default {
'jest-preset-angular/build/serializers/no-ng-attributes',
'jest-preset-angular/build/serializers/ng-snapshot',
'jest-preset-angular/build/serializers/html-comment',
]
],
};
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "../../../../node_modules/ng-packagr/ng-package.schema.json",
"dest": "../../../../dist/libs/vre/shared/app-resource-page",
"dest": "../../../../dist/libs/vre/resource-editor/resource-editor",
"lib": {
"entryFile": "src/index.ts"
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "@dasch-swiss/vre/shared/app-resource-page",
"name": "@dasch-swiss/vre/resource-editor/resource-editor",
"version": "0.0.1",
"peerDependencies": {
"@angular/common": "^16.2.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "vre-shared-app-representations",
"name": "vre-resource-editor-resource-editor",
"$schema": "../../../../node_modules/nx/schemas/project-schema.json",
"sourceRoot": "libs/vre/shared/app-representations/src",
"sourceRoot": "libs/vre/resource-editor/resource-editor/src",
"prefix": "dasch-swiss",
"tags": [],
"projectType": "library",
Expand All @@ -12,7 +12,7 @@
"{workspaceRoot}/coverage/{projectRoot}"
],
"options": {
"jestConfig": "libs/vre/shared/app-representations/jest.config.ts",
"jestConfig": "libs/vre/resource-editor/resource-editor/jest.config.ts",
"passWithNoTests": true
},
"configurations": {
Expand All @@ -29,8 +29,8 @@
],
"options": {
"lintFilePatterns": [
"libs/vre/shared/app-representations/**/*.ts",
"libs/vre/shared/app-representations/**/*.html"
"libs/vre/resource-editor/resource-editor/**/*.ts",
"libs/vre/resource-editor/resource-editor/**/*.html"
]
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Component, Input, OnDestroy, OnInit } from '@angular/core';
import { RegionService } from '@dasch-swiss/vre/resource-editor/representations';
import { DspResource, ResourceService } from '@dasch-swiss/vre/shared/app-common';
import { RouteConstants } from '@dasch-swiss/vre/shared/app-config';
import { RegionService } from '@dasch-swiss/vre/shared/app-representations';
import { Subscription } from 'rxjs';
import { take } from 'rxjs/operators';

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { ChangeDetectorRef, Inject, Injectable } from '@angular/core';
import { KnoraApiConnection, ReadResource, ReadResourceSequence, SystemPropertyDefinition } from '@dasch-swiss/dsp-js';
import { RegionService } from '@dasch-swiss/vre/resource-editor/representations';
import { DspCompoundPosition, DspResource, GenerateProperty } from '@dasch-swiss/vre/shared/app-common';
import { IncomingService } from '@dasch-swiss/vre/shared/app-common-to-move';
import { DspApiConnectionToken } from '@dasch-swiss/vre/shared/app-config';
import { AppError } from '@dasch-swiss/vre/shared/app-error-handler';
import { RegionService } from '@dasch-swiss/vre/shared/app-representations';
import { GetAttachedProjectAction, GetAttachedUserAction } from '@dasch-swiss/vre/shared/app-state';
import { Store } from '@ngxs/store';
import { BehaviorSubject } from 'rxjs';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ChangeDetectorRef, Component, Input, OnChanges, OnDestroy } from '@angular/core';
import { ResourceFetcherService } from '@dasch-swiss/vre/resource-editor/representations';
import { DspResource } from '@dasch-swiss/vre/shared/app-common';
import { ResourceFetcherService } from '@dasch-swiss/vre/shared/app-representations';
import { Subscription } from 'rxjs';

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
import { Component, Input, ViewContainerRef } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { ResourceClassDefinitionWithPropertyDefinition } from '@dasch-swiss/dsp-js';
import {
EditResourceLabelDialogComponent,
EditResourceLabelDialogProps,
} from '@dasch-swiss/vre/resource-editor/resource-properties';
import { DspResource, ResourceUtil } from '@dasch-swiss/vre/shared/app-common';
import { DspDialogConfig } from '@dasch-swiss/vre/shared/app-config';
import {
Expand All @@ -10,13 +14,9 @@ import {
OntologyService,
ProjectService,
} from '@dasch-swiss/vre/shared/app-helper-services';
import {
EditResourceLabelDialogComponent,
EditResourceLabelDialogProps,
} from '@dasch-swiss/vre/shared/app-resource-properties';
import { LoadClassItemsCountAction, ProjectsSelectors, UserSelectors } from '@dasch-swiss/vre/shared/app-state';
import { Store } from '@ngxs/store';
import { Observable, combineLatest } from 'rxjs';
import { combineLatest, Observable } from 'rxjs';
import { map } from 'rxjs/operators';

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import { Component, Input, OnChanges, OnInit } from '@angular/core';
import { Component, Input, OnChanges } from '@angular/core';
import { ReadProject } from '@dasch-swiss/dsp-js';
import { DspResource } from '@dasch-swiss/vre/shared/app-common';
import { ProjectService } from '@dasch-swiss/vre/shared/app-helper-services';
import {
FileRepresentation,
getFileValue,
RepresentationConstants,
RepresentationService,
getFileValue,
} from '@dasch-swiss/vre/shared/app-representations';
} from '@dasch-swiss/vre/resource-editor/representations';
import { DspResource } from '@dasch-swiss/vre/shared/app-common';
import { ProjectService } from '@dasch-swiss/vre/shared/app-helper-services';
import { ResourceSelectors, UserSelectors } from '@dasch-swiss/vre/shared/app-state';
import { Store } from '@ngxs/store';
import { Observable, combineLatest } from 'rxjs';
import { combineLatest, Observable } from 'rxjs';
import { map } from 'rxjs/operators';

@Component({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ChangeDetectorRef, Component, Input, OnDestroy, OnInit } from '@angular/core';
import { Constants } from '@dasch-swiss/dsp-js';
import { RegionService } from '@dasch-swiss/vre/resource-editor/representations';
import { SegmentsService } from '@dasch-swiss/vre/resource-editor/segment-support';
import { DspResource } from '@dasch-swiss/vre/shared/app-common';
import { RegionService } from '@dasch-swiss/vre/shared/app-representations';
import { SegmentsService } from '@dasch-swiss/vre/shared/app-segment-support';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';
import { CompoundService } from './compound/compound.service';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import { ChangeDetectorRef, Component, EventEmitter, Input, OnInit, Output, ViewContainerRef } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { AdminProjectsApiService } from '@dasch-swiss/vre/open-api';
import { DspResource, ResourceService, ResourceUtil } from '@dasch-swiss/vre/shared/app-common';
import { NotificationService } from '@dasch-swiss/vre/shared/app-notification';
import { ResourceFetcherService } from '@dasch-swiss/vre/shared/app-representations';
import { ResourceFetcherService } from '@dasch-swiss/vre/resource-editor/representations';
import {
DeleteResourceDialogComponent,
DeleteResourceDialogProps,
EditResourceLabelDialogComponent,
EditResourceLabelDialogProps,
EraseResourceDialogComponent,
EraseResourceDialogProps,
} from '@dasch-swiss/vre/shared/app-resource-properties';
} from '@dasch-swiss/vre/resource-editor/resource-properties';
import { DspResource, ResourceService, ResourceUtil } from '@dasch-swiss/vre/shared/app-common';
import { NotificationService } from '@dasch-swiss/vre/shared/app-notification';
import { filter } from 'rxjs/operators';

@Component({
Expand Down
Loading

0 comments on commit 243da18

Please sign in to comment.