sanity-plugin-all-in-one-accessibility 1.0.0

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 (60) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +160 -0
  3. package/dist/index.d.mts +7 -0
  4. package/dist/index.d.ts +7 -0
  5. package/dist/index.js +1096 -0
  6. package/dist/index.js.map +1 -0
  7. package/dist/index.mjs +1099 -0
  8. package/dist/index.mjs.map +1 -0
  9. package/package.json +99 -0
  10. package/sanity.json +8 -0
  11. package/src/assets/css/bootstrap.min.css +11722 -0
  12. package/src/assets/css/style.css +3204 -0
  13. package/src/assets/css/style.css--06-Nov-2023.css +1102 -0
  14. package/src/assets/css/style.css.map +1 -0
  15. package/src/assets/css/style.scss +2730 -0
  16. package/src/assets/images/ada.svg +17 -0
  17. package/src/assets/images/aioa-icon-type-1.svg +1 -0
  18. package/src/assets/images/aioa-icon-type-10.svg +1 -0
  19. package/src/assets/images/aioa-icon-type-11.svg +1 -0
  20. package/src/assets/images/aioa-icon-type-12.svg +1 -0
  21. package/src/assets/images/aioa-icon-type-13.svg +1 -0
  22. package/src/assets/images/aioa-icon-type-14.svg +29 -0
  23. package/src/assets/images/aioa-icon-type-15.svg +26 -0
  24. package/src/assets/images/aioa-icon-type-16.svg +17 -0
  25. package/src/assets/images/aioa-icon-type-17.svg +24 -0
  26. package/src/assets/images/aioa-icon-type-18.svg +20 -0
  27. package/src/assets/images/aioa-icon-type-19.svg +25 -0
  28. package/src/assets/images/aioa-icon-type-1_new.svg +1 -0
  29. package/src/assets/images/aioa-icon-type-2.svg +1 -0
  30. package/src/assets/images/aioa-icon-type-20.svg +24 -0
  31. package/src/assets/images/aioa-icon-type-21.svg +28 -0
  32. package/src/assets/images/aioa-icon-type-22.svg +21 -0
  33. package/src/assets/images/aioa-icon-type-23.svg +21 -0
  34. package/src/assets/images/aioa-icon-type-24.svg +21 -0
  35. package/src/assets/images/aioa-icon-type-25.svg +15 -0
  36. package/src/assets/images/aioa-icon-type-26.svg +23 -0
  37. package/src/assets/images/aioa-icon-type-27.svg +21 -0
  38. package/src/assets/images/aioa-icon-type-28.svg +27 -0
  39. package/src/assets/images/aioa-icon-type-29.svg +25 -0
  40. package/src/assets/images/aioa-icon-type-3.svg +1 -0
  41. package/src/assets/images/aioa-icon-type-4.svg +16 -0
  42. package/src/assets/images/aioa-icon-type-5.svg +1 -0
  43. package/src/assets/images/aioa-icon-type-6.svg +1 -0
  44. package/src/assets/images/aioa-icon-type-7.svg +1 -0
  45. package/src/assets/images/aioa-icon-type-8.svg +1 -0
  46. package/src/assets/images/aioa-icon-type-9.svg +1 -0
  47. package/src/assets/images/all-in-one-accessibility-logo.svg +43 -0
  48. package/src/assets/images/checkbox.svg +14 -0
  49. package/src/assets/images/error.svg +18 -0
  50. package/src/assets/images/large-site-icon.svg +1 -0
  51. package/src/assets/images/medium-site-icon.svg +1 -0
  52. package/src/assets/images/no-ada.svg +17 -0
  53. package/src/assets/images/noun-digital-enterprise.svg +9 -0
  54. package/src/assets/images/small-site-icon.svg +1 -0
  55. package/src/assets/images/success.svg +13 -0
  56. package/src/assets.zip +0 -0
  57. package/src/icon.tsx +2 -0
  58. package/src/index.ts +76 -0
  59. package/src/plugin.tsx +1816 -0
  60. package/v2-incompatible.js +11 -0
package/src/plugin.tsx ADDED
@@ -0,0 +1,1816 @@
1
+ import React, {FC, useState, useEffect, ChangeEvent} from 'react'
2
+ import {Form, Button, Image} from 'react-bootstrap'
3
+ import {InputGroup, FormControl, Row, Col, Tooltip, OverlayTrigger} from 'react-bootstrap'
4
+ import {useCurrentUser} from 'sanity'
5
+
6
+ const aioaicontype1 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-1.svg'
7
+ const aioaicontype2 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-2.svg'
8
+ const aioaicontype3 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-3.svg'
9
+ const aioaicontype4 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-4.svg'
10
+ const aioaicontype5 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-5.svg'
11
+ const aioaicontype6 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-6.svg'
12
+ const aioaicontype7 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-7.svg'
13
+ const aioaicontype8 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-8.svg'
14
+ const aioaicontype9 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-9.svg'
15
+ const aioaicontype10 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-10.svg'
16
+ const aioaicontype11 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-11.svg'
17
+ const aioaicontype12 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-12.svg'
18
+ const aioaicontype13 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-13.svg'
19
+ const aioaicontype14 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-14.svg'
20
+ const aioaicontype15 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-15.svg'
21
+ const aioaicontype16 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-16.svg'
22
+ const aioaicontype17 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-17.svg'
23
+ const aioaicontype18 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-18.svg'
24
+ const aioaicontype19 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-19.svg'
25
+ const aioaicontype20 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-20.svg'
26
+ const aioaicontype21 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-21.svg'
27
+ const aioaicontype22 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-22.svg'
28
+ const aioaicontype23 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-23.svg'
29
+ const aioaicontype24 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-24.svg'
30
+ const aioaicontype25 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-25.svg'
31
+ const aioaicontype26 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-26.svg'
32
+ const aioaicontype27 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-27.svg'
33
+ const aioaicontype28 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-28.svg'
34
+ const aioaicontype29 = 'https://sanity.skynettechnologies.us/assets/images/aioa-icon-type-29.svg'
35
+ const allinoneaccessibilitylogo =
36
+ 'https://sanity.skynettechnologies.us/assets/images/all-in-one-accessibility-logo.svg'
37
+
38
+ const HomePage: FC = () => {
39
+ /**
40
+ * Declare Variables
41
+ */
42
+
43
+ interface Parameters {
44
+ hexaColor: string
45
+ widget_size: string
46
+ position: string
47
+ icontype: string
48
+ iconsize: string
49
+ }
50
+
51
+ interface SettingList {
52
+ [key: string]: string // Adjust the type as necessary based on the expected structure of settingList
53
+ }
54
+
55
+ const [isValid, setIsValid] = useState<boolean>(false)
56
+ const [message, setMessage] = useState<string>('')
57
+ const [parameters, setParameters] = useState<Parameters>({
58
+ hexaColor: '',
59
+ widget_size: '0',
60
+ position: 'bottom_right',
61
+ icontype: 'aioa-icon-type-1',
62
+ iconsize: 'aioa-default-icon',
63
+ })
64
+
65
+ const [widgetSettings, setWidgetSettings] = useState({
66
+ widget_icon_size_custom: '',
67
+ custom_position_x_value: '',
68
+ custom_position_y_value: '',
69
+ custom_position_left_right: 'To the top',
70
+ custom_position_top_bottom: 'To the left',
71
+ })
72
+
73
+ const [isSwitcherEnabled, setSwitcherEnabled] = useState<boolean>(false)
74
+
75
+ const [isSizeSwitcherEnabled, setSizeSwitcherEnabled] = useState<boolean>(false)
76
+ const [iconsize, setIconSize] = useState<string>(aioaicontype1)
77
+ const [settingList, setSetting] = useState<SettingList>({})
78
+ const [isChanged, setIsChanged] = useState<boolean>(false)
79
+ const [showSuccessMessage, setShowSuccessMessage] = useState<boolean>(false)
80
+ const [userData, setUserData] = useState<{name: string; email: string} | null>(null)
81
+
82
+ useEffect(() => {
83
+ console.log('settingList (outside): ', settingList)
84
+ if (Object.keys(settingList).length !== 0) {
85
+ console.log('Color Code', settingList['Color_Code'])
86
+ console.log('Icon Position', settingList['Icon_Position'])
87
+ console.log('Icon Type', settingList['Icon_Type'])
88
+ console.log('Icon Size', settingList['Icon_Size'])
89
+
90
+ setParameters({
91
+ hexaColor: settingList['Color_Code'],
92
+ position: settingList['Icon_Position'],
93
+ icontype: settingList['Icon_Type'],
94
+ iconsize: settingList['Icon_Size'],
95
+ widget_size: '0',
96
+ })
97
+ if (settingList['Icon_Type'] === 'aioa-icon-type-2') {
98
+ setIconSize(aioaicontype2)
99
+ } else if (settingList['Icon_Type'] === 'aioa-icon-type-3') {
100
+ setIconSize(aioaicontype3)
101
+ } else {
102
+ setIconSize(aioaicontype1)
103
+ }
104
+ }
105
+ // const user = useCurrentUser()
106
+ // console.log('user', user?.name);
107
+ // console.log('user', user?.email);
108
+
109
+ getAPIData()
110
+ }, [settingList])
111
+
112
+ useEffect(() => {
113
+ console.log(parameters)
114
+ console.log('parameters.position : ', parameters.position === 'bottom_center')
115
+ }, [parameters])
116
+
117
+ useEffect(() => {}, [])
118
+
119
+ const currentUser = useCurrentUser() // ✅ Hook must be inside the component
120
+
121
+ useEffect(() => {
122
+ if (currentUser) {
123
+ setUserData({
124
+ name: currentUser.name,
125
+ email: currentUser.email,
126
+ })
127
+
128
+ // const userData = {
129
+ // name: currentUser.name,
130
+ // email: currentUser.email,
131
+ // };
132
+ // console.log("User data sent successfully", userData);
133
+ }
134
+ }, [currentUser]) // Runs when currentUser changes
135
+
136
+ /**
137
+ * Get All Settings from Database
138
+ */
139
+
140
+ /**
141
+ * Save Changes is a function which used to click on Save Changes Button on UI
142
+ */
143
+ const onSaveChanges = async (): Promise<void> => {
144
+ saveData(parameters)
145
+ }
146
+
147
+ /**
148
+ * Save the data on Dashboard from Settings UI
149
+ */
150
+ const saveData = (data: {
151
+ position: string
152
+ hexaColor: string
153
+ icontype: string
154
+ iconsize: string
155
+ widget_size: string
156
+ }): void => {
157
+ const formdata = new FormData()
158
+
159
+ const widget_icon_size_custom =
160
+ (document.getElementById('widget_icon_size_custom') as HTMLInputElement)?.value || ''
161
+ const custom_position_x_value =
162
+ (document.getElementById('custom_position_x_value') as HTMLInputElement)?.value || ''
163
+ const custom_position_y_value =
164
+ (document.getElementById('custom_position_y_value') as HTMLInputElement)?.value || ''
165
+ const custom_position_left_right =
166
+ (document.getElementById('custom_position_left_right') as HTMLInputElement)?.value || ''
167
+ const custom_position_top_bottom =
168
+ (document.getElementById('custom_position_top_bottom') as HTMLInputElement)?.value || ''
169
+
170
+ let widget_position_right = '',
171
+ widget_position_left = '',
172
+ widget_position_top = '',
173
+ widget_position_bottom = ''
174
+ if (custom_position_left_right == 'To the right') {
175
+ widget_position_right = custom_position_x_value
176
+ } else {
177
+ widget_position_left = custom_position_x_value
178
+ }
179
+
180
+ if (custom_position_left_right == 'To the bottom') {
181
+ widget_position_bottom = custom_position_y_value
182
+ } else {
183
+ widget_position_top = custom_position_y_value
184
+ }
185
+
186
+ formdata.append('u', window.location.hostname)
187
+ formdata.append('widget_position', data.position)
188
+ formdata.append('widget_color_code', data.hexaColor)
189
+ formdata.append('widget_icon_type', data.icontype)
190
+ formdata.append('widget_icon_size', data.iconsize)
191
+ formdata.append('widget_size', data.widget_size)
192
+ formdata.append('is_widget_custom_position', isSwitcherEnabled == true ? '1' : '0')
193
+ formdata.append('is_widget_custom_size', isSizeSwitcherEnabled == true ? '1' : '0')
194
+ formdata.append('widget_icon_size_custom', widget_icon_size_custom)
195
+ formdata.append('widget_position_right', widget_position_right)
196
+ formdata.append('widget_position_left', widget_position_left)
197
+ formdata.append('widget_position_top', widget_position_top)
198
+ formdata.append('widget_position_bottom', widget_position_bottom)
199
+
200
+ /*
201
+ widget_position_right: widget_position_right,
202
+ widget_position_left: widget_position_left,
203
+ widget_position_top: widget_position_top,
204
+ widget_position_bottom: widget_position_bottom
205
+ */
206
+ const requestOptions: RequestInit = {
207
+ method: 'POST',
208
+ body: formdata,
209
+ }
210
+
211
+ fetch('https://ada.skynettechnologies.us/api/widget-setting-update-platform', requestOptions)
212
+ .then((response) => response.json())
213
+ .then(async (response) => {
214
+ console.log('response Save Data', response)
215
+ setShowSuccessMessage(true)
216
+
217
+ setTimeout(() => {
218
+ setShowSuccessMessage(false)
219
+ }, 3000) // Reset message after 3 seconds
220
+ })
221
+ .catch((error) => console.log('error', error))
222
+ }
223
+
224
+ /**
225
+ * Get API data will get all details from Dashboard API to Settings UI
226
+ */
227
+ const getAPIData = (): void => {
228
+ const formdata = new FormData()
229
+ formdata.append('website_url', window.location.hostname)
230
+
231
+ const requestOptions: RequestInit = {
232
+ method: 'POST',
233
+ body: formdata,
234
+ }
235
+
236
+ /*
237
+ "widget_position": "top_left",
238
+ "widget_color_code": "420083",
239
+ "widget_icon_type": "aioa-icon-type-1",
240
+ "widget_icon_size": "aioa-default-icon",
241
+ "widget_position_top": null,
242
+ "widget_position_right": 0,
243
+ "widget_position_bottom": 0,
244
+ "widget_position_left": 0,
245
+ "widget_icon_size_custom": 0,
246
+ "is_widget_custom_position": 0,
247
+ "is_widget_custom_size": 0,
248
+ "is_mobile_icon": 0,
249
+ "widget_icon_size_mobile": null,
250
+ "is_widget_custom_size_mobile": 0,
251
+ "widget_icon_size_custom_mobile": "45",
252
+ "adobe_key": null,
253
+ "payment_step": 1,
254
+ "created_at": "2024-06-10T13:27:43.000000Z",
255
+ "updated_at": "2025-03-04T13:07:11.000000Z",
256
+ "is_widget_check": 0,
257
+ "user_id": 2079,
258
+ "partner_adon_disabled_id": null,
259
+ "brand_logo": null,
260
+ "widget_size": 0,
261
+ "statement_link": null,
262
+ "ga_key": null,
263
+ "is_free_widget": 0,
264
+ "platform_widget_status": 0,
265
+ "dashboard_link": null,
266
+ "is_custome_branding": false,
267
+ "is_white_label": false,
268
+ */
269
+
270
+ fetch('https://ada.skynettechnologies.us/api/widget-settings', requestOptions)
271
+ .then((response) => response.json())
272
+ .then((response: {Data: {[key: string]: string}}) => {
273
+ if (Object.keys(response.Data).length !== 0) {
274
+ setIsValid(true)
275
+ setParameters({
276
+ hexaColor: response.Data.widget_color_code,
277
+ position: response.Data.widget_position,
278
+ icontype: response.Data.widget_icon_type,
279
+ iconsize: response.Data.widget_icon_size,
280
+ widget_size: response.Data.widget_size,
281
+ })
282
+ setSizeSwitcherEnabled(response.Data.is_widget_custom_size == '0' ? false : true)
283
+ setSwitcherEnabled(response.Data.is_widget_custom_position == '0' ? false : true)
284
+
285
+ setWidgetSettings({
286
+ widget_icon_size_custom: response.Data.widget_icon_size_custom || '',
287
+ custom_position_x_value:
288
+ parseInt(response.Data.widget_position_left) > 0
289
+ ? response.Data.widget_position_left
290
+ : response.Data.widget_position_right,
291
+ custom_position_y_value:
292
+ parseInt(response.Data.widget_position_bottom) > 0
293
+ ? response.Data.widget_position_bottom
294
+ : response.Data.widget_position_top,
295
+ custom_position_left_right:
296
+ parseInt(response.Data.widget_position_left) > 0 ? 'To the left' : 'To the right',
297
+ custom_position_top_bottom:
298
+ parseInt(response.Data.widget_position_bottom) > 0 ? 'To the bottom' : 'To the top',
299
+ })
300
+
301
+ console.log('setWidgetSettings : ', widgetSettings)
302
+ } else {
303
+ setIsValid(false)
304
+ }
305
+ })
306
+ .catch((error) => console.log('error', error))
307
+ }
308
+
309
+ /**
310
+ * Icon change event when user change Icon Type on Settings UI
311
+ */
312
+
313
+ const onIconChange = (e: ChangeEvent<HTMLInputElement>) => {
314
+ setParameters({...parameters, icontype: e.target.value})
315
+ switch (e.target.value) {
316
+ case 'aioa-icon-type-2':
317
+ setIconSize(aioaicontype2)
318
+ break
319
+ case 'aioa-icon-type-3':
320
+ setIconSize(aioaicontype3)
321
+ break
322
+ case 'aioa-icon-type-4':
323
+ setIconSize(aioaicontype4)
324
+ break
325
+ case 'aioa-icon-type-5':
326
+ setIconSize(aioaicontype5)
327
+ break
328
+ case 'aioa-icon-type-6':
329
+ setIconSize(aioaicontype6)
330
+ break
331
+ case 'aioa-icon-type-7':
332
+ setIconSize(aioaicontype7)
333
+ break
334
+ case 'aioa-icon-type-8':
335
+ setIconSize(aioaicontype8)
336
+ break
337
+ case 'aioa-icon-type-9':
338
+ setIconSize(aioaicontype9)
339
+ break
340
+ case 'aioa-icon-type-10':
341
+ setIconSize(aioaicontype10)
342
+ break
343
+ case 'aioa-icon-type-11':
344
+ setIconSize(aioaicontype11)
345
+ break
346
+ case 'aioa-icon-type-12':
347
+ setIconSize(aioaicontype12)
348
+ break
349
+ case 'aioa-icon-type-13':
350
+ setIconSize(aioaicontype13)
351
+ break
352
+ case 'aioa-icon-type-14':
353
+ setIconSize(aioaicontype14)
354
+ break
355
+ case 'aioa-icon-type-15':
356
+ setIconSize(aioaicontype15)
357
+ break
358
+ case 'aioa-icon-type-16':
359
+ setIconSize(aioaicontype16)
360
+ break
361
+ case 'aioa-icon-type-17':
362
+ setIconSize(aioaicontype17)
363
+ break
364
+ case 'aioa-icon-type-18':
365
+ setIconSize(aioaicontype18)
366
+ break
367
+ case 'aioa-icon-type-19':
368
+ setIconSize(aioaicontype19)
369
+ break
370
+ case 'aioa-icon-type-20':
371
+ setIconSize(aioaicontype20)
372
+ break
373
+ case 'aioa-icon-type-21':
374
+ setIconSize(aioaicontype21)
375
+ break
376
+ case 'aioa-icon-type-22':
377
+ setIconSize(aioaicontype22)
378
+ break
379
+ case 'aioa-icon-type-23':
380
+ setIconSize(aioaicontype23)
381
+ break
382
+ case 'aioa-icon-type-24':
383
+ setIconSize(aioaicontype24)
384
+ break
385
+ case 'aioa-icon-type-25':
386
+ setIconSize(aioaicontype25)
387
+ break
388
+ case 'aioa-icon-type-26':
389
+ setIconSize(aioaicontype26)
390
+ break
391
+ case 'aioa-icon-type-27':
392
+ setIconSize(aioaicontype27)
393
+ break
394
+ case 'aioa-icon-type-28':
395
+ setIconSize(aioaicontype28)
396
+ break
397
+ case 'aioa-icon-type-29':
398
+ setIconSize(aioaicontype29)
399
+ break
400
+ default:
401
+ setIconSize(aioaicontype1)
402
+ }
403
+ }
404
+
405
+ const onIconChange1 = (e: ChangeEvent<HTMLSelectElement>) => {
406
+ setParameters({...parameters, icontype: e.target.value})
407
+ switch (e.target.value) {
408
+ case 'aioa-icon-type-2':
409
+ setIconSize(aioaicontype2)
410
+ break
411
+ case 'aioa-icon-type-3':
412
+ setIconSize(aioaicontype3)
413
+ break
414
+ case 'aioa-icon-type-4':
415
+ setIconSize(aioaicontype4)
416
+ break
417
+ case 'aioa-icon-type-5':
418
+ setIconSize(aioaicontype5)
419
+ break
420
+ case 'aioa-icon-type-6':
421
+ setIconSize(aioaicontype6)
422
+ break
423
+ case 'aioa-icon-type-7':
424
+ setIconSize(aioaicontype7)
425
+ break
426
+ case 'aioa-icon-type-8':
427
+ setIconSize(aioaicontype8)
428
+ break
429
+ case 'aioa-icon-type-9':
430
+ setIconSize(aioaicontype9)
431
+ break
432
+ case 'aioa-icon-type-10':
433
+ setIconSize(aioaicontype10)
434
+ break
435
+ case 'aioa-icon-type-11':
436
+ setIconSize(aioaicontype11)
437
+ break
438
+ case 'aioa-icon-type-12':
439
+ setIconSize(aioaicontype12)
440
+ break
441
+ case 'aioa-icon-type-13':
442
+ setIconSize(aioaicontype13)
443
+ break
444
+ case 'aioa-icon-type-14':
445
+ setIconSize(aioaicontype14)
446
+ break
447
+ case 'aioa-icon-type-15':
448
+ setIconSize(aioaicontype15)
449
+ break
450
+ case 'aioa-icon-type-16':
451
+ setIconSize(aioaicontype16)
452
+ break
453
+ case 'aioa-icon-type-17':
454
+ setIconSize(aioaicontype17)
455
+ break
456
+ case 'aioa-icon-type-18':
457
+ setIconSize(aioaicontype18)
458
+ break
459
+ case 'aioa-icon-type-19':
460
+ setIconSize(aioaicontype19)
461
+ break
462
+ case 'aioa-icon-type-20':
463
+ setIconSize(aioaicontype20)
464
+ break
465
+ case 'aioa-icon-type-21':
466
+ setIconSize(aioaicontype21)
467
+ break
468
+ case 'aioa-icon-type-22':
469
+ setIconSize(aioaicontype22)
470
+ break
471
+ case 'aioa-icon-type-23':
472
+ setIconSize(aioaicontype23)
473
+ break
474
+ case 'aioa-icon-type-24':
475
+ setIconSize(aioaicontype24)
476
+ break
477
+ case 'aioa-icon-type-25':
478
+ setIconSize(aioaicontype25)
479
+ break
480
+ case 'aioa-icon-type-26':
481
+ setIconSize(aioaicontype26)
482
+ break
483
+ case 'aioa-icon-type-27':
484
+ setIconSize(aioaicontype27)
485
+ break
486
+ case 'aioa-icon-type-28':
487
+ setIconSize(aioaicontype28)
488
+ break
489
+ case 'aioa-icon-type-29':
490
+ setIconSize(aioaicontype29)
491
+ break
492
+ default:
493
+ setIconSize(aioaicontype1)
494
+ }
495
+ }
496
+
497
+ function fetchApiData(website_name: string): void {
498
+ const username: string = userData?.name ?? ''
499
+ const useremail: string = userData?.email ?? ''
500
+
501
+ const packageType: string = 'free-widget'
502
+ const arrDetails: {
503
+ name: string
504
+ email: string
505
+ company_name: string
506
+ website: string
507
+ package_type: string
508
+ start_date: string
509
+ end_date: string
510
+ price: string
511
+ discount_price: string
512
+ platform: string
513
+ api_key: string
514
+ is_trial_period: string
515
+ is_free_widget: string
516
+ bill_address: string
517
+ country: string
518
+ state: string
519
+ city: string
520
+ post_code: string
521
+ transaction_id: string
522
+ subscr_id: string
523
+ payment_source: string
524
+ } = {
525
+ name: username,
526
+ email: useremail,
527
+ company_name: username,
528
+ website: website_name,
529
+ package_type: packageType,
530
+ start_date: new Date().toISOString(),
531
+ end_date: '',
532
+ price: '',
533
+ discount_price: '0',
534
+ platform: 'webasyst',
535
+ api_key: '',
536
+ is_trial_period: '',
537
+ is_free_widget: '0',
538
+ bill_address: '',
539
+ country: '',
540
+ state: '',
541
+ city: '',
542
+ post_code: '',
543
+ transaction_id: '',
544
+ subscr_id: '',
545
+ payment_source: '',
546
+ }
547
+
548
+ const apiUrl: string = 'https://ada.skynettechnologies.us/api/get-autologin-link'
549
+
550
+ fetch(apiUrl, {
551
+ method: 'POST',
552
+ headers: {
553
+ 'Content-Type': 'application/json',
554
+ },
555
+ body: JSON.stringify({website: website_name}),
556
+ })
557
+ .then((response) => {
558
+ if (!response.ok) {
559
+ throw new Error(`HTTP error! status: ${response.status}`)
560
+ }
561
+ return response.json()
562
+ })
563
+ .then((result) => {
564
+ if (result && result.link) {
565
+ // Handle valid link
566
+ } else {
567
+ const secondApiUrl: string = 'https://ada.skynettechnologies.us/api/add-user-domain'
568
+
569
+ fetch(secondApiUrl, {
570
+ method: 'POST',
571
+ headers: {
572
+ 'Content-Type': 'application/json',
573
+ },
574
+ body: JSON.stringify(arrDetails),
575
+ })
576
+ .then((response) => {
577
+ if (!response.ok) {
578
+ throw new Error(`HTTP error! Status: ${response.status}`)
579
+ }
580
+ return response.json()
581
+ })
582
+ .then((data) => {
583
+ if (data.success) {
584
+ // Handle success
585
+ } else {
586
+ // Handle error
587
+ }
588
+ })
589
+ .catch((error) => {
590
+ // Handle error
591
+ })
592
+ }
593
+ })
594
+ .catch((error) => {
595
+ // Handle error
596
+ })
597
+ }
598
+
599
+ const elementStyle: React.CSSProperties = {
600
+ marginTop: '0px',
601
+ display: 'flex',
602
+ justifyContent: 'center',
603
+ alignItems: 'center',
604
+ flexDirection: 'column',
605
+ }
606
+
607
+ const labelStyle: React.CSSProperties = {
608
+ backgroundColor: '',
609
+ }
610
+
611
+ const handleInput = (e: ChangeEvent<HTMLInputElement>) => {
612
+ e.target.value = Math.min(Math.max(Number(e.target.value), 0), 250).toString()
613
+ }
614
+
615
+ const handleInput2 = (e: ChangeEvent<HTMLInputElement>) => {
616
+ e.target.value = Math.min(Math.max(Number(e.target.value), 0), 250).toString()
617
+ }
618
+
619
+ const handleInput1 = (e: ChangeEvent<HTMLInputElement>) => {
620
+ e.target.value = Math.min(Math.max(Number(e.target.value), 20), 150).toString()
621
+ }
622
+
623
+ /**
624
+ * Settings UI
625
+ */
626
+ return (
627
+ <>
628
+ <meta charSet="utf-8" />
629
+ <meta name="viewport" content="width=device-width, initial-scale=1" />
630
+ <title>All In One Accessibility Sanity</title>
631
+ <meta name="description" content="Sanity App" />
632
+ {/* <style>
633
+ @import ("./assets/css/style.css");
634
+ </style> */}
635
+
636
+ <link
637
+ rel="stylesheet"
638
+ type="text/css"
639
+ href="https://sanity.skynettechnologies.us/assets/css/style.css"
640
+ />
641
+ <div style={elementStyle}>
642
+ <div className="all-in-one-accessibility-strapi-container">
643
+ <div className="container">
644
+ <div className="set-width">
645
+ <div className="all-in-one-accessibility-wrap">
646
+ <div className="accessibility-settings">
647
+ <Image
648
+ src={allinoneaccessibilitylogo}
649
+ alt="All in One Accessibility - Skynet Technologies"
650
+ style={{
651
+ display: 'block',
652
+ justifyContent: 'center',
653
+ alignItems: 'center',
654
+ textAlign: 'center',
655
+ marginLeft: 'auto',
656
+ marginRight: 'auto',
657
+ width: '50%',
658
+ }}
659
+ ></Image>
660
+ <h3>
661
+ <b></b>
662
+ </h3>
663
+
664
+ <div className="all-one-accessibility-form">
665
+ <Form onSubmit={onSaveChanges}>
666
+ {!isValid && ( // Conditionally render the view based on API data
667
+ <Form.Group className={`mb-30 row`}>
668
+ <Form.Label className="col-sm-12 col-form-label">
669
+ {/* License key required for full version: */}
670
+ <div
671
+ className={`form-text col-sm-12 col-form-label ${
672
+ isValid ? 'd-none' : ''
673
+ }`}
674
+ style={{
675
+ display: 'flex',
676
+ justifyContent: 'center',
677
+ alignItems: 'center',
678
+ textAlign: 'center',
679
+ }}
680
+ >
681
+ Please{' '}
682
+ <a
683
+ href="https://ada.skynettechnologies.us/trial-subscription"
684
+ target="_blank"
685
+ rel="noopener noreferrer"
686
+ >
687
+ &nbsp;Upgrade&nbsp;
688
+ </a>{' '}
689
+ to the full version of All in One Accessibility Pro.
690
+ </div>
691
+ </Form.Label>
692
+ {/* <div className="col-sm-9">
693
+ <Form.Control value={parameters.licenseKey} type="text" onChange={checkLicenseKey} />
694
+
695
+ <div className="form-text text-danger">{message}</div>
696
+ </div> */}
697
+ </Form.Group>
698
+ )}
699
+
700
+ <Form.Group className={`mb-30 row`}>
701
+ <Form.Label htmlFor="inputPassword" className="col-sm-3 col-form-label">
702
+ Hex color code:
703
+ </Form.Label>
704
+ <div className="col-sm-9">
705
+ <Form.Control
706
+ value={parameters.hexaColor}
707
+ className="form-control"
708
+ id="colorcode"
709
+ name="colorcode"
710
+ onChange={(e) =>
711
+ setParameters({
712
+ ...parameters,
713
+ hexaColor: e.target.value,
714
+ })
715
+ }
716
+ />
717
+ </div>
718
+ <div className="col-sm-3"></div>
719
+ <div className="form-text col-sm-9">
720
+ You can customize the ADA Widget color. For example: FF5733
721
+ </div>
722
+ </Form.Group>
723
+
724
+ <Form.Group className={`mb-30 row`}>
725
+ <Form.Label className="col-sm-12 col-form-label">
726
+ Select Widget Size:
727
+ </Form.Label>
728
+ <div className="col-sm-12 three-col">
729
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
730
+ <Form.Check
731
+ type="radio"
732
+ id="edit-widget-size-regularsize"
733
+ label="Regular Size"
734
+ name="widget_size"
735
+ value="0"
736
+ onChange={(e) =>
737
+ setParameters({
738
+ ...parameters,
739
+ widget_size: e.target.value,
740
+ })
741
+ }
742
+ checked={parameters.widget_size == '0' ? true : false}
743
+ className="form-radio"
744
+ />
745
+ </div>
746
+
747
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
748
+ <Form.Check
749
+ type="radio"
750
+ id="edit-widget-size-oversize"
751
+ label="Over Size"
752
+ name="widget_size"
753
+ value="1"
754
+ onChange={(e) =>
755
+ setParameters({
756
+ ...parameters,
757
+ widget_size: e.target.value,
758
+ })
759
+ }
760
+ checked={parameters.widget_size == '1' ? true : false}
761
+ className="form-radio"
762
+ />
763
+ </div>
764
+ </div>
765
+ </Form.Group>
766
+
767
+ <Form.Group className={`mb-30 row`}>
768
+ <div className="icon-custom-position-wrapper mb-3">
769
+ <div className="mb-2">
770
+ <Row className="align-items-center mb-30">
771
+ <Col>
772
+ <Form.Label className="col-sm-12 col-form-label">
773
+ Enable precise accessibility widget icon position:
774
+ </Form.Label>
775
+ </Col>
776
+ <Col xs="auto">
777
+ <Form.Check
778
+ type="switch"
779
+ id="custom-position-switcher"
780
+ className="custom-switcher"
781
+ checked={isSwitcherEnabled}
782
+ onChange={() => setSwitcherEnabled(!isSwitcherEnabled)}
783
+ style={{
784
+ transform: 'scale(1.5)', // Increase the switch size
785
+ }}
786
+ />
787
+ </Col>
788
+ </Row>
789
+
790
+ {!isSwitcherEnabled && (
791
+ <Form.Group className={`mb-30 row widget-position`}>
792
+ <Form.Label className="col-sm-12 col-form-label">
793
+ Where would you like to place the accessibility icon on your
794
+ site?:
795
+ </Form.Label>
796
+ <div className="col-sm-12 three-col">
797
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
798
+ <Form.Check
799
+ type="radio"
800
+ id="edit-position-top-left"
801
+ label="Top left"
802
+ name="position"
803
+ value="top_left"
804
+ onChange={(e) =>
805
+ setParameters({
806
+ ...parameters,
807
+ position: e.target.value,
808
+ })
809
+ }
810
+ checked={parameters.position == 'top_left' ? true : false}
811
+ className="form-radio"
812
+ />
813
+ </div>
814
+
815
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
816
+ <Form.Check
817
+ type="radio"
818
+ id="edit-position-top-center"
819
+ label="Top Center"
820
+ name="position"
821
+ value="top_center"
822
+ onChange={(e) =>
823
+ setParameters({
824
+ ...parameters,
825
+ position: e.target.value,
826
+ })
827
+ }
828
+ checked={parameters.position == 'top_center' ? true : false}
829
+ className="form-radio"
830
+ />
831
+ </div>
832
+
833
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
834
+ <Form.Check
835
+ type="radio"
836
+ id="edit-position-top-right"
837
+ label="Top Right"
838
+ name="position"
839
+ value="top_right"
840
+ onChange={(e) =>
841
+ setParameters({
842
+ ...parameters,
843
+ position: e.target.value,
844
+ })
845
+ }
846
+ checked={parameters.position == 'top_right' ? true : false}
847
+ className="form-radio"
848
+ />
849
+ </div>
850
+
851
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
852
+ <Form.Check
853
+ type="radio"
854
+ id="edit-position-middel-left"
855
+ label="Middle left"
856
+ name="position"
857
+ value="middle_left"
858
+ onChange={(e) =>
859
+ setParameters({
860
+ ...parameters,
861
+ position: e.target.value,
862
+ })
863
+ }
864
+ checked={parameters.position == 'middle_left' ? true : false}
865
+ className="form-radio"
866
+ />
867
+ </div>
868
+
869
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
870
+ <Form.Check
871
+ type="radio"
872
+ id="edit-position-middel-right"
873
+ label="Middle Right"
874
+ name="position"
875
+ value="middle_right"
876
+ onChange={(e) =>
877
+ setParameters({
878
+ ...parameters,
879
+ position: e.target.value,
880
+ })
881
+ }
882
+ checked={parameters.position == 'middle_right' ? true : false}
883
+ className="form-radio"
884
+ />
885
+ </div>
886
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
887
+ <Form.Check
888
+ type="radio"
889
+ id="edit-position-bottom-left"
890
+ label="Bottom left"
891
+ name="position"
892
+ value="bottom_left"
893
+ onChange={(e) =>
894
+ setParameters({
895
+ ...parameters,
896
+ position: e.target.value,
897
+ })
898
+ }
899
+ checked={parameters.position == 'bottom_left' ? true : false}
900
+ className="form-radio"
901
+ />
902
+ </div>
903
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
904
+ <Form.Check
905
+ type="radio"
906
+ id="edit-position-bottom-center"
907
+ label="Bottom Center"
908
+ name="position"
909
+ value="bottom_center"
910
+ onChange={(e) =>
911
+ setParameters({
912
+ ...parameters,
913
+ position: e.target.value,
914
+ })
915
+ }
916
+ checked={
917
+ parameters.position == 'bottom_center' ? true : false
918
+ }
919
+ className="form-radio"
920
+ />
921
+ </div>
922
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
923
+ <Form.Check
924
+ type="radio"
925
+ id="edit-position-bottom-right"
926
+ label="Bottom Right"
927
+ name="position"
928
+ value="bottom_right"
929
+ onChange={(e) =>
930
+ setParameters({
931
+ ...parameters,
932
+ position: e.target.value,
933
+ })
934
+ }
935
+ checked={parameters.position == 'bottom_right' ? true : false}
936
+ className="form-radio"
937
+ />
938
+ </div>
939
+ </div>
940
+ </Form.Group>
941
+ )}
942
+ {isSwitcherEnabled && (
943
+ <div className="custom-position-controls">
944
+ <Row className="mb-3">
945
+ <Col xs="auto">
946
+ <InputGroup>
947
+ <FormControl
948
+ type="number"
949
+ min="0"
950
+ max="250"
951
+ id="custom_position_x_value"
952
+ aria-label="Value in pixels"
953
+ onInput={handleInput}
954
+ defaultValue={widgetSettings.custom_position_x_value}
955
+ />
956
+ <InputGroup.Text>PX</InputGroup.Text>
957
+ </InputGroup>
958
+ </Col>
959
+ <Col xs="auto">
960
+ <Form.Select
961
+ id="custom_position_left_right"
962
+ aria-label="Position select"
963
+ value={widgetSettings.custom_position_left_right}
964
+ >
965
+ <option value="cust-pos-to-the-right">To the right</option>
966
+ <option value="cust-pos-to-the-left">To the left</option>
967
+ </Form.Select>
968
+ </Col>
969
+ </Row>
970
+ <Row className="mb-3">
971
+ <Col xs="auto">
972
+ <InputGroup>
973
+ <FormControl
974
+ type="number"
975
+ min="0"
976
+ max="250"
977
+ id="custom_position_y_value"
978
+ aria-label="Value in pixels"
979
+ onInput={handleInput2}
980
+ defaultValue={widgetSettings.custom_position_y_value}
981
+ />
982
+ <InputGroup.Text>PX</InputGroup.Text>
983
+ </InputGroup>
984
+ </Col>
985
+ <Col xs="auto">
986
+ <Form.Select
987
+ id="custom_position_top_bottom"
988
+ aria-label="Position select"
989
+ value={widgetSettings.custom_position_top_bottom}
990
+ >
991
+ <option value="cust-pos-to-the-lower">To the bottom</option>
992
+ <option value="cust-pos-to-the-upper">To the top</option>
993
+ </Form.Select>
994
+ </Col>
995
+ </Row>
996
+ <div className="description">0 - 250px are permitted values</div>
997
+ </div>
998
+ )}
999
+ </div>
1000
+ </div>
1001
+ </Form.Group>
1002
+
1003
+ <Form.Group className={`icon-type-wrapper row ${isValid ? null : 'd-none'}`}>
1004
+ <Form.Label className="fcol-sm-12 col-form-label">
1005
+ Select icon type:
1006
+ </Form.Label>
1007
+ <div className="col-sm-12">
1008
+ <div className="row">
1009
+ <div className="col-auto mb-30">
1010
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1011
+ <Form.Check type="radio" id="edit-type-1">
1012
+ <Form.Check.Input
1013
+ type="radio"
1014
+ name="aioa_icon_type"
1015
+ value="aioa-icon-type-1"
1016
+ onChange={onIconChange}
1017
+ checked={
1018
+ parameters.icontype == 'aioa-icon-type-1' ? true : false
1019
+ }
1020
+ className="form-radio"
1021
+ ></Form.Check.Input>
1022
+ <Form.Check.Label className="option">
1023
+ <Image src={aioaicontype1} alt="" width="65" height="65" />
1024
+ </Form.Check.Label>
1025
+ </Form.Check>
1026
+ </div>
1027
+ </div>
1028
+ <div className="col-auto mb-30">
1029
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1030
+ <Form.Check type="radio" id="edit-type-2">
1031
+ <Form.Check.Input
1032
+ type="radio"
1033
+ name="aioa_icon_type"
1034
+ value="aioa-icon-type-2"
1035
+ onChange={onIconChange}
1036
+ checked={
1037
+ parameters.icontype == 'aioa-icon-type-2' ? true : false
1038
+ }
1039
+ className="form-radio"
1040
+ ></Form.Check.Input>
1041
+ <Form.Check.Label className="option">
1042
+ <Image src={aioaicontype2} alt="" width="65" height="65" />
1043
+ </Form.Check.Label>
1044
+ </Form.Check>
1045
+ </div>
1046
+ </div>
1047
+
1048
+ <div className="col-auto mb-30">
1049
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1050
+ <Form.Check type="radio" id="edit-type-3">
1051
+ <Form.Check.Input
1052
+ type="radio"
1053
+ name="aioa_icon_type"
1054
+ value="aioa-icon-type-3"
1055
+ onChange={onIconChange}
1056
+ checked={
1057
+ parameters.icontype == 'aioa-icon-type-3' ? true : false
1058
+ }
1059
+ className="form-radio"
1060
+ ></Form.Check.Input>
1061
+ <Form.Check.Label className="option">
1062
+ <Image src={aioaicontype3} alt="" width="65" height="65" />
1063
+ </Form.Check.Label>
1064
+ </Form.Check>
1065
+ </div>
1066
+ </div>
1067
+
1068
+ <div className="col-auto mb-30">
1069
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1070
+ <Form.Check type="radio" id="edit-type-4">
1071
+ <Form.Check.Input
1072
+ type="radio"
1073
+ name="aioa_icon_type"
1074
+ value="aioa-icon-type-4"
1075
+ onChange={onIconChange}
1076
+ checked={
1077
+ parameters.icontype == 'aioa-icon-type-4' ? true : false
1078
+ }
1079
+ className="form-radio"
1080
+ ></Form.Check.Input>
1081
+ <Form.Check.Label className="option">
1082
+ <Image src={aioaicontype4} alt="" width="65" height="65" />
1083
+ </Form.Check.Label>
1084
+ </Form.Check>
1085
+ </div>
1086
+ </div>
1087
+
1088
+ <div className="col-auto mb-30">
1089
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1090
+ <Form.Check type="radio" id="edit-type-5">
1091
+ <Form.Check.Input
1092
+ type="radio"
1093
+ name="aioa_icon_type"
1094
+ value="aioa-icon-type-5"
1095
+ onChange={onIconChange}
1096
+ checked={
1097
+ parameters.icontype == 'aioa-icon-type-5' ? true : false
1098
+ }
1099
+ className="form-radio"
1100
+ ></Form.Check.Input>
1101
+ <Form.Check.Label className="option">
1102
+ <Image src={aioaicontype5} alt="" width="65" height="65" />
1103
+ </Form.Check.Label>
1104
+ </Form.Check>
1105
+ </div>
1106
+ </div>
1107
+
1108
+ <div className="col-auto mb-30">
1109
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1110
+ <Form.Check type="radio" id="edit-type-6">
1111
+ <Form.Check.Input
1112
+ type="radio"
1113
+ name="aioa_icon_type"
1114
+ value="aioa-icon-type-6"
1115
+ onChange={onIconChange}
1116
+ checked={
1117
+ parameters.icontype == 'aioa-icon-type-6' ? true : false
1118
+ }
1119
+ className="form-radio"
1120
+ ></Form.Check.Input>
1121
+ <Form.Check.Label className="option">
1122
+ <Image src={aioaicontype6} alt="" width="65" height="65" />
1123
+ </Form.Check.Label>
1124
+ </Form.Check>
1125
+ </div>
1126
+ </div>
1127
+
1128
+ <div className="col-auto mb-30">
1129
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1130
+ <Form.Check type="radio" id="edit-type-7">
1131
+ <Form.Check.Input
1132
+ type="radio"
1133
+ name="aioa_icon_type"
1134
+ value="aioa-icon-type-7"
1135
+ onChange={onIconChange}
1136
+ checked={
1137
+ parameters.icontype == 'aioa-icon-type-7' ? true : false
1138
+ }
1139
+ className="form-radio"
1140
+ ></Form.Check.Input>
1141
+ <Form.Check.Label className="option">
1142
+ <Image src={aioaicontype7} alt="" width="65" height="65" />
1143
+ </Form.Check.Label>
1144
+ </Form.Check>
1145
+ </div>
1146
+ </div>
1147
+
1148
+ <div className="col-auto mb-30">
1149
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1150
+ <Form.Check type="radio" id="edit-type-8">
1151
+ <Form.Check.Input
1152
+ type="radio"
1153
+ name="aioa_icon_type"
1154
+ value="aioa-icon-type-8"
1155
+ onChange={onIconChange}
1156
+ checked={
1157
+ parameters.icontype == 'aioa-icon-type-8' ? true : false
1158
+ }
1159
+ className="form-radio"
1160
+ ></Form.Check.Input>
1161
+ <Form.Check.Label className="option">
1162
+ <Image src={aioaicontype8} alt="" width="65" height="65" />
1163
+ </Form.Check.Label>
1164
+ </Form.Check>
1165
+ </div>
1166
+ </div>
1167
+
1168
+ <div className="col-auto mb-30">
1169
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1170
+ <Form.Check type="radio" id="edit-type-9">
1171
+ <Form.Check.Input
1172
+ type="radio"
1173
+ name="aioa_icon_type"
1174
+ value="aioa-icon-type-9"
1175
+ onChange={onIconChange}
1176
+ checked={
1177
+ parameters.icontype == 'aioa-icon-type-9' ? true : false
1178
+ }
1179
+ className="form-radio"
1180
+ ></Form.Check.Input>
1181
+ <Form.Check.Label className="option">
1182
+ <Image src={aioaicontype9} alt="" width="65" height="65" />
1183
+ </Form.Check.Label>
1184
+ </Form.Check>
1185
+ </div>
1186
+ </div>
1187
+
1188
+ <div className="col-auto mb-30">
1189
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1190
+ <Form.Check type="radio" id="edit-type-10">
1191
+ <Form.Check.Input
1192
+ type="radio"
1193
+ name="aioa_icon_type"
1194
+ value="aioa-icon-type-10"
1195
+ onChange={onIconChange}
1196
+ checked={
1197
+ parameters.icontype == 'aioa-icon-type-10' ? true : false
1198
+ }
1199
+ className="form-radio"
1200
+ ></Form.Check.Input>
1201
+ <Form.Check.Label className="option">
1202
+ <Image src={aioaicontype10} alt="" width="65" height="65" />
1203
+ </Form.Check.Label>
1204
+ </Form.Check>
1205
+ </div>
1206
+ </div>
1207
+
1208
+ <div className="col-auto mb-30">
1209
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1210
+ <Form.Check type="radio" id="edit-type-11">
1211
+ <Form.Check.Input
1212
+ type="radio"
1213
+ name="aioa_icon_type"
1214
+ value="aioa-icon-type-11"
1215
+ onChange={onIconChange}
1216
+ checked={
1217
+ parameters.icontype == 'aioa-icon-type-11' ? true : false
1218
+ }
1219
+ className="form-radio"
1220
+ ></Form.Check.Input>
1221
+ <Form.Check.Label className="option">
1222
+ <Image src={aioaicontype11} alt="" width="65" height="65" />
1223
+ </Form.Check.Label>
1224
+ </Form.Check>
1225
+ </div>
1226
+ </div>
1227
+
1228
+ <div className="col-auto mb-30">
1229
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1230
+ <Form.Check type="radio" id="edit-type-12">
1231
+ <Form.Check.Input
1232
+ type="radio"
1233
+ name="aioa_icon_type"
1234
+ value="aioa-icon-type-12"
1235
+ onChange={onIconChange}
1236
+ checked={
1237
+ parameters.icontype == 'aioa-icon-type-12' ? true : false
1238
+ }
1239
+ className="form-radio"
1240
+ ></Form.Check.Input>
1241
+ <Form.Check.Label className="option">
1242
+ <Image src={aioaicontype12} alt="" width="65" height="65" />
1243
+ </Form.Check.Label>
1244
+ </Form.Check>
1245
+ </div>
1246
+ </div>
1247
+
1248
+ <div className="col-auto mb-30">
1249
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1250
+ <Form.Check type="radio" id="edit-type-13">
1251
+ <Form.Check.Input
1252
+ type="radio"
1253
+ name="aioa_icon_type"
1254
+ value="aioa-icon-type-13"
1255
+ onChange={onIconChange}
1256
+ checked={
1257
+ parameters.icontype == 'aioa-icon-type-13' ? true : false
1258
+ }
1259
+ className="form-radio"
1260
+ ></Form.Check.Input>
1261
+ <Form.Check.Label className="option">
1262
+ <Image src={aioaicontype13} alt="" width="65" height="65" />
1263
+ </Form.Check.Label>
1264
+ </Form.Check>
1265
+ </div>
1266
+ </div>
1267
+
1268
+ <div className="col-auto mb-30">
1269
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1270
+ <Form.Check type="radio" id="edit-type-14">
1271
+ <Form.Check.Input
1272
+ type="radio"
1273
+ name="aioa_icon_type"
1274
+ value="aioa-icon-type-14"
1275
+ onChange={onIconChange}
1276
+ checked={
1277
+ parameters.icontype == 'aioa-icon-type-14' ? true : false
1278
+ }
1279
+ className="form-radio"
1280
+ ></Form.Check.Input>
1281
+ <Form.Check.Label className="option">
1282
+ <Image src={aioaicontype14} alt="" width="65" height="65" />
1283
+ </Form.Check.Label>
1284
+ </Form.Check>
1285
+ </div>
1286
+ </div>
1287
+
1288
+ <div className="col-auto mb-30">
1289
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1290
+ <Form.Check type="radio" id="edit-type-15">
1291
+ <Form.Check.Input
1292
+ type="radio"
1293
+ name="aioa_icon_type"
1294
+ value="aioa-icon-type-15"
1295
+ onChange={onIconChange}
1296
+ checked={
1297
+ parameters.icontype == 'aioa-icon-type-15' ? true : false
1298
+ }
1299
+ className="form-radio"
1300
+ ></Form.Check.Input>
1301
+ <Form.Check.Label className="option">
1302
+ <Image src={aioaicontype15} alt="" width="65" height="65" />
1303
+ </Form.Check.Label>
1304
+ </Form.Check>
1305
+ </div>
1306
+ </div>
1307
+
1308
+ <div className="col-auto mb-30">
1309
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1310
+ <Form.Check type="radio" id="edit-type-16">
1311
+ <Form.Check.Input
1312
+ type="radio"
1313
+ name="aioa_icon_type"
1314
+ value="aioa-icon-type-16"
1315
+ onChange={onIconChange}
1316
+ checked={
1317
+ parameters.icontype == 'aioa-icon-type-16' ? true : false
1318
+ }
1319
+ className="form-radio"
1320
+ ></Form.Check.Input>
1321
+ <Form.Check.Label className="option">
1322
+ <Image src={aioaicontype16} alt="" width="65" height="65" />
1323
+ </Form.Check.Label>
1324
+ </Form.Check>
1325
+ </div>
1326
+ </div>
1327
+
1328
+ <div className="col-auto mb-30">
1329
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1330
+ <Form.Check type="radio" id="edit-type-17">
1331
+ <Form.Check.Input
1332
+ type="radio"
1333
+ name="aioa_icon_type"
1334
+ value="aioa-icon-type-17"
1335
+ onChange={onIconChange}
1336
+ checked={
1337
+ parameters.icontype == 'aioa-icon-type-17' ? true : false
1338
+ }
1339
+ className="form-radio"
1340
+ ></Form.Check.Input>
1341
+ <Form.Check.Label className="option">
1342
+ <Image src={aioaicontype17} alt="" width="65" height="65" />
1343
+ </Form.Check.Label>
1344
+ </Form.Check>
1345
+ </div>
1346
+ </div>
1347
+
1348
+ <div className="col-auto mb-30">
1349
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1350
+ <Form.Check type="radio" id="edit-type-18">
1351
+ <Form.Check.Input
1352
+ type="radio"
1353
+ name="aioa_icon_type"
1354
+ value="aioa-icon-type-18"
1355
+ onChange={onIconChange}
1356
+ checked={
1357
+ parameters.icontype == 'aioa-icon-type-18' ? true : false
1358
+ }
1359
+ className="form-radio"
1360
+ ></Form.Check.Input>
1361
+ <Form.Check.Label className="option">
1362
+ <Image src={aioaicontype18} alt="" width="65" height="65" />
1363
+ </Form.Check.Label>
1364
+ </Form.Check>
1365
+ </div>
1366
+ </div>
1367
+
1368
+ <div className="col-auto mb-30">
1369
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1370
+ <Form.Check type="radio" id="edit-type-19">
1371
+ <Form.Check.Input
1372
+ type="radio"
1373
+ name="aioa_icon_type"
1374
+ value="aioa-icon-type-19"
1375
+ onChange={onIconChange}
1376
+ checked={
1377
+ parameters.icontype == 'aioa-icon-type-19' ? true : false
1378
+ }
1379
+ className="form-radio"
1380
+ ></Form.Check.Input>
1381
+ <Form.Check.Label className="option">
1382
+ <Image src={aioaicontype19} alt="" width="65" height="65" />
1383
+ </Form.Check.Label>
1384
+ </Form.Check>
1385
+ </div>
1386
+ </div>
1387
+
1388
+ <div className="col-auto mb-30">
1389
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1390
+ <Form.Check type="radio" id="edit-type-20">
1391
+ <Form.Check.Input
1392
+ type="radio"
1393
+ name="aioa_icon_type"
1394
+ value="aioa-icon-type-20"
1395
+ onChange={onIconChange}
1396
+ checked={
1397
+ parameters.icontype == 'aioa-icon-type-20' ? true : false
1398
+ }
1399
+ className="form-radio"
1400
+ ></Form.Check.Input>
1401
+ <Form.Check.Label className="option">
1402
+ <Image src={aioaicontype20} alt="" width="65" height="65" />
1403
+ </Form.Check.Label>
1404
+ </Form.Check>
1405
+ </div>
1406
+ </div>
1407
+
1408
+ <div className="col-auto mb-30">
1409
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1410
+ <Form.Check type="radio" id="edit-type-21">
1411
+ <Form.Check.Input
1412
+ type="radio"
1413
+ name="aioa_icon_type"
1414
+ value="aioa-icon-type-21"
1415
+ onChange={onIconChange}
1416
+ checked={
1417
+ parameters.icontype == 'aioa-icon-type-21' ? true : false
1418
+ }
1419
+ className="form-radio"
1420
+ ></Form.Check.Input>
1421
+ <Form.Check.Label className="option">
1422
+ <Image src={aioaicontype21} alt="" width="65" height="65" />
1423
+ </Form.Check.Label>
1424
+ </Form.Check>
1425
+ </div>
1426
+ </div>
1427
+
1428
+ <div className="col-auto mb-30">
1429
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1430
+ <Form.Check type="radio" id="edit-type-22">
1431
+ <Form.Check.Input
1432
+ type="radio"
1433
+ name="aioa_icon_type"
1434
+ value="aioa-icon-type-22"
1435
+ onChange={onIconChange}
1436
+ checked={
1437
+ parameters.icontype == 'aioa-icon-type-22' ? true : false
1438
+ }
1439
+ className="form-radio"
1440
+ ></Form.Check.Input>
1441
+ <Form.Check.Label className="option">
1442
+ <Image src={aioaicontype22} alt="" width="65" height="65" />
1443
+ </Form.Check.Label>
1444
+ </Form.Check>
1445
+ </div>
1446
+ </div>
1447
+
1448
+ <div className="col-auto mb-30">
1449
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1450
+ <Form.Check type="radio" id="edit-type-23">
1451
+ <Form.Check.Input
1452
+ type="radio"
1453
+ name="aioa_icon_type"
1454
+ value="aioa-icon-type-23"
1455
+ onChange={onIconChange}
1456
+ checked={
1457
+ parameters.icontype == 'aioa-icon-type-23' ? true : false
1458
+ }
1459
+ className="form-radio"
1460
+ ></Form.Check.Input>
1461
+ <Form.Check.Label className="option">
1462
+ <Image src={aioaicontype23} alt="" width="65" height="65" />
1463
+ </Form.Check.Label>
1464
+ </Form.Check>
1465
+ </div>
1466
+ </div>
1467
+
1468
+ <div className="col-auto mb-30">
1469
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1470
+ <Form.Check type="radio" id="edit-type-24">
1471
+ <Form.Check.Input
1472
+ type="radio"
1473
+ name="aioa_icon_type"
1474
+ value="aioa-icon-type-24"
1475
+ onChange={onIconChange}
1476
+ checked={
1477
+ parameters.icontype == 'aioa-icon-type-24' ? true : false
1478
+ }
1479
+ className="form-radio"
1480
+ ></Form.Check.Input>
1481
+ <Form.Check.Label className="option">
1482
+ <Image src={aioaicontype24} alt="" width="65" height="65" />
1483
+ </Form.Check.Label>
1484
+ </Form.Check>
1485
+ </div>
1486
+ </div>
1487
+
1488
+ <div className="col-auto mb-30">
1489
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1490
+ <Form.Check type="radio" id="edit-type-25">
1491
+ <Form.Check.Input
1492
+ type="radio"
1493
+ name="aioa_icon_type"
1494
+ value="aioa-icon-type-25"
1495
+ onChange={onIconChange}
1496
+ checked={
1497
+ parameters.icontype == 'aioa-icon-type-25' ? true : false
1498
+ }
1499
+ className="form-radio"
1500
+ ></Form.Check.Input>
1501
+ <Form.Check.Label className="option">
1502
+ <Image src={aioaicontype25} alt="" width="65" height="65" />
1503
+ </Form.Check.Label>
1504
+ </Form.Check>
1505
+ </div>
1506
+ </div>
1507
+
1508
+ <div className="col-auto mb-30">
1509
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1510
+ <Form.Check type="radio" id="edit-type-26">
1511
+ <Form.Check.Input
1512
+ type="radio"
1513
+ name="aioa_icon_type"
1514
+ value="aioa-icon-type-26"
1515
+ onChange={onIconChange}
1516
+ checked={
1517
+ parameters.icontype == 'aioa-icon-type-26' ? true : false
1518
+ }
1519
+ className="form-radio"
1520
+ ></Form.Check.Input>
1521
+ <Form.Check.Label className="option">
1522
+ <Image src={aioaicontype26} alt="" width="65" height="65" />
1523
+ </Form.Check.Label>
1524
+ </Form.Check>
1525
+ </div>
1526
+ </div>
1527
+
1528
+ <div className="col-auto mb-30">
1529
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1530
+ <Form.Check type="radio" id="edit-type-27">
1531
+ <Form.Check.Input
1532
+ type="radio"
1533
+ name="aioa_icon_type"
1534
+ value="aioa-icon-type-27"
1535
+ onChange={onIconChange}
1536
+ checked={
1537
+ parameters.icontype == 'aioa-icon-type-27' ? true : false
1538
+ }
1539
+ className="form-radio"
1540
+ ></Form.Check.Input>
1541
+ <Form.Check.Label className="option">
1542
+ <Image src={aioaicontype27} alt="" width="65" height="65" />
1543
+ </Form.Check.Label>
1544
+ </Form.Check>
1545
+ </div>
1546
+ </div>
1547
+
1548
+ <div className="col-auto mb-30">
1549
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1550
+ <Form.Check type="radio" id="edit-type-28">
1551
+ <Form.Check.Input
1552
+ type="radio"
1553
+ name="aioa_icon_type"
1554
+ value="aioa-icon-type-28"
1555
+ onChange={onIconChange}
1556
+ checked={
1557
+ parameters.icontype == 'aioa-icon-type-28' ? true : false
1558
+ }
1559
+ className="form-radio"
1560
+ ></Form.Check.Input>
1561
+ <Form.Check.Label className="option">
1562
+ <Image src={aioaicontype28} alt="" width="65" height="65" />
1563
+ </Form.Check.Label>
1564
+ </Form.Check>
1565
+ </div>
1566
+ </div>
1567
+
1568
+ <div className="col-auto mb-30">
1569
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1570
+ <Form.Check type="radio" id="edit-type-29">
1571
+ <Form.Check.Input
1572
+ type="radio"
1573
+ name="aioa_icon_type"
1574
+ value="aioa-icon-type-29"
1575
+ onChange={onIconChange}
1576
+ checked={
1577
+ parameters.icontype == 'aioa-icon-type-29' ? true : false
1578
+ }
1579
+ className="form-radio"
1580
+ ></Form.Check.Input>
1581
+ <Form.Check.Label className="option">
1582
+ <Image src={aioaicontype29} alt="" width="65" height="65" />
1583
+ </Form.Check.Label>
1584
+ </Form.Check>
1585
+ </div>
1586
+ </div>
1587
+ </div>
1588
+ </div>
1589
+ </Form.Group>
1590
+
1591
+ <Form.Group className={`mb-30 row`}>
1592
+ <div className="icon-custom-size-wrapper mb-3">
1593
+ <Row className="align-items-center mb-30">
1594
+ <Col>
1595
+ <Form.Label className="col-sm-12 col-form-label">
1596
+ Enable icon custom size:
1597
+ </Form.Label>
1598
+ </Col>
1599
+ <Col xs="auto">
1600
+ <Form.Check
1601
+ type="switch"
1602
+ id="custom-size-switcher"
1603
+ className="custom-switcher_inp_2"
1604
+ checked={isSizeSwitcherEnabled}
1605
+ onChange={() => setSizeSwitcherEnabled(!isSizeSwitcherEnabled)}
1606
+ style={{
1607
+ transform: 'scale(1.5)', // Increase the switch size
1608
+ }}
1609
+ />
1610
+ </Col>
1611
+ </Row>
1612
+
1613
+ {!isSizeSwitcherEnabled && (
1614
+ <Form.Group
1615
+ className={`icon-size-wrapper row ${isValid ? null : 'd-none'}`}
1616
+ >
1617
+ <Form.Label className="fcol-sm-12 col-form-label">
1618
+ Select icon size:
1619
+ </Form.Label>
1620
+ <div className="col-sm-12">
1621
+ <div className="row">
1622
+ <div className="col-auto mb-30">
1623
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1624
+ <Form.Check type="radio" id="edit-size-big">
1625
+ <Form.Check.Input
1626
+ type="radio"
1627
+ name="aioa_icon_size"
1628
+ value="aioa-big-icon"
1629
+ onChange={(e) =>
1630
+ setParameters({
1631
+ ...parameters,
1632
+ iconsize: e.target.value,
1633
+ })
1634
+ }
1635
+ checked={
1636
+ parameters.iconsize == 'aioa-big-icon' ? true : false
1637
+ }
1638
+ className="form-radio"
1639
+ ></Form.Check.Input>
1640
+ <Form.Check.Label className="option">
1641
+ <Image src={iconsize} alt="" width="75" height="75" />
1642
+ </Form.Check.Label>
1643
+ </Form.Check>
1644
+ </div>
1645
+ </div>
1646
+ <div className="col-auto mb-30">
1647
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1648
+ <Form.Check type="radio" id="edit-size-medium">
1649
+ <Form.Check.Input
1650
+ type="radio"
1651
+ name="aioa_icon_size"
1652
+ value="aioa-medium-icon"
1653
+ onChange={(e) =>
1654
+ setParameters({
1655
+ ...parameters,
1656
+ iconsize: e.target.value,
1657
+ })
1658
+ }
1659
+ checked={
1660
+ parameters.iconsize == 'aioa-medium-icon' ? true : false
1661
+ }
1662
+ className="form-radio"
1663
+ ></Form.Check.Input>
1664
+ <Form.Check.Label className="option">
1665
+ <Image src={iconsize} alt="" width="65" height="65" />
1666
+ </Form.Check.Label>
1667
+ </Form.Check>
1668
+ </div>
1669
+ </div>
1670
+ <div className="col-auto mb-30">
1671
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1672
+ <Form.Check type="radio" id="edit-size-default">
1673
+ <Form.Check.Input
1674
+ type="radio"
1675
+ name="aioa_icon_size"
1676
+ value="aioa-default-icon"
1677
+ onChange={(e) =>
1678
+ setParameters({
1679
+ ...parameters,
1680
+ iconsize: e.target.value,
1681
+ })
1682
+ }
1683
+ checked={
1684
+ parameters.iconsize == 'aioa-default-icon'
1685
+ ? true
1686
+ : false
1687
+ }
1688
+ className="form-radio"
1689
+ ></Form.Check.Input>
1690
+ <Form.Check.Label className="option">
1691
+ <Image src={iconsize} alt="" width="55" height="55" />
1692
+ </Form.Check.Label>
1693
+ </Form.Check>
1694
+ </div>
1695
+ </div>
1696
+ <div className="col-auto mb-30">
1697
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1698
+ <Form.Check type="radio" id="edit-size-small">
1699
+ <Form.Check.Input
1700
+ type="radio"
1701
+ name="aioa_icon_size"
1702
+ value="aioa-small-icon"
1703
+ onChange={(e) =>
1704
+ setParameters({
1705
+ ...parameters,
1706
+ iconsize: e.target.value,
1707
+ })
1708
+ }
1709
+ checked={
1710
+ parameters.iconsize == 'aioa-small-icon' ? true : false
1711
+ }
1712
+ className="form-radio"
1713
+ ></Form.Check.Input>
1714
+ <Form.Check.Label className="option">
1715
+ <Image src={iconsize} alt="" width="45" height="45" />
1716
+ </Form.Check.Label>
1717
+ </Form.Check>
1718
+ </div>
1719
+ </div>
1720
+ <div className="col-auto mb-30">
1721
+ <div className="js-form-item form-item js-form-type-radio form-type-radio js-form-item-position form-item-position">
1722
+ <Form.Check type="radio" id="edit-size-extra-small">
1723
+ <Form.Check.Input
1724
+ type="radio"
1725
+ name="aioa_icon_size"
1726
+ value="aioa-extra-small-icon"
1727
+ onChange={(e) =>
1728
+ setParameters({
1729
+ ...parameters,
1730
+ iconsize: e.target.value,
1731
+ })
1732
+ }
1733
+ checked={
1734
+ parameters.iconsize == 'aioa-extra-small-icon'
1735
+ ? true
1736
+ : false
1737
+ }
1738
+ className="form-radio"
1739
+ ></Form.Check.Input>
1740
+ <Form.Check.Label className="option">
1741
+ <Image src={iconsize} alt="" width="35" height="35" />
1742
+ </Form.Check.Label>
1743
+ </Form.Check>
1744
+ </div>
1745
+ </div>
1746
+ </div>
1747
+ </div>
1748
+ </Form.Group>
1749
+ )}
1750
+
1751
+ {isSizeSwitcherEnabled && (
1752
+ <div className="custom-size-controls mt-3">
1753
+ <Row>
1754
+ <Col xs="auto" className="controls">
1755
+ <Form.Label
1756
+ htmlFor="widget_icon_size_custom"
1757
+ className="fcol-sm-12 col-form-label"
1758
+ >
1759
+ Select exact icon size:
1760
+ </Form.Label>
1761
+ <InputGroup className="mb-2">
1762
+ <FormControl
1763
+ type="number"
1764
+ id="widget_icon_size_custom"
1765
+ name="widget_icon_size_custom"
1766
+ aria-label="Value in pixels"
1767
+ aria-describedby="size-value-input_1"
1768
+ style={{height: 'auto'}}
1769
+ min="20"
1770
+ max="150"
1771
+ onInput={handleInput1}
1772
+ defaultValue={widgetSettings.widget_icon_size_custom}
1773
+ />
1774
+ <InputGroup.Text
1775
+ style={{height: 'auto'}}
1776
+ id="size-value-input_1"
1777
+ >
1778
+ PX
1779
+ </InputGroup.Text>
1780
+ </InputGroup>
1781
+ <div className="description">20 - 150px are permitted values</div>
1782
+ </Col>
1783
+ </Row>
1784
+ </div>
1785
+ )}
1786
+ </div>
1787
+ </Form.Group>
1788
+
1789
+ <div className="save-changes-btn">
1790
+ <Button
1791
+ variant="primary"
1792
+ size="lg"
1793
+ id="submit"
1794
+ onClick={onSaveChanges}
1795
+ className="btn btn-primary"
1796
+ >
1797
+ Save Changes
1798
+ </Button>
1799
+ <Form.Group className={`mt-30 row`}>
1800
+ {showSuccessMessage && (
1801
+ <div className="success-message">Settings successfully saved!</div>
1802
+ )}
1803
+ </Form.Group>
1804
+ </div>
1805
+ </Form>
1806
+ </div>
1807
+ </div>
1808
+ </div>
1809
+ </div>
1810
+ </div>
1811
+ </div>
1812
+ </div>
1813
+ </>
1814
+ )
1815
+ }
1816
+ export default HomePage