1- import { Box , Button , ButtonGroup , Callout , Chip , Field , Margins , Select , InputBox , TextInput , UrlInput } from '@rocket.chat/fuselage' ;
1+ import {
2+ Box ,
3+ Button ,
4+ ButtonGroup ,
5+ Callout ,
6+ Chip ,
7+ Field ,
8+ Margins ,
9+ Select ,
10+ InputBox ,
11+ TextInput ,
12+ UrlInput ,
13+ FieldLabel ,
14+ FieldRow ,
15+ FieldHint ,
16+ } from '@rocket.chat/fuselage' ;
217import { useSafely } from '@rocket.chat/fuselage-hooks' ;
318import type { TranslationKey } from '@rocket.chat/ui-contexts' ;
419import { useToastMessageDispatch , useRouter , useRouteParameter , useSetting , useEndpoint } from '@rocket.chat/ui-contexts' ;
@@ -201,10 +216,10 @@ function NewImportPage() {
201216 < Box marginInline = 'auto' marginBlock = 'neg-x24' width = 'full' maxWidth = 'x580' >
202217 < Margins block = 'x24' >
203218 < Field >
204- < Field . Label alignSelf = 'stretch' htmlFor = { importerKeySelectId } >
219+ < FieldLabel alignSelf = 'stretch' htmlFor = { importerKeySelectId } >
205220 { t ( 'Import_Type' ) }
206- </ Field . Label >
207- < Field . Row >
221+ </ FieldLabel >
222+ < FieldRow >
208223 < Select
209224 id = { importerKeySelectId }
210225 value = { importerKey }
@@ -213,21 +228,21 @@ function NewImportPage() {
213228 onChange = { handleImporterKeyChange }
214229 options = { options }
215230 />
216- </ Field . Row >
231+ </ FieldRow >
217232 { importer && (
218- < Field . Hint >
233+ < FieldHint >
219234 { importer . key === 'csv'
220235 ? t ( 'Importer_From_Description_CSV' )
221236 : t ( 'Importer_From_Description' , { from : t ( importer . name as TranslationKey ) } ) }
222- </ Field . Hint >
237+ </ FieldHint >
223238 ) }
224239 </ Field >
225240 { importer && (
226241 < Field >
227- < Field . Label alignSelf = 'stretch' htmlFor = { fileTypeSelectId } >
242+ < FieldLabel alignSelf = 'stretch' htmlFor = { fileTypeSelectId } >
228243 { t ( 'File_Type' ) }
229- </ Field . Label >
230- < Field . Row >
244+ </ FieldLabel >
245+ < FieldRow >
231246 < Select
232247 id = { fileTypeSelectId }
233248 value = { fileType }
@@ -240,7 +255,7 @@ function NewImportPage() {
240255 [ 'path' , t ( 'Server_File_Path' ) ] ,
241256 ] }
242257 />
243- </ Field . Row >
258+ </ FieldRow >
244259 </ Field >
245260 ) }
246261 { importer && (
@@ -259,42 +274,42 @@ function NewImportPage() {
259274 </ Callout >
260275 ) }
261276 < Field >
262- < Field . Label alignSelf = 'stretch' htmlFor = { fileSourceInputId } >
277+ < FieldLabel alignSelf = 'stretch' htmlFor = { fileSourceInputId } >
263278 { t ( 'Importer_Source_File' ) }
264- </ Field . Label >
265- < Field . Row >
279+ </ FieldLabel >
280+ < FieldRow >
266281 < InputBox type = 'file' id = { fileSourceInputId } onChange = { handleImportFileChange } />
267- </ Field . Row >
282+ </ FieldRow >
268283 { files ?. length > 0 && (
269- < Field . Row >
284+ < FieldRow >
270285 { files . map ( ( file , i ) => (
271286 < Chip key = { i } onClick = { handleFileUploadChipClick ( file ) } >
272287 { file . name }
273288 </ Chip >
274289 ) ) }
275- </ Field . Row >
290+ </ FieldRow >
276291 ) }
277292 </ Field >
278293 </ >
279294 ) }
280295 { fileType === 'url' && (
281296 < Field >
282- < Field . Label alignSelf = 'stretch' htmlFor = { fileSourceInputId } >
297+ < FieldLabel alignSelf = 'stretch' htmlFor = { fileSourceInputId } >
283298 { t ( 'File_URL' ) }
284- </ Field . Label >
285- < Field . Row >
299+ </ FieldLabel >
300+ < FieldRow >
286301 < UrlInput id = { fileSourceInputId } value = { fileUrl } onChange = { handleFileUrlChange } />
287- </ Field . Row >
302+ </ FieldRow >
288303 </ Field >
289304 ) }
290305 { fileType === 'path' && (
291306 < Field >
292- < Field . Label alignSelf = 'stretch' htmlFor = { fileSourceInputId } >
307+ < FieldLabel alignSelf = 'stretch' htmlFor = { fileSourceInputId } >
293308 { t ( 'File_Path' ) }
294- </ Field . Label >
295- < Field . Row >
309+ </ FieldLabel >
310+ < FieldRow >
296311 < TextInput id = { fileSourceInputId } value = { filePath } onChange = { handleFilePathChange } />
297- </ Field . Row >
312+ </ FieldRow >
298313 </ Field >
299314 ) }
300315 </ >
0 commit comments