@ozguraltan/strapi-content-input 0.0.0-stage → 1.0.6
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 +353 -2
- package/dist/admin/ContentInputField-BM2WS_KZ.js +18227 -0
- package/dist/admin/ContentInputField-D6rlm6Te.mjs +18224 -0
- package/dist/admin/en-D7v9nv9J.mjs +9 -0
- package/dist/admin/en-DF-a59T_.js +9 -0
- package/dist/admin/index-BA2XyNVO.mjs +172 -0
- package/dist/admin/index-IuCWhUHI.js +173 -0
- package/dist/admin/index.js +5 -0
- package/dist/admin/index.mjs +5 -0
- package/dist/admin/src/components/ContentInputField.d.ts +23 -0
- package/dist/admin/src/components/editor/CIContextMenu.d.ts +2 -0
- package/dist/admin/src/components/editor/CanvasNodes.d.ts +21 -0
- package/dist/admin/src/components/editor/VECanvas.d.ts +2 -0
- package/dist/admin/src/components/editor/VEInsertPoint.d.ts +7 -0
- package/dist/admin/src/components/editor/VELeftPanel.d.ts +5 -0
- package/dist/admin/src/components/editor/VENodeToolbar.d.ts +13 -0
- package/dist/admin/src/components/editor/VEPreviewFrame.d.ts +7 -0
- package/dist/admin/src/components/editor/VETopBar.d.ts +5 -0
- package/dist/admin/src/components/editor/VisualEditorModal.d.ts +6 -0
- package/dist/admin/src/components/editor/inspector/StyleControls.d.ts +49 -0
- package/dist/admin/src/components/editor/inspector/UnitInput.d.ts +18 -0
- package/dist/admin/src/components/editor/inspector/VEInspector.d.ts +5 -0
- package/dist/admin/src/components/icons/MaterialIcon.d.ts +9 -0
- package/dist/admin/src/components/widgets/MenuWidgetEditor.d.ts +30 -0
- package/dist/admin/src/components/widgets/RichHtmlEditor.d.ts +8 -0
- package/dist/admin/src/components/widgets/StrapiMediaPicker.d.ts +9 -0
- package/dist/admin/src/components/widgets/TabAccordionEditor.d.ts +26 -0
- package/dist/admin/src/components/widgets/WidgetEditor.d.ts +12 -0
- package/dist/admin/src/components/widgets/WidgetPreview.d.ts +9 -0
- package/dist/admin/src/core/EditorContext.d.ts +144 -0
- package/dist/admin/src/core/canvasClasses.d.ts +21 -0
- package/dist/admin/src/core/clipboard.d.ts +9 -0
- package/dist/admin/src/core/devices.d.ts +24 -0
- package/dist/admin/src/core/history.d.ts +13 -0
- package/dist/admin/src/core/i18n.d.ts +5 -0
- package/dist/admin/src/core/presets.d.ts +43 -0
- package/dist/admin/src/core/sampleData.d.ts +2 -0
- package/dist/admin/src/core/treeOps.d.ts +10 -0
- package/dist/admin/src/core/types.d.ts +79 -0
- package/dist/admin/src/index.d.ts +14 -0
- package/dist/admin/src/pluginId.d.ts +1 -0
- package/dist/admin/src/styles/ciCanvasStyles.d.ts +2 -0
- package/dist/admin/tr-ByHzf64V.mjs +9 -0
- package/dist/admin/tr-SNvSmKZQ.js +9 -0
- package/dist/server/index.js +702 -0
- package/dist/server/index.mjs +702 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/config/index.d.ts +7 -0
- package/dist/server/src/content-types/ci-menu/schema.json.d.ts +46 -0
- package/dist/server/src/content-types/ci-template/schema.json.d.ts +42 -0
- package/dist/server/src/content-types/index.d.ts +88 -0
- package/dist/server/src/controllers/ci-menu.d.ts +12 -0
- package/dist/server/src/controllers/ci-template.d.ts +9 -0
- package/dist/server/src/controllers/index.d.ts +20 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/index.d.ts +187 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/routes/index.d.ts +14 -0
- package/dist/server/src/services/ci-menu.d.ts +36 -0
- package/dist/server/src/services/ci-template.d.ts +16 -0
- package/dist/server/src/services/index.d.ts +51 -0
- package/package.json +96 -4
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CIWidgetNode, CIRowNode } from '../../core/types';
|
|
3
|
+
export interface NormalizedTabAccNode {
|
|
4
|
+
_uId: string;
|
|
5
|
+
title: string;
|
|
6
|
+
header: {
|
|
7
|
+
text: string;
|
|
8
|
+
icon?: string;
|
|
9
|
+
color?: string;
|
|
10
|
+
textColor?: string;
|
|
11
|
+
};
|
|
12
|
+
contentMode: 'text' | 'blocks';
|
|
13
|
+
html: string;
|
|
14
|
+
rows: CIRowNode[];
|
|
15
|
+
}
|
|
16
|
+
export declare function hasMeaningfulHtml(raw?: string | null): boolean;
|
|
17
|
+
export declare function normalizeTabAccNode(raw: any, index: number, fallbackPrefix: string, defaultLabel?: string): NormalizedTabAccNode;
|
|
18
|
+
export declare function serializeTabAccNode(node: NormalizedTabAccNode): any;
|
|
19
|
+
export interface TabAccordionEditorProps {
|
|
20
|
+
widget: CIWidgetNode;
|
|
21
|
+
onChange: (patch: {
|
|
22
|
+
data?: any;
|
|
23
|
+
options?: Record<string, any>;
|
|
24
|
+
}) => void;
|
|
25
|
+
}
|
|
26
|
+
export declare const TabAccordionEditor: React.FC<TabAccordionEditorProps>;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CIWidgetNode } from '../../core/types';
|
|
3
|
+
export interface WidgetEditorProps {
|
|
4
|
+
widget: CIWidgetNode;
|
|
5
|
+
onChange: (patch: {
|
|
6
|
+
data?: any;
|
|
7
|
+
options?: Record<string, any>;
|
|
8
|
+
}) => void;
|
|
9
|
+
}
|
|
10
|
+
export declare function extractYoutubeId(input: string): string;
|
|
11
|
+
export declare function extractYoutubeEmbedUrl(input: string): string;
|
|
12
|
+
export declare const WidgetEditor: React.FC<WidgetEditorProps>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CIWidgetNode } from '../../core/types';
|
|
3
|
+
export interface WidgetPreviewProps {
|
|
4
|
+
widget: CIWidgetNode;
|
|
5
|
+
isEditing?: boolean;
|
|
6
|
+
onInlineHtmlChange?: (html: string) => void;
|
|
7
|
+
onFinishInlineEdit?: () => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const WidgetPreview: React.FC<WidgetPreviewProps>;
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CIRowNode, CIBlockNode, CIWidgetNode, BreakpointKey } from './types';
|
|
3
|
+
import { SupportedLocale } from './i18n';
|
|
4
|
+
export interface SelectionTarget {
|
|
5
|
+
type: 'row' | 'block' | 'widget';
|
|
6
|
+
rowIndex: number;
|
|
7
|
+
blockIndex: number | null;
|
|
8
|
+
widgetIndex: number | null;
|
|
9
|
+
}
|
|
10
|
+
export interface ContextMenuState {
|
|
11
|
+
x: number;
|
|
12
|
+
y: number;
|
|
13
|
+
type: 'row' | 'block' | 'widget';
|
|
14
|
+
rowIndex: number;
|
|
15
|
+
blockIndex?: number | null;
|
|
16
|
+
widgetIndex?: number | null;
|
|
17
|
+
inVisualEditor?: boolean;
|
|
18
|
+
}
|
|
19
|
+
export type DragPayload = {
|
|
20
|
+
type: 'row';
|
|
21
|
+
rowIndex: number;
|
|
22
|
+
} | {
|
|
23
|
+
type: 'block';
|
|
24
|
+
rowIndex: number;
|
|
25
|
+
blockIndex: number;
|
|
26
|
+
} | {
|
|
27
|
+
type: 'widget';
|
|
28
|
+
rowIndex: number;
|
|
29
|
+
blockIndex: number;
|
|
30
|
+
widgetIndex: number;
|
|
31
|
+
} | {
|
|
32
|
+
type: 'new-widget';
|
|
33
|
+
widgetId: string;
|
|
34
|
+
} | {
|
|
35
|
+
type: 'new-row-preset';
|
|
36
|
+
cols: number[][];
|
|
37
|
+
};
|
|
38
|
+
export interface EditorContextValue {
|
|
39
|
+
locale: SupportedLocale;
|
|
40
|
+
setLocale: (loc: SupportedLocale) => void;
|
|
41
|
+
t: (key: string, fallback?: string) => string;
|
|
42
|
+
rows: CIRowNode[];
|
|
43
|
+
selected: SelectionTarget | null;
|
|
44
|
+
hovered: SelectionTarget | null;
|
|
45
|
+
selectedRow: CIRowNode | null;
|
|
46
|
+
selectedBlock: CIBlockNode | null;
|
|
47
|
+
selectedWidget: CIWidgetNode | null;
|
|
48
|
+
device: BreakpointKey;
|
|
49
|
+
customWidth: number | null;
|
|
50
|
+
deviceWidth: number;
|
|
51
|
+
zoom: 'fit' | number;
|
|
52
|
+
previewMode: 'edit' | 'preview';
|
|
53
|
+
leftOpen: boolean;
|
|
54
|
+
rightOpen: boolean;
|
|
55
|
+
leftTab: 'widgets' | 'layers' | 'templates';
|
|
56
|
+
canUndo: boolean;
|
|
57
|
+
canRedo: boolean;
|
|
58
|
+
dragItem: DragPayload | null;
|
|
59
|
+
contextMenu: ContextMenuState | null;
|
|
60
|
+
expandedWidgetPos: {
|
|
61
|
+
rowIndex: number;
|
|
62
|
+
blockIndex: number;
|
|
63
|
+
widgetIndex: number;
|
|
64
|
+
} | null;
|
|
65
|
+
quickAddWidgetTarget: {
|
|
66
|
+
rowIndex: number;
|
|
67
|
+
blockIndex: number;
|
|
68
|
+
insertIndex?: number;
|
|
69
|
+
} | null;
|
|
70
|
+
requestOpenVisualEditor: boolean;
|
|
71
|
+
setDragItem: (item: DragPayload | null) => void;
|
|
72
|
+
setDevice: (d: BreakpointKey) => void;
|
|
73
|
+
setCustomWidth: (w: number | null) => void;
|
|
74
|
+
setZoom: (z: 'fit' | number) => void;
|
|
75
|
+
setPreviewMode: (m: 'edit' | 'preview') => void;
|
|
76
|
+
setLeftOpen: (v: boolean) => void;
|
|
77
|
+
setRightOpen: (v: boolean) => void;
|
|
78
|
+
setLeftTab: (t: 'widgets' | 'layers' | 'templates') => void;
|
|
79
|
+
openContextMenu: (menu: ContextMenuState) => void;
|
|
80
|
+
closeContextMenu: () => void;
|
|
81
|
+
setExpandedWidgetPos: (pos: {
|
|
82
|
+
rowIndex: number;
|
|
83
|
+
blockIndex: number;
|
|
84
|
+
widgetIndex: number;
|
|
85
|
+
} | null) => void;
|
|
86
|
+
setQuickAddWidgetTarget: (target: {
|
|
87
|
+
rowIndex: number;
|
|
88
|
+
blockIndex: number;
|
|
89
|
+
insertIndex?: number;
|
|
90
|
+
} | null) => void;
|
|
91
|
+
setRequestOpenVisualEditor: (v: boolean) => void;
|
|
92
|
+
select: (target: {
|
|
93
|
+
type: 'row' | 'block' | 'widget';
|
|
94
|
+
rowIndex: number;
|
|
95
|
+
blockIndex?: number | null;
|
|
96
|
+
widgetIndex?: number | null;
|
|
97
|
+
}) => void;
|
|
98
|
+
clearSelection: () => void;
|
|
99
|
+
hover: (target: {
|
|
100
|
+
type: 'row' | 'block' | 'widget';
|
|
101
|
+
rowIndex: number;
|
|
102
|
+
blockIndex?: number | null;
|
|
103
|
+
widgetIndex?: number | null;
|
|
104
|
+
} | null) => void;
|
|
105
|
+
isSelected: (type: 'row' | 'block' | 'widget', rowIndex: number, blockIndex?: number, widgetIndex?: number) => boolean;
|
|
106
|
+
isHovered: (type: 'row' | 'block' | 'widget', rowIndex: number, blockIndex?: number, widgetIndex?: number) => boolean;
|
|
107
|
+
setRows: (next: CIRowNode[]) => void;
|
|
108
|
+
undo: () => void;
|
|
109
|
+
redo: () => void;
|
|
110
|
+
addRowPreset: (colsList: number[][]) => void;
|
|
111
|
+
insertRowPresetAt: (colsList: number[][], index: number) => void;
|
|
112
|
+
updateRow: (rowIndex: number, patch: Partial<CIRowNode>) => void;
|
|
113
|
+
duplicateRow: (rowIndex: number) => void;
|
|
114
|
+
removeRow: (rowIndex: number) => void;
|
|
115
|
+
moveRow: (rowIndex: number, delta: number) => void;
|
|
116
|
+
moveRowTo: (fromRowIndex: number, insertIndex: number) => void;
|
|
117
|
+
addBlock: (rowIndex: number, cols?: number[]) => void;
|
|
118
|
+
updateBlock: (rowIndex: number, blockIndex: number, patch: Partial<CIBlockNode>) => void;
|
|
119
|
+
duplicateBlock: (rowIndex: number, blockIndex: number) => void;
|
|
120
|
+
removeBlock: (rowIndex: number, blockIndex: number) => void;
|
|
121
|
+
moveBlock: (rowIndex: number, blockIndex: number, delta: number) => void;
|
|
122
|
+
moveBlockTo: (fromRowIndex: number, fromBlockIndex: number, toRowIndex: number, insertBlockIndex?: number) => void;
|
|
123
|
+
addWidget: (rowIndex: number, blockIndex: number, widgetId: string) => void;
|
|
124
|
+
insertWidgetAt: (rowIndex: number, blockIndex: number, widgetId: string, index: number) => void;
|
|
125
|
+
updateWidget: (rowIndex: number, blockIndex: number, widgetIndex: number, patch: Partial<CIWidgetNode>) => void;
|
|
126
|
+
duplicateWidget: (rowIndex: number, blockIndex: number, widgetIndex: number) => void;
|
|
127
|
+
removeWidget: (rowIndex: number, blockIndex: number, widgetIndex: number) => void;
|
|
128
|
+
moveWidget: (rowIndex: number, blockIndex: number, widgetIndex: number, delta: number) => void;
|
|
129
|
+
moveWidgetTo: (fromRowIndex: number, fromBlockIndex: number, fromWidgetIndex: number, toRowIndex: number, toBlockIndex: number, insertWidgetIndex?: number) => void;
|
|
130
|
+
copySelected: () => void;
|
|
131
|
+
pasteClipboard: () => void;
|
|
132
|
+
}
|
|
133
|
+
export declare const EditorProvider: React.FC<{
|
|
134
|
+
value: CIRowNode[];
|
|
135
|
+
onChange: (rows: CIRowNode[]) => void;
|
|
136
|
+
children: React.ReactNode;
|
|
137
|
+
}>;
|
|
138
|
+
export declare function useEditorContext(): EditorContextValue;
|
|
139
|
+
export declare function useOptionalEditorContext(): EditorContextValue | null;
|
|
140
|
+
export declare function useEditorTranslator(): {
|
|
141
|
+
locale: SupportedLocale;
|
|
142
|
+
setLocale: (loc: SupportedLocale) => void;
|
|
143
|
+
t: (key: string, fallback?: string) => string;
|
|
144
|
+
};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { CIRowNode, CIBlockNode } from './types';
|
|
3
|
+
export declare const BP_INFIXES: string[];
|
|
4
|
+
/**
|
|
5
|
+
* Helper to extract a 5-breakpoint array [xs, sm, md, lg, xl] from layoutProps
|
|
6
|
+
* supporting both cms-core object keys (e.g. 'align', 'align-sm', 'align-md', ...)
|
|
7
|
+
* and array format (e.g. layoutProps.align = ['center', ...]).
|
|
8
|
+
*/
|
|
9
|
+
export declare function extractResponsiveProp(lp: Record<string, any> | undefined, baseKey: string, camelKey?: string): Array<string | null>;
|
|
10
|
+
/**
|
|
11
|
+
* Writes a responsive property into layoutProps in BOTH array and cms-core key formats
|
|
12
|
+
* so that Strapi JSONB data works seamlessly with cms-core and Nuxt Vuetify/Element-Plus.
|
|
13
|
+
*/
|
|
14
|
+
export declare function setResponsiveProp(lp: Record<string, any> | undefined, baseKey: string, bpIndex: number, value: string | null, camelKey?: string): Record<string, any>;
|
|
15
|
+
export declare function rowCanvasClasses(row?: Partial<CIRowNode>): string[];
|
|
16
|
+
export declare function blockCanvasClasses(block?: Partial<CIBlockNode>): string[];
|
|
17
|
+
export declare function nodeCanvasStyles(node: {
|
|
18
|
+
styleOptions?: Record<string, any>;
|
|
19
|
+
bgImage?: any;
|
|
20
|
+
bgOptions?: Record<string, any> | null;
|
|
21
|
+
}): React.CSSProperties;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export interface ClipboardPayload {
|
|
2
|
+
type: 'row' | 'block' | 'widget';
|
|
3
|
+
data: any;
|
|
4
|
+
copiedAt: number;
|
|
5
|
+
}
|
|
6
|
+
export declare function copyToClipboard(node: any, type: 'row' | 'block' | 'widget'): boolean;
|
|
7
|
+
export declare function getClipboard(): ClipboardPayload | null;
|
|
8
|
+
export declare function hasClipboard(expectedType?: 'row' | 'block' | 'widget' | null): boolean;
|
|
9
|
+
export declare function clearClipboard(): void;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { BreakpointKey } from './types';
|
|
2
|
+
export interface DeviceConfig {
|
|
3
|
+
key: BreakpointKey;
|
|
4
|
+
label: string;
|
|
5
|
+
labelTr?: string;
|
|
6
|
+
shortLabel: string;
|
|
7
|
+
bpIndex: number;
|
|
8
|
+
suffix: string;
|
|
9
|
+
minWidth: number;
|
|
10
|
+
maxWidth: number;
|
|
11
|
+
previewWidth: number;
|
|
12
|
+
icon: string;
|
|
13
|
+
tooltip: string;
|
|
14
|
+
tooltipTr?: string;
|
|
15
|
+
}
|
|
16
|
+
export declare const DEVICES: DeviceConfig[];
|
|
17
|
+
export declare const DEVICE_MAP: Record<BreakpointKey, DeviceConfig>;
|
|
18
|
+
export declare function getDevice(key: BreakpointKey): DeviceConfig;
|
|
19
|
+
export declare function getDeviceLabel(d: DeviceConfig, locale?: string): string;
|
|
20
|
+
export declare function getDeviceTooltip(d: DeviceConfig, locale?: string): string;
|
|
21
|
+
export declare function resolveDeviceKeyByWidth(width: number): BreakpointKey;
|
|
22
|
+
export declare const WIDTH_PRESETS: number[];
|
|
23
|
+
export declare const ZOOM_OPTIONS: Array<'fit' | number>;
|
|
24
|
+
export declare const DEVICE_INDEX_MAP: Record<string, number>;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { CIRowNode } from './types';
|
|
2
|
+
export interface HistoryManager {
|
|
3
|
+
record: (rows: CIRowNode[]) => void;
|
|
4
|
+
reset: (rows: CIRowNode[]) => void;
|
|
5
|
+
undo: () => CIRowNode[] | null;
|
|
6
|
+
redo: () => CIRowNode[] | null;
|
|
7
|
+
done: () => void;
|
|
8
|
+
readonly canUndo: boolean;
|
|
9
|
+
readonly canRedo: boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare function createHistory({ limit }?: {
|
|
12
|
+
limit?: number;
|
|
13
|
+
}): HistoryManager;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export type SupportedLocale = 'en' | 'tr';
|
|
2
|
+
export declare function getInitialLocale(): SupportedLocale;
|
|
3
|
+
export declare function persistLocale(locale: SupportedLocale): void;
|
|
4
|
+
export declare const translations: Record<SupportedLocale, Record<string, string>>;
|
|
5
|
+
export declare function createTranslator(locale?: string): (key: string, fallback?: string) => string;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { CIRowNode } from './types';
|
|
2
|
+
export interface RowPreset {
|
|
3
|
+
id: string;
|
|
4
|
+
label: string;
|
|
5
|
+
labelTr?: string;
|
|
6
|
+
cols: number[][];
|
|
7
|
+
bars: number[];
|
|
8
|
+
preview: number[];
|
|
9
|
+
}
|
|
10
|
+
export declare const ROW_PRESETS: RowPreset[];
|
|
11
|
+
export declare const WIDGET_CATEGORIES: {
|
|
12
|
+
key: string;
|
|
13
|
+
label: string;
|
|
14
|
+
labelTr: string;
|
|
15
|
+
}[];
|
|
16
|
+
export interface WidgetDefinition {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
labelTr?: string;
|
|
20
|
+
description: string;
|
|
21
|
+
descriptionTr?: string;
|
|
22
|
+
icon: string;
|
|
23
|
+
category: 'content' | 'media' | 'layout' | 'interactive';
|
|
24
|
+
defaultData: any;
|
|
25
|
+
defaultOptions?: Record<string, any>;
|
|
26
|
+
}
|
|
27
|
+
export declare const WIDGET_DEFINITIONS: WidgetDefinition[];
|
|
28
|
+
export declare function getWidgetDefinition(id: string): WidgetDefinition | undefined;
|
|
29
|
+
export declare function getDefaultWidgetData(id: string): any;
|
|
30
|
+
export declare function getDefaultWidgetOptions(id: string): Record<string, any>;
|
|
31
|
+
export declare function getWidgetLabel(def: WidgetDefinition | undefined, locale?: string, fallbackId?: string): string;
|
|
32
|
+
export declare function getWidgetDescription(def: WidgetDefinition | undefined, locale?: string): string;
|
|
33
|
+
export declare function getRowPresetLabel(preset: RowPreset, locale?: string): string;
|
|
34
|
+
export interface SectionTemplate {
|
|
35
|
+
id: string;
|
|
36
|
+
name: string;
|
|
37
|
+
nameTr?: string;
|
|
38
|
+
description: string;
|
|
39
|
+
descriptionTr?: string;
|
|
40
|
+
icon: string;
|
|
41
|
+
build: () => CIRowNode;
|
|
42
|
+
}
|
|
43
|
+
export declare const SECTION_TEMPLATES: SectionTemplate[];
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CIRowNode, CIBlockNode, CIWidgetNode, FoundNodeInfo } from './types';
|
|
2
|
+
export declare function createKey(prefix?: string): string;
|
|
3
|
+
export declare function uid(prefix?: string): string;
|
|
4
|
+
export declare function ensureKeys(list?: CIRowNode[] | null): void;
|
|
5
|
+
export declare function ensureIds(list?: CIRowNode[] | null): CIRowNode[];
|
|
6
|
+
export declare function createWidget(widgetId?: string, customData?: any, customOptions?: Record<string, any>): CIWidgetNode;
|
|
7
|
+
export declare function createBlock(cols?: number[]): CIBlockNode;
|
|
8
|
+
export declare function createRow(blockColsList?: number[][]): CIRowNode;
|
|
9
|
+
export declare function findNode(rows?: CIRowNode[] | null, uId?: string | null): FoundNodeInfo | null;
|
|
10
|
+
export declare function cloneWithNewIds<T = any>(node: T, type?: 'row' | 'block' | 'widget'): T;
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
export type CIDeviceKey = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
3
|
+
export type BreakpointKey = 'sm' | 'md' | 'lg' | 'xl' | '2xl' | CIDeviceKey;
|
|
4
|
+
export interface CIMediaAsset {
|
|
5
|
+
target_url: string;
|
|
6
|
+
url?: string;
|
|
7
|
+
filename?: string;
|
|
8
|
+
mime_type?: string;
|
|
9
|
+
size?: number;
|
|
10
|
+
width?: string | number;
|
|
11
|
+
height?: string | number;
|
|
12
|
+
caption?: string;
|
|
13
|
+
alt?: string;
|
|
14
|
+
srcset?: any;
|
|
15
|
+
}
|
|
16
|
+
export interface CIParallaxOptions {
|
|
17
|
+
type: 'scroll' | 'scale' | 'opacity' | 'scroll-opacity' | 'scale-opacity';
|
|
18
|
+
speed: number;
|
|
19
|
+
videoSrc?: string;
|
|
20
|
+
videoStartTime?: number;
|
|
21
|
+
videoEndTime?: number;
|
|
22
|
+
videoVolume?: number;
|
|
23
|
+
videoLoop?: boolean;
|
|
24
|
+
videoPlayOnlyVisible?: boolean;
|
|
25
|
+
videoLazyLoading?: boolean;
|
|
26
|
+
}
|
|
27
|
+
export interface CIWidgetNode {
|
|
28
|
+
_uId: string;
|
|
29
|
+
id: string;
|
|
30
|
+
options: Record<string, any>;
|
|
31
|
+
data: any;
|
|
32
|
+
files?: any[];
|
|
33
|
+
}
|
|
34
|
+
export interface CIBlockNode {
|
|
35
|
+
_uId: string;
|
|
36
|
+
cols: number[];
|
|
37
|
+
offset?: any;
|
|
38
|
+
layoutProps: Record<string, any>;
|
|
39
|
+
extraClasses?: string[];
|
|
40
|
+
visibility?: boolean[];
|
|
41
|
+
textAlign?: string;
|
|
42
|
+
styleOptions: Record<string, any>;
|
|
43
|
+
bgImage?: CIMediaAsset | null;
|
|
44
|
+
bgOptions?: Record<string, any> | null;
|
|
45
|
+
parallax?: any;
|
|
46
|
+
parallaxOptions?: CIParallaxOptions | null;
|
|
47
|
+
widgets: CIWidgetNode[];
|
|
48
|
+
}
|
|
49
|
+
export interface CIRowNode {
|
|
50
|
+
_uId: string;
|
|
51
|
+
cols?: number[];
|
|
52
|
+
offset?: any;
|
|
53
|
+
layoutProps: Record<string, any>;
|
|
54
|
+
extraClasses?: string[];
|
|
55
|
+
visibility?: boolean[];
|
|
56
|
+
textAlign?: string;
|
|
57
|
+
styleOptions: Record<string, any>;
|
|
58
|
+
bgImage?: CIMediaAsset | null;
|
|
59
|
+
bgOptions?: Record<string, any> | null;
|
|
60
|
+
parallax?: any;
|
|
61
|
+
parallaxOptions?: CIParallaxOptions | null;
|
|
62
|
+
blocks: CIBlockNode[];
|
|
63
|
+
}
|
|
64
|
+
export interface FoundNodeInfo {
|
|
65
|
+
node: any;
|
|
66
|
+
type: 'row' | 'block' | 'widget';
|
|
67
|
+
parent: any | null;
|
|
68
|
+
list: any[];
|
|
69
|
+
index: number;
|
|
70
|
+
path: number[];
|
|
71
|
+
row: CIRowNode;
|
|
72
|
+
block: CIBlockNode | null;
|
|
73
|
+
}
|
|
74
|
+
export interface BreadcrumbItem {
|
|
75
|
+
uId: string;
|
|
76
|
+
type: 'row' | 'block' | 'widget';
|
|
77
|
+
label: string;
|
|
78
|
+
}
|
|
79
|
+
export type StyleObject = React.CSSProperties;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
declare const _default: {
|
|
2
|
+
register(app: any): void;
|
|
3
|
+
bootstrap(): void;
|
|
4
|
+
registerTrads({ locales }: {
|
|
5
|
+
locales: string[];
|
|
6
|
+
}): Promise<({
|
|
7
|
+
data: any;
|
|
8
|
+
locale: string;
|
|
9
|
+
} | {
|
|
10
|
+
data: {};
|
|
11
|
+
locale: string;
|
|
12
|
+
})[]>;
|
|
13
|
+
};
|
|
14
|
+
export default _default;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const PLUGIN_ID = "content-input";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const tr = {
|
|
2
|
+
"content-input.plugin.name": "Content Input (Görsel Sayfa Oluşturucu)",
|
|
3
|
+
"content-input.plugin.description": "Satır, 12 sütunlu duyarlı blok ve 13 bileşen destekli görsel sayfa/içerik düzenleyici",
|
|
4
|
+
"content-input.options.advanced.requiredField": "Zorunlu alan",
|
|
5
|
+
"content-input.options.advanced.requiredField.description": "Bu alan boş bırakılamaz."
|
|
6
|
+
};
|
|
7
|
+
export {
|
|
8
|
+
tr as default
|
|
9
|
+
};
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const tr = {
|
|
4
|
+
"content-input.plugin.name": "Content Input (Görsel Sayfa Oluşturucu)",
|
|
5
|
+
"content-input.plugin.description": "Satır, 12 sütunlu duyarlı blok ve 13 bileşen destekli görsel sayfa/içerik düzenleyici",
|
|
6
|
+
"content-input.options.advanced.requiredField": "Zorunlu alan",
|
|
7
|
+
"content-input.options.advanced.requiredField.description": "Bu alan boş bırakılamaz."
|
|
8
|
+
};
|
|
9
|
+
exports.default = tr;
|