@@ -18,6 +18,7 @@ import { ContextModalProps } from '@mantine/modals';
18
18
import { IconAlertTriangle , IconPlaylistX , IconPlus } from '@tabler/icons-react' ;
19
19
import { Trans , useTranslation } from 'next-i18next' ;
20
20
import { FC , useState } from 'react' ;
21
+ import { AppSelector } from '~/components/Dashboard/Tiles/Widgets/Inputs/AppSelector' ;
21
22
import { useConfigContext } from '~/config/provider' ;
22
23
import { useConfigStore } from '~/config/store' ;
23
24
import { mapObject } from '~/tools/client/objects' ;
@@ -29,7 +30,6 @@ import { InfoCard } from '../../../InfoCard/InfoCard';
29
30
import { DraggableList } from './Inputs/DraggableList' ;
30
31
import { LocationSelection } from './Inputs/LocationSelection' ;
31
32
import { StaticDraggableList } from './Inputs/StaticDraggableList' ;
32
- import { AppSelector } from '~/components/Dashboard/Tiles/Widgets/Inputs/AppSelector' ;
33
33
34
34
export type WidgetEditModalInnerProps = {
35
35
widgetId : string ;
@@ -41,10 +41,10 @@ export type WidgetEditModalInnerProps = {
41
41
export type IntegrationOptionsValueType = IWidget < string , any > [ 'properties' ] [ string ] ;
42
42
43
43
export const WidgetsEditModal = ( {
44
- context,
45
- id,
46
- innerProps,
47
- } : ContextModalProps < WidgetEditModalInnerProps > ) => {
44
+ context,
45
+ id,
46
+ innerProps,
47
+ } : ContextModalProps < WidgetEditModalInnerProps > ) => {
48
48
const { t } = useTranslation ( [ `modules/${ innerProps . widgetType } ` , 'common' ] ) ;
49
49
const [ moduleProperties , setModuleProperties ] = useState ( innerProps . options ) ;
50
50
const items = Object . entries ( innerProps . widgetOptions ?? { } ) as [
@@ -79,7 +79,7 @@ export const WidgetsEditModal = ({
79
79
widgets : [ ...prev . widgets . filter ( ( x ) => x . id !== innerProps . widgetId ) , currentWidget ! ] ,
80
80
} ;
81
81
} ,
82
- true ,
82
+ true
83
83
) ;
84
84
context . closeModal ( id ) ;
85
85
} ;
@@ -194,9 +194,9 @@ const WidgetOptionTypeSwitch: FC<{
194
194
const data = items . map ( ( dataType ) => {
195
195
return ! dataType . label
196
196
? {
197
- value : dataType . value ,
198
- label : t ( `descriptor.settings.${ key } .data.${ dataType . value } ` ) ,
199
- }
197
+ value : dataType . value ,
198
+ label : t ( `descriptor.settings.${ key } .data.${ dataType . value } ` ) ,
199
+ }
200
200
: dataType ;
201
201
} ) ;
202
202
return (
@@ -279,14 +279,14 @@ const WidgetOptionTypeSwitch: FC<{
279
279
typedVal . map ( ( oldVal ) =>
280
280
oldVal . key === liName
281
281
? {
282
- ...oldVal ,
283
- subValues : {
284
- ...oldVal . subValues ,
285
- [ settingName ] : newVal ,
286
- } ,
287
- }
288
- : oldVal ,
289
- ) ,
282
+ ...oldVal ,
283
+ subValues : {
284
+ ...oldVal . subValues ,
285
+ [ settingName ] : newVal ,
286
+ } ,
287
+ }
288
+ : oldVal
289
+ )
290
290
) ;
291
291
292
292
return (
@@ -299,7 +299,7 @@ const WidgetOptionTypeSwitch: FC<{
299
299
value = { typedVal }
300
300
onChange = { ( v ) => handleChange ( key , v ) }
301
301
labels = { mapObject ( option . items , ( liName ) =>
302
- t ( `descriptor.settings.${ key } .${ liName } .label` ) ,
302
+ t ( `descriptor.settings.${ key } .${ liName } .label` )
303
303
) }
304
304
>
305
305
{ mapObject ( option . items , ( liName , liSettings ) =>
@@ -312,7 +312,7 @@ const WidgetOptionTypeSwitch: FC<{
312
312
value = { extractSubValue ( liName , settingName ) }
313
313
handleChange = { handleSubChange ( liName , settingName ) }
314
314
/>
315
- ) ) ,
315
+ ) )
316
316
) }
317
317
</ StaticDraggableList >
318
318
</ Stack >
@@ -337,7 +337,7 @@ const WidgetOptionTypeSwitch: FC<{
337
337
onChange = { ( values ) =>
338
338
handleChange (
339
339
key ,
340
- values . map ( ( item : string ) => item ) ,
340
+ values . map ( ( item : string ) => item )
341
341
)
342
342
}
343
343
/>
0 commit comments