@ozguraltan/strapi-content-input 1.0.11 → 1.0.12

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.
Files changed (41) hide show
  1. package/README.md +249 -45
  2. package/dist/admin/AnalyticsHubPage-DNREITPq.js +637 -0
  3. package/dist/admin/AnalyticsHubPage-Dj4roAe0.mjs +637 -0
  4. package/dist/admin/{ContentInputField-BGJmgYGQ.js → ContentInputField-2hk9xG8p.js} +5880 -4756
  5. package/dist/admin/{ContentInputField-BLiKYZ7b.mjs → ContentInputField-Ko-r12jl.mjs} +5743 -4618
  6. package/dist/admin/SurveyWidgetEditor-B1S83aBE.mjs +7956 -0
  7. package/dist/admin/SurveyWidgetEditor-B3F4DE5r.js +7957 -0
  8. package/dist/admin/{en-D7v9nv9J.mjs → en-DnLdDKyq.mjs} +2 -1
  9. package/dist/admin/{en-DF-a59T_.js → en-bneQpRJa.js} +2 -1
  10. package/dist/admin/{index-DKVaYg3t.js → index-B4FpXxnK.js} +43 -4
  11. package/dist/admin/{index-DGBgjAUa.mjs → index-gn-4eO6g.mjs} +43 -4
  12. package/dist/admin/index.js +1 -1
  13. package/dist/admin/index.mjs +1 -1
  14. package/dist/admin/src/components/analytics/SurveyAnalyticsView.d.ts +6 -0
  15. package/dist/admin/src/components/widgets/ContentFormWidgetEditor.d.ts +81 -0
  16. package/dist/admin/src/components/widgets/EntityCardWidgetEditor.d.ts +46 -0
  17. package/dist/admin/src/components/widgets/SurveyWidgetEditor.d.ts +91 -0
  18. package/dist/admin/src/core/useStrapiLocales.d.ts +13 -0
  19. package/dist/admin/src/pages/AnalyticsHubPage.d.ts +3 -0
  20. package/dist/admin/{tr-ByHzf64V.mjs → tr-00QqO0E7.mjs} +2 -1
  21. package/dist/admin/{tr-SNvSmKZQ.js → tr-O0nhB9er.js} +2 -1
  22. package/dist/server/index.js +4148 -46
  23. package/dist/server/index.mjs +4148 -46
  24. package/dist/server/src/bootstrap.d.ts +1 -1
  25. package/dist/server/src/content-types/ci-form/schema.json.d.ts +77 -0
  26. package/dist/server/src/content-types/ci-form-submission/schema.json.d.ts +54 -0
  27. package/dist/server/src/content-types/ci-survey/schema.json.d.ts +111 -0
  28. package/dist/server/src/content-types/ci-survey-response/schema.json.d.ts +81 -0
  29. package/dist/server/src/content-types/index.d.ts +315 -0
  30. package/dist/server/src/controllers/ci-form.d.ts +17 -0
  31. package/dist/server/src/controllers/ci-survey.d.ts +18 -0
  32. package/dist/server/src/controllers/index.d.ts +31 -0
  33. package/dist/server/src/index.d.ts +731 -1
  34. package/dist/server/src/services/ci-form.d.ts +250 -0
  35. package/dist/server/src/services/ci-survey.d.ts +296 -0
  36. package/dist/server/src/services/index.d.ts +384 -0
  37. package/dist/server/src/utils/formValidator.d.ts +19 -0
  38. package/dist/server/src/utils/mailer.d.ts +41 -0
  39. package/dist/server/src/utils/surveyEngine.d.ts +252 -0
  40. package/dist/server/src/utils/surveySeedData.d.ts +4 -0
  41. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  import { Core } from '@strapi/strapi';
2
2
  declare const bootstrap: ({ strapi }: {
3
3
  strapi: Core.Strapi;
4
- }) => void;
4
+ }) => Promise<void>;
5
5
  export default bootstrap;
@@ -0,0 +1,77 @@
1
+ declare const _default: {
2
+ "kind": "collectionType",
3
+ "collectionName": "ci_forms",
4
+ "info": {
5
+ "singularName": "ci-form",
6
+ "pluralName": "ci-forms",
7
+ "displayName": "ContentInput Dynamic Form",
8
+ "description": "Reusable cms-core style dynamic forms with responsive grid layout, validation rules, reCAPTCHA and mail delivery settings"
9
+ },
10
+ "options": {
11
+ "draftAndPublish": false
12
+ },
13
+ "pluginOptions": {
14
+ "content-manager": {
15
+ "visible": true
16
+ },
17
+ "content-type-builder": {
18
+ "visible": false
19
+ }
20
+ },
21
+ "attributes": {
22
+ "title": {
23
+ "type": "string",
24
+ "required": true
25
+ },
26
+ "slug": {
27
+ "type": "string",
28
+ "required": true
29
+ },
30
+ "to": {
31
+ "type": "string"
32
+ },
33
+ "subject": {
34
+ "type": "string"
35
+ },
36
+ "buttonLabel": {
37
+ "type": "json"
38
+ },
39
+ "successMessage": {
40
+ "type": "json"
41
+ },
42
+ "redirect": {
43
+ "type": "string"
44
+ },
45
+ "hideLabels": {
46
+ "type": "boolean",
47
+ "default": false
48
+ },
49
+ "useRecaptcha": {
50
+ "type": "boolean",
51
+ "default": true
52
+ },
53
+ "recaptchaSiteKey": {
54
+ "type": "string"
55
+ },
56
+ "recaptchaSecretKey": {
57
+ "type": "string",
58
+ "private": true
59
+ },
60
+ "mailConfig": {
61
+ "type": "json",
62
+ "private": true
63
+ },
64
+ "fields": {
65
+ "type": "json",
66
+ "required": true
67
+ },
68
+ "form": {
69
+ "type": "json",
70
+ "required": true
71
+ }
72
+ }
73
+ }
74
+
75
+ ;
76
+
77
+ export default _default;
@@ -0,0 +1,54 @@
1
+ declare const _default: {
2
+ "kind": "collectionType",
3
+ "collectionName": "ci_form_submissions",
4
+ "info": {
5
+ "singularName": "ci-form-submission",
6
+ "pluralName": "ci-form-submissions",
7
+ "displayName": "ContentInput Form Submission",
8
+ "description": "Submitted entries from ContentInput dynamic forms"
9
+ },
10
+ "options": {
11
+ "draftAndPublish": false
12
+ },
13
+ "pluginOptions": {
14
+ "content-manager": {
15
+ "visible": true
16
+ },
17
+ "content-type-builder": {
18
+ "visible": false
19
+ }
20
+ },
21
+ "attributes": {
22
+ "formId": {
23
+ "type": "string",
24
+ "required": true
25
+ },
26
+ "formSlug": {
27
+ "type": "string"
28
+ },
29
+ "formTitle": {
30
+ "type": "string"
31
+ },
32
+ "data": {
33
+ "type": "json",
34
+ "required": true
35
+ },
36
+ "ip": {
37
+ "type": "string"
38
+ },
39
+ "userAgent": {
40
+ "type": "string"
41
+ },
42
+ "mailSent": {
43
+ "type": "boolean",
44
+ "default": false
45
+ },
46
+ "mailInfo": {
47
+ "type": "json"
48
+ }
49
+ }
50
+ }
51
+
52
+ ;
53
+
54
+ export default _default;
@@ -0,0 +1,111 @@
1
+ declare const _default: {
2
+ "kind": "collectionType",
3
+ "collectionName": "ci_surveys",
4
+ "info": {
5
+ "singularName": "ci-survey",
6
+ "pluralName": "ci-surveys",
7
+ "displayName": "ContentInput Survey",
8
+ "description": "Enterprise surveys, multi-step questionnaires, and live polls with i18n, conditional logic, and analytics"
9
+ },
10
+ "options": {
11
+ "draftAndPublish": false
12
+ },
13
+ "pluginOptions": {
14
+ "content-manager": {
15
+ "visible": true
16
+ },
17
+ "content-type-builder": {
18
+ "visible": false
19
+ }
20
+ },
21
+ "attributes": {
22
+ "title": {
23
+ "type": "string",
24
+ "required": true
25
+ },
26
+ "titleI18n": {
27
+ "type": "json"
28
+ },
29
+ "slug": {
30
+ "type": "string",
31
+ "required": true
32
+ },
33
+ "description": {
34
+ "type": "json"
35
+ },
36
+ "status": {
37
+ "type": "enumeration",
38
+ "enum": ["draft", "published", "closed"],
39
+ "default": "published"
40
+ },
41
+ "displayMode": {
42
+ "type": "enumeration",
43
+ "enum": ["quick_poll", "single_page", "multi_step"],
44
+ "default": "single_page"
45
+ },
46
+ "startsAt": {
47
+ "type": "datetime"
48
+ },
49
+ "endsAt": {
50
+ "type": "datetime"
51
+ },
52
+ "quotaLimit": {
53
+ "type": "integer"
54
+ },
55
+ "submissionPolicy": {
56
+ "type": "enumeration",
57
+ "enum": ["unlimited", "one_per_voter", "one_per_token"],
58
+ "default": "one_per_voter"
59
+ },
60
+ "anonymizeIp": {
61
+ "type": "boolean",
62
+ "default": true
63
+ },
64
+ "showPublicResults": {
65
+ "type": "enumeration",
66
+ "enum": ["never", "after_vote", "always"],
67
+ "default": "never"
68
+ },
69
+ "allowBackNavigation": {
70
+ "type": "boolean",
71
+ "default": true
72
+ },
73
+ "showProgressBar": {
74
+ "type": "boolean",
75
+ "default": true
76
+ },
77
+ "useRecaptcha": {
78
+ "type": "boolean",
79
+ "default": false
80
+ },
81
+ "recaptchaSiteKey": {
82
+ "type": "string"
83
+ },
84
+ "recaptchaSecretKey": {
85
+ "type": "string",
86
+ "private": true
87
+ },
88
+ "mailConfig": {
89
+ "type": "json",
90
+ "private": true
91
+ },
92
+ "steps": {
93
+ "type": "json"
94
+ },
95
+ "questions": {
96
+ "type": "json",
97
+ "required": true
98
+ },
99
+ "settings": {
100
+ "type": "json"
101
+ },
102
+ "version": {
103
+ "type": "integer",
104
+ "default": 1
105
+ }
106
+ }
107
+ }
108
+
109
+ ;
110
+
111
+ export default _default;
@@ -0,0 +1,81 @@
1
+ declare const _default: {
2
+ "kind": "collectionType",
3
+ "collectionName": "ci_survey_responses",
4
+ "info": {
5
+ "singularName": "ci-survey-response",
6
+ "pluralName": "ci-survey-responses",
7
+ "displayName": "ContentInput Survey Response",
8
+ "description": "Recorded participant responses and telemetry for ContentInput surveys and polls"
9
+ },
10
+ "options": {
11
+ "draftAndPublish": false
12
+ },
13
+ "pluginOptions": {
14
+ "content-manager": {
15
+ "visible": true
16
+ },
17
+ "content-type-builder": {
18
+ "visible": false
19
+ }
20
+ },
21
+ "attributes": {
22
+ "surveyId": {
23
+ "type": "string",
24
+ "required": true
25
+ },
26
+ "surveySlug": {
27
+ "type": "string",
28
+ "required": true
29
+ },
30
+ "surveyTitle": {
31
+ "type": "string"
32
+ },
33
+ "surveyVersion": {
34
+ "type": "integer",
35
+ "default": 1
36
+ },
37
+ "answers": {
38
+ "type": "json",
39
+ "required": true
40
+ },
41
+ "otherTexts": {
42
+ "type": "json"
43
+ },
44
+ "score": {
45
+ "type": "float"
46
+ },
47
+ "npsValue": {
48
+ "type": "integer"
49
+ },
50
+ "npsCategory": {
51
+ "type": "string"
52
+ },
53
+ "locale": {
54
+ "type": "string",
55
+ "default": "tr"
56
+ },
57
+ "durationSeconds": {
58
+ "type": "integer",
59
+ "default": 0
60
+ },
61
+ "voterHash": {
62
+ "type": "string"
63
+ },
64
+ "respondentToken": {
65
+ "type": "string"
66
+ },
67
+ "ip": {
68
+ "type": "string"
69
+ },
70
+ "userAgent": {
71
+ "type": "string"
72
+ },
73
+ "submittedAt": {
74
+ "type": "datetime"
75
+ }
76
+ }
77
+ }
78
+
79
+ ;
80
+
81
+ export default _default;
@@ -84,5 +84,320 @@ declare const _default: {
84
84
  };
85
85
  };
86
86
  };
87
+ 'ci-form': {
88
+ schema: {
89
+ kind: string;
90
+ collectionName: string;
91
+ info: {
92
+ singularName: string;
93
+ pluralName: string;
94
+ displayName: string;
95
+ description: string;
96
+ };
97
+ options: {
98
+ draftAndPublish: boolean;
99
+ };
100
+ pluginOptions: {
101
+ "content-manager": {
102
+ visible: boolean;
103
+ };
104
+ "content-type-builder": {
105
+ visible: boolean;
106
+ };
107
+ };
108
+ attributes: {
109
+ title: {
110
+ type: string;
111
+ required: boolean;
112
+ };
113
+ slug: {
114
+ type: string;
115
+ required: boolean;
116
+ };
117
+ to: {
118
+ type: string;
119
+ };
120
+ subject: {
121
+ type: string;
122
+ };
123
+ buttonLabel: {
124
+ type: string;
125
+ };
126
+ successMessage: {
127
+ type: string;
128
+ };
129
+ redirect: {
130
+ type: string;
131
+ };
132
+ hideLabels: {
133
+ type: string;
134
+ default: boolean;
135
+ };
136
+ useRecaptcha: {
137
+ type: string;
138
+ default: boolean;
139
+ };
140
+ recaptchaSiteKey: {
141
+ type: string;
142
+ };
143
+ recaptchaSecretKey: {
144
+ type: string;
145
+ private: boolean;
146
+ };
147
+ mailConfig: {
148
+ type: string;
149
+ private: boolean;
150
+ };
151
+ fields: {
152
+ type: string;
153
+ required: boolean;
154
+ };
155
+ form: {
156
+ type: string;
157
+ required: boolean;
158
+ };
159
+ };
160
+ };
161
+ };
162
+ 'ci-form-submission': {
163
+ schema: {
164
+ kind: string;
165
+ collectionName: string;
166
+ info: {
167
+ singularName: string;
168
+ pluralName: string;
169
+ displayName: string;
170
+ description: string;
171
+ };
172
+ options: {
173
+ draftAndPublish: boolean;
174
+ };
175
+ pluginOptions: {
176
+ "content-manager": {
177
+ visible: boolean;
178
+ };
179
+ "content-type-builder": {
180
+ visible: boolean;
181
+ };
182
+ };
183
+ attributes: {
184
+ formId: {
185
+ type: string;
186
+ required: boolean;
187
+ };
188
+ formSlug: {
189
+ type: string;
190
+ };
191
+ formTitle: {
192
+ type: string;
193
+ };
194
+ data: {
195
+ type: string;
196
+ required: boolean;
197
+ };
198
+ ip: {
199
+ type: string;
200
+ };
201
+ userAgent: {
202
+ type: string;
203
+ };
204
+ mailSent: {
205
+ type: string;
206
+ default: boolean;
207
+ };
208
+ mailInfo: {
209
+ type: string;
210
+ };
211
+ };
212
+ };
213
+ };
214
+ 'ci-survey': {
215
+ schema: {
216
+ kind: string;
217
+ collectionName: string;
218
+ info: {
219
+ singularName: string;
220
+ pluralName: string;
221
+ displayName: string;
222
+ description: string;
223
+ };
224
+ options: {
225
+ draftAndPublish: boolean;
226
+ };
227
+ pluginOptions: {
228
+ "content-manager": {
229
+ visible: boolean;
230
+ };
231
+ "content-type-builder": {
232
+ visible: boolean;
233
+ };
234
+ };
235
+ attributes: {
236
+ title: {
237
+ type: string;
238
+ required: boolean;
239
+ };
240
+ titleI18n: {
241
+ type: string;
242
+ };
243
+ slug: {
244
+ type: string;
245
+ required: boolean;
246
+ };
247
+ description: {
248
+ type: string;
249
+ };
250
+ status: {
251
+ type: string;
252
+ enum: string[];
253
+ default: string;
254
+ };
255
+ displayMode: {
256
+ type: string;
257
+ enum: string[];
258
+ default: string;
259
+ };
260
+ startsAt: {
261
+ type: string;
262
+ };
263
+ endsAt: {
264
+ type: string;
265
+ };
266
+ quotaLimit: {
267
+ type: string;
268
+ };
269
+ submissionPolicy: {
270
+ type: string;
271
+ enum: string[];
272
+ default: string;
273
+ };
274
+ anonymizeIp: {
275
+ type: string;
276
+ default: boolean;
277
+ };
278
+ showPublicResults: {
279
+ type: string;
280
+ enum: string[];
281
+ default: string;
282
+ };
283
+ allowBackNavigation: {
284
+ type: string;
285
+ default: boolean;
286
+ };
287
+ showProgressBar: {
288
+ type: string;
289
+ default: boolean;
290
+ };
291
+ useRecaptcha: {
292
+ type: string;
293
+ default: boolean;
294
+ };
295
+ recaptchaSiteKey: {
296
+ type: string;
297
+ };
298
+ recaptchaSecretKey: {
299
+ type: string;
300
+ private: boolean;
301
+ };
302
+ mailConfig: {
303
+ type: string;
304
+ private: boolean;
305
+ };
306
+ steps: {
307
+ type: string;
308
+ };
309
+ questions: {
310
+ type: string;
311
+ required: boolean;
312
+ };
313
+ settings: {
314
+ type: string;
315
+ };
316
+ version: {
317
+ type: string;
318
+ default: number;
319
+ };
320
+ };
321
+ };
322
+ };
323
+ 'ci-survey-response': {
324
+ schema: {
325
+ kind: string;
326
+ collectionName: string;
327
+ info: {
328
+ singularName: string;
329
+ pluralName: string;
330
+ displayName: string;
331
+ description: string;
332
+ };
333
+ options: {
334
+ draftAndPublish: boolean;
335
+ };
336
+ pluginOptions: {
337
+ "content-manager": {
338
+ visible: boolean;
339
+ };
340
+ "content-type-builder": {
341
+ visible: boolean;
342
+ };
343
+ };
344
+ attributes: {
345
+ surveyId: {
346
+ type: string;
347
+ required: boolean;
348
+ };
349
+ surveySlug: {
350
+ type: string;
351
+ required: boolean;
352
+ };
353
+ surveyTitle: {
354
+ type: string;
355
+ };
356
+ surveyVersion: {
357
+ type: string;
358
+ default: number;
359
+ };
360
+ answers: {
361
+ type: string;
362
+ required: boolean;
363
+ };
364
+ otherTexts: {
365
+ type: string;
366
+ };
367
+ score: {
368
+ type: string;
369
+ };
370
+ npsValue: {
371
+ type: string;
372
+ };
373
+ npsCategory: {
374
+ type: string;
375
+ };
376
+ locale: {
377
+ type: string;
378
+ default: string;
379
+ };
380
+ durationSeconds: {
381
+ type: string;
382
+ default: number;
383
+ };
384
+ voterHash: {
385
+ type: string;
386
+ };
387
+ respondentToken: {
388
+ type: string;
389
+ };
390
+ ip: {
391
+ type: string;
392
+ };
393
+ userAgent: {
394
+ type: string;
395
+ };
396
+ submittedAt: {
397
+ type: string;
398
+ };
399
+ };
400
+ };
401
+ };
87
402
  };
88
403
  export default _default;
@@ -0,0 +1,17 @@
1
+ import { Core } from '@strapi/strapi';
2
+ declare const ciFormController: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => {
5
+ locales(ctx: any): Promise<void>;
6
+ indexAdmin(ctx: any): Promise<void>;
7
+ findOneAdmin(ctx: any): Promise<any>;
8
+ indexPublic(ctx: any): Promise<void>;
9
+ findOnePublic(ctx: any): Promise<any>;
10
+ save(ctx: any): Promise<any>;
11
+ delete(ctx: any): Promise<void>;
12
+ submissions(ctx: any): Promise<void>;
13
+ recaptchaKey(ctx: any): Promise<void>;
14
+ submit(ctx: any): Promise<void>;
15
+ entityCard(ctx: any): Promise<any>;
16
+ };
17
+ export default ciFormController;
@@ -0,0 +1,18 @@
1
+ import { Core } from '@strapi/strapi';
2
+ declare const ciSurveyController: ({ strapi }: {
3
+ strapi: Core.Strapi;
4
+ }) => {
5
+ indexAdmin(ctx: any): Promise<void>;
6
+ findOneAdmin(ctx: any): Promise<any>;
7
+ indexPublic(ctx: any): Promise<void>;
8
+ findOnePublic(ctx: any): Promise<any>;
9
+ save(ctx: any): Promise<any>;
10
+ delete(ctx: any): Promise<void>;
11
+ submit(ctx: any): Promise<void>;
12
+ publicResults(ctx: any): Promise<void>;
13
+ analytics(ctx: any): Promise<any>;
14
+ responses(ctx: any): Promise<void>;
15
+ exportResponses(ctx: any): Promise<any>;
16
+ reseedDemo(ctx: any): Promise<void>;
17
+ };
18
+ export default ciSurveyController;