@ozguraltan/strapi-content-input 1.0.26 → 1.0.27

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.
@@ -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.26",
3
+ "version": "1.0.27",
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,8 +70,7 @@
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",