solara 0.4.0 → 0.6.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. checksums.yaml +4 -4
  2. data/solara/lib/.DS_Store +0 -0
  3. data/solara/lib/core/.DS_Store +0 -0
  4. data/solara/lib/core/brands/brand_onboarder.rb +1 -1
  5. data/solara/lib/core/brands/brand_switcher.rb +92 -1
  6. data/solara/lib/core/dashboard/brand/BrandDetail.js +34 -2
  7. data/solara/lib/core/dashboard/brand/BrandDetailController.js +27 -234
  8. data/solara/lib/core/dashboard/brand/BrandDetailModel.js +14 -5
  9. data/solara/lib/core/dashboard/brand/BrandDetailView.js +16 -200
  10. data/solara/lib/core/dashboard/brand/SectionsFormManager.js +293 -0
  11. data/solara/lib/core/dashboard/brand/brand.html +223 -174
  12. data/solara/lib/core/dashboard/brand/source/BrandLocalSource.js +2 -5
  13. data/solara/lib/core/dashboard/brand/source/BrandRemoteSource.js +36 -133
  14. data/solara/lib/core/dashboard/brands/Brands.js +31 -0
  15. data/solara/lib/core/dashboard/brands/BrandsController.js +0 -5
  16. data/solara/lib/core/dashboard/brands/BrandsView.js +2 -2
  17. data/solara/lib/core/dashboard/brands/brands.html +71 -52
  18. data/solara/lib/core/dashboard/component/AliasesBottomSheet.js +6 -6
  19. data/solara/lib/core/dashboard/component/BrandOptionsBottomSheet.js +4 -4
  20. data/solara/lib/core/dashboard/component/ConfirmationDialog.js +15 -10
  21. data/solara/lib/core/dashboard/component/EditJsonSheet.js +160 -0
  22. data/solara/lib/core/dashboard/component/MessageBottomSheet.js +5 -5
  23. data/solara/lib/core/dashboard/component/OnboardBrandBottomSheet.js +9 -3
  24. data/solara/lib/core/dashboard/handler/base_handler.rb +1 -0
  25. data/solara/lib/core/dashboard/handler/edit_section_handler.rb +1 -5
  26. data/solara/lib/core/dashboard/handler/onboard_brand_handler.rb +0 -15
  27. data/solara/lib/core/doctor/schema/brand_configurations.json +0 -8
  28. data/solara/lib/core/doctor/schema/platform/global/resources_manifest.json +30 -0
  29. data/solara/lib/core/doctor/schema/platform/json_manifest.json +39 -0
  30. data/solara/lib/core/doctor/validator/template/android_template_validation_config.yml +35 -1
  31. data/solara/lib/core/doctor/validator/template/flutter_template_validation_config.yml +30 -1
  32. data/solara/lib/core/doctor/validator/template/ios_template_validation_config.yml +35 -1
  33. data/solara/lib/core/doctor/validator/template/template_validator.rb +9 -9
  34. data/solara/lib/core/scripts/brand_config_manager.rb +1 -1
  35. data/solara/lib/core/scripts/brand_configurations_manager.rb +41 -0
  36. data/solara/lib/core/scripts/code_generator.rb +342 -118
  37. data/solara/lib/core/scripts/file_manager.rb +11 -15
  38. data/solara/lib/core/scripts/file_path.rb +21 -1
  39. data/solara/lib/core/scripts/gitignore_manager.rb +12 -6
  40. data/solara/lib/core/scripts/json_manifest_processor.rb +136 -0
  41. data/solara/lib/core/scripts/platform/ios/infoplist_string_catalog_manager.rb +11 -1
  42. data/solara/lib/core/scripts/resource_manifest_processor.rb +151 -0
  43. data/solara/lib/core/scripts/solara_status_manager.rb +1 -1
  44. data/solara/lib/core/scripts/theme_generator.rb +21 -242
  45. data/solara/lib/core/solara_configurator.rb +1 -1
  46. data/solara/lib/core/template/brands/global/resources_manifest.json +10 -0
  47. data/solara/lib/core/template/brands/json/Json-Manifest.md +59 -0
  48. data/solara/lib/core/template/brands/json/json_manifest.json +16 -0
  49. data/solara/lib/core/template/brands/shared/theme.json +213 -29
  50. data/solara/lib/core/template/config/android_template_config.json +50 -0
  51. data/solara/lib/core/template/config/flutter_template_config.json +35 -0
  52. data/solara/lib/core/template/config/ios_template_config.json +50 -0
  53. data/solara/lib/core/template/configurations.json +46 -0
  54. data/solara/lib/core/template/project_template_generator.rb +2 -0
  55. data/solara/lib/solara/version.rb +1 -1
  56. data/solara/lib/solara.rb +19 -0
  57. data/solara/lib/solara_manager.rb +21 -13
  58. metadata +13 -4
  59. data/solara/lib/core/dashboard/component/AddFieldSheet.js +0 -175
  60. data/solara/lib/core/dashboard/handler/brand_configurations_manager.rb +0 -73
@@ -15,7 +15,34 @@
15
15
  --border-color: #E1E4E8;
16
16
  --delete-color: #dc3545;
17
17
  --field-shadow: 0 1.4px 3.5px rgba(0, 0, 0, 0.1);
18
+
19
+ --card-item-bg: rgba(255, 255, 255, 0.05);
20
+ --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
21
+ --section-shadow: 0 1.4px 7px rgba(0, 0, 0, 0.1);
22
+ --delete-btn-color: #ff6b6b;
23
+ --delete-btn-hover: #ff4757;
24
+ --add-property-btn-color: #5ecd73;
25
+ --logo-shadow-color: rgba(255, 255, 255, 0.2);
26
+ --hover: rgba(0, 123, 255, 0.5);
27
+ }
28
+
29
+ body.dark-mode {
30
+ --primary-color: #2C3E50;
31
+ --secondary-color: #34495E;
32
+ --background-color: #1A1A1A;
33
+ --text-color: #F5F5F5;
34
+ --border-color: #4A4A4A;
35
+ --delete-color: #E74C3C;
36
+ --field-shadow: 0 1.4px 3.5px rgba(255, 255, 255, 0.1);
37
+ --card-item-bg: rgba(255, 255, 255, 0.1);
38
+ --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
39
+ --section-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
40
+ --delete-btn-color: #ff8f8f;
41
+ --delete-btn-hover: #ff6b6b;
42
+ --add-property-btn-color: #7eed8e;
43
+ --hover: rgba(255, 255, 255, 0.2);
18
44
  }
45
+
19
46
  body {
20
47
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
21
48
  background-color: var(--background-color);
@@ -24,7 +51,23 @@
24
51
  margin: 0;
25
52
  padding-top: 77px;
26
53
  font-size: 12.6px;
54
+ transition: background-color 0.3s, color 0.3s;
55
+ }
56
+
57
+ .mode-toggle {
58
+ background: none;
59
+ border: none;
60
+ color: white;
61
+ font-size: 1.5em;
62
+ cursor: pointer;
63
+ margin-left: 15px;
64
+ transition: color 0.3s;
65
+ }
66
+
67
+ .mode-toggle:hover {
68
+ color: var(--hover);
27
69
  }
70
+
28
71
  .container {
29
72
  display: table;
30
73
  width: 100%;
@@ -66,17 +109,15 @@
66
109
  }
67
110
  .index li {
68
111
  padding: 5.6px;
69
- border-bottom: 1px solid #eee;
70
112
  margin-bottom: 7px;
71
113
  text-align: left;
72
114
  }
73
115
 
74
-
75
116
  .index li:last-child {
76
117
  border-bottom: none;
77
118
  }
78
119
  .index a {
79
- color: #0066cc;
120
+ color: var(--text-color);
80
121
  text-decoration: none;
81
122
  }
82
123
  .index a:hover {
@@ -85,67 +126,30 @@
85
126
  .index-item {
86
127
  list-style: none;
87
128
  padding: 7px;
88
- background-color: white;
89
- border-radius: 3.5px;
90
- box-shadow: 0 1.4px 3.5px rgba(0, 0, 0, 0.2);
91
- transition: box-shadow 0.3s;
129
+ font-size: 14px;
92
130
  }
93
131
 
94
132
  .index-item:hover {
95
- box-shadow: 0 2.8px 7px rgba(0, 0, 0, 0.3);
96
- }
97
- .sections {
98
- width: 90%;
99
- padding: 14px;
133
+ background-color: var(--hover);
100
134
  }
101
135
 
102
136
  h1 {
103
137
  margin: 0;
104
138
  font-size: 1.75em;
105
139
  }
106
- .section {
107
- background-color: white;
108
- border-radius: 5.6px;
109
- box-shadow: 0 1.4px 7px rgba(0, 0, 0, 0.1);
110
- margin-bottom: 21px;
111
- padding: 14px;
112
- }
140
+
113
141
  h2 {
114
- color: var(--primary-color);
142
+ color: var(--text-color);
115
143
  border-bottom: 1.4px solid var(--border-color);
116
144
  padding-bottom: 7px;
117
145
  margin-top: 0;
118
146
  font-size: 1.4em;
119
147
  }
120
- .input-group {
121
- min-width: 80%;
122
- margin-bottom: 10px;
123
- display: flex;
124
- align-items: center;
125
- background-color: white;
126
- border-radius: 5.6px;
127
- box-shadow: var(--field-shadow);
128
- padding: 7px;
129
- transition: box-shadow 0.3s ease;
130
- }
131
- .input-group:hover {
132
- box-shadow: 0 2.8px 5.6px rgba(0, 0, 0, 0.15);
133
- }
134
- .input-wrapper {
135
- display: flex;
136
- align-items: center;
137
- flex-grow: 1;
138
- }
139
- .input-wrapper input[type="checkbox"] {
140
- margin-right: 7px;
141
- flex-grow: 0;
142
- }
143
- .checkbox-label {
144
- flex-grow: 1;
145
- }
146
- .input-wrapper label[for] {
147
- margin-right: 7px;
148
+
149
+ h3 {
150
+ color: var(--primary-color);
148
151
  }
152
+
149
153
  label {
150
154
  display: inline-block;
151
155
  margin-right: 7px;
@@ -154,12 +158,11 @@
154
158
  flex-shrink: 0;
155
159
  }
156
160
  input, select {
157
- flex-grow: 1;
158
- padding: 7px;
159
- border: 0.7px solid var(--border-color);
160
- border-radius: 2.8px;
161
- font-size: 11.2px;
161
+ background-color: var(--background-color);
162
+ color: var(--text-color);
163
+ border: 1px solid var(--border-color);
162
164
  }
165
+
163
166
  input[type="color"] {
164
167
  height: 35px;
165
168
  padding: 1.4px;
@@ -175,59 +178,7 @@
175
178
  transition: background-color 0.3s ease;
176
179
  }
177
180
  button:hover {
178
- background-color: #3CC2A3;
179
- }
180
-
181
- .delete-icon {
182
- color: var(--delete-color);
183
- cursor: pointer;
184
- font-weight: bold;
185
- font-size: 14px;
186
- line-height: 1;
187
- padding: 7px 10.5px;
188
- margin-left: 7px;
189
- border-radius: 2.8px;
190
- transition: background-color 0.3s ease;
191
- }
192
- .delete-icon:hover {
193
- color: #fff;
194
- background-color: var(--delete-color);
195
- }
196
- .section-title-container {
197
- margin-bottom: 0.7em;
198
- }
199
- .section-title-container h2 {
200
- margin-bottom: 0.14em;
201
- }
202
- .section-subtitle {
203
- font-size: 1.0em;
204
- color: #666;
205
- margin-bottom: 22.4px;
206
- }
207
-
208
- @media (max-width: 768px) {
209
- .sections {
210
- padding: 7px;
211
- }
212
- .input-group {
213
- flex-direction: column;
214
- align-items: flex-start;
215
- }
216
- label {
217
- margin-bottom: 3.5px;
218
- }
219
- .input-wrapper {
220
- width: 100%;
221
- }
222
- }
223
-
224
- .add-array-item {
225
- background-color: #4CAF50;
226
- color: white;
227
- border: none;
228
- padding: 3.5px 7px;
229
- border-radius: 2.8px;
230
- cursor: pointer;
181
+ background-color: var(--hover);
231
182
  }
232
183
 
233
184
  .logo {
@@ -242,6 +193,7 @@
242
193
  }
243
194
 
244
195
  .header-container {
196
+ width: 100%;
245
197
  display: flex;
246
198
  align-items: center;
247
199
  justify-content: center;
@@ -258,7 +210,6 @@
258
210
  align-items: center;
259
211
  justify-content: center;
260
212
  }
261
-
262
213
  header {
263
214
  background-color: var(--primary-color);
264
215
  color: white;
@@ -282,11 +233,6 @@
282
233
  transform: translateY(-100%);
283
234
  }
284
235
 
285
- h1 {
286
- margin: 0;
287
- font-size: 1.75em;
288
- }
289
-
290
236
  .action-buttons {
291
237
  width: 100%;
292
238
  background-color: var(--primary-color);
@@ -296,36 +242,14 @@
296
242
  transition: background-color 0.3s ease, opacity 0.3s ease;
297
243
  }
298
244
 
299
- .add-field-btn {
300
- min-width: 105px;
301
- background-color: var(--primary-color);
302
- color: white;
303
- margin: 7px;
304
- font-size: 12.6px;
305
- transition: background-color 0.3s ease, opacity 0.3s ease;
306
- }
307
-
308
- .apply-changes-button {
309
- width: 100%;
310
- background-color: #ff4136;
311
- color: white;
312
- margin: 7px;
313
- font-size: 12.6px;
314
- transition: background-color 0.3s ease, opacity 0.3s ease;
315
- }
316
-
317
245
  .action-buttons button:hover {
318
- background-color: #3A7BC8;
246
+ color: var(--hover);
319
247
  }
320
248
 
321
249
  #switchButton {
322
250
  display: none;
323
251
  }
324
252
 
325
- #applyChangesButton {
326
- display: none;
327
- }
328
-
329
253
  #error-button {
330
254
  position: fixed;
331
255
  bottom: 14px;
@@ -385,7 +309,8 @@
385
309
  left: 50%;
386
310
  transform: translate(-50%, -50%);
387
311
  text-align: center;
388
- background-color: white;
312
+ background-color: var(--background-color);
313
+ color: var(--text-color);
389
314
  padding: 28px;
390
315
  border-radius: 14px;
391
316
  box-shadow: 0 2.8px 14px rgba(0, 0, 0, 0.1);
@@ -412,7 +337,7 @@
412
337
 
413
338
  .add-brand-container h2 {
414
339
  font-size: 12.6px;
415
- color: #333;
340
+ color: var(--text-color);
416
341
  margin-bottom: 21px;
417
342
  animation: slideDown 0.5s ease-out 0.3s both;
418
343
  }
@@ -434,13 +359,12 @@
434
359
  }
435
360
 
436
361
  .add-brand-container button:hover {
437
- background-color: #3A7BC8;
438
362
  transform: scale(1.05);
439
363
  }
440
364
 
441
365
  .button-message {
442
366
  font-size: 12.6px;
443
- color: #666;
367
+ color: var(--text-color);
444
368
  margin-bottom: 3.5px;
445
369
  opacity: 0;
446
370
  animation: fadeInMessage 0.5s ease-out forwards;
@@ -482,7 +406,7 @@
482
406
  left: 0;
483
407
  width: 100%;
484
408
  height: 100%;
485
- background-color: black;
409
+ background-color: var(--background-color);
486
410
  display: flex;
487
411
  align-items: center;
488
412
  justify-content: center;
@@ -493,69 +417,194 @@
493
417
  width: 105px;
494
418
  height: 105px;
495
419
  margin-right: 14px;
496
- filter: drop-shadow(2.1px 2.1px 2.1px rgba(0, 0, 0, 0.3));
420
+ filter: drop-shadow(2.1px 2.1px 2.1px var(--logo-shadow-color));
497
421
  transition: transform 0.3s ease;
498
422
  }
499
423
 
500
- .json-object {
501
- margin-bottom: 10px;
502
- border: 3px solid #1e88e5; /* Blue border */
503
- padding: 10px;
424
+ .sections {
425
+ width: 90%;
426
+ padding: 14px;
427
+ }
428
+ .section {
429
+ background-color: var(--background-color);
430
+ border-radius: 5.6px;
431
+ box-shadow: var(--section-shadow);
432
+ margin-bottom: 21px;
433
+ padding: 14px;
434
+ }
435
+ .section-title {
436
+ color: var(--text-color);
437
+ }
438
+ .section-title-container {
439
+ margin-bottom: 0.7em;
440
+ }
441
+ .section-title-container h2 {
442
+ margin-bottom: 0.14em;
443
+ }
444
+
445
+ @media (max-width: 768px) {
446
+ .sections {
447
+ padding: 7px;
448
+ }
449
+ label {
450
+ margin-bottom: 3.5px;
451
+ }
452
+ }
453
+ .card {
454
+ background-color: var(--background-color);
455
+ color: var(--text-color);
504
456
  }
505
- .json-object-title {
457
+ .card-header {
458
+ display: flex;
459
+ align-items: center;
506
460
  font-weight: bold;
507
- flex-shrink: 0;
508
- color: black;
509
- font-size: 16px;
510
461
  margin-bottom: 10px;
511
462
  }
463
+ .card-content {
464
+ margin-left: 15px;
465
+ }
466
+ .card-item {
467
+ padding-top: 5px;
468
+ padding-bottom: 5px;
469
+ padding-left: 10px;
470
+ padding-right: 5px;
471
+ margin-bottom: 20px;
472
+ display: flex;
473
+ flex-direction: column;
474
+ align-items: flex-start;
475
+ background: var(--card-item-bg);
476
+ border-radius: 10px;
477
+ box-shadow: var(--card-shadow);
478
+ }
479
+ .card-item:hover {
480
+ transform: translateY(-1.5px);
481
+ }
482
+ .card-key {
483
+ min-width: 20%;
484
+ font-weight: bold;
485
+ cursor: pointer;
486
+ text-align: left;
487
+ display: flex;
488
+ justify-content: flex-start;
489
+ padding-right: 10px;
490
+ font-size: 14px;
491
+ margin-bottom: 5px;
492
+ margin-right: 10px;
493
+ hyphens: auto;
494
+ word-break: break-word;
495
+ }
496
+ .card-value-container {
497
+ display: flex;
498
+ flex-direction: row;
499
+ align-items: center;
500
+ width: 100%;
501
+ }
502
+ .card-value {
503
+ flex: 1 1 80%;
504
+ width: 100%;
505
+ display: flex;
506
+ min-height: 25px;
507
+ border: 1px solid var(--border-color);
508
+ border-radius: 3px;
509
+ margin-bottom: 5px;
510
+ resize: vertical;
511
+ flex-direction: column;
512
+ padding-top: 15px;
513
+ padding-left: 10px;
514
+ padding-right: 10px;
515
+ background-color: var(--background-color);
516
+ color: var(--text-color);
517
+ }
518
+ .boolean-container {
519
+ flex-direction: row;
520
+ display: flex;
521
+ align-items: center;
522
+
523
+ cursor: pointer;
524
+ padding: 0px;
525
+ flex: 1;
526
+ }
527
+
528
+ .boolean-container:hover {
529
+ background-color: var(--background-color));
530
+ }
531
+
532
+ .card-value.checkbox-container {
533
+ flex-direction: row;
534
+ display: flex;
535
+ align-items: start;
536
+ gap: 0px;
537
+ padding-bottom: 10px;
538
+ margin-left: 10px;
539
+ }
512
540
 
513
- .json-array {
514
- border-left: 2px solid #ff9800; /* Orange border */
515
- padding: 10px;
541
+ .card-value.checkbox {
542
+ width: auto;
543
+ height: auto;
544
+ margin: 0;
545
+ flex: 0;
546
+ cursor: pointer;
516
547
  }
517
548
 
518
- .json-array-item {
519
- margin-left: 20px;
549
+ .checkbox-value {
550
+ font-size: 1.2em;
551
+ color: var(--text-color);
552
+ user-select: none;
553
+ flex: 0;
554
+ margin-left: 10px;
520
555
  }
521
556
 
522
- .json-array-label-group {
523
- min-width: 80%;
524
- margin-bottom: 17.5px;
557
+ .card-actions {
525
558
  display: flex;
526
559
  align-items: center;
527
- background-color: white;
528
- border-radius: 5.6px;
529
- box-shadow: var(--field-shadow);
530
- padding: 7px;
531
- transition: box-shadow 0.3s ease;
560
+ justify-content: flex-start;
532
561
  }
533
- .json-array-label-group:hover {
534
- box-shadow: 0 2.8px 5.6px rgba(0, 0, 0, 0.15);
562
+ .delete-btn {
563
+ background-color: transparent;
564
+ color: var(--delete-btn-color);
565
+ border: none;
566
+ cursor: pointer;
567
+ font-size: 16px;
568
+ margin-left: 5px;
569
+ }
570
+ .delete-btn:hover {
571
+ color: var(--delete-btn-hover);
572
+ }
573
+ .add-property-btn {
574
+ background: none;
575
+ border: none;
576
+ color: var(--add-property-btn-color);
577
+ cursor: pointer;
578
+ font-size: 16px;
535
579
  }
536
-
537
580
  </style>
538
581
  </head>
539
- <body>
582
+ <body class="dark-mode">
540
583
 
541
584
  <header id="header" class="header-container">
542
585
  <div class="header-content">
543
586
  <img class="logo" src="../solara.png" alt="Splash Image">
544
587
  <h1><span id="brandNametitle"></span></h1>
588
+ <button id="modeToggle" class="mode-toggle" aria-label="Toggle dark/light mode">
589
+ <i class="fas fa-sun"></i>
590
+ </button>
545
591
  </div>
546
-
547
592
  </header>
548
593
 
549
594
  <div class="loading-overlay" id="loadingOverlay">
550
595
  <img class="loading-overlay-logo" src="../solara.png" alt="Loading Logo">
551
596
  </div>
552
597
 
598
+ <div id="toast" style=" display: none; position: fixed; top: 10%; left: 50%; transform: translate(-50%, 10%); background-color: #4CAF50; color: white; padding: 16px; border-radius: 5px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);">
599
+ <!-- Message will be set dynamically -->
600
+ </div>
601
+
553
602
  <div class="container">
554
603
  <div class="row">
555
604
 
556
605
  <div class="column left">
557
606
  <div>
558
- <button id="applyChangesButton" class="apply-changes-button">Apply Changes</button>
607
+ <button id="syncBrandButton" class="action-buttons">Sync</button>
559
608
  <button id="allBrandsButton" class="action-buttons">All Brands</button>
560
609
  <button id="switchButton" class="action-buttons">Switch</button>
561
610
  <button id="exportBrandBtn" class="action-buttons">Export</button>
@@ -581,11 +630,11 @@
581
630
  <img src="../solara.png" alt="Solara Logo">
582
631
  <h2>Solara simplifies the management of your brand configurations, allowing you to access and update them anytime, anywhere.</h2>
583
632
  <div class="button-message">You can select a JSON file containing brand configurations that were exported using Solara.</div>
584
- <button id="uploadJsonBtn" style=" animation-delay: 0.5s;">Upload JSON</button>
585
- <div class="button-message" style=" animation-delay: 0.7s;">Alternatively, upload from a folder that includes the brand's JSON files.</div>
586
- <button id="uploadBrandBtn" style=" animation-delay: 0.9s;">Upload Folder</button>
587
- <div class="button-message" style=" animation-delay: 1.1s;">You also have the option to create new brand configurations.</div>
588
- <button id="newBrandBtn" style=" animation-delay: 1.3s;">New Brand</button>
633
+ <button id="uploadJsonBtn" style=" animation-delay: 0.5s;">Upload JSON</button>
634
+ <div class="button-message" style=" animation-delay: 0.7s;">Alternatively, upload from a folder that includes the brand's JSON files.</div>
635
+ <button id="uploadBrandBtn" style=" animation-delay: 0.9s;">Upload Folder</button>
636
+ <div class="button-message" style=" animation-delay: 1.1s;">You also have the option to create new brand configurations.</div>
637
+ <button id="newBrandBtn" style=" animation-delay: 1.3s;">New Brand</button>
589
638
  </div>
590
639
 
591
640
  </div>
@@ -601,7 +650,7 @@
601
650
 
602
651
  <onboard-bottom-sheet id="onboardBottomSheet"></onboard-bottom-sheet>
603
652
 
604
- <add-field-sheet id="addFieldSheet"></add-field-sheet>
653
+ <edit-json-sheet id="editJsonSheet"></edit-json-sheet>
605
654
 
606
655
  <message-bottom-sheet id="messageBottomSheet"></message-bottom-sheet>
607
656
 
@@ -15,7 +15,6 @@ class BrandLocalSource {
15
15
  }
16
16
 
17
17
  const url = `/brand/details?brand_key=${encodeURIComponent(brandKey)}`;
18
- console.log('Fetching configurations from:', url);
19
18
 
20
19
  const response = await fetch(url);
21
20
  const result = await response.json();
@@ -44,13 +43,13 @@ class BrandLocalSource {
44
43
  }
45
44
  }
46
45
 
47
- async saveSection(sectionItem, configuration, brandKey) {
46
+ async saveSection(key, configuration, brandKey) {
48
47
  if (this.savingInProgress) return;
49
48
  this.savingInProgress = true;
50
49
 
51
50
  const dataToSend = {
52
51
  brand_key: brandKey,
53
- key: sectionItem.key,
52
+ key: key,
54
53
  data: configuration
55
54
  };
56
55
 
@@ -69,7 +68,6 @@ class BrandLocalSource {
69
68
  throw new Error(result.error);
70
69
  }
71
70
 
72
- console.log(`${sectionItem.name} configuration saved successfully!`);
73
71
  return true;
74
72
  } catch (error) {
75
73
  console.error('Error saving configuration:', error);
@@ -95,7 +93,6 @@ class BrandLocalSource {
95
93
  throw new Error(result.error);
96
94
  }
97
95
 
98
- console.log('Switch to brand result:', result);
99
96
  return true;
100
97
  } catch (error) {
101
98
  console.error('Error switching to brand:', error);