@ozguraltan/strapi-content-input 1.0.23 → 1.0.25

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.
@@ -156,7 +156,7 @@ const index = {
156
156
  },
157
157
  icon: PluginIcon,
158
158
  components: {
159
- Input: async () => Promise.resolve().then(() => require("./ContentInputField-CjxYYEps.js")).then((mod) => ({
159
+ Input: async () => Promise.resolve().then(() => require("./ContentInputField-CnVzTBNf.js")).then((mod) => ({
160
160
  default: mod.ContentInputField
161
161
  }))
162
162
  },
@@ -191,7 +191,7 @@ const index = {
191
191
  defaultMessage: "ContentInput Hub"
192
192
  },
193
193
  permissions: [],
194
- Component: () => Promise.resolve().then(() => require("./AnalyticsHubPage-K_trli5i.js")).then((mod) => ({
194
+ Component: () => Promise.resolve().then(() => require("./AnalyticsHubPage-0fb7chuv.js")).then((mod) => ({
195
195
  default: mod.AnalyticsHubPage
196
196
  })),
197
197
  position: 7
@@ -153,7 +153,7 @@ const index = {
153
153
  },
154
154
  icon: PluginIcon,
155
155
  components: {
156
- Input: async () => import("./ContentInputField-C2kmtUwD.mjs").then((mod) => ({
156
+ Input: async () => import("./ContentInputField-C-fh5qGC.mjs").then((mod) => ({
157
157
  default: mod.ContentInputField
158
158
  }))
159
159
  },
@@ -188,7 +188,7 @@ const index = {
188
188
  defaultMessage: "ContentInput Hub"
189
189
  },
190
190
  permissions: [],
191
- Component: () => import("./AnalyticsHubPage-Dvpx3KsP.mjs").then((mod) => ({
191
+ Component: () => import("./AnalyticsHubPage-BO6Lg1qh.mjs").then((mod) => ({
192
192
  default: mod.AnalyticsHubPage
193
193
  })),
194
194
  position: 7
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
2
  Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
3
- const index = require("./index-B9C8Qrfd.js");
3
+ const index = require("./index--fSIDKkt.js");
4
4
  require("react");
5
5
  exports.default = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "./index-AePRA0IB.mjs";
1
+ import { i } from "./index-BdrFmPg5.mjs";
2
2
  import "react";
3
3
  export {
4
4
  i as default
@@ -0,0 +1,35 @@
1
+ import { default as React } from 'react';
2
+ import { CISurveyRecord } from './SurveyWidgetEditor';
3
+ export interface SurveyExportModalProps {
4
+ open: boolean;
5
+ uiLocale?: string;
6
+ targetSurvey?: CISurveyRecord | null;
7
+ allowAllSurveys?: boolean;
8
+ defaultScope?: 'single' | 'all';
9
+ totalSurveysCount?: number;
10
+ isUnsavedDraft?: boolean;
11
+ onClose: () => void;
12
+ }
13
+ export declare const SurveyExportModal: React.FC<SurveyExportModalProps>;
14
+ export interface SurveyImportModalProps {
15
+ open: boolean;
16
+ uiLocale?: string;
17
+ existingSlugs?: string[];
18
+ onClose: () => void;
19
+ onImported: (result: {
20
+ importedCount: number;
21
+ importedResponsesCount: number;
22
+ importedSurveys: CISurveyRecord[];
23
+ }) => void;
24
+ }
25
+ export declare const SurveyImportModal: React.FC<SurveyImportModalProps>;
26
+ export type CleanupActionKind = 'purge-demo' | 'clear-responses' | 'delete-survey';
27
+ export interface SurveyCleanupConfirmModalProps {
28
+ open: boolean;
29
+ action: CleanupActionKind | null;
30
+ uiLocale?: string;
31
+ targetSurvey?: CISurveyRecord | null;
32
+ onClose: () => void;
33
+ onCompleted: (action: CleanupActionKind, payload?: any) => void;
34
+ }
35
+ export declare const SurveyCleanupConfirmModal: React.FC<SurveyCleanupConfirmModalProps>;
@@ -0,0 +1,54 @@
1
+ import { CISurveyQuestionDef, CISurveyRecord, CISurveyStepDef } from './SurveyWidgetEditor';
2
+ export interface QuestionDropTarget {
3
+ stepId: string;
4
+ targetQuestionKey?: string;
5
+ position?: 'before' | 'after' | 'end';
6
+ }
7
+ /**
8
+ * Ensures `steps` is non-empty for multi_step surveys, assigns any orphaned/unassigned
9
+ * questions to the first step, and orders `questions` canonically by `(stepIndex, intraStepOrder)`.
10
+ */
11
+ export declare function normalizeMultiStepDraft(draft: CISurveyRecord): CISurveyRecord;
12
+ /**
13
+ * Returns a map of `stepId -> Array<{ question, globalIndex, stepIndex }>` for rendering
14
+ * Step Accordions cleanly.
15
+ */
16
+ export declare function groupQuestionsByStep(questions: CISurveyQuestionDef[], steps: CISurveyStepDef[]): Map<string, Array<{
17
+ question: CISurveyQuestionDef;
18
+ globalIndex: number;
19
+ localIndex: number;
20
+ }>>;
21
+ /**
22
+ * Reorders a step (category) relative to another step ('before' or 'after'),
23
+ * and re-normalizes `draft.questions` so global question order matches the new step order.
24
+ */
25
+ export declare function reorderStepsInDraft(draft: CISurveyRecord, sourceStepId: string, targetStepId: string, position?: 'before' | 'after'): CISurveyRecord;
26
+ /**
27
+ * Moves a step up (`delta = -1`) or down (`delta = 1`) by one slot.
28
+ */
29
+ export declare function shiftStepByOffset(draft: CISurveyRecord, stepId: string, delta: -1 | 1): CISurveyRecord;
30
+ /**
31
+ * Moves an existing question within its current step OR across different steps (categories),
32
+ * updating `stepId` automatically and preserving canonical step ordering.
33
+ */
34
+ export declare function moveQuestionInMultiStepDraft(draft: CISurveyRecord, sourceQuestionKey: string, target: QuestionDropTarget): CISurveyRecord;
35
+ /**
36
+ * Inserts a newly created question directly into a specific step (at a specific position or at the end).
37
+ */
38
+ export declare function insertQuestionInMultiStepDraft(draft: CISurveyRecord, newQuestion: CISurveyQuestionDef, target: QuestionDropTarget): {
39
+ draft: CISurveyRecord;
40
+ insertedIndex: number;
41
+ };
42
+ /**
43
+ * Reorders a question in flat mode (`single_page` or `quick_poll`) using 'before' | 'after' semantics.
44
+ */
45
+ export declare function reorderFlatQuestions(questions: CISurveyQuestionDef[], sourceKey: string, targetKey: string, position?: 'before' | 'after'): CISurveyQuestionDef[];
46
+ /**
47
+ * Deletes a step when `steps.length > 1` and safely reassigns its questions to the adjacent
48
+ * remaining step so no question ever becomes orphaned.
49
+ */
50
+ export declare function deleteStepWithQuestionReassignment(draft: CISurveyRecord, stepIdToDelete: string): {
51
+ draft: CISurveyRecord;
52
+ fallbackStepId: string;
53
+ movedQuestionCount: number;
54
+ };