chore: introduce @automatisch/types
This commit is contained in:

committed by
Ömer Faruk Aydın

parent
bbb6f0b0ff
commit
3391578655
@@ -10,7 +10,7 @@ import Collapse from '@mui/material/Collapse';
|
||||
import Typography from '@mui/material/Typography';
|
||||
import ExpandLess from '@mui/icons-material/ExpandLess';
|
||||
import ExpandMore from '@mui/icons-material/ExpandMore';
|
||||
import { Step } from 'types/step';
|
||||
import type { IStep } from '@automatisch/types';
|
||||
|
||||
const ListItemText = styled(MuiListItemText)``;
|
||||
|
||||
@@ -61,7 +61,7 @@ const Suggestions = (props: SuggestionsProps) => {
|
||||
<List
|
||||
disablePadding
|
||||
>
|
||||
{data.map((option: Step, index: number) => (
|
||||
{data.map((option: IStep, index: number) => (
|
||||
<>
|
||||
<ListItemButton
|
||||
divider
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { Step } from 'types/step';
|
||||
import type { IStep } from '@automatisch/types';
|
||||
|
||||
const joinBy = (delimiter = '.', ...args: string[]) => args.filter(Boolean).join(delimiter);
|
||||
|
||||
@@ -32,10 +32,10 @@ const process = (data: any, parentKey?: any, index?: number): any[] => {
|
||||
});
|
||||
};
|
||||
|
||||
export const processStepWithExecutions = (steps: Step[]): any[] => {
|
||||
export const processStepWithExecutions = (steps: IStep[]): any[] => {
|
||||
if (!steps) return [];
|
||||
|
||||
return steps.map((step: Step, index: number) => ({
|
||||
return steps.map((step: IStep, index: number) => ({
|
||||
id: step.id,
|
||||
// TODO: replace with step.name once introduced
|
||||
name: `${index + 1}. ${step.appKey}`,
|
||||
|
Reference in New Issue
Block a user