- Add Activepieces fork with SmoothSchedule custom piece - Create integrations app with Activepieces service layer - Add embed token endpoint for iframe integration - Create Automations page with embedded workflow builder - Add sidebar visibility fix for embed mode - Add list inactive customers endpoint to Public API - Include SmoothSchedule triggers: event created/updated/cancelled - Include SmoothSchedule actions: create/update/cancel events, list resources/services/customers 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
65 lines
2.0 KiB
TypeScript
65 lines
2.0 KiB
TypeScript
import { useQuery } from '@tanstack/react-query';
|
|
import { t } from 'i18next';
|
|
|
|
import {
|
|
RightSideBarType,
|
|
useBuilderStateContext,
|
|
} from '@/app/builder/builder-hooks';
|
|
import { CardList, CardListItemSkeleton } from '@/components/custom/card-list';
|
|
import { ScrollArea } from '@/components/ui/scroll-area';
|
|
import { flowsApi } from '@/features/flows/lib/flows-api';
|
|
import { FlowVersionMetadata, SeekPage } from '@activepieces/shared';
|
|
|
|
import { SidebarHeader } from '../sidebar-header';
|
|
|
|
import { FlowVersionDetailsCard } from './flow-versions-card';
|
|
|
|
const FlowVersionsList = () => {
|
|
const [flow, setRightSidebar, selectedFlowVersion] = useBuilderStateContext(
|
|
(state) => [state.flow, state.setRightSidebar, state.flowVersion],
|
|
);
|
|
|
|
const {
|
|
data: flowVersionPage,
|
|
isLoading,
|
|
isError,
|
|
} = useQuery<SeekPage<FlowVersionMetadata>, Error>({
|
|
queryKey: ['flow-versions', flow.id],
|
|
queryFn: () =>
|
|
flowsApi.listVersions(flow.id, {
|
|
limit: 1000,
|
|
cursor: undefined,
|
|
}),
|
|
staleTime: 0,
|
|
});
|
|
|
|
return (
|
|
<>
|
|
<SidebarHeader onClose={() => setRightSidebar(RightSideBarType.NONE)}>
|
|
{t('Version History')}
|
|
</SidebarHeader>
|
|
<CardList>
|
|
{isLoading && <CardListItemSkeleton numberOfCards={10} />}
|
|
{isError && <div>{t('Error, please try again.')}</div>}
|
|
{flowVersionPage && flowVersionPage.data && (
|
|
<ScrollArea className="w-full h-full">
|
|
{flowVersionPage.data.map((flowVersion, index) => (
|
|
<FlowVersionDetailsCard
|
|
selected={flowVersion.id === selectedFlowVersion?.id}
|
|
publishedVersionId={flow.publishedVersionId}
|
|
flowVersion={flowVersion}
|
|
flowVersionNumber={flowVersionPage.data.length - index}
|
|
key={flowVersion.id}
|
|
/>
|
|
))}
|
|
</ScrollArea>
|
|
)}
|
|
</CardList>
|
|
</>
|
|
);
|
|
};
|
|
|
|
FlowVersionsList.displayName = 'FlowVersionsList';
|
|
|
|
export { FlowVersionsList };
|