Initial commit: igny8 project

This commit is contained in:
igny8
2025-11-09 10:27:02 +00:00
commit 60b8188111
27265 changed files with 4360521 additions and 0 deletions

View File

@@ -0,0 +1,95 @@
/**
* Keyword Form Configuration
* Field definitions for Add/Edit Keyword modal
*/
import { FormField } from '../../components/common/FormModal';
export interface KeywordFormConfig {
fields: FormField[];
}
/**
* Get keyword form fields configuration
* Can be customized with dynamic options (e.g., clusters)
*/
export const getKeywordFormConfig = (options?: {
clusters?: Array<{ id: number; name: string }>;
}): FormField[] => {
const clusterOptions = options?.clusters
? [
{ value: '', label: 'No Cluster' },
...options.clusters.map((c) => ({
value: c.id.toString(),
label: c.name,
})),
]
: [{ value: '', label: 'No Cluster' }];
return [
{
key: 'keyword',
label: 'Keyword',
type: 'text',
placeholder: 'Enter keyword',
value: '',
onChange: () => {},
required: true,
},
{
key: 'volume',
label: 'Volume',
type: 'number',
value: 0,
onChange: () => {},
required: false,
},
{
key: 'difficulty',
label: 'Difficulty',
type: 'number',
value: 0,
onChange: () => {},
min: 1,
max: 5,
required: false,
},
{
key: 'intent',
label: 'Intent',
type: 'select',
value: 'informational',
onChange: () => {},
options: [
{ value: 'informational', label: 'Informational' },
{ value: 'transactional', label: 'Transactional' },
{ value: 'navigational', label: 'Navigational' },
{ value: 'commercial', label: 'Commercial' },
],
required: false,
},
{
key: 'cluster_id',
label: 'Cluster',
type: 'select',
value: '',
onChange: () => {},
options: clusterOptions,
required: false,
},
{
key: 'status',
label: 'Status',
type: 'select',
value: 'pending',
onChange: () => {},
options: [
{ value: 'pending', label: 'Pending' },
{ value: 'active', label: 'Active' },
{ value: 'archived', label: 'Archived' },
],
required: false,
},
];
};