@ozguraltan/strapi-content-input 1.0.21 → 1.0.23

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 (29) hide show
  1. package/README.md +42 -13
  2. package/dist/admin/{AnalyticsHubPage-DsrcGI_Y.mjs → AnalyticsHubPage-Dvpx3KsP.mjs} +168 -55
  3. package/dist/admin/{AnalyticsHubPage-0p0Mx4AU.js → AnalyticsHubPage-K_trli5i.js} +186 -55
  4. package/dist/admin/{ContentInputField-CHXrzvE-.mjs → ContentInputField-C2kmtUwD.mjs} +328 -366
  5. package/dist/admin/{ContentInputField-7rWLSx_7.js → ContentInputField-CjxYYEps.js} +343 -381
  6. package/dist/admin/{SurveyWidgetEditor-BVN6X_3G.mjs → SurveyWidgetEditor-DMWOkHUt.mjs} +3271 -227
  7. package/dist/admin/{SurveyWidgetEditor-BmgYQaQS.js → SurveyWidgetEditor-DOYxWop9.js} +3247 -203
  8. package/dist/admin/{index-hFIuYqu5.mjs → index-AePRA0IB.mjs} +2 -2
  9. package/dist/admin/{index-CZAwXCFH.js → index-B9C8Qrfd.js} +2 -2
  10. package/dist/admin/index.js +1 -1
  11. package/dist/admin/index.mjs +1 -1
  12. package/dist/admin/src/components/common/CIImageSettingsControl.d.ts +17 -0
  13. package/dist/admin/src/components/widgets/CustomCardWidgetEditor.d.ts +1 -0
  14. package/dist/admin/src/components/widgets/HeroSliderStage.d.ts +3 -0
  15. package/dist/admin/src/components/widgets/SurveyLivePreviewPane.d.ts +9 -0
  16. package/dist/admin/src/components/widgets/SurveyWidgetEditor.d.ts +3 -1
  17. package/dist/admin/src/core/canvasClasses.d.ts +1 -0
  18. package/dist/admin/src/core/types.d.ts +12 -0
  19. package/dist/server/index.js +1359 -196
  20. package/dist/server/index.mjs +1341 -196
  21. package/dist/server/src/config/index.d.ts +4 -0
  22. package/dist/server/src/controllers/ci-image.d.ts +11 -2
  23. package/dist/server/src/controllers/index.d.ts +1 -0
  24. package/dist/server/src/index.d.ts +15 -1
  25. package/dist/server/src/services/ci-survey.d.ts +10 -1
  26. package/dist/server/src/services/index.d.ts +10 -1
  27. package/dist/server/src/utils/image-variants.d.ts +74 -0
  28. package/dist/server/src/utils/surveyEngine.d.ts +5 -0
  29. package/package.json +1 -1
@@ -153,7 +153,7 @@ const index = {
153
153
  },
154
154
  icon: PluginIcon,
155
155
  components: {
156
- Input: async () => import("./ContentInputField-CHXrzvE-.mjs").then((mod) => ({
156
+ Input: async () => import("./ContentInputField-C2kmtUwD.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-DsrcGI_Y.mjs").then((mod) => ({
191
+ Component: () => import("./AnalyticsHubPage-Dvpx3KsP.mjs").then((mod) => ({
192
192
  default: mod.AnalyticsHubPage
193
193
  })),
194
194
  position: 7
@@ -156,7 +156,7 @@ const index = {
156
156
  },
157
157
  icon: PluginIcon,
158
158
  components: {
159
- Input: async () => Promise.resolve().then(() => require("./ContentInputField-7rWLSx_7.js")).then((mod) => ({
159
+ Input: async () => Promise.resolve().then(() => require("./ContentInputField-CjxYYEps.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-0p0Mx4AU.js")).then((mod) => ({
194
+ Component: () => Promise.resolve().then(() => require("./AnalyticsHubPage-K_trli5i.js")).then((mod) => ({
195
195
  default: mod.AnalyticsHubPage
196
196
  })),
197
197
  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-CZAwXCFH.js");
3
+ const index = require("./index-B9C8Qrfd.js");
4
4
  require("react");
5
5
  exports.default = index.index;
@@ -1,4 +1,4 @@
1
- import { i } from "./index-hFIuYqu5.mjs";
1
+ import { i } from "./index-AePRA0IB.mjs";
2
2
  import "react";
3
3
  export {
4
4
  i as default
@@ -0,0 +1,17 @@
1
+ import { default as React } from 'react';
2
+ export interface CIImageSettingsValue {
3
+ process?: '' | 'auto' | 'fit' | 'widen' | 'none' | 'no-process' | string;
4
+ cWidth?: number;
5
+ cHeight?: number;
6
+ quality?: number;
7
+ }
8
+ export interface CIImageSettingsControlProps {
9
+ value?: CIImageSettingsValue | null;
10
+ onChange: (next: CIImageSettingsValue) => void;
11
+ locale?: string;
12
+ label?: string;
13
+ defaultWidth?: number;
14
+ defaultHeight?: number;
15
+ compact?: boolean;
16
+ }
17
+ export declare const CIImageSettingsControl: React.FC<CIImageSettingsControlProps>;
@@ -36,6 +36,7 @@ export interface CustomCardDesign {
36
36
  accentColor: string;
37
37
  borderColor: string;
38
38
  imageHeight: string;
39
+ imageSettings?: Record<string, any>;
39
40
  heightMode?: 'equal' | 'fixed' | 'auto';
40
41
  cardHeight?: string;
41
42
  }
@@ -33,6 +33,7 @@ export interface HeroSliderLayer {
33
33
  parallax?: number;
34
34
  image?: CIMediaAsset | null;
35
35
  imageWidth?: string;
36
+ imageSettings?: Record<string, any>;
36
37
  buttons?: Array<{
37
38
  id: string;
38
39
  label: Record<string, string> | string;
@@ -59,10 +60,12 @@ export interface HeroSlideItem {
59
60
  deviceVisibility?: HeroSlideDeviceVisibility;
60
61
  bgType: 'image' | 'gradient' | 'video';
61
62
  bgImage?: CIMediaAsset | null;
63
+ imageSettings?: Record<string, any>;
62
64
  bgGradient?: string;
63
65
  bgVideoUrl?: string;
64
66
  mobileBgType?: 'inherit' | 'image' | 'gradient' | 'video';
65
67
  mobileBgImage?: CIMediaAsset | null;
68
+ mobileImageSettings?: Record<string, any>;
66
69
  mobileBgGradient?: string;
67
70
  mobileBgVideoUrl?: string;
68
71
  aspectRatios?: {
@@ -0,0 +1,9 @@
1
+ import { default as React } from 'react';
2
+ import { CISurveyRecord } from './SurveyWidgetEditor';
3
+ import { StrapiLocaleInfo } from '../../core/useStrapiLocales';
4
+ export interface SurveyLivePreviewPaneProps {
5
+ draft: CISurveyRecord;
6
+ uiLocale: string;
7
+ strapiLocales: StrapiLocaleInfo[];
8
+ }
9
+ export declare const SurveyLivePreviewPane: React.FC<SurveyLivePreviewPaneProps>;
@@ -38,6 +38,7 @@ export interface CISurveyQuestionDef {
38
38
  scaleMax?: number;
39
39
  lowLabel?: Record<string, string> | string;
40
40
  highLabel?: Record<string, string> | string;
41
+ scaleLabels?: Record<string, Record<string, string> | string>;
41
42
  options?: CISurveyOptionItem[];
42
43
  matrixRows?: CISurveyOptionItem[];
43
44
  matrixColumns?: CISurveyOptionItem[];
@@ -79,10 +80,11 @@ export interface CISurveyRecord {
79
80
  npsScore?: number | null;
80
81
  }
81
82
  export declare function createBlankSurveyDraft(locale?: string): CISurveyRecord;
83
+ export type SurveyStudioTabId = 'builder' | 'preview' | 'settings' | 'analytics';
82
84
  export interface SurveyStudioModalProps {
83
85
  open: boolean;
84
86
  initialSurvey: CISurveyRecord;
85
- initialTab?: 'builder' | 'settings' | 'analytics';
87
+ initialTab?: SurveyStudioTabId;
86
88
  uiLocale?: string;
87
89
  onClose: () => void;
88
90
  onSaved?: (saved: CISurveyRecord) => void;
@@ -14,6 +14,7 @@ export declare function extractResponsiveProp(lp: Record<string, any> | undefine
14
14
  export declare function setResponsiveProp(lp: Record<string, any> | undefined, baseKey: string, bpIndex: number, value: string | null, camelKey?: string): Record<string, any>;
15
15
  export declare function rowCanvasClasses(row?: Partial<CIRowNode>): string[];
16
16
  export declare function blockCanvasClasses(block?: Partial<CIBlockNode>): string[];
17
+ export declare function resolveCanvasMediaUrl(assetOrUrl: any, imageSettings?: Record<string, any> | null): string;
17
18
  export declare function nodeCanvasStyles(node: {
18
19
  styleOptions?: Record<string, any>;
19
20
  bgImage?: any;
@@ -1,9 +1,20 @@
1
1
  import { default as React } from 'react';
2
2
  export type CIDeviceKey = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
3
3
  export type BreakpointKey = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | CIDeviceKey;
4
+ export interface CIMediaFormatEntry {
5
+ url: string;
6
+ width?: number;
7
+ height?: number;
8
+ mime?: string;
9
+ size?: number;
10
+ }
4
11
  export interface CIMediaAsset {
12
+ id?: number | string;
13
+ hash?: string;
5
14
  target_url: string;
6
15
  url?: string;
16
+ original_url?: string;
17
+ optimized_url?: string;
7
18
  filename?: string;
8
19
  mime_type?: string;
9
20
  size?: number;
@@ -12,6 +23,7 @@ export interface CIMediaAsset {
12
23
  caption?: string;
13
24
  alt?: string;
14
25
  srcset?: any;
26
+ formats?: Record<string, CIMediaFormatEntry>;
15
27
  }
16
28
  export interface CIParallaxOptions {
17
29
  type: 'scroll' | 'scale' | 'opacity' | 'scroll-opacity' | 'scale-opacity';