Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions src/app/features/my-projects/my-projects.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Store } from '@ngxs/store';
import { TranslateModule, TranslateService } from '@ngx-translate/core';

import type { SortEvent } from 'primeng/api';
import { DropdownModule } from 'primeng/dropdown';
import { DialogService } from 'primeng/dynamicdialog';
import { Select } from 'primeng/select';
import { TablePageEvent } from 'primeng/table';
Expand Down Expand Up @@ -52,7 +51,6 @@ import { SortOrder } from '@shared/utils/sort-order.enum';
selector: 'osf-my-projects',
imports: [
SubHeaderComponent,
DropdownModule,
FormsModule,
Select,
Tab,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<osf-search-input class="w-30rem" placeholder="Search your projects" />

<div class="sorting-container no-border-dropdown">
<p-dropdown placeholder="Sort by name: A-Z" optionLabel="label" optionValue="value"></p-dropdown>
<p-select placeholder="Sort by name: A-Z" optionLabel="label" optionValue="value"></p-select>
</div>

<div class="flex gap-2 ml-auto">
Expand Down
12 changes: 1 addition & 11 deletions src/app/features/project/files/project-files.component.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { Button } from 'primeng/button';
import { DropdownModule } from 'primeng/dropdown';
import { FloatLabel } from 'primeng/floatlabel';
import { Select } from 'primeng/select';
import { TableModule } from 'primeng/table';
Expand All @@ -14,16 +13,7 @@ import { SubHeaderComponent } from '@shared/components/sub-header/sub-header.com

@Component({
selector: 'osf-project-files',
imports: [
TableModule,
DropdownModule,
Button,
DatePipe,
Select,
FloatLabel,
SubHeaderComponent,
SearchInputComponent,
],
imports: [TableModule, Button, DatePipe, Select, FloatLabel, SubHeaderComponent, SearchInputComponent],
templateUrl: './project-files.component.html',
styleUrl: './project-files.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

@switch (control.type) {
@case ('dropdown') {
<p-dropdown
<p-select
class="accordion-dropdown"
[options]="control.options"
[(ngModel)]="control.value"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button } from 'primeng/button';
import { DropdownModule } from 'primeng/dropdown';
import { SelectModule } from 'primeng/select';

import { NgClass } from '@angular/common';
import { ChangeDetectionStrategy, Component, input, signal } from '@angular/core';
Expand All @@ -21,7 +21,7 @@ type RightControl =

@Component({
selector: 'osf-accordion-table',
imports: [NgClass, DropdownModule, FormsModule, Button],
imports: [NgClass, SelectModule, FormsModule, Button],
templateUrl: './accordion-table.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

@switch (control.type) {
@case ('dropdown') {
<p-dropdown
<p-select
class="accordion-dropdown"
[options]="control.options"
[(ngModel)]="control.value"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Button } from 'primeng/button';
import { DropdownModule } from 'primeng/dropdown';
import { SelectModule } from 'primeng/select';

import { LowerCasePipe, NgClass } from '@angular/common';
import { ChangeDetectionStrategy, Component, input, signal } from '@angular/core';
Expand All @@ -9,7 +9,7 @@ import { RightControl } from '@osf/features/project/settings/models/right-contro

@Component({
selector: 'osf-project-detail-setting-accordion',
imports: [NgClass, DropdownModule, FormsModule, Button, LowerCasePipe],
imports: [NgClass, SelectModule, FormsModule, Button, LowerCasePipe],
templateUrl: './project-detail-setting-accordion.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
Expand Down
2 changes: 0 additions & 2 deletions src/app/features/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { AccordionModule } from 'primeng/accordion';
import { AutoCompleteModule } from 'primeng/autocomplete';
import { Button } from 'primeng/button';
import { DataViewModule } from 'primeng/dataview';
import { DropdownModule } from 'primeng/dropdown';
import { TableModule } from 'primeng/table';
import { Tab, TabList, TabPanel, TabPanels, Tabs } from 'primeng/tabs';

Expand Down Expand Up @@ -33,7 +32,6 @@ import { IS_XSMALL } from '@shared/utils/breakpoints.tokens';
selector: 'osf-search',
imports: [
SearchInputComponent,
DropdownModule,
ReactiveFormsModule,
Tab,
TabList,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,27 +57,27 @@ <h2>
<div>
{{ 'settings.notifications.notificationPreferences.items.replies' | translate }}
</div>
<p-dropdown class="dropdown"> </p-dropdown>
<p-select class="dropdown"> </p-select>

<div>
{{ 'settings.notifications.notificationPreferences.items.comments' | translate }}
</div>
<p-dropdown class="dropdown"> </p-dropdown>
<p-select class="dropdown"> </p-select>

<div>
{{ 'settings.notifications.notificationPreferences.items.files' | translate }}
</div>
<p-dropdown class="dropdown"> </p-dropdown>
<p-select class="dropdown"> </p-select>

<div>
{{ 'settings.notifications.notificationPreferences.items.mentions' | translate }}
</div>
<p-dropdown class="dropdown"> </p-dropdown>
<p-select class="dropdown"> </p-select>

<div>
{{ 'settings.notifications.notificationPreferences.items.preprints' | translate }}
</div>
<p-dropdown class="dropdown"> </p-dropdown>
<p-select class="dropdown"> </p-select>
</section>
</section>
</section>
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ import { TranslatePipe } from '@ngx-translate/core';

import { Button } from 'primeng/button';
import { Checkbox } from 'primeng/checkbox';
import { DropdownModule } from 'primeng/dropdown';
import { SelectModule } from 'primeng/select';

import { ChangeDetectionStrategy, Component, HostBinding } from '@angular/core';

import { SubHeaderComponent } from '@shared/components/sub-header/sub-header.component';

@Component({
selector: 'osf-notifications',
imports: [SubHeaderComponent, Checkbox, Button, DropdownModule, TranslatePipe],
imports: [SubHeaderComponent, Checkbox, Button, SelectModule, TranslatePipe],
templateUrl: './notifications.component.html',
styleUrl: './notifications.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { TranslatePipe } from '@ngx-translate/core';

import { DropdownModule } from 'primeng/dropdown';
import { Select } from 'primeng/select';
import { Tab, TabList, TabPanel, TabPanels, Tabs } from 'primeng/tabs';

Expand All @@ -25,7 +24,6 @@ import { SubHeaderComponent } from '@shared/components/sub-header/sub-header.com
Tab,
TabPanel,
TabPanels,
DropdownModule,
ReactiveFormsModule,
Select,
FormsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ <h2>
<p class="font-light mb-1">
{{ 'settings.profileSettings.social.socialOutput' | translate }}
</p>
<p-dropdown
<p-select
formControlName="socialOutput"
[options]="socials"
optionLabel="label"
class="w-full"
></p-dropdown>
></p-select>
</div>

<div class="w-full md:w-8">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import { Store } from '@ngxs/store';
import { TranslatePipe } from '@ngx-translate/core';

import { Button } from 'primeng/button';
import { DropdownModule } from 'primeng/dropdown';
import { InputGroup } from 'primeng/inputgroup';
import { InputGroupAddon } from 'primeng/inputgroupaddon';
import { InputText } from 'primeng/inputtext';
import { SelectModule } from 'primeng/select';

import { ChangeDetectionStrategy, Component, effect, HostBinding, inject } from '@angular/core';
import { FormArray, FormBuilder, ReactiveFormsModule, Validators } from '@angular/forms';
Expand All @@ -24,7 +24,7 @@ import {

@Component({
selector: 'osf-social',
imports: [Button, DropdownModule, InputGroup, InputGroupAddon, InputText, ReactiveFormsModule, TranslatePipe],
imports: [Button, SelectModule, InputGroup, InputGroupAddon, InputText, ReactiveFormsModule, TranslatePipe],
templateUrl: './social.component.html',
styleUrl: './social.component.scss',
changeDetection: ChangeDetectionStrategy.OnPush,
Expand All @@ -45,9 +45,7 @@ export class SocialComponent {
const socialLinks = this.socialLinks();

for (const socialLinksKey in socialLinks) {
console.log(socialLinksKey);
const socialLink = socialLinks[socialLinksKey as SocialLinksKeys];
console.log(socialLink);

const socialLinkGroup = this.#fb.group({
socialOutput: [this.socials.find((social) => social.key === socialLinksKey), Validators.required],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { TranslatePipe } from '@ngx-translate/core';

import { ButtonModule } from 'primeng/button';
import { CheckboxModule } from 'primeng/checkbox';
import { DropdownModule } from 'primeng/dropdown';
import { DynamicDialogRef } from 'primeng/dynamicdialog';
import { InputTextModule } from 'primeng/inputtext';
import { Select } from 'primeng/select';
Expand All @@ -30,7 +29,6 @@ import { IS_XSMALL } from '@shared/utils/breakpoints.tokens';
ReactiveFormsModule,
ButtonModule,
InputTextModule,
DropdownModule,
CheckboxModule,
Select,
Textarea,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

<div class="flex align-items-center column-gap-1">
@if (item()?.resourceType === ResourceType.File && item()?.fileName) {
<a class="title" [href]="item()?.id">{{ item()?.fileName }}</a>
<a class="title">{{ item()?.fileName }}</a>
} @else if (item()?.title && item()?.title) {
<a class="title" [href]="item()?.id">{{ item()?.title }}</a>
<a class="title">{{ item()?.title }}</a>
}
@if (item()?.orcid) {
<a [href]="item()?.orcid" class="orcid-icon">
<a class="orcid-icon">
<img ngSrc="assets/icons/system/orchid.svg" width="16" height="16" alt="orcid" />
</a>
}
Expand All @@ -25,7 +25,7 @@
@if (item()?.creators?.length) {
<div>
@for (creator of item()?.creators!.slice(0, 4); track creator.id; let i = $index) {
<a [href]="creator.id" target="_blank">{{ creator.name }}</a>
<a target="_blank">{{ creator.name }}</a>
@if (i < (item()?.creators)!.length - 1 && i < 3) {
<a>, </a>
}
Expand All @@ -39,7 +39,7 @@
@if (item()?.from?.id && item()?.from?.name) {
<div>
<p class="inline mr-1">From:</p>
<a class="inline" [href]="item()?.from?.id">{{ item()?.from?.name }}</a>
<a class="inline">{{ item()?.from?.name }}</a>
</div>
}

Expand All @@ -62,39 +62,39 @@

@if (item()?.resourceType === ResourceType.Registration) {
<div class="flex column-gap-5 row-gap-3 mt-1 flex-wrap">
<a class="icon-container" [href]="item()?.id + '/resources'">
<a class="icon-container">
@if (item()?.hasDataResource) {
<i class="osf-icon-data-colored text-4xl"></i>
} @else {
<i class="osf-icon-data text-4xl"></i>
}
<p>Data</p>
</a>
<a class="icon-container" [href]="item()?.id + '/resources'">
<a class="icon-container">
@if (item()?.hasAnalyticCodeResource) {
<i class="osf-icon-code-colored text-4xl"></i>
} @else {
<i class="osf-icon-code text-4xl"></i>
}
<p>Analytic Code</p>
</a>
<a class="icon-container" [href]="item()?.id + '/resources'">
<a class="icon-container">
@if (item()?.hasMaterialsResource) {
<i class="osf-icon-materials-colored text-4xl"></i>
} @else {
<i class="osf-icon-materials text-4xl"></i>
}
<p>Materials</p>
</a>
<a class="icon-container" [href]="item()?.id + '/resources'">
<a class="icon-container">
@if (item()?.hasPapersResource) {
<i class="osf-icon-papers-colored text-4xl"></i>
} @else {
<i class="osf-icon-papers text-4xl"></i>
}
<p>Papers</p>
</a>
<a class="icon-container" [href]="item()?.id + '/resources'">
<a class="icon-container">
@if (item()?.hasPapersResource) {
<i class="osf-icon-supplements-colored text-4xl"></i>
} @else {
Expand All @@ -115,7 +115,7 @@
@if (item()?.provider?.id) {
<span>
<p>Registration provider:&nbsp;</p>
<a [href]="item()?.provider?.id">{{ item()?.provider?.name }}</a>
<a>{{ item()?.provider?.name }}</a>
</span>
}

Expand All @@ -133,7 +133,7 @@
@if (item()?.provider?.id) {
<span>
<p>Provider:&nbsp;</p>
<a [href]="item()?.provider?.id">{{ item()?.provider?.name }}</a>
<a>{{ item()?.provider?.name }}</a>
</span>
}

Expand All @@ -144,7 +144,7 @@
@if (item()?.resourceType !== ResourceType.Agent && item()?.id) {
<span>
<p>URL:&nbsp;</p>
<a [href]="item()?.id">{{ item()?.id }}</a>
<a>{{ item()?.id }}</a>
</span>
}

Expand Down
2 changes: 0 additions & 2 deletions src/app/shared/components/resources/resources.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { Store } from '@ngxs/store';
import { AccordionModule } from 'primeng/accordion';
import { AutoCompleteModule } from 'primeng/autocomplete';
import { DataViewModule } from 'primeng/dataview';
import { DropdownModule } from 'primeng/dropdown';
import { Select } from 'primeng/select';
import { TableModule } from 'primeng/table';

Expand All @@ -24,7 +23,6 @@ import { IS_WEB, IS_XSMALL } from '@shared/utils/breakpoints.tokens';
@Component({
selector: 'osf-resources',
imports: [
DropdownModule,
FormsModule,
ResourceFiltersComponent,
ReactiveFormsModule,
Expand Down
Loading