-
Notifications
You must be signed in to change notification settings - Fork 520
Themed Submission Components #4080
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
tdonohue
merged 10 commits into
DSpace:main
from
atmire:themed-SubmissionComponents_contribute-main
Apr 30, 2025
Merged
Changes from 9 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
858ec87
126853: Themeable SubmissionSectionContainerComponent and SubmissionF…
Atmire-Kristof 261af2a
126853: ThemedSubmissionFormComponent
Atmire-Kristof 681efd9
127047: Merge branch 'themed-SubmissionComponents_contribute-7.6' int…
da2c98a
Fix lint issues
fa8ffae
127047: Fix imports
2fc8478
127047: Fix submission-form.component.spec.ts
502597a
127047: Fix submission-edit.component.spec.ts
7864909
127047: Fix selector of SubmissionSectionContainerComponent in custom…
d269d66
127047: Remove default value of collectionModifiable and Update overr…
0aea4a7
127047: Remove unnecessary CSS variable from spec setup
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/app/submission/form/footer/themed-submission-form-footer.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import { | ||
| Component, | ||
| Input, | ||
| } from '@angular/core'; | ||
|
|
||
| import { ThemedComponent } from '../../../shared/theme-support/themed.component'; | ||
| import { SubmissionFormFooterComponent } from './submission-form-footer.component'; | ||
|
|
||
| @Component({ | ||
| selector: 'ds-submission-form-footer', | ||
| styleUrls: [], | ||
| templateUrl: '../../../shared/theme-support/themed.component.html', | ||
| standalone: true, | ||
| imports: [SubmissionFormFooterComponent], | ||
| }) | ||
| export class ThemedSubmissionFormFooterComponent extends ThemedComponent<SubmissionFormFooterComponent> { | ||
| @Input() submissionId: string; | ||
|
|
||
| protected inAndOutputNames: (keyof SubmissionFormFooterComponent & keyof this)[] = ['submissionId']; | ||
|
|
||
| protected getComponentName(): string { | ||
| return 'SubmissionFormFooterComponent'; | ||
| } | ||
|
|
||
| protected importThemedComponent(themeName: string): Promise<any> { | ||
| return import(`../../../../themes/${themeName}/app/submission/form/footer/submission-form-footer.component`); | ||
| } | ||
|
|
||
| protected importUnthemedComponent(): Promise<any> { | ||
| return import(`./submission-form-footer.component`); | ||
| } | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/app/submission/form/themed-submission-form.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| import { | ||
| Component, | ||
| Input, | ||
| } from '@angular/core'; | ||
|
|
||
| import { SubmissionDefinitionsModel } from '../../core/config/models/config-submission-definitions.model'; | ||
| import { Item } from '../../core/shared/item.model'; | ||
| import { WorkspaceitemSectionsObject } from '../../core/submission/models/workspaceitem-sections.model'; | ||
| import { ThemedComponent } from '../../shared/theme-support/themed.component'; | ||
| import { SubmissionError } from '../objects/submission-error.model'; | ||
| import { SubmissionFormComponent } from './submission-form.component'; | ||
|
|
||
| @Component({ | ||
| selector: 'ds-submission-form', | ||
| styleUrls: [], | ||
| templateUrl: '../../shared/theme-support/themed.component.html', | ||
| standalone: true, | ||
| imports: [SubmissionFormComponent], | ||
| }) | ||
| export class ThemedSubmissionFormComponent extends ThemedComponent<SubmissionFormComponent> { | ||
| @Input() collectionId: string; | ||
|
|
||
| @Input() item: Item; | ||
|
|
||
| @Input() collectionModifiable: boolean | null; | ||
|
|
||
| @Input() sections: WorkspaceitemSectionsObject; | ||
|
|
||
| @Input() submissionErrors: SubmissionError; | ||
|
|
||
| @Input() selfUrl: string; | ||
|
|
||
| @Input() submissionDefinition: SubmissionDefinitionsModel; | ||
|
|
||
| @Input() submissionId: string; | ||
|
|
||
| protected inAndOutputNames: (keyof SubmissionFormComponent & keyof this)[] = ['collectionId', 'item', 'collectionModifiable', 'sections', 'submissionErrors', 'selfUrl', 'submissionDefinition', 'submissionId']; | ||
|
|
||
| protected getComponentName(): string { | ||
| return 'SubmissionFormComponent'; | ||
| } | ||
|
|
||
| protected importThemedComponent(themeName: string): Promise<any> { | ||
| return import(`../../../themes/${themeName}/app/submission/form/submission-form.component`); | ||
| } | ||
|
|
||
| protected importUnthemedComponent(): Promise<any> { | ||
| return import(`./submission-form.component`); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
src/app/submission/sections/container/themed-section-container.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,35 @@ | ||
| import { | ||
| Component, | ||
| Input, | ||
| } from '@angular/core'; | ||
|
|
||
| import { ThemedComponent } from '../../../shared/theme-support/themed.component'; | ||
| import { SectionDataObject } from '../models/section-data.model'; | ||
| import { SubmissionSectionContainerComponent } from './section-container.component'; | ||
|
|
||
| @Component({ | ||
| selector: 'ds-submission-section-container', | ||
| styleUrls: [], | ||
| templateUrl: '../../../shared/theme-support/themed.component.html', | ||
| standalone: true, | ||
| imports: [SubmissionSectionContainerComponent], | ||
| }) | ||
| export class ThemedSubmissionSectionContainerComponent extends ThemedComponent<SubmissionSectionContainerComponent> { | ||
| @Input() collectionId: string; | ||
| @Input() sectionData: SectionDataObject; | ||
| @Input() submissionId: string; | ||
|
|
||
| protected inAndOutputNames: (keyof SubmissionSectionContainerComponent & keyof this)[] = ['collectionId', 'sectionData', 'submissionId']; | ||
|
|
||
| protected getComponentName(): string { | ||
| return 'SubmissionSectionContainerComponent'; | ||
| } | ||
|
|
||
| protected importThemedComponent(themeName: string): Promise<any> { | ||
| return import(`../../../../themes/${themeName}/app/submission/sections/container/section-container.component`); | ||
| } | ||
|
|
||
| protected importUnthemedComponent(): Promise<any> { | ||
| return import(`./section-container.component`); | ||
| } | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
20 changes: 20 additions & 0 deletions
20
src/themes/custom/app/submission/form/footer/submission-form-footer.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| import { CommonModule } from '@angular/common'; | ||
| import { Component } from '@angular/core'; | ||
| import { TranslateModule } from '@ngx-translate/core'; | ||
|
|
||
| import { BtnDisabledDirective } from '../../../../../../app/shared/btn-disabled.directive'; | ||
| import { BrowserOnlyPipe } from '../../../../../../app/shared/utils/browser-only.pipe'; | ||
| import { SubmissionFormFooterComponent as BaseComponent } from '../../../../../../app/submission/form/footer/submission-form-footer.component'; | ||
|
|
||
| @Component({ | ||
| selector: 'ds-themed-submission-form-footer', | ||
| // styleUrls: ['./submission-form-footer.component.scss'], | ||
| styleUrls: ['../../../../../../app/submission/form/footer/submission-form-footer.component.scss'], | ||
| // templateUrl: './submission-form-footer.component.html' | ||
| templateUrl: '../../../../../../app/submission/form/footer/submission-form-footer.component.html', | ||
| standalone: true, | ||
| imports: [CommonModule, BrowserOnlyPipe, TranslateModule, BtnDisabledDirective], | ||
| }) | ||
| export class SubmissionFormFooterComponent extends BaseComponent { | ||
|
|
||
| } |
Empty file.
Empty file.
31 changes: 31 additions & 0 deletions
31
src/themes/custom/app/submission/form/submission-form.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| import { CommonModule } from '@angular/common'; | ||
| import { Component } from '@angular/core'; | ||
|
|
||
| import { ThemedLoadingComponent } from '../../../../../app/shared/loading/themed-loading.component'; | ||
| import { SubmissionFormCollectionComponent } from '../../../../../app/submission/form/collection/submission-form-collection.component'; | ||
| import { ThemedSubmissionFormFooterComponent } from '../../../../../app/submission/form/footer/themed-submission-form-footer.component'; | ||
| import { SubmissionFormSectionAddComponent } from '../../../../../app/submission/form/section-add/submission-form-section-add.component'; | ||
| import { SubmissionFormComponent as BaseComponent } from '../../../../../app/submission/form/submission-form.component'; | ||
| import { ThemedSubmissionUploadFilesComponent } from '../../../../../app/submission/form/submission-upload-files/themed-submission-upload-files.component'; | ||
| import { ThemedSubmissionSectionContainerComponent } from '../../../../../app/submission/sections/container/themed-section-container.component'; | ||
|
|
||
| @Component({ | ||
| selector: 'ds-themed-submission-form', | ||
| // styleUrls: ['./submission-form.component.scss'], | ||
| styleUrls: ['../../../../../app/submission/form/submission-form.component.scss'], | ||
| // templateUrl: './submission-form.component.html' | ||
| templateUrl: '../../../../../app/submission/form/submission-form.component.html', | ||
| standalone: true, | ||
| imports: [ | ||
| CommonModule, | ||
| ThemedLoadingComponent, | ||
| ThemedSubmissionSectionContainerComponent, | ||
| ThemedSubmissionFormFooterComponent, | ||
| ThemedSubmissionUploadFilesComponent, | ||
| SubmissionFormCollectionComponent, | ||
| SubmissionFormSectionAddComponent, | ||
| ], | ||
| }) | ||
| export class SubmissionFormComponent extends BaseComponent { | ||
|
|
||
| } |
Empty file.
Empty file.
33 changes: 33 additions & 0 deletions
33
src/themes/custom/app/submission/sections/container/section-container.component.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,33 @@ | ||
| import { | ||
| AsyncPipe, | ||
| NgClass, | ||
| NgComponentOutlet, | ||
| } from '@angular/common'; | ||
| import { Component } from '@angular/core'; | ||
| import { NgbAccordionModule } from '@ng-bootstrap/ng-bootstrap'; | ||
| import { TranslateModule } from '@ngx-translate/core'; | ||
|
|
||
| import { AlertComponent } from '../../../../../../app/shared/alert/alert.component'; | ||
| import { SubmissionSectionContainerComponent as BaseComponent } from '../../../../../../app/submission/sections/container/section-container.component'; | ||
| import { SectionsDirective } from '../../../../../../app/submission/sections/sections.directive'; | ||
|
|
||
| @Component({ | ||
| selector: 'ds-themed-base-submission-section-container', | ||
| // styleUrls: ['./section-container.component.scss'], | ||
| styleUrls: ['../../../../../../app/submission/sections/container/section-container.component.scss'], | ||
| // templateUrl: './section-container.component.html' | ||
| templateUrl: '../../../../../../app/submission/sections/container/section-container.component.html', | ||
| standalone: true, | ||
| imports: [ | ||
| AlertComponent, | ||
| NgbAccordionModule, | ||
| NgComponentOutlet, | ||
| TranslateModule, | ||
| NgClass, | ||
| AsyncPipe, | ||
| SectionsDirective, | ||
| ], | ||
| }) | ||
| export class SubmissionSectionContainerComponent extends BaseComponent { | ||
|
|
||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.