@squaredr/fieldcraft-templates-free 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +80 -0
- package/dist/index.d.ts +80 -0
- package/dist/index.js +616 -0
- package/dist/index.mjs +574 -0
- package/package.json +57 -0
package/dist/index.d.mts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { FormEngineSchema } from '@squaredr/fieldcraft-core';
|
|
2
|
+
|
|
3
|
+
type TemplateCategory = "general" | "feedback" | "marketing" | "support";
|
|
4
|
+
type TemplateMeta = {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
category: TemplateCategory;
|
|
9
|
+
fieldCount: number;
|
|
10
|
+
sectionCount: number;
|
|
11
|
+
tags: string[];
|
|
12
|
+
};
|
|
13
|
+
type Template = {
|
|
14
|
+
meta: TemplateMeta;
|
|
15
|
+
schema: FormEngineSchema;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare const contactFormSchema: FormEngineSchema;
|
|
19
|
+
declare const contactFormMeta: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
category: "general";
|
|
24
|
+
fieldCount: number;
|
|
25
|
+
sectionCount: number;
|
|
26
|
+
tags: string[];
|
|
27
|
+
};
|
|
28
|
+
declare const contactForm: Template;
|
|
29
|
+
|
|
30
|
+
declare const feedbackSurveySchema: FormEngineSchema;
|
|
31
|
+
declare const feedbackSurveyMeta: {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
category: "feedback";
|
|
36
|
+
fieldCount: number;
|
|
37
|
+
sectionCount: number;
|
|
38
|
+
tags: string[];
|
|
39
|
+
};
|
|
40
|
+
declare const feedbackSurvey: Template;
|
|
41
|
+
|
|
42
|
+
declare const npsSurveySchema: FormEngineSchema;
|
|
43
|
+
declare const npsSurveyMeta: {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
category: "feedback";
|
|
48
|
+
fieldCount: number;
|
|
49
|
+
sectionCount: number;
|
|
50
|
+
tags: string[];
|
|
51
|
+
};
|
|
52
|
+
declare const npsSurvey: Template;
|
|
53
|
+
|
|
54
|
+
declare const newsletterSignupSchema: FormEngineSchema;
|
|
55
|
+
declare const newsletterSignupMeta: {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
description: string;
|
|
59
|
+
category: "marketing";
|
|
60
|
+
fieldCount: number;
|
|
61
|
+
sectionCount: number;
|
|
62
|
+
tags: string[];
|
|
63
|
+
};
|
|
64
|
+
declare const newsletterSignup: Template;
|
|
65
|
+
|
|
66
|
+
declare const bugReportSchema: FormEngineSchema;
|
|
67
|
+
declare const bugReportMeta: {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
category: "support";
|
|
72
|
+
fieldCount: number;
|
|
73
|
+
sectionCount: number;
|
|
74
|
+
tags: string[];
|
|
75
|
+
};
|
|
76
|
+
declare const bugReport: Template;
|
|
77
|
+
|
|
78
|
+
declare const allTemplates: Template[];
|
|
79
|
+
|
|
80
|
+
export { type Template, type TemplateCategory, type TemplateMeta, allTemplates, bugReport, bugReportMeta, bugReportSchema, contactForm, contactFormMeta, contactFormSchema, feedbackSurvey, feedbackSurveyMeta, feedbackSurveySchema, newsletterSignup, newsletterSignupMeta, newsletterSignupSchema, npsSurvey, npsSurveyMeta, npsSurveySchema };
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { FormEngineSchema } from '@squaredr/fieldcraft-core';
|
|
2
|
+
|
|
3
|
+
type TemplateCategory = "general" | "feedback" | "marketing" | "support";
|
|
4
|
+
type TemplateMeta = {
|
|
5
|
+
id: string;
|
|
6
|
+
name: string;
|
|
7
|
+
description: string;
|
|
8
|
+
category: TemplateCategory;
|
|
9
|
+
fieldCount: number;
|
|
10
|
+
sectionCount: number;
|
|
11
|
+
tags: string[];
|
|
12
|
+
};
|
|
13
|
+
type Template = {
|
|
14
|
+
meta: TemplateMeta;
|
|
15
|
+
schema: FormEngineSchema;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
declare const contactFormSchema: FormEngineSchema;
|
|
19
|
+
declare const contactFormMeta: {
|
|
20
|
+
id: string;
|
|
21
|
+
name: string;
|
|
22
|
+
description: string;
|
|
23
|
+
category: "general";
|
|
24
|
+
fieldCount: number;
|
|
25
|
+
sectionCount: number;
|
|
26
|
+
tags: string[];
|
|
27
|
+
};
|
|
28
|
+
declare const contactForm: Template;
|
|
29
|
+
|
|
30
|
+
declare const feedbackSurveySchema: FormEngineSchema;
|
|
31
|
+
declare const feedbackSurveyMeta: {
|
|
32
|
+
id: string;
|
|
33
|
+
name: string;
|
|
34
|
+
description: string;
|
|
35
|
+
category: "feedback";
|
|
36
|
+
fieldCount: number;
|
|
37
|
+
sectionCount: number;
|
|
38
|
+
tags: string[];
|
|
39
|
+
};
|
|
40
|
+
declare const feedbackSurvey: Template;
|
|
41
|
+
|
|
42
|
+
declare const npsSurveySchema: FormEngineSchema;
|
|
43
|
+
declare const npsSurveyMeta: {
|
|
44
|
+
id: string;
|
|
45
|
+
name: string;
|
|
46
|
+
description: string;
|
|
47
|
+
category: "feedback";
|
|
48
|
+
fieldCount: number;
|
|
49
|
+
sectionCount: number;
|
|
50
|
+
tags: string[];
|
|
51
|
+
};
|
|
52
|
+
declare const npsSurvey: Template;
|
|
53
|
+
|
|
54
|
+
declare const newsletterSignupSchema: FormEngineSchema;
|
|
55
|
+
declare const newsletterSignupMeta: {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
description: string;
|
|
59
|
+
category: "marketing";
|
|
60
|
+
fieldCount: number;
|
|
61
|
+
sectionCount: number;
|
|
62
|
+
tags: string[];
|
|
63
|
+
};
|
|
64
|
+
declare const newsletterSignup: Template;
|
|
65
|
+
|
|
66
|
+
declare const bugReportSchema: FormEngineSchema;
|
|
67
|
+
declare const bugReportMeta: {
|
|
68
|
+
id: string;
|
|
69
|
+
name: string;
|
|
70
|
+
description: string;
|
|
71
|
+
category: "support";
|
|
72
|
+
fieldCount: number;
|
|
73
|
+
sectionCount: number;
|
|
74
|
+
tags: string[];
|
|
75
|
+
};
|
|
76
|
+
declare const bugReport: Template;
|
|
77
|
+
|
|
78
|
+
declare const allTemplates: Template[];
|
|
79
|
+
|
|
80
|
+
export { type Template, type TemplateCategory, type TemplateMeta, allTemplates, bugReport, bugReportMeta, bugReportSchema, contactForm, contactFormMeta, contactFormSchema, feedbackSurvey, feedbackSurveyMeta, feedbackSurveySchema, newsletterSignup, newsletterSignupMeta, newsletterSignupSchema, npsSurvey, npsSurveyMeta, npsSurveySchema };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,616 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
|
|
20
|
+
// src/index.ts
|
|
21
|
+
var index_exports = {};
|
|
22
|
+
__export(index_exports, {
|
|
23
|
+
allTemplates: () => allTemplates,
|
|
24
|
+
bugReport: () => bugReport,
|
|
25
|
+
bugReportMeta: () => bugReportMeta,
|
|
26
|
+
bugReportSchema: () => bugReportSchema,
|
|
27
|
+
contactForm: () => contactForm,
|
|
28
|
+
contactFormMeta: () => contactFormMeta,
|
|
29
|
+
contactFormSchema: () => contactFormSchema,
|
|
30
|
+
feedbackSurvey: () => feedbackSurvey,
|
|
31
|
+
feedbackSurveyMeta: () => feedbackSurveyMeta,
|
|
32
|
+
feedbackSurveySchema: () => feedbackSurveySchema,
|
|
33
|
+
newsletterSignup: () => newsletterSignup,
|
|
34
|
+
newsletterSignupMeta: () => newsletterSignupMeta,
|
|
35
|
+
newsletterSignupSchema: () => newsletterSignupSchema,
|
|
36
|
+
npsSurvey: () => npsSurvey,
|
|
37
|
+
npsSurveyMeta: () => npsSurveyMeta,
|
|
38
|
+
npsSurveySchema: () => npsSurveySchema
|
|
39
|
+
});
|
|
40
|
+
module.exports = __toCommonJS(index_exports);
|
|
41
|
+
|
|
42
|
+
// src/contact-form.ts
|
|
43
|
+
var contactFormSchema = {
|
|
44
|
+
id: "contact-form",
|
|
45
|
+
version: "1.0.0",
|
|
46
|
+
title: "Contact Us",
|
|
47
|
+
description: "Get in touch with our team. We'll respond within one business day.",
|
|
48
|
+
settings: {
|
|
49
|
+
showProgress: true,
|
|
50
|
+
progressStyle: "steps"
|
|
51
|
+
},
|
|
52
|
+
submitAction: { type: "callback" },
|
|
53
|
+
sections: [
|
|
54
|
+
{
|
|
55
|
+
id: "personal-info",
|
|
56
|
+
title: "Your Details",
|
|
57
|
+
description: "Tell us who you are",
|
|
58
|
+
questions: [
|
|
59
|
+
{
|
|
60
|
+
id: "name",
|
|
61
|
+
type: "short_text",
|
|
62
|
+
label: "Full Name",
|
|
63
|
+
required: true,
|
|
64
|
+
placeholder: "Jane Doe",
|
|
65
|
+
validation: [
|
|
66
|
+
{ type: "minLength", value: 2, message: "Name is too short" },
|
|
67
|
+
{ type: "maxLength", value: 100 }
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
id: "email",
|
|
72
|
+
type: "email",
|
|
73
|
+
label: "Email Address",
|
|
74
|
+
required: true,
|
|
75
|
+
placeholder: "you@company.com",
|
|
76
|
+
helpText: "We'll never share your email with third parties"
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
id: "phone",
|
|
80
|
+
type: "phone",
|
|
81
|
+
label: "Phone Number",
|
|
82
|
+
required: false,
|
|
83
|
+
placeholder: "(555) 123-4567",
|
|
84
|
+
helpText: "Optional \u2014 only used if we need to reach you urgently"
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
id: "inquiry",
|
|
90
|
+
title: "Your Message",
|
|
91
|
+
description: "How can we help?",
|
|
92
|
+
questions: [
|
|
93
|
+
{
|
|
94
|
+
id: "subject",
|
|
95
|
+
type: "dropdown",
|
|
96
|
+
label: "Subject",
|
|
97
|
+
required: true,
|
|
98
|
+
options: [
|
|
99
|
+
{ label: "General Inquiry", value: "general" },
|
|
100
|
+
{ label: "Technical Support", value: "support" },
|
|
101
|
+
{ label: "Sales & Pricing", value: "sales" },
|
|
102
|
+
{ label: "Partnership", value: "partnership" },
|
|
103
|
+
{ label: "Other", value: "other" }
|
|
104
|
+
]
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
id: "message",
|
|
108
|
+
type: "long_text",
|
|
109
|
+
label: "Message",
|
|
110
|
+
required: true,
|
|
111
|
+
placeholder: "Describe your inquiry in detail...",
|
|
112
|
+
validation: [
|
|
113
|
+
{
|
|
114
|
+
type: "minLength",
|
|
115
|
+
value: 20,
|
|
116
|
+
message: "Please provide at least 20 characters"
|
|
117
|
+
},
|
|
118
|
+
{ type: "maxLength", value: 2e3 }
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
]
|
|
124
|
+
};
|
|
125
|
+
var contactFormMeta = {
|
|
126
|
+
id: "contact-form",
|
|
127
|
+
name: "Contact Form",
|
|
128
|
+
description: "A two-step contact form with personal details and inquiry fields. Includes name, email, phone, subject dropdown, and message.",
|
|
129
|
+
category: "general",
|
|
130
|
+
fieldCount: 5,
|
|
131
|
+
sectionCount: 2,
|
|
132
|
+
tags: ["contact", "support", "general"]
|
|
133
|
+
};
|
|
134
|
+
var contactForm = {
|
|
135
|
+
meta: contactFormMeta,
|
|
136
|
+
schema: contactFormSchema
|
|
137
|
+
};
|
|
138
|
+
|
|
139
|
+
// src/feedback-survey.ts
|
|
140
|
+
var feedbackSurveySchema = {
|
|
141
|
+
id: "feedback-survey",
|
|
142
|
+
version: "1.0.0",
|
|
143
|
+
title: "Customer Feedback Survey",
|
|
144
|
+
description: "Help us improve by sharing your experience. Takes about 3 minutes.",
|
|
145
|
+
settings: {
|
|
146
|
+
showProgress: true,
|
|
147
|
+
progressStyle: "percentage",
|
|
148
|
+
navigation: {
|
|
149
|
+
showBack: true,
|
|
150
|
+
allowSkip: false
|
|
151
|
+
}
|
|
152
|
+
},
|
|
153
|
+
submitAction: { type: "callback" },
|
|
154
|
+
sections: [
|
|
155
|
+
{
|
|
156
|
+
id: "satisfaction",
|
|
157
|
+
title: "Overall Satisfaction",
|
|
158
|
+
description: "Rate your overall experience with our product",
|
|
159
|
+
questions: [
|
|
160
|
+
{
|
|
161
|
+
id: "nps_score",
|
|
162
|
+
type: "nps",
|
|
163
|
+
label: "How likely are you to recommend us to a friend or colleague?",
|
|
164
|
+
required: true
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
id: "overall_rating",
|
|
168
|
+
type: "rating",
|
|
169
|
+
label: "Overall satisfaction with our product",
|
|
170
|
+
required: true
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
id: "nps_reason",
|
|
174
|
+
type: "long_text",
|
|
175
|
+
label: "What's the main reason for your score?",
|
|
176
|
+
required: false,
|
|
177
|
+
placeholder: "Tell us what influenced your rating...",
|
|
178
|
+
validation: [{ type: "maxLength", value: 500 }]
|
|
179
|
+
}
|
|
180
|
+
]
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
id: "specifics",
|
|
184
|
+
title: "Product Experience",
|
|
185
|
+
description: "Tell us about specific aspects of the product",
|
|
186
|
+
questions: [
|
|
187
|
+
{
|
|
188
|
+
id: "ease_of_use",
|
|
189
|
+
type: "likert",
|
|
190
|
+
label: "The product is easy to use",
|
|
191
|
+
required: true
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: "reliability",
|
|
195
|
+
type: "likert",
|
|
196
|
+
label: "The product is reliable and stable",
|
|
197
|
+
required: true
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: "value_for_money",
|
|
201
|
+
type: "likert",
|
|
202
|
+
label: "The product provides good value for money",
|
|
203
|
+
required: true
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
id: "features_used",
|
|
207
|
+
type: "multi_select",
|
|
208
|
+
label: "Which features do you use most frequently?",
|
|
209
|
+
required: false,
|
|
210
|
+
options: [
|
|
211
|
+
{ label: "Dashboard", value: "dashboard" },
|
|
212
|
+
{ label: "Analytics & Reports", value: "analytics" },
|
|
213
|
+
{ label: "Integrations", value: "integrations" },
|
|
214
|
+
{ label: "API", value: "api" },
|
|
215
|
+
{ label: "Mobile App", value: "mobile" },
|
|
216
|
+
{ label: "Automation", value: "automation" }
|
|
217
|
+
]
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
id: "missing_feature",
|
|
221
|
+
type: "single_select",
|
|
222
|
+
label: "What would you most like us to add?",
|
|
223
|
+
required: false,
|
|
224
|
+
options: [
|
|
225
|
+
{ label: "Better reporting", value: "reporting" },
|
|
226
|
+
{ label: "More integrations", value: "integrations" },
|
|
227
|
+
{ label: "Improved performance", value: "performance" },
|
|
228
|
+
{ label: "Better documentation", value: "docs" },
|
|
229
|
+
{ label: "Lower pricing", value: "pricing" },
|
|
230
|
+
{ label: "Nothing \u2014 it's great", value: "none" }
|
|
231
|
+
]
|
|
232
|
+
}
|
|
233
|
+
]
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
id: "follow-up",
|
|
237
|
+
title: "Final Thoughts",
|
|
238
|
+
description: "Anything else you'd like to share?",
|
|
239
|
+
questions: [
|
|
240
|
+
{
|
|
241
|
+
id: "improvement",
|
|
242
|
+
type: "long_text",
|
|
243
|
+
label: "If you could change one thing about our product, what would it be?",
|
|
244
|
+
required: false,
|
|
245
|
+
placeholder: "Your suggestion...",
|
|
246
|
+
validation: [{ type: "maxLength", value: 1e3 }]
|
|
247
|
+
},
|
|
248
|
+
{
|
|
249
|
+
id: "can_contact",
|
|
250
|
+
type: "boolean",
|
|
251
|
+
label: "Can we follow up with you about your feedback?",
|
|
252
|
+
required: false
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
id: "contact_email",
|
|
256
|
+
type: "email",
|
|
257
|
+
label: "Your email address",
|
|
258
|
+
required: true,
|
|
259
|
+
placeholder: "you@company.com",
|
|
260
|
+
helpText: "We'll only use this to follow up on your feedback",
|
|
261
|
+
showIf: {
|
|
262
|
+
field: "can_contact",
|
|
263
|
+
operator: "eq",
|
|
264
|
+
value: true
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
{
|
|
268
|
+
id: "subscribe",
|
|
269
|
+
type: "boolean",
|
|
270
|
+
label: "Keep me updated on product improvements",
|
|
271
|
+
required: false,
|
|
272
|
+
showIf: {
|
|
273
|
+
field: "can_contact",
|
|
274
|
+
operator: "eq",
|
|
275
|
+
value: true
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
]
|
|
279
|
+
}
|
|
280
|
+
]
|
|
281
|
+
};
|
|
282
|
+
var feedbackSurveyMeta = {
|
|
283
|
+
id: "feedback-survey",
|
|
284
|
+
name: "Feedback Survey",
|
|
285
|
+
description: "A comprehensive customer feedback survey with NPS, ratings, Likert scales, feature usage tracking, and conditional follow-up. Three sections covering satisfaction, specifics, and open-ended feedback.",
|
|
286
|
+
category: "feedback",
|
|
287
|
+
fieldCount: 12,
|
|
288
|
+
sectionCount: 3,
|
|
289
|
+
tags: ["feedback", "survey", "nps", "rating", "likert"]
|
|
290
|
+
};
|
|
291
|
+
var feedbackSurvey = {
|
|
292
|
+
meta: feedbackSurveyMeta,
|
|
293
|
+
schema: feedbackSurveySchema
|
|
294
|
+
};
|
|
295
|
+
|
|
296
|
+
// src/nps-survey.ts
|
|
297
|
+
var npsSurveySchema = {
|
|
298
|
+
id: "nps-survey",
|
|
299
|
+
version: "1.0.0",
|
|
300
|
+
title: "Net Promoter Score Survey",
|
|
301
|
+
description: "Quick NPS survey with smart follow-up questions based on score.",
|
|
302
|
+
settings: {
|
|
303
|
+
showProgress: true,
|
|
304
|
+
progressStyle: "steps"
|
|
305
|
+
},
|
|
306
|
+
submitAction: { type: "callback" },
|
|
307
|
+
sections: [
|
|
308
|
+
{
|
|
309
|
+
id: "score",
|
|
310
|
+
title: "Your Rating",
|
|
311
|
+
description: "One quick question to start",
|
|
312
|
+
questions: [
|
|
313
|
+
{
|
|
314
|
+
id: "nps_score",
|
|
315
|
+
type: "nps",
|
|
316
|
+
label: "How likely are you to recommend us to a friend or colleague?",
|
|
317
|
+
required: true
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
id: "detractor_reason",
|
|
321
|
+
type: "single_select",
|
|
322
|
+
label: "We're sorry to hear that. What's the biggest issue?",
|
|
323
|
+
required: true,
|
|
324
|
+
showIf: {
|
|
325
|
+
field: "nps_score",
|
|
326
|
+
operator: "lte",
|
|
327
|
+
value: 6
|
|
328
|
+
},
|
|
329
|
+
options: [
|
|
330
|
+
{ label: "Product quality", value: "quality" },
|
|
331
|
+
{ label: "Customer support", value: "support" },
|
|
332
|
+
{ label: "Pricing", value: "pricing" },
|
|
333
|
+
{ label: "Missing features", value: "features" },
|
|
334
|
+
{ label: "Bugs / reliability", value: "bugs" },
|
|
335
|
+
{ label: "Other", value: "other" }
|
|
336
|
+
]
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
id: "promoter_reason",
|
|
340
|
+
type: "single_select",
|
|
341
|
+
label: "Awesome! What do you love most?",
|
|
342
|
+
required: true,
|
|
343
|
+
showIf: {
|
|
344
|
+
field: "nps_score",
|
|
345
|
+
operator: "gte",
|
|
346
|
+
value: 9
|
|
347
|
+
},
|
|
348
|
+
options: [
|
|
349
|
+
{ label: "Ease of use", value: "ease" },
|
|
350
|
+
{ label: "Features", value: "features" },
|
|
351
|
+
{ label: "Performance", value: "performance" },
|
|
352
|
+
{ label: "Customer support", value: "support" },
|
|
353
|
+
{ label: "Value for money", value: "value" },
|
|
354
|
+
{ label: "Other", value: "other" }
|
|
355
|
+
]
|
|
356
|
+
}
|
|
357
|
+
]
|
|
358
|
+
},
|
|
359
|
+
{
|
|
360
|
+
id: "details",
|
|
361
|
+
title: "Tell Us More",
|
|
362
|
+
description: "Optional \u2014 help us understand your experience better",
|
|
363
|
+
questions: [
|
|
364
|
+
{
|
|
365
|
+
id: "comment",
|
|
366
|
+
type: "long_text",
|
|
367
|
+
label: "Anything else you'd like to share?",
|
|
368
|
+
required: false,
|
|
369
|
+
placeholder: "Your thoughts...",
|
|
370
|
+
validation: [{ type: "maxLength", value: 500 }]
|
|
371
|
+
},
|
|
372
|
+
{
|
|
373
|
+
id: "email",
|
|
374
|
+
type: "email",
|
|
375
|
+
label: "Email (if you'd like us to follow up)",
|
|
376
|
+
required: false,
|
|
377
|
+
placeholder: "you@company.com"
|
|
378
|
+
}
|
|
379
|
+
]
|
|
380
|
+
}
|
|
381
|
+
]
|
|
382
|
+
};
|
|
383
|
+
var npsSurveyMeta = {
|
|
384
|
+
id: "nps-survey",
|
|
385
|
+
name: "NPS Survey",
|
|
386
|
+
description: "A focused Net Promoter Score survey with conditional follow-up questions. Detractors see different questions than promoters, with smart branching logic.",
|
|
387
|
+
category: "feedback",
|
|
388
|
+
fieldCount: 5,
|
|
389
|
+
sectionCount: 2,
|
|
390
|
+
tags: ["nps", "survey", "conditional-logic", "feedback"]
|
|
391
|
+
};
|
|
392
|
+
var npsSurvey = {
|
|
393
|
+
meta: npsSurveyMeta,
|
|
394
|
+
schema: npsSurveySchema
|
|
395
|
+
};
|
|
396
|
+
|
|
397
|
+
// src/newsletter-signup.ts
|
|
398
|
+
var newsletterSignupSchema = {
|
|
399
|
+
id: "newsletter-signup",
|
|
400
|
+
version: "1.0.0",
|
|
401
|
+
title: "Newsletter Signup",
|
|
402
|
+
description: "Subscribe to our newsletter and stay in the loop.",
|
|
403
|
+
settings: {
|
|
404
|
+
showProgress: false
|
|
405
|
+
},
|
|
406
|
+
submitAction: { type: "callback" },
|
|
407
|
+
sections: [
|
|
408
|
+
{
|
|
409
|
+
id: "subscribe",
|
|
410
|
+
title: "Stay Updated",
|
|
411
|
+
description: "Get the latest news, tips, and product updates delivered to your inbox",
|
|
412
|
+
questions: [
|
|
413
|
+
{
|
|
414
|
+
id: "email",
|
|
415
|
+
type: "email",
|
|
416
|
+
label: "Email Address",
|
|
417
|
+
required: true,
|
|
418
|
+
placeholder: "you@company.com"
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
id: "first_name",
|
|
422
|
+
type: "short_text",
|
|
423
|
+
label: "First Name",
|
|
424
|
+
required: false,
|
|
425
|
+
placeholder: "Jane",
|
|
426
|
+
validation: [{ type: "maxLength", value: 50 }]
|
|
427
|
+
},
|
|
428
|
+
{
|
|
429
|
+
id: "interests",
|
|
430
|
+
type: "multi_select",
|
|
431
|
+
label: "What topics interest you?",
|
|
432
|
+
required: false,
|
|
433
|
+
helpText: "Select all that apply \u2014 helps us send relevant content",
|
|
434
|
+
options: [
|
|
435
|
+
{ label: "Product Updates", value: "product" },
|
|
436
|
+
{ label: "Engineering Blog", value: "engineering" },
|
|
437
|
+
{ label: "Tutorials & Guides", value: "tutorials" },
|
|
438
|
+
{ label: "Industry News", value: "industry" },
|
|
439
|
+
{ label: "Case Studies", value: "case-studies" }
|
|
440
|
+
]
|
|
441
|
+
}
|
|
442
|
+
]
|
|
443
|
+
}
|
|
444
|
+
]
|
|
445
|
+
};
|
|
446
|
+
var newsletterSignupMeta = {
|
|
447
|
+
id: "newsletter-signup",
|
|
448
|
+
name: "Newsletter Signup",
|
|
449
|
+
description: "A minimal newsletter subscription form with email, optional name, and topic interest selection. Single section, no progress bar \u2014 designed for embedding.",
|
|
450
|
+
category: "marketing",
|
|
451
|
+
fieldCount: 3,
|
|
452
|
+
sectionCount: 1,
|
|
453
|
+
tags: ["newsletter", "signup", "marketing", "email"]
|
|
454
|
+
};
|
|
455
|
+
var newsletterSignup = {
|
|
456
|
+
meta: newsletterSignupMeta,
|
|
457
|
+
schema: newsletterSignupSchema
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
// src/bug-report.ts
|
|
461
|
+
var bugReportSchema = {
|
|
462
|
+
id: "bug-report",
|
|
463
|
+
version: "1.0.0",
|
|
464
|
+
title: "Bug Report",
|
|
465
|
+
description: "Report a bug so we can fix it. The more detail, the faster we can help.",
|
|
466
|
+
settings: {
|
|
467
|
+
showProgress: true,
|
|
468
|
+
progressStyle: "steps",
|
|
469
|
+
navigation: {
|
|
470
|
+
showBack: true
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
submitAction: { type: "callback" },
|
|
474
|
+
sections: [
|
|
475
|
+
{
|
|
476
|
+
id: "reporter",
|
|
477
|
+
title: "Your Details",
|
|
478
|
+
description: "So we can follow up if we need more info",
|
|
479
|
+
questions: [
|
|
480
|
+
{
|
|
481
|
+
id: "name",
|
|
482
|
+
type: "short_text",
|
|
483
|
+
label: "Name",
|
|
484
|
+
required: true,
|
|
485
|
+
placeholder: "Jane Doe",
|
|
486
|
+
validation: [{ type: "maxLength", value: 100 }]
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
id: "email",
|
|
490
|
+
type: "email",
|
|
491
|
+
label: "Email",
|
|
492
|
+
required: true,
|
|
493
|
+
placeholder: "you@company.com"
|
|
494
|
+
}
|
|
495
|
+
]
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
id: "bug-details",
|
|
499
|
+
title: "Bug Details",
|
|
500
|
+
description: "Describe what went wrong",
|
|
501
|
+
questions: [
|
|
502
|
+
{
|
|
503
|
+
id: "title",
|
|
504
|
+
type: "short_text",
|
|
505
|
+
label: "Bug Title",
|
|
506
|
+
required: true,
|
|
507
|
+
placeholder: "Brief description of the issue",
|
|
508
|
+
validation: [
|
|
509
|
+
{ type: "minLength", value: 5, message: "Please be more specific" },
|
|
510
|
+
{ type: "maxLength", value: 200 }
|
|
511
|
+
]
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
id: "severity",
|
|
515
|
+
type: "dropdown",
|
|
516
|
+
label: "Severity",
|
|
517
|
+
required: true,
|
|
518
|
+
options: [
|
|
519
|
+
{ label: "Critical \u2014 app is unusable", value: "critical" },
|
|
520
|
+
{ label: "High \u2014 major feature broken", value: "high" },
|
|
521
|
+
{ label: "Medium \u2014 feature works but incorrectly", value: "medium" },
|
|
522
|
+
{ label: "Low \u2014 cosmetic or minor issue", value: "low" }
|
|
523
|
+
]
|
|
524
|
+
},
|
|
525
|
+
{
|
|
526
|
+
id: "steps_to_reproduce",
|
|
527
|
+
type: "long_text",
|
|
528
|
+
label: "Steps to Reproduce",
|
|
529
|
+
required: true,
|
|
530
|
+
placeholder: "1. Go to...\n2. Click on...\n3. Observe that...",
|
|
531
|
+
helpText: "Step-by-step instructions to reproduce the bug",
|
|
532
|
+
validation: [
|
|
533
|
+
{
|
|
534
|
+
type: "minLength",
|
|
535
|
+
value: 20,
|
|
536
|
+
message: "Please provide detailed steps"
|
|
537
|
+
},
|
|
538
|
+
{ type: "maxLength", value: 3e3 }
|
|
539
|
+
]
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
id: "expected_behavior",
|
|
543
|
+
type: "long_text",
|
|
544
|
+
label: "Expected Behavior",
|
|
545
|
+
required: true,
|
|
546
|
+
placeholder: "What should have happened...",
|
|
547
|
+
validation: [{ type: "maxLength", value: 1e3 }]
|
|
548
|
+
},
|
|
549
|
+
{
|
|
550
|
+
id: "browser_os",
|
|
551
|
+
type: "single_select",
|
|
552
|
+
label: "Browser / Environment",
|
|
553
|
+
required: false,
|
|
554
|
+
options: [
|
|
555
|
+
{ label: "Chrome", value: "chrome" },
|
|
556
|
+
{ label: "Firefox", value: "firefox" },
|
|
557
|
+
{ label: "Safari", value: "safari" },
|
|
558
|
+
{ label: "Edge", value: "edge" },
|
|
559
|
+
{ label: "Mobile (iOS)", value: "ios" },
|
|
560
|
+
{ label: "Mobile (Android)", value: "android" },
|
|
561
|
+
{ label: "Other", value: "other" }
|
|
562
|
+
]
|
|
563
|
+
},
|
|
564
|
+
{
|
|
565
|
+
id: "screenshot_url",
|
|
566
|
+
type: "url",
|
|
567
|
+
label: "Screenshot / Recording URL",
|
|
568
|
+
required: false,
|
|
569
|
+
placeholder: "https://...",
|
|
570
|
+
helpText: "Link to a screenshot or screen recording (Loom, CloudApp, etc.)"
|
|
571
|
+
}
|
|
572
|
+
]
|
|
573
|
+
}
|
|
574
|
+
]
|
|
575
|
+
};
|
|
576
|
+
var bugReportMeta = {
|
|
577
|
+
id: "bug-report",
|
|
578
|
+
name: "Bug Report",
|
|
579
|
+
description: "A structured bug report form with reporter details, severity classification, reproduction steps, expected behavior, environment selection, and screenshot URL. Two sections with step-based progress.",
|
|
580
|
+
category: "support",
|
|
581
|
+
fieldCount: 8,
|
|
582
|
+
sectionCount: 2,
|
|
583
|
+
tags: ["bug", "report", "support", "issue-tracking"]
|
|
584
|
+
};
|
|
585
|
+
var bugReport = {
|
|
586
|
+
meta: bugReportMeta,
|
|
587
|
+
schema: bugReportSchema
|
|
588
|
+
};
|
|
589
|
+
|
|
590
|
+
// src/index.ts
|
|
591
|
+
var allTemplates = [
|
|
592
|
+
contactForm,
|
|
593
|
+
feedbackSurvey,
|
|
594
|
+
npsSurvey,
|
|
595
|
+
newsletterSignup,
|
|
596
|
+
bugReport
|
|
597
|
+
];
|
|
598
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
599
|
+
0 && (module.exports = {
|
|
600
|
+
allTemplates,
|
|
601
|
+
bugReport,
|
|
602
|
+
bugReportMeta,
|
|
603
|
+
bugReportSchema,
|
|
604
|
+
contactForm,
|
|
605
|
+
contactFormMeta,
|
|
606
|
+
contactFormSchema,
|
|
607
|
+
feedbackSurvey,
|
|
608
|
+
feedbackSurveyMeta,
|
|
609
|
+
feedbackSurveySchema,
|
|
610
|
+
newsletterSignup,
|
|
611
|
+
newsletterSignupMeta,
|
|
612
|
+
newsletterSignupSchema,
|
|
613
|
+
npsSurvey,
|
|
614
|
+
npsSurveyMeta,
|
|
615
|
+
npsSurveySchema
|
|
616
|
+
});
|
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,574 @@
|
|
|
1
|
+
// src/contact-form.ts
|
|
2
|
+
var contactFormSchema = {
|
|
3
|
+
id: "contact-form",
|
|
4
|
+
version: "1.0.0",
|
|
5
|
+
title: "Contact Us",
|
|
6
|
+
description: "Get in touch with our team. We'll respond within one business day.",
|
|
7
|
+
settings: {
|
|
8
|
+
showProgress: true,
|
|
9
|
+
progressStyle: "steps"
|
|
10
|
+
},
|
|
11
|
+
submitAction: { type: "callback" },
|
|
12
|
+
sections: [
|
|
13
|
+
{
|
|
14
|
+
id: "personal-info",
|
|
15
|
+
title: "Your Details",
|
|
16
|
+
description: "Tell us who you are",
|
|
17
|
+
questions: [
|
|
18
|
+
{
|
|
19
|
+
id: "name",
|
|
20
|
+
type: "short_text",
|
|
21
|
+
label: "Full Name",
|
|
22
|
+
required: true,
|
|
23
|
+
placeholder: "Jane Doe",
|
|
24
|
+
validation: [
|
|
25
|
+
{ type: "minLength", value: 2, message: "Name is too short" },
|
|
26
|
+
{ type: "maxLength", value: 100 }
|
|
27
|
+
]
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
id: "email",
|
|
31
|
+
type: "email",
|
|
32
|
+
label: "Email Address",
|
|
33
|
+
required: true,
|
|
34
|
+
placeholder: "you@company.com",
|
|
35
|
+
helpText: "We'll never share your email with third parties"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
id: "phone",
|
|
39
|
+
type: "phone",
|
|
40
|
+
label: "Phone Number",
|
|
41
|
+
required: false,
|
|
42
|
+
placeholder: "(555) 123-4567",
|
|
43
|
+
helpText: "Optional \u2014 only used if we need to reach you urgently"
|
|
44
|
+
}
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
id: "inquiry",
|
|
49
|
+
title: "Your Message",
|
|
50
|
+
description: "How can we help?",
|
|
51
|
+
questions: [
|
|
52
|
+
{
|
|
53
|
+
id: "subject",
|
|
54
|
+
type: "dropdown",
|
|
55
|
+
label: "Subject",
|
|
56
|
+
required: true,
|
|
57
|
+
options: [
|
|
58
|
+
{ label: "General Inquiry", value: "general" },
|
|
59
|
+
{ label: "Technical Support", value: "support" },
|
|
60
|
+
{ label: "Sales & Pricing", value: "sales" },
|
|
61
|
+
{ label: "Partnership", value: "partnership" },
|
|
62
|
+
{ label: "Other", value: "other" }
|
|
63
|
+
]
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
id: "message",
|
|
67
|
+
type: "long_text",
|
|
68
|
+
label: "Message",
|
|
69
|
+
required: true,
|
|
70
|
+
placeholder: "Describe your inquiry in detail...",
|
|
71
|
+
validation: [
|
|
72
|
+
{
|
|
73
|
+
type: "minLength",
|
|
74
|
+
value: 20,
|
|
75
|
+
message: "Please provide at least 20 characters"
|
|
76
|
+
},
|
|
77
|
+
{ type: "maxLength", value: 2e3 }
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
}
|
|
82
|
+
]
|
|
83
|
+
};
|
|
84
|
+
var contactFormMeta = {
|
|
85
|
+
id: "contact-form",
|
|
86
|
+
name: "Contact Form",
|
|
87
|
+
description: "A two-step contact form with personal details and inquiry fields. Includes name, email, phone, subject dropdown, and message.",
|
|
88
|
+
category: "general",
|
|
89
|
+
fieldCount: 5,
|
|
90
|
+
sectionCount: 2,
|
|
91
|
+
tags: ["contact", "support", "general"]
|
|
92
|
+
};
|
|
93
|
+
var contactForm = {
|
|
94
|
+
meta: contactFormMeta,
|
|
95
|
+
schema: contactFormSchema
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
// src/feedback-survey.ts
|
|
99
|
+
var feedbackSurveySchema = {
|
|
100
|
+
id: "feedback-survey",
|
|
101
|
+
version: "1.0.0",
|
|
102
|
+
title: "Customer Feedback Survey",
|
|
103
|
+
description: "Help us improve by sharing your experience. Takes about 3 minutes.",
|
|
104
|
+
settings: {
|
|
105
|
+
showProgress: true,
|
|
106
|
+
progressStyle: "percentage",
|
|
107
|
+
navigation: {
|
|
108
|
+
showBack: true,
|
|
109
|
+
allowSkip: false
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
submitAction: { type: "callback" },
|
|
113
|
+
sections: [
|
|
114
|
+
{
|
|
115
|
+
id: "satisfaction",
|
|
116
|
+
title: "Overall Satisfaction",
|
|
117
|
+
description: "Rate your overall experience with our product",
|
|
118
|
+
questions: [
|
|
119
|
+
{
|
|
120
|
+
id: "nps_score",
|
|
121
|
+
type: "nps",
|
|
122
|
+
label: "How likely are you to recommend us to a friend or colleague?",
|
|
123
|
+
required: true
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
id: "overall_rating",
|
|
127
|
+
type: "rating",
|
|
128
|
+
label: "Overall satisfaction with our product",
|
|
129
|
+
required: true
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
id: "nps_reason",
|
|
133
|
+
type: "long_text",
|
|
134
|
+
label: "What's the main reason for your score?",
|
|
135
|
+
required: false,
|
|
136
|
+
placeholder: "Tell us what influenced your rating...",
|
|
137
|
+
validation: [{ type: "maxLength", value: 500 }]
|
|
138
|
+
}
|
|
139
|
+
]
|
|
140
|
+
},
|
|
141
|
+
{
|
|
142
|
+
id: "specifics",
|
|
143
|
+
title: "Product Experience",
|
|
144
|
+
description: "Tell us about specific aspects of the product",
|
|
145
|
+
questions: [
|
|
146
|
+
{
|
|
147
|
+
id: "ease_of_use",
|
|
148
|
+
type: "likert",
|
|
149
|
+
label: "The product is easy to use",
|
|
150
|
+
required: true
|
|
151
|
+
},
|
|
152
|
+
{
|
|
153
|
+
id: "reliability",
|
|
154
|
+
type: "likert",
|
|
155
|
+
label: "The product is reliable and stable",
|
|
156
|
+
required: true
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
id: "value_for_money",
|
|
160
|
+
type: "likert",
|
|
161
|
+
label: "The product provides good value for money",
|
|
162
|
+
required: true
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: "features_used",
|
|
166
|
+
type: "multi_select",
|
|
167
|
+
label: "Which features do you use most frequently?",
|
|
168
|
+
required: false,
|
|
169
|
+
options: [
|
|
170
|
+
{ label: "Dashboard", value: "dashboard" },
|
|
171
|
+
{ label: "Analytics & Reports", value: "analytics" },
|
|
172
|
+
{ label: "Integrations", value: "integrations" },
|
|
173
|
+
{ label: "API", value: "api" },
|
|
174
|
+
{ label: "Mobile App", value: "mobile" },
|
|
175
|
+
{ label: "Automation", value: "automation" }
|
|
176
|
+
]
|
|
177
|
+
},
|
|
178
|
+
{
|
|
179
|
+
id: "missing_feature",
|
|
180
|
+
type: "single_select",
|
|
181
|
+
label: "What would you most like us to add?",
|
|
182
|
+
required: false,
|
|
183
|
+
options: [
|
|
184
|
+
{ label: "Better reporting", value: "reporting" },
|
|
185
|
+
{ label: "More integrations", value: "integrations" },
|
|
186
|
+
{ label: "Improved performance", value: "performance" },
|
|
187
|
+
{ label: "Better documentation", value: "docs" },
|
|
188
|
+
{ label: "Lower pricing", value: "pricing" },
|
|
189
|
+
{ label: "Nothing \u2014 it's great", value: "none" }
|
|
190
|
+
]
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
id: "follow-up",
|
|
196
|
+
title: "Final Thoughts",
|
|
197
|
+
description: "Anything else you'd like to share?",
|
|
198
|
+
questions: [
|
|
199
|
+
{
|
|
200
|
+
id: "improvement",
|
|
201
|
+
type: "long_text",
|
|
202
|
+
label: "If you could change one thing about our product, what would it be?",
|
|
203
|
+
required: false,
|
|
204
|
+
placeholder: "Your suggestion...",
|
|
205
|
+
validation: [{ type: "maxLength", value: 1e3 }]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
id: "can_contact",
|
|
209
|
+
type: "boolean",
|
|
210
|
+
label: "Can we follow up with you about your feedback?",
|
|
211
|
+
required: false
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
id: "contact_email",
|
|
215
|
+
type: "email",
|
|
216
|
+
label: "Your email address",
|
|
217
|
+
required: true,
|
|
218
|
+
placeholder: "you@company.com",
|
|
219
|
+
helpText: "We'll only use this to follow up on your feedback",
|
|
220
|
+
showIf: {
|
|
221
|
+
field: "can_contact",
|
|
222
|
+
operator: "eq",
|
|
223
|
+
value: true
|
|
224
|
+
}
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
id: "subscribe",
|
|
228
|
+
type: "boolean",
|
|
229
|
+
label: "Keep me updated on product improvements",
|
|
230
|
+
required: false,
|
|
231
|
+
showIf: {
|
|
232
|
+
field: "can_contact",
|
|
233
|
+
operator: "eq",
|
|
234
|
+
value: true
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
}
|
|
239
|
+
]
|
|
240
|
+
};
|
|
241
|
+
var feedbackSurveyMeta = {
|
|
242
|
+
id: "feedback-survey",
|
|
243
|
+
name: "Feedback Survey",
|
|
244
|
+
description: "A comprehensive customer feedback survey with NPS, ratings, Likert scales, feature usage tracking, and conditional follow-up. Three sections covering satisfaction, specifics, and open-ended feedback.",
|
|
245
|
+
category: "feedback",
|
|
246
|
+
fieldCount: 12,
|
|
247
|
+
sectionCount: 3,
|
|
248
|
+
tags: ["feedback", "survey", "nps", "rating", "likert"]
|
|
249
|
+
};
|
|
250
|
+
var feedbackSurvey = {
|
|
251
|
+
meta: feedbackSurveyMeta,
|
|
252
|
+
schema: feedbackSurveySchema
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
// src/nps-survey.ts
|
|
256
|
+
var npsSurveySchema = {
|
|
257
|
+
id: "nps-survey",
|
|
258
|
+
version: "1.0.0",
|
|
259
|
+
title: "Net Promoter Score Survey",
|
|
260
|
+
description: "Quick NPS survey with smart follow-up questions based on score.",
|
|
261
|
+
settings: {
|
|
262
|
+
showProgress: true,
|
|
263
|
+
progressStyle: "steps"
|
|
264
|
+
},
|
|
265
|
+
submitAction: { type: "callback" },
|
|
266
|
+
sections: [
|
|
267
|
+
{
|
|
268
|
+
id: "score",
|
|
269
|
+
title: "Your Rating",
|
|
270
|
+
description: "One quick question to start",
|
|
271
|
+
questions: [
|
|
272
|
+
{
|
|
273
|
+
id: "nps_score",
|
|
274
|
+
type: "nps",
|
|
275
|
+
label: "How likely are you to recommend us to a friend or colleague?",
|
|
276
|
+
required: true
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
id: "detractor_reason",
|
|
280
|
+
type: "single_select",
|
|
281
|
+
label: "We're sorry to hear that. What's the biggest issue?",
|
|
282
|
+
required: true,
|
|
283
|
+
showIf: {
|
|
284
|
+
field: "nps_score",
|
|
285
|
+
operator: "lte",
|
|
286
|
+
value: 6
|
|
287
|
+
},
|
|
288
|
+
options: [
|
|
289
|
+
{ label: "Product quality", value: "quality" },
|
|
290
|
+
{ label: "Customer support", value: "support" },
|
|
291
|
+
{ label: "Pricing", value: "pricing" },
|
|
292
|
+
{ label: "Missing features", value: "features" },
|
|
293
|
+
{ label: "Bugs / reliability", value: "bugs" },
|
|
294
|
+
{ label: "Other", value: "other" }
|
|
295
|
+
]
|
|
296
|
+
},
|
|
297
|
+
{
|
|
298
|
+
id: "promoter_reason",
|
|
299
|
+
type: "single_select",
|
|
300
|
+
label: "Awesome! What do you love most?",
|
|
301
|
+
required: true,
|
|
302
|
+
showIf: {
|
|
303
|
+
field: "nps_score",
|
|
304
|
+
operator: "gte",
|
|
305
|
+
value: 9
|
|
306
|
+
},
|
|
307
|
+
options: [
|
|
308
|
+
{ label: "Ease of use", value: "ease" },
|
|
309
|
+
{ label: "Features", value: "features" },
|
|
310
|
+
{ label: "Performance", value: "performance" },
|
|
311
|
+
{ label: "Customer support", value: "support" },
|
|
312
|
+
{ label: "Value for money", value: "value" },
|
|
313
|
+
{ label: "Other", value: "other" }
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
]
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
id: "details",
|
|
320
|
+
title: "Tell Us More",
|
|
321
|
+
description: "Optional \u2014 help us understand your experience better",
|
|
322
|
+
questions: [
|
|
323
|
+
{
|
|
324
|
+
id: "comment",
|
|
325
|
+
type: "long_text",
|
|
326
|
+
label: "Anything else you'd like to share?",
|
|
327
|
+
required: false,
|
|
328
|
+
placeholder: "Your thoughts...",
|
|
329
|
+
validation: [{ type: "maxLength", value: 500 }]
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
id: "email",
|
|
333
|
+
type: "email",
|
|
334
|
+
label: "Email (if you'd like us to follow up)",
|
|
335
|
+
required: false,
|
|
336
|
+
placeholder: "you@company.com"
|
|
337
|
+
}
|
|
338
|
+
]
|
|
339
|
+
}
|
|
340
|
+
]
|
|
341
|
+
};
|
|
342
|
+
var npsSurveyMeta = {
|
|
343
|
+
id: "nps-survey",
|
|
344
|
+
name: "NPS Survey",
|
|
345
|
+
description: "A focused Net Promoter Score survey with conditional follow-up questions. Detractors see different questions than promoters, with smart branching logic.",
|
|
346
|
+
category: "feedback",
|
|
347
|
+
fieldCount: 5,
|
|
348
|
+
sectionCount: 2,
|
|
349
|
+
tags: ["nps", "survey", "conditional-logic", "feedback"]
|
|
350
|
+
};
|
|
351
|
+
var npsSurvey = {
|
|
352
|
+
meta: npsSurveyMeta,
|
|
353
|
+
schema: npsSurveySchema
|
|
354
|
+
};
|
|
355
|
+
|
|
356
|
+
// src/newsletter-signup.ts
|
|
357
|
+
var newsletterSignupSchema = {
|
|
358
|
+
id: "newsletter-signup",
|
|
359
|
+
version: "1.0.0",
|
|
360
|
+
title: "Newsletter Signup",
|
|
361
|
+
description: "Subscribe to our newsletter and stay in the loop.",
|
|
362
|
+
settings: {
|
|
363
|
+
showProgress: false
|
|
364
|
+
},
|
|
365
|
+
submitAction: { type: "callback" },
|
|
366
|
+
sections: [
|
|
367
|
+
{
|
|
368
|
+
id: "subscribe",
|
|
369
|
+
title: "Stay Updated",
|
|
370
|
+
description: "Get the latest news, tips, and product updates delivered to your inbox",
|
|
371
|
+
questions: [
|
|
372
|
+
{
|
|
373
|
+
id: "email",
|
|
374
|
+
type: "email",
|
|
375
|
+
label: "Email Address",
|
|
376
|
+
required: true,
|
|
377
|
+
placeholder: "you@company.com"
|
|
378
|
+
},
|
|
379
|
+
{
|
|
380
|
+
id: "first_name",
|
|
381
|
+
type: "short_text",
|
|
382
|
+
label: "First Name",
|
|
383
|
+
required: false,
|
|
384
|
+
placeholder: "Jane",
|
|
385
|
+
validation: [{ type: "maxLength", value: 50 }]
|
|
386
|
+
},
|
|
387
|
+
{
|
|
388
|
+
id: "interests",
|
|
389
|
+
type: "multi_select",
|
|
390
|
+
label: "What topics interest you?",
|
|
391
|
+
required: false,
|
|
392
|
+
helpText: "Select all that apply \u2014 helps us send relevant content",
|
|
393
|
+
options: [
|
|
394
|
+
{ label: "Product Updates", value: "product" },
|
|
395
|
+
{ label: "Engineering Blog", value: "engineering" },
|
|
396
|
+
{ label: "Tutorials & Guides", value: "tutorials" },
|
|
397
|
+
{ label: "Industry News", value: "industry" },
|
|
398
|
+
{ label: "Case Studies", value: "case-studies" }
|
|
399
|
+
]
|
|
400
|
+
}
|
|
401
|
+
]
|
|
402
|
+
}
|
|
403
|
+
]
|
|
404
|
+
};
|
|
405
|
+
var newsletterSignupMeta = {
|
|
406
|
+
id: "newsletter-signup",
|
|
407
|
+
name: "Newsletter Signup",
|
|
408
|
+
description: "A minimal newsletter subscription form with email, optional name, and topic interest selection. Single section, no progress bar \u2014 designed for embedding.",
|
|
409
|
+
category: "marketing",
|
|
410
|
+
fieldCount: 3,
|
|
411
|
+
sectionCount: 1,
|
|
412
|
+
tags: ["newsletter", "signup", "marketing", "email"]
|
|
413
|
+
};
|
|
414
|
+
var newsletterSignup = {
|
|
415
|
+
meta: newsletterSignupMeta,
|
|
416
|
+
schema: newsletterSignupSchema
|
|
417
|
+
};
|
|
418
|
+
|
|
419
|
+
// src/bug-report.ts
|
|
420
|
+
var bugReportSchema = {
|
|
421
|
+
id: "bug-report",
|
|
422
|
+
version: "1.0.0",
|
|
423
|
+
title: "Bug Report",
|
|
424
|
+
description: "Report a bug so we can fix it. The more detail, the faster we can help.",
|
|
425
|
+
settings: {
|
|
426
|
+
showProgress: true,
|
|
427
|
+
progressStyle: "steps",
|
|
428
|
+
navigation: {
|
|
429
|
+
showBack: true
|
|
430
|
+
}
|
|
431
|
+
},
|
|
432
|
+
submitAction: { type: "callback" },
|
|
433
|
+
sections: [
|
|
434
|
+
{
|
|
435
|
+
id: "reporter",
|
|
436
|
+
title: "Your Details",
|
|
437
|
+
description: "So we can follow up if we need more info",
|
|
438
|
+
questions: [
|
|
439
|
+
{
|
|
440
|
+
id: "name",
|
|
441
|
+
type: "short_text",
|
|
442
|
+
label: "Name",
|
|
443
|
+
required: true,
|
|
444
|
+
placeholder: "Jane Doe",
|
|
445
|
+
validation: [{ type: "maxLength", value: 100 }]
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
id: "email",
|
|
449
|
+
type: "email",
|
|
450
|
+
label: "Email",
|
|
451
|
+
required: true,
|
|
452
|
+
placeholder: "you@company.com"
|
|
453
|
+
}
|
|
454
|
+
]
|
|
455
|
+
},
|
|
456
|
+
{
|
|
457
|
+
id: "bug-details",
|
|
458
|
+
title: "Bug Details",
|
|
459
|
+
description: "Describe what went wrong",
|
|
460
|
+
questions: [
|
|
461
|
+
{
|
|
462
|
+
id: "title",
|
|
463
|
+
type: "short_text",
|
|
464
|
+
label: "Bug Title",
|
|
465
|
+
required: true,
|
|
466
|
+
placeholder: "Brief description of the issue",
|
|
467
|
+
validation: [
|
|
468
|
+
{ type: "minLength", value: 5, message: "Please be more specific" },
|
|
469
|
+
{ type: "maxLength", value: 200 }
|
|
470
|
+
]
|
|
471
|
+
},
|
|
472
|
+
{
|
|
473
|
+
id: "severity",
|
|
474
|
+
type: "dropdown",
|
|
475
|
+
label: "Severity",
|
|
476
|
+
required: true,
|
|
477
|
+
options: [
|
|
478
|
+
{ label: "Critical \u2014 app is unusable", value: "critical" },
|
|
479
|
+
{ label: "High \u2014 major feature broken", value: "high" },
|
|
480
|
+
{ label: "Medium \u2014 feature works but incorrectly", value: "medium" },
|
|
481
|
+
{ label: "Low \u2014 cosmetic or minor issue", value: "low" }
|
|
482
|
+
]
|
|
483
|
+
},
|
|
484
|
+
{
|
|
485
|
+
id: "steps_to_reproduce",
|
|
486
|
+
type: "long_text",
|
|
487
|
+
label: "Steps to Reproduce",
|
|
488
|
+
required: true,
|
|
489
|
+
placeholder: "1. Go to...\n2. Click on...\n3. Observe that...",
|
|
490
|
+
helpText: "Step-by-step instructions to reproduce the bug",
|
|
491
|
+
validation: [
|
|
492
|
+
{
|
|
493
|
+
type: "minLength",
|
|
494
|
+
value: 20,
|
|
495
|
+
message: "Please provide detailed steps"
|
|
496
|
+
},
|
|
497
|
+
{ type: "maxLength", value: 3e3 }
|
|
498
|
+
]
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
id: "expected_behavior",
|
|
502
|
+
type: "long_text",
|
|
503
|
+
label: "Expected Behavior",
|
|
504
|
+
required: true,
|
|
505
|
+
placeholder: "What should have happened...",
|
|
506
|
+
validation: [{ type: "maxLength", value: 1e3 }]
|
|
507
|
+
},
|
|
508
|
+
{
|
|
509
|
+
id: "browser_os",
|
|
510
|
+
type: "single_select",
|
|
511
|
+
label: "Browser / Environment",
|
|
512
|
+
required: false,
|
|
513
|
+
options: [
|
|
514
|
+
{ label: "Chrome", value: "chrome" },
|
|
515
|
+
{ label: "Firefox", value: "firefox" },
|
|
516
|
+
{ label: "Safari", value: "safari" },
|
|
517
|
+
{ label: "Edge", value: "edge" },
|
|
518
|
+
{ label: "Mobile (iOS)", value: "ios" },
|
|
519
|
+
{ label: "Mobile (Android)", value: "android" },
|
|
520
|
+
{ label: "Other", value: "other" }
|
|
521
|
+
]
|
|
522
|
+
},
|
|
523
|
+
{
|
|
524
|
+
id: "screenshot_url",
|
|
525
|
+
type: "url",
|
|
526
|
+
label: "Screenshot / Recording URL",
|
|
527
|
+
required: false,
|
|
528
|
+
placeholder: "https://...",
|
|
529
|
+
helpText: "Link to a screenshot or screen recording (Loom, CloudApp, etc.)"
|
|
530
|
+
}
|
|
531
|
+
]
|
|
532
|
+
}
|
|
533
|
+
]
|
|
534
|
+
};
|
|
535
|
+
var bugReportMeta = {
|
|
536
|
+
id: "bug-report",
|
|
537
|
+
name: "Bug Report",
|
|
538
|
+
description: "A structured bug report form with reporter details, severity classification, reproduction steps, expected behavior, environment selection, and screenshot URL. Two sections with step-based progress.",
|
|
539
|
+
category: "support",
|
|
540
|
+
fieldCount: 8,
|
|
541
|
+
sectionCount: 2,
|
|
542
|
+
tags: ["bug", "report", "support", "issue-tracking"]
|
|
543
|
+
};
|
|
544
|
+
var bugReport = {
|
|
545
|
+
meta: bugReportMeta,
|
|
546
|
+
schema: bugReportSchema
|
|
547
|
+
};
|
|
548
|
+
|
|
549
|
+
// src/index.ts
|
|
550
|
+
var allTemplates = [
|
|
551
|
+
contactForm,
|
|
552
|
+
feedbackSurvey,
|
|
553
|
+
npsSurvey,
|
|
554
|
+
newsletterSignup,
|
|
555
|
+
bugReport
|
|
556
|
+
];
|
|
557
|
+
export {
|
|
558
|
+
allTemplates,
|
|
559
|
+
bugReport,
|
|
560
|
+
bugReportMeta,
|
|
561
|
+
bugReportSchema,
|
|
562
|
+
contactForm,
|
|
563
|
+
contactFormMeta,
|
|
564
|
+
contactFormSchema,
|
|
565
|
+
feedbackSurvey,
|
|
566
|
+
feedbackSurveyMeta,
|
|
567
|
+
feedbackSurveySchema,
|
|
568
|
+
newsletterSignup,
|
|
569
|
+
newsletterSignupMeta,
|
|
570
|
+
newsletterSignupSchema,
|
|
571
|
+
npsSurvey,
|
|
572
|
+
npsSurveyMeta,
|
|
573
|
+
npsSurveySchema
|
|
574
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@squaredr/fieldcraft-templates-free",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "5 free, production-ready form schemas for FieldCraft. Contact forms, surveys, NPS, newsletters, and bug reports.",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"module": "./dist/index.mjs",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/index.d.ts",
|
|
11
|
+
"import": "./dist/index.mjs",
|
|
12
|
+
"require": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": ["dist", "LICENSE"],
|
|
16
|
+
"sideEffects": false,
|
|
17
|
+
"scripts": {
|
|
18
|
+
"build": "tsup src/index.ts --format cjs,esm --dts",
|
|
19
|
+
"dev": "tsup src/index.ts --format cjs,esm --dts --watch",
|
|
20
|
+
"typecheck": "tsc --noEmit",
|
|
21
|
+
"clean": "rm -rf dist"
|
|
22
|
+
},
|
|
23
|
+
"peerDependencies": {
|
|
24
|
+
"@squaredr/fieldcraft-core": ">=1.0.0"
|
|
25
|
+
},
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@squaredr/fieldcraft-core": "workspace:*",
|
|
28
|
+
"typescript": "^5.5",
|
|
29
|
+
"tsup": "^8.0"
|
|
30
|
+
},
|
|
31
|
+
"keywords": [
|
|
32
|
+
"fieldcraft",
|
|
33
|
+
"form-engine",
|
|
34
|
+
"form-templates",
|
|
35
|
+
"schema-driven",
|
|
36
|
+
"contact-form",
|
|
37
|
+
"feedback-survey",
|
|
38
|
+
"nps",
|
|
39
|
+
"newsletter",
|
|
40
|
+
"bug-report",
|
|
41
|
+
"free"
|
|
42
|
+
],
|
|
43
|
+
"license": "MIT",
|
|
44
|
+
"author": "SquaredR",
|
|
45
|
+
"homepage": "https://squaredr.tech/products/fieldcraft/templates",
|
|
46
|
+
"bugs": {
|
|
47
|
+
"url": "https://github.com/SquaredR98/fieldcraft/issues"
|
|
48
|
+
},
|
|
49
|
+
"repository": {
|
|
50
|
+
"type": "git",
|
|
51
|
+
"url": "git+https://github.com/SquaredR98/fieldcraft.git",
|
|
52
|
+
"directory": "packages/templates-free"
|
|
53
|
+
},
|
|
54
|
+
"engines": {
|
|
55
|
+
"node": ">=18"
|
|
56
|
+
}
|
|
57
|
+
}
|