diff --git a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/CTAQuestionForm.tsx b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/CTAQuestionForm.tsx index c1fc734283..202e680735 100644 --- a/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/CTAQuestionForm.tsx +++ b/apps/web/app/environments/[environmentId]/surveys/[surveyId]/edit/CTAQuestionForm.tsx @@ -37,12 +37,6 @@ export default function CTAQuestionForm({
{dismissed.label}
++ {Math.round(dismissed.percentage * 100)}% +
++ {dismissed.count} {dismissed.count === 1 ? "response" : "responses"} +
+{result.label}
++ {Math.round(result.percentage * 100)}% +
++ {result.count} {result.count === 1 ? "response" : "responses"} +
+{dismissed.label}
++ {Math.round(dismissed.percentage * 100)}% +
++ {dismissed.count} {dismissed.count === 1 ? "response" : "responses"} +
+Powered by{" "} - + Formbricks diff --git a/packages/types/questions.ts b/packages/types/questions.ts index 5085f9f8df..16019e51b8 100644 --- a/packages/types/questions.ts +++ b/packages/types/questions.ts @@ -3,7 +3,8 @@ export type Question = | MultipleChoiceSingleQuestion | MultipleChoiceMultiQuestion | NPSQuestion - | CTAQuestion; + | CTAQuestion + | RatingQuestion; export interface OpenTextQuestion { id: string; @@ -58,6 +59,19 @@ export interface CTAQuestion { dismissButtonLabel?: string; } +export interface RatingQuestion { + id: string; + type: "rating"; + headline: string; + subheader?: string; + required: boolean; + scale: "number" | "smiley" | "star"; + range: 5 | 3 | 4 | 7 | 10; + lowerLabel: string; + upperLabel: string; + buttonLabel?: string; +} + export interface Choice { id: string; label: string; diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 608124d43e..70b3760551 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -198,6 +198,9 @@ importers: '@radix-ui/react-collapsible': specifier: ^1.0.2 version: 1.0.2(react-dom@18.2.0)(react@18.2.0) + '@radix-ui/react-dropdown-menu': + specifier: ^2.0.4 + version: 2.0.4(@types/react@18.0.35)(react-dom@18.2.0)(react@18.2.0) '@types/node': specifier: 18.15.11 version: 18.15.11 @@ -4642,7 +4645,7 @@ packages: tailwindcss: '>=3.0.0 || >= 3.0.0-alpha.1' dependencies: mini-svg-data-uri: 1.4.4 - tailwindcss: 3.3.1(postcss@8.4.22) + tailwindcss: 3.3.1(postcss@8.4.21) dev: true /@tailwindcss/typography@0.5.9(tailwindcss@3.3.1): @@ -10196,7 +10199,7 @@ packages: resolution: {integrity: sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==} engines: {node: '>= 4.0'} os: [darwin] - deprecated: fsevents 1 will break on node v14+ and could be using insecure binaries. Upgrade to fsevents 2. + deprecated: The v1 package contains DANGEROUS / INSECURE binaries. Upgrade to safe fsevents v2 requiresBuild: true dependencies: bindings: 1.5.0