mirror of
https://github.com/ToolJet/ToolJet
synced 2026-05-06 06:48:21 +00:00
* fix deps * Modularisation changes for Build with AI feature * New app loading UI for Build with AI feature & added animation for chat messages * Fix Error using AI feature * add missing services and logic * fix app gen * update submodules * EE frontend submodule updated * update submodules * EE frontend submodule updated post sync * Added Artifact Preview component to ee moddules list * Updated ai slice code * app gen changes * Resolved fix with AI bugs * Resolved AI Copilot bugs * app gen changes and query fixes * fix query generation bugs * update copilot * Resolved ChatMode dropdown & popover bug fix * Resolved PR suggestions & PreviewBox component in CE edition * Synced frontend/ee with main * Synced server/ee with main branch * Enhance submodule checkout process to handle branch existence and fallback to main (#13218) * Enhance submodule checkout process to handle branch existence and fallback to main * Improve submodule checkout process to handle branch validation and fallback to main * chore: Comment out Node.js setup, dependency installation, and build steps in cloud frontend workflow * refactor: Enhance submodule checkout process to include submodule name in logs * Update submodule checkout process to use the correct submodule name extraction method * fix: Update submodule checkout script to use correct submodule path variable * Improve submodule checkout process to correctly handle branch names and fallback to main * chore: Uncomment Node.js setup, dependency installation, and build steps in cloud frontend workflow * fix: Update branch checkout logic to use correct syntax and improve fallback handling * fix: Update git checkout command to use -B flag for branch creation * fix: Improve submodule checkout process to explicitly fetch branch ref before checkout * fix: Enhance submodule checkout process with improved branch validation and error handling * fix: Improve branch checkout logic by enhancing fetch command and validating branch existence * fix: Enhance manual Git checkout process with improved fetch and error handling * fix: Restore Node.js setup, dependency installation, and Netlify deployment steps in workflow * 🔄 chore: update submodules to latest main after auto-merge * Took sync of fix/appbuilder-02 in frontend/ee --------- Co-authored-by: Kartik Gupta <gupta.kartik18kg@gmail.com> Co-authored-by: Adish M <44204658+adishM98@users.noreply.github.com> Co-authored-by: adishM98 Bot <adish.madhu@gmail.com>
64 lines
1.8 KiB
JavaScript
64 lines
1.8 KiB
JavaScript
import React, { Children } from 'react';
|
|
|
|
import { cn } from '@/lib/utils';
|
|
import CheckCircle from '@/_ui/Icon/solidIcons/CheckCircle';
|
|
import SolidArrow from '@/_ui/Icon/solidIcons/SolidArrow';
|
|
import DottedArrow from '@/_ui/Icon/solidIcons/DottedArrow';
|
|
|
|
function Step({ stepNo, label, active, completed }) {
|
|
return (
|
|
<div className="tw-flex tw-items-center tw-gap-1.5 tw-px-2.5 tw-py-1">
|
|
{completed ? (
|
|
<CheckCircle />
|
|
) : (
|
|
<span
|
|
className={cn(
|
|
'tw-bg-text-placeholder tw-text-white tw-text-[0.625rem] tw-rounded-full tw-size-3.5 tw-flex tw-justify-center tw-items-center',
|
|
{ '!tw-bg-black': active }
|
|
)}
|
|
>
|
|
{stepNo}
|
|
</span>
|
|
)}
|
|
|
|
<p
|
|
className={cn('tw-text-base tw-text-text-placeholder tw-font-medium tw-mb-0', {
|
|
'tw-text-text-primary': completed || active,
|
|
})}
|
|
>
|
|
{label}
|
|
</p>
|
|
</div>
|
|
);
|
|
}
|
|
|
|
function Connector({ completed }) {
|
|
if (completed) return <SolidArrow />;
|
|
|
|
return <DottedArrow />;
|
|
}
|
|
|
|
// sequential steps
|
|
export default function Steps({ steps, activeStep }) {
|
|
const activeStepIndex = steps.findIndex((step) => step.value === activeStep);
|
|
const currentStepIdx = activeStepIndex === -1 ? 0 : activeStepIndex;
|
|
|
|
return (
|
|
<div className="tw-flex tw-items-center tw-gap-1 tw-py-2">
|
|
{Children.toArray(
|
|
steps.map((step, index) => {
|
|
const isActive = index === currentStepIdx;
|
|
const isCompleted = index < currentStepIdx;
|
|
|
|
return (
|
|
<>
|
|
<Step stepNo={index + 1} label={step.label} active={isActive} completed={isCompleted} />
|
|
|
|
{index < steps.length - 1 && <Connector completed={isCompleted} />}
|
|
</>
|
|
);
|
|
})
|
|
)}
|
|
</div>
|
|
);
|
|
}
|