├── dev-env ├── .gitignore ├── shib-dev-env │ ├── .gitignore │ ├── shibboleth-idp │ │ ├── wwwroot │ │ │ └── robots.txt │ │ └── credentials │ │ │ ├── shib-idp │ │ │ ├── sealer.kver │ │ │ └── sealer.jks │ │ │ └── tomcat │ │ │ └── keystore.jks │ ├── rm-env.sh │ ├── .env.example │ ├── keycloak │ │ └── keycloak-dv-builtin-users-authenticator-1.0-SNAPSHOT.jar │ ├── ldap │ │ └── Dockerfile │ └── run-env.sh ├── rm-env.sh ├── .env.example ├── keycloak │ └── keycloak-dv-builtin-users-authenticator-1.0-SNAPSHOT.jar └── run-env.sh ├── src ├── vite-env.d.ts ├── info │ └── domain │ │ ├── models │ │ ├── TermsOfUse.ts │ │ ├── DataverseVersion.ts │ │ └── DatasetMetadataExportFormats.ts │ │ └── useCases │ │ ├── getDataverseVersion.ts │ │ ├── getHasPublicStore.ts │ │ ├── getExternalStatusesAllowed.ts │ │ ├── getMaxEmbargoDurationInMonths.ts │ │ ├── getTermsOfUse.ts │ │ ├── getZipDownloadLimit.ts │ │ └── getAvailableDatasetMetadataExportFormats.ts ├── sections │ ├── collection │ │ ├── config.ts │ │ ├── collection-items-panel │ │ │ ├── search-input │ │ │ │ └── SearchInput.module.scss │ │ │ ├── items-list │ │ │ │ ├── ErrorItemsMessage.tsx │ │ │ │ └── file-card │ │ │ │ │ └── FileCard.tsx │ │ │ └── filter-panel │ │ │ │ ├── FilterPanel.module.scss │ │ │ │ └── type-filters │ │ │ │ └── TypeFilters.module.scss │ │ ├── publish-collection │ │ │ └── PublishCollectionModal.module.scss │ │ ├── edit-collection-dropdown │ │ │ └── delete-collection-button │ │ │ │ └── confirm-delete-collection-modal │ │ │ │ └── ConfirmDeleteCollectionModal.module.scss │ │ └── CollectionSkeleton.tsx │ ├── edit-file-metadata │ │ └── EditFileMetadata.module.scss │ ├── upload-dataset-files │ │ ├── UploadDatasetFiles.module.scss │ │ └── uploaded-files-list │ │ │ ├── file-form │ │ │ └── FileForm.module.scss │ │ │ ├── restriction-modal │ │ │ └── RestrictionModal.module.scss │ │ │ ├── add-tags-modal │ │ │ └── AddTagsModal.module.scss │ │ │ └── files-header │ │ │ └── FilesHeader.module.scss │ ├── edit-dataset-metadata │ │ └── EditDatasetMetadata.module.scss │ ├── file │ │ ├── file-labels │ │ │ └── FileLabels.module.scss │ │ ├── file-metadata │ │ │ └── FileMetadata.module.scss │ │ ├── file-preview │ │ │ ├── FileIcon.module.scss │ │ │ ├── FileImage.tsx │ │ │ ├── FilePreview.tsx │ │ │ └── FileIcon.tsx │ │ ├── file-citation │ │ │ └── FileCitation.module.scss │ │ ├── file-action-buttons │ │ │ ├── edit-file-menu │ │ │ │ └── delete-file-button │ │ │ │ │ └── confirm-delete-file-modal │ │ │ │ │ └── ConfirmDeleteFileModal.module.scss │ │ │ └── access-file-menu │ │ │ │ └── AccessFileMenu.module.scss │ │ ├── file-access │ │ │ └── FileAccessInfoIcon.module.scss │ │ ├── file-version │ │ │ └── FileVersion.module.scss │ │ └── multiple-file-download │ │ │ └── MultipleFileDownloadContext.ts │ ├── dataset │ │ ├── dataset-alerts │ │ │ └── DatasetAlerts.module.scss │ │ ├── markdown │ │ │ ├── MarkdownComponent.module.scss │ │ │ └── MarkdownComponent.tsx │ │ ├── config.ts │ │ ├── dataset-files │ │ │ ├── files-table │ │ │ │ ├── spinner-symbol │ │ │ │ │ └── SpinnerSymbol.module.scss │ │ │ │ ├── file-actions │ │ │ │ │ ├── file-actions-cell │ │ │ │ │ │ ├── FileActionsCell.module.scss │ │ │ │ │ │ ├── file-action-buttons │ │ │ │ │ │ │ └── file-options-menu │ │ │ │ │ │ │ │ └── FileAlreadyDeletedModal.module.scss │ │ │ │ │ │ └── file-info-messages │ │ │ │ │ │ │ ├── FileInfoMessages.module.scss │ │ │ │ │ │ │ └── AccessRequestedInfoMessage.tsx │ │ │ │ │ ├── edit-files-menu │ │ │ │ │ │ └── EditFilesMenu.module.scss │ │ │ │ │ ├── download-files │ │ │ │ │ │ └── DownloadFilesButton.module.scss │ │ │ │ │ └── FileActionsHeader.module.scss │ │ │ │ ├── file-info │ │ │ │ │ └── file-info-cell │ │ │ │ │ │ └── file-info-data │ │ │ │ │ │ ├── FileDirectory.tsx │ │ │ │ │ │ ├── FileDescription.tsx │ │ │ │ │ │ ├── FileDate.tsx │ │ │ │ │ │ ├── copy-to-clipboard-button │ │ │ │ │ │ └── CopyToClipboard.module.scss │ │ │ │ │ │ └── FileChecksum.tsx │ │ │ │ ├── row-selection │ │ │ │ │ └── RowSelectionMessage.module.scss │ │ │ │ └── zip-download-limit-message │ │ │ │ │ └── ZipLimitMessage.module.scss │ │ │ ├── dataset-upload-files-button │ │ │ │ └── DatasetUploadFilesButton.module.scss │ │ │ └── DatasetFilesScrollable.module.scss │ │ ├── dataset-thumbnail │ │ │ ├── DatasetThumbnail.module.scss │ │ │ └── DatasetThumbnail.tsx │ │ ├── dataset-labels │ │ │ └── DatasetLabels.module.scss │ │ ├── Dataset.module.scss │ │ ├── deaccession-dataset │ │ │ └── DeaccessionFormData.ts │ │ ├── dataset-icon │ │ │ ├── DatasetIcon.module.scss │ │ │ └── DatasetIcon.tsx │ │ ├── dataset-metadata │ │ │ └── dataset-metadata-fields │ │ │ │ ├── DatasetMetadataField.module.scss │ │ │ │ └── DatasetMetadataFieldTitle.tsx │ │ ├── dataset-action-buttons │ │ │ ├── DatasetActionButtons.module.scss │ │ │ └── edit-dataset-menu │ │ │ │ └── delete-draft-dataset │ │ │ │ └── ConfirmDeleteDraftDatasetModal.module.scss │ │ ├── dataset-terms │ │ │ ├── EditDatasetTermsButton.module.scss │ │ │ └── DatasetTerms.module.scss │ │ ├── dataset-versions │ │ │ └── view-difference │ │ │ │ ├── DatasetVersionViewDifferenceButton.module.scss │ │ │ │ ├── DatasetVersionsDetailModal.module.scss │ │ │ │ └── DatasetVersionsDifferenceTable.module.scss │ │ ├── publish-dataset │ │ │ ├── PublishDatasetModal.module.scss │ │ │ └── PublishDatasetHelpText.module.scss │ │ ├── anonymized │ │ │ ├── AnonymizedProvider.tsx │ │ │ └── AnonymizedContext.ts │ │ ├── DatasetContext.ts │ │ └── dataset-citation │ │ │ └── DatasetCitation.module.scss │ ├── shared │ │ ├── add-data-actions │ │ │ └── AddDataActionsButton.module.scss │ │ ├── hierarchy │ │ │ ├── BreadcrumbsGenerator.module.scss │ │ │ └── BreadcrumbsSkeleton.tsx │ │ ├── layout │ │ │ ├── SeparationLine │ │ │ │ ├── SeparationLine.module.scss │ │ │ │ └── SeparationLine.tsx │ │ │ └── app-loader │ │ │ │ ├── AppLoader.module.scss │ │ │ │ └── AppLoader.tsx │ │ ├── form │ │ │ ├── EditCreateCollectionForm │ │ │ │ └── collection-form │ │ │ │ │ ├── CollectionForm.module.scss │ │ │ │ │ └── browse-search-facets-section │ │ │ │ │ └── BrowseSearchFacetsSection.module.scss │ │ │ ├── DatasetMetadataForm │ │ │ │ └── MetadataForm │ │ │ │ │ ├── MetadataBlockFormFields │ │ │ │ │ └── MetadataFormField │ │ │ │ │ │ └── Fields │ │ │ │ │ │ └── index.ts │ │ │ │ │ └── index.module.scss │ │ │ ├── RequiredFieldText │ │ │ │ └── RequiredFieldText.tsx │ │ │ └── row-selection-checkbox │ │ │ │ └── RowSelectionCheckbox.tsx │ │ ├── file-uploader │ │ │ └── confirm-leave-modal │ │ │ │ └── ConfirmLeaveModal.module.scss │ │ ├── pagination │ │ │ └── Pagination.module.scss │ │ └── citation │ │ │ ├── CitationLearnAbout.tsx │ │ │ ├── CitationDescription.tsx │ │ │ └── Citation.module.scss │ ├── layout │ │ ├── Layout.module.scss │ │ ├── header │ │ │ ├── Header.module.scss │ │ │ └── HeaderFactory.tsx │ │ └── footer │ │ │ └── FooterFactory.tsx │ ├── account │ │ ├── my-data-section │ │ │ ├── user-name-search │ │ │ │ └── UserNameSearch.module.scss │ │ │ ├── my-data-filter-panel │ │ │ │ ├── MyDataFilterPanel.module.scss │ │ │ │ ├── role-filters │ │ │ │ │ └── RoleFilters.module.scss │ │ │ │ └── publication-status-filters │ │ │ │ │ └── PublicationStatusFilters.module.scss │ │ │ └── MyDataSearchCriteria.ts │ │ └── Account.module.scss │ ├── replace-file │ │ └── ReplaceFile.module.scss │ ├── edit-collection-featured-items │ │ └── featured-items-form │ │ │ ├── featured-item-field │ │ │ └── dv-object-form-item │ │ │ │ └── DvObjectFormItem.module.scss │ │ │ ├── preview-carousel │ │ │ └── PreviewCarousel.module.scss │ │ │ └── FeaturedItemsForm.module.scss │ ├── sign-up │ │ └── SignUp.module.scss │ ├── not-found-page │ │ └── NotFoundPageFactory.tsx │ ├── settings │ │ └── SettingsContext.ts │ ├── create-dataset │ │ └── HostCollectionForm │ │ │ └── HostCollectionForm.module.scss │ ├── not-implemented │ │ ├── NotImplementedModalContext.ts │ │ └── NotImplementedModalProvider.tsx │ └── error-page │ │ └── useErrorLogger.tsx ├── settings │ └── domain │ │ └── models │ │ ├── HasPublicStore.ts │ │ ├── AllowedExternalStatuses.ts │ │ ├── ZipDownloadLimit.ts │ │ └── Setting.ts ├── dataset │ ├── domain │ │ ├── models │ │ │ ├── TotalDatasetsCount.ts │ │ │ ├── VersionUpdateType.ts │ │ │ ├── DatasetDownloadCount.ts │ │ │ ├── DatasetCitation.ts │ │ │ ├── DatasetsWithCount.ts │ │ │ ├── DatasetPaginationInfo.ts │ │ │ ├── DatasetVersionPaginationInfo.ts │ │ │ └── DatasetItemTypePreview.ts │ │ └── useCases │ │ │ ├── getAvailableCategories.ts │ │ │ ├── linkDataset.ts │ │ │ ├── unlinkDataset.ts │ │ │ ├── getDatasetTemplates.ts │ │ │ ├── getDatasetLinkedCollections.ts │ │ │ ├── deleteDatasetDraft.ts │ │ │ ├── getDatasetDownloadCount.ts │ │ │ ├── createDataset.ts │ │ │ ├── getDatasetByPrivateUrlToken.ts │ │ │ ├── publishDataset.ts │ │ │ ├── getDatasetCitationInOtherFormats.ts │ │ │ ├── deaccessionDataset.ts │ │ │ ├── updateDatasetMetadata.ts │ │ │ ├── getDatasetsWithCount.ts │ │ │ ├── getDatasetByPersistentId.ts │ │ │ ├── getDatasetLocks.ts │ │ │ ├── getDatasetVersionDiff.ts │ │ │ └── getDatasetVersionsSummaries.ts │ └── infrastructure │ │ └── mappers │ │ └── DatasetDTOMapper.ts ├── files │ ├── domain │ │ ├── models │ │ │ ├── FileHolder.ts │ │ │ ├── FixityAlgorithm.ts │ │ │ ├── FilePermissions.ts │ │ │ ├── FileAccess.ts │ │ │ ├── FilesWithCount.ts │ │ │ ├── FilePaginationInfo.ts │ │ │ ├── FileVersionPaginationInfo.ts │ │ │ ├── FileIngest.ts │ │ │ └── FilesCountInfo.ts │ │ └── useCases │ │ │ ├── restrictFileDTO.ts │ │ │ ├── deleteFile.ts │ │ │ ├── DTOs │ │ │ └── FileMetadataDTO.ts │ │ │ ├── getFixityAlgorithm.ts │ │ │ ├── updateCategories.ts │ │ │ ├── updateTabularTags.ts │ │ │ ├── replaceFile.ts │ │ │ ├── restrictFile.ts │ │ │ ├── addUploadedFiles.ts │ │ │ ├── getFileById.ts │ │ │ ├── editFileMetadata.ts │ │ │ ├── getFileVersionSummaries.ts │ │ │ ├── getMultipleFileDownloadUrl.ts │ │ │ └── uploadFile.ts │ └── infrastructure │ │ └── mappers │ │ ├── JSFileIngestMapper.ts │ │ ├── JSFileAccessMapper.ts │ │ └── JSFilePermissionsMapper.ts ├── users │ └── domain │ │ ├── models │ │ ├── Role.ts │ │ ├── TokenInfo.ts │ │ └── User.ts │ │ ├── useCases │ │ ├── revokeApiToken.ts │ │ ├── DTOs │ │ │ └── UserDTO.ts │ │ ├── getUser.ts │ │ ├── registerUser.ts │ │ ├── recreateApiToken.ts │ │ └── getCurrentApiToken.ts │ │ └── repositories │ │ └── UserRepository.tsx ├── search │ ├── domain │ │ ├── models │ │ │ └── SearchService.ts │ │ ├── repositories │ │ │ └── SearchRepository.ts │ │ └── useCases │ │ │ └── getSearchServices.ts │ └── infrastructure │ │ └── repositories │ │ └── SearchJSRepository.ts ├── collection │ └── domain │ │ ├── models │ │ ├── CollectionContact.ts │ │ ├── CollectionFacet.ts │ │ ├── CollectionSummary.ts │ │ ├── CollectionItemType.ts │ │ ├── CollectionInputLevel.ts │ │ ├── CollectionItemsQueryParams.ts │ │ ├── CollectionLinks.ts │ │ ├── CollectionUserPermissions.ts │ │ ├── CollectionItemsPaginationInfo.ts │ │ ├── CollectionType.ts │ │ ├── CollectionItemTypePreview.ts │ │ └── MyDataCollectionItemSubset.ts │ │ └── useCases │ │ ├── deleteFeaturedItem.ts │ │ ├── deleteFeaturedItems.ts │ │ ├── publishCollection.ts │ │ ├── getFeaturedItems.ts │ │ ├── getCollectionLinks.ts │ │ ├── linkCollection.ts │ │ ├── getCollectionById.ts │ │ ├── deleteCollection.ts │ │ ├── getCollectionFacets.ts │ │ ├── createCollection.ts │ │ ├── updateFeaturedItems.ts │ │ ├── getCollectionUserPermissions.ts │ │ ├── editCollection.ts │ │ ├── getCollectionsForLinking.ts │ │ ├── getCollectionsForUnlinking.ts │ │ └── DTOs │ │ └── FeaturedItemsDTO.ts ├── assets │ ├── mixins.scss │ ├── variables.scss │ ├── global.scss │ └── react-toastify-custom.scss ├── contact │ ├── domain │ │ ├── models │ │ │ └── ContactResponse.ts │ │ ├── useCases │ │ │ ├── FeedbackDTO.ts │ │ │ └── sendFeedbacktoOwners.ts │ │ └── repositories │ │ │ └── ContactRepository.ts │ └── infrastructure │ │ └── ContactJSDataverseRepository.ts ├── declarations.d.ts ├── roles │ ├── domain │ │ ├── models │ │ │ └── Role.ts │ │ ├── repositories │ │ │ └── RoleRepository.tsx │ │ └── useCases │ │ │ └── getUserSelectableRoles.ts │ └── infrastructure │ │ └── repositories │ │ └── RoleJSDataverseRepository.ts ├── shared │ ├── hooks │ │ └── useScrollTop.ts │ ├── contexts │ │ └── loading │ │ │ ├── LoadingProvider.tsx │ │ │ └── LoadingContext.ts │ └── core │ │ └── domain │ │ └── models │ │ └── PublicationStatus.ts ├── keycloak-theme │ └── login │ │ ├── main.scss │ │ ├── i18n.ts │ │ └── KcContext.ts ├── dataverse-hub │ ├── domain │ │ ├── repositories │ │ │ └── DataverseHubRepository.ts │ │ └── useCases │ │ │ └── getInstallationMetrics.ts │ └── infrastructure │ │ └── models │ │ └── ApiInstallationMetrics.ts ├── stories │ ├── WithAlerts.tsx │ ├── WithToasts.tsx │ ├── shared-mock-repositories │ │ ├── search │ │ │ ├── SearchMockLoadingRepository.ts │ │ │ └── SearchMockRepository.ts │ │ └── contact │ │ │ └── ContactMockRepository.ts │ ├── WithNotImplementedModal.tsx │ ├── WithI18next.tsx │ ├── dataverse-hub │ │ └── DataverseHubLoadingMockRepository.ts │ ├── dataset │ │ ├── WithAnonymizedView.tsx │ │ └── WithDataset.tsx │ ├── WithLayout.tsx │ ├── WithLoggedInUser.tsx │ ├── error-page │ │ └── ErrorPage.stories.tsx │ ├── WithLoggedInSuperUser.tsx │ └── file │ │ └── FileMockFailedUploadRepository.ts ├── externalTools │ └── domain │ │ ├── models │ │ ├── FileExternalToolResolved.ts │ │ └── DatasetExternalToolResolved.ts │ │ └── useCases │ │ ├── DTOs │ │ └── GetExternalToolDTO.ts │ │ ├── GetExternalTools.ts │ │ └── GetFileExternalToolResolved.ts ├── licenses │ └── domain │ │ └── models │ │ └── License.ts ├── reportWebVitals.ts ├── metadata-block-info │ └── domain │ │ ├── useCases │ │ ├── getAllMetadataBlocksInfo.ts │ │ ├── getAllFacetableMetadataFields.ts │ │ ├── getMetadataBlockInfoByName.ts │ │ ├── getMetadataBlockInfoByCollectionId.ts │ │ └── getDisplayedOnCreateMetadataBlockInfoByCollectionId.ts │ │ └── repositories │ │ └── MetadataBlockInfoRepository.ts ├── index.app.tsx └── router │ └── index.tsx ├── .husky └── pre-commit ├── public ├── favicon.ico ├── robots.txt ├── favicon-96x96.png ├── apple-touch-icon.png ├── favicon-192x192.png ├── favicon-512x512.png ├── storybook │ ├── books.webp │ └── css.webp ├── locales │ ├── en │ │ ├── featuredItem.json │ │ ├── createCollection.json │ │ ├── editFileMetadata.json │ │ ├── footer.json │ │ ├── replaceFile.json │ │ ├── errorPage.json │ │ ├── notFoundPage.json │ │ ├── editCollection.json │ │ ├── editDatasetMetadata.json │ │ └── header.json │ └── es │ │ ├── featuredItem.json │ │ ├── createCollection.json │ │ ├── replaceFile.json │ │ ├── editFileMetadata.json │ │ ├── footer.json │ │ ├── errorPage.json │ │ ├── notFoundPage.json │ │ ├── editCollection.json │ │ ├── editDatasetMetadata.json │ │ └── header.json └── manifest.json ├── .babelrc ├── packages └── design-system │ ├── .storybook │ ├── preview-head.html │ └── main.ts │ ├── src │ └── lib │ │ ├── components │ │ ├── icon │ │ │ ├── Icon.module.scss │ │ │ ├── Icon.tsx │ │ │ └── IconName.ts │ │ ├── button │ │ │ └── Button.module.scss │ │ ├── table │ │ │ ├── Table.module.scss │ │ │ └── Table.tsx │ │ ├── dropdown-button │ │ │ ├── DropdownButton.module.scss │ │ │ ├── dropdown-separator │ │ │ │ └── DropdownSeparator.tsx │ │ │ └── dropdown-header │ │ │ │ └── DropdownHeader.tsx │ │ ├── alert │ │ │ ├── AlertVariant.ts │ │ │ └── AlertLink.tsx │ │ ├── tooltip │ │ │ └── question-mark-tooltip │ │ │ │ ├── QuestionMarkTooltip.module.scss │ │ │ │ ├── QuestionIcon.module.scss │ │ │ │ └── QuestionIcon.tsx │ │ ├── theme │ │ │ ├── ThemeContext.ts │ │ │ └── ThemeProvider.tsx │ │ ├── pagination │ │ │ ├── PaginationEllipsis.tsx │ │ │ ├── PaginationLast.tsx │ │ │ ├── PaginationNext.tsx │ │ │ ├── PaginationPrev.tsx │ │ │ ├── PaginationFirst.tsx │ │ │ └── PaginationItem.tsx │ │ ├── form │ │ │ ├── required-input-symbol │ │ │ │ ├── RequiredInputSymbol.module.scss │ │ │ │ └── RequiredInputSymbol.tsx │ │ │ ├── form-radio-group │ │ │ │ └── FormRadioGroup.module.scss │ │ │ ├── form-checkbox-group │ │ │ │ └── FormCheckboxGroup.module.scss │ │ │ ├── form-group-multiple-fields │ │ │ │ └── FormGroupWithMultipleFields.module.scss │ │ │ └── form-group │ │ │ │ ├── form-input-group │ │ │ │ └── FormInputGroupText.tsx │ │ │ │ └── form-element │ │ │ │ ├── FormText.tsx │ │ │ │ ├── FormSelectAdvanced.tsx │ │ │ │ └── FormFeedback.tsx │ │ ├── modal │ │ │ ├── ModalBody.tsx │ │ │ ├── ModalTitle.tsx │ │ │ ├── ModalFooter.tsx │ │ │ └── ModalHeader.tsx │ │ ├── select-advanced │ │ │ └── useIsFirstRender.ts │ │ ├── card │ │ │ ├── CardBody.tsx │ │ │ ├── CardHeader.tsx │ │ │ └── CardImage.tsx │ │ ├── navbar │ │ │ ├── NavbarLink.tsx │ │ │ └── navbar-dropdown │ │ │ │ └── NavbarDropdown.tsx │ │ ├── offcanvas │ │ │ ├── OffcanvasTitle.tsx │ │ │ ├── OffcanvasBody.tsx │ │ │ └── OffcanvasHeader.tsx │ │ ├── button-group │ │ │ ├── ButtonGroup.module.scss │ │ │ └── ButtonToolbar.tsx │ │ ├── grid │ │ │ ├── Container.tsx │ │ │ └── Row.tsx │ │ ├── accordion │ │ │ ├── AccordionBody.tsx │ │ │ ├── AccordionItem.tsx │ │ │ └── AccordionHeader.tsx │ │ ├── tabs │ │ │ └── Tab.tsx │ │ ├── close-button │ │ │ └── CloseButton.tsx │ │ ├── breadcrumb │ │ │ ├── Breadcrumb.tsx │ │ │ └── BreadcrumbItem.tsx │ │ ├── badge │ │ │ ├── Badge.tsx │ │ │ └── Badge.module.scss │ │ └── rich-text-editor │ │ │ └── EditorActions.module.scss │ │ ├── assets │ │ └── styles │ │ │ ├── index.scss │ │ │ ├── fontcustom │ │ │ ├── fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.ttf │ │ │ ├── fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff │ │ │ └── fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff2 │ │ │ └── design-tokens │ │ │ └── typography.module.scss │ │ └── stories │ │ ├── CanvasFixedHeight.tsx │ │ ├── DocumentationTemplate.mdx │ │ ├── progress-bar │ │ └── ProgressBar.stories.tsx │ │ └── close-button │ │ └── CloseButton.stories.tsx │ ├── .babelrc │ ├── tests │ ├── component │ │ ├── fixtures │ │ │ └── images │ │ │ │ └── dog-640x480.jpg │ │ ├── spinner │ │ │ └── Spinner.spec.tsx │ │ ├── icon │ │ │ └── Icon.spec.tsx │ │ ├── pagination │ │ │ ├── Pagination.spec.tsx │ │ │ └── PaginationEllipsis.spec.tsx │ │ ├── form │ │ │ └── form-group │ │ │ │ ├── FormGroupText.spec.tsx │ │ │ │ ├── FormGroupTextArea.spec.tsx │ │ │ │ └── FormGroup.spec.tsx │ │ ├── dropdown-button │ │ │ └── dropdown-header │ │ │ │ └── DropdownHeader.spec.tsx │ │ ├── card │ │ │ └── Card.spec.tsx │ │ ├── progress-bar │ │ │ └── ProgressBar.spec.tsx │ │ ├── breadcrumb │ │ │ └── Breadcrumb.spec.tsx │ │ └── tooltip │ │ │ └── Tooltip.spec.tsx │ ├── tsconfig.json │ └── support │ │ └── component-index.html │ ├── public │ └── fontcustom │ │ ├── fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.ttf │ │ ├── fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff │ │ └── fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff2 │ ├── .nycrc.json │ └── .gitignore ├── tests ├── e2e-integration │ ├── shared │ │ └── collection │ │ │ └── ROOT_COLLECTION_ALIAS.ts │ └── fixtures │ │ ├── images │ │ └── dog-640x480.jpg │ │ └── new-collection-data.json ├── component │ ├── fixtures │ │ └── images │ │ │ ├── harvard_uni.png │ │ │ └── harvard_building.png │ ├── sections │ │ ├── dataset │ │ │ ├── dataset-icon │ │ │ │ └── DatasetIcon.spec.tsx │ │ │ └── dataset-files │ │ │ │ └── files-table │ │ │ │ └── file-actions │ │ │ │ └── file-actions-cell │ │ │ │ └── FileActionsCell.spec.tsx │ │ └── shared │ │ │ ├── citation │ │ │ └── CitationLearnAbout.spec.tsx │ │ │ └── app-loader │ │ │ └── AppLoader.spec.tsx │ ├── files │ │ └── domain │ │ │ └── models │ │ │ └── FileLabelMother.ts │ ├── info │ │ └── domain │ │ │ └── models │ │ │ ├── DataverseVersionMother.ts │ │ │ └── TermsOfUseMother.ts │ ├── dataset │ │ └── domain │ │ │ └── models │ │ │ ├── LicenseMother.ts │ │ │ └── DatasetDownloadCountMother.ts │ └── externalTools │ │ └── domain │ │ └── models │ │ ├── FileExternalToolResolvedMother.ts │ │ └── DatasetExternalToolResolvedMother.ts ├── tsconfig.json └── support │ └── component-index.html ├── .storybook └── preview-head.html ├── docs └── img │ ├── keycloak_deployment_verify_profile.png │ └── keycloak_deployment_add_backend_client_secret.png ├── .prettierrc ├── lerna.json ├── .nycrc.json ├── .env.example.shib ├── .github ├── PULL_REQUEST_TEMPLATE.md └── SECURITY.md ├── deployment └── payara │ └── web.xml ├── dev.Dockerfile └── .npmrc.example /dev-env/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | -------------------------------------------------------------------------------- /dev-env/shib-dev-env/.gitignore: -------------------------------------------------------------------------------- 1 | .env 2 | docker-dev-volumes -------------------------------------------------------------------------------- /src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /.husky/pre-commit: -------------------------------------------------------------------------------- 1 | npm run typecheck 2 | npm run lint:fix 3 | git add . -------------------------------------------------------------------------------- /src/info/domain/models/TermsOfUse.ts: -------------------------------------------------------------------------------- 1 | export type TermsOfUse = string 2 | -------------------------------------------------------------------------------- /dev-env/shib-dev-env/shibboleth-idp/wwwroot/robots.txt: -------------------------------------------------------------------------------- 1 | User-agent: * 2 | Disallow: / -------------------------------------------------------------------------------- /src/sections/collection/config.ts: -------------------------------------------------------------------------------- 1 | export const INFINITE_SCROLL_ENABLED = true 2 | -------------------------------------------------------------------------------- /src/settings/domain/models/HasPublicStore.ts: -------------------------------------------------------------------------------- 1 | export type HasPublicStore = boolean 2 | -------------------------------------------------------------------------------- /src/dataset/domain/models/TotalDatasetsCount.ts: -------------------------------------------------------------------------------- 1 | export type TotalDatasetsCount = number 2 | -------------------------------------------------------------------------------- /public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/public/favicon.ico -------------------------------------------------------------------------------- /public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /src/files/domain/models/FileHolder.ts: -------------------------------------------------------------------------------- 1 | export interface FileHolder { 2 | file: File 3 | } 4 | -------------------------------------------------------------------------------- /src/info/domain/models/DataverseVersion.ts: -------------------------------------------------------------------------------- 1 | export type DataverseVersion = `v. ${string} ${string}` 2 | -------------------------------------------------------------------------------- /.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-typescript" 5 | ] 6 | } -------------------------------------------------------------------------------- /packages/design-system/.storybook/preview-head.html: -------------------------------------------------------------------------------- 1 | 4 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/icon/Icon.module.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | margin-right: 0.3em; 3 | } 4 | -------------------------------------------------------------------------------- /public/favicon-96x96.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/public/favicon-96x96.png -------------------------------------------------------------------------------- /src/settings/domain/models/AllowedExternalStatuses.ts: -------------------------------------------------------------------------------- 1 | export type AllowedExternalStatuses = string[] 2 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/button/Button.module.scss: -------------------------------------------------------------------------------- 1 | .spacing { 2 | margin: 0 7px; 3 | } 4 | -------------------------------------------------------------------------------- /public/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/public/apple-touch-icon.png -------------------------------------------------------------------------------- /public/favicon-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/public/favicon-192x192.png -------------------------------------------------------------------------------- /public/favicon-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/public/favicon-512x512.png -------------------------------------------------------------------------------- /public/storybook/books.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/public/storybook/books.webp -------------------------------------------------------------------------------- /public/storybook/css.webp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/public/storybook/css.webp -------------------------------------------------------------------------------- /src/sections/edit-file-metadata/EditFileMetadata.module.scss: -------------------------------------------------------------------------------- 1 | .tab_container { 2 | padding: 1em 0; 3 | } 4 | -------------------------------------------------------------------------------- /src/sections/upload-dataset-files/UploadDatasetFiles.module.scss: -------------------------------------------------------------------------------- 1 | .tab_container { 2 | padding: 1em 0; 3 | } 4 | -------------------------------------------------------------------------------- /src/users/domain/models/Role.ts: -------------------------------------------------------------------------------- 1 | export interface Role { 2 | roleId: number 3 | roleName: string 4 | } 5 | -------------------------------------------------------------------------------- /tests/e2e-integration/shared/collection/ROOT_COLLECTION_ALIAS.ts: -------------------------------------------------------------------------------- 1 | export const ROOT_COLLECTION_ALIAS = 'root' 2 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/table/Table.module.scss: -------------------------------------------------------------------------------- 1 | .table > thead { 2 | text-align: center; 3 | } 4 | -------------------------------------------------------------------------------- /public/locales/en/featuredItem.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "An error occurred while loading the featured item." 3 | } 4 | -------------------------------------------------------------------------------- /public/locales/es/featuredItem.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": "Ocurrió un error al cargar el elemento destacado." 3 | } 4 | -------------------------------------------------------------------------------- /src/sections/edit-dataset-metadata/EditDatasetMetadata.module.scss: -------------------------------------------------------------------------------- 1 | .tab-container { 2 | padding: 1em 0; 3 | } 4 | -------------------------------------------------------------------------------- /.storybook/preview-head.html: -------------------------------------------------------------------------------- 1 | 2 | 5 | -------------------------------------------------------------------------------- /dev-env/shib-dev-env/shibboleth-idp/credentials/shib-idp/sealer.kver: -------------------------------------------------------------------------------- 1 | #Wed Mar 24 15:54:24 UTC 2021 2 | CurrentVersion=1 3 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/dropdown-button/DropdownButton.module.scss: -------------------------------------------------------------------------------- 1 | .spacing { 2 | margin: 0 7px; 3 | } 4 | -------------------------------------------------------------------------------- /src/users/domain/models/TokenInfo.ts: -------------------------------------------------------------------------------- 1 | export interface TokenInfo { 2 | apiToken: string 3 | expirationDate: Date 4 | } 5 | -------------------------------------------------------------------------------- /dev-env/rm-env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker compose -f "./docker-compose-dev.yml" down 4 | rm -rf ./docker-dev-volumes 5 | -------------------------------------------------------------------------------- /packages/design-system/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": [ 3 | "@babel/preset-env", 4 | "@babel/preset-typescript" 5 | ] 6 | } -------------------------------------------------------------------------------- /src/search/domain/models/SearchService.ts: -------------------------------------------------------------------------------- 1 | export interface SearchService { 2 | name: string 3 | displayName: string 4 | } 5 | -------------------------------------------------------------------------------- /src/sections/file/file-labels/FileLabels.module.scss: -------------------------------------------------------------------------------- 1 | .container > * { 2 | margin-right: 0.5em; 3 | font-size: 12px; 4 | } 5 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/alert/AlertVariant.ts: -------------------------------------------------------------------------------- 1 | export type AlertVariant = 'success' | 'info' | 'warning' | 'danger' 2 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-alerts/DatasetAlerts.module.scss: -------------------------------------------------------------------------------- 1 | .container > * { 2 | margin-top: 1em; 3 | margin-right: 0.5em; 4 | } 5 | -------------------------------------------------------------------------------- /src/sections/dataset/markdown/MarkdownComponent.module.scss: -------------------------------------------------------------------------------- 1 | .metadata-logo { 2 | max-width: 180px; 3 | max-height: 40px; 4 | } 5 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionContact.ts: -------------------------------------------------------------------------------- 1 | export interface CollectionContact { 2 | email: string 3 | displayOrder: number 4 | } 5 | -------------------------------------------------------------------------------- /src/sections/dataset/config.ts: -------------------------------------------------------------------------------- 1 | export const FILES_TAB_INFINITE_SCROLL_ENABLED = true 2 | export const PUBLISH_DATASET_POLL_INTERVAL = 2000 3 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/spinner-symbol/SpinnerSymbol.module.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | justify-content: center; 3 | } 4 | -------------------------------------------------------------------------------- /dev-env/shib-dev-env/rm-env.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | docker compose -f "./docker-compose-dev.yml" down 4 | rm -rf ./docker-dev-volumes 5 | -------------------------------------------------------------------------------- /src/sections/shared/add-data-actions/AddDataActionsButton.module.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | margin-right: 0.3rem; 3 | margin-bottom: 0.2rem; 4 | } 5 | -------------------------------------------------------------------------------- /docs/img/keycloak_deployment_verify_profile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/docs/img/keycloak_deployment_verify_profile.png -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/file-actions/file-actions-cell/FileActionsCell.module.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | text-align: right; 3 | } 4 | -------------------------------------------------------------------------------- /src/sections/shared/hierarchy/BreadcrumbsGenerator.module.scss: -------------------------------------------------------------------------------- 1 | .breadcrumb-generator { 2 | padding-top: 0.5rem; 3 | word-break: break-word; 4 | } 5 | -------------------------------------------------------------------------------- /tests/component/fixtures/images/harvard_uni.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/tests/component/fixtures/images/harvard_uni.png -------------------------------------------------------------------------------- /packages/design-system/src/lib/assets/styles/index.scss: -------------------------------------------------------------------------------- 1 | @import 'fontcustom'; 2 | @import 'bootstrap-customized'; 3 | @import 'rich-text-editor-content'; 4 | -------------------------------------------------------------------------------- /src/assets/mixins.scss: -------------------------------------------------------------------------------- 1 | @mixin link-hover-underlined { 2 | text-decoration: none; 3 | 4 | &:hover { 5 | text-decoration: underline; 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionFacet.ts: -------------------------------------------------------------------------------- 1 | export interface CollectionFacet { 2 | id: number 3 | name: string 4 | displayName: string 5 | } 6 | -------------------------------------------------------------------------------- /src/contact/domain/models/ContactResponse.ts: -------------------------------------------------------------------------------- 1 | export interface ContactResponse { 2 | subject: string 3 | body: string 4 | fromEmail: string 5 | } 6 | -------------------------------------------------------------------------------- /src/declarations.d.ts: -------------------------------------------------------------------------------- 1 | declare namespace React { 2 | // eslint-disable-next-line 3 | interface HTMLAttributes { 4 | inert?: '' 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /src/sections/shared/layout/SeparationLine/SeparationLine.module.scss: -------------------------------------------------------------------------------- 1 | .separation-line { 2 | margin: 1em 0; 3 | border-bottom: 1px solid #dee2e6; 4 | } 5 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionSummary.ts: -------------------------------------------------------------------------------- 1 | export interface CollectionSummary { 2 | id: number 3 | alias: string 4 | displayName: string 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/layout/Layout.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/assets/variables'; 2 | 3 | .body-container { 4 | min-height: $main-container-available-height; 5 | } 6 | -------------------------------------------------------------------------------- /tests/component/fixtures/images/harvard_building.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/tests/component/fixtures/images/harvard_building.png -------------------------------------------------------------------------------- /tests/e2e-integration/fixtures/images/dog-640x480.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/tests/e2e-integration/fixtures/images/dog-640x480.jpg -------------------------------------------------------------------------------- /.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "semi": false, 3 | "tabWidth": 2, 4 | "printWidth": 100, 5 | "singleQuote": true, 6 | "trailingComma": "none", 7 | "bracketSameLine": true 8 | } -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionItemType.ts: -------------------------------------------------------------------------------- 1 | export enum CollectionItemType { 2 | FILE = 'file', 3 | DATASET = 'dataset', 4 | COLLECTION = 'collection' 5 | } 6 | -------------------------------------------------------------------------------- /src/dataset/domain/models/VersionUpdateType.ts: -------------------------------------------------------------------------------- 1 | export enum VersionUpdateType { 2 | MAJOR = 'major', 3 | MINOR = 'minor', 4 | UPDATE_CURRENT = 'updateCurrent' 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/account/my-data-section/user-name-search/UserNameSearch.module.scss: -------------------------------------------------------------------------------- 1 | .search-form { 2 | @media (min-width: 768px) { 3 | min-width: 325px; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /docs/img/keycloak_deployment_add_backend_client_secret.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/docs/img/keycloak_deployment_add_backend_client_secret.png -------------------------------------------------------------------------------- /src/files/domain/models/FixityAlgorithm.ts: -------------------------------------------------------------------------------- 1 | export enum FixityAlgorithm { 2 | MD5 = 'MD5', 3 | SHA1 = 'SHA-1', 4 | SHA256 = 'SHA-256', 5 | SHA512 = 'SHA-512' 6 | } 7 | -------------------------------------------------------------------------------- /src/files/domain/useCases/restrictFileDTO.ts: -------------------------------------------------------------------------------- 1 | export interface RestrictFileDTO { 2 | restrict: boolean 3 | enableAccessRequest?: boolean 4 | termsOfAccess?: string 5 | } 6 | -------------------------------------------------------------------------------- /src/roles/domain/models/Role.ts: -------------------------------------------------------------------------------- 1 | export interface Role { 2 | id: number 3 | name: string 4 | alias: string 5 | description: string 6 | permissions: string[] 7 | } 8 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/dataset-upload-files-button/DatasetUploadFilesButton.module.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | margin-right: 0.3rem; 3 | margin-bottom: 0.2rem; 4 | } 5 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/file-actions/edit-files-menu/EditFilesMenu.module.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | margin-right: 0.3rem; 3 | margin-bottom: 0.2rem; 4 | } 5 | -------------------------------------------------------------------------------- /src/sections/replace-file/ReplaceFile.module.scss: -------------------------------------------------------------------------------- 1 | .original_file_info_container { 2 | padding-block: 0.5rem; 3 | } 4 | 5 | .tab_container { 6 | padding: 1em 0; 7 | } 8 | -------------------------------------------------------------------------------- /src/settings/domain/models/ZipDownloadLimit.ts: -------------------------------------------------------------------------------- 1 | import { FileSize } from '../../../files/domain/models/FileMetadata' 2 | 3 | export class ZipDownloadLimit extends FileSize {} 4 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionInputLevel.ts: -------------------------------------------------------------------------------- 1 | export interface CollectionInputLevel { 2 | datasetFieldName: string 3 | include: boolean 4 | required: boolean 5 | } 6 | -------------------------------------------------------------------------------- /src/dataset/domain/models/DatasetDownloadCount.ts: -------------------------------------------------------------------------------- 1 | export interface DatasetDownloadCount { 2 | id: number | string 3 | downloadCount: number 4 | MDCStartDate?: string 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/file-actions/download-files/DownloadFilesButton.module.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | margin-right: 0.3rem; 3 | margin-bottom: 0.2rem; 4 | } 5 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-thumbnail/DatasetThumbnail.module.scss: -------------------------------------------------------------------------------- 1 | .preview-image { 2 | width: 100%; 3 | max-width: 140px; 4 | height: auto; 5 | max-height: 140px; 6 | } 7 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionMarkTooltip.module.scss: -------------------------------------------------------------------------------- 1 | .tooltip { 2 | display: inline-block; 3 | vertical-align: 0.125em; 4 | } 5 | -------------------------------------------------------------------------------- /src/assets/variables.scss: -------------------------------------------------------------------------------- 1 | $footer-height: 160px; 2 | $header-aproximate-height: 62px; 3 | $main-container-available-height: calc(100vh - $header-aproximate-height - $footer-height); 4 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/file-actions/FileActionsHeader.module.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | display: flex; 3 | justify-content: end; 4 | text-align: right; 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-labels/DatasetLabels.module.scss: -------------------------------------------------------------------------------- 1 | .dataset-labels-container { 2 | display: flex; 3 | flex-wrap: wrap; 4 | gap: 8px; 5 | align-items: center; 6 | } 7 | -------------------------------------------------------------------------------- /dev-env/.env.example: -------------------------------------------------------------------------------- 1 | POSTGRES_VERSION=17 2 | DATAVERSE_DB_USER=dataverse 3 | SOLR_VERSION=9.8.0 4 | REGISTRY=docker.io 5 | S3_ACCESS_KEY= 6 | S3_SECRET_KEY= 7 | -------------------------------------------------------------------------------- /dev-env/shib-dev-env/shibboleth-idp/credentials/shib-idp/sealer.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/dev-env/shib-dev-env/shibboleth-idp/credentials/shib-idp/sealer.jks -------------------------------------------------------------------------------- /dev-env/shib-dev-env/shibboleth-idp/credentials/tomcat/keystore.jks: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/dev-env/shib-dev-env/shibboleth-idp/credentials/tomcat/keystore.jks -------------------------------------------------------------------------------- /src/files/domain/models/FilePermissions.ts: -------------------------------------------------------------------------------- 1 | export interface FilePermissions { 2 | canDownloadFile: boolean 3 | canManageFilePermissions: boolean 4 | canEditOwnerDataset: boolean 5 | } 6 | -------------------------------------------------------------------------------- /src/roles/domain/repositories/RoleRepository.tsx: -------------------------------------------------------------------------------- 1 | import { Role } from '../models/Role' 2 | 3 | export interface RoleRepository { 4 | getUserSelectableRoles: () => Promise 5 | } 6 | -------------------------------------------------------------------------------- /src/contact/domain/useCases/FeedbackDTO.ts: -------------------------------------------------------------------------------- 1 | export interface FeedbackDTO { 2 | targetId?: number 3 | identifier?: string 4 | fromEmail: string 5 | body: string 6 | subject: string 7 | } 8 | -------------------------------------------------------------------------------- /src/files/domain/models/FileAccess.ts: -------------------------------------------------------------------------------- 1 | export interface FileAccess { 2 | restricted: boolean 3 | latestVersionRestricted: boolean 4 | canBeRequested: boolean 5 | requested: boolean 6 | } 7 | -------------------------------------------------------------------------------- /src/files/domain/models/FilesWithCount.ts: -------------------------------------------------------------------------------- 1 | import { FilePreview } from './FilePreview' 2 | 3 | export interface FilesWithCount { 4 | files: FilePreview[] 5 | totalFilesCount: number 6 | } 7 | -------------------------------------------------------------------------------- /dev-env/shib-dev-env/.env.example: -------------------------------------------------------------------------------- 1 | POSTGRES_VERSION=17 2 | DATAVERSE_DB_USER=dataverse 3 | SOLR_VERSION=9.8.0 4 | REGISTRY=docker.io 5 | S3_ACCESS_KEY= 6 | S3_SECRET_KEY= 7 | -------------------------------------------------------------------------------- /packages/design-system/tests/component/fixtures/images/dog-640x480.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/packages/design-system/tests/component/fixtures/images/dog-640x480.jpg -------------------------------------------------------------------------------- /public/locales/es/createCollection.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitle": "Crear colección", 3 | "notAllowedToCreateCollection": "No tienes permisos para crear una colección dentro de esta colección." 4 | } 5 | -------------------------------------------------------------------------------- /src/sections/dataset/Dataset.module.scss: -------------------------------------------------------------------------------- 1 | .header { 2 | margin: 0.5em 0; 3 | } 4 | 5 | .container { 6 | margin: 0.5rem 0; 7 | } 8 | 9 | .tab-container { 10 | padding: 1em 0; 11 | } 12 | -------------------------------------------------------------------------------- /dev-env/keycloak/keycloak-dv-builtin-users-authenticator-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/dev-env/keycloak/keycloak-dv-builtin-users-authenticator-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /public/locales/en/createCollection.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitle": "Create Collection", 3 | "notAllowedToCreateCollection": "You do not have permissions to create a collection within this collection." 4 | } 5 | -------------------------------------------------------------------------------- /public/locales/en/editFileMetadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitle": "Edit File Metadata", 3 | "errorAlert": { 4 | "notAllowedToEditFileMetadata": "You are not allowed to edit file metadata." 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /public/locales/en/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "copyright": "Copyright © {{year}}, The President & Fellows of Harvard College | ", 3 | "privacyPolicy": "Privacy Policy", 4 | "poweredBy": "Powered by" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/en/replaceFile.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitle": "Replace File", 3 | "notAllowedToReplaceFile": "You do not have permissions to replace this file.", 4 | "originalFile": "Original File" 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/edit-collection-featured-items/featured-items-form/featured-item-field/dv-object-form-item/DvObjectFormItem.module.scss: -------------------------------------------------------------------------------- 1 | .input { 2 | &::placeholder { 3 | opacity: 0.7; 4 | } 5 | } 6 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/theme/ThemeContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext } from 'react' 2 | import { baseTheme } from './BaseTheme' 3 | 4 | export const ThemeContext = createContext(baseTheme) 5 | -------------------------------------------------------------------------------- /public/locales/es/replaceFile.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitle": "Reemplazar archivo", 3 | "notAllowedToReplaceFile": "No tienes permisos para reemplazar este fichero.", 4 | "originalFile": "Fichero original" 5 | } 6 | -------------------------------------------------------------------------------- /src/search/domain/repositories/SearchRepository.ts: -------------------------------------------------------------------------------- 1 | import { SearchService } from '../models/SearchService' 2 | 3 | export interface SearchRepository { 4 | getServices: () => Promise 5 | } 6 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/pagination/PaginationEllipsis.tsx: -------------------------------------------------------------------------------- 1 | import { Pagination } from 'react-bootstrap' 2 | 3 | export function PaginationEllipsis() { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /src/shared/hooks/useScrollTop.ts: -------------------------------------------------------------------------------- 1 | import { useEffect } from 'react' 2 | 3 | export const useScrollTop = () => { 4 | useEffect(() => { 5 | window.scrollTo({ top: 0, behavior: 'smooth' }) 6 | }, []) 7 | } 8 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/form/required-input-symbol/RequiredInputSymbol.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .asterisk { 4 | color: $dv-danger-color; 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/shared/layout/SeparationLine/SeparationLine.tsx: -------------------------------------------------------------------------------- 1 | import styles from './SeparationLine.module.scss' 2 | export function SeparationLine() { 3 | return
4 | } 5 | -------------------------------------------------------------------------------- /public/locales/es/editFileMetadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitle": "Editar metadatos del archivo", 3 | "errorAlert": { 4 | "notAllowedToEditFileMetadata": "No tienes permitido editar los metadatos del fichero." 5 | } 6 | } 7 | -------------------------------------------------------------------------------- /dev-env/shib-dev-env/keycloak/keycloak-dv-builtin-users-authenticator-1.0-SNAPSHOT.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/dev-env/shib-dev-env/keycloak/keycloak-dv-builtin-users-authenticator-1.0-SNAPSHOT.jar -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/dropdown-button/dropdown-separator/DropdownSeparator.tsx: -------------------------------------------------------------------------------- 1 | import { Dropdown } from 'react-bootstrap' 2 | 3 | export function DropdownSeparator() { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/es/footer.json: -------------------------------------------------------------------------------- 1 | { 2 | "copyright": "Copyright © {{year}}, El Presidente y Miembros de la Universidad de Harvard | ", 3 | "privacyPolicy": "Política de privacidad", 4 | "poweredBy": "Desarrollado por" 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/shared/form/EditCreateCollectionForm/collection-form/CollectionForm.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/assets/variables'; 2 | 3 | .form-container { 4 | scroll-margin-top: calc(#{$header-aproximate-height} + 1rem); 5 | } 6 | -------------------------------------------------------------------------------- /packages/design-system/public/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/packages/design-system/public/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.ttf -------------------------------------------------------------------------------- /packages/design-system/public/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/packages/design-system/public/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff -------------------------------------------------------------------------------- /public/locales/en/errorPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": { 3 | "heading": "Oops,", 4 | "errorText": "something went wrong..." 5 | }, 6 | "brandName": "Dataverse", 7 | "backToHomepage": "Back to {{brandName}} Homepage" 8 | } 9 | -------------------------------------------------------------------------------- /packages/design-system/public/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/packages/design-system/public/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff2 -------------------------------------------------------------------------------- /src/sections/dataset/deaccession-dataset/DeaccessionFormData.ts: -------------------------------------------------------------------------------- 1 | export interface DeaccessionFormData { 2 | versions: string[] 3 | deaccessionReason: string 4 | deaccessionReasonOther: string 5 | deaccessionForwardUrl: string 6 | } 7 | -------------------------------------------------------------------------------- /public/locales/en/notFoundPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "statusNumberNotFound": "404", 3 | "message": "We can't find the <1>{{type}} you're looking for.\n Sorry for the inconvenience.", 4 | "backToHomepage": "Back to {{brandName}} Homepage" 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/es/errorPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "message": { 3 | "heading": "Ups,", 4 | "errorText": "algo salió mal..." 5 | }, 6 | "brandName": "Dataverse", 7 | "backToHomepage": "Volver a la página de inicio de {{brandName}}" 8 | } 9 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-icon/DatasetIcon.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .icon { 4 | color: $dv-info-border-color; 5 | line-height: 1.1; 6 | } 7 | -------------------------------------------------------------------------------- /src/keycloak-theme/login/main.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/typography.module'; 2 | 3 | body.kcBodyClass { 4 | font-family: $dv-font-family; 5 | background-color: #fafafa; 6 | } 7 | -------------------------------------------------------------------------------- /src/users/domain/useCases/revokeApiToken.ts: -------------------------------------------------------------------------------- 1 | import { UserRepository } from '../repositories/UserRepository' 2 | 3 | export function revokeApiToken(userRepository: UserRepository): Promise { 4 | return userRepository.deleteApiToken() 5 | } 6 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/icon/Icon.tsx: -------------------------------------------------------------------------------- 1 | import styles from './Icon.module.scss' 2 | 3 | export function Icon({ name }: { name: string }) { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/collection/collection-items-panel/search-input/SearchInput.module.scss: -------------------------------------------------------------------------------- 1 | .search-form { 2 | @media (min-width: 768px) { 3 | min-width: 325px; 4 | } 5 | } 6 | 7 | .search-input-group { 8 | margin-bottom: 0 !important; 9 | } 10 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-metadata/dataset-metadata-fields/DatasetMetadataField.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .tip { 4 | color: $dv-subtext-color; 5 | } 6 | -------------------------------------------------------------------------------- /public/locales/es/notFoundPage.json: -------------------------------------------------------------------------------- 1 | { 2 | "statusNumberNotFound": "404", 3 | "message": "No podemos encontrar el <1>{{type}} que estás buscando.\nLamentamos las molestias.", 4 | "backToHomepage": "Volver a la página principal de {{brandName}}" 5 | } 6 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/assets/styles/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/packages/design-system/src/lib/assets/styles/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.ttf -------------------------------------------------------------------------------- /packages/design-system/src/lib/assets/styles/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/packages/design-system/src/lib/assets/styles/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff -------------------------------------------------------------------------------- /src/files/domain/useCases/deleteFile.ts: -------------------------------------------------------------------------------- 1 | import { FileRepository } from '../repositories/FileRepository' 2 | 3 | export function deleteFile(fileRepository: FileRepository, fileId: number | string): Promise { 4 | return fileRepository.delete(fileId) 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-action-buttons/DatasetActionButtons.module.scss: -------------------------------------------------------------------------------- 1 | .group { 2 | display: flex; 3 | width: 100%; 4 | margin: 0.5rem 0; 5 | } 6 | 7 | .contact-owner-and-share-group { 8 | > button { 9 | width: 50%; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/assets/styles/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/IQSS/dataverse-frontend/HEAD/packages/design-system/src/lib/assets/styles/fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff2 -------------------------------------------------------------------------------- /src/users/domain/useCases/DTOs/UserDTO.ts: -------------------------------------------------------------------------------- 1 | export interface UserDTO { 2 | username?: string 3 | firstName?: string 4 | lastName?: string 5 | emailAddress?: string 6 | position?: string 7 | affiliation?: string 8 | termsAccepted: boolean 9 | } 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/modal/ModalBody.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react' 2 | import { Modal } from 'react-bootstrap' 3 | 4 | export function ModalBody({ children }: PropsWithChildren) { 5 | return {children} 6 | } 7 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/form/form-radio-group/FormRadioGroup.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/lib/assets/styles/design-tokens/typography.module'; 2 | 3 | .title { 4 | display: inline-block; 5 | margin-bottom: 0.5rem; 6 | font-weight: $dv-font-weight-bold; 7 | } 8 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/modal/ModalTitle.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react' 2 | import { Modal } from 'react-bootstrap' 3 | 4 | export function ModalTitle({ children }: PropsWithChildren) { 5 | return {children} 6 | } 7 | -------------------------------------------------------------------------------- /src/assets/global.scss: -------------------------------------------------------------------------------- 1 | /* Avoid text overflows */ 2 | p, h1, h2, h3, h4, h5, h6, a { 3 | overflow-wrap: break-word; 4 | } 5 | 6 | /* Improve line wrapping */ 7 | p { 8 | text-wrap: pretty; 9 | } 10 | 11 | h1, h2, h3, h4, h5, h6 { 12 | text-wrap: balance; 13 | } 14 | -------------------------------------------------------------------------------- /src/dataverse-hub/domain/repositories/DataverseHubRepository.ts: -------------------------------------------------------------------------------- 1 | import { InstallationMetrics } from '../models/InstallationMetrics' 2 | 3 | export interface DataverseHubRepository { 4 | getInstallationMetricsByHubId: (dvHubId: string) => Promise 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-terms/EditDatasetTermsButton.module.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | margin-right: 0.3rem; 3 | margin-bottom: 0.2rem; 4 | } 5 | 6 | .edit-terms-button-container { 7 | display: flex; 8 | justify-content: flex-end; 9 | margin-bottom: 1rem; 10 | } 11 | -------------------------------------------------------------------------------- /src/users/domain/useCases/getUser.ts: -------------------------------------------------------------------------------- 1 | import { User } from '../models/User' 2 | import { UserRepository } from '../repositories/UserRepository' 3 | 4 | export function getUser(userRepository: UserRepository): Promise { 5 | return userRepository.getAuthenticated() 6 | } 7 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/form/form-checkbox-group/FormCheckboxGroup.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/lib/assets/styles/design-tokens/typography.module'; 2 | 3 | .title { 4 | display: inline-block; 5 | margin-bottom: 0.5rem; 6 | font-weight: $dv-font-weight-bold; 7 | } 8 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/modal/ModalFooter.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react' 2 | import { Modal } from 'react-bootstrap' 3 | 4 | export function ModalFooter({ children }: PropsWithChildren) { 5 | return {children} 6 | } 7 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/modal/ModalHeader.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react' 2 | import { Modal } from 'react-bootstrap' 3 | 4 | export function ModalHeader({ children }: PropsWithChildren) { 5 | return {children} 6 | } 7 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionItemsQueryParams.ts: -------------------------------------------------------------------------------- 1 | export enum CollectionItemsQueryParams { 2 | SORT = 'sort', 3 | ORDER = 'order', 4 | START = 'start', 5 | TYPES = 'types', 6 | QUERY = 'q', 7 | FILTER_QUERIES = 'fqs', 8 | SEARCH_SERVICE = 'search_service' 9 | } 10 | -------------------------------------------------------------------------------- /src/users/domain/models/User.ts: -------------------------------------------------------------------------------- 1 | export interface User { 2 | displayName: string 3 | persistentId: string 4 | superuser: boolean 5 | firstName: string 6 | lastName: string 7 | email: string 8 | identifier: string 9 | affiliation?: string 10 | position?: string 11 | } 12 | -------------------------------------------------------------------------------- /dev-env/shib-dev-env/ldap/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM osixia/openldap:1.5.0 2 | 3 | # Add custom LDIF users file 4 | COPY 50-users.ldif /container/service/slapd/assets/config/bootstrap/ldif/custom/50-users.ldif 5 | RUN chown 911:911 /container/service/slapd/assets/config/bootstrap/ldif/custom/50-users.ldif 6 | -------------------------------------------------------------------------------- /src/sections/edit-collection-featured-items/featured-items-form/preview-carousel/PreviewCarousel.module.scss: -------------------------------------------------------------------------------- 1 | .preview-carousel-accordion { 2 | margin-bottom: 1rem; 3 | 4 | .accordion-item { 5 | overflow: hidden; 6 | } 7 | 8 | .accordion-body { 9 | padding: 0; 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/stories/WithAlerts.tsx: -------------------------------------------------------------------------------- 1 | import { StoryFn } from '@storybook/react' 2 | import { AlertProvider } from '../sections/alerts/AlertProvider' 3 | 4 | export const WithAlerts = (Story: StoryFn) => { 5 | return ( 6 | 7 | 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": true, 5 | "types": ["cypress", "@testing-library/cypress"], 6 | "isolatedModules": false 7 | }, 8 | "includes": ["e2e/**/*.ts", "component/**/*.tsx"], 9 | "exclude": [] 10 | } 11 | -------------------------------------------------------------------------------- /src/contact/domain/repositories/ContactRepository.ts: -------------------------------------------------------------------------------- 1 | import { FeedbackDTO } from '../useCases/FeedbackDTO' 2 | import { ContactResponse } from '../models/ContactResponse' 3 | 4 | export interface ContactRepository { 5 | sendFeedbacktoOwners: (feedbackDTO: FeedbackDTO) => Promise 6 | } 7 | -------------------------------------------------------------------------------- /src/files/domain/useCases/DTOs/FileMetadataDTO.ts: -------------------------------------------------------------------------------- 1 | export interface FileMetadataDTO { 2 | label?: string 3 | directoryLabel?: string 4 | description?: string 5 | // Not sure if we need the next 3 fields 6 | categories?: string[] 7 | dataFileTags?: string[] 8 | restrict?: boolean 9 | } 10 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-versions/view-difference/DatasetVersionViewDifferenceButton.module.scss: -------------------------------------------------------------------------------- 1 | .icon { 2 | margin-right: 0.3rem; 3 | margin-bottom: 0.2rem; 4 | } 5 | 6 | .edit-terms-button-container { 7 | display: flex; 8 | justify-content: flex-end; 9 | margin-bottom: 1rem; 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/dataset/publish-dataset/PublishDatasetModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .errorText { 4 | color: $dv-danger-color; 5 | } 6 | 7 | .secondaryText { 8 | color: $dv-subtext-color; 9 | } 10 | -------------------------------------------------------------------------------- /src/users/domain/useCases/registerUser.ts: -------------------------------------------------------------------------------- 1 | import { UserRepository } from '../repositories/UserRepository' 2 | import { UserDTO } from './DTOs/UserDTO' 3 | 4 | export function registerUser(userRepository: UserRepository, userDTO: UserDTO): Promise { 5 | return userRepository.register(userDTO) 6 | } 7 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionIcon.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .question-tooltip { 4 | color: $dv-tooltip-color; 5 | } 6 | 7 | .question-tooltip:hover { 8 | color: $dv-tooltip-hover-color; 9 | } 10 | -------------------------------------------------------------------------------- /packages/design-system/tests/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "../tsconfig.json", 3 | "compilerOptions": { 4 | "noEmit": true, 5 | "types": ["cypress", "@testing-library/cypress"], 6 | "isolatedModules": false 7 | }, 8 | "includes": ["component/**/*.tsx"], 9 | "exclude": [] 10 | } 11 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionLinks.ts: -------------------------------------------------------------------------------- 1 | import { CollectionSummary } from './CollectionSummary' 2 | 3 | export interface CollectionLinks { 4 | linkedCollections: CollectionSummary[] 5 | collectionsLinkingToThis: CollectionSummary[] 6 | linkedDatasets: { persistentId: string; title: string }[] 7 | } 8 | -------------------------------------------------------------------------------- /src/dataset/domain/models/DatasetCitation.ts: -------------------------------------------------------------------------------- 1 | export interface FormattedCitation { 2 | content: string 3 | contentType: string 4 | } 5 | 6 | export enum CitationFormat { 7 | Internal = 'Internal', 8 | EndNote = 'EndNote', 9 | RIS = 'RIS', 10 | BibTeX = 'BibTeX', 11 | CSLJson = 'CSL' 12 | } 13 | -------------------------------------------------------------------------------- /src/dataset/domain/models/DatasetsWithCount.ts: -------------------------------------------------------------------------------- 1 | import { DatasetItemTypePreview } from './DatasetItemTypePreview' 2 | import { TotalDatasetsCount } from './TotalDatasetsCount' 3 | 4 | export interface DatasetsWithCount { 5 | datasetPreviews: DatasetItemTypePreview[] 6 | totalCount: TotalDatasetsCount 7 | } 8 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/file-actions/file-actions-cell/file-action-buttons/file-options-menu/FileAlreadyDeletedModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .paragraph { 4 | color: $dv-danger-color; 5 | } 6 | -------------------------------------------------------------------------------- /src/sections/shared/file-uploader/confirm-leave-modal/ConfirmLeaveModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .message { 4 | color: $dv-warning-color; 5 | 6 | svg { 7 | min-width: fit-content; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/users/domain/useCases/recreateApiToken.ts: -------------------------------------------------------------------------------- 1 | import { TokenInfo } from '../models/TokenInfo' 2 | import { UserRepository } from '../repositories/UserRepository' 3 | 4 | export function recreateApiToken(userRepository: UserRepository): Promise { 5 | return userRepository.recreateApiToken() 6 | } 7 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionIcon.tsx: -------------------------------------------------------------------------------- 1 | import styles from './QuestionIcon.module.scss' 2 | import { QuestionCircleFill } from 'react-bootstrap-icons' 3 | export function QuestionIcon() { 4 | return 5 | } 6 | -------------------------------------------------------------------------------- /src/roles/domain/useCases/getUserSelectableRoles.ts: -------------------------------------------------------------------------------- 1 | import { Role } from '../models/Role' 2 | import { RoleRepository } from '../repositories/RoleRepository' 3 | 4 | export function getUserSelectableRoles(roleRepository: RoleRepository): Promise { 5 | return roleRepository.getUserSelectableRoles() 6 | } 7 | -------------------------------------------------------------------------------- /src/users/domain/useCases/getCurrentApiToken.ts: -------------------------------------------------------------------------------- 1 | import { TokenInfo } from '../models/TokenInfo' 2 | import { UserRepository } from '../repositories/UserRepository' 3 | 4 | export function getCurrentApiToken(userRepository: UserRepository): Promise { 5 | return userRepository.getCurrentApiToken() 6 | } 7 | -------------------------------------------------------------------------------- /lerna.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "node_modules/lerna/schemas/lerna-schema.json", 3 | "version": "independent", 4 | "npmClient": "npm", 5 | "packages": ["packages/*"], 6 | "command": { 7 | "version": { 8 | "npmClientArgs": [ 9 | "--legacy-peer-deps" 10 | ] 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/design-system/tests/component/spinner/Spinner.spec.tsx: -------------------------------------------------------------------------------- 1 | import { Spinner } from '../../../src/lib/components/spinner/Spinner' 2 | 3 | describe('Spinner', () => { 4 | it('renders correctly', () => { 5 | cy.mount() 6 | 7 | cy.findAllByRole('status').should('exist') 8 | }) 9 | }) 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/lib/assets/styles/design-tokens/typography.module'; 2 | 3 | .title { 4 | padding-top: calc(0.375rem + 1px); 5 | padding-bottom: calc(0.375rem + 1px); 6 | font-weight: $dv-font-weight-bold; 7 | } 8 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-versions/view-difference/DatasetVersionsDetailModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .message { 4 | color: $dv-warning-color; 5 | 6 | &.error { 7 | color: $dv-danger-color; 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/form/form-group/form-input-group/FormInputGroupText.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react' 2 | import { InputGroup } from 'react-bootstrap' 3 | 4 | export function FormInputGroupText({ children }: { children: ReactNode }) { 5 | return {children} 6 | } 7 | -------------------------------------------------------------------------------- /src/files/infrastructure/mappers/JSFileIngestMapper.ts: -------------------------------------------------------------------------------- 1 | import { FileIngest, FileIngestStatus } from '../../domain/models/FileIngest' 2 | 3 | export class JSFileIngestMapper { 4 | static toFileIngest() { 5 | return new FileIngest(FileIngestStatus.NONE) // TODO - Implement this when it is added to js-dataverse 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/sections/shared/hierarchy/BreadcrumbsSkeleton.tsx: -------------------------------------------------------------------------------- 1 | import Skeleton, { SkeletonTheme } from 'react-loading-skeleton' 2 | 3 | export function BreadcrumbsSkeleton() { 4 | return ( 5 | 6 | 7 | 8 | ) 9 | } 10 | -------------------------------------------------------------------------------- /src/sections/upload-dataset-files/uploaded-files-list/file-form/FileForm.module.scss: -------------------------------------------------------------------------------- 1 | .file_form { 2 | padding: 0.25em; 3 | } 4 | 5 | .tags { 6 | display: flex; 7 | gap: 0.5rem; 8 | } 9 | 10 | .edit_tags_btn { 11 | margin: 0; 12 | padding-inline: 8px; 13 | } 14 | 15 | .tags_select { 16 | width: 100%; 17 | } 18 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/alert/AlertLink.tsx: -------------------------------------------------------------------------------- 1 | import { Alert as AlertBS } from 'react-bootstrap' 2 | 3 | interface AlertLinkProps { 4 | link: string 5 | href: string 6 | } 7 | 8 | export function AlertLink({ link, href }: AlertLinkProps) { 9 | return {link} 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/collection/publish-collection/PublishCollectionModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .errorText { 4 | color: $dv-danger-color; 5 | } 6 | 7 | .warningText { 8 | margin-bottom: 0; 9 | color: $dv-warning-color; 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/dataset/publish-dataset/PublishDatasetHelpText.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .warningText { 4 | margin-bottom: 0; 5 | color: $dv-warning-color; 6 | } 7 | 8 | .secondaryText { 9 | color: $dv-subtext-color; 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/layout/header/Header.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .navbar { 4 | box-shadow: 0 1px 5px rgba(0 0 0 / 10%); 5 | 6 | .login-btn { 7 | color: var(--bs-nav-link-color); 8 | text-decoration: none; 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/shared/form/DatasetMetadataForm/MetadataForm/MetadataBlockFormFields/MetadataFormField/Fields/index.ts: -------------------------------------------------------------------------------- 1 | export * from './ComposeFieldMultiple' 2 | export * from './ComposedField' 3 | export * from './Primitive' 4 | export * from './PrimitiveMultiple' 5 | export * from './Vocabulary' 6 | export * from './VocabularyMultiple' 7 | -------------------------------------------------------------------------------- /src/sections/sign-up/SignUp.module.scss: -------------------------------------------------------------------------------- 1 | .header { 2 | padding-block: 1rem; 3 | } 4 | 5 | .alert-container { 6 | padding-top: 1rem; 7 | 8 | &:empty { 9 | padding-top: 0; 10 | } 11 | } 12 | 13 | .not-linked-account-text { 14 | white-space: pre-wrap; 15 | } 16 | 17 | .tab-container { 18 | padding: 1em 0; 19 | } 20 | -------------------------------------------------------------------------------- /packages/design-system/tests/component/icon/Icon.spec.tsx: -------------------------------------------------------------------------------- 1 | import { IconName, Icon } from '../../../src/lib' 2 | 3 | describe('Icon', () => { 4 | it('renders the icon with the correct text', () => { 5 | cy.mount() 6 | cy.findByRole('img', { name: IconName.DATASET }).should('exist') 7 | }) 8 | }) 9 | -------------------------------------------------------------------------------- /packages/design-system/tests/component/pagination/Pagination.spec.tsx: -------------------------------------------------------------------------------- 1 | import { Pagination } from '../../../src/lib/components/pagination/Pagination' 2 | 3 | describe('Pagination', () => { 4 | it('should render correctly', () => { 5 | cy.mount() 6 | 7 | cy.findByRole('list').should('exist') 8 | }) 9 | }) 10 | -------------------------------------------------------------------------------- /public/locales/en/editCollection.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitle": "Edit Collection", 3 | "notAllowedToEditCollection": "You do not have permissions to edit this collection.", 4 | "infoAlert": { 5 | "heading": "Edit Collection", 6 | "text": "Edit your collection and click Save Changes. Asterisks indicate required fields." 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-icon/DatasetIcon.tsx: -------------------------------------------------------------------------------- 1 | import styles from './DatasetIcon.module.scss' 2 | import { Icon, IconName } from '@iqss/dataverse-design-system' 3 | 4 | export function DatasetIcon() { 5 | return ( 6 |
7 | 8 |
9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/stories/WithToasts.tsx: -------------------------------------------------------------------------------- 1 | import { StoryFn } from '@storybook/react' 2 | import { ToastContainer } from 'react-toastify' 3 | 4 | export const WithToasts = (Story: StoryFn) => { 5 | return ( 6 | <> 7 | 8 | 9 | 10 | ) 11 | } 12 | -------------------------------------------------------------------------------- /src/sections/account/Account.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .header { 4 | padding-block: 1rem; 5 | } 6 | 7 | .tab-container { 8 | padding: 1rem; 9 | } 10 | 11 | .helper-text { 12 | color: $dv-subtext-color; 13 | font-size: 14px; 14 | } 15 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/stories/CanvasFixedHeight.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react' 2 | 3 | interface CanvasFixedHeight { 4 | height: number 5 | children: ReactNode 6 | } 7 | 8 | export function CanvasFixedHeight({ height, children }: CanvasFixedHeight) { 9 | return
{children}
10 | } 11 | -------------------------------------------------------------------------------- /public/locales/es/editCollection.json: -------------------------------------------------------------------------------- 1 | { 2 | "pageTitle": "Editar colección", 3 | "notAllowedToEditCollection": "No tienes permisos para editar esta colección.", 4 | "infoAlert": { 5 | "heading": "Editar colección", 6 | "text": "Edita tu colección y haz clic en Guardar cambios. Los asteriscos indican campos obligatorios." 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/getAvailableCategories.ts: -------------------------------------------------------------------------------- 1 | import { DatasetRepository } from '../repositories/DatasetRepository' 2 | 3 | export async function getAvailableCategories( 4 | datasetRepository: DatasetRepository, 5 | datasetId: string | number 6 | ): Promise { 7 | return datasetRepository.getAvailableCategories(datasetId) 8 | } 9 | -------------------------------------------------------------------------------- /src/search/domain/useCases/getSearchServices.ts: -------------------------------------------------------------------------------- 1 | import { SearchService } from '../models/SearchService' 2 | import { SearchRepository } from '../repositories/SearchRepository' 3 | 4 | export async function getSearchServices( 5 | searchRepository: SearchRepository 6 | ): Promise { 7 | return searchRepository.getServices() 8 | } 9 | -------------------------------------------------------------------------------- /.nycrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "extends": "@istanbuljs/nyc-config-typescript", 4 | "check-coverage": true, 5 | "functions": 95, 6 | "lines": 95, 7 | "statements": 95, 8 | "branches": 95, 9 | "include": ["src/sections/**/*.ts", "src/sections/**/*.tsx"], 10 | "exclude": ["src/i18n.ts"], 11 | "excludeAfterRemap": true 12 | } 13 | -------------------------------------------------------------------------------- /packages/design-system/.nycrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "all": true, 3 | "extends": "@istanbuljs/nyc-config-typescript", 4 | "check-coverage": true, 5 | "functions": 95, 6 | "lines": 95, 7 | "statements": 95, 8 | "branches": 95, 9 | "include": ["src/lib/components/**/*.ts", "src/lib/components/**/*.tsx"], 10 | "excludeAfterRemap": true 11 | } 12 | -------------------------------------------------------------------------------- /src/collection/domain/useCases/deleteFeaturedItem.ts: -------------------------------------------------------------------------------- 1 | import { CollectionRepository } from '../repositories/CollectionRepository' 2 | 3 | export async function deleteFeaturedItem( 4 | collectionRepository: CollectionRepository, 5 | featuredItemId: number 6 | ): Promise { 7 | return collectionRepository.deleteFeaturedItem(featuredItemId) 8 | } 9 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-terms/DatasetTerms.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .dataset-terms-row { 4 | margin-top: 1rem; 5 | margin-bottom: 1rem; 6 | } 7 | 8 | .community-norms-text { 9 | margin: 10px 0; 10 | color: $dv-subtext-color; 11 | } 12 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/select-advanced/useIsFirstRender.ts: -------------------------------------------------------------------------------- 1 | import { useRef } from 'react' 2 | 3 | export function useIsFirstRender(): boolean { 4 | const renderRef = useRef(true) 5 | 6 | if (renderRef.current === true) { 7 | renderRef.current = false 8 | return true 9 | } 10 | 11 | return renderRef.current 12 | } 13 | -------------------------------------------------------------------------------- /src/files/domain/models/FilePaginationInfo.ts: -------------------------------------------------------------------------------- 1 | import { PaginationInfo } from '../../../shared/pagination/domain/models/PaginationInfo' 2 | 3 | export class FilePaginationInfo extends PaginationInfo { 4 | constructor(page = 1, pageSize = 10, totalItems = 0, itemName = 'File') { 5 | super(page, pageSize, totalItems, itemName) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/sections/shared/layout/app-loader/AppLoader.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/assets/variables'; 2 | 3 | .app-loader { 4 | display: grid; 5 | place-content: center; 6 | min-height: $main-container-available-height; 7 | 8 | &.full-viewport { 9 | position: fixed; 10 | inset: 0; 11 | z-index: 1000; 12 | min-height: unset; 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/card/CardBody.tsx: -------------------------------------------------------------------------------- 1 | import { Card as CardBS } from 'react-bootstrap' 2 | 3 | interface CardBodyProps { 4 | children: React.ReactNode 5 | className?: string 6 | } 7 | 8 | export function CardBody({ children, className }: CardBodyProps) { 9 | return {children} 10 | } 11 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/form/required-input-symbol/RequiredInputSymbol.tsx: -------------------------------------------------------------------------------- 1 | import styles from './RequiredInputSymbol.module.scss' 2 | 3 | export const RequiredInputSymbol = () => { 4 | return ( 5 | 6 | {' '} 7 | * 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionUserPermissions.ts: -------------------------------------------------------------------------------- 1 | export interface CollectionUserPermissions { 2 | canAddCollection: boolean 3 | canAddDataset: boolean 4 | canViewUnpublishedCollection: boolean 5 | canEditCollection: boolean 6 | canManageCollectionPermissions: boolean 7 | canPublishCollection: boolean 8 | canDeleteCollection: boolean 9 | } 10 | -------------------------------------------------------------------------------- /src/sections/not-found-page/NotFoundPageFactory.tsx: -------------------------------------------------------------------------------- 1 | import { ReactElement } from 'react' 2 | import { NotFoundPage } from './NotFoundPage' 3 | 4 | export class NotFoundPageFactory { 5 | static create(): ReactElement { 6 | return 7 | } 8 | } 9 | 10 | function NotFoundPageWithParams() { 11 | return 12 | } 13 | -------------------------------------------------------------------------------- /tests/component/sections/dataset/dataset-icon/DatasetIcon.spec.tsx: -------------------------------------------------------------------------------- 1 | import { DatasetIcon } from '../../../../../src/sections/dataset/dataset-icon/DatasetIcon' 2 | 3 | describe('DatasetIcon', () => { 4 | it('renders the dataset icon', () => { 5 | cy.customMount() 6 | 7 | cy.findByLabelText('icon-dataset').should('exist') 8 | }) 9 | }) 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/navbar/NavbarLink.tsx: -------------------------------------------------------------------------------- 1 | import { Nav } from 'react-bootstrap' 2 | import { PropsWithChildren } from 'react' 3 | 4 | interface NavbarLinkProps { 5 | href: string 6 | } 7 | 8 | export function NavbarLink({ href, children }: PropsWithChildren) { 9 | return {children} 10 | } 11 | -------------------------------------------------------------------------------- /src/collection/domain/useCases/deleteFeaturedItems.ts: -------------------------------------------------------------------------------- 1 | import { CollectionRepository } from '../repositories/CollectionRepository' 2 | 3 | export async function deleteFeaturedItems( 4 | collectionRepository: CollectionRepository, 5 | collectionIdOrAlias: number | string 6 | ): Promise { 7 | return collectionRepository.deleteFeaturedItems(collectionIdOrAlias) 8 | } 9 | -------------------------------------------------------------------------------- /src/externalTools/domain/models/FileExternalToolResolved.ts: -------------------------------------------------------------------------------- 1 | export interface FileExternalToolResolved { 2 | toolUrlResolved: string // The URL to access the external tool. The URL includes necessary authentication tokens and parameters based on the user's permissions and the tool's configuration. 3 | displayName: string 4 | fileId: number 5 | preview: boolean 6 | } 7 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/file-info/file-info-cell/file-info-data/FileDirectory.tsx: -------------------------------------------------------------------------------- 1 | export function FileDirectory({ directory }: { directory: string | undefined }) { 2 | if (!directory) { 3 | return <> 4 | } 5 | return ( 6 |
7 | {directory} 8 |
9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/card/CardHeader.tsx: -------------------------------------------------------------------------------- 1 | import { Card as CardBS } from 'react-bootstrap' 2 | 3 | interface CardHeaderProps { 4 | children: React.ReactNode 5 | className?: string 6 | } 7 | 8 | export function CardHeader({ children, className }: CardHeaderProps) { 9 | return {children} 10 | } 11 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/offcanvas/OffcanvasTitle.tsx: -------------------------------------------------------------------------------- 1 | import { OffcanvasTitle as OffcanvasTitleBS } from 'react-bootstrap' 2 | 3 | export interface OffcanvasTitleProps { 4 | children: React.ReactNode 5 | } 6 | 7 | export const OffcanvasTitle = ({ children }: OffcanvasTitleProps) => { 8 | return {children} 9 | } 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/pagination/PaginationLast.tsx: -------------------------------------------------------------------------------- 1 | import { Pagination } from 'react-bootstrap' 2 | 3 | interface PaginationLastProps { 4 | onClick: () => void 5 | disabled?: boolean 6 | } 7 | export function PaginationLast({ onClick, disabled }: PaginationLastProps) { 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/pagination/PaginationNext.tsx: -------------------------------------------------------------------------------- 1 | import { Pagination } from 'react-bootstrap' 2 | 3 | interface PaginationNextProps { 4 | onClick: () => void 5 | disabled?: boolean 6 | } 7 | export function PaginationNext({ onClick, disabled }: PaginationNextProps) { 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/pagination/PaginationPrev.tsx: -------------------------------------------------------------------------------- 1 | import { Pagination } from 'react-bootstrap' 2 | 3 | interface PaginationPrevProps { 4 | onClick: () => void 5 | disabled?: boolean 6 | } 7 | export function PaginationPrev({ onClick, disabled }: PaginationPrevProps) { 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /src/dataset/domain/models/DatasetPaginationInfo.ts: -------------------------------------------------------------------------------- 1 | import { PaginationInfo } from '../../../shared/pagination/domain/models/PaginationInfo' 2 | 3 | export class DatasetPaginationInfo extends PaginationInfo { 4 | constructor(page = 1, pageSize = 10, totalItems = 0, itemName = 'Dataset') { 5 | super(page, pageSize, totalItems, itemName) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/linkDataset.ts: -------------------------------------------------------------------------------- 1 | import { DatasetRepository } from '../repositories/DatasetRepository' 2 | 3 | export async function linkDataset( 4 | datasetRepository: DatasetRepository, 5 | datasetId: string | number, 6 | collectionIdOrAlias: string | number 7 | ): Promise { 8 | return datasetRepository.link(datasetId, collectionIdOrAlias) 9 | } 10 | -------------------------------------------------------------------------------- /src/externalTools/domain/models/DatasetExternalToolResolved.ts: -------------------------------------------------------------------------------- 1 | export interface DatasetExternalToolResolved { 2 | toolUrlResolved: string // The URL to access the external tool. The URL includes necessary authentication tokens and parameters based on the user's permissions and the tool's configuration. 3 | displayName: string 4 | datasetId: number 5 | preview: boolean 6 | } 7 | -------------------------------------------------------------------------------- /src/externalTools/domain/useCases/DTOs/GetExternalToolDTO.ts: -------------------------------------------------------------------------------- 1 | /** 2 | * @property {boolean} preview - boolean flag to indicate if the request is for previewing the tool or not. 3 | * @property {string} locale - string specifying the locale for internationalization 4 | */ 5 | 6 | export interface GetExternalToolDTO { 7 | preview: boolean 8 | locale: string 9 | } 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/pagination/PaginationFirst.tsx: -------------------------------------------------------------------------------- 1 | import { Pagination } from 'react-bootstrap' 2 | 3 | interface PaginationFirstProps { 4 | onClick: () => void 5 | disabled?: boolean 6 | } 7 | export function PaginationFirst({ onClick, disabled }: PaginationFirstProps) { 8 | return 9 | } 10 | -------------------------------------------------------------------------------- /src/externalTools/domain/useCases/GetExternalTools.ts: -------------------------------------------------------------------------------- 1 | import { ExternalTool } from '../models/ExternalTool' 2 | import { ExternalToolsRepository } from '../repositories/ExternalToolsRepository' 3 | 4 | export function getExternalTools( 5 | externalToolsRepository: ExternalToolsRepository 6 | ): Promise { 7 | return externalToolsRepository.getExternalTools() 8 | } 9 | -------------------------------------------------------------------------------- /src/files/domain/useCases/getFixityAlgorithm.ts: -------------------------------------------------------------------------------- 1 | import { FileRepository } from '../repositories/FileRepository' 2 | import { FixityAlgorithm } from '../models/FixityAlgorithm' 3 | 4 | export async function getFixityAlgorithm(repository: FileRepository): Promise { 5 | return repository.getFixityAlgorithm().catch((error: Error) => { 6 | throw error 7 | }) 8 | } 9 | -------------------------------------------------------------------------------- /src/files/domain/useCases/updateCategories.ts: -------------------------------------------------------------------------------- 1 | import { FileRepository } from '../repositories/FileRepository' 2 | 3 | export function updateCategories( 4 | fileRepository: FileRepository, 5 | fileId: number | string, 6 | categories: string[], 7 | replace?: boolean 8 | ): Promise { 9 | return fileRepository.updateCategories(fileId, categories, replace) 10 | } 11 | -------------------------------------------------------------------------------- /src/info/domain/useCases/getDataverseVersion.ts: -------------------------------------------------------------------------------- 1 | import { DataverseInfoRepository } from '../repositories/DataverseInfoRepository' 2 | import { DataverseVersion } from '../models/DataverseVersion' 3 | 4 | export function getDataverseVersion( 5 | dataverseInfoRepository: DataverseInfoRepository 6 | ): Promise { 7 | return dataverseInfoRepository.getVersion() 8 | } 9 | -------------------------------------------------------------------------------- /src/info/domain/useCases/getHasPublicStore.ts: -------------------------------------------------------------------------------- 1 | import { Setting } from '@/settings/domain/models/Setting' 2 | import { DataverseInfoRepository } from '../repositories/DataverseInfoRepository' 3 | 4 | export function getHasPublicStore( 5 | dataverseInfoRepository: DataverseInfoRepository 6 | ): Promise> { 7 | return dataverseInfoRepository.getHasPublicStore() 8 | } 9 | -------------------------------------------------------------------------------- /src/licenses/domain/models/License.ts: -------------------------------------------------------------------------------- 1 | export interface License { 2 | id: number 3 | name: string 4 | shortDescription?: string 5 | uri: string 6 | iconUri?: string 7 | active: boolean 8 | isDefault: boolean 9 | sortOrder: number 10 | rightsIdentifier?: string 11 | rightsIdentifierScheme?: string 12 | schemeUri?: string 13 | languageCode?: string 14 | } 15 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/unlinkDataset.ts: -------------------------------------------------------------------------------- 1 | import { DatasetRepository } from '../repositories/DatasetRepository' 2 | 3 | export async function unlinkDataset( 4 | datasetRepository: DatasetRepository, 5 | datasetId: string | number, 6 | collectionIdOrAlias: string | number 7 | ): Promise { 8 | return datasetRepository.unlink(datasetId, collectionIdOrAlias) 9 | } 10 | -------------------------------------------------------------------------------- /src/files/domain/models/FileVersionPaginationInfo.ts: -------------------------------------------------------------------------------- 1 | import { PaginationInfo } from '../../../shared/pagination/domain/models/PaginationInfo' 2 | 3 | export class FileVersionPaginationInfo extends PaginationInfo { 4 | constructor(page = 1, pageSize = 10, totalItems = 0, itemName = 'Version') { 5 | super(page, pageSize, totalItems, itemName) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/files/domain/useCases/updateTabularTags.ts: -------------------------------------------------------------------------------- 1 | import { FileRepository } from '../repositories/FileRepository' 2 | 3 | export function updateTabularTags( 4 | fileRepository: FileRepository, 5 | fileId: number | string, 6 | tabularTags: string[], 7 | replace?: boolean 8 | ): Promise { 9 | return fileRepository.updateTabularTags(fileId, tabularTags, replace) 10 | } 11 | -------------------------------------------------------------------------------- /src/settings/domain/models/Setting.ts: -------------------------------------------------------------------------------- 1 | export enum SettingName { 2 | ZIP_DOWNLOAD_LIMIT = 'ZIP_DOWNLOAD_LIMIT', 3 | ALLOWED_EXTERNAL_STATUSES = 'ALLOWED_EXTERNAL_STATUSES', 4 | HAS_PUBLIC_STORE = 'HAS_PUBLIC_STORE', 5 | MAX_EMBARGO_DURATION_IN_MONTHS = 'MAX_EMBARGO_DURATION_IN_MONTHS' 6 | } 7 | 8 | export interface Setting { 9 | name: SettingName 10 | value: T 11 | } 12 | -------------------------------------------------------------------------------- /src/stories/shared-mock-repositories/search/SearchMockLoadingRepository.ts: -------------------------------------------------------------------------------- 1 | import { SearchService } from '@/search/domain/models/SearchService' 2 | import { SearchMockRepository } from './SearchMockRepository' 3 | 4 | export class SearchMockLoadingRepository implements SearchMockRepository { 5 | getServices(): Promise { 6 | return new Promise(() => {}) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/stories/DocumentationTemplate.mdx: -------------------------------------------------------------------------------- 1 | import { Meta, Title, Description, Primary, Controls, Stories } from '@storybook/blocks'; 2 | 3 | 4 | 5 | 6 | 7 | <Primary /> 8 | 9 | <Description /> 10 | 11 | ## Props 12 | 13 | The component accepts the following inputs (props): 14 | <Controls /> 15 | 16 | <Stories title="Variants" /> 17 | -------------------------------------------------------------------------------- /packages/design-system/tests/component/pagination/PaginationEllipsis.spec.tsx: -------------------------------------------------------------------------------- 1 | import { Pagination } from '../../../src/lib/components/pagination/Pagination' 2 | 3 | describe('PaginationEllipsis component', () => { 4 | it('should render correctly', () => { 5 | cy.mount(<Pagination.Ellipsis />) 6 | 7 | cy.findByRole('button', { name: 'More' }).should('exist') 8 | }) 9 | }) 10 | -------------------------------------------------------------------------------- /src/collection/domain/useCases/publishCollection.ts: -------------------------------------------------------------------------------- 1 | import { CollectionRepository } from '../repositories/CollectionRepository' 2 | 3 | export function publishCollection( 4 | collectionRepository: CollectionRepository, 5 | id: string 6 | ): Promise<void> { 7 | return collectionRepository.publish(id).catch((error: Error) => { 8 | throw new Error(error.message) 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/file-info/file-info-cell/file-info-data/FileDescription.tsx: -------------------------------------------------------------------------------- 1 | import styles from '../FileInfoCell.module.scss' 2 | 3 | export function FileDescription({ description }: { description: string | undefined }) { 4 | if (!description) { 5 | return <></> 6 | } 7 | return <div className={styles['description-container']}>{description}</div> 8 | } 9 | -------------------------------------------------------------------------------- /src/sections/file/file-metadata/FileMetadata.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .row { 4 | margin: 12px 0; 5 | } 6 | 7 | .help-text { 8 | color: $dv-subtext-color; 9 | } 10 | 11 | .code { 12 | background-color: #f0f0f0; 13 | } 14 | 15 | .preview > span { 16 | font-size: 16.7em; 17 | } 18 | -------------------------------------------------------------------------------- /src/sections/shared/form/DatasetMetadataForm/MetadataForm/index.module.scss: -------------------------------------------------------------------------------- 1 | .form-container { 2 | scroll-margin-top: 62px; 3 | } 4 | 5 | .top-buttons-container { 6 | display: flex; 7 | align-items: center; 8 | justify-content: space-between; 9 | margin-bottom: 1rem; 10 | } 11 | 12 | .bottom-buttons-container { 13 | display: flex; 14 | justify-content: flex-end; 15 | } 16 | -------------------------------------------------------------------------------- /src/stories/WithNotImplementedModal.tsx: -------------------------------------------------------------------------------- 1 | import { StoryFn } from '@storybook/react' 2 | import { NotImplementedModalProvider } from '../sections/not-implemented/NotImplementedModalProvider' 3 | 4 | export const WithNotImplementedModal = (Story: StoryFn) => { 5 | return ( 6 | <NotImplementedModalProvider> 7 | <Story /> 8 | </NotImplementedModalProvider> 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /tests/support/component-index.html: -------------------------------------------------------------------------------- 1 | <!DOCTYPE html> 2 | <html lang="en"> 3 | <head> 4 | <meta charset="utf-8" /> 5 | <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 6 | <meta name="viewport" content="width=device-width,initial-scale=1.0" /> 7 | <title>Components App 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/dataset/domain/models/DatasetVersionPaginationInfo.ts: -------------------------------------------------------------------------------- 1 | import { PaginationInfo } from '../../../shared/pagination/domain/models/PaginationInfo' 2 | 3 | export class DatasetVersionPaginationInfo extends PaginationInfo { 4 | constructor(page = 1, pageSize = 10, totalItems = 0, itemName = 'Version') { 5 | super(page, pageSize, totalItems, itemName) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/sections/file/file-preview/FileIcon.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .container { 4 | position: relative; 5 | display: inline-block; 6 | } 7 | 8 | .icon { 9 | color: $dv-subtext-color; 10 | font-size: 64px; 11 | 12 | @media (max-width: 576px) { 13 | font-size: 24px; 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionItemsPaginationInfo.ts: -------------------------------------------------------------------------------- 1 | import { PaginationInfo } from '../../../shared/pagination/domain/models/PaginationInfo' 2 | 3 | export class CollectionItemsPaginationInfo extends PaginationInfo { 4 | constructor(page = 1, pageSize = 10, totalItems = 0, itemName = 'result') { 5 | super(page, pageSize, totalItems, itemName) 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /src/files/domain/useCases/replaceFile.ts: -------------------------------------------------------------------------------- 1 | import { UploadedFileDTO } from '@iqss/dataverse-client-javascript' 2 | import { FileRepository } from '../repositories/FileRepository' 3 | 4 | export function replaceFile( 5 | fileRepository: FileRepository, 6 | fileId: number | string, 7 | newFile: UploadedFileDTO 8 | ): Promise { 9 | return fileRepository.replace(fileId, newFile) 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/collection/collection-items-panel/items-list/ErrorItemsMessage.tsx: -------------------------------------------------------------------------------- 1 | import { Alert } from '@iqss/dataverse-design-system' 2 | 3 | interface ErrorItemsMessageProps { 4 | errorMessage: string 5 | } 6 | 7 | export const ErrorItemsMessage = ({ errorMessage }: ErrorItemsMessageProps) => ( 8 | 9 | {errorMessage} 10 | 11 | ) 12 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/row-selection/RowSelectionMessage.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .container { 4 | display: flex; 5 | flex-wrap: wrap; 6 | align-items: center; 7 | background-color: $dv-warning-box-color; 8 | } 9 | 10 | .message { 11 | margin-left: 0.75rem; 12 | } 13 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/form/form-group/form-element/FormText.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react' 2 | import { Form as FormBS } from 'react-bootstrap' 3 | 4 | export function FormText({ children, className }: { children: ReactNode; className?: string }) { 5 | return ( 6 | 7 | {children} 8 | 9 | ) 10 | } 11 | -------------------------------------------------------------------------------- /src/files/domain/useCases/restrictFile.ts: -------------------------------------------------------------------------------- 1 | import { FileRepository } from '../repositories/FileRepository' 2 | import { RestrictFileDTO } from './restrictFileDTO' 3 | 4 | export function restrictFile( 5 | fileRepository: FileRepository, 6 | fileId: number | string, 7 | restrictFileDTO: RestrictFileDTO 8 | ): Promise { 9 | return fileRepository.restrict(fileId, restrictFileDTO) 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/file/file-citation/FileCitation.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .container { 4 | margin: 0 0 20px; 5 | padding: 10px 0; 6 | border: 1px solid $dv-secondary-color; 7 | } 8 | 9 | .deaccessioned { 10 | margin: 0.5rem 0; 11 | padding: 10px; 12 | border: 1px solid $dv-danger-color; 13 | } 14 | -------------------------------------------------------------------------------- /src/info/domain/useCases/getExternalStatusesAllowed.ts: -------------------------------------------------------------------------------- 1 | import { Setting } from '@/settings/domain/models/Setting' 2 | import { DataverseInfoRepository } from '../repositories/DataverseInfoRepository' 3 | 4 | export function getExternalStatusesAllowed( 5 | dataverseInfoRepository: DataverseInfoRepository 6 | ): Promise> { 7 | return dataverseInfoRepository.getExternalStatusesAllowed() 8 | } 9 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/zip-download-limit-message/ZipLimitMessage.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .container { 4 | display: flex; 5 | flex-wrap: wrap; 6 | align-items: center; 7 | background-color: $dv-warning-box-color; 8 | } 9 | 10 | .message { 11 | margin-left: 0.75rem; 12 | } 13 | -------------------------------------------------------------------------------- /packages/design-system/tests/component/form/form-group/FormGroupText.spec.tsx: -------------------------------------------------------------------------------- 1 | import { FormGroup } from '../../../../src/lib/components/form/form-group/FormGroup' 2 | 3 | describe('FormText component', () => { 4 | it('renders with children', () => { 5 | cy.mount(Test text) 6 | 7 | const text = cy.findByText('Test text') 8 | text.should('exist') 9 | }) 10 | }) 11 | -------------------------------------------------------------------------------- /packages/design-system/tests/support/component-index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Components App 8 | 9 | 10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/info/domain/useCases/getMaxEmbargoDurationInMonths.ts: -------------------------------------------------------------------------------- 1 | import { Setting } from '@/settings/domain/models/Setting' 2 | import { DataverseInfoRepository } from '../repositories/DataverseInfoRepository' 3 | 4 | export function getMaxEmbargoDurationInMonths( 5 | dataverseInfoRepository: DataverseInfoRepository 6 | ): Promise> { 7 | return dataverseInfoRepository.getMaxEmbargoDurationInMonths() 8 | } 9 | -------------------------------------------------------------------------------- /src/keycloak-theme/login/i18n.ts: -------------------------------------------------------------------------------- 1 | /* eslint-disable @typescript-eslint/no-unused-vars */ 2 | import { i18nBuilder } from 'keycloakify/login' 3 | import type { ThemeName } from '../kc.gen' 4 | 5 | /** @see: https://docs.keycloakify.dev/features/i18n */ 6 | const { useI18n, ofTypeI18n } = i18nBuilder.withThemeName().build() 7 | 8 | type I18n = typeof ofTypeI18n 9 | 10 | export { useI18n, type I18n } 11 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-action-buttons/edit-dataset-menu/delete-draft-dataset/ConfirmDeleteDraftDatasetModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .message { 4 | color: $dv-warning-color; 5 | 6 | &.error { 7 | color: $dv-danger-color; 8 | } 9 | 10 | svg { 11 | min-width: fit-content; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/dropdown-button/dropdown-header/DropdownHeader.tsx: -------------------------------------------------------------------------------- 1 | import { Dropdown } from 'react-bootstrap' 2 | 3 | interface DropdownHeaderProps { 4 | className?: string 5 | children: React.ReactNode 6 | } 7 | 8 | export function DropdownHeader({ className, children }: DropdownHeaderProps) { 9 | return {children} 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/file/file-action-buttons/edit-file-menu/delete-file-button/confirm-delete-file-modal/ConfirmDeleteFileModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .message { 4 | color: $dv-warning-color; 5 | 6 | &.error { 7 | color: $dv-danger-color; 8 | } 9 | 10 | svg { 11 | min-width: fit-content; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/sections/upload-dataset-files/uploaded-files-list/restriction-modal/RestrictionModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .restriction_form { 4 | padding-top: 0.5em; 5 | padding-bottom: 0.5em; 6 | } 7 | 8 | .restriction_info { 9 | padding-top: 0.5em; 10 | padding-bottom: 0.5em; 11 | color: $dv-subtext-color; 12 | } 13 | -------------------------------------------------------------------------------- /src/stories/WithI18next.tsx: -------------------------------------------------------------------------------- 1 | import { Suspense } from 'react' 2 | import { I18nextProvider } from 'react-i18next' 3 | import i18next from '../i18n' 4 | import { StoryFn } from '@storybook/react' 5 | 6 | export const WithI18next = (Story: StoryFn) => { 7 | return ( 8 | 9 | 10 | 11 | 12 | 13 | ) 14 | } 15 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/button-group/ButtonGroup.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .border > button, 4 | .border > [role='group'] > button, 5 | .border > button:not(.dropdown-item) { 6 | border: 1px solid $dv-button-border-color; 7 | } 8 | 9 | .border > div { 10 | &:global > .btn { 11 | border: 1px solid $dv-button-border-color; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/getDatasetTemplates.ts: -------------------------------------------------------------------------------- 1 | import { DatasetRepository } from '../repositories/DatasetRepository' 2 | import { DatasetTemplate } from '../models/DatasetTemplate' 3 | 4 | export function getDatasetTemplates( 5 | datasetRepository: DatasetRepository, 6 | collectionIdOrAlias: number | string 7 | ): Promise { 8 | return datasetRepository.getTemplates(collectionIdOrAlias) 9 | } 10 | -------------------------------------------------------------------------------- /src/files/domain/models/FileIngest.ts: -------------------------------------------------------------------------------- 1 | export enum FileIngestStatus { 2 | NONE = 'none', 3 | IN_PROGRESS = 'inProgress', 4 | SCHEDULED = 'scheduled', 5 | ERROR = 'error' 6 | } 7 | 8 | export class FileIngest { 9 | constructor(readonly status: FileIngestStatus, readonly message?: string) {} 10 | 11 | get isInProgress(): boolean { 12 | return this.status === FileIngestStatus.IN_PROGRESS 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /src/files/domain/useCases/addUploadedFiles.ts: -------------------------------------------------------------------------------- 1 | import { UploadedFileDTO } from '@iqss/dataverse-client-javascript' 2 | import { FileRepository } from '../repositories/FileRepository' 3 | 4 | export function addUploadedFiles( 5 | fileRepository: FileRepository, 6 | datasetId: number | string, 7 | files: UploadedFileDTO[] 8 | ): Promise { 9 | return fileRepository.addUploadedFiles(datasetId, files) 10 | } 11 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/offcanvas/OffcanvasBody.tsx: -------------------------------------------------------------------------------- 1 | import { OffcanvasBody as OffcanvasBodyBS } from 'react-bootstrap' 2 | 3 | export interface OffcanvasBodyProps { 4 | children: React.ReactNode 5 | dataTestId?: string 6 | } 7 | 8 | export const OffcanvasBody = ({ children, dataTestId }: OffcanvasBodyProps) => { 9 | return {children} 10 | } 11 | -------------------------------------------------------------------------------- /tests/component/files/domain/models/FileLabelMother.ts: -------------------------------------------------------------------------------- 1 | import { faker } from '@faker-js/faker' 2 | import { FileLabel, FileLabelType } from '@/files/domain/models/FileMetadata' 3 | 4 | export class FileLabelMother { 5 | static create(props?: Partial): FileLabel { 6 | return { 7 | type: props?.type ?? FileLabelType.CATEGORY, 8 | value: props?.value ?? faker.lorem.word() 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /.env.example.shib: -------------------------------------------------------------------------------- 1 | VITE_DATAVERSE_BACKEND_URL=https://localhost 2 | STORYBOOK_CHROMATIC_BUILD=false 3 | VITE_OIDC_CLIENT_ID=test 4 | VITE_OIDC_AUTHORIZATION_ENDPOINT=https://localhost/realms/test/protocol/openid-connect/auth 5 | VITE_OIDC_TOKEN_ENDPOINT=https://localhost/realms/test/protocol/openid-connect/token 6 | VITE_OIDC_LOGOUT_ENDPOINT=https://localhost/realms/test/protocol/openid-connect/logout 7 | VITE_OIDC_STORAGE_KEY_PREFIX=DV_ 8 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/card/CardImage.tsx: -------------------------------------------------------------------------------- 1 | import { Card as CardBS } from 'react-bootstrap' 2 | 3 | interface CardImageProps extends React.ImgHTMLAttributes { 4 | variant?: 'top' | 'bottom' 5 | className?: string 6 | } 7 | 8 | export function CardImage({ variant, className, ...rest }: CardImageProps) { 9 | return 10 | } 11 | -------------------------------------------------------------------------------- /public/locales/en/editDatasetMetadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "breadcrumbActionItem": "Edit Dataset Metadata", 3 | "infoAlert": { 4 | "heading": "Edit Dataset Metadata", 5 | "text": "Add more metadata about this dataset to help others easily find it." 6 | }, 7 | "hostCollection": { 8 | "label": "Host Collection", 9 | "description": "The collection which contains this data." 10 | }, 11 | "metadata": "Metadata" 12 | } 13 | -------------------------------------------------------------------------------- /src/info/domain/useCases/getTermsOfUse.ts: -------------------------------------------------------------------------------- 1 | import { type TermsOfUse } from '../../../info/domain/models/TermsOfUse' 2 | import { DataverseInfoRepository } from '../repositories/DataverseInfoRepository' 3 | 4 | export function getTermsOfUse( 5 | dataverseInfoRepository: DataverseInfoRepository 6 | ): Promise { 7 | return dataverseInfoRepository.getTermsOfUse().catch((error) => { 8 | throw error 9 | }) 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/collection/edit-collection-dropdown/delete-collection-button/confirm-delete-collection-modal/ConfirmDeleteCollectionModal.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .message { 4 | color: $dv-warning-color; 5 | 6 | &.error { 7 | color: $dv-danger-color; 8 | } 9 | 10 | svg { 11 | min-width: fit-content; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/collection/domain/useCases/getFeaturedItems.ts: -------------------------------------------------------------------------------- 1 | import { FeaturedItem } from '../models/FeaturedItem' 2 | import { CollectionRepository } from '../repositories/CollectionRepository' 3 | 4 | export async function getFeaturedItems( 5 | collectionRepository: CollectionRepository, 6 | collectionIdOrAlias?: number | string 7 | ): Promise { 8 | return collectionRepository.getFeaturedItems(collectionIdOrAlias) 9 | } 10 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/button-group/ButtonToolbar.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren } from 'react' 2 | import { ButtonToolbar as ButtonToolbarBS } from 'react-bootstrap' 3 | 4 | interface ButtonToolbarProps { 5 | ariaLabel: string 6 | } 7 | export function ButtonToolbar({ ariaLabel, children }: PropsWithChildren) { 8 | return {children} 9 | } 10 | -------------------------------------------------------------------------------- /src/collection/domain/useCases/getCollectionLinks.ts: -------------------------------------------------------------------------------- 1 | import { CollectionLinks } from '../models/CollectionLinks' 2 | import { CollectionRepository } from '../repositories/CollectionRepository' 3 | 4 | export async function getCollectionLinks( 5 | collectionRepository: CollectionRepository, 6 | collectionIdOrAlias: string | number 7 | ): Promise { 8 | return collectionRepository.getLinks(collectionIdOrAlias) 9 | } 10 | -------------------------------------------------------------------------------- /src/collection/domain/useCases/linkCollection.ts: -------------------------------------------------------------------------------- 1 | import { CollectionRepository } from '../repositories/CollectionRepository' 2 | 3 | export async function linkCollection( 4 | collectionRepository: CollectionRepository, 5 | linkedCollectionIdOrAlias: number | string, 6 | linkingCollectionIdOrAlias: number | string 7 | ): Promise { 8 | return collectionRepository.link(linkedCollectionIdOrAlias, linkingCollectionIdOrAlias) 9 | } 10 | -------------------------------------------------------------------------------- /tests/e2e-integration/fixtures/new-collection-data.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "Scientific Research", 3 | "alias": "science", 4 | "dataverseContacts": [ 5 | { 6 | "contactEmail": "pi@example.edu" 7 | }, 8 | { 9 | "contactEmail": "student@example.edu" 10 | } 11 | ], 12 | "affiliation": "Scientific Research University", 13 | "description": "We do all the science.", 14 | "dataverseType": "LABORATORY" 15 | } 16 | -------------------------------------------------------------------------------- /src/collection/domain/models/CollectionType.ts: -------------------------------------------------------------------------------- 1 | export enum CollectionType { 2 | RESEARCHERS = 'RESEARCHERS', 3 | RESEARCH_PROJECTS = 'RESEARCH_PROJECTS', 4 | JOURNALS = 'JOURNALS', 5 | ORGANIZATIONS_INSTITUTIONS = 'ORGANIZATIONS_INSTITUTIONS', 6 | TEACHING_COURSES = 'TEACHING_COURSES', 7 | UNCATEGORIZED = 'UNCATEGORIZED', 8 | LABORATORY = 'LABORATORY', 9 | RESEARCH_GROUP = 'RESEARCH_GROUP', 10 | DEPARTMENT = 'DEPARTMENT' 11 | } 12 | -------------------------------------------------------------------------------- /src/shared/contexts/loading/LoadingProvider.tsx: -------------------------------------------------------------------------------- 1 | import { useState, PropsWithChildren } from 'react' 2 | import { LoadingContext } from './LoadingContext' 3 | 4 | export function LoadingProvider({ children }: PropsWithChildren) { 5 | const [isLoading, setIsLoading] = useState(true) 6 | 7 | return ( 8 | 9 | {children} 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /packages/design-system/tests/component/dropdown-button/dropdown-header/DropdownHeader.spec.tsx: -------------------------------------------------------------------------------- 1 | import { DropdownHeader } from '../../../../src/lib/components/dropdown-button/dropdown-header/DropdownHeader' 2 | 3 | describe('DropdownHeader', () => { 4 | it('renders the dropdown header', () => { 5 | cy.customMount(Header) 6 | 7 | cy.findByRole('heading', { name: 'Header' }).should('exist') 8 | }) 9 | }) 10 | -------------------------------------------------------------------------------- /public/locales/en/header.json: -------------------------------------------------------------------------------- 1 | { 2 | "signUp": "Sign Up", 3 | "logIn": "Log In", 4 | "logOut": "Log Out", 5 | "brandTitle": "Dataverse", 6 | "brandLogoImage": "Dataverse brand logo", 7 | "navigation": { 8 | "addData": "Add Data", 9 | "newCollection": "New Collection", 10 | "newDataset": "New Dataset", 11 | "accountInfo": "Account Information", 12 | "apiToken": "API Token", 13 | "myData": "My Data" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/files/domain/useCases/getFileById.ts: -------------------------------------------------------------------------------- 1 | import { FileRepository } from '../repositories/FileRepository' 2 | import { File } from '../models/File' 3 | 4 | export async function getFileById( 5 | repository: FileRepository, 6 | id: number, 7 | datasetVersionNumber?: string 8 | ): Promise { 9 | return repository.getById(id, datasetVersionNumber).catch((error: Error) => { 10 | throw new Error(error.message) 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /src/sections/file/file-action-buttons/access-file-menu/AccessFileMenu.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .success { 4 | color: $dv-success-color; 5 | } 6 | 7 | .danger { 8 | color: $dv-danger-color; 9 | } 10 | 11 | .access-requested-message { 12 | font-style: italic; 13 | } 14 | 15 | .request-access-login-message { 16 | color: $dv-danger-color; 17 | } 18 | -------------------------------------------------------------------------------- /src/shared/contexts/loading/LoadingContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext, useContext } from 'react' 2 | 3 | interface LoadingContextProps { 4 | isLoading: boolean 5 | setIsLoading: (isLoading: boolean) => void 6 | } 7 | 8 | export const LoadingContext = createContext({ 9 | isLoading: true, 10 | setIsLoading: /* istanbul ignore next */ () => {} 11 | }) 12 | 13 | export const useLoading = () => useContext(LoadingContext) 14 | -------------------------------------------------------------------------------- /src/stories/dataverse-hub/DataverseHubLoadingMockRepository.ts: -------------------------------------------------------------------------------- 1 | import { InstallationMetrics } from '@/dataverse-hub/domain/models/InstallationMetrics' 2 | import { DataverseHubMockRepository } from './DataverseHubMockRepository' 3 | 4 | export class DataverseHubLoadingMockRepository implements DataverseHubMockRepository { 5 | getInstallationMetricsByHubId(_dvHubId: string): Promise { 6 | return new Promise(() => {}) 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/grid/Container.tsx: -------------------------------------------------------------------------------- 1 | import { ReactNode } from 'react' 2 | import { Container as ContainerBS } from 'react-bootstrap' 3 | import * as React from 'react' 4 | 5 | export interface ContainerProps extends React.HTMLAttributes { 6 | children: ReactNode 7 | } 8 | 9 | export function Container({ children, ...props }: ContainerProps) { 10 | return {children} 11 | } 12 | -------------------------------------------------------------------------------- /src/collection/domain/useCases/getCollectionById.ts: -------------------------------------------------------------------------------- 1 | import { Collection } from '../models/Collection' 2 | import { CollectionRepository } from '../repositories/CollectionRepository' 3 | 4 | export async function getCollectionById( 5 | collectionRepository: CollectionRepository, 6 | id?: string 7 | ): Promise { 8 | return collectionRepository.getById(id).catch((error: Error) => { 9 | throw new Error(error.message) 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /src/roles/infrastructure/repositories/RoleJSDataverseRepository.ts: -------------------------------------------------------------------------------- 1 | import { getUserSelectableRoles } from '@iqss/dataverse-client-javascript' 2 | import { Role } from '../../domain/models/Role' 3 | import { RoleRepository } from '../../domain/repositories/RoleRepository' 4 | 5 | export class RoleJSDataverseRepository implements RoleRepository { 6 | getUserSelectableRoles(): Promise { 7 | return getUserSelectableRoles.execute() 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /src/sections/shared/form/RequiredFieldText/RequiredFieldText.tsx: -------------------------------------------------------------------------------- 1 | import { Form, RequiredInputSymbol } from '@iqss/dataverse-design-system' 2 | import { useTranslation } from 'react-i18next' 3 | 4 | export function RequiredFieldText() { 5 | const { t } = useTranslation('shared') 6 | 7 | return ( 8 | 9 | 10 | {t('asterisksIndicateRequiredFields')} 11 | 12 | ) 13 | } 14 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/getDatasetLinkedCollections.ts: -------------------------------------------------------------------------------- 1 | import { CollectionSummary } from '@/collection/domain/models/CollectionSummary' 2 | import { DatasetRepository } from '../repositories/DatasetRepository' 3 | 4 | export async function getDatasetLinkedCollections( 5 | datasetRepository: DatasetRepository, 6 | datasetId: string | number 7 | ): Promise { 8 | return datasetRepository.getDatasetLinkedCollections(datasetId) 9 | } 10 | -------------------------------------------------------------------------------- /src/dataverse-hub/domain/useCases/getInstallationMetrics.ts: -------------------------------------------------------------------------------- 1 | import { DataverseHubRepository } from '../repositories/DataverseHubRepository' 2 | import { InstallationMetrics } from '../models/InstallationMetrics' 3 | 4 | export async function getInstallationMetrics( 5 | dataverseHubRepository: DataverseHubRepository, 6 | dvHubId: string 7 | ): Promise { 8 | return dataverseHubRepository.getInstallationMetricsByHubId(dvHubId) 9 | } 10 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-files/files-table/file-actions/file-actions-cell/file-info-messages/FileInfoMessages.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | .box { 4 | margin-bottom: 0.5em; 5 | color: $dv-info-color; 6 | text-align: center; 7 | background-color: $dv-info-box-color; 8 | } 9 | 10 | .icon { 11 | margin-right: 0.3rem; 12 | margin-bottom: 0.2rem; 13 | } 14 | -------------------------------------------------------------------------------- /tests/component/sections/shared/citation/CitationLearnAbout.spec.tsx: -------------------------------------------------------------------------------- 1 | import { CitationLearnAbout } from '../../../../../src/sections/shared/citation/CitationLearnAbout' 2 | 3 | describe('CitationLearnAbout', () => { 4 | it('renders the component', () => { 5 | cy.customMount() 6 | 7 | cy.findByText('Learn About').should('exist') 8 | cy.findByRole('link', { name: 'Data Citation Standards.' }).should('exist') 9 | }) 10 | }) 11 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | ## What this PR does / why we need it: 2 | 3 | ## Which issue(s) this PR closes: 4 | 5 | - Closes # 6 | 7 | ## Special notes for your reviewer: 8 | 9 | ## Suggestions on how to test this: 10 | 11 | ## Does this PR introduce a user interface change? If mockups are available, please link/include them here: 12 | 13 | ## Is there a release notes or changelog update needed for this change?: 14 | 15 | ## Additional documentation: 16 | -------------------------------------------------------------------------------- /src/sections/dataset/dataset-versions/view-difference/DatasetVersionsDifferenceTable.module.scss: -------------------------------------------------------------------------------- 1 | .dataset-versions-difference-table { 2 | width: 100%; 3 | font-size: 14px; 4 | table-layout: fixed; 5 | border-collapse: collapse; 6 | 7 | th, 8 | td { 9 | width: 30%; 10 | padding: 12px; 11 | text-align: left; 12 | vertical-align: top; 13 | overflow-wrap: anywhere; 14 | } 15 | 16 | th { 17 | font-weight: 600; 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /src/sections/edit-collection-featured-items/featured-items-form/FeaturedItemsForm.module.scss: -------------------------------------------------------------------------------- 1 | @import 'src/assets/variables'; 2 | 3 | .form { 4 | display: flex; 5 | flex-direction: column; 6 | gap: 1rem; 7 | padding-top: 2rem; 8 | } 9 | 10 | .error-container { 11 | padding-top: 1rem; 12 | scroll-margin-top: calc(#{$header-aproximate-height} + 1rem); 13 | } 14 | 15 | .actions-wrapper { 16 | display: flex; 17 | justify-content: flex-end; 18 | } 19 | -------------------------------------------------------------------------------- /src/stories/dataset/WithAnonymizedView.tsx: -------------------------------------------------------------------------------- 1 | import { StoryFn } from '@storybook/react' 2 | import { AnonymizedContext } from '../../sections/dataset/anonymized/AnonymizedContext' 3 | 4 | export const WithAnonymizedView = (Story: StoryFn) => { 5 | const setAnonymizedView = () => {} 6 | 7 | return ( 8 | 9 | 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /packages/design-system/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | 26 | # Tests 27 | coverage 28 | 29 | # Storybook 30 | storybook-static 31 | -------------------------------------------------------------------------------- /public/locales/es/editDatasetMetadata.json: -------------------------------------------------------------------------------- 1 | { 2 | "breadcrumbActionItem": "Editar metadatos del dataset", 3 | "infoAlert": { 4 | "heading": "Editar metadatos del dataset", 5 | "text": "Agrega más metadatos sobre este dataset para ayudar a otros a encontrarlo fácilmente." 6 | }, 7 | "hostCollection": { 8 | "label": "Colección anfitriona", 9 | "description": "La colección que contiene estos datos." 10 | }, 11 | "metadata": "Metadatos" 12 | } 13 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/deleteDatasetDraft.ts: -------------------------------------------------------------------------------- 1 | import { WriteError } from '@iqss/dataverse-client-javascript' 2 | import { DatasetRepository } from '../repositories/DatasetRepository' 3 | 4 | export function deleteDatasetDraft( 5 | datasetRepository: DatasetRepository, 6 | datasetId: string | number 7 | ): Promise { 8 | return datasetRepository.deleteDatasetDraft(datasetId).catch((error: WriteError | unknown) => { 9 | throw error 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/getDatasetDownloadCount.ts: -------------------------------------------------------------------------------- 1 | import { DatasetDownloadCount } from '../models/DatasetDownloadCount' 2 | import { DatasetRepository } from '../repositories/DatasetRepository' 3 | 4 | export async function getDatasetDownloadCount( 5 | datasetRepository: DatasetRepository, 6 | datasetId: string | number, 7 | includeMDC?: boolean 8 | ): Promise { 9 | return datasetRepository.getDownloadCount(datasetId, includeMDC) 10 | } 11 | -------------------------------------------------------------------------------- /src/sections/file/file-preview/FileImage.tsx: -------------------------------------------------------------------------------- 1 | interface FileImageProps { 2 | thumbnail: string 3 | name: string 4 | maxWidth?: number 5 | maxHeight?: number 6 | } 7 | 8 | export function FileImage({ thumbnail, name, maxWidth, maxHeight }: FileImageProps) { 9 | return ( 10 | {name} 15 | ) 16 | } 17 | -------------------------------------------------------------------------------- /src/dataverse-hub/infrastructure/models/ApiInstallationMetrics.ts: -------------------------------------------------------------------------------- 1 | export interface ApiInstallationMetrics { 2 | dvHubId: string 3 | name: string 4 | country: string 5 | continent: string 6 | launchYear: number 7 | metrics: ApiMetric[] 8 | } 9 | 10 | export interface ApiMetric { 11 | recordDate: string 12 | files: number 13 | downloads: number 14 | datasets: number 15 | harvestedDatasets: number 16 | localDatasets: number 17 | dataverses: number 18 | } 19 | -------------------------------------------------------------------------------- /src/info/domain/useCases/getZipDownloadLimit.ts: -------------------------------------------------------------------------------- 1 | import { ZipDownloadLimit } from '@/settings/domain/models/ZipDownloadLimit' 2 | import { DataverseInfoRepository } from '../repositories/DataverseInfoRepository' 3 | import { Setting } from '@/settings/domain/models/Setting' 4 | 5 | export function getZipDownloadLimit( 6 | dataverseInfoRepository: DataverseInfoRepository 7 | ): Promise> { 8 | return dataverseInfoRepository.getZipDownloadLimit() 9 | } 10 | -------------------------------------------------------------------------------- /src/sections/layout/header/HeaderFactory.tsx: -------------------------------------------------------------------------------- 1 | import { ReactElement } from 'react' 2 | import { Header } from './Header' 3 | import { CollectionJSDataverseRepository } from '@/collection/infrastructure/repositories/CollectionJSDataverseRepository' 4 | 5 | const collectionRepository = new CollectionJSDataverseRepository() 6 | 7 | export class HeaderFactory { 8 | static create(): ReactElement { 9 | return
10 | } 11 | } 12 | -------------------------------------------------------------------------------- /deployment/payara/web.xml: -------------------------------------------------------------------------------- 1 | 6 | 7 | spa-servlet 8 | 9 | 10 | 404 11 | /index.html 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /public/locales/es/header.json: -------------------------------------------------------------------------------- 1 | { 2 | "signUp": "Registrarse", 3 | "logIn": "Iniciar sesión", 4 | "logOut": "Cerrar sesión", 5 | "brandTitle": "Dataverse", 6 | "brandLogoImage": "Logotipo de Dataverse", 7 | "navigation": { 8 | "addData": "Agregar datos", 9 | "newCollection": "Nueva colección", 10 | "newDataset": "Nuevo dataset", 11 | "accountInfo": "Información de la cuenta", 12 | "apiToken": "Token de API", 13 | "myData": "Mis datos" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /src/info/domain/useCases/getAvailableDatasetMetadataExportFormats.ts: -------------------------------------------------------------------------------- 1 | import { DataverseInfoRepository } from '../repositories/DataverseInfoRepository' 2 | import { DatasetMetadataExportFormats } from '../models/DatasetMetadataExportFormats' 3 | 4 | export function getAvailableDatasetMetadataExportFormats( 5 | dataverseInfoRepository: DataverseInfoRepository 6 | ): Promise { 7 | return dataverseInfoRepository.getAvailableDatasetMetadataExportFormats() 8 | } 9 | -------------------------------------------------------------------------------- /src/sections/file/file-access/FileAccessInfoIcon.module.scss: -------------------------------------------------------------------------------- 1 | @import 'node_modules/@iqss/dataverse-design-system/src/lib/assets/styles/design-tokens/colors.module'; 2 | 3 | %restricted-icon { 4 | font-size: 20px; 5 | } 6 | 7 | .restricted-icon-restricted { 8 | @extend %restricted-icon; 9 | 10 | color: $dv-danger-color; 11 | } 12 | 13 | .restricted-icon-restrictedWithAccess { 14 | @extend %restricted-icon; 15 | 16 | right: -16px; 17 | color: $dv-success-color; 18 | } 19 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/stories/progress-bar/ProgressBar.stories.tsx: -------------------------------------------------------------------------------- 1 | import type { Meta, StoryObj } from '@storybook/react' 2 | import { ProgressBar } from '../../components/progress-bar/ProgressBar' 3 | 4 | const meta: Meta = { 5 | title: 'ProgressBar', 6 | component: ProgressBar 7 | } 8 | 9 | export default meta 10 | type Story = StoryObj 11 | 12 | export const Default: Story = { 13 | render: () => 14 | } 15 | -------------------------------------------------------------------------------- /src/collection/domain/useCases/deleteCollection.ts: -------------------------------------------------------------------------------- 1 | import { WriteError } from '@iqss/dataverse-client-javascript' 2 | import { CollectionRepository } from '../repositories/CollectionRepository' 3 | 4 | export function deleteCollection( 5 | collectionRepository: CollectionRepository, 6 | collectionIdOrAlias: number | string 7 | ): Promise { 8 | return collectionRepository.delete(collectionIdOrAlias).catch((error: WriteError | unknown) => { 9 | throw error 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/createDataset.ts: -------------------------------------------------------------------------------- 1 | import { DatasetRepository } from '../repositories/DatasetRepository' 2 | import { DatasetDTO } from './DTOs/DatasetDTO' 3 | 4 | export function createDataset( 5 | datasetRepository: DatasetRepository, 6 | dataset: DatasetDTO, 7 | collectionId: string 8 | ): Promise<{ persistentId: string }> { 9 | return datasetRepository.create(dataset, collectionId).catch((error: Error) => { 10 | throw new Error(error.message) 11 | }) 12 | } 13 | -------------------------------------------------------------------------------- /src/users/domain/repositories/UserRepository.tsx: -------------------------------------------------------------------------------- 1 | import { User } from '../models/User' 2 | import { TokenInfo } from '../.././domain/models/TokenInfo' 3 | import { UserDTO } from '../useCases/DTOs/UserDTO' 4 | 5 | export interface UserRepository { 6 | getAuthenticated: () => Promise 7 | getCurrentApiToken: () => Promise 8 | recreateApiToken: () => Promise 9 | deleteApiToken: () => Promise 10 | register: (user: UserDTO) => Promise 11 | } 12 | -------------------------------------------------------------------------------- /tests/component/info/domain/models/DataverseVersionMother.ts: -------------------------------------------------------------------------------- 1 | import { faker } from '@faker-js/faker' 2 | import { DataverseVersion } from '../../../../../src/info/domain/models/DataverseVersion' 3 | import isChromatic from 'chromatic/isChromatic' 4 | 5 | export class DataverseVersionMother { 6 | static create(): DataverseVersion { 7 | return isChromatic() 8 | ? 'v. 123 build 12345' 9 | : `v. ${faker.datatype.number()} build ${faker.datatype.number()}` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/dataset/domain/useCases/getDatasetByPrivateUrlToken.ts: -------------------------------------------------------------------------------- 1 | import { DatasetRepository } from '../repositories/DatasetRepository' 2 | import { Dataset } from '../models/Dataset' 3 | 4 | export async function getDatasetByPrivateUrlToken( 5 | datasetRepository: DatasetRepository, 6 | privateUrlToken: string 7 | ): Promise { 8 | return datasetRepository.getByPrivateUrlToken(privateUrlToken).catch((error: Error) => { 9 | throw new Error(error.message) 10 | }) 11 | } 12 | -------------------------------------------------------------------------------- /src/files/domain/useCases/editFileMetadata.ts: -------------------------------------------------------------------------------- 1 | import { FileRepository } from '../repositories/FileRepository' 2 | import { FileMetadataDTO } from '@/files/domain/useCases/DTOs/FileMetadataDTO' 3 | 4 | export function editFileMetadata( 5 | fileRepository: FileRepository, 6 | fileId: number | string, 7 | fileMetadata: FileMetadataDTO, 8 | sourceLastUpdateTime?: string 9 | ): Promise { 10 | return fileRepository.updateMetadata(fileId, fileMetadata, sourceLastUpdateTime) 11 | } 12 | -------------------------------------------------------------------------------- /src/sections/dataset/anonymized/AnonymizedProvider.tsx: -------------------------------------------------------------------------------- 1 | import { PropsWithChildren, useState } from 'react' 2 | import { AnonymizedContext } from './AnonymizedContext' 3 | 4 | export function AnonymizedProvider({ children }: PropsWithChildren) { 5 | const [anonymizedView, setAnonymizedView] = useState(false) 6 | 7 | return ( 8 | 9 | {children} 10 | 11 | ) 12 | } 13 | -------------------------------------------------------------------------------- /packages/design-system/src/lib/components/accordion/AccordionBody.tsx: -------------------------------------------------------------------------------- 1 | import { ElementType, ReactNode } from 'react' 2 | import { Accordion as AccordionBS } from 'react-bootstrap' 3 | 4 | interface AccordionBodyProps extends React.HTMLAttributes { 5 | children: ReactNode 6 | bsPrefix?: string 7 | as?: ElementType 8 | } 9 | 10 | export function AccordionBody({ children, ...rest }: AccordionBodyProps) { 11 | return {children} 12 | } 13 | -------------------------------------------------------------------------------- /packages/design-system/tests/component/card/Card.spec.tsx: -------------------------------------------------------------------------------- 1 | import { Card } from '../../../src/lib/components/card/Card' 2 | 3 | describe('Card', () => { 4 | it('renders the Card with header and body', () => { 5 | cy.mount( 6 | 7 | Card Header 8 | Card Body 9 | 10 | ) 11 | 12 | cy.findByText('Card Header').should('exist') 13 | cy.findByText('Card Body').should('exist') 14 | }) 15 | }) 16 | -------------------------------------------------------------------------------- /src/sections/dataset/anonymized/AnonymizedContext.ts: -------------------------------------------------------------------------------- 1 | import { createContext, useContext } from 'react' 2 | 3 | interface AnonymizedContextProps { 4 | anonymizedView: boolean 5 | setAnonymizedView: (anonymizedView: boolean) => void 6 | } 7 | 8 | export const AnonymizedContext = createContext({ 9 | anonymizedView: false, 10 | setAnonymizedView: /* istanbul ignore next */ (): void => {} 11 | }) 12 | 13 | export const useAnonymized = () => useContext(AnonymizedContext) 14 | -------------------------------------------------------------------------------- /src/sections/dataset/markdown/MarkdownComponent.tsx: -------------------------------------------------------------------------------- 1 | import ReactMarkdown from 'react-markdown' 2 | import styles from './MarkdownComponent.module.scss' 3 | 4 | interface Props { 5 | markdown: string 6 | } 7 | 8 | export function MarkdownComponent({ markdown }: Props) { 9 | return ( 10 | 13 | }}> 14 | {markdown} 15 | 16 | ) 17 | } 18 | -------------------------------------------------------------------------------- /src/sections/file/file-preview/FilePreview.tsx: -------------------------------------------------------------------------------- 1 | import { FileImage } from './FileImage' 2 | import { FileIcon } from './FileIcon' 3 | import { FileType } from '../../../files/domain/models/FileMetadata' 4 | 5 | interface FilePreviewProps { 6 | thumbnail?: string 7 | type: FileType 8 | name: string 9 | } 10 | 11 | export function FilePreview({ thumbnail, type, name }: FilePreviewProps) { 12 | return thumbnail ? : 13 | } 14 | -------------------------------------------------------------------------------- /src/sections/layout/footer/FooterFactory.tsx: -------------------------------------------------------------------------------- 1 | import { ReactElement } from 'react' 2 | import { DataverseInfoJSDataverseRepository } from '../../../info/infrastructure/repositories/DataverseInfoJSDataverseRepository' 3 | import { Footer } from './Footer' 4 | 5 | const dataverseInfoRepository = new DataverseInfoJSDataverseRepository() 6 | 7 | export class FooterFactory { 8 | static create(): ReactElement { 9 | return