PluginProbe
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO / 1.0.0
ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO v1.0.0
2.7.0 2.6.0 2.5.0 2.4.0 2.3.0 2.2.0 2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.32.0 1.31.0 1.30.0 1.29.0 1.28.0 1.27.0 1.26.0 1.25.0 trunk 1.0.0 1.0.1 1.0.2 1.1.0 1.10.0 All 48 releases
thinkrank / src / admin / components / essential-seo / schema / forms / SchemaEventForm.js

SchemaEventForm.js in ThinkRank AI SEO – AI SEO Plugin for WordPress: Schema, XML Sitemaps, Meta Tags, Search Console & Local SEO 1.0.0, at src/admin/components/essential-seo/schema/forms/SchemaEventForm.js

225 lines 11.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Schema Event Form Component
3 *
4 * Extracted from SchemaGeneration.js - handles event schema form fields
5 *
6 * @package ThinkRank
7 * @since 1.0.0
8 */
9
10 import { __ } from '@wordpress/i18n';
11 import {
12 Card,
13 CardBody,
14 CardHeader,
15 TextControl,
16 TextareaControl,
17 SelectControl,
18 Flex,
19 FlexItem
20 } from '@wordpress/components';
21 import MediaPicker from '../../../common/MediaPicker';
22
23 /**
24 * Schema Event Form Component
25 */
26 const SchemaEventForm = ({
27 settings,
28 onSettingChange,
29 isLoading
30 }) => {
31 return (
32 <Card size="small">
33 <CardHeader>
34 <h4>�
35 {__('Event Configuration', 'thinkrank')}</h4>
36 </CardHeader>
37 <CardBody>
38 <Flex direction="column" gap={3}>
39 <TextControl
40 label={__('Event Name', 'thinkrank')}
41 value={settings.event_name || ''}
42 onChange={(value) => onSettingChange('event_name', value)}
43 help={__('Full name of the event', 'thinkrank')}
44 disabled={!settings.enabled}
45 __next40pxDefaultSize={true}
46 __nextHasNoMarginBottom={true}
47 />
48 <SelectControl
49 label={__('Event Type', 'thinkrank')}
50 value={settings.event_type || 'Event'}
51 options={[
52 { value: 'Event', label: __('General Event', 'thinkrank') },
53 { value: 'BusinessEvent', label: __('Business Event', 'thinkrank') },
54 { value: 'ChildrensEvent', label: __('Children\'s Event', 'thinkrank') },
55 { value: 'ComedyEvent', label: __('Comedy Event', 'thinkrank') },
56 { value: 'CourseInstance', label: __('Course/Training', 'thinkrank') },
57 { value: 'DanceEvent', label: __('Dance Event', 'thinkrank') },
58 { value: 'DeliveryEvent', label: __('Delivery Event', 'thinkrank') },
59 { value: 'EducationEvent', label: __('Education Event', 'thinkrank') },
60 { value: 'ExhibitionEvent', label: __('Exhibition', 'thinkrank') },
61 { value: 'Festival', label: __('Festival', 'thinkrank') },
62 { value: 'FoodEvent', label: __('Food Event', 'thinkrank') },
63 { value: 'LiteraryEvent', label: __('Literary Event', 'thinkrank') },
64 { value: 'MusicEvent', label: __('Music Event', 'thinkrank') },
65 { value: 'PublicationEvent', label: __('Publication Event', 'thinkrank') },
66 { value: 'SaleEvent', label: __('Sale Event', 'thinkrank') },
67 { value: 'ScreeningEvent', label: __('Screening Event', 'thinkrank') },
68 { value: 'SocialEvent', label: __('Social Event', 'thinkrank') },
69 { value: 'SportsEvent', label: __('Sports Event', 'thinkrank') },
70 { value: 'TheaterEvent', label: __('Theater Event', 'thinkrank') },
71 { value: 'VisualArtsEvent', label: __('Visual Arts Event', 'thinkrank') }
72 ]}
73 onChange={(value) => onSettingChange('event_type', value)}
74 help={__('Specific type of event for better categorization', 'thinkrank')}
75 disabled={!settings.enabled}
76 __next40pxDefaultSize={true}
77 __nextHasNoMarginBottom={true}
78 />
79 <Flex gap={2}>
80 <FlexItem>
81 <TextControl
82 label={__('Start Date & Time', 'thinkrank')}
83 type="datetime-local"
84 value={settings.event_start_date || ''}
85 onChange={(value) => onSettingChange('event_start_date', value)}
86 help={__('When the event starts', 'thinkrank')}
87 disabled={!settings.enabled}
88 __next40pxDefaultSize={true}
89 __nextHasNoMarginBottom={true}
90 />
91 </FlexItem>
92 <FlexItem>
93 <TextControl
94 label={__('End Date & Time', 'thinkrank')}
95 type="datetime-local"
96 value={settings.event_end_date || ''}
97 onChange={(value) => onSettingChange('event_end_date', value)}
98 help={__('When the event ends', 'thinkrank')}
99 disabled={!settings.enabled}
100 __next40pxDefaultSize={true}
101 __nextHasNoMarginBottom={true}
102 />
103 </FlexItem>
104 </Flex>
105 <SelectControl
106 label={__('Event Status', 'thinkrank')}
107 value={settings.event_status || 'EventScheduled'}
108 options={[
109 { value: 'EventScheduled', label: __('Scheduled', 'thinkrank') },
110 { value: 'EventCancelled', label: __('Cancelled', 'thinkrank') },
111 { value: 'EventMovedOnline', label: __('Moved Online', 'thinkrank') },
112 { value: 'EventPostponed', label: __('Postponed', 'thinkrank') },
113 { value: 'EventRescheduled', label: __('Rescheduled', 'thinkrank') }
114 ]}
115 onChange={(value) => onSettingChange('event_status', value)}
116 help={__('Current status of the event', 'thinkrank')}
117 disabled={!settings.enabled}
118 __next40pxDefaultSize={true}
119 __nextHasNoMarginBottom={true}
120 />
121 <Flex gap={2}>
122 <FlexItem>
123 <TextControl
124 label={__('Location/Venue', 'thinkrank')}
125 value={settings.event_location || ''}
126 onChange={(value) => onSettingChange('event_location', value)}
127 help={__('Venue name or address', 'thinkrank')}
128 disabled={!settings.enabled}
129 __next40pxDefaultSize={true}
130 __nextHasNoMarginBottom={true}
131 />
132 </FlexItem>
133 <FlexItem>
134 <SelectControl
135 label={__('Attendance Mode', 'thinkrank')}
136 value={settings.event_attendance_mode || 'OfflineEventAttendanceMode'}
137 options={[
138 { value: 'OfflineEventAttendanceMode', label: __('In-Person', 'thinkrank') },
139 { value: 'OnlineEventAttendanceMode', label: __('Online Only', 'thinkrank') },
140 { value: 'MixedEventAttendanceMode', label: __('Hybrid (In-Person + Online)', 'thinkrank') }
141 ]}
142 onChange={(value) => onSettingChange('event_attendance_mode', value)}
143 disabled={!settings.enabled}
144 __next40pxDefaultSize={true}
145 __nextHasNoMarginBottom={true}
146 />
147 </FlexItem>
148 </Flex>
149 <TextControl
150 label={__('Organizer', 'thinkrank')}
151 value={settings.event_organizer || ''}
152 onChange={(value) => onSettingChange('event_organizer', value)}
153 help={__('Event organizer name or organization', 'thinkrank')}
154 disabled={!settings.enabled}
155 __next40pxDefaultSize={true}
156 __nextHasNoMarginBottom={true}
157 />
158 <TextControl
159 label={__('Performer', 'thinkrank')}
160 value={settings.event_performer || ''}
161 onChange={(value) => onSettingChange('event_performer', value)}
162 help={__('Main performer, speaker, or presenter', 'thinkrank')}
163 disabled={!settings.enabled}
164 __next40pxDefaultSize={true}
165 __nextHasNoMarginBottom={true}
166 />
167 <MediaPicker
168 label={__('Event Image', 'thinkrank')}
169 value={settings.event_image || ''}
170 onChange={(value) => onSettingChange('event_image', value)}
171 help={__('Event promotional image (recommended: 1200x630px)', 'thinkrank')}
172 allowedTypes={['image']}
173 disabled={!settings.enabled}
174 />
175 <Flex gap={2}>
176 <FlexItem>
177 <TextControl
178 label={__('Ticket Price', 'thinkrank')}
179 type="number"
180 step="0.01"
181 min="0"
182 value={settings.event_price || ''}
183 onChange={(value) => onSettingChange('event_price', value)}
184 help={__('Ticket price (leave empty for free events)', 'thinkrank')}
185 disabled={!settings.enabled}
186 __next40pxDefaultSize={true}
187 __nextHasNoMarginBottom={true}
188 />
189 </FlexItem>
190 <FlexItem>
191 <SelectControl
192 label={__('Currency', 'thinkrank')}
193 value={settings.event_currency || 'USD'}
194 options={[
195 { value: 'USD', label: 'USD ($)' },
196 { value: 'EUR', label: 'EUR (€)' },
197 { value: 'GBP', label: 'GBP (£)' },
198 { value: 'CAD', label: 'CAD (C$)' },
199 { value: 'AUD', label: 'AUD (A$)' },
200 { value: 'JPY', label: 'JPY (¥)' }
201 ]}
202 onChange={(value) => onSettingChange('event_currency', value)}
203 disabled={!settings.enabled}
204 __next40pxDefaultSize={true}
205 __nextHasNoMarginBottom={true}
206 />
207 </FlexItem>
208 </Flex>
209 <TextareaControl
210 label={__('Description', 'thinkrank')}
211 value={settings.event_description || ''}
212 onChange={(value) => onSettingChange('event_description', value)}
213 help={__('Detailed event description for search engines', 'thinkrank')}
214 disabled={!settings.enabled}
215 rows={3}
216 __nextHasNoMarginBottom={true}
217 />
218 </Flex>
219 </CardBody>
220 </Card>
221 );
222 };
223
224 export default SchemaEventForm;
225