@allthings/structured-ticket-form 5.0.0-dev1 → 5.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.
package/lib/App.js DELETED
@@ -1,1187 +0,0 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- var _a;
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.App = void 0;
16
- var jsx_runtime_1 = require("@emotion/react/jsx-runtime");
17
- /** @jsxImportSource @emotion/react */
18
- var react_1 = require("@emotion/react");
19
- var react_2 = require("react");
20
- var components_1 = require("./components");
21
- var models_1 = require("./models");
22
- /* eslint-disable sort-keys */
23
- var styles = {
24
- container: (0, react_1.css)({
25
- display: 'flex',
26
- flexDirection: 'column',
27
- alignItems: 'center',
28
- }),
29
- libraryContainer: (0, react_1.css)({
30
- width: '800px',
31
- height: '700px',
32
- marginBottom: '20px',
33
- border: '1px solid blue',
34
- padding: '10px',
35
- }),
36
- };
37
- var sampleSchemaEN = {
38
- title: 'Smart ticket',
39
- type: 'object',
40
- definitions: {
41
- mainMenu: {
42
- type: 'object',
43
- properties: {
44
- section: {
45
- type: 'string',
46
- enum: ['damage', 'broken'],
47
- },
48
- },
49
- required: ['section'],
50
- dependencies: {
51
- section: {
52
- oneOf: [
53
- {
54
- properties: {
55
- section: {
56
- enum: ['damage'],
57
- },
58
- reportADamage: {
59
- $ref: '#/definitions/reportADamage',
60
- },
61
- },
62
- required: ['reportADamage'],
63
- },
64
- {
65
- properties: {
66
- section: {
67
- enum: ['broken'],
68
- },
69
- brokenDevice: {
70
- $ref: '#/definitions/brokenDevice',
71
- },
72
- },
73
- required: ['brokenDevice'],
74
- },
75
- ],
76
- },
77
- },
78
- },
79
- brokenDevice: {
80
- type: 'object',
81
- properties: {
82
- location: {
83
- type: 'string',
84
- enum: ['kitchen', 'bathroom', 'common'],
85
- },
86
- },
87
- required: ['location'],
88
- dependencies: {
89
- location: {
90
- oneOf: [
91
- {
92
- properties: {
93
- location: {
94
- enum: ['kitchen'],
95
- },
96
- whereIsDamage: {
97
- $ref: '#/definitions/deviceKitchen',
98
- },
99
- },
100
- required: ['whereIsDamage'],
101
- },
102
- {
103
- properties: {
104
- location: {
105
- enum: ['bathroom'],
106
- },
107
- whereIsDamage: {
108
- $ref: '#/definitions/deviceBathroom',
109
- },
110
- },
111
- required: ['whereIsDamage'],
112
- },
113
- {
114
- properties: {
115
- location: {
116
- enum: ['common'],
117
- },
118
- whereIsDamage: {
119
- $ref: '#/definitions/deviceCommon',
120
- },
121
- },
122
- required: ['whereIsDamage'],
123
- },
124
- ],
125
- },
126
- },
127
- },
128
- manufacturer: {
129
- type: 'object',
130
- properties: {
131
- manufacturer: {
132
- type: 'string',
133
- },
134
- },
135
- },
136
- device: {
137
- type: 'object',
138
- properties: {
139
- manufacturer: {
140
- type: 'string',
141
- },
142
- deviceNumber: {
143
- type: 'string',
144
- },
145
- errorCode: {
146
- type: 'string',
147
- },
148
- },
149
- },
150
- deviceKitchen: {
151
- type: 'object',
152
- properties: {
153
- whatIsBroken: {
154
- type: 'string',
155
- enum: ['appliance', 'other'],
156
- },
157
- },
158
- required: ['whatIsBroken'],
159
- dependencies: {
160
- whatIsBroken: {
161
- oneOf: [
162
- {
163
- properties: {
164
- whatIsBroken: {
165
- enum: ['appliance'],
166
- },
167
- whatExact: {
168
- $ref: '#/definitions/kitchenAppliance',
169
- },
170
- },
171
- required: ['whatExact'],
172
- },
173
- {
174
- properties: {
175
- whatIsBroken: {
176
- enum: ['other'],
177
- },
178
- device: {
179
- $ref: '#/definitions/device',
180
- },
181
- },
182
- },
183
- ],
184
- },
185
- },
186
- },
187
- kitchenAppliance: {
188
- type: 'object',
189
- properties: {
190
- whatExact: {
191
- type: 'string',
192
- enum: [
193
- 'oven',
194
- 'stove',
195
- 'cooker',
196
- 'dishwasher',
197
- 'extractor',
198
- 'fridge',
199
- 'freezer',
200
- ],
201
- },
202
- },
203
- required: ['whatExact'],
204
- dependencies: {
205
- whatExact: {
206
- oneOf: [
207
- {
208
- properties: {
209
- whatExact: {
210
- enum: [
211
- 'oven',
212
- 'stove',
213
- 'cooker',
214
- 'dishwasher',
215
- 'extractor',
216
- 'fridge',
217
- 'freezer',
218
- ],
219
- },
220
- device: {
221
- $ref: '#/definitions/device',
222
- },
223
- },
224
- },
225
- ],
226
- },
227
- },
228
- },
229
- deviceBathroom: {
230
- type: 'object',
231
- properties: {
232
- whatIsBroken: {
233
- type: 'string',
234
- enum: ['ventilation', 'washing', 'dryer', 'other'],
235
- },
236
- },
237
- required: ['whatIsBroken'],
238
- dependencies: {
239
- whatIsBroken: {
240
- oneOf: [
241
- {
242
- properties: {
243
- whatIsBroken: {
244
- enum: ['ventilation'],
245
- },
246
- device: {
247
- $ref: '#/definitions/manufacturer',
248
- },
249
- },
250
- },
251
- {
252
- properties: {
253
- whatIsBroken: {
254
- enum: ['washing', 'dryer', 'other'],
255
- },
256
- device: {
257
- $ref: '#/definitions/device',
258
- },
259
- },
260
- },
261
- ],
262
- },
263
- },
264
- },
265
- deviceCommon: {
266
- type: 'object',
267
- properties: {
268
- whatIsBroken: {
269
- type: 'string',
270
- enum: ['washing', 'dryer'],
271
- },
272
- },
273
- required: ['whatIsBroken'],
274
- dependencies: {
275
- whatIsBroken: {
276
- oneOf: [
277
- {
278
- properties: {
279
- whatIsBroken: {
280
- enum: ['washing', 'dryer'],
281
- },
282
- device: {
283
- $ref: '#/definitions/device',
284
- },
285
- },
286
- },
287
- ],
288
- },
289
- },
290
- },
291
- reportADamage: {
292
- type: 'object',
293
- properties: {
294
- report: {
295
- type: 'string',
296
- enum: ['inApartment', 'outdoor'],
297
- },
298
- },
299
- required: ['report'],
300
- dependencies: {
301
- report: {
302
- oneOf: [
303
- {
304
- properties: {
305
- report: {
306
- enum: ['inApartment'],
307
- },
308
- whereIsDamage: {
309
- $ref: '#/definitions/inTheApartment',
310
- },
311
- },
312
- required: ['whereIsDamage'],
313
- },
314
- {
315
- properties: {
316
- report: {
317
- enum: ['outdoor'],
318
- },
319
- whereIsDamage: {
320
- $ref: '#/definitions/outdoorArea',
321
- },
322
- },
323
- required: ['whereIsDamage'],
324
- },
325
- ],
326
- },
327
- },
328
- },
329
- inTheApartment: {
330
- type: 'object',
331
- properties: {
332
- location: {
333
- type: 'string',
334
- enum: [
335
- 'kitchen',
336
- 'bathroom',
337
- 'livingRoom',
338
- 'corridor',
339
- 'bedroom',
340
- 'children',
341
- 'storeroom',
342
- 'terrace',
343
- ],
344
- },
345
- },
346
- required: ['location'],
347
- dependencies: {
348
- location: {
349
- oneOf: [
350
- {
351
- properties: {
352
- location: {
353
- enum: ['kitchen'],
354
- },
355
- whereIsDamage: {
356
- $ref: '#/definitions/kitchen',
357
- },
358
- },
359
- required: ['whereIsDamage'],
360
- },
361
- {
362
- properties: {
363
- location: {
364
- enum: ['bathroom'],
365
- },
366
- whereIsDamage: {
367
- $ref: '#/definitions/bathroom',
368
- },
369
- },
370
- required: ['whereIsDamage'],
371
- },
372
- {
373
- properties: {
374
- location: {
375
- enum: ['livingRoom'],
376
- },
377
- whereIsDamage: {
378
- $ref: '#/definitions/livingRoom',
379
- },
380
- },
381
- required: ['whereIsDamage'],
382
- },
383
- {
384
- properties: {
385
- location: {
386
- enum: ['corridor'],
387
- },
388
- whereIsDamage: {
389
- $ref: '#/definitions/corridor',
390
- },
391
- },
392
- required: ['whereIsDamage'],
393
- },
394
- {
395
- properties: {
396
- location: {
397
- enum: ['bedroom'],
398
- },
399
- whereIsDamage: {
400
- $ref: '#/definitions/bedroom',
401
- },
402
- },
403
- required: ['whereIsDamage'],
404
- },
405
- {
406
- properties: {
407
- location: {
408
- enum: ['children'],
409
- },
410
- whereIsDamage: {
411
- $ref: '#/definitions/children',
412
- },
413
- },
414
- required: ['whereIsDamage'],
415
- },
416
- {
417
- properties: {
418
- location: {
419
- enum: ['storeroom'],
420
- },
421
- whereIsDamage: {
422
- $ref: '#/definitions/storeroom',
423
- },
424
- },
425
- required: ['whereIsDamage'],
426
- },
427
- {
428
- properties: {
429
- location: {
430
- enum: ['terrace'],
431
- },
432
- whereIsDamage: {
433
- $ref: '#/definitions/terrace',
434
- },
435
- },
436
- required: ['whereIsDamage'],
437
- },
438
- ],
439
- },
440
- },
441
- },
442
- kitchen: {
443
- type: 'string',
444
- enum: [
445
- 'floor',
446
- 'wall',
447
- 'ceiling',
448
- 'electrical',
449
- 'surface',
450
- 'wasteSystem',
451
- 'sink',
452
- 'window',
453
- 'sunScreen',
454
- 'ventilation',
455
- 'heating',
456
- 'furniture',
457
- 'door',
458
- ],
459
- },
460
- bathroom: {
461
- type: 'object',
462
- properties: {
463
- whatIsBroken: {
464
- type: 'string',
465
- enum: [
466
- 'floor',
467
- 'wall',
468
- 'ceiling',
469
- 'electrical',
470
- 'ventilation',
471
- 'sanitary',
472
- 'heating',
473
- 'window',
474
- 'sunScreen',
475
- 'furniture',
476
- 'door',
477
- ],
478
- },
479
- },
480
- required: ['whatIsBroken'],
481
- dependencies: {
482
- whatIsBroken: {
483
- oneOf: [
484
- {
485
- properties: {
486
- whatIsBroken: {
487
- enum: ['sanitary'],
488
- },
489
- whatExact: {
490
- $ref: '#/definitions/sanitary',
491
- },
492
- },
493
- required: ['whatExact'],
494
- },
495
- {
496
- properties: {
497
- whatIsBroken: {
498
- enum: [
499
- 'floor',
500
- 'wall',
501
- 'ceiling',
502
- 'electrical',
503
- 'ventilation',
504
- 'heating',
505
- 'window',
506
- 'sunScreen',
507
- 'furniture',
508
- 'door',
509
- ],
510
- },
511
- },
512
- },
513
- ],
514
- },
515
- },
516
- },
517
- sanitary: {
518
- type: 'string',
519
- enum: ['fitting', 'toilet', 'sink', 'bathTap', 'shower'],
520
- },
521
- livingRoom: {
522
- type: 'string',
523
- enum: [
524
- 'floor',
525
- 'wall',
526
- 'ceiling',
527
- 'electrical',
528
- 'ventilation',
529
- 'heating',
530
- 'window',
531
- 'sunScreen',
532
- 'furniture',
533
- 'door',
534
- ],
535
- },
536
- corridor: {
537
- type: 'string',
538
- enum: [
539
- 'floor',
540
- 'wall',
541
- 'ceiling',
542
- 'electrical',
543
- 'ventilation',
544
- 'heating',
545
- 'window',
546
- 'sunScreen',
547
- 'furniture',
548
- 'door',
549
- ],
550
- },
551
- bedroom: {
552
- type: 'string',
553
- enum: [
554
- 'floor',
555
- 'wall',
556
- 'ceiling',
557
- 'electrical',
558
- 'ventilation',
559
- 'heating',
560
- 'window',
561
- 'sunScreen',
562
- 'furniture',
563
- 'door',
564
- ],
565
- },
566
- children: {
567
- type: 'string',
568
- enum: [
569
- 'floor',
570
- 'wall',
571
- 'ceiling',
572
- 'electrical',
573
- 'ventilation',
574
- 'heating',
575
- 'window',
576
- 'sunScreen',
577
- 'furniture',
578
- 'door',
579
- ],
580
- },
581
- storeroom: {
582
- type: 'string',
583
- enum: ['floor', 'wall', 'ceiling', 'ventilation', 'heating', 'door'],
584
- },
585
- terrace: {
586
- type: 'string',
587
- enum: [
588
- 'floor',
589
- 'wall',
590
- 'ceiling',
591
- 'electrical',
592
- 'railing',
593
- 'window',
594
- 'glass',
595
- 'sunScreen',
596
- 'screen',
597
- ],
598
- },
599
- outdoorArea: {
600
- type: 'object',
601
- properties: {
602
- location: {
603
- type: 'string',
604
- enum: [
605
- 'basement',
606
- 'craftRoom',
607
- 'parking',
608
- 'stairwell',
609
- 'washroom',
610
- 'entrance',
611
- 'surroundings',
612
- 'attic',
613
- ],
614
- },
615
- },
616
- required: ['location'],
617
- dependencies: {
618
- location: {
619
- oneOf: [
620
- {
621
- properties: {
622
- location: {
623
- enum: ['basement'],
624
- },
625
- whereIsDamage: {
626
- $ref: '#/definitions/basement',
627
- },
628
- },
629
- required: ['whereIsDamage'],
630
- },
631
- {
632
- properties: {
633
- location: {
634
- enum: ['craftRoom'],
635
- },
636
- whereIsDamage: {
637
- $ref: '#/definitions/craftRoom',
638
- },
639
- },
640
- required: ['whereIsDamage'],
641
- },
642
- {
643
- properties: {
644
- location: {
645
- enum: ['parking'],
646
- },
647
- whereIsDamage: {
648
- $ref: '#/definitions/parking',
649
- },
650
- },
651
- required: ['whereIsDamage'],
652
- },
653
- {
654
- properties: {
655
- location: {
656
- enum: ['stairwell'],
657
- },
658
- whereIsDamage: {
659
- $ref: '#/definitions/stairwell',
660
- },
661
- },
662
- required: ['whereIsDamage'],
663
- },
664
- {
665
- properties: {
666
- location: {
667
- enum: ['washroom'],
668
- },
669
- whereIsDamage: {
670
- $ref: '#/definitions/washroom',
671
- },
672
- },
673
- required: ['whereIsDamage'],
674
- },
675
- {
676
- properties: {
677
- location: {
678
- enum: ['entrance'],
679
- },
680
- whereIsDamage: {
681
- $ref: '#/definitions/entrance',
682
- },
683
- },
684
- required: ['whereIsDamage'],
685
- },
686
- {
687
- properties: {
688
- location: {
689
- enum: ['surroundings'],
690
- },
691
- whereIsDamage: {
692
- $ref: '#/definitions/surroundings',
693
- },
694
- },
695
- required: ['whereIsDamage'],
696
- },
697
- {
698
- properties: {
699
- location: {
700
- enum: ['attic'],
701
- },
702
- whereIsDamage: {
703
- $ref: '#/definitions/attic',
704
- },
705
- },
706
- required: ['whereIsDamage'],
707
- },
708
- ],
709
- },
710
- },
711
- },
712
- basement: {
713
- type: 'string',
714
- enum: [
715
- 'floor',
716
- 'wall',
717
- 'ceiling',
718
- 'electrical',
719
- 'ventilation',
720
- 'window',
721
- 'door',
722
- ],
723
- },
724
- craftRoom: {
725
- type: 'string',
726
- enum: [
727
- 'floor',
728
- 'wall',
729
- 'ceiling',
730
- 'electrical',
731
- 'sanitary',
732
- 'window',
733
- 'door',
734
- ],
735
- },
736
- parking: {
737
- type: 'string',
738
- enum: ['floor', 'electrical', 'covering', 'cleaning', 'storage'],
739
- },
740
- stairwell: {
741
- type: 'object',
742
- properties: {
743
- whereIsDamage: {
744
- type: 'string',
745
- enum: [
746
- 'floor',
747
- 'wall',
748
- 'ceiling',
749
- 'electrical',
750
- 'security',
751
- 'window',
752
- 'heating',
753
- ],
754
- },
755
- },
756
- required: ['whereIsDamage'],
757
- dependencies: {
758
- whereIsDamage: {
759
- oneOf: [
760
- {
761
- properties: {
762
- whereIsDamage: {
763
- enum: ['security'],
764
- },
765
- whereExact: {
766
- $ref: '#/definitions/security',
767
- },
768
- },
769
- required: ['whereExact'],
770
- },
771
- {
772
- properties: {
773
- whereIsDamage: {
774
- enum: [
775
- 'floor',
776
- 'wall',
777
- 'ceiling',
778
- 'electrical',
779
- 'window',
780
- 'heating',
781
- ],
782
- },
783
- },
784
- },
785
- ],
786
- },
787
- },
788
- },
789
- security: {
790
- type: 'string',
791
- enum: ['fire', 'smoke'],
792
- },
793
- washroom: {
794
- type: 'object',
795
- properties: {
796
- whereIsDamage: {
797
- type: 'string',
798
- enum: [
799
- 'floor',
800
- 'wall',
801
- 'ceiling',
802
- 'electrical',
803
- 'sanitary',
804
- 'window',
805
- 'device',
806
- ],
807
- },
808
- },
809
- required: ['whereIsDamage'],
810
- dependencies: {
811
- whereIsDamage: {
812
- oneOf: [
813
- {
814
- properties: {
815
- whereIsDamage: {
816
- enum: ['device'],
817
- },
818
- whereExact: {
819
- $ref: '#/definitions/washroomDevice',
820
- },
821
- },
822
- required: ['whereExact'],
823
- },
824
- {
825
- properties: {
826
- whereIsDamage: {
827
- enum: [
828
- 'floor',
829
- 'wall',
830
- 'ceiling',
831
- 'electrical',
832
- 'sanitary',
833
- 'window',
834
- ],
835
- },
836
- },
837
- },
838
- ],
839
- },
840
- },
841
- },
842
- washroomDevice: {
843
- type: 'object',
844
- properties: {
845
- whatIsBroken: {
846
- type: 'string',
847
- enum: ['washing', 'dryer', 'dehumidifier'],
848
- },
849
- },
850
- required: ['whatIsBroken'],
851
- dependencies: {
852
- whatIsBroken: {
853
- oneOf: [
854
- {
855
- properties: {
856
- whatIsBroken: {
857
- enum: ['washing', 'dryer'],
858
- },
859
- device: {
860
- $ref: '#/definitions/device',
861
- },
862
- },
863
- },
864
- {
865
- properties: {
866
- whatIsBroken: {
867
- enum: ['dehumidifier'],
868
- },
869
- device: {
870
- $ref: '#/definitions/manufacturer',
871
- },
872
- },
873
- },
874
- ],
875
- },
876
- },
877
- },
878
- entrance: {
879
- type: 'string',
880
- enum: ['door', 'letterbox', 'electrical'],
881
- },
882
- surroundings: {
883
- type: 'string',
884
- enum: ['playground', 'sidewalk', 'facade', 'roof'],
885
- },
886
- attic: {
887
- type: 'string',
888
- enum: ['floor', 'wall', 'ceiling', 'electrical', 'window', 'door'],
889
- },
890
- },
891
- properties: {
892
- mainMenu: {
893
- $ref: '#/definitions/mainMenu',
894
- },
895
- fieldOne: {
896
- type: 'string',
897
- title: '',
898
- },
899
- fieldTwo: {
900
- type: 'boolean',
901
- title: '',
902
- },
903
- },
904
- };
905
- var testTrans = {
906
- en_US: 'Hello, how can we help you?',
907
- 'en_US.fields.brokenDevice': 'Broken device',
908
- 'en_US.fields.reportADamage': 'Report a damage',
909
- 'en_US.fields.mainMenu': ' ',
910
- 'en_US.types.manufacturer': ' ',
911
- 'en_US.types.manufacturer.fields.manufacturer': 'Manufacturer name',
912
- 'en_US.types.device': ' ',
913
- 'en_US.types.device.fields.manufacturer': 'Manufacturer name',
914
- 'en_US.types.device.fields.deviceNumber': 'Device Number',
915
- 'en_US.types.device.fields.errorCode': 'Error Code',
916
- 'en_US.types.mainMenu': ' ',
917
- 'en_US.types.mainMenu.fields.section': 'Choose topic',
918
- 'en_US.types.mainMenu.fields.section.options.damage': 'Report a damage',
919
- 'en_US.types.mainMenu.fields.section.options.broken': 'Broken device',
920
- 'en_US.types.deviceKitchen': ' ',
921
- 'en_US.types.deviceKitchen.fields.whatIsBroken': 'What is broken?',
922
- 'en_US.types.deviceKitchen.fields.whatIsBroken.options.appliance': 'Kitchen appliance',
923
- 'en_US.types.deviceKitchen.fields.whatIsBroken.options.other': 'Other',
924
- 'en_US.types.kitchenAppliance': ' ',
925
- 'en_US.types.kitchenAppliance.fields.whatExact': 'What exactly is broken?',
926
- 'en_US.types.kitchenAppliance.fields.whatExact.options.oven': 'Oven',
927
- 'en_US.types.kitchenAppliance.fields.whatExact.options.stove': 'Stove',
928
- 'en_US.types.kitchenAppliance.fields.whatExact.options.cooker': 'Steam Cooker',
929
- 'en_US.types.kitchenAppliance.fields.whatExact.options.dishwasher': 'Dishwasher',
930
- 'en_US.types.kitchenAppliance.fields.whatExact.options.extractor': 'Extractor hood',
931
- 'en_US.types.kitchenAppliance.fields.whatExact.options.fridge': 'Fridge',
932
- 'en_US.types.kitchenAppliance.fields.whatExact.options.freezer': 'Freezer',
933
- 'en_US.types.brokenDevice': ' ',
934
- 'en_US.types.brokenDevice.fields.location': 'Where is the broken device located?',
935
- 'en_US.types.brokenDevice.fields.location.options.kitchen': 'Kitchen',
936
- 'en_US.types.brokenDevice.fields.location.options.bathroom': 'Bathroom',
937
- 'en_US.types.brokenDevice.fields.location.options.common': 'Common area',
938
- 'en_US.types.deviceBathroom': ' ',
939
- 'en_US.types.deviceBathroom.fields.whatIsBroken': 'What is broken?',
940
- 'en_US.types.deviceBathroom.fields.whatIsBroken.options.ventilation': 'Ventilation',
941
- 'en_US.types.deviceBathroom.fields.whatIsBroken.options.washing': 'Washing machine',
942
- 'en_US.types.deviceBathroom.fields.whatIsBroken.options.dryer': 'Dryer',
943
- 'en_US.types.deviceBathroom.fields.whatIsBroken.options.other': 'Other device',
944
- 'en_US.types.deviceCommon': ' ',
945
- 'en_US.types.deviceCommon.fields.whatIsBroken': 'What is broken?',
946
- 'en_US.types.deviceCommon.fields.whatIsBroken.options.washing': 'Washing machine',
947
- 'en_US.types.deviceCommon.fields.whatIsBroken.options.dryer': 'Dryer',
948
- 'en_US.types.reportADamage': ' ',
949
- 'en_US.types.reportADamage.fields.report.options.inApartment': 'In the apartment',
950
- 'en_US.types.reportADamage.fields.report.options.outdoor': 'Outdoor area',
951
- 'en_US.types.inTheApartment': ' ',
952
- 'en_US.types.inTheApartment.fields.whereIsDamage': 'Where is the damage located?',
953
- 'en_US.types.inTheApartment.fields.location': 'Where is the damage located?',
954
- 'en_US.types.inTheApartment.fields.location.options.kitchen': 'Kitchen',
955
- 'en_US.types.inTheApartment.fields.location.options.bathroom': 'Bathroom',
956
- 'en_US.types.inTheApartment.fields.location.options.livingRoom': 'Living room',
957
- 'en_US.types.inTheApartment.fields.location.options.corridor': 'Corridor',
958
- 'en_US.types.inTheApartment.fields.location.options.bedroom': 'Bedroom',
959
- 'en_US.types.inTheApartment.fields.location.options.children': "Children' room",
960
- 'en_US.types.inTheApartment.fields.location.options.storeroom': 'Store room',
961
- 'en_US.types.inTheApartment.fields.location.options.terrace': 'Balcony, terrace',
962
- 'en_US.types.kitchen': 'Where is broken?',
963
- 'en_US.types.kitchen.options.floor': 'Floor',
964
- 'en_US.types.kitchen.options.wall': 'Wall',
965
- 'en_US.types.kitchen.options.ceiling': 'Ceiling',
966
- 'en_US.types.kitchen.options.electrical': 'Electrical installation',
967
- 'en_US.types.kitchen.options.surface': 'Kitchen work surface',
968
- 'en_US.types.kitchen.options.wasteSystem': 'Waste disposal system',
969
- 'en_US.types.kitchen.options.sink': 'Sink',
970
- 'en_US.types.kitchen.options.window': 'Window',
971
- 'en_US.types.kitchen.options.sunScreen': 'Sun screen',
972
- 'en_US.types.kitchen.options.ventilation': 'Ventilation',
973
- 'en_US.types.kitchen.options.heating': 'Heating',
974
- 'en_US.types.kitchen.options.furniture': 'Build-in furniture',
975
- 'en_US.types.kitchen.options.door': 'Door',
976
- 'en_US.types.bathroom': ' ',
977
- 'en_US.types.bathroom.fields.whatIsBroken': 'Where is broken?',
978
- 'en_US.types.bathroom.fields.whatIsBroken.options.floor': 'Floor',
979
- 'en_US.types.bathroom.fields.whatIsBroken.options.wall': 'Wall',
980
- 'en_US.types.bathroom.fields.whatIsBroken.options.ceiling': 'Ceiling',
981
- 'en_US.types.bathroom.fields.whatIsBroken.options.electrical': 'Electrical installation',
982
- 'en_US.types.bathroom.fields.whatIsBroken.options.ventilation': 'Ventilation',
983
- 'en_US.types.bathroom.fields.whatIsBroken.options.sanitary': 'Sanitary installation',
984
- 'en_US.types.bathroom.fields.whatIsBroken.options.heating': 'Heating',
985
- 'en_US.types.bathroom.fields.whatIsBroken.options.window': 'Window',
986
- 'en_US.types.bathroom.fields.whatIsBroken.options.sunScreen': 'Sun screen',
987
- 'en_US.types.bathroom.fields.whatIsBroken.options.furniture': 'Bathroom furniture',
988
- 'en_US.types.bathroom.fields.whatIsBroken.options.door': 'Door',
989
- 'en_US.types.sanitary': 'Where is exactly broken?',
990
- 'en_US.types.sanitary.options.fitting': 'Sink fitting',
991
- 'en_US.types.sanitary.options.toilet': 'Toilet',
992
- 'en_US.types.sanitary.options.sink': 'Sink',
993
- 'en_US.types.sanitary.options.bathTap': 'Bath tap',
994
- 'en_US.types.sanitary.options.shower': 'Shower',
995
- 'en_US.types.livingRoom': 'Where is broken?',
996
- 'en_US.types.livingRoom.options.floor': 'Floor',
997
- 'en_US.types.livingRoom.options.wall': 'Wall',
998
- 'en_US.types.livingRoom.options.ceiling': 'Ceiling',
999
- 'en_US.types.livingRoom.options.electrical': 'Electrical installation',
1000
- 'en_US.types.livingRoom.options.ventilation': 'Ventilation',
1001
- 'en_US.types.livingRoom.options.heating': 'Heating',
1002
- 'en_US.types.livingRoom.options.window': 'Window',
1003
- 'en_US.types.livingRoom.options.sunScreen': 'Sun screen',
1004
- 'en_US.types.livingRoom.options.furniture': 'Living room furniture',
1005
- 'en_US.types.livingRoom.options.door': 'Door',
1006
- 'en_US.types.corridor': 'Where is broken?',
1007
- 'en_US.types.corridor.options.floor': 'Floor',
1008
- 'en_US.types.corridor.options.wall': 'Wall',
1009
- 'en_US.types.corridor.options.ceiling': 'Ceiling',
1010
- 'en_US.types.corridor.options.electrical': 'Electrical installation',
1011
- 'en_US.types.corridor.options.ventilation': 'Ventilation',
1012
- 'en_US.types.corridor.options.heating': 'Heating',
1013
- 'en_US.types.corridor.options.window': 'Window',
1014
- 'en_US.types.corridor.options.sunScreen': 'Sun screen',
1015
- 'en_US.types.corridor.options.furniture': 'Cabinet',
1016
- 'en_US.types.corridor.options.door': 'Door',
1017
- 'en_US.types.bedroom': 'Where is broken?',
1018
- 'en_US.types.bedroom.options.floor': 'Floor',
1019
- 'en_US.types.bedroom.options.wall': 'Wall',
1020
- 'en_US.types.bedroom.options.ceiling': 'Ceiling',
1021
- 'en_US.types.bedroom.options.electrical': 'Electrical installation',
1022
- 'en_US.types.bedroom.options.ventilation': 'Ventilation',
1023
- 'en_US.types.bedroom.options.heating': 'Heating',
1024
- 'en_US.types.bedroom.options.window': 'Window',
1025
- 'en_US.types.bedroom.options.sunScreen': 'Sun screen',
1026
- 'en_US.types.bedroom.options.furniture': 'Bedroom furniture',
1027
- 'en_US.types.bedroom.options.door': 'Door',
1028
- 'en_US.types.children': 'Where is broken?',
1029
- 'en_US.types.children.options.floor': 'Floor',
1030
- 'en_US.types.children.options.wall': 'Wall',
1031
- 'en_US.types.children.options.ceiling': 'Ceiling',
1032
- 'en_US.types.children.options.electrical': 'Electrical installation',
1033
- 'en_US.types.children.options.ventilation': 'Ventilation',
1034
- 'en_US.types.children.options.heating': 'Heating',
1035
- 'en_US.types.children.options.window': 'Window',
1036
- 'en_US.types.children.options.sunScreen': 'Sun screen',
1037
- 'en_US.types.children.options.furniture': 'Furniture',
1038
- 'en_US.types.children.options.door': 'Door',
1039
- 'en_US.types.storeroom': 'Where is broken?',
1040
- 'en_US.types.storeroom.options.floor': 'Floor',
1041
- 'en_US.types.storeroom.options.wall': 'Wall',
1042
- 'en_US.types.storeroom.options.ceiling': 'Ceiling',
1043
- 'en_US.types.storeroom.options.ventilation': 'Ventilation',
1044
- 'en_US.types.storeroom.options.heating': 'Heating',
1045
- 'en_US.types.storeroom.options.door': 'Door',
1046
- 'en_US.types.terrace': 'Where is broken?',
1047
- 'en_US.types.terrace.options.floor': 'Floor',
1048
- 'en_US.types.terrace.options.wall': 'Wall',
1049
- 'en_US.types.terrace.options.ceiling': 'Ceiling',
1050
- 'en_US.types.terrace.options.electrical': 'Electrical installation',
1051
- 'en_US.types.terrace.options.railing': 'Railing',
1052
- 'en_US.types.terrace.options.glass': 'Glass',
1053
- 'en_US.types.terrace.options.window': 'Window',
1054
- 'en_US.types.terrace.options.sunScreen': 'Sun screen',
1055
- 'en_US.types.terrace.options.screen': 'Sunscreen',
1056
- 'en_US.types.basement': 'Where is the damage located?',
1057
- 'en_US.types.basement.options.floor': 'Floor',
1058
- 'en_US.types.basement.options.wall': 'Wall',
1059
- 'en_US.types.basement.options.ceiling': 'Ceiling',
1060
- 'en_US.types.basement.options.electrical': 'Electrical installation',
1061
- 'en_US.types.basement.options.ventilation': 'Ventilation',
1062
- 'en_US.types.basement.options.window': 'Window',
1063
- 'en_US.types.basement.options.door': 'Door',
1064
- 'en_US.types.craftRoom': 'Where is the damage located?',
1065
- 'en_US.types.craftRoom.options.floor': 'Floor',
1066
- 'en_US.types.craftRoom.options.wall': 'Wall',
1067
- 'en_US.types.craftRoom.options.ceiling': 'Ceiling',
1068
- 'en_US.types.craftRoom.options.electrical': 'Electrical installation',
1069
- 'en_US.types.craftRoom.options.sanitary': 'Sanitary installation',
1070
- 'en_US.types.craftRoom.options.window': 'Window',
1071
- 'en_US.types.craftRoom.options.door': 'Door',
1072
- 'en_US.types.parking': 'Where is the damage located?',
1073
- 'en_US.types.parking.options.floor': 'Floor',
1074
- 'en_US.types.parking.options.electrical': 'Electrical installation',
1075
- 'en_US.types.parking.options.covering': 'Covering(?)',
1076
- 'en_US.types.parking.options.cleaning': 'Cleaning spot',
1077
- 'en_US.types.parking.options.storage': 'Tier storage',
1078
- 'en_US.types.stairwell': ' ',
1079
- 'en_US.types.stairwell.fields.whereIsDamage': 'Where is the damage located?',
1080
- 'en_US.types.stairwell.fields.whereIsDamage.options.floor': 'Floor',
1081
- 'en_US.types.stairwell.fields.whereIsDamage.options.wall': 'Wall',
1082
- 'en_US.types.stairwell.fields.whereIsDamage.options.ceiling': 'Ceiling',
1083
- 'en_US.types.stairwell.fields.whereIsDamage.options.electrical': 'Electrical installation',
1084
- 'en_US.types.stairwell.fields.whereIsDamage.options.security': 'Security installation',
1085
- 'en_US.types.stairwell.fields.whereIsDamage.options.window': 'Window',
1086
- 'en_US.types.stairwell.fields.whereIsDamage.options.heating': 'Heating',
1087
- 'en_US.types.security': 'Where is the damage exactly?',
1088
- 'en_US.types.security.options.fire': 'Fire extinguisher',
1089
- 'en_US.types.security.options.smoke': 'Smoke Detector',
1090
- 'en_US.types.washroom': ' ',
1091
- 'en_US.types.washroom.fields.whereIsDamage': 'Where is the damage located?',
1092
- 'en_US.types.washroom.fields.whereIsDamage.options.floor': 'Floor',
1093
- 'en_US.types.washroom.fields.whereIsDamage.options.wall': 'Wall',
1094
- 'en_US.types.washroom.fields.whereIsDamage.options.ceiling': 'Ceiling',
1095
- 'en_US.types.washroom.fields.whereIsDamage.options.electrical': 'Electrical installation',
1096
- 'en_US.types.washroom.fields.whereIsDamage.options.sanitary': 'Sanitary installation',
1097
- 'en_US.types.washroom.fields.whereIsDamage.options.window': 'Window',
1098
- 'en_US.types.washroom.fields.whereIsDamage.options.device': 'Device',
1099
- 'en_US.types.washroomDevice': ' ',
1100
- 'en_US.types.washroomDevice.fields.whatIsBroken': 'What is exactly broken?',
1101
- 'en_US.types.washroomDevice.fields.whatIsBroken.options.washing': 'Washing machine',
1102
- 'en_US.types.washroomDevice.fields.whatIsBroken.options.dryer': 'Dryer',
1103
- 'en_US.types.washroomDevice.fields.whatIsBroken.options.dehumidifier': 'Dehumidifier',
1104
- 'en_US.types.entrance': 'Where is the damage located?',
1105
- 'en_US.types.entrance.options.door': 'Door',
1106
- 'en_US.types.entrance.options.letterbox': 'Letterbox',
1107
- 'en_US.types.entrance.options.electrical': 'Electrical installation',
1108
- 'en_US.types.attic': 'Where is the damage located?',
1109
- 'en_US.types.attic.options.floor': 'Floor',
1110
- 'en_US.types.attic.options.wall': 'Wall',
1111
- 'en_US.types.attic.options.ceiling': 'Ceiling',
1112
- 'en_US.types.attic.options.electrical': 'Electrical installation',
1113
- 'en_US.types.attic.options.window': 'Window',
1114
- 'en_US.types.attic.options.door': 'Door',
1115
- 'en_US.types.surroundings': 'Where is the damage located?',
1116
- 'en_US.types.surroundings.options.playground': 'Playground',
1117
- 'en_US.types.surroundings.options.sidewalk': 'Sidewalk',
1118
- 'en_US.types.surroundings.options.facade': 'Facade',
1119
- 'en_US.types.surroundings.options.roof': 'Roof',
1120
- 'en_US.types.outdoorArea': ' ',
1121
- 'en_US.types.outdoorArea.fields.location': 'Where is the damage located?',
1122
- 'en_US.types.outdoorArea.fields.location.options.basement': 'Basement',
1123
- 'en_US.types.outdoorArea.fields.location.options.craftRoom': 'Craft room',
1124
- 'en_US.types.outdoorArea.fields.location.options.parking': 'Parking lot',
1125
- 'en_US.types.outdoorArea.fields.location.options.stairwell': 'Stairwell(?) (Trappenhaus)',
1126
- 'en_US.types.outdoorArea.fields.location.options.washroom': 'Washroom',
1127
- 'en_US.types.outdoorArea.fields.location.options.entrance': 'Entrance',
1128
- 'en_US.types.outdoorArea.fields.location.options.surroundings': 'Surroundings',
1129
- 'en_US.types.outdoorArea.fields.location.options.attic': 'Attic',
1130
- 'en_US.types.reportADamage.fields.report': 'Where do repairs have to be done?',
1131
- 'en_US.fields.fieldOne': 'Simple input field',
1132
- 'en_US.fields.fieldTwo': 'Boolean (checkbox)',
1133
- de_DE: 'Hello, how can we help you? (DE)',
1134
- 'de_DE.fields.fieldOne': 'Simple input field',
1135
- 'de_DE.fields.fieldTwo': 'Boolean (checkbox)',
1136
- };
1137
- var schema = (_a = {},
1138
- _a[models_1.EditorTab.JSON] = sampleSchemaEN,
1139
- _a[models_1.EditorTab.UI] = {},
1140
- _a[models_1.EditorTab.TRANSLATION] = testTrans,
1141
- _a);
1142
- var langCode = [
1143
- {
1144
- key: 'de_DE',
1145
- value: 'Deutsch',
1146
- },
1147
- {
1148
- key: 'en_US',
1149
- value: 'English',
1150
- },
1151
- {
1152
- key: 'fr_FR',
1153
- value: 'Français',
1154
- },
1155
- {
1156
- key: 'it_IT',
1157
- value: 'Italiano',
1158
- },
1159
- {
1160
- key: 'nl_NL',
1161
- value: 'Nederlands',
1162
- },
1163
- {
1164
- key: 'pt_PT',
1165
- value: 'Português',
1166
- },
1167
- ];
1168
- var langBackend = {
1169
- language: langCode,
1170
- display: {
1171
- key: 'en_US',
1172
- value: 'English',
1173
- },
1174
- };
1175
- var App = function () {
1176
- var _a = (0, react_2.useState)(schema), textSchema = _a[0], setTextSchema = _a[1];
1177
- var _b = (0, react_2.useState)(false), isValidate = _b[0], setIsValidate = _b[1];
1178
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
1179
- var _c = (0, react_2.useState)(true), _ = _c[0], setIsChangedSchema = _c[1];
1180
- var errorTextJson = 'There is something wrong with the syntax in JSON schema';
1181
- var errorTextTranslator = 'There is something wrong with the syntax Translator schema';
1182
- return ((0, jsx_runtime_1.jsxs)("div", __assign({ css: styles.container }, { children: [(0, jsx_runtime_1.jsx)("h4", { children: "Structured Ticket form" }), (0, jsx_runtime_1.jsx)("div", __assign({ css: styles.libraryContainer }, { children: (0, jsx_runtime_1.jsx)(components_1.StructuredTicketEditor, { buttonSaveText: "Save", buttonTranslatorText: "Translator", buttonValidateText: "Validate", errorTextButton: "ok", errorTextJson: errorTextJson, errorTextTranslator: errorTextTranslator, fullFormSchema: textSchema, headerLanguageSelectorText: "Preview Language: ", isValidate: isValidate, languageDisplay: langBackend, multiErrorText: "Translator and Json Schema syntax error", onSaveButton: function (json) {
1183
- setTextSchema(json);
1184
- }, setChangedSchema: function (bool) { return setIsChangedSchema(bool); }, setIsValidate: function (bool) { return setIsValidate(bool); } }) }))] })));
1185
- };
1186
- exports.App = App;
1187
- //# sourceMappingURL=App.js.map