+ The Conflict of Interest (COI) assertion is made on behalf of all the authors listed for this preprint. COIs + include: financial involvement in any entity such as honoraria, grants, speaking fees, employment, consultancies, + stock ownership, expert testimony, and patents or licenses. COIs can also include non-financial interests such as + personal or professional relationships or pre-existing beliefs in the subject matter or materials discussed in + this preprint. +
+ ++ Data refers to raw and/or processed information (quantitative or qualitative) used for the analyses, case studies, + and/or descriptive interpretation in the preprint. Public data could include data posted to open-access + repositories, public archival library collection, or government archive. For data that is available under limited + circumstances (e.g., after signing a data sharing agreement), choose the ‘No’ option and use the comment box to + explain how others could access the data. +
+ ++ A preregistration is a description of the research design and/or analysis plan that is created and registered + before researchers collected data or before they have seen/interacted with preexisting data. The description + should appear in a public registry (e.g., clinicaltrials.gov, OSF, AEA registry). +
+No such step
} diff --git a/src/app/features/preprints/pages/submit-preprint-stepper/submit-preprint-stepper.component.ts b/src/app/features/preprints/pages/submit-preprint-stepper/submit-preprint-stepper.component.ts index a9d946efb..aea1de1c9 100644 --- a/src/app/features/preprints/pages/submit-preprint-stepper/submit-preprint-stepper.component.ts +++ b/src/app/features/preprints/pages/submit-preprint-stepper/submit-preprint-stepper.component.ts @@ -22,6 +22,7 @@ import { MetadataStepComponent, TitleAndAbstractStepComponent, } from '@osf/features/preprints/components'; +import { AuthorAssertionsStepComponent } from '@osf/features/preprints/components/stepper/author-assertion-step/author-assertions-step.component'; import { submitPreprintSteps } from '@osf/features/preprints/constants'; import { SubmitSteps } from '@osf/features/preprints/enums'; import { GetPreprintProviderById, PreprintProvidersSelectors } from '@osf/features/preprints/store/preprint-providers'; @@ -35,7 +36,14 @@ import { BrowserTabHelper, HeaderStyleHelper, IS_WEB } from '@shared/utils'; @Component({ selector: 'osf-submit-preprint-stepper', - imports: [Skeleton, StepperComponent, TitleAndAbstractStepComponent, FileStepComponent, MetadataStepComponent], + imports: [ + Skeleton, + StepperComponent, + TitleAndAbstractStepComponent, + FileStepComponent, + MetadataStepComponent, + AuthorAssertionsStepComponent, + ], templateUrl: './submit-preprint-stepper.component.html', styleUrl: './submit-preprint-stepper.component.scss', changeDetection: ChangeDetectionStrategy.OnPush, diff --git a/src/app/features/preprints/services/preprints.service.ts b/src/app/features/preprints/services/preprints.service.ts index af95335f2..0668a8060 100644 --- a/src/app/features/preprints/services/preprints.service.ts +++ b/src/app/features/preprints/services/preprints.service.ts @@ -22,6 +22,15 @@ export class PreprintsService { doi: 'doi', customPublicationCitation: 'custom_publication_citation', tags: 'tags', + hasCoi: 'has_coi', + coiStatement: 'conflict_of_interest_statement', + hasDataLinks: 'has_data_links', + dataLinks: 'data_links', + whyNoData: 'why_no_data', + hasPreregLinks: 'has_prereg_links', + preregLinks: 'prereg_links', + whyNoPrereg: 'why_no_prereg', + preregLinkInfo: 'prereg_link_info', }; createPreprint(title: string, abstract: string, providerId: string) { diff --git a/src/app/features/settings/developer-apps/components/developer-app-add-edit-form/developer-app-add-edit-form.component.ts b/src/app/features/settings/developer-apps/components/developer-app-add-edit-form/developer-app-add-edit-form.component.ts index 5c21d6e6b..7475ef369 100644 --- a/src/app/features/settings/developer-apps/components/developer-app-add-edit-form/developer-app-add-edit-form.component.ts +++ b/src/app/features/settings/developer-apps/components/developer-app-add-edit-form/developer-app-add-edit-form.component.ts @@ -12,8 +12,7 @@ import { toSignal } from '@angular/core/rxjs-interop'; import { FormControl, FormGroup, ReactiveFormsModule, Validators } from '@angular/forms'; import { Router } from '@angular/router'; -import { linkValidator } from '@osf/core/helpers'; -import { IS_XSMALL } from '@osf/shared/utils'; +import { CustomValidators, IS_XSMALL } from '@osf/shared/utils'; import { DeveloperApp, DeveloperAppCreateUpdate, DeveloperAppForm, DeveloperAppFormFormControls } from '../../models'; import { CreateDeveloperApp, UpdateDeveloperApp } from '../../store'; @@ -41,14 +40,14 @@ export class DeveloperAppAddEditFormComponent implements OnInit { }), [DeveloperAppFormFormControls.ProjectHomePageUrl]: new FormControl('', { nonNullable: true, - validators: [Validators.required, linkValidator()], + validators: [Validators.required, CustomValidators.linkValidator()], }), [DeveloperAppFormFormControls.AppDescription]: new FormControl('', { nonNullable: false, }), [DeveloperAppFormFormControls.AuthorizationCallbackUrl]: new FormControl('', { nonNullable: true, - validators: [Validators.required, linkValidator()], + validators: [Validators.required, CustomValidators.linkValidator()], }), }); diff --git a/src/app/shared/components/text-input/text-input.component.ts b/src/app/shared/components/text-input/text-input.component.ts index 3b37fb94d..4a7a027d0 100644 --- a/src/app/shared/components/text-input/text-input.component.ts +++ b/src/app/shared/components/text-input/text-input.component.ts @@ -43,6 +43,10 @@ export class TextInputComponent { return { key: INPUT_VALIDATION_MESSAGES.email }; } + if (errors['link']) { + return { key: INPUT_VALIDATION_MESSAGES.link }; + } + if (errors['maxlength']) return { key: INPUT_VALIDATION_MESSAGES.maxLength, diff --git a/src/app/shared/constants/input-validation-messages.const.ts b/src/app/shared/constants/input-validation-messages.const.ts index ea17320af..8655c9dbc 100644 --- a/src/app/shared/constants/input-validation-messages.const.ts +++ b/src/app/shared/constants/input-validation-messages.const.ts @@ -4,4 +4,5 @@ export const INPUT_VALIDATION_MESSAGES = { maxLength: 'validation.maxLength', minLength: 'validation.minLength', invalidInput: 'validation.invalidInput', + link: 'validation.link', }; diff --git a/src/app/shared/utils/custom-form-validators.helper.ts b/src/app/shared/utils/custom-form-validators.helper.ts index 6e49ab71d..935966456 100644 --- a/src/app/shared/utils/custom-form-validators.helper.ts +++ b/src/app/shared/utils/custom-form-validators.helper.ts @@ -25,4 +25,19 @@ export class CustomValidators { return isValid ? null : { email: { value: control.value } }; }; } + + static linkValidator(): ValidatorFn { + return (control: AbstractControl): ValidationErrors | null => { + const value = control.value; + if (!value) { + return null; + } + + const urlPattern = /^(https):\/\/.+/i; + + const isValid = urlPattern.test(value); + + return isValid ? null : { link: true }; + }; + } } diff --git a/src/assets/i18n/en.json b/src/assets/i18n/en.json index c56fade29..ad612fb3b 100644 --- a/src/assets/i18n/en.json +++ b/src/assets/i18n/en.json @@ -1610,7 +1610,6 @@ "step2InfoText": "If your project includes components, you can select which components to include or exclude at the end of the registration." }, "selectProject": "Select your project", - "createDraft": "Create draft", "createdSuccessfully": "Draft created successfully" }, @@ -1745,7 +1744,8 @@ "email": "Please enter a valid email address.", "maxLength": "The field must be at most {{length}} characters.", "minLength": "The field must be at least {{length}} characters.", - "invalidInput": "Invalid input." + "invalidInput": "Invalid input.", + "link": "This field must start with https:// to be a valid url." }, "searchHelpTutorial": { "step1": {