mirror of
https://github.com/formbricks/formbricks.git
synced 2026-04-19 19:21:15 -05:00
build fixes
This commit is contained in:
@@ -457,6 +457,7 @@ checksums:
|
||||
emails/response_finished_email_subject_with_email: 14798acfdaec4b2b2f33dc4a9f4f8ee5
|
||||
emails/schedule_your_meeting: 01683323bd7373560cd2cb2737dbaf06
|
||||
emails/select_a_date: 521e4a705800da06d091fde3e801ce02
|
||||
emails/skip: b7f28dfa2f58b80b149bb82b392d0291
|
||||
emails/survey_response_finished_email_congrats: 4cc39698d6a16f68cf7d9db902c5978e
|
||||
emails/survey_response_finished_email_dont_want_notifications: 5c6fbb5adc79ed133911918984616609
|
||||
emails/survey_response_finished_email_hey: 20c5157a424f7d49ceeb27e6fb13d194
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { TSurveyCTAElement, TSurveyElementTypeEnum } from "@formbricks/types/surveys/elements";
|
||||
import {
|
||||
TSurvey,
|
||||
TSurveyCTAQuestion,
|
||||
TSurveyCalQuestion,
|
||||
TSurveyConsentQuestion,
|
||||
TSurveyDateQuestion,
|
||||
@@ -173,20 +173,17 @@ export const mockNpsQuestion: TSurveyNPSQuestion = {
|
||||
isColorCodingEnabled: false,
|
||||
};
|
||||
|
||||
export const mockCtaQuestion: TSurveyCTAQuestion = {
|
||||
export const mockCtaQuestion: TSurveyCTAElement = {
|
||||
required: true,
|
||||
headline: {
|
||||
default: "You are one of our power users!",
|
||||
},
|
||||
buttonLabel: {
|
||||
ctaButtonLabel: {
|
||||
default: "Book interview",
|
||||
},
|
||||
buttonExternal: false,
|
||||
dismissButtonLabel: {
|
||||
default: "Skip",
|
||||
},
|
||||
buttonExternal: true,
|
||||
id: "gwn15urom4ffnhfimwbz3vgc",
|
||||
type: TSurveyQuestionTypeEnum.CTA,
|
||||
type: TSurveyElementTypeEnum.CTA,
|
||||
isDraft: true,
|
||||
};
|
||||
|
||||
@@ -445,15 +442,13 @@ export const mockLegacyNpsQuestion = {
|
||||
export const mockTranslatedCtaQuestion = {
|
||||
...mockCtaQuestion,
|
||||
headline: { default: "You are one of our power users!", de: "" },
|
||||
buttonLabel: { default: "Book interview", de: "" },
|
||||
dismissButtonLabel: { default: "Skip", de: "" },
|
||||
ctaButtonLabel: { default: "Book interview", de: "" },
|
||||
};
|
||||
|
||||
export const mockLegacyCtaQuestion = {
|
||||
...mockCtaQuestion,
|
||||
headline: "You are one of our power users!",
|
||||
buttonLabel: "Book interview",
|
||||
dismissButtonLabel: "Skip",
|
||||
ctaButtonLabel: "Book interview",
|
||||
};
|
||||
|
||||
export const mockTranslatedConsentQuestion = {
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} hat deine Umfrage {surveyName} abgeschlossen ✅",
|
||||
"schedule_your_meeting": "Termin planen",
|
||||
"select_a_date": "Datum auswählen",
|
||||
"skip": "Überspringen",
|
||||
"survey_response_finished_email_congrats": "Glückwunsch, Du hast eine neue Antwort auf deine Umfrage {surveyName} erhalten!",
|
||||
"survey_response_finished_email_dont_want_notifications": "Möchtest Du diese Benachrichtigungen nicht erhalten?",
|
||||
"survey_response_finished_email_hey": "Hey 👋",
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} just completed your {surveyName} survey ✅",
|
||||
"schedule_your_meeting": "Schedule your meeting",
|
||||
"select_a_date": "Select a date",
|
||||
"skip": "Skip",
|
||||
"survey_response_finished_email_congrats": "Congrats, you received a new response to your survey! Someone just completed your survey: {surveyName}",
|
||||
"survey_response_finished_email_dont_want_notifications": "Don't want to get these notifications?",
|
||||
"survey_response_finished_email_hey": "Hey \uD83D\uDC4B",
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} vient de compléter votre enquête {surveyName} ✅",
|
||||
"schedule_your_meeting": "Planifier votre rendez-vous",
|
||||
"select_a_date": "Sélectionner une date",
|
||||
"skip": "Ignorer",
|
||||
"survey_response_finished_email_congrats": "Félicitations, vous avez reçu une nouvelle réponse à votre enquête ! Quelqu'un vient de compléter votre enquête : {surveyName}",
|
||||
"survey_response_finished_email_dont_want_notifications": "Vous ne voulez pas recevoir ces notifications ?",
|
||||
"survey_response_finished_email_hey": "Salut 👋",
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} が {surveyName} フォームを完了しました ✅",
|
||||
"schedule_your_meeting": "ミーティングを予約",
|
||||
"select_a_date": "日付を選択",
|
||||
"skip": "スキップ",
|
||||
"survey_response_finished_email_congrats": "おめでとうございます、新しい回答が届きました!{surveyName} フォームへの回答が完了しました。",
|
||||
"survey_response_finished_email_dont_want_notifications": "これらの通知を受け取りたくないですか?",
|
||||
"survey_response_finished_email_hey": "こんにちは 👋",
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} acabou de completar sua pesquisa {surveyName} ✅",
|
||||
"schedule_your_meeting": "Agendar sua reunião",
|
||||
"select_a_date": "Selecione uma data",
|
||||
"skip": "Pular",
|
||||
"survey_response_finished_email_congrats": "Parabéns, você recebeu uma nova resposta na sua pesquisa! Alguém acabou de completar sua pesquisa: {surveyName}",
|
||||
"survey_response_finished_email_dont_want_notifications": "Não quer receber essas notificações?",
|
||||
"survey_response_finished_email_hey": "E aí 👋",
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} acabou de completar o seu inquérito {surveyName} ✅",
|
||||
"schedule_your_meeting": "Agende a sua reunião",
|
||||
"select_a_date": "Selecionar uma data",
|
||||
"skip": "Saltar",
|
||||
"survey_response_finished_email_congrats": "Parabéns, recebeu uma nova resposta ao seu inquérito! Alguém acabou de completar o seu inquérito: {surveyName}",
|
||||
"survey_response_finished_email_dont_want_notifications": "Não quer receber estas notificações?",
|
||||
"survey_response_finished_email_hey": "Olá 👋",
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} tocmai a completat sondajul {surveyName} ✅",
|
||||
"schedule_your_meeting": "Programați întâlnirea",
|
||||
"select_a_date": "Selectați o dată",
|
||||
"skip": "Omite",
|
||||
"survey_response_finished_email_congrats": "Felicitări, aţi primit un răspuns nou la sondaj! Cineva tocmai a completat sondajul dumneavoastră: {surveyName}",
|
||||
"survey_response_finished_email_dont_want_notifications": "Nu doriți să primiți aceste notificări?",
|
||||
"survey_response_finished_email_hey": "Hei 👋",
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} 刚刚完成了你的 {surveyName} 调查 ✅",
|
||||
"schedule_your_meeting": "安排你的会议",
|
||||
"select_a_date": "选择 日期",
|
||||
"skip": "跳过",
|
||||
"survey_response_finished_email_congrats": "恭喜,您收到了一份新的问卷回复!有人刚刚完成了您的问卷:{surveyName}",
|
||||
"survey_response_finished_email_dont_want_notifications": "不希望收到这些通知?",
|
||||
"survey_response_finished_email_hey": "嗨 👋",
|
||||
|
||||
@@ -486,6 +486,7 @@
|
||||
"response_finished_email_subject_with_email": "{personEmail} 剛剛完成了您的 {surveyName} 調查 ✅",
|
||||
"schedule_your_meeting": "安排你的會議",
|
||||
"select_a_date": "選擇日期",
|
||||
"skip": "略過",
|
||||
"survey_response_finished_email_congrats": "恭喜,您收到了新的問卷回應!有人剛完成您的問卷:'{'surveyName'}'",
|
||||
"survey_response_finished_email_dont_want_notifications": "不想收到這些通知?",
|
||||
"survey_response_finished_email_hey": "嗨 👋",
|
||||
|
||||
@@ -187,7 +187,7 @@ export async function PreviewEmailTemplate({
|
||||
<EmailButton
|
||||
className="rounded-custom inline-flex cursor-pointer appearance-none px-6 py-3 text-sm font-medium text-black"
|
||||
href={`${urlWithPrefilling}${firstQuestion.id}=dismissed`}>
|
||||
{getLocalizedValue(firstQuestion.dismissButtonLabel, defaultLanguageCode) || "Skip"}
|
||||
{t("emails.skip")}
|
||||
</EmailButton>
|
||||
)}
|
||||
<EmailButton
|
||||
|
||||
@@ -108,7 +108,6 @@ export const isValueIncomplete = (
|
||||
"buttonLabel",
|
||||
"placeholder",
|
||||
"backButtonLabel",
|
||||
"dismissButtonLabel",
|
||||
];
|
||||
|
||||
// If value is not provided, immediately return false as it cannot be incomplete.
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
TActionNumberVariableCalculateOperator,
|
||||
TActionTextVariableCalculateOperator,
|
||||
} from "@formbricks/types/surveys/logic";
|
||||
import { TActionVariableValueType, TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { TSurvey } from "@formbricks/types/surveys/types";
|
||||
import { getUpdatedActionBody } from "@/lib/surveyLogic/utils";
|
||||
import {
|
||||
getActionObjectiveOptions,
|
||||
@@ -218,7 +218,11 @@ export function LogicEditorActions({
|
||||
}}
|
||||
groupedOptions={getActionValueOptions(action.variableId, localSurvey, blockIdx, t)}
|
||||
onChangeValue={(val, option, fromInput) => {
|
||||
const fieldType = option?.meta?.type as TActionVariableValueType;
|
||||
const fieldType = option?.meta?.type as
|
||||
| "static"
|
||||
| "variable"
|
||||
| "hiddenField"
|
||||
| "element";
|
||||
|
||||
if (!fromInput && fieldType !== "static") {
|
||||
handleValuesChange(idx, {
|
||||
|
||||
@@ -121,8 +121,8 @@ export const validationRules = {
|
||||
return element.choices.length >= 2;
|
||||
},
|
||||
cta: (element: TSurveyCTAElement, languages: TSurveyLanguage[]) => {
|
||||
return !element.required && element.dismissButtonLabel
|
||||
? isLabelValidForAllLanguages(element.dismissButtonLabel, languages)
|
||||
return element.buttonExternal && element.ctaButtonLabel
|
||||
? isLabelValidForAllLanguages(element.ctaButtonLabel, languages)
|
||||
: true;
|
||||
},
|
||||
matrix: (element: TSurveyMatrixElement, languages: TSurveyLanguage[]) => {
|
||||
|
||||
@@ -283,10 +283,6 @@ export const ZActionObjective = z.enum(["calculate", "requireAnswer", "jumpToQue
|
||||
export type TDynamicLogicField = z.infer<typeof ZDynamicLogicField>;
|
||||
export type TActionObjective = z.infer<typeof ZActionObjective>;
|
||||
|
||||
// Actions
|
||||
export const ZActionVariableValueType = z.union([z.literal("static"), ZDynamicLogicField]);
|
||||
export type TActionVariableValueType = z.infer<typeof ZActionVariableValueType>;
|
||||
|
||||
const ZActionBase = z.object({
|
||||
id: ZId,
|
||||
objective: ZActionObjective,
|
||||
|
||||
Reference in New Issue
Block a user