chore(prettier): full repo linting and code reformatting once and for all (#3627)

This commit is contained in:
Alireza authored and GitHub committed 2023-09-01 16:19:39 -04:00
1 parent 01500a2d4c
commit 9045ddaedc
656 files changed
+21737 -20628

No files matched your search

@@ -5,10 +5,7 @@ import callInputDialog from './callInputDialog';
import { useAppConfig } from '@state';
import { useTranslation } from 'react-i18next';
export default function PanelSegmentation({
servicesManager,
commandsManager,
}) {
export default function PanelSegmentation({ servicesManager, commandsManager }) {
const { segmentationService, uiDialogService } = servicesManager.services;
const [appConfig] = useAppConfig();
const disableEditing = appConfig?.disableEditing;
@@ -19,9 +16,7 @@ export default function PanelSegmentation({
segmentationService.getConfiguration()
);
const [segmentations, setSegmentations] = useState(() =>
segmentationService.getSegmentations()
);
const [segmentations, setSegmentations] = useState(() => segmentationService.getSegmentations());
const [isMinimized, setIsMinimized] = useState({});
@@ -78,32 +73,20 @@ export default function PanelSegmentation({
};
const getToolGroupIds = segmentationId => {
const toolGroupIds = segmentationService.getToolGroupIdsWithSegmentation(
segmentationId
);
const toolGroupIds = segmentationService.getToolGroupIdsWithSegmentation(segmentationId);
return toolGroupIds;
};
const onSegmentClick = (segmentationId, segmentIndex) => {
segmentationService.setActiveSegmentForSegmentation(
segmentationId,
segmentIndex
);
segmentationService.setActiveSegmentForSegmentation(segmentationId, segmentIndex);
const toolGroupIds = getToolGroupIds(segmentationId);
toolGroupIds.forEach(toolGroupId => {
// const toolGroupId =
segmentationService.setActiveSegmentationForToolGroup(
segmentationId,
toolGroupId
);
segmentationService.jumpToSegmentCenter(
segmentationId,
segmentIndex,
toolGroupId
);
segmentationService.setActiveSegmentationForToolGroup(segmentationId, toolGroupId);
segmentationService.jumpToSegmentCenter(segmentationId, segmentIndex, toolGroupId);
});
};
@@ -118,11 +101,7 @@ export default function PanelSegmentation({
return;
}
segmentationService.setSegmentLabelForSegmentation(
segmentationId,
segmentIndex,
label
);
segmentationService.setSegmentLabelForSegmentation(segmentationId, segmentIndex, label);
});
};
@@ -191,7 +170,7 @@ export default function PanelSegmentation({
);
return (
<div className="flex flex-col flex-auto min-h-0 justify-between mt-1">
<div className="mt-1 flex min-h-0 flex-auto flex-col justify-between">
{/* show segmentation table */}
{segmentations?.length ? (
<SegmentationGroupTable
@@ -213,25 +192,13 @@ export default function PanelSegmentation({
onToggleMinimizeSegmentation={onToggleMinimizeSegmentation}
segmentationConfig={{ initialConfig: segmentationConfiguration }}
setRenderOutline={value =>
_setSegmentationConfiguration(
selectedSegmentationId,
'renderOutline',
value
)
_setSegmentationConfiguration(selectedSegmentationId, 'renderOutline', value)
}
setOutlineOpacityActive={value =>
_setSegmentationConfiguration(
selectedSegmentationId,
'outlineOpacity',
value
)
_setSegmentationConfiguration(selectedSegmentationId, 'outlineOpacity', value)
}
setRenderFill={value =>
_setSegmentationConfiguration(
selectedSegmentationId,
'renderFill',
value
)
_setSegmentationConfiguration(selectedSegmentationId, 'renderFill', value)
}
setRenderInactiveSegmentations={value =>
_setSegmentationConfiguration(
@@ -241,25 +208,13 @@ export default function PanelSegmentation({
)
}
setOutlineWidthActive={value =>
_setSegmentationConfiguration(
selectedSegmentationId,
'outlineWidthActive',
value
)
_setSegmentationConfiguration(selectedSegmentationId, 'outlineWidthActive', value)
}
setFillAlpha={value =>
_setSegmentationConfiguration(
selectedSegmentationId,
'fillAlpha',
value
)
_setSegmentationConfiguration(selectedSegmentationId, 'fillAlpha', value)
}
setFillAlphaInactive={value =>
_setSegmentationConfiguration(
selectedSegmentationId,
'fillAlphaInactive',
value
)
_setSegmentationConfiguration(selectedSegmentationId, 'fillAlphaInactive', value)
}
/>
) : null}
@@ -39,7 +39,7 @@ function callInputDialog(uiDialogService, label, callback) {
label="Enter the segment label"
labelClassName="text-white text-[14px] leading-[1.2]"
autoFocus
className="bg-black border-primary-main"
className="border-primary-main bg-black"
type="text"
value={value.label}
onChange={event => {