@ozguraltan/strapi-content-input 1.0.26 → 1.0.28
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/README.md +8 -2
- package/dist/admin/{AnalyticsHubPage-Crz4vv46.mjs → AnalyticsHubPage-1d4lx37k.mjs} +30 -52
- package/dist/admin/{AnalyticsHubPage-CHlhvUIU.js → AnalyticsHubPage-BzKx8DTv.js} +30 -70
- package/dist/admin/{ContentInputField-BeKDx_bb.mjs → ContentInputField-DQvPlNcD.mjs} +427 -11
- package/dist/admin/{ContentInputField-CNWVLuRt.js → ContentInputField-DgS2wZNb.js} +427 -29
- package/dist/admin/{SurveyWidgetEditor-GKRT3eHj.mjs → SurveyWidgetEditor-BZHyY2eb.mjs} +2445 -3
- package/dist/admin/{SurveyWidgetEditor-BTipBBEU.js → SurveyWidgetEditor-k7kA6LQT.js} +2445 -3
- package/dist/admin/{index-DuJM60tO.js → index-BvofXe07.js} +2 -2
- package/dist/admin/{index-DSDcG4QW.mjs → index-CStmbvTw.mjs} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/analytics/ExcelReportStudioModal.d.ts +17 -0
- package/dist/admin/src/core/xlsxBrowserReader.d.ts +11 -0
- package/dist/server/index.js +3075 -1625
- package/dist/server/index.mjs +3075 -1607
- package/dist/server/src/controllers/ci-form.d.ts +1 -0
- package/dist/server/src/controllers/index.d.ts +1 -0
- package/dist/server/src/index.d.ts +8 -1
- package/dist/server/src/services/ci-form.d.ts +6 -1
- package/dist/server/src/services/ci-survey.d.ts +2 -1
- package/dist/server/src/services/index.d.ts +7 -1
- package/dist/server/src/utils/surveyEngine.d.ts +3 -1
- package/dist/server/src/utils/xlsxReportBuilder.d.ts +38 -0
- package/package.json +13 -6
|
@@ -10,6 +10,7 @@ declare const ciFormController: ({ strapi }: {
|
|
|
10
10
|
save(ctx: any): Promise<any>;
|
|
11
11
|
delete(ctx: any): Promise<void>;
|
|
12
12
|
submissions(ctx: any): Promise<void>;
|
|
13
|
+
exportSubmissions(ctx: any): Promise<void>;
|
|
13
14
|
recaptchaKey(ctx: any): Promise<void>;
|
|
14
15
|
submit(ctx: any): Promise<void>;
|
|
15
16
|
entityCard(ctx: any): Promise<any>;
|
|
@@ -37,6 +37,7 @@ declare const _default: {
|
|
|
37
37
|
save(ctx: any): Promise<any>;
|
|
38
38
|
delete(ctx: any): Promise<void>;
|
|
39
39
|
submissions(ctx: any): Promise<void>;
|
|
40
|
+
exportSubmissions(ctx: any): Promise<void>;
|
|
40
41
|
recaptchaKey(ctx: any): Promise<void>;
|
|
41
42
|
submit(ctx: any): Promise<void>;
|
|
42
43
|
entityCard(ctx: any): Promise<any>;
|
|
@@ -57,6 +57,7 @@ declare const _default: {
|
|
|
57
57
|
save(ctx: any): Promise<any>;
|
|
58
58
|
delete(ctx: any): Promise<void>;
|
|
59
59
|
submissions(ctx: any): Promise<void>;
|
|
60
|
+
exportSubmissions(ctx: any): Promise<void>;
|
|
60
61
|
recaptchaKey(ctx: any): Promise<void>;
|
|
61
62
|
submit(ctx: any): Promise<void>;
|
|
62
63
|
entityCard(ctx: any): Promise<any>;
|
|
@@ -216,7 +217,12 @@ declare const _default: {
|
|
|
216
217
|
remove(idOrDocId: string | number): Promise<{
|
|
217
218
|
success: boolean;
|
|
218
219
|
}>;
|
|
219
|
-
listSubmissions(formIdOrSlug?: string): Promise<any[]>;
|
|
220
|
+
listSubmissions(formIdOrSlug?: string, limit?: number): Promise<any[]>;
|
|
221
|
+
exportSubmissionsXlsx(formIdOrSlug?: string, locale?: import('./utils/formValidator').ValidationLocale): Promise<{
|
|
222
|
+
filename: string;
|
|
223
|
+
contentType: string;
|
|
224
|
+
body: Buffer<ArrayBufferLike>;
|
|
225
|
+
}>;
|
|
220
226
|
getPublicRecaptchaConfig(): {
|
|
221
227
|
publicKey: string;
|
|
222
228
|
enabled: boolean;
|
|
@@ -602,6 +608,7 @@ declare const _default: {
|
|
|
602
608
|
locale?: import('./utils/formValidator').ValidationLocale;
|
|
603
609
|
from?: string;
|
|
604
610
|
to?: string;
|
|
611
|
+
xlsxOptions?: import('./utils/xlsxReportBuilder').CISurveyXlsxCustomOptions;
|
|
605
612
|
}): Promise<{
|
|
606
613
|
filename: string;
|
|
607
614
|
contentType: string;
|
|
@@ -194,7 +194,12 @@ declare const ciFormService: ({ strapi }: {
|
|
|
194
194
|
remove(idOrDocId: string | number): Promise<{
|
|
195
195
|
success: boolean;
|
|
196
196
|
}>;
|
|
197
|
-
listSubmissions(formIdOrSlug?: string): Promise<any[]>;
|
|
197
|
+
listSubmissions(formIdOrSlug?: string, limit?: number): Promise<any[]>;
|
|
198
|
+
exportSubmissionsXlsx(formIdOrSlug?: string, locale?: ValidationLocale): Promise<{
|
|
199
|
+
filename: string;
|
|
200
|
+
contentType: string;
|
|
201
|
+
body: Buffer<ArrayBufferLike>;
|
|
202
|
+
}>;
|
|
198
203
|
getPublicRecaptchaConfig(): {
|
|
199
204
|
publicKey: string;
|
|
200
205
|
enabled: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Core } from '@strapi/strapi';
|
|
2
2
|
import { ValidationLocale } from '../utils/formValidator';
|
|
3
|
-
import { CISurveyAnalyticsFilter, CISurveyDefinition } from '../utils/surveyEngine';
|
|
3
|
+
import { CISurveyAnalyticsFilter, CISurveyDefinition, CISurveyXlsxCustomOptions } from '../utils/surveyEngine';
|
|
4
4
|
declare const ciSurveyService: ({ strapi }: {
|
|
5
5
|
strapi: Core.Strapi;
|
|
6
6
|
}) => {
|
|
@@ -330,6 +330,7 @@ declare const ciSurveyService: ({ strapi }: {
|
|
|
330
330
|
locale?: ValidationLocale;
|
|
331
331
|
from?: string;
|
|
332
332
|
to?: string;
|
|
333
|
+
xlsxOptions?: CISurveyXlsxCustomOptions;
|
|
333
334
|
}): Promise<{
|
|
334
335
|
filename: string;
|
|
335
336
|
contentType: string;
|
|
@@ -86,7 +86,12 @@ declare const _default: {
|
|
|
86
86
|
remove(idOrDocId: string | number): Promise<{
|
|
87
87
|
success: boolean;
|
|
88
88
|
}>;
|
|
89
|
-
listSubmissions(formIdOrSlug?: string): Promise<any[]>;
|
|
89
|
+
listSubmissions(formIdOrSlug?: string, limit?: number): Promise<any[]>;
|
|
90
|
+
exportSubmissionsXlsx(formIdOrSlug?: string, locale?: import('../utils/formValidator').ValidationLocale): Promise<{
|
|
91
|
+
filename: string;
|
|
92
|
+
contentType: string;
|
|
93
|
+
body: Buffer<ArrayBufferLike>;
|
|
94
|
+
}>;
|
|
90
95
|
getPublicRecaptchaConfig(): {
|
|
91
96
|
publicKey: string;
|
|
92
97
|
enabled: boolean;
|
|
@@ -472,6 +477,7 @@ declare const _default: {
|
|
|
472
477
|
locale?: import('../utils/formValidator').ValidationLocale;
|
|
473
478
|
from?: string;
|
|
474
479
|
to?: string;
|
|
480
|
+
xlsxOptions?: import('../utils/xlsxReportBuilder').CISurveyXlsxCustomOptions;
|
|
475
481
|
}): Promise<{
|
|
476
482
|
filename: string;
|
|
477
483
|
contentType: string;
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ValidationLocale } from './formValidator';
|
|
2
|
+
import { CISurveyXlsxCustomOptions } from './xlsxReportBuilder';
|
|
3
|
+
export type { CISurveyXlsxCustomOptions } from './xlsxReportBuilder';
|
|
2
4
|
export declare const NO_OPINION_VALUE = "__na__";
|
|
3
5
|
export declare function resolveNoOpinionLabels(raw?: Record<string, string> | string): Record<string, string>;
|
|
4
6
|
export type CISurveyQuestionType = 'single_choice' | 'multiple_choice' | 'dropdown' | 'image_choice' | 'star_rating' | 'nps' | 'likert_scale' | 'matrix_single' | 'ranking' | 'short_text' | 'long_text' | 'statement' | 'consent';
|
|
@@ -273,4 +275,4 @@ export declare function computePublicSurveyResults(survey: CISurveyDefinition, r
|
|
|
273
275
|
}[];
|
|
274
276
|
};
|
|
275
277
|
export declare function exportSurveyResponsesToCsv(survey: CISurveyDefinition, rawResponses: any[], locale?: ValidationLocale): string;
|
|
276
|
-
export declare function exportSurveyResponsesToXlsxBuffer(survey: CISurveyDefinition, rawResponses: any[], locale?: ValidationLocale): Buffer;
|
|
278
|
+
export declare function exportSurveyResponsesToXlsxBuffer(survey: CISurveyDefinition, rawResponses: any[], locale?: ValidationLocale, customOptions?: CISurveyXlsxCustomOptions): Buffer;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { ValidationLocale } from './formValidator';
|
|
2
|
+
import { CISurveyDefinition } from './surveyEngine';
|
|
3
|
+
/**
|
|
4
|
+
* Zero-dependency, zero-zlib standards-compliant OOXML (.xlsx) Executive Workbook & Chart Engine.
|
|
5
|
+
* Uses pure TypeScript ZIP STORE (method = 0) + CRC-32 — no native zlib, pako, jszip, or xlsx packages.
|
|
6
|
+
*/
|
|
7
|
+
export type ExcelQuestionChartKind = 'bar' | 'col' | 'doughnut' | 'none';
|
|
8
|
+
export interface ExcelQuestionOverride {
|
|
9
|
+
included?: boolean;
|
|
10
|
+
chartType?: ExcelQuestionChartKind;
|
|
11
|
+
customTitle?: string;
|
|
12
|
+
}
|
|
13
|
+
export interface CISurveyXlsxCustomOptions {
|
|
14
|
+
locale?: ValidationLocale;
|
|
15
|
+
from?: string;
|
|
16
|
+
to?: string;
|
|
17
|
+
reportTitle?: string;
|
|
18
|
+
executiveNote?: string;
|
|
19
|
+
themeColor?: string;
|
|
20
|
+
includeTrendChart?: boolean;
|
|
21
|
+
includeDataBars?: boolean;
|
|
22
|
+
includeRawSheet?: boolean;
|
|
23
|
+
questionOverrides?: Record<string, ExcelQuestionOverride>;
|
|
24
|
+
}
|
|
25
|
+
export declare function buildZipStoreBuffer(entries: Array<{
|
|
26
|
+
path: string;
|
|
27
|
+
data: Uint8Array | string;
|
|
28
|
+
}>): Buffer;
|
|
29
|
+
export declare function getDefaultChartKindForQuestion(qType: string, displayMode?: string): ExcelQuestionChartKind;
|
|
30
|
+
export declare function buildSurveyExecutiveXlsxBuffer(survey: CISurveyDefinition, rawResponses: any[], options?: CISurveyXlsxCustomOptions): Buffer;
|
|
31
|
+
export declare function buildStyledTableXlsxBuffer(params: {
|
|
32
|
+
sheetName: string;
|
|
33
|
+
bannerTitle: string;
|
|
34
|
+
bannerSubtitle?: string;
|
|
35
|
+
themeColor?: string;
|
|
36
|
+
headers: string[];
|
|
37
|
+
rows: Array<Array<string | number | null | undefined>>;
|
|
38
|
+
}): Buffer;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ozguraltan/strapi-content-input",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.28",
|
|
4
4
|
"description": "Locomotive CMS ContentInput visual page/content builder ported to Strapi v5 as a native JSONB Custom Field plugin.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Ozgur Altan <ozguraltan05@gmail.com>",
|
|
@@ -70,12 +70,11 @@
|
|
|
70
70
|
"@strapi/icons": "^2.0.0",
|
|
71
71
|
"lodash": "^4.17.21",
|
|
72
72
|
"react-intl": "^6.6.2",
|
|
73
|
-
"swiper": "^14.4.0"
|
|
74
|
-
"xlsx": "^0.18.5"
|
|
73
|
+
"swiper": "^14.4.0"
|
|
75
74
|
},
|
|
76
75
|
"devDependencies": {
|
|
77
76
|
"@strapi/sdk-plugin": "^6.1.1",
|
|
78
|
-
"@strapi/strapi": "5.
|
|
77
|
+
"@strapi/strapi": "5.63.0",
|
|
79
78
|
"@types/lodash": "^4.17.13",
|
|
80
79
|
"@types/node": "^22.0.0",
|
|
81
80
|
"@types/react": "^18.3.3",
|
|
@@ -84,7 +83,7 @@
|
|
|
84
83
|
"prettier": "^3.3.3",
|
|
85
84
|
"react": "^18.3.1",
|
|
86
85
|
"react-dom": "^18.3.1",
|
|
87
|
-
"react-router-dom": "^
|
|
86
|
+
"react-router-dom": "^7.18.6",
|
|
88
87
|
"styled-components": "^6.1.13",
|
|
89
88
|
"typescript": "^5.7.2"
|
|
90
89
|
},
|
|
@@ -94,7 +93,15 @@
|
|
|
94
93
|
"@strapi/strapi": "^5.0.0",
|
|
95
94
|
"react": "^17.0.0 || ^18.0.0",
|
|
96
95
|
"react-dom": "^17.0.0 || ^18.0.0",
|
|
97
|
-
"react-router-dom": "^6.0.0",
|
|
96
|
+
"react-router-dom": "^6.0.0 || ^7.0.0",
|
|
98
97
|
"styled-components": "^6.0.0"
|
|
98
|
+
},
|
|
99
|
+
"overrides": {
|
|
100
|
+
"@hono/node-server": "^2.1.9",
|
|
101
|
+
"glob": "^14.0.6",
|
|
102
|
+
"minimatch": "^11.0.9",
|
|
103
|
+
"react-router": "^7.18.6",
|
|
104
|
+
"react-router-dom": "^7.18.6",
|
|
105
|
+
"zod": "^4.6.7"
|
|
99
106
|
}
|
|
100
107
|
}
|