General fixes related to shortcuts icons (#2179)
* Fix: center command icon for macOS * Fix: Add visual shortcut to undo and redo * code format --------- Co-authored-by: anovazzi1 <otavio2204@gmail.com>
This commit is contained in:
parent
787297e1f0
commit
30eacad94a
221 changed files with 881 additions and 886 deletions
|
|
@ -29,10 +29,10 @@ export default function App() {
|
||||||
useTrackLastVisitedPath();
|
useTrackLastVisitedPath();
|
||||||
|
|
||||||
const removeFromTempNotificationList = useAlertStore(
|
const removeFromTempNotificationList = useAlertStore(
|
||||||
(state) => state.removeFromTempNotificationList,
|
(state) => state.removeFromTempNotificationList
|
||||||
);
|
);
|
||||||
const tempNotificationList = useAlertStore(
|
const tempNotificationList = useAlertStore(
|
||||||
(state) => state.tempNotificationList,
|
(state) => state.tempNotificationList
|
||||||
);
|
);
|
||||||
const [fetchError, setFetchError] = useState(false);
|
const [fetchError, setFetchError] = useState(false);
|
||||||
const isLoading = useFlowsManagerStore((state) => state.isLoading);
|
const isLoading = useFlowsManagerStore((state) => state.isLoading);
|
||||||
|
|
@ -48,7 +48,7 @@ export default function App() {
|
||||||
const refreshVersion = useDarkStore((state) => state.refreshVersion);
|
const refreshVersion = useDarkStore((state) => state.refreshVersion);
|
||||||
const refreshStars = useDarkStore((state) => state.refreshStars);
|
const refreshStars = useDarkStore((state) => state.refreshStars);
|
||||||
const setGlobalVariables = useGlobalVariablesStore(
|
const setGlobalVariables = useGlobalVariablesStore(
|
||||||
(state) => state.setGlobalVariables,
|
(state) => state.setGlobalVariables
|
||||||
);
|
);
|
||||||
const checkHasStore = useStoreStore((state) => state.checkHasStore);
|
const checkHasStore = useStoreStore((state) => state.checkHasStore);
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
|
||||||
|
|
@ -121,7 +121,7 @@ export default function ParameterComponent({
|
||||||
debouncedHandleUpdateValues,
|
debouncedHandleUpdateValues,
|
||||||
setNode,
|
setNode,
|
||||||
renderTooltips,
|
renderTooltips,
|
||||||
setIsLoading,
|
setIsLoading
|
||||||
);
|
);
|
||||||
|
|
||||||
const { handleNodeClass: handleNodeClassHook } = useHandleNodeClass(
|
const { handleNodeClass: handleNodeClassHook } = useHandleNodeClass(
|
||||||
|
|
@ -130,7 +130,7 @@ export default function ParameterComponent({
|
||||||
takeSnapshot,
|
takeSnapshot,
|
||||||
setNode,
|
setNode,
|
||||||
updateNodeInternals,
|
updateNodeInternals,
|
||||||
renderTooltips,
|
renderTooltips
|
||||||
);
|
);
|
||||||
|
|
||||||
const { handleRefreshButtonPress: handleRefreshButtonPressHook } =
|
const { handleRefreshButtonPress: handleRefreshButtonPressHook } =
|
||||||
|
|
@ -139,7 +139,7 @@ export default function ParameterComponent({
|
||||||
let disabled =
|
let disabled =
|
||||||
edges.some(
|
edges.some(
|
||||||
(edge) =>
|
(edge) =>
|
||||||
edge.targetHandle === scapedJSONStringfy(proxy ? { ...id, proxy } : id),
|
edge.targetHandle === scapedJSONStringfy(proxy ? { ...id, proxy } : id)
|
||||||
) ?? false;
|
) ?? false;
|
||||||
|
|
||||||
const handleRefreshButtonPress = async (name, data) => {
|
const handleRefreshButtonPress = async (name, data) => {
|
||||||
|
|
@ -152,12 +152,12 @@ export default function ParameterComponent({
|
||||||
handleUpdateValues,
|
handleUpdateValues,
|
||||||
setNode,
|
setNode,
|
||||||
renderTooltips,
|
renderTooltips,
|
||||||
setIsLoading,
|
setIsLoading
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleOnNewValue = async (
|
const handleOnNewValue = async (
|
||||||
newValue: string | string[] | boolean | Object[],
|
newValue: string | string[] | boolean | Object[],
|
||||||
skipSnapshot: boolean | undefined = false,
|
skipSnapshot: boolean | undefined = false
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
handleOnNewValueHook(newValue, skipSnapshot);
|
handleOnNewValueHook(newValue, skipSnapshot);
|
||||||
};
|
};
|
||||||
|
|
@ -240,7 +240,7 @@ export default function ParameterComponent({
|
||||||
className={classNames(
|
className={classNames(
|
||||||
left ? "my-12 -ml-0.5" : "my-12 -mr-0.5",
|
left ? "my-12 -ml-0.5" : "my-12 -mr-0.5",
|
||||||
"h-3 w-3 rounded-full border-2 bg-background",
|
"h-3 w-3 rounded-full border-2 bg-background",
|
||||||
!showNode ? "mt-0" : "",
|
!showNode ? "mt-0" : ""
|
||||||
)}
|
)}
|
||||||
style={{
|
style={{
|
||||||
borderColor: color ?? nodeColors.unknown,
|
borderColor: color ?? nodeColors.unknown,
|
||||||
|
|
@ -310,7 +310,7 @@ export default function ParameterComponent({
|
||||||
"h-5 w-5 rounded-md",
|
"h-5 w-5 rounded-md",
|
||||||
displayOutputPreview && !unknownOutput
|
displayOutputPreview && !unknownOutput
|
||||||
? "hover:bg-secondary-foreground/5 hover:text-medium-indigo"
|
? "hover:bg-secondary-foreground/5 hover:text-medium-indigo"
|
||||||
: "cursor-not-allowed text-muted-foreground",
|
: "cursor-not-allowed text-muted-foreground"
|
||||||
)}
|
)}
|
||||||
name={"ScanEye"}
|
name={"ScanEye"}
|
||||||
/>
|
/>
|
||||||
|
|
@ -360,7 +360,7 @@ export default function ParameterComponent({
|
||||||
}
|
}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
left ? "-ml-0.5" : "-mr-0.5",
|
left ? "-ml-0.5" : "-mr-0.5",
|
||||||
"h-3 w-3 rounded-full border-2 bg-background",
|
"h-3 w-3 rounded-full border-2 bg-background"
|
||||||
)}
|
)}
|
||||||
style={{ borderColor: color ?? nodeColors.unknown }}
|
style={{ borderColor: color ?? nodeColors.unknown }}
|
||||||
onClick={() => setFilterEdge(groupedEdge.current)}
|
onClick={() => setFilterEdge(groupedEdge.current)}
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ const TooltipRenderComponent = ({ item, index, left }) => {
|
||||||
<span
|
<span
|
||||||
key={index}
|
key={index}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center",
|
index > 0 ? "mt-2 flex items-center" : "mt-3 flex items-center"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
|
|
|
||||||
|
|
@ -61,10 +61,10 @@ export default function GenericNode({
|
||||||
const setErrorData = useAlertStore((state) => state.setErrorData);
|
const setErrorData = useAlertStore((state) => state.setErrorData);
|
||||||
const isDark = useDarkStore((state) => state.dark);
|
const isDark = useDarkStore((state) => state.dark);
|
||||||
const buildStatus = useFlowStore(
|
const buildStatus = useFlowStore(
|
||||||
(state) => state.flowBuildStatus[data.id]?.status,
|
(state) => state.flowBuildStatus[data.id]?.status
|
||||||
);
|
);
|
||||||
const lastRunTime = useFlowStore(
|
const lastRunTime = useFlowStore(
|
||||||
(state) => state.flowBuildStatus[data.id]?.timestamp,
|
(state) => state.flowBuildStatus[data.id]?.timestamp
|
||||||
);
|
);
|
||||||
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
|
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
|
||||||
|
|
||||||
|
|
@ -72,7 +72,7 @@ export default function GenericNode({
|
||||||
const [nodeName, setNodeName] = useState(data.node!.display_name);
|
const [nodeName, setNodeName] = useState(data.node!.display_name);
|
||||||
const [inputDescription, setInputDescription] = useState(false);
|
const [inputDescription, setInputDescription] = useState(false);
|
||||||
const [nodeDescription, setNodeDescription] = useState(
|
const [nodeDescription, setNodeDescription] = useState(
|
||||||
data.node?.description!,
|
data.node?.description!
|
||||||
);
|
);
|
||||||
const [isOutdated, setIsOutdated] = useState(false);
|
const [isOutdated, setIsOutdated] = useState(false);
|
||||||
const [validationStatus, setValidationStatus] =
|
const [validationStatus, setValidationStatus] =
|
||||||
|
|
@ -90,7 +90,7 @@ export default function GenericNode({
|
||||||
data.node!,
|
data.node!,
|
||||||
setNode,
|
setNode,
|
||||||
setIsOutdated,
|
setIsOutdated,
|
||||||
updateNodeInternals,
|
updateNodeInternals
|
||||||
);
|
);
|
||||||
|
|
||||||
const name = nodeIconsLucide[data.type] ? data.type : types[data.type];
|
const name = nodeIconsLucide[data.type] ? data.type : types[data.type];
|
||||||
|
|
@ -117,12 +117,12 @@ export default function GenericNode({
|
||||||
selected: boolean,
|
selected: boolean,
|
||||||
showNode: boolean,
|
showNode: boolean,
|
||||||
buildStatus: BuildStatus | undefined,
|
buildStatus: BuildStatus | undefined,
|
||||||
validationStatus: VertexBuildTypeAPI | null,
|
validationStatus: VertexBuildTypeAPI | null
|
||||||
) => {
|
) => {
|
||||||
const specificClassFromBuildStatus = getSpecificClassFromBuildStatus(
|
const specificClassFromBuildStatus = getSpecificClassFromBuildStatus(
|
||||||
buildStatus,
|
buildStatus,
|
||||||
validationStatus,
|
validationStatus,
|
||||||
isDark,
|
isDark
|
||||||
);
|
);
|
||||||
|
|
||||||
const baseBorderClass = getBaseBorderClass(selected);
|
const baseBorderClass = getBaseBorderClass(selected);
|
||||||
|
|
@ -131,7 +131,7 @@ export default function GenericNode({
|
||||||
baseBorderClass,
|
baseBorderClass,
|
||||||
nodeSizeClass,
|
nodeSizeClass,
|
||||||
"generic-node-div group/node",
|
"generic-node-div group/node",
|
||||||
specificClassFromBuildStatus,
|
specificClassFromBuildStatus
|
||||||
);
|
);
|
||||||
return names;
|
return names;
|
||||||
};
|
};
|
||||||
|
|
@ -176,7 +176,7 @@ export default function GenericNode({
|
||||||
showNode,
|
showNode,
|
||||||
isEmoji,
|
isEmoji,
|
||||||
nodeIconFragment,
|
nodeIconFragment,
|
||||||
checkNodeIconFragment,
|
checkNodeIconFragment
|
||||||
);
|
);
|
||||||
|
|
||||||
function countHandles(): void {
|
function countHandles(): void {
|
||||||
|
|
@ -309,7 +309,7 @@ export default function GenericNode({
|
||||||
selected,
|
selected,
|
||||||
showNode,
|
showNode,
|
||||||
buildStatus,
|
buildStatus,
|
||||||
validationStatus,
|
validationStatus
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{data.node?.beta && showNode && (
|
{data.node?.beta && showNode && (
|
||||||
|
|
@ -457,7 +457,7 @@ export default function GenericNode({
|
||||||
}
|
}
|
||||||
title={getFieldTitle(
|
title={getFieldTitle(
|
||||||
data.node?.template!,
|
data.node?.template!,
|
||||||
templateField,
|
templateField
|
||||||
)}
|
)}
|
||||||
info={data.node?.template[templateField].info}
|
info={data.node?.template[templateField].info}
|
||||||
name={templateField}
|
name={templateField}
|
||||||
|
|
@ -485,7 +485,7 @@ export default function GenericNode({
|
||||||
proxy={data.node?.template[templateField].proxy}
|
proxy={data.node?.template[templateField].proxy}
|
||||||
showNode={showNode}
|
showNode={showNode}
|
||||||
/>
|
/>
|
||||||
),
|
)
|
||||||
)}
|
)}
|
||||||
<ParameterComponent
|
<ParameterComponent
|
||||||
selected={selected}
|
selected={selected}
|
||||||
|
|
@ -643,7 +643,7 @@ export default function GenericNode({
|
||||||
!data.node?.description) &&
|
!data.node?.description) &&
|
||||||
nameEditable
|
nameEditable
|
||||||
? "font-light italic"
|
? "font-light italic"
|
||||||
: "",
|
: ""
|
||||||
)}
|
)}
|
||||||
onDoubleClick={(e) => {
|
onDoubleClick={(e) => {
|
||||||
setInputDescription(true);
|
setInputDescription(true);
|
||||||
|
|
@ -710,13 +710,13 @@ export default function GenericNode({
|
||||||
}
|
}
|
||||||
title={getFieldTitle(
|
title={getFieldTitle(
|
||||||
data.node?.template!,
|
data.node?.template!,
|
||||||
templateField,
|
templateField
|
||||||
)}
|
)}
|
||||||
info={data.node?.template[templateField].info}
|
info={data.node?.template[templateField].info}
|
||||||
name={templateField}
|
name={templateField}
|
||||||
tooltipTitle={
|
tooltipTitle={
|
||||||
data.node?.template[templateField].input_types?.join(
|
data.node?.template[templateField].input_types?.join(
|
||||||
"\n",
|
"\n"
|
||||||
) ?? data.node?.template[templateField].type
|
) ?? data.node?.template[templateField].type
|
||||||
}
|
}
|
||||||
required={data.node!.template[templateField].required}
|
required={data.node!.template[templateField].required}
|
||||||
|
|
@ -743,7 +743,7 @@ export default function GenericNode({
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
Object.keys(data.node!.template).length < 1 ? "hidden" : "",
|
Object.keys(data.node!.template).length < 1 ? "hidden" : "",
|
||||||
"flex-max-width justify-center",
|
"flex-max-width justify-center"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{" "}
|
{" "}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,7 @@ import { VertexBuildTypeAPI } from "../../types/api";
|
||||||
export const getSpecificClassFromBuildStatus = (
|
export const getSpecificClassFromBuildStatus = (
|
||||||
buildStatus: BuildStatus | undefined,
|
buildStatus: BuildStatus | undefined,
|
||||||
validationStatus: VertexBuildTypeAPI | null,
|
validationStatus: VertexBuildTypeAPI | null,
|
||||||
isDark: boolean,
|
isDark: boolean
|
||||||
) => {
|
) => {
|
||||||
let isInvalid = validationStatus && !validationStatus.valid;
|
let isInvalid = validationStatus && !validationStatus.valid;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ const useCheckCodeValidity = (
|
||||||
data: NodeDataType,
|
data: NodeDataType,
|
||||||
templates: { [key: string]: any },
|
templates: { [key: string]: any },
|
||||||
setIsOutdated: (value: boolean) => void,
|
setIsOutdated: (value: boolean) => void,
|
||||||
types,
|
types
|
||||||
) => {
|
) => {
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// This one should run only once
|
// This one should run only once
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const useFetchDataOnMount = (
|
||||||
handleUpdateValues,
|
handleUpdateValues,
|
||||||
setNode,
|
setNode,
|
||||||
renderTooltips,
|
renderTooltips,
|
||||||
setIsLoading,
|
setIsLoading
|
||||||
) => {
|
) => {
|
||||||
const setErrorData = useAlertStore((state) => state.setErrorData);
|
const setErrorData = useAlertStore((state) => state.setErrorData);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ const useHandleOnNewValue = (
|
||||||
debouncedHandleUpdateValues,
|
debouncedHandleUpdateValues,
|
||||||
setNode,
|
setNode,
|
||||||
renderTooltips,
|
renderTooltips,
|
||||||
setIsLoading,
|
setIsLoading
|
||||||
) => {
|
) => {
|
||||||
const setErrorData = useAlertStore((state) => state.setErrorData);
|
const setErrorData = useAlertStore((state) => state.setErrorData);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ const useHandleNodeClass = (
|
||||||
takeSnapshot,
|
takeSnapshot,
|
||||||
setNode,
|
setNode,
|
||||||
updateNodeInternals,
|
updateNodeInternals,
|
||||||
renderTooltips,
|
renderTooltips
|
||||||
) => {
|
) => {
|
||||||
const handleNodeClass = (newNodeClass, code) => {
|
const handleNodeClass = (newNodeClass, code) => {
|
||||||
if (!data.node) return;
|
if (!data.node) return;
|
||||||
|
|
|
||||||
|
|
@ -12,8 +12,8 @@ const useIconNodeRender = (
|
||||||
checkNodeIconFragment: (
|
checkNodeIconFragment: (
|
||||||
iconColor: string,
|
iconColor: string,
|
||||||
iconName: string,
|
iconName: string,
|
||||||
iconClassName: string,
|
iconClassName: string
|
||||||
) => JSX.Element,
|
) => JSX.Element
|
||||||
) => {
|
) => {
|
||||||
const iconNodeRender = useCallback(() => {
|
const iconNodeRender = useCallback(() => {
|
||||||
const iconElement = data?.node?.icon;
|
const iconElement = data?.node?.icon;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import { VertexBuildTypeAPI } from "../../types/api";
|
||||||
|
|
||||||
const useIconStatus = (
|
const useIconStatus = (
|
||||||
buildStatus: BuildStatus | undefined,
|
buildStatus: BuildStatus | undefined,
|
||||||
validationStatus: VertexBuildTypeAPI | null,
|
validationStatus: VertexBuildTypeAPI | null
|
||||||
) => {
|
) => {
|
||||||
const conditionSuccess = validationStatus && validationStatus.valid;
|
const conditionSuccess = validationStatus && validationStatus.valid;
|
||||||
const conditionError =
|
const conditionError =
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ const useUpdateNodeCode = (
|
||||||
dataNode: APIClassType, // Define YourNodeType according to your data structure
|
dataNode: APIClassType, // Define YourNodeType according to your data structure
|
||||||
setNode: (id: string, callback: (oldNode) => any) => void,
|
setNode: (id: string, callback: (oldNode) => any) => void,
|
||||||
setIsOutdated: (value: boolean) => void,
|
setIsOutdated: (value: boolean) => void,
|
||||||
updateNodeInternals: (id: string) => void,
|
updateNodeInternals: (id: string) => void
|
||||||
) => {
|
) => {
|
||||||
const updateNodeCode = useCallback(
|
const updateNodeCode = useCallback(
|
||||||
(newNodeClass: APIClassType, code: string, name: string) => {
|
(newNodeClass: APIClassType, code: string, name: string) => {
|
||||||
|
|
@ -30,7 +30,7 @@ const useUpdateNodeCode = (
|
||||||
|
|
||||||
updateNodeInternals(dataId);
|
updateNodeInternals(dataId);
|
||||||
},
|
},
|
||||||
[dataId, dataNode, setNode, setIsOutdated, updateNodeInternals],
|
[dataId, dataNode, setNode, setIsOutdated, updateNodeInternals]
|
||||||
);
|
);
|
||||||
|
|
||||||
return updateNodeCode;
|
return updateNodeCode;
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@ import { APITemplateType } from "../../types/api";
|
||||||
|
|
||||||
export default function getFieldTitle(
|
export default function getFieldTitle(
|
||||||
template: APITemplateType,
|
template: APITemplateType,
|
||||||
templateField: string,
|
templateField: string
|
||||||
): string {
|
): string {
|
||||||
return template[templateField].display_name
|
return template[templateField].display_name
|
||||||
? template[templateField].display_name!
|
? template[templateField].display_name!
|
||||||
|
|
|
||||||
|
|
@ -16,13 +16,13 @@ export default function AlertDropdown({
|
||||||
}: AlertDropdownType): JSX.Element {
|
}: AlertDropdownType): JSX.Element {
|
||||||
const notificationList = useAlertStore((state) => state.notificationList);
|
const notificationList = useAlertStore((state) => state.notificationList);
|
||||||
const clearNotificationList = useAlertStore(
|
const clearNotificationList = useAlertStore(
|
||||||
(state) => state.clearNotificationList,
|
(state) => state.clearNotificationList
|
||||||
);
|
);
|
||||||
const removeFromNotificationList = useAlertStore(
|
const removeFromNotificationList = useAlertStore(
|
||||||
(state) => state.removeFromNotificationList,
|
(state) => state.removeFromNotificationList
|
||||||
);
|
);
|
||||||
const setNotificationCenter = useAlertStore(
|
const setNotificationCenter = useAlertStore(
|
||||||
(state) => state.setNotificationCenter,
|
(state) => state.setNotificationCenter
|
||||||
);
|
);
|
||||||
|
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
|
||||||
|
|
@ -31,14 +31,14 @@ export default function ImageViewer({ image }) {
|
||||||
const fullPageButton = document.getElementById("full-page-button");
|
const fullPageButton = document.getElementById("full-page-button");
|
||||||
|
|
||||||
zoomInButton!.addEventListener("click", () =>
|
zoomInButton!.addEventListener("click", () =>
|
||||||
viewer.viewport.zoomBy(1.2),
|
viewer.viewport.zoomBy(1.2)
|
||||||
);
|
);
|
||||||
zoomOutButton!.addEventListener("click", () =>
|
zoomOutButton!.addEventListener("click", () =>
|
||||||
viewer.viewport.zoomBy(0.8),
|
viewer.viewport.zoomBy(0.8)
|
||||||
);
|
);
|
||||||
homeButton!.addEventListener("click", () => viewer.viewport.goHome());
|
homeButton!.addEventListener("click", () => viewer.viewport.goHome());
|
||||||
fullPageButton!.addEventListener("click", () =>
|
fullPageButton!.addEventListener("click", () =>
|
||||||
viewer.setFullScreen(true),
|
viewer.setFullScreen(true)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Optionally, you can set additional viewer options here
|
// Optionally, you can set additional viewer options here
|
||||||
|
|
@ -47,16 +47,16 @@ export default function ImageViewer({ image }) {
|
||||||
return () => {
|
return () => {
|
||||||
viewer.destroy();
|
viewer.destroy();
|
||||||
zoomInButton!.removeEventListener("click", () =>
|
zoomInButton!.removeEventListener("click", () =>
|
||||||
viewer.viewport.zoomBy(1.2),
|
viewer.viewport.zoomBy(1.2)
|
||||||
);
|
);
|
||||||
zoomOutButton!.removeEventListener("click", () =>
|
zoomOutButton!.removeEventListener("click", () =>
|
||||||
viewer.viewport.zoomBy(0.8),
|
viewer.viewport.zoomBy(0.8)
|
||||||
);
|
);
|
||||||
homeButton!.removeEventListener("click", () =>
|
homeButton!.removeEventListener("click", () =>
|
||||||
viewer.viewport.goHome(),
|
viewer.viewport.goHome()
|
||||||
);
|
);
|
||||||
fullPageButton!.removeEventListener("click", () =>
|
fullPageButton!.removeEventListener("click", () =>
|
||||||
viewer.setFullScreen(true),
|
viewer.setFullScreen(true)
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ export default function FolderAccordionComponent({
|
||||||
options,
|
options,
|
||||||
}: AccordionComponentType): JSX.Element {
|
}: AccordionComponentType): JSX.Element {
|
||||||
const [value, setValue] = useState(
|
const [value, setValue] = useState(
|
||||||
open.length === 0 ? "" : getOpenAccordion(),
|
open.length === 0 ? "" : getOpenAccordion()
|
||||||
);
|
);
|
||||||
|
|
||||||
function getOpenAccordion(): string {
|
function getOpenAccordion(): string {
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ export default function AccordionComponent({
|
||||||
sideBar,
|
sideBar,
|
||||||
}: AccordionComponentType): JSX.Element {
|
}: AccordionComponentType): JSX.Element {
|
||||||
const [value, setValue] = useState(
|
const [value, setValue] = useState(
|
||||||
open.length === 0 ? "" : getOpenAccordion(),
|
open.length === 0 ? "" : getOpenAccordion()
|
||||||
);
|
);
|
||||||
|
|
||||||
function getOpenAccordion(): string {
|
function getOpenAccordion(): string {
|
||||||
|
|
@ -52,7 +52,7 @@ export default function AccordionComponent({
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
className={cn(
|
className={cn(
|
||||||
sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3",
|
sideBar ? "w-full bg-muted px-[0.75rem] py-[0.5rem]" : "ml-3",
|
||||||
disabled ? "cursor-not-allowed" : "cursor-pointer",
|
disabled ? "cursor-not-allowed" : "cursor-pointer"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{trigger}
|
{trigger}
|
||||||
|
|
|
||||||
|
|
@ -29,19 +29,19 @@ export default function AddNewVariableButton({
|
||||||
const setErrorData = useAlertStore((state) => state.setErrorData);
|
const setErrorData = useAlertStore((state) => state.setErrorData);
|
||||||
const componentFields = useTypesStore((state) => state.ComponentFields);
|
const componentFields = useTypesStore((state) => state.ComponentFields);
|
||||||
const unavaliableFields = new Set(
|
const unavaliableFields = new Set(
|
||||||
Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields)),
|
Object.keys(useGlobalVariablesStore((state) => state.unavaliableFields))
|
||||||
);
|
);
|
||||||
|
|
||||||
const availableFields = () => {
|
const availableFields = () => {
|
||||||
const fields = Array.from(componentFields).filter(
|
const fields = Array.from(componentFields).filter(
|
||||||
(field) => !unavaliableFields.has(field),
|
(field) => !unavaliableFields.has(field)
|
||||||
);
|
);
|
||||||
|
|
||||||
return sortByName(fields);
|
return sortByName(fields);
|
||||||
};
|
};
|
||||||
|
|
||||||
const addGlobalVariable = useGlobalVariablesStore(
|
const addGlobalVariable = useGlobalVariablesStore(
|
||||||
(state) => state.addGlobalVariable,
|
(state) => state.addGlobalVariable
|
||||||
);
|
);
|
||||||
|
|
||||||
function handleSaveVariable() {
|
function handleSaveVariable() {
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) {
|
||||||
draggable
|
draggable
|
||||||
//TODO check color schema
|
//TODO check color schema
|
||||||
className={cn(
|
className={cn(
|
||||||
"group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]",
|
"group relative flex flex-col justify-between overflow-hidden transition-all hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#ffffff10]"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
|
|
@ -22,7 +22,7 @@ export default function DragCardComponent({ data }: { data: storeComponent }) {
|
||||||
"visible flex-shrink-0",
|
"visible flex-shrink-0",
|
||||||
data.is_component
|
data.is_component
|
||||||
? "mx-0.5 h-6 w-6 text-component-icon"
|
? "mx-0.5 h-6 w-6 text-component-icon"
|
||||||
: "h-7 w-7 flex-shrink-0 text-flow-icon",
|
: "h-7 w-7 flex-shrink-0 text-flow-icon"
|
||||||
)}
|
)}
|
||||||
name={data.is_component ? "ToyBrick" : "Group"}
|
name={data.is_component ? "ToyBrick" : "Group"}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -60,11 +60,11 @@ export default function CollectionCardComponent({
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [loadingLike, setLoadingLike] = useState(false);
|
const [loadingLike, setLoadingLike] = useState(false);
|
||||||
const [liked_by_user, setLiked_by_user] = useState(
|
const [liked_by_user, setLiked_by_user] = useState(
|
||||||
data?.liked_by_user ?? false,
|
data?.liked_by_user ?? false
|
||||||
);
|
);
|
||||||
const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0);
|
const [likes_count, setLikes_count] = useState(data?.liked_by_count ?? 0);
|
||||||
const [downloads_count, setDownloads_count] = useState(
|
const [downloads_count, setDownloads_count] = useState(
|
||||||
data?.downloads_count ?? 0,
|
data?.downloads_count ?? 0
|
||||||
);
|
);
|
||||||
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
const currentFlow = useFlowsManagerStore((state) => state.currentFlow);
|
||||||
const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow);
|
const setCurrentFlow = useFlowsManagerStore((state) => state.setCurrentFlow);
|
||||||
|
|
@ -75,12 +75,12 @@ export default function CollectionCardComponent({
|
||||||
const [openPlayground, setOpenPlayground] = useState(false);
|
const [openPlayground, setOpenPlayground] = useState(false);
|
||||||
const [openDelete, setOpenDelete] = useState(false);
|
const [openDelete, setOpenDelete] = useState(false);
|
||||||
const setCurrentFlowId = useFlowsManagerStore(
|
const setCurrentFlowId = useFlowsManagerStore(
|
||||||
(state) => state.setCurrentFlowId,
|
(state) => state.setCurrentFlowId
|
||||||
);
|
);
|
||||||
const [loadingPlayground, setLoadingPlayground] = useState(false);
|
const [loadingPlayground, setLoadingPlayground] = useState(false);
|
||||||
|
|
||||||
const selectedFlowsComponentsCards = useFlowsManagerStore(
|
const selectedFlowsComponentsCards = useFlowsManagerStore(
|
||||||
(state) => state.selectedFlowsComponentsCards,
|
(state) => state.selectedFlowsComponentsCards
|
||||||
);
|
);
|
||||||
|
|
||||||
const name = data.is_component ? "Component" : "Flow";
|
const name = data.is_component ? "Component" : "Flow";
|
||||||
|
|
@ -220,7 +220,7 @@ export default function CollectionCardComponent({
|
||||||
"group relative flex h-[11rem] flex-col justify-between overflow-hidden hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#5f5f5f0e]",
|
"group relative flex h-[11rem] flex-col justify-between overflow-hidden hover:bg-muted/50 hover:shadow-md hover:dark:bg-[#5f5f5f0e]",
|
||||||
disabled ? "pointer-events-none opacity-50" : "",
|
disabled ? "pointer-events-none opacity-50" : "",
|
||||||
onClick ? "cursor-pointer" : "",
|
onClick ? "cursor-pointer" : "",
|
||||||
isSelectedCard ? "border border-selected" : "",
|
isSelectedCard ? "border border-selected" : ""
|
||||||
)}
|
)}
|
||||||
onClick={onClick}
|
onClick={onClick}
|
||||||
>
|
>
|
||||||
|
|
@ -233,7 +233,7 @@ export default function CollectionCardComponent({
|
||||||
"visible flex-shrink-0",
|
"visible flex-shrink-0",
|
||||||
data.is_component
|
data.is_component
|
||||||
? "mx-0.5 h-6 w-6 text-component-icon"
|
? "mx-0.5 h-6 w-6 text-component-icon"
|
||||||
: "h-7 w-7 flex-shrink-0 text-flow-icon",
|
: "h-7 w-7 flex-shrink-0 text-flow-icon"
|
||||||
)}
|
)}
|
||||||
name={data.is_component ? "ToyBrick" : "Group"}
|
name={data.is_component ? "ToyBrick" : "Group"}
|
||||||
/>
|
/>
|
||||||
|
|
@ -425,7 +425,7 @@ export default function CollectionCardComponent({
|
||||||
name="Trash2"
|
name="Trash2"
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-5 w-5",
|
"h-5 w-5",
|
||||||
!authorized ? "text-ring" : "",
|
!authorized ? "text-ring" : ""
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -460,7 +460,7 @@ export default function CollectionCardComponent({
|
||||||
liked_by_user
|
liked_by_user
|
||||||
? "fill-destructive stroke-destructive"
|
? "fill-destructive stroke-destructive"
|
||||||
: "",
|
: "",
|
||||||
!authorized ? "text-ring" : "",
|
!authorized ? "text-ring" : ""
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -498,7 +498,7 @@ export default function CollectionCardComponent({
|
||||||
}
|
}
|
||||||
className={cn(
|
className={cn(
|
||||||
loading ? "h-5 w-5 animate-spin" : "h-5 w-5",
|
loading ? "h-5 w-5 animate-spin" : "h-5 w-5",
|
||||||
!authorized ? "text-ring" : "",
|
!authorized ? "text-ring" : ""
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export default function CardsWrapComponent({
|
||||||
"h-full w-full",
|
"h-full w-full",
|
||||||
isDragging
|
isDragging
|
||||||
? "mb-36 flex flex-col items-center justify-center gap-4 text-2xl font-light"
|
? "mb-36 flex flex-col items-center justify-center gap-4 text-2xl font-light"
|
||||||
: "",
|
: ""
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{isDragging ? (
|
{isDragging ? (
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export default function FlowToolbar(): JSX.Element {
|
||||||
"relative inline-flex h-full w-full items-center justify-center gap-[4px] bg-muted px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-background hover:bg-hover",
|
"relative inline-flex h-full w-full items-center justify-center gap-[4px] bg-muted px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-background hover:bg-hover",
|
||||||
!hasApiKey || !validApiKey || !hasStore
|
!hasApiKey || !validApiKey || !hasStore
|
||||||
? "button-disable text-muted-foreground"
|
? "button-disable text-muted-foreground"
|
||||||
: "",
|
: ""
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ForwardedIconComponent
|
<ForwardedIconComponent
|
||||||
|
|
@ -74,7 +74,7 @@ export default function FlowToolbar(): JSX.Element {
|
||||||
"-m-0.5 -ml-1 h-6 w-6",
|
"-m-0.5 -ml-1 h-6 w-6",
|
||||||
!hasApiKey || !validApiKey || !hasStore
|
!hasApiKey || !validApiKey || !hasStore
|
||||||
? "extra-side-bar-save-disable"
|
? "extra-side-bar-save-disable"
|
||||||
: "",
|
: ""
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
Share
|
Share
|
||||||
|
|
@ -88,7 +88,7 @@ export default function FlowToolbar(): JSX.Element {
|
||||||
hasStore,
|
hasStore,
|
||||||
openShareModal,
|
openShareModal,
|
||||||
setOpenShareModal,
|
setOpenShareModal,
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
@ -144,7 +144,7 @@ export default function FlowToolbar(): JSX.Element {
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"relative inline-flex w-full items-center justify-center gap-1 px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-hover",
|
"relative inline-flex w-full items-center justify-center gap-1 px-5 py-3 text-sm font-semibold text-foreground transition-all duration-150 ease-in-out hover:bg-hover"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ForwardedIconComponent
|
<ForwardedIconComponent
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export default function CodeAreaComponent({
|
||||||
setOpen,
|
setOpen,
|
||||||
}: CodeAreaComponentType) {
|
}: CodeAreaComponentType) {
|
||||||
const [myValue, setMyValue] = useState(
|
const [myValue, setMyValue] = useState(
|
||||||
typeof value == "string" ? value : JSON.stringify(value),
|
typeof value == "string" ? value : JSON.stringify(value)
|
||||||
);
|
);
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (disabled && myValue !== "") {
|
if (disabled && myValue !== "") {
|
||||||
|
|
|
||||||
|
|
@ -138,7 +138,7 @@ export default function CodeTabsComponent({
|
||||||
<Label
|
<Label
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative right-1 top-[4px] text-xs font-medium text-muted-foreground",
|
"relative right-1 top-[4px] text-xs font-medium text-muted-foreground",
|
||||||
activeTweaks ? "text-primary" : "",
|
activeTweaks ? "text-primary" : ""
|
||||||
)}
|
)}
|
||||||
htmlFor="tweaks-switch"
|
htmlFor="tweaks-switch"
|
||||||
>
|
>
|
||||||
|
|
@ -193,7 +193,7 @@ export default function CodeTabsComponent({
|
||||||
<div className="api-modal-according-display">
|
<div className="api-modal-according-display">
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"h-[70vh] w-full overflow-y-auto overflow-x-hidden rounded-lg bg-muted custom-scroll",
|
"h-[70vh] w-full overflow-y-auto overflow-x-hidden rounded-lg bg-muted custom-scroll"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{data?.map((node: any, i) => (
|
{data?.map((node: any, i) => (
|
||||||
|
|
@ -232,8 +232,8 @@ export default function CodeTabsComponent({
|
||||||
.show &&
|
.show &&
|
||||||
LANGFLOW_SUPPORTED_TYPES.has(
|
LANGFLOW_SUPPORTED_TYPES.has(
|
||||||
node.data.node.template[templateField]
|
node.data.node.template[templateField]
|
||||||
.type,
|
.type
|
||||||
),
|
)
|
||||||
)
|
)
|
||||||
.map((templateField, indx) => {
|
.map((templateField, indx) => {
|
||||||
return (
|
return (
|
||||||
|
|
@ -291,7 +291,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -337,7 +337,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -390,7 +390,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -427,7 +427,7 @@ export default function CodeTabsComponent({
|
||||||
e,
|
e,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
size="small"
|
size="small"
|
||||||
|
|
@ -458,7 +458,7 @@ export default function CodeTabsComponent({
|
||||||
].fileTypes
|
].fileTypes
|
||||||
}
|
}
|
||||||
onFileChange={(
|
onFileChange={(
|
||||||
value: any,
|
value: any
|
||||||
) => {
|
) => {
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
|
|
@ -511,7 +511,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -551,7 +551,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
value={
|
value={
|
||||||
|
|
@ -613,7 +613,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -659,7 +659,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -705,7 +705,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
@ -737,8 +737,8 @@ export default function CodeTabsComponent({
|
||||||
].value,
|
].value,
|
||||||
type(
|
type(
|
||||||
node,
|
node,
|
||||||
templateField,
|
templateField
|
||||||
),
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
duplicateKey={
|
duplicateKey={
|
||||||
|
|
@ -747,15 +747,15 @@ export default function CodeTabsComponent({
|
||||||
onChange={(target) => {
|
onChange={(target) => {
|
||||||
const valueToNumbers =
|
const valueToNumbers =
|
||||||
convertValuesToNumbers(
|
convertValuesToNumbers(
|
||||||
target,
|
target
|
||||||
);
|
);
|
||||||
node.data.node!.template[
|
node.data.node!.template[
|
||||||
templateField
|
templateField
|
||||||
].value = valueToNumbers;
|
].value = valueToNumbers;
|
||||||
setErrorDuplicateKey(
|
setErrorDuplicateKey(
|
||||||
hasDuplicateKeys(
|
hasDuplicateKeys(
|
||||||
valueToNumbers,
|
valueToNumbers
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
setData((old) => {
|
setData((old) => {
|
||||||
let newInputList =
|
let newInputList =
|
||||||
|
|
@ -772,7 +772,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
isList={
|
isList={
|
||||||
|
|
@ -820,7 +820,7 @@ export default function CodeTabsComponent({
|
||||||
target,
|
target,
|
||||||
node.data.node.template[
|
node.data.node.template[
|
||||||
templateField
|
templateField
|
||||||
],
|
]
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ function CsvOutputComponent({
|
||||||
if (file) {
|
if (file) {
|
||||||
const { rowData: data, colDefs: columns } = convertCSVToData(
|
const { rowData: data, colDefs: columns } = convertCSVToData(
|
||||||
file,
|
file,
|
||||||
separator,
|
separator
|
||||||
);
|
);
|
||||||
setRowData(data);
|
setRowData(data);
|
||||||
setColDefs(columns);
|
setColDefs(columns);
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ export default function DictComponent({
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
value.length > 1 && editNode ? "my-1" : "",
|
value.length > 1 && editNode ? "my-1" : "",
|
||||||
"flex w-full flex-col gap-3",
|
"flex w-full flex-col gap-3"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ export default function Dropdown({
|
||||||
? "dropdown-component-outline"
|
? "dropdown-component-outline"
|
||||||
: "dropdown-component-false-outline",
|
: "dropdown-component-false-outline",
|
||||||
"w-full justify-between font-normal",
|
"w-full justify-between font-normal",
|
||||||
editNode ? "input-edit-node" : "py-2",
|
editNode ? "input-edit-node" : "py-2"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<span data-testid={`value-dropdown-` + id}>
|
<span data-testid={`value-dropdown-` + id}>
|
||||||
|
|
@ -106,7 +106,7 @@ export default function Dropdown({
|
||||||
name="Check"
|
name="Check"
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto h-4 w-4 text-primary",
|
"ml-auto h-4 w-4 text-primary",
|
||||||
value === option ? "opacity-100" : "opacity-0",
|
value === option ? "opacity-100" : "opacity-0"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</CommandItem>
|
</CommandItem>
|
||||||
|
|
|
||||||
|
|
@ -99,7 +99,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"font-normal text-muted-foreground word-break-break-word",
|
"font-normal text-muted-foreground word-break-break-word",
|
||||||
description === "" ? "font-light italic" : "",
|
description === "" ? "font-light italic" : ""
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{description === "" ? "No description" : description}
|
{description === "" ? "No description" : description}
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ export default function CollectionCardComponent({
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
className={cn(
|
className={cn(
|
||||||
"group relative flex h-48 w-2/6 flex-col justify-between overflow-hidden transition-all hover:shadow-md",
|
"group relative flex h-48 w-2/6 flex-col justify-between overflow-hidden transition-all hover:shadow-md"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div>
|
<div>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ export const ForwardedIconComponent = memo(
|
||||||
strokeWidth,
|
strokeWidth,
|
||||||
id = "",
|
id = "",
|
||||||
}: IconComponentProps,
|
}: IconComponentProps,
|
||||||
ref,
|
ref
|
||||||
) => {
|
) => {
|
||||||
const [showFallback, setShowFallback] = useState(false);
|
const [showFallback, setShowFallback] = useState(false);
|
||||||
|
|
||||||
|
|
@ -65,8 +65,8 @@ export const ForwardedIconComponent = memo(
|
||||||
/>
|
/>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
export default ForwardedIconComponent;
|
export default ForwardedIconComponent;
|
||||||
|
|
|
||||||
|
|
@ -9,10 +9,11 @@ import {
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
import { UPLOAD_ERROR_ALERT } from "../../../../constants/alerts_constants";
|
import { UPLOAD_ERROR_ALERT } from "../../../../constants/alerts_constants";
|
||||||
import { IS_MAC, SAVED_HOVER } from "../../../../constants/constants";
|
import { SAVED_HOVER } from "../../../../constants/constants";
|
||||||
import ExportModal from "../../../../modals/exportModal";
|
import ExportModal from "../../../../modals/exportModal";
|
||||||
import FlowLogsModal from "../../../../modals/flowLogsModal";
|
import FlowLogsModal from "../../../../modals/flowLogsModal";
|
||||||
import FlowSettingsModal from "../../../../modals/flowSettingsModal";
|
import FlowSettingsModal from "../../../../modals/flowSettingsModal";
|
||||||
|
import ToolbarSelectItem from "../../../../pages/FlowPage/components/nodeToolbarComponent/toolbarSelectItem";
|
||||||
import useAlertStore from "../../../../stores/alertStore";
|
import useAlertStore from "../../../../stores/alertStore";
|
||||||
import useFlowStore from "../../../../stores/flowStore";
|
import useFlowStore from "../../../../stores/flowStore";
|
||||||
import useFlowsManagerStore from "../../../../stores/flowsManagerStore";
|
import useFlowsManagerStore from "../../../../stores/flowsManagerStore";
|
||||||
|
|
@ -112,7 +113,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
|
||||||
title: UPLOAD_ERROR_ALERT,
|
title: UPLOAD_ERROR_ALERT,
|
||||||
list: [error],
|
list: [error],
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
|
|
@ -134,21 +135,15 @@ export const MenuBar = ({}: {}): JSX.Element => {
|
||||||
}}
|
}}
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
>
|
>
|
||||||
<IconComponent name="Undo" className="header-menu-options" />
|
<ToolbarSelectItem
|
||||||
Undo
|
value="Undo"
|
||||||
{IS_MAC ? (
|
icon="Undo"
|
||||||
<IconComponent
|
dataTestId=""
|
||||||
name="Command"
|
shortcut={
|
||||||
className="absolute right-[1.15rem] top-[0.65em] h-3.5 w-3.5 stroke-2"
|
shortcuts.find((s) => s.name.toLowerCase() === "undo")
|
||||||
/>
|
?.shortcut!
|
||||||
) : (
|
}
|
||||||
<span className="absolute right-[1.15rem] top-[0.40em] stroke-2">
|
/>
|
||||||
{
|
|
||||||
shortcuts.find((s) => s.name.toLowerCase() === "undo")
|
|
||||||
?.shortcut
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
<DropdownMenuItem
|
<DropdownMenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|
@ -156,21 +151,15 @@ export const MenuBar = ({}: {}): JSX.Element => {
|
||||||
}}
|
}}
|
||||||
className="cursor-pointer"
|
className="cursor-pointer"
|
||||||
>
|
>
|
||||||
<IconComponent name="Redo" className="header-menu-options" />
|
<ToolbarSelectItem
|
||||||
Redo
|
value="Redo"
|
||||||
{IS_MAC ? (
|
icon="Redo"
|
||||||
<IconComponent
|
dataTestId=""
|
||||||
name="Command"
|
shortcut={
|
||||||
className="absolute right-[1.15rem] top-[0.65em] h-3.5 w-3.5 stroke-2"
|
shortcuts.find((s) => s.name.toLowerCase() === "redo")
|
||||||
/>
|
?.shortcut!
|
||||||
) : (
|
}
|
||||||
<span className="absolute right-[1.15rem] top-[0.40em] stroke-2">
|
/>
|
||||||
{
|
|
||||||
shortcuts.find((s) => s.name.toLowerCase() === "redo")
|
|
||||||
?.shortcut
|
|
||||||
}
|
|
||||||
</span>
|
|
||||||
)}
|
|
||||||
</DropdownMenuItem>
|
</DropdownMenuItem>
|
||||||
</DropdownMenuContent>
|
</DropdownMenuContent>
|
||||||
</DropdownMenu>
|
</DropdownMenu>
|
||||||
|
|
@ -198,7 +187,7 @@ export const MenuBar = ({}: {}): JSX.Element => {
|
||||||
name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"}
|
name={isBuilding || saveLoading ? "Loader2" : "CheckCircle2"}
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-4 w-4",
|
"h-4 w-4",
|
||||||
isBuilding || saveLoading ? "animate-spin" : "animate-wiggle",
|
isBuilding || saveLoading ? "animate-spin" : "animate-wiggle"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{printByBuildStatus()}
|
{printByBuildStatus()}
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ export default function Header(): JSX.Element {
|
||||||
const lastFlowVisitedIndex = routeHistory
|
const lastFlowVisitedIndex = routeHistory
|
||||||
.reverse()
|
.reverse()
|
||||||
.findIndex(
|
.findIndex(
|
||||||
(path) => path.includes("/flow/") && path !== location.pathname,
|
(path) => path.includes("/flow/") && path !== location.pathname
|
||||||
);
|
);
|
||||||
|
|
||||||
const lastFlowVisited = routeHistory[lastFlowVisitedIndex];
|
const lastFlowVisited = routeHistory[lastFlowVisitedIndex];
|
||||||
|
|
@ -201,7 +201,7 @@ export default function Header(): JSX.Element {
|
||||||
src={
|
src={
|
||||||
`${BACKEND_URL.slice(
|
`${BACKEND_URL.slice(
|
||||||
0,
|
0,
|
||||||
BACKEND_URL.length - 1,
|
BACKEND_URL.length - 1
|
||||||
)}${BASE_URL_API}files/profile_pictures/${
|
)}${BASE_URL_API}files/profile_pictures/${
|
||||||
userData?.profile_image ?? "Space/046-rocket.svg"
|
userData?.profile_image ?? "Space/046-rocket.svg"
|
||||||
}` ?? profileCircle
|
}` ?? profileCircle
|
||||||
|
|
@ -219,7 +219,7 @@ export default function Header(): JSX.Element {
|
||||||
src={
|
src={
|
||||||
`${BACKEND_URL.slice(
|
`${BACKEND_URL.slice(
|
||||||
0,
|
0,
|
||||||
BACKEND_URL.length - 1,
|
BACKEND_URL.length - 1
|
||||||
)}${BASE_URL_API}files/profile_pictures/${
|
)}${BASE_URL_API}files/profile_pictures/${
|
||||||
userData?.profile_image ?? "Space/046-rocket.svg"
|
userData?.profile_image ?? "Space/046-rocket.svg"
|
||||||
}` ?? profileCircle
|
}` ?? profileCircle
|
||||||
|
|
|
||||||
|
|
@ -32,11 +32,11 @@ export default function HorizontalScrollFadeComponent({
|
||||||
|
|
||||||
fadeContainerRef.current.classList.toggle(
|
fadeContainerRef.current.classList.toggle(
|
||||||
"fade-left",
|
"fade-left",
|
||||||
isScrollable && !atStart,
|
isScrollable && !atStart
|
||||||
);
|
);
|
||||||
fadeContainerRef.current.classList.toggle(
|
fadeContainerRef.current.classList.toggle(
|
||||||
"fade-right",
|
"fade-right",
|
||||||
isScrollable && !atEnd,
|
isScrollable && !atEnd
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -75,9 +75,9 @@ const CustomInputPopover = ({
|
||||||
(selectedOption !== "" || !onChange) && setSelectedOption
|
(selectedOption !== "" || !onChange) && setSelectedOption
|
||||||
? selectedOption
|
? selectedOption
|
||||||
: (selectedOptions?.length !== 0 || !onChange) &&
|
: (selectedOptions?.length !== 0 || !onChange) &&
|
||||||
setSelectedOptions
|
setSelectedOptions
|
||||||
? selectedOptions?.join(", ")
|
? selectedOptions?.join(", ")
|
||||||
: value
|
: value
|
||||||
}
|
}
|
||||||
autoFocus={autoFocus}
|
autoFocus={autoFocus}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|
@ -103,7 +103,7 @@ const CustomInputPopover = ({
|
||||||
(password && !(setSelectedOption || setSelectedOptions))
|
(password && !(setSelectedOption || setSelectedOptions))
|
||||||
? "pr-8"
|
? "pr-8"
|
||||||
: "",
|
: "",
|
||||||
className!,
|
className!
|
||||||
)}
|
)}
|
||||||
placeholder={password && editNode ? "Key" : placeholder}
|
placeholder={password && editNode ? "Key" : placeholder}
|
||||||
onChange={handleInputChange}
|
onChange={handleInputChange}
|
||||||
|
|
@ -141,15 +141,15 @@ const CustomInputPopover = ({
|
||||||
onSelect={(currentValue) => {
|
onSelect={(currentValue) => {
|
||||||
setSelectedOption &&
|
setSelectedOption &&
|
||||||
setSelectedOption(
|
setSelectedOption(
|
||||||
currentValue === selectedOption ? "" : currentValue,
|
currentValue === selectedOption ? "" : currentValue
|
||||||
);
|
);
|
||||||
setSelectedOptions &&
|
setSelectedOptions &&
|
||||||
setSelectedOptions(
|
setSelectedOptions(
|
||||||
selectedOptions?.includes(currentValue)
|
selectedOptions?.includes(currentValue)
|
||||||
? selectedOptions.filter(
|
? selectedOptions.filter(
|
||||||
(item) => item !== currentValue,
|
(item) => item !== currentValue
|
||||||
)
|
)
|
||||||
: [...selectedOptions, currentValue],
|
: [...selectedOptions, currentValue]
|
||||||
);
|
);
|
||||||
!setSelectedOptions && setShowOptions(false);
|
!setSelectedOptions && setShowOptions(false);
|
||||||
}}
|
}}
|
||||||
|
|
@ -162,7 +162,7 @@ const CustomInputPopover = ({
|
||||||
selectedOption === option ||
|
selectedOption === option ||
|
||||||
selectedOptions?.includes(option)
|
selectedOptions?.includes(option)
|
||||||
? "opacity-100"
|
? "opacity-100"
|
||||||
: "opacity-0",
|
: "opacity-0"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="absolute opacity-100 transition-all group-hover:opacity-0">
|
<div className="absolute opacity-100 transition-all group-hover:opacity-0">
|
||||||
|
|
|
||||||
|
|
@ -60,14 +60,14 @@ const CustomInputPopoverObject = ({
|
||||||
? options.find((option) => option.id === selectedOption)?.name ||
|
? options.find((option) => option.id === selectedOption)?.name ||
|
||||||
""
|
""
|
||||||
: (selectedOptions?.length !== 0 || !onChange) &&
|
: (selectedOptions?.length !== 0 || !onChange) &&
|
||||||
setSelectedOptions
|
setSelectedOptions
|
||||||
? selectedOptions
|
? selectedOptions
|
||||||
.map(
|
.map(
|
||||||
(optionId) =>
|
(optionId) =>
|
||||||
options.find((option) => option.id === optionId)?.name,
|
options.find((option) => option.id === optionId)?.name
|
||||||
)
|
)
|
||||||
.join(", ")
|
.join(", ")
|
||||||
: value
|
: value
|
||||||
}
|
}
|
||||||
autoFocus={autoFocus}
|
autoFocus={autoFocus}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
|
|
@ -115,15 +115,15 @@ const CustomInputPopoverObject = ({
|
||||||
onSelect={(currentValue) => {
|
onSelect={(currentValue) => {
|
||||||
setSelectedOption &&
|
setSelectedOption &&
|
||||||
setSelectedOption(
|
setSelectedOption(
|
||||||
currentValue === selectedOption ? "" : currentValue,
|
currentValue === selectedOption ? "" : currentValue
|
||||||
);
|
);
|
||||||
setSelectedOptions &&
|
setSelectedOptions &&
|
||||||
setSelectedOptions(
|
setSelectedOptions(
|
||||||
selectedOptions?.includes(currentValue)
|
selectedOptions?.includes(currentValue)
|
||||||
? selectedOptions.filter(
|
? selectedOptions.filter(
|
||||||
(item) => item !== currentValue,
|
(item) => item !== currentValue
|
||||||
)
|
)
|
||||||
: [...selectedOptions, currentValue],
|
: [...selectedOptions, currentValue]
|
||||||
);
|
);
|
||||||
!setSelectedOptions && setShowOptions(false);
|
!setSelectedOptions && setShowOptions(false);
|
||||||
}}
|
}}
|
||||||
|
|
@ -136,7 +136,7 @@ const CustomInputPopoverObject = ({
|
||||||
selectedOption === option.id ||
|
selectedOption === option.id ||
|
||||||
selectedOptions?.includes(option.id)
|
selectedOptions?.includes(option.id)
|
||||||
? "opacity-100"
|
? "opacity-100"
|
||||||
: "opacity-0",
|
: "opacity-0"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<div className="absolute opacity-100 transition-all group-hover:opacity-0">
|
<div className="absolute opacity-100 transition-all group-hover:opacity-0">
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ export default function InputComponent({
|
||||||
editNode ? "input-edit-node" : "",
|
editNode ? "input-edit-node" : "",
|
||||||
password && editNode ? "pr-8" : "",
|
password && editNode ? "pr-8" : "",
|
||||||
password && !editNode ? "pr-10" : "",
|
password && !editNode ? "pr-10" : "",
|
||||||
className!,
|
className!
|
||||||
)}
|
)}
|
||||||
placeholder={password && editNode ? "Key" : placeholder}
|
placeholder={password && editNode ? "Key" : placeholder}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
|
|
@ -155,7 +155,7 @@ export default function InputComponent({
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
password && selectedOption === "" ? "right-8" : "right-0",
|
password && selectedOption === "" ? "right-8" : "right-0",
|
||||||
"absolute inset-y-0 flex items-center pr-2.5",
|
"absolute inset-y-0 flex items-center pr-2.5"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
|
|
@ -168,7 +168,7 @@ export default function InputComponent({
|
||||||
onChange && setSelectedOption && selectedOption !== ""
|
onChange && setSelectedOption && selectedOption !== ""
|
||||||
? "text-medium-indigo"
|
? "text-medium-indigo"
|
||||||
: "text-muted-foreground",
|
: "text-muted-foreground",
|
||||||
"hover:text-accent-foreground",
|
"hover:text-accent-foreground"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<ForwardedIconComponent
|
<ForwardedIconComponent
|
||||||
|
|
@ -188,7 +188,7 @@ export default function InputComponent({
|
||||||
"mb-px",
|
"mb-px",
|
||||||
editNode
|
editNode
|
||||||
? "input-component-true-button"
|
? "input-component-true-button"
|
||||||
: "input-component-false-button",
|
: "input-component-false-button"
|
||||||
)}
|
)}
|
||||||
onClick={(event) => {
|
onClick={(event) => {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
|
|
@ -205,7 +205,7 @@ export default function InputComponent({
|
||||||
className={classNames(
|
className={classNames(
|
||||||
editNode
|
editNode
|
||||||
? "input-component-true-svg"
|
? "input-component-true-svg"
|
||||||
: "input-component-false-svg",
|
: "input-component-false-svg"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
|
|
@ -224,7 +224,7 @@ export default function InputComponent({
|
||||||
className={classNames(
|
className={classNames(
|
||||||
editNode
|
editNode
|
||||||
? "input-component-true-svg"
|
? "input-component-true-svg"
|
||||||
: "input-component-false-svg",
|
: "input-component-false-svg"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<path
|
<path
|
||||||
|
|
|
||||||
|
|
@ -105,8 +105,8 @@ export default function InputFileComponent({
|
||||||
editNode
|
editNode
|
||||||
? "input-edit-node input-dialog text-muted-foreground"
|
? "input-edit-node input-dialog text-muted-foreground"
|
||||||
: disabled
|
: disabled
|
||||||
? "input-disable input-dialog primary-input"
|
? "input-disable input-dialog primary-input"
|
||||||
: "input-dialog primary-input text-muted-foreground"
|
: "input-dialog primary-input text-muted-foreground"
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
{myValue !== "" ? myValue : "No file"}
|
{myValue !== "" ? myValue : "No file"}
|
||||||
|
|
|
||||||
|
|
@ -19,15 +19,15 @@ export default function InputGlobalComponent({
|
||||||
editNode = false,
|
editNode = false,
|
||||||
}: InputGlobalComponentType): JSX.Element {
|
}: InputGlobalComponentType): JSX.Element {
|
||||||
const globalVariablesEntries = useGlobalVariablesStore(
|
const globalVariablesEntries = useGlobalVariablesStore(
|
||||||
(state) => state.globalVariablesEntries,
|
(state) => state.globalVariablesEntries
|
||||||
);
|
);
|
||||||
|
|
||||||
const getVariableId = useGlobalVariablesStore((state) => state.getVariableId);
|
const getVariableId = useGlobalVariablesStore((state) => state.getVariableId);
|
||||||
const unavaliableFields = useGlobalVariablesStore(
|
const unavaliableFields = useGlobalVariablesStore(
|
||||||
(state) => state.unavaliableFields,
|
(state) => state.unavaliableFields
|
||||||
);
|
);
|
||||||
const removeGlobalVariable = useGlobalVariablesStore(
|
const removeGlobalVariable = useGlobalVariablesStore(
|
||||||
(state) => state.removeGlobalVariable,
|
(state) => state.removeGlobalVariable
|
||||||
);
|
);
|
||||||
const setErrorData = useAlertStore((state) => state.setErrorData);
|
const setErrorData = useAlertStore((state) => state.setErrorData);
|
||||||
|
|
||||||
|
|
@ -121,7 +121,7 @@ export default function InputGlobalComponent({
|
||||||
<ForwardedIconComponent
|
<ForwardedIconComponent
|
||||||
name="Trash2"
|
name="Trash2"
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-4 w-4 text-primary opacity-0 hover:text-status-red group-hover:opacity-100",
|
"h-4 w-4 text-primary opacity-0 hover:text-status-red group-hover:opacity-100"
|
||||||
)}
|
)}
|
||||||
aria-hidden="true"
|
aria-hidden="true"
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ export default function InputListComponent({
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
value.length > 1 && editNode ? "my-1" : "",
|
value.length > 1 && editNode ? "my-1" : "",
|
||||||
"flex flex-col gap-3",
|
"flex flex-col gap-3"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{value.map((singleValue, idx) => {
|
{value.map((singleValue, idx) => {
|
||||||
|
|
|
||||||
|
|
@ -52,7 +52,7 @@ export default function KeypairListComponent({
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
ref.current?.length > 1 && editNode ? "mx-2 my-1" : "",
|
ref.current?.length > 1 && editNode ? "mx-2 my-1" : "",
|
||||||
"flex h-full flex-col gap-3",
|
"flex h-full flex-col gap-3"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{ref.current?.map((obj, index) => {
|
{ref.current?.map((obj, index) => {
|
||||||
|
|
@ -68,7 +68,7 @@ export default function KeypairListComponent({
|
||||||
value={key.trim()}
|
value={key.trim()}
|
||||||
className={classNames(
|
className={classNames(
|
||||||
editNode ? "input-edit-node" : "",
|
editNode ? "input-edit-node" : "",
|
||||||
duplicateKey ? "input-invalid" : "",
|
duplicateKey ? "input-invalid" : ""
|
||||||
)}
|
)}
|
||||||
placeholder="Type key..."
|
placeholder="Type key..."
|
||||||
onChange={(event) => handleChangeKey(event, index)}
|
onChange={(event) => handleChangeKey(event, index)}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ export default function PaginatorComponent({
|
||||||
}: PaginatorComponentType) {
|
}: PaginatorComponentType) {
|
||||||
const [size, setPageSize] = useState(pageSize);
|
const [size, setPageSize] = useState(pageSize);
|
||||||
const [maxIndex, setMaxPageIndex] = useState(
|
const [maxIndex, setMaxPageIndex] = useState(
|
||||||
Math.ceil(totalRowsCount / pageSize),
|
Math.ceil(totalRowsCount / pageSize)
|
||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ export default function RenderIcons({
|
||||||
shortcutWPlus: string[];
|
shortcutWPlus: string[];
|
||||||
}): JSX.Element {
|
}): JSX.Element {
|
||||||
return hasShift ? (
|
return hasShift ? (
|
||||||
<span className="flex gap-0.5 text-xs">
|
<span className="flex items-center justify-center gap-0.5 text-xs">
|
||||||
{isMac ? (
|
{isMac ? (
|
||||||
<ForwardedIconComponent name="Command" className="h-3 w-3" />
|
<ForwardedIconComponent name="Command" className="h-3 w-3" />
|
||||||
) : (
|
) : (
|
||||||
|
|
@ -21,12 +21,13 @@ export default function RenderIcons({
|
||||||
<ForwardedIconComponent name="ArrowBigUp" className="h-4 w-4" />
|
<ForwardedIconComponent name="ArrowBigUp" className="h-4 w-4" />
|
||||||
{filteredShortcut.map((key, idx) => {
|
{filteredShortcut.map((key, idx) => {
|
||||||
if (idx > 0) {
|
if (idx > 0) {
|
||||||
return <span className=""> {key.toUpperCase()} </span>;
|
return key.toUpperCase();
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
) : (
|
) : (
|
||||||
<span className="flex gap-1 text-xs">
|
<span className="flex items-center justify-center gap-0.5 text-xs">
|
||||||
{shortcutWPlus[0].toLowerCase() === "space" ? (
|
{shortcutWPlus[0].toLowerCase() === "space" ? (
|
||||||
"Space"
|
"Space"
|
||||||
) : shortcutWPlus[0].length <= 1 ? (
|
) : shortcutWPlus[0].length <= 1 ? (
|
||||||
|
|
@ -34,12 +35,17 @@ export default function RenderIcons({
|
||||||
) : isMac ? (
|
) : isMac ? (
|
||||||
<ForwardedIconComponent name="Command" className="h-3 w-3" />
|
<ForwardedIconComponent name="Command" className="h-3 w-3" />
|
||||||
) : (
|
) : (
|
||||||
shortcutWPlus[0]
|
<span className="flex items-center">{shortcutWPlus[0]}</span>
|
||||||
)}
|
)}
|
||||||
{shortcutWPlus.map((key, idx) => {
|
{shortcutWPlus.map((key, idx) => {
|
||||||
if (idx > 0) {
|
if (idx > 0) {
|
||||||
return <span className=""> {key.toUpperCase()} </span>;
|
return (
|
||||||
|
<span key={idx} className="flex items-center">
|
||||||
|
{key.toUpperCase()}
|
||||||
|
</span>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
return null;
|
||||||
})}
|
})}
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const SideBarButtonsComponent = ({
|
||||||
pathname === item.href
|
pathname === item.href
|
||||||
? "border border-border bg-muted hover:bg-muted"
|
? "border border-border bg-muted hover:bg-muted"
|
||||||
: "border border-transparent hover:border-border hover:bg-transparent",
|
: "border border-transparent hover:border-border hover:bg-transparent",
|
||||||
"flex w-full shrink-0 justify-start gap-4",
|
"flex w-full shrink-0 justify-start gap-4"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{item.icon}
|
{item.icon}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
const [foldersNames, setFoldersNames] = useState({});
|
const [foldersNames, setFoldersNames] = useState({});
|
||||||
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
|
const takeSnapshot = useFlowsManagerStore((state) => state.takeSnapshot);
|
||||||
const [editFolders, setEditFolderName] = useState(
|
const [editFolders, setEditFolderName] = useState(
|
||||||
folders.map((obj) => ({ name: obj.name, edit: false })),
|
folders.map((obj) => ({ name: obj.name, edit: false }))
|
||||||
);
|
);
|
||||||
const uploadFolder = useFolderStore((state) => state.uploadFolder);
|
const uploadFolder = useFolderStore((state) => state.uploadFolder);
|
||||||
const currentFolder = pathname.split("/");
|
const currentFolder = pathname.split("/");
|
||||||
|
|
@ -58,7 +58,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
|
|
||||||
const { dragOver, dragEnter, dragLeave, onDrop } = useFileDrop(
|
const { dragOver, dragEnter, dragLeave, onDrop } = useFileDrop(
|
||||||
folderId,
|
folderId,
|
||||||
handleFolderChange,
|
handleFolderChange
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleUploadFlowsToFolder = () => {
|
const handleUploadFlowsToFolder = () => {
|
||||||
|
|
@ -86,7 +86,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
addFolder({ name: "New Folder", parent_id: null, description: "" }).then(
|
addFolder({ name: "New Folder", parent_id: null, description: "" }).then(
|
||||||
(res) => {
|
(res) => {
|
||||||
refreshFolders();
|
refreshFolders();
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -132,7 +132,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
<>
|
<>
|
||||||
{folders.map((item, index) => {
|
{folders.map((item, index) => {
|
||||||
const editFolderName = editFolders?.filter(
|
const editFolderName = editFolders?.filter(
|
||||||
(folder) => folder.name === item.name,
|
(folder) => folder.name === item.name
|
||||||
)[0];
|
)[0];
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
|
|
@ -148,7 +148,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
? "border border-border bg-muted hover:bg-muted"
|
? "border border-border bg-muted hover:bg-muted"
|
||||||
: "border hover:bg-transparent lg:border-transparent lg:hover:border-border",
|
: "border hover:bg-transparent lg:border-transparent lg:hover:border-border",
|
||||||
"group flex w-full shrink-0 cursor-pointer gap-2 opacity-100 lg:min-w-full",
|
"group flex w-full shrink-0 cursor-pointer gap-2 opacity-100 lg:min-w-full",
|
||||||
folderIdDragging === item.id! ? "bg-border" : "",
|
folderIdDragging === item.id! ? "bg-border" : ""
|
||||||
)}
|
)}
|
||||||
onClick={() => handleChangeFolder!(item.id!)}
|
onClick={() => handleChangeFolder!(item.id!)}
|
||||||
>
|
>
|
||||||
|
|
@ -218,7 +218,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
folders.map((obj) => ({
|
folders.map((obj) => ({
|
||||||
name: obj.name,
|
name: obj.name,
|
||||||
edit: false,
|
edit: false,
|
||||||
})),
|
}))
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
if (e.key === "Enter") {
|
if (e.key === "Enter") {
|
||||||
|
|
@ -251,10 +251,10 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
};
|
};
|
||||||
const updatedFolder = await updateFolder(
|
const updatedFolder = await updateFolder(
|
||||||
body,
|
body,
|
||||||
item.id!,
|
item.id!
|
||||||
);
|
);
|
||||||
const updateFolders = folders.filter(
|
const updateFolders = folders.filter(
|
||||||
(f) => f.name !== item.name,
|
(f) => f.name !== item.name
|
||||||
);
|
);
|
||||||
setFolders([...updateFolders, updatedFolder]);
|
setFolders([...updateFolders, updatedFolder]);
|
||||||
setFoldersNames({});
|
setFoldersNames({});
|
||||||
|
|
@ -262,7 +262,7 @@ const SideBarFoldersButtonsComponent = ({
|
||||||
folders.map((obj) => ({
|
folders.map((obj) => ({
|
||||||
name: obj.name,
|
name: obj.name,
|
||||||
edit: false,
|
edit: false,
|
||||||
})),
|
}))
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
setFoldersNames((old) => ({
|
setFoldersNames((old) => ({
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ import { addVersionToDuplicates } from "../../../utils/reactflowUtils";
|
||||||
const useFileDrop = (folderId, folderChangeCallback) => {
|
const useFileDrop = (folderId, folderChangeCallback) => {
|
||||||
const setFolderDragging = useFolderStore((state) => state.setFolderDragging);
|
const setFolderDragging = useFolderStore((state) => state.setFolderDragging);
|
||||||
const setFolderIdDragging = useFolderStore(
|
const setFolderIdDragging = useFolderStore(
|
||||||
(state) => state.setFolderIdDragging,
|
(state) => state.setFolderIdDragging
|
||||||
);
|
);
|
||||||
|
|
||||||
const setErrorData = useAlertStore((state) => state.setErrorData);
|
const setErrorData = useAlertStore((state) => state.setErrorData);
|
||||||
|
|
@ -45,7 +45,7 @@ const useFileDrop = (folderId, folderChangeCallback) => {
|
||||||
| React.DragEvent<HTMLDivElement>
|
| React.DragEvent<HTMLDivElement>
|
||||||
| React.DragEvent<HTMLButtonElement>
|
| React.DragEvent<HTMLButtonElement>
|
||||||
| React.DragEvent<HTMLAnchorElement>,
|
| React.DragEvent<HTMLAnchorElement>,
|
||||||
folderId: string,
|
folderId: string
|
||||||
) => {
|
) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
|
@ -60,7 +60,7 @@ const useFileDrop = (folderId, folderChangeCallback) => {
|
||||||
| React.DragEvent<HTMLDivElement>
|
| React.DragEvent<HTMLDivElement>
|
||||||
| React.DragEvent<HTMLButtonElement>
|
| React.DragEvent<HTMLButtonElement>
|
||||||
| React.DragEvent<HTMLAnchorElement>,
|
| React.DragEvent<HTMLAnchorElement>,
|
||||||
folderId: string,
|
folderId: string
|
||||||
) => {
|
) => {
|
||||||
if (e.dataTransfer.types.some((types) => types === "Files")) {
|
if (e.dataTransfer.types.some((types) => types === "Files")) {
|
||||||
setFolderDragging(true);
|
setFolderDragging(true);
|
||||||
|
|
@ -73,7 +73,7 @@ const useFileDrop = (folderId, folderChangeCallback) => {
|
||||||
e:
|
e:
|
||||||
| React.DragEvent<HTMLDivElement>
|
| React.DragEvent<HTMLDivElement>
|
||||||
| React.DragEvent<HTMLButtonElement>
|
| React.DragEvent<HTMLButtonElement>
|
||||||
| React.DragEvent<HTMLAnchorElement>,
|
| React.DragEvent<HTMLAnchorElement>
|
||||||
) => {
|
) => {
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
if (e.target === e.currentTarget) {
|
if (e.target === e.currentTarget) {
|
||||||
|
|
@ -87,7 +87,7 @@ const useFileDrop = (folderId, folderChangeCallback) => {
|
||||||
| React.DragEvent<HTMLDivElement>
|
| React.DragEvent<HTMLDivElement>
|
||||||
| React.DragEvent<HTMLButtonElement>
|
| React.DragEvent<HTMLButtonElement>
|
||||||
| React.DragEvent<HTMLAnchorElement>,
|
| React.DragEvent<HTMLAnchorElement>,
|
||||||
folderId: string,
|
folderId: string
|
||||||
) => {
|
) => {
|
||||||
if (e?.dataTransfer?.getData("flow")) {
|
if (e?.dataTransfer?.getData("flow")) {
|
||||||
const data = JSON.parse(e?.dataTransfer?.getData("flow"));
|
const data = JSON.parse(e?.dataTransfer?.getData("flow"));
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ export default function TableOptions({
|
||||||
name="RotateCcw"
|
name="RotateCcw"
|
||||||
strokeWidth={2}
|
strokeWidth={2}
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-5 w-5 text-primary transition-all hover:text-accent-foreground",
|
"h-5 w-5 text-primary transition-all hover:text-accent-foreground"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
@ -85,7 +85,7 @@ export default function TableOptions({
|
||||||
name="Trash2"
|
name="Trash2"
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-5 w-5 text-primary transition-all",
|
"h-5 w-5 text-primary transition-all",
|
||||||
!hasSelection ? "" : "hover:text-status-red",
|
!hasSelection ? "" : "hover:text-status-red"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</Button>
|
</Button>
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ export default function TableAutoCellRender({
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sq"
|
size="sq"
|
||||||
className={cn(
|
className={cn(
|
||||||
"min-w-min bg-success-background text-success-foreground hover:bg-success-background",
|
"min-w-min bg-success-background text-success-foreground hover:bg-success-background"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
Success
|
Success
|
||||||
|
|
@ -42,7 +42,7 @@ export default function TableAutoCellRender({
|
||||||
variant="outline"
|
variant="outline"
|
||||||
size="sq"
|
size="sq"
|
||||||
className={cn(
|
className={cn(
|
||||||
"min-w-min bg-error-background text-error-foreground hover:bg-error-background",
|
"min-w-min bg-error-background text-error-foreground hover:bg-error-background"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
Failure
|
Failure
|
||||||
|
|
|
||||||
|
|
@ -72,8 +72,8 @@ export default function TableNodeCellRender({
|
||||||
...id,
|
...id,
|
||||||
proxy: templateData.proxy,
|
proxy: templateData.proxy,
|
||||||
}
|
}
|
||||||
: id,
|
: id
|
||||||
),
|
)
|
||||||
) ?? false;
|
) ?? false;
|
||||||
function getCellType() {
|
function getCellType() {
|
||||||
switch (templateData.type) {
|
switch (templateData.type) {
|
||||||
|
|
@ -144,7 +144,7 @@ export default function TableNodeCellRender({
|
||||||
<div
|
<div
|
||||||
className={classNames(
|
className={classNames(
|
||||||
"max-h-48 w-full overflow-auto custom-scroll",
|
"max-h-48 w-full overflow-auto custom-scroll",
|
||||||
templateValue?.length > 1 ? "my-3" : "",
|
templateValue?.length > 1 ? "my-3" : ""
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
<KeypairListComponent
|
<KeypairListComponent
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ const TableComponent = forwardRef<
|
||||||
alertDescription = DEFAULT_TABLE_ALERT_MSG,
|
alertDescription = DEFAULT_TABLE_ALERT_MSG,
|
||||||
...props
|
...props
|
||||||
},
|
},
|
||||||
ref,
|
ref
|
||||||
) => {
|
) => {
|
||||||
let colDef = props.columnDefs.map((col, index) => {
|
let colDef = props.columnDefs.map((col, index) => {
|
||||||
let newCol = {
|
let newCol = {
|
||||||
|
|
@ -111,7 +111,7 @@ const TableComponent = forwardRef<
|
||||||
};
|
};
|
||||||
const onColumnMoved = (params) => {
|
const onColumnMoved = (params) => {
|
||||||
const updatedColumnDefs = makeLastColumnNonResizable(
|
const updatedColumnDefs = makeLastColumnNonResizable(
|
||||||
params.columnApi.getAllGridColumns().map((col) => col.getColDef()),
|
params.columnApi.getAllGridColumns().map((col) => col.getColDef())
|
||||||
);
|
);
|
||||||
params.api.setGridOption("columnDefs", updatedColumnDefs);
|
params.api.setGridOption("columnDefs", updatedColumnDefs);
|
||||||
if (props.onColumnMoved) props.onColumnMoved(params);
|
if (props.onColumnMoved) props.onColumnMoved(params);
|
||||||
|
|
@ -135,7 +135,7 @@ const TableComponent = forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
dark ? "ag-theme-quartz-dark" : "ag-theme-quartz",
|
dark ? "ag-theme-quartz-dark" : "ag-theme-quartz",
|
||||||
"ag-theme-shadcn flex h-full flex-col",
|
"ag-theme-shadcn flex h-full flex-col",
|
||||||
"relative",
|
"relative"
|
||||||
)} // applying the grid theme
|
)} // applying the grid theme
|
||||||
>
|
>
|
||||||
<AgGridReact
|
<AgGridReact
|
||||||
|
|
@ -152,7 +152,7 @@ const TableComponent = forwardRef<
|
||||||
if (e.sources.some((source) => source.includes("column"))) {
|
if (e.sources.some((source) => source.includes("column"))) {
|
||||||
localStorage.setItem(
|
localStorage.setItem(
|
||||||
storeReference,
|
storeReference,
|
||||||
JSON.stringify(realRef.current?.api?.getColumnState()),
|
JSON.stringify(realRef.current?.api?.getColumnState())
|
||||||
);
|
);
|
||||||
setColumnStateChange(true);
|
setColumnStateChange(true);
|
||||||
}
|
}
|
||||||
|
|
@ -175,7 +175,7 @@ const TableComponent = forwardRef<
|
||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
export default TableComponent;
|
export default TableComponent;
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ export function TagsSelector({
|
||||||
className={cn(
|
className={cn(
|
||||||
selectedTags.some((category) => category === tag.name)
|
selectedTags.some((category) => category === tag.name)
|
||||||
? "min-w-min bg-beta-foreground text-background hover:bg-beta-foreground"
|
? "min-w-min bg-beta-foreground text-background hover:bg-beta-foreground"
|
||||||
: "",
|
: ""
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{tag.name}
|
{tag.name}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ const AccordionTrigger = React.forwardRef<
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex flex-1 cursor-pointer items-center justify-between py-4 text-sm font-medium transition-all [&[data-state=open]>svg]:rotate-180",
|
"flex flex-1 cursor-pointer items-center justify-between py-4 text-sm font-medium transition-all [&[data-state=open]>svg]:rotate-180",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
@ -46,7 +46,7 @@ const AccordionTrigger = React.forwardRef<
|
||||||
<ChevronDownIcon
|
<ChevronDownIcon
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-4 w-4 font-bold transition-transform duration-200",
|
"h-4 w-4 font-bold transition-transform duration-200",
|
||||||
disabled ? "text-muted-foreground" : "text-primary",
|
disabled ? "text-muted-foreground" : "text-primary"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
|
|
@ -64,7 +64,7 @@ const AccordionContent = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ const alertVariants = cva(
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: "default",
|
variant: "default",
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const Alert = React.forwardRef<
|
const Alert = React.forwardRef<
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const badgeVariants = cva(
|
||||||
defaultVariants: {
|
defaultVariants: {
|
||||||
variant: "default",
|
variant: "default",
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
export interface BadgeProps
|
export interface BadgeProps
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@ const buttonVariants = cva(
|
||||||
variant: "default",
|
variant: "default",
|
||||||
size: "default",
|
size: "default",
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
export interface ButtonProps
|
export interface ButtonProps
|
||||||
|
|
@ -65,7 +65,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
||||||
children,
|
children,
|
||||||
...props
|
...props
|
||||||
},
|
},
|
||||||
ref,
|
ref
|
||||||
) => {
|
) => {
|
||||||
const Comp = asChild ? Slot : "button";
|
const Comp = asChild ? Slot : "button";
|
||||||
let newChildren = children;
|
let newChildren = children;
|
||||||
|
|
@ -97,7 +97,7 @@ const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(
|
||||||
</Comp>
|
</Comp>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
Button.displayName = "Button";
|
Button.displayName = "Button";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ const Card = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex flex-col justify-between rounded-lg border bg-muted text-card-foreground shadow-sm transition-all",
|
"flex flex-col justify-between rounded-lg border bg-muted text-card-foreground shadow-sm transition-all",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -36,7 +36,7 @@ const CardTitle = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"text-base font-semibold leading-tight tracking-tight",
|
"text-base font-semibold leading-tight tracking-tight",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ const Checkbox = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -37,7 +37,7 @@ const CheckBoxDiv = ({
|
||||||
className={cn(
|
className={cn(
|
||||||
className,
|
className,
|
||||||
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
"peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
||||||
checked ? "bg-primary text-primary-foreground" : "",
|
checked ? "bg-primary text-primary-foreground" : ""
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{checked && (
|
{checked && (
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,7 @@ export function Combobox({
|
||||||
"mr-2 h-4 w-4",
|
"mr-2 h-4 w-4",
|
||||||
value.includes(framework.value)
|
value.includes(framework.value)
|
||||||
? "opacity-100"
|
? "opacity-100"
|
||||||
: "opacity-0",
|
: "opacity-0"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
{framework.label}
|
{framework.label}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ const Command = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
"flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -47,7 +47,7 @@ const CommandInput = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
"flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -90,7 +90,7 @@ const CommandGroup = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
"overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -118,7 +118,7 @@ const CommandItem = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled=true]:pointer-events-none data-[disabled=true]:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -134,7 +134,7 @@ const CommandShortcut = ({
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto text-xs tracking-widest text-muted-foreground",
|
"ml-auto text-xs tracking-widest text-muted-foreground",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ const AccordionTrigger = React.forwardRef<
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex flex-1 cursor-pointer items-center justify-between border-[1px] py-2 text-sm font-medium data-[state=closed]:rounded-md data-[state=open]:rounded-t-md data-[state=open]:border-b-0 data-[state=open]:bg-muted [&[data-state=open]>svg]:rotate-180",
|
"flex flex-1 cursor-pointer items-center justify-between border-[1px] py-2 text-sm font-medium data-[state=closed]:rounded-md data-[state=open]:rounded-t-md data-[state=open]:border-b-0 data-[state=open]:bg-muted [&[data-state=open]>svg]:rotate-180",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
@ -43,7 +43,7 @@ const AccordionContent = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden border-[1px] text-sm data-[state=open]:rounded-b-md data-[state=open]:border-t-0 data-[state=open]:bg-muted",
|
"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden border-[1px] text-sm data-[state=open]:rounded-b-md data-[state=open]:border-t-0 data-[state=open]:bg-muted",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ const DialogOverlay = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"nopan nodelete nodrag noundo nocopy fixed inset-0 bottom-0 left-0 right-0 top-0 z-50 overflow-auto bg-blur-shared backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
"nopan nodelete nodrag noundo nocopy fixed inset-0 bottom-0 left-0 right-0 top-0 z-50 overflow-auto bg-blur-shared backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -43,7 +43,7 @@ const DialogContent = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"fixed z-50 flex w-full max-w-lg flex-col gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] sm:rounded-lg md:w-full",
|
"fixed z-50 flex w-full max-w-lg flex-col gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] sm:rounded-lg md:w-full",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -60,7 +60,7 @@ const DialogHeader = ({
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex flex-col space-y-1.5 text-center sm:text-left",
|
"flex flex-col space-y-1.5 text-center sm:text-left",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -74,7 +74,7 @@ const DialogFooter = ({
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -89,7 +89,7 @@ const DialogTitle = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"text-lg font-semibold leading-none tracking-tight",
|
"text-lg font-semibold leading-none tracking-tight",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const DialogOverlay = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"nopan nodelete nodrag noundo nocopy fixed inset-0 bottom-0 left-0 right-0 top-0 z-50 overflow-auto bg-blur-shared backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
"nopan nodelete nodrag noundo nocopy fixed inset-0 bottom-0 left-0 right-0 top-0 z-50 overflow-auto bg-blur-shared backdrop-blur-sm data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -44,7 +44,7 @@ const DialogContent = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"fixed z-50 flex w-full max-w-lg flex-col gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] sm:rounded-lg md:w-full",
|
"fixed z-50 flex w-full max-w-lg flex-col gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] sm:rounded-lg md:w-full",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -65,7 +65,7 @@ const DialogHeader = ({
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex flex-col space-y-1 text-center sm:text-left",
|
"flex flex-col space-y-1 text-center sm:text-left",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -79,7 +79,7 @@ const DialogFooter = ({
|
||||||
<div
|
<div
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
"flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -94,7 +94,7 @@ const DialogTitle = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"text-lg font-semibold leading-none tracking-tight",
|
"text-lg font-semibold leading-none tracking-tight",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -28,7 +28,7 @@ const DropdownMenuSubTrigger = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",
|
||||||
inset && "pl-8",
|
inset && "pl-8",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -47,7 +47,7 @@ const DropdownMenuSubContent = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -65,7 +65,7 @@ const DropdownMenuContent = React.forwardRef<
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -84,7 +84,7 @@ const DropdownMenuItem = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
inset && "pl-8",
|
inset && "pl-8",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -99,7 +99,7 @@ const DropdownMenuCheckboxItem = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
checked={checked}
|
checked={checked}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
@ -123,7 +123,7 @@ const DropdownMenuRadioItem = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -148,7 +148,7 @@ const DropdownMenuLabel = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"px-2 py-1.5 pl-2 text-sm font-semibold",
|
"px-2 py-1.5 pl-2 text-sm font-semibold",
|
||||||
inset && "pl-8",
|
inset && "pl-8",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -16,18 +16,18 @@ const Form = FormProvider;
|
||||||
|
|
||||||
type FormFieldContextValue<
|
type FormFieldContextValue<
|
||||||
TFieldValues extends FieldValues = FieldValues,
|
TFieldValues extends FieldValues = FieldValues,
|
||||||
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
||||||
> = {
|
> = {
|
||||||
name: TName;
|
name: TName;
|
||||||
};
|
};
|
||||||
|
|
||||||
const FormFieldContext = React.createContext<FormFieldContextValue>(
|
const FormFieldContext = React.createContext<FormFieldContextValue>(
|
||||||
{} as FormFieldContextValue,
|
{} as FormFieldContextValue
|
||||||
);
|
);
|
||||||
|
|
||||||
const FormField = <
|
const FormField = <
|
||||||
TFieldValues extends FieldValues = FieldValues,
|
TFieldValues extends FieldValues = FieldValues,
|
||||||
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
|
TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>
|
||||||
>({
|
>({
|
||||||
...props
|
...props
|
||||||
}: ControllerProps<TFieldValues, TName>) => {
|
}: ControllerProps<TFieldValues, TName>) => {
|
||||||
|
|
@ -66,7 +66,7 @@ type FormItemContextValue = {
|
||||||
};
|
};
|
||||||
|
|
||||||
const FormItemContext = React.createContext<FormItemContextValue>(
|
const FormItemContext = React.createContext<FormItemContextValue>(
|
||||||
{} as FormItemContextValue,
|
{} as FormItemContextValue
|
||||||
);
|
);
|
||||||
|
|
||||||
const FormItem = React.forwardRef<
|
const FormItem = React.forwardRef<
|
||||||
|
|
|
||||||
|
|
@ -12,13 +12,13 @@ const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
||||||
type={type}
|
type={type}
|
||||||
className={cn(
|
className={cn(
|
||||||
"nopan nodelete nodrag noundo nocopy primary-input",
|
"nopan nodelete nodrag noundo nocopy primary-input",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
Input.displayName = "Input";
|
Input.displayName = "Input";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ import * as React from "react";
|
||||||
import { cn } from "../../utils/utils";
|
import { cn } from "../../utils/utils";
|
||||||
|
|
||||||
const labelVariants = cva(
|
const labelVariants = cva(
|
||||||
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
||||||
);
|
);
|
||||||
|
|
||||||
const Label = React.forwardRef<
|
const Label = React.forwardRef<
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ const Menubar = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
|
"flex h-10 items-center space-x-1 rounded-md border bg-background p-1",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -39,7 +39,7 @@ const MenubarTrigger = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
"flex cursor-default select-none items-center rounded-sm px-3 py-1.5 text-sm font-medium outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -57,7 +57,7 @@ const MenubarSubTrigger = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
"flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[state=open]:bg-accent data-[state=open]:text-accent-foreground",
|
||||||
inset && "pl-8",
|
inset && "pl-8",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -75,7 +75,7 @@ const MenubarSubContent = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
"z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -88,7 +88,7 @@ const MenubarContent = React.forwardRef<
|
||||||
>(
|
>(
|
||||||
(
|
(
|
||||||
{ className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
|
{ className, align = "start", alignOffset = -4, sideOffset = 8, ...props },
|
||||||
ref,
|
ref
|
||||||
) => (
|
) => (
|
||||||
<MenubarPrimitive.Portal>
|
<MenubarPrimitive.Portal>
|
||||||
<MenubarPrimitive.Content
|
<MenubarPrimitive.Content
|
||||||
|
|
@ -98,12 +98,12 @@ const MenubarContent = React.forwardRef<
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in slide-in-from-top-1",
|
"z-50 min-w-[12rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md animate-in slide-in-from-top-1",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
</MenubarPrimitive.Portal>
|
</MenubarPrimitive.Portal>
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
MenubarContent.displayName = MenubarPrimitive.Content.displayName;
|
||||||
|
|
||||||
|
|
@ -118,7 +118,7 @@ const MenubarItem = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
inset && "pl-8",
|
inset && "pl-8",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -133,7 +133,7 @@ const MenubarCheckboxItem = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
checked={checked}
|
checked={checked}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
@ -156,7 +156,7 @@ const MenubarRadioItem = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -181,7 +181,7 @@ const MenubarLabel = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"px-2 py-1.5 text-sm font-semibold",
|
"px-2 py-1.5 text-sm font-semibold",
|
||||||
inset && "pl-8",
|
inset && "pl-8",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -208,7 +208,7 @@ const MenubarShortcut = ({
|
||||||
<span
|
<span
|
||||||
className={cn(
|
className={cn(
|
||||||
"ml-auto text-xs tracking-widest text-muted-foreground",
|
"ml-auto text-xs tracking-widest text-muted-foreground",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ const PopoverContent = React.forwardRef<
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -37,7 +37,7 @@ const PopoverContentWithoutPortal = React.forwardRef<
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
"z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ const Progress = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
|
"relative h-4 w-full overflow-hidden rounded-full bg-secondary",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -61,7 +61,7 @@ export default function RenameLabel(props) {
|
||||||
onInput={resizeInput}
|
onInput={resizeInput}
|
||||||
className={cn(
|
className={cn(
|
||||||
"nopan nodelete nodrag noundo nocopy rounded-md bg-transparent px-2 outline-ring hover:outline focus:border-none focus:outline active:outline",
|
"nopan nodelete nodrag noundo nocopy rounded-md bg-transparent px-2 outline-ring hover:outline focus:border-none focus:outline active:outline",
|
||||||
props.className,
|
props.className
|
||||||
)}
|
)}
|
||||||
onBlur={() => {
|
onBlur={() => {
|
||||||
setIsRename(false);
|
setIsRename(false);
|
||||||
|
|
|
||||||
|
|
@ -36,7 +36,7 @@ const SelectContent = React.forwardRef<
|
||||||
"relative z-50 min-w-[14rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
"relative z-50 min-w-[14rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
||||||
position === "popper" &&
|
position === "popper" &&
|
||||||
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
position={position}
|
position={position}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
@ -45,7 +45,7 @@ const SelectContent = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"p-1",
|
"p-1",
|
||||||
position === "popper" &&
|
position === "popper" &&
|
||||||
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
@ -75,7 +75,7 @@ const SelectItem = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-3 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex w-full cursor-pointer select-none items-center rounded-sm py-1.5 pl-3 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ const SelectTrigger = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"flex h-8 items-center justify-between rounded-md border border-ring/60 px-4 py-2 text-sm text-primary ring-offset-background placeholder:text-muted-foreground hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
"flex h-8 items-center justify-between rounded-md border border-ring/60 px-4 py-2 text-sm text-primary ring-offset-background placeholder:text-muted-foreground hover:bg-muted focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
@ -42,7 +42,7 @@ const SelectContent = React.forwardRef<
|
||||||
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
"relative z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
||||||
position === "popper" &&
|
position === "popper" &&
|
||||||
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
position={position}
|
position={position}
|
||||||
{...props}
|
{...props}
|
||||||
|
|
@ -51,7 +51,7 @@ const SelectContent = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"p-1",
|
"p-1",
|
||||||
position === "popper" &&
|
position === "popper" &&
|
||||||
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]",
|
"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"
|
||||||
)}
|
)}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
|
|
@ -81,7 +81,7 @@ const SelectItem = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
"relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-8 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
>
|
>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ const Separator = React.forwardRef<
|
||||||
>(
|
>(
|
||||||
(
|
(
|
||||||
{ className, orientation = "horizontal", decorative = true, ...props },
|
{ className, orientation = "horizontal", decorative = true, ...props },
|
||||||
ref,
|
ref
|
||||||
) => (
|
) => (
|
||||||
<SeparatorPrimitive.Root
|
<SeparatorPrimitive.Root
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
|
@ -19,11 +19,11 @@ const Separator = React.forwardRef<
|
||||||
className={cn(
|
className={cn(
|
||||||
"shrink-0 bg-ring/40",
|
"shrink-0 bg-ring/40",
|
||||||
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
),
|
)
|
||||||
);
|
);
|
||||||
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
Separator.displayName = SeparatorPrimitive.Root.displayName;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ const Switch = React.forwardRef<
|
||||||
<SwitchPrimitives.Root
|
<SwitchPrimitives.Root
|
||||||
className={cn(
|
className={cn(
|
||||||
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-ring",
|
"peer inline-flex h-[24px] w-[44px] shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-ring",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
|
|
@ -19,7 +19,7 @@ const Switch = React.forwardRef<
|
||||||
<SwitchPrimitives.Thumb
|
<SwitchPrimitives.Thumb
|
||||||
aria-disabled={props.disabled}
|
aria-disabled={props.disabled}
|
||||||
className={cn(
|
className={cn(
|
||||||
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform aria-disabled:bg-muted/70 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0",
|
"pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform aria-disabled:bg-muted/70 data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0"
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</SwitchPrimitives.Root>
|
</SwitchPrimitives.Root>
|
||||||
|
|
|
||||||
|
|
@ -55,7 +55,7 @@ const TableRow = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
"border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -70,7 +70,7 @@ const TableHead = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
"h-12 px-4 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ const TabsList = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground",
|
"inline-flex h-10 items-center justify-center rounded-md p-1 text-muted-foreground",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -29,7 +29,7 @@ const TabsTrigger = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border data-[state=inactive]:border data-[state=inactive]:border-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[state=inactive]:hover:bg-secondary/80",
|
"inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:border data-[state=inactive]:border data-[state=inactive]:border-muted data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm data-[state=inactive]:hover:bg-secondary/80",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -44,7 +44,7 @@ const TabsContent = React.forwardRef<
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className={cn(
|
className={cn(
|
||||||
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
"mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -10,13 +10,13 @@ const Textarea = React.forwardRef<HTMLTextAreaElement, TextareaProps>(
|
||||||
<textarea
|
<textarea
|
||||||
className={cn(
|
className={cn(
|
||||||
"nopan nodelete nodrag noundo nocopy textarea-primary",
|
"nopan nodelete nodrag noundo nocopy textarea-primary",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
ref={ref}
|
ref={ref}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
Textarea.displayName = "Textarea";
|
Textarea.displayName = "Textarea";
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ const toggleVariants = cva(
|
||||||
variant: "default",
|
variant: "default",
|
||||||
size: "default",
|
size: "default",
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const Toggle = React.forwardRef<
|
const Toggle = React.forwardRef<
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ const TooltipContent = React.forwardRef<
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
"z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
@ -37,7 +37,7 @@ const TooltipContentWithoutPortal = React.forwardRef<
|
||||||
sideOffset={sideOffset}
|
sideOffset={sideOffset}
|
||||||
className={cn(
|
className={cn(
|
||||||
"z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
"z-45 overflow-y-auto rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-50 data-[side=bottom]:slide-in-from-top-1 data-[side=left]:slide-in-from-right-1 data-[side=right]:slide-in-from-left-1 data-[side=top]:slide-in-from-bottom-1",
|
||||||
className,
|
className
|
||||||
)}
|
)}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
|
|
|
||||||
|
|
@ -31,17 +31,17 @@ export function AuthProvider({ children }): React.ReactElement {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const cookies = new Cookies();
|
const cookies = new Cookies();
|
||||||
const [accessToken, setAccessToken] = useState<string | null>(
|
const [accessToken, setAccessToken] = useState<string | null>(
|
||||||
cookies.get("access_token_lf") ?? null,
|
cookies.get("access_token_lf") ?? null
|
||||||
);
|
);
|
||||||
const [isAuthenticated, setIsAuthenticated] = useState<boolean>(
|
const [isAuthenticated, setIsAuthenticated] = useState<boolean>(
|
||||||
!!cookies.get("access_token_lf"),
|
!!cookies.get("access_token_lf")
|
||||||
);
|
);
|
||||||
const [isAdmin, setIsAdmin] = useState<boolean>(false);
|
const [isAdmin, setIsAdmin] = useState<boolean>(false);
|
||||||
const [userData, setUserData] = useState<Users | null>(null);
|
const [userData, setUserData] = useState<Users | null>(null);
|
||||||
const [autoLogin, setAutoLogin] = useState<boolean>(false);
|
const [autoLogin, setAutoLogin] = useState<boolean>(false);
|
||||||
const setLoading = useAlertStore((state) => state.setLoading);
|
const setLoading = useAlertStore((state) => state.setLoading);
|
||||||
const [apiKey, setApiKey] = useState<string | null>(
|
const [apiKey, setApiKey] = useState<string | null>(
|
||||||
cookies.get("apikey_tkn_lflw"),
|
cookies.get("apikey_tkn_lflw")
|
||||||
);
|
);
|
||||||
|
|
||||||
const getFoldersApi = useFolderStore((state) => state.getFoldersApi);
|
const getFoldersApi = useFolderStore((state) => state.getFoldersApi);
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,7 @@ function ApiInterceptor() {
|
||||||
}
|
}
|
||||||
await clearBuildVerticesState(error);
|
await clearBuildVerticesState(error);
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
const isAuthorizedURL = (url) => {
|
const isAuthorizedURL = (url) => {
|
||||||
|
|
@ -65,10 +65,10 @@ function ApiInterceptor() {
|
||||||
const parsedURL = new URL(url);
|
const parsedURL = new URL(url);
|
||||||
|
|
||||||
const isDomainAllowed = authorizedDomains.some(
|
const isDomainAllowed = authorizedDomains.some(
|
||||||
(domain) => parsedURL.origin === new URL(domain).origin,
|
(domain) => parsedURL.origin === new URL(domain).origin
|
||||||
);
|
);
|
||||||
const isEndpointAllowed = authorizedEndpoints.some((endpoint) =>
|
const isEndpointAllowed = authorizedEndpoints.some((endpoint) =>
|
||||||
parsedURL.pathname.includes(endpoint),
|
parsedURL.pathname.includes(endpoint)
|
||||||
);
|
);
|
||||||
|
|
||||||
return isDomainAllowed || isEndpointAllowed;
|
return isDomainAllowed || isEndpointAllowed;
|
||||||
|
|
@ -102,7 +102,7 @@ function ApiInterceptor() {
|
||||||
},
|
},
|
||||||
(error) => {
|
(error) => {
|
||||||
return Promise.reject(error);
|
return Promise.reject(error);
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
return () => {
|
return () => {
|
||||||
|
|
@ -134,7 +134,7 @@ function ApiInterceptor() {
|
||||||
if (error?.config?.headers) {
|
if (error?.config?.headers) {
|
||||||
delete error.config.headers["Authorization"];
|
delete error.config.headers["Authorization"];
|
||||||
error.config.headers["Authorization"] = `Bearer ${cookies.get(
|
error.config.headers["Authorization"] = `Bearer ${cookies.get(
|
||||||
"access_token_lf",
|
"access_token_lf"
|
||||||
)}`;
|
)}`;
|
||||||
const response = await axios.request(error.config);
|
const response = await axios.request(error.config);
|
||||||
return response;
|
return response;
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ export function checkDuplicateRequestAndStoreRequest(config) {
|
||||||
const currentUrl = window.location.pathname;
|
const currentUrl = window.location.pathname;
|
||||||
const currentTime = Date.now();
|
const currentTime = Date.now();
|
||||||
const isContained = AUTHORIZED_DUPLICATE_REQUESTS.some((request) =>
|
const isContained = AUTHORIZED_DUPLICATE_REQUESTS.some((request) =>
|
||||||
config?.url!.includes(request),
|
config?.url!.includes(request)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (
|
if (
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ export async function sendAll(data: sendAllProps) {
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function postValidateCode(
|
export async function postValidateCode(
|
||||||
code: string,
|
code: string
|
||||||
): Promise<AxiosResponse<errorsTypeAPI>> {
|
): Promise<AxiosResponse<errorsTypeAPI>> {
|
||||||
return await api.post(`${BASE_URL_API}validate/code`, { code });
|
return await api.post(`${BASE_URL_API}validate/code`, { code });
|
||||||
}
|
}
|
||||||
|
|
@ -78,7 +78,7 @@ export async function postValidateCode(
|
||||||
export async function postValidatePrompt(
|
export async function postValidatePrompt(
|
||||||
name: string,
|
name: string,
|
||||||
template: string,
|
template: string,
|
||||||
frontend_node: APIClassType,
|
frontend_node: APIClassType
|
||||||
): Promise<AxiosResponse<PromptTypeAPI>> {
|
): Promise<AxiosResponse<PromptTypeAPI>> {
|
||||||
return api.post(`${BASE_URL_API}validate/prompt`, {
|
return api.post(`${BASE_URL_API}validate/prompt`, {
|
||||||
name,
|
name,
|
||||||
|
|
@ -151,7 +151,7 @@ export async function saveFlowToDatabase(newFlow: {
|
||||||
* @throws Will throw an error if the update fails.
|
* @throws Will throw an error if the update fails.
|
||||||
*/
|
*/
|
||||||
export async function updateFlowInDatabase(
|
export async function updateFlowInDatabase(
|
||||||
updatedFlow: FlowType,
|
updatedFlow: FlowType
|
||||||
): Promise<FlowType> {
|
): Promise<FlowType> {
|
||||||
try {
|
try {
|
||||||
const response = await api.patch(`${BASE_URL_API}flows/${updatedFlow.id}`, {
|
const response = await api.patch(`${BASE_URL_API}flows/${updatedFlow.id}`, {
|
||||||
|
|
@ -329,7 +329,7 @@ export async function getHealth() {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function getBuildStatus(
|
export async function getBuildStatus(
|
||||||
flowId: string,
|
flowId: string
|
||||||
): Promise<AxiosResponse<BuildStatusTypeAPI>> {
|
): Promise<AxiosResponse<BuildStatusTypeAPI>> {
|
||||||
return await api.get(`${BASE_URL_API}build/${flowId}/status`);
|
return await api.get(`${BASE_URL_API}build/${flowId}/status`);
|
||||||
}
|
}
|
||||||
|
|
@ -342,7 +342,7 @@ export async function getBuildStatus(
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export async function postBuildInit(
|
export async function postBuildInit(
|
||||||
flow: FlowType,
|
flow: FlowType
|
||||||
): Promise<AxiosResponse<InitTypeAPI>> {
|
): Promise<AxiosResponse<InitTypeAPI>> {
|
||||||
return await api.post(`${BASE_URL_API}build/init/${flow.id}`, flow);
|
return await api.post(`${BASE_URL_API}build/init/${flow.id}`, flow);
|
||||||
}
|
}
|
||||||
|
|
@ -358,7 +358,7 @@ export async function postBuildInit(
|
||||||
*/
|
*/
|
||||||
export async function uploadFile(
|
export async function uploadFile(
|
||||||
file: File,
|
file: File,
|
||||||
id: string,
|
id: string
|
||||||
): Promise<AxiosResponse<UploadFileTypeAPI>> {
|
): Promise<AxiosResponse<UploadFileTypeAPI>> {
|
||||||
const formData = new FormData();
|
const formData = new FormData();
|
||||||
formData.append("file", file);
|
formData.append("file", file);
|
||||||
|
|
@ -380,7 +380,7 @@ export async function getProfilePictures(): Promise<ProfilePicturesTypeAPI | nul
|
||||||
|
|
||||||
export async function postCustomComponent(
|
export async function postCustomComponent(
|
||||||
code: string,
|
code: string,
|
||||||
apiClass: APIClassType,
|
apiClass: APIClassType
|
||||||
): Promise<AxiosResponse<APIClassType>> {
|
): Promise<AxiosResponse<APIClassType>> {
|
||||||
// let template = apiClass.template;
|
// let template = apiClass.template;
|
||||||
return await api.post(`${BASE_URL_API}custom_component`, {
|
return await api.post(`${BASE_URL_API}custom_component`, {
|
||||||
|
|
@ -393,7 +393,7 @@ export async function postCustomComponentUpdate(
|
||||||
code: string,
|
code: string,
|
||||||
template: APITemplateType,
|
template: APITemplateType,
|
||||||
field: string,
|
field: string,
|
||||||
field_value: any,
|
field_value: any
|
||||||
): Promise<AxiosResponse<APIClassType>> {
|
): Promise<AxiosResponse<APIClassType>> {
|
||||||
return await api.post(`${BASE_URL_API}custom_component/update`, {
|
return await api.post(`${BASE_URL_API}custom_component/update`, {
|
||||||
code,
|
code,
|
||||||
|
|
@ -415,7 +415,7 @@ export async function onLogin(user: LoginType) {
|
||||||
headers: {
|
headers: {
|
||||||
"Content-Type": "application/x-www-form-urlencoded",
|
"Content-Type": "application/x-www-form-urlencoded",
|
||||||
},
|
},
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
if (response.status === 200) {
|
if (response.status === 200) {
|
||||||
|
|
@ -477,11 +477,11 @@ export async function addUser(user: UserInputType): Promise<Array<Users>> {
|
||||||
|
|
||||||
export async function getUsersPage(
|
export async function getUsersPage(
|
||||||
skip: number,
|
skip: number,
|
||||||
limit: number,
|
limit: number
|
||||||
): Promise<Array<Users>> {
|
): Promise<Array<Users>> {
|
||||||
try {
|
try {
|
||||||
const res = await api.get(
|
const res = await api.get(
|
||||||
`${BASE_URL_API}users/?skip=${skip}&limit=${limit}`,
|
`${BASE_URL_API}users/?skip=${skip}&limit=${limit}`
|
||||||
);
|
);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
@ -518,7 +518,7 @@ export async function resetPassword(user_id: string, user: resetPasswordType) {
|
||||||
try {
|
try {
|
||||||
const res = await api.patch(
|
const res = await api.patch(
|
||||||
`${BASE_URL_API}users/${user_id}/reset-password`,
|
`${BASE_URL_API}users/${user_id}/reset-password`,
|
||||||
user,
|
user
|
||||||
);
|
);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
@ -592,7 +592,7 @@ export async function saveFlowStore(
|
||||||
last_tested_version?: string;
|
last_tested_version?: string;
|
||||||
},
|
},
|
||||||
tags: string[],
|
tags: string[],
|
||||||
publicFlow = false,
|
publicFlow = false
|
||||||
): Promise<FlowType> {
|
): Promise<FlowType> {
|
||||||
try {
|
try {
|
||||||
const response = await api.post(`${BASE_URL_API}store/components/`, {
|
const response = await api.post(`${BASE_URL_API}store/components/`, {
|
||||||
|
|
@ -721,7 +721,7 @@ export async function postStoreComponents(component: Component) {
|
||||||
export async function getComponent(component_id: string) {
|
export async function getComponent(component_id: string) {
|
||||||
try {
|
try {
|
||||||
const res = await api.get(
|
const res = await api.get(
|
||||||
`${BASE_URL_API}store/components/${component_id}`,
|
`${BASE_URL_API}store/components/${component_id}`
|
||||||
);
|
);
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
return res.data;
|
return res.data;
|
||||||
|
|
@ -736,7 +736,7 @@ export async function searchComponent(
|
||||||
page?: number | null,
|
page?: number | null,
|
||||||
limit?: number | null,
|
limit?: number | null,
|
||||||
status?: string | null,
|
status?: string | null,
|
||||||
tags?: string[],
|
tags?: string[]
|
||||||
): Promise<StoreComponentResponse | undefined> {
|
): Promise<StoreComponentResponse | undefined> {
|
||||||
try {
|
try {
|
||||||
let url = `${BASE_URL_API}store/components/`;
|
let url = `${BASE_URL_API}store/components/`;
|
||||||
|
|
@ -848,7 +848,7 @@ export async function updateFlowStore(
|
||||||
},
|
},
|
||||||
tags: string[],
|
tags: string[],
|
||||||
publicFlow = false,
|
publicFlow = false,
|
||||||
id: string,
|
id: string
|
||||||
): Promise<FlowType> {
|
): Promise<FlowType> {
|
||||||
try {
|
try {
|
||||||
const response = await api.patch(`${BASE_URL_API}store/components/${id}`, {
|
const response = await api.patch(`${BASE_URL_API}store/components/${id}`, {
|
||||||
|
|
@ -932,7 +932,7 @@ export async function deleteGlobalVariable(id: string) {
|
||||||
export async function updateGlobalVariable(
|
export async function updateGlobalVariable(
|
||||||
name: string,
|
name: string,
|
||||||
value: string,
|
value: string,
|
||||||
id: string,
|
id: string
|
||||||
) {
|
) {
|
||||||
try {
|
try {
|
||||||
const response = api.patch(`${BASE_URL_API}variables/${id}`, {
|
const response = api.patch(`${BASE_URL_API}variables/${id}`, {
|
||||||
|
|
@ -951,7 +951,7 @@ export async function getVerticesOrder(
|
||||||
startNodeId?: string | null,
|
startNodeId?: string | null,
|
||||||
stopNodeId?: string | null,
|
stopNodeId?: string | null,
|
||||||
nodes?: Node[],
|
nodes?: Node[],
|
||||||
Edges?: Edge[],
|
Edges?: Edge[]
|
||||||
): Promise<AxiosResponse<VerticesOrderTypeAPI>> {
|
): Promise<AxiosResponse<VerticesOrderTypeAPI>> {
|
||||||
// nodeId is optional and is a query parameter
|
// nodeId is optional and is a query parameter
|
||||||
// if nodeId is not provided, the API will return all vertices
|
// if nodeId is not provided, the API will return all vertices
|
||||||
|
|
@ -971,7 +971,7 @@ export async function getVerticesOrder(
|
||||||
return await api.post(
|
return await api.post(
|
||||||
`${BASE_URL_API}build/${flowId}/vertices`,
|
`${BASE_URL_API}build/${flowId}/vertices`,
|
||||||
data,
|
data,
|
||||||
config,
|
config
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -979,7 +979,7 @@ export async function postBuildVertex(
|
||||||
flowId: string,
|
flowId: string,
|
||||||
vertexId: string,
|
vertexId: string,
|
||||||
input_value: string,
|
input_value: string,
|
||||||
files?: string[],
|
files?: string[]
|
||||||
): Promise<AxiosResponse<VertexBuildTypeAPI>> {
|
): Promise<AxiosResponse<VertexBuildTypeAPI>> {
|
||||||
// input_value is optional and is a query parameter
|
// input_value is optional and is a query parameter
|
||||||
let data = {};
|
let data = {};
|
||||||
|
|
@ -991,7 +991,7 @@ export async function postBuildVertex(
|
||||||
}
|
}
|
||||||
return await api.post(
|
return await api.post(
|
||||||
`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`,
|
`${BASE_URL_API}build/${flowId}/vertices/${vertexId}`,
|
||||||
data,
|
data
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1015,7 +1015,7 @@ export async function getFlowPool({
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function deleteFlowPool(
|
export async function deleteFlowPool(
|
||||||
flowId: string,
|
flowId: string
|
||||||
): Promise<AxiosResponse<any>> {
|
): Promise<AxiosResponse<any>> {
|
||||||
const config = {};
|
const config = {};
|
||||||
config["params"] = { flow_id: flowId };
|
config["params"] = { flow_id: flowId };
|
||||||
|
|
@ -1029,7 +1029,7 @@ export async function deleteFlowPool(
|
||||||
* @returns A promise that resolves to an array of AxiosResponse objects representing the delete responses.
|
* @returns A promise that resolves to an array of AxiosResponse objects representing the delete responses.
|
||||||
*/
|
*/
|
||||||
export async function multipleDeleteFlowsComponents(
|
export async function multipleDeleteFlowsComponents(
|
||||||
flowIds: string[],
|
flowIds: string[]
|
||||||
): Promise<AxiosResponse<any>[]> {
|
): Promise<AxiosResponse<any>[]> {
|
||||||
const batches: string[][] = [];
|
const batches: string[][] = [];
|
||||||
|
|
||||||
|
|
@ -1052,7 +1052,7 @@ export async function multipleDeleteFlowsComponents(
|
||||||
|
|
||||||
// Execute all delete requests
|
// Execute all delete requests
|
||||||
const responses: Promise<AxiosResponse<any>>[] = batches.map((batch) =>
|
const responses: Promise<AxiosResponse<any>>[] = batches.map((batch) =>
|
||||||
deleteBatch(batch),
|
deleteBatch(batch)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return the responses after all requests are completed
|
// Return the responses after all requests are completed
|
||||||
|
|
@ -1062,7 +1062,7 @@ export async function multipleDeleteFlowsComponents(
|
||||||
export async function getTransactionTable(
|
export async function getTransactionTable(
|
||||||
id: string,
|
id: string,
|
||||||
mode: "intersection" | "union",
|
mode: "intersection" | "union",
|
||||||
params = {},
|
params = {}
|
||||||
): Promise<{ rows: Array<object>; columns: Array<ColDef | ColGroupDef> }> {
|
): Promise<{ rows: Array<object>; columns: Array<ColDef | ColGroupDef> }> {
|
||||||
const config = {};
|
const config = {};
|
||||||
config["params"] = { flow_id: id };
|
config["params"] = { flow_id: id };
|
||||||
|
|
@ -1078,7 +1078,7 @@ export async function getMessagesTable(
|
||||||
mode: "intersection" | "union",
|
mode: "intersection" | "union",
|
||||||
id?: string,
|
id?: string,
|
||||||
excludedFields?: string[],
|
excludedFields?: string[],
|
||||||
params = {},
|
params = {}
|
||||||
): Promise<{ rows: Array<Message>; columns: Array<ColDef | ColGroupDef> }> {
|
): Promise<{ rows: Array<Message>; columns: Array<ColDef | ColGroupDef> }> {
|
||||||
const config = {};
|
const config = {};
|
||||||
if (id) {
|
if (id) {
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgAWS from "./AWS";
|
||||||
export const AWSIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const AWSIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgAWS ref={ref} {...props} />;
|
return <SvgAWS ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgAzLogo from "./AzLogo";
|
||||||
export const AzIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const AzIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgAzLogo ref={ref} {...props} />;
|
return <SvgAzLogo ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgAzure from "./Azure";
|
||||||
export const AzureIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const AzureIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgAzure ref={ref} {...props} />;
|
return <SvgAzure ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgBing from "./Bing";
|
||||||
export const BingIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const BingIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgBing ref={ref} {...props} />;
|
return <SvgBing ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgFacebookMessengerLogo2020 from "./FacebookMessengerLogo2020";
|
||||||
export const FBIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const FBIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgFacebookMessengerLogo2020 ref={ref} {...props} />;
|
return <SvgFacebookMessengerLogo2020 ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgGroqLogo from "./GroqLogo";
|
||||||
export const GroqIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const GroqIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgGroqLogo ref={ref} {...props} />;
|
return <SvgGroqLogo ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgIfixitSeeklogocom from "./IfixitSeeklogoCom";
|
||||||
export const IFixIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const IFixIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgIfixitSeeklogocom ref={ref} {...props} />;
|
return <SvgIfixitSeeklogocom ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgMetaIcon from "./MetaIcon";
|
||||||
export const MetaIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const MetaIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgMetaIcon ref={ref} {...props} />;
|
return <SvgMetaIcon ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import { SvgRedis } from "./Redis";
|
||||||
export const RedisIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const RedisIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgRedis ref={ref} {...props} />;
|
return <SvgRedis ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgSearxLogo from "./SearxLogo";
|
||||||
export const SearxIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const SearxIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgSearxLogo ref={ref} {...props} />;
|
return <SvgSearxLogo ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgShare from "./Share";
|
||||||
export const ShareIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const ShareIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgShare ref={ref} {...props} />;
|
return <SvgShare ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgSlackIcon from "./SlackIcon";
|
||||||
export const SlackIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const SlackIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgSlackIcon ref={ref} {...props} />;
|
return <SvgSlackIcon ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgStreamlit from "./SvgStreamlit";
|
||||||
export const Streamlit = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const Streamlit = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgStreamlit className="icon" ref={ref} {...props} />;
|
return <SvgStreamlit className="icon" ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -4,5 +4,5 @@ import SvgWord from "./Word";
|
||||||
export const WordIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
export const WordIcon = forwardRef<SVGSVGElement, React.PropsWithChildren<{}>>(
|
||||||
(props, ref) => {
|
(props, ref) => {
|
||||||
return <SvgWord ref={ref} {...props} />;
|
return <SvgWord ref={ref} {...props} />;
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -11,11 +11,11 @@ import "./style/applies.css";
|
||||||
import "./style/classes.css";
|
import "./style/classes.css";
|
||||||
|
|
||||||
const root = ReactDOM.createRoot(
|
const root = ReactDOM.createRoot(
|
||||||
document.getElementById("root") as HTMLElement,
|
document.getElementById("root") as HTMLElement
|
||||||
);
|
);
|
||||||
root.render(
|
root.render(
|
||||||
<ContextWrapper>
|
<ContextWrapper>
|
||||||
<App />
|
<App />
|
||||||
</ContextWrapper>,
|
</ContextWrapper>
|
||||||
);
|
);
|
||||||
reportWebVitals();
|
reportWebVitals();
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ const useFolderSubmit = (setOpen, folderToEdit) => {
|
||||||
getFoldersApi(true);
|
getFoldersApi(true);
|
||||||
setOpen(false);
|
setOpen(false);
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
addFolder(data).then(
|
addFolder(data).then(
|
||||||
|
|
@ -42,7 +42,7 @@ const useFolderSubmit = (setOpen, folderToEdit) => {
|
||||||
setErrorData({
|
setErrorData({
|
||||||
title: `Error creating folder.`,
|
title: `Error creating folder.`,
|
||||||
});
|
});
|
||||||
},
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export default function CsvSelect({ node, handleChangeSelect }): JSX.Element {
|
||||||
<SelectItem key={separator} value={separator}>
|
<SelectItem key={separator} value={separator}>
|
||||||
{separator}
|
{separator}
|
||||||
</SelectItem>
|
</SelectItem>
|
||||||
),
|
)
|
||||||
)}
|
)}
|
||||||
</SelectGroup>
|
</SelectGroup>
|
||||||
</SelectContent>
|
</SelectContent>
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ export default function IOFieldView({
|
||||||
.results.result ?? "";
|
.results.result ?? "";
|
||||||
|
|
||||||
console.log(
|
console.log(
|
||||||
(flowPool[node!.id] ?? [])[(flowPool[node!.id]?.length ?? 1) - 1]?.data,
|
(flowPool[node!.id] ?? [])[(flowPool[node!.id]?.length ?? 1) - 1]?.data
|
||||||
);
|
);
|
||||||
|
|
||||||
function handleOutputType() {
|
function handleOutputType() {
|
||||||
|
|
@ -257,7 +257,7 @@ export default function IOFieldView({
|
||||||
rows={
|
rows={
|
||||||
Array.isArray(flowPoolNode?.data?.artifacts)
|
Array.isArray(flowPoolNode?.data?.artifacts)
|
||||||
? flowPoolNode?.data?.artifacts?.map(
|
? flowPoolNode?.data?.artifacts?.map(
|
||||||
(artifact) => artifact.data,
|
(artifact) => artifact.data
|
||||||
) ?? []
|
) ?? []
|
||||||
: [flowPoolNode?.data?.artifacts]
|
: [flowPoolNode?.data?.artifacts]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue