Skip to content

Commit 6e029cf

Browse files
committed
Merge branch 'develop' into 615-dataset-versions-tab-use-case-integration
1 parent 66d2ca3 commit 6e029cf

127 files changed

Lines changed: 5556 additions & 2005 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.storybook/preview.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { ThemeProvider } from '@iqss/dataverse-design-system'
44
import { createBrowserRouter, RouteObject, RouterProvider } from 'react-router-dom'
55
import { FakerHelper } from '../tests/component/shared/FakerHelper'
66
import 'react-loading-skeleton/dist/skeleton.css'
7+
import '../src/assets/swal-custom.scss'
8+
import '../src/assets/react-toastify-custom.scss'
79

810
const preview: Preview = {
911
parameters: {

package-lock.json

Lines changed: 177 additions & 813 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"@dnd-kit/sortable": "8.0.0",
1818
"@dnd-kit/utilities": "3.2.2",
1919
"@faker-js/faker": "7.6.0",
20-
"@iqss/dataverse-client-javascript": "2.0.0-alpha.29",
20+
"@iqss/dataverse-client-javascript": "2.0.0-alpha.33",
2121
"@iqss/dataverse-design-system": "*",
2222
"@istanbuljs/nyc-config-typescript": "1.0.2",
2323
"@tanstack/react-table": "8.9.2",
@@ -50,6 +50,9 @@
5050
"react-toastify": "11.0.2",
5151
"react-topbar-progress-indicator": "4.1.1",
5252
"sass": "1.58.1",
53+
"sweetalert2": "11.17.2",
54+
"sweetalert2-react-content": "5.1.0",
55+
"turndown": "7.2.0",
5356
"typescript": "5.7.2",
5457
"use-deep-compare": "1.2.1",
5558
"vite-plugin-istanbul": "4.0.1",

packages/design-system/src/lib/components/form/form-group/form-element/FormTextArea.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,17 @@ export interface FormTextAreaProps extends Omit<React.HTMLAttributes<FormInputEl
99
isInvalid?: boolean
1010
value?: string
1111
autoFocus?: boolean
12+
rows?: number
1213
}
1314

1415
export const FormTextArea = React.forwardRef(function FormTextArea(
15-
{ name, disabled, isValid, isInvalid, value, autoFocus, ...props }: FormTextAreaProps,
16+
{ name, disabled, isValid, isInvalid, value, autoFocus, rows = 5, ...props }: FormTextAreaProps,
1617
ref
1718
) {
1819
return (
1920
<FormBS.Control
2021
as="textarea"
21-
rows={5}
22+
rows={rows}
2223
disabled={disabled}
2324
name={name}
2425
isValid={isValid}

public/locales/en/file.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,12 @@
6767
},
6868
"fileDeletedSuccess": "The file has been deleted.",
6969
"defaultFileDeleteError": "Something went wrong deleting the file. Try again later.",
70+
"alerts": {
71+
"draftVersion": {
72+
"heading": "This draft version needs to be published",
73+
"alertText": "When ready for sharing, please <a>go to the dataset page</a> to publish it so that others can see these changes."
74+
}
75+
},
7076
"restriction": {
7177
"fileRestrictdSuccess": "The file has been restricted.",
7278
"fileUnrestrictedSuccess": "The file has been unrestricted.",

public/locales/en/files.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
2+
"files": "Files",
23
"filesLoading": "Files loading spinner symbol",
34
"errorUnkownGetFilesFromDataset": "There was an error getting the files total download size",
45
"errorUnkownGetFilesCountInfo": "There was an error getting the files count info",
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"statusNumberNotFound": "404",
3+
"message": "We can't find the <1>{{type}}</1> you're looking for.\n Sorry for the inconvenience.",
4+
"backToHomepage": "Back to {{brandName}} Homepage"
5+
}

public/locales/en/replaceFile.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"pageTitle": "Replace File",
3+
"notAllowedToReplaceFile": "You do not have permissions to replace this file.",
4+
"originalFile": "Original File"
5+
}

public/locales/en/shared.json

Lines changed: 70 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
2+
"collection": "Collection",
3+
"dataset": "Dataset",
4+
"file": "File",
5+
"page": "Page",
26
"asterisksIndicateRequiredFields": "Asterisks indicate required fields",
37
"remove": "Remove",
48
"add": "Add",
@@ -20,10 +24,6 @@
2024
"heading": "Page Number Not Found",
2125
"message": "The page number you requested does not exist. Please try a different page number."
2226
},
23-
"pageNotFound": {
24-
"heading": "Page Not Found",
25-
"message": "The page you are looking for was not found."
26-
},
2727
"pagination": {
2828
"results_one": "1 {{item}}",
2929
"results_other": "{{start}} to {{end}} of {{formattedCount}} {{item}}s",
@@ -158,6 +158,72 @@
158158
},
159159
"createCollection": "Create Collection"
160160
},
161+
"fileUploader": {
162+
"supportedFiles": "All file types are supported for upload and download in their original format. If you are uploading Excel, CSV, TSV, RData, Stata, or SPSS files, <anchor>see the guides</anchor> for tabular support and limitations.",
163+
"accordionTitle": "Upload with HTTP via your browser",
164+
"selectFileSingle": "Select file to add",
165+
"selectFileMultiple": "Select files to add",
166+
"dragDropSingle": "Drag and drop file here.",
167+
"dragDropMultiple": "Drag and drop files and/or directories here.",
168+
"cancelUpload": "Cancel upload",
169+
"uploadFailed": "There was an error uploading this file.",
170+
"loadingConfiguration": "Loading configuration",
171+
"replaceFileMultipleError": "You can only drop one file to replace.",
172+
"replaceFileAlreadyOneFileError": "You already have a file to replace. Please remove it first.",
173+
"fileReplacedSuccessfully": "The file has been replaced successfully.",
174+
"defaultFileReplaceError": "Something went wrong replacing the file. Try again later.",
175+
"defaultAddUploadedFilesToDatasetError": "Something went wrong adding the uploaded files to the dataset. Try again later.",
176+
"filesAddedToDatasetSuccessfully": "Files added to dataset successfully.",
177+
"fileUploadSkipped": {
178+
"dsStore": "File upload skipped: .DS_Store files are not allowed.",
179+
"alreadyUploaded": "File {{fileName}} was skipped because it has already been uploaded."
180+
},
181+
"fileTypeDifferentModal": {
182+
"title": "File Type Different",
183+
"message": "The original file ({{originalFileType}}) and replacement file ({{replacementFileType}}) are different file types. Would you like to continue?"
184+
},
185+
"confirmLeaveModal": {
186+
"title": "Discard Uploaded Files?",
187+
"message": "Uploaded files haven’t been saved. If you leave now, they’ll be lost.",
188+
"stay": "Stay on this page",
189+
"leave": "Leave without saving"
190+
},
191+
"uploadedFilesList": {
192+
"fields": {
193+
"fileName": {
194+
"label": "File Name",
195+
"required": "File Name is required",
196+
"invalid": {
197+
"maxLength": "File Name must be at most {{maxLength}} characters.",
198+
"characters": "The file name contains invalid characters. The following characters are not allowed: : < > ; # / \" * | ? \\",
199+
"duplicateCombination": "File Name, File Path or combination of File path + File name should be unique. There is already a combination with the same value."
200+
}
201+
},
202+
"filePath": {
203+
"label": "File Path",
204+
"description": "Hierarchical directory structure path used to display file organization and support reproducibility.",
205+
"invalid": {
206+
"maxLength": "File Path must be at most {{maxLength}} characters.",
207+
"characters": "The file path contains invalid characters. Only letters, numbers, spaces, dashes, periods, backslashes, and forward slashes are allowed.",
208+
"duplicateCombination": "File Name, File Path or combination of File path + File name should be unique. There is already a combination with the same value."
209+
}
210+
},
211+
"description": {
212+
"label": "Description",
213+
"invalid": {
214+
"maxLength": "Description must be at most {{maxLength}} characters."
215+
}
216+
}
217+
},
218+
"removeFile": "Remove File",
219+
"editSelectedFiles": "Edit Selected Files",
220+
"removeSelectedFiles": "Remove Selected Files",
221+
"uploadedFile": "File uploaded",
222+
"uploadedFiles": "Files uploaded",
223+
"selectAllFiles": "Select all files",
224+
"deselectAllFiles": "Deselect all files"
225+
}
226+
},
161227
"contact": {
162228
"message": "Message",
163229
"subject": "Subject",

src/App.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { BASE_URL } from './config'
77
import { ToastContainer } from 'react-toastify'
88
import 'react-loading-skeleton/dist/skeleton.css'
99
import './assets/react-toastify-custom.scss'
10+
import './assets/swal-custom.scss'
1011

1112
if (BASE_URL === '') {
1213
throw Error('VITE_DATAVERSE_BACKEND_URL environment variable should be specified.')

0 commit comments

Comments
 (0)