fix: build

This commit is contained in:
Dhruwang
2025-11-24 17:00:05 +05:30
parent 3fa4df9d3f
commit 8acbbbe344
4 changed files with 12 additions and 10 deletions
@@ -1,6 +1,6 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import type { JSX } from "preact";
import { useCallback, useEffect, useMemo, useState } from "preact/hooks";
import { type JSXInternal } from "preact/src/jsx";
import { useTranslation } from "react-i18next";
import { type TJsFileUploadParams } from "@formbricks/types/js";
import { TAllowedFileExtension, type TUploadFileConfig, mimeTypes } from "@formbricks/types/storage";
@@ -285,14 +285,14 @@ export function FileInput({
}
};
const handleDragOver = (e: JSXInternal.TargetedDragEvent<HTMLLabelElement>) => {
const handleDragOver = (e: JSX.TargetedDragEvent<HTMLLabelElement>) => {
e.preventDefault();
e.stopPropagation();
// @ts-expect-error -- TS does not recognize dataTransfer
e.dataTransfer.dropEffect = "copy";
};
const handleDrop = async (e: JSXInternal.TargetedDragEvent<HTMLLabelElement>) => {
const handleDrop = async (e: JSX.TargetedDragEvent<HTMLLabelElement>) => {
e.preventDefault();
e.stopPropagation();
@@ -300,7 +300,7 @@ export function FileInput({
await handleFileSelection(e.dataTransfer.files);
};
const handleDeleteFile = (index: number, event: JSXInternal.TargetedMouseEvent<SVGSVGElement>) => {
const handleDeleteFile = (index: number, event: JSX.TargetedMouseEvent<SVGSVGElement>) => {
event.stopPropagation();
setSelectedFiles((prevFiles) => {
const newFiles = [...prevFiles];
@@ -94,7 +94,7 @@ export const Complete: Story = {
/**
* Progress bar with gradient indicator
*/
export const customStyling: Story = {
export const CustomStyling: Story = {
args: {
value: 70,
indicatorStyling: {
@@ -96,7 +96,9 @@ export const StackedCard = ({
return (
<div
ref={(el) => (cardRefs.current[dynamicQuestionIndex] = el)}
ref={(el) => {
cardRefs.current[dynamicQuestionIndex] = el;
}}
id={`questionCard-${dynamicQuestionIndex}`}
data-testid={`questionCard-${dynamicQuestionIndex}`}
key={dynamicQuestionIndex}
+4 -4
View File
@@ -27,15 +27,15 @@ describe("getUpdatedTtc", () => {
});
describe("useTtc", () => {
let mockSetTtc: ReturnType<typeof vi.fn>;
let mockSetStartTime: ReturnType<typeof vi.fn>;
let mockSetTtc: (ttc: Record<string, number>) => void;
let mockSetStartTime: (time: number) => void;
let currentTime = 0;
let initialProps: {
questionId: TSurveyQuestionId;
ttc: TResponseTtc;
setTtc: ReturnType<typeof vi.fn>;
setTtc: (ttc: Record<string, number>) => void;
startTime: number;
setStartTime: ReturnType<typeof vi.fn>;
setStartTime: (time: number) => void;
isCurrentQuestion: boolean;
};