@ruc-lib/metaform 2.0.1 → 2.0.3

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 (71) hide show
  1. package/package.json +39 -20
  2. package/.eslintrc.json +0 -36
  3. package/dist/README.md +0 -135
  4. package/dist/package.json +0 -38
  5. package/jest.config.ts +0 -22
  6. package/ng-package.json +0 -6
  7. package/project.json +0 -50
  8. package/src/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.css +0 -10
  9. package/src/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.html +0 -11
  10. package/src/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.spec.ts +0 -103
  11. package/src/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.ts +0 -33
  12. package/src/components/ruc-meta-inputs/ruc-meta-inputs.component.css +0 -16
  13. package/src/components/ruc-meta-inputs/ruc-meta-inputs.component.html +0 -18
  14. package/src/components/ruc-meta-inputs/ruc-meta-inputs.component.spec.ts +0 -85
  15. package/src/components/ruc-meta-inputs/ruc-meta-inputs.component.ts +0 -44
  16. package/src/components/ruc-meta-radio-group/ruc-meta-radio-group.component.css +0 -13
  17. package/src/components/ruc-meta-radio-group/ruc-meta-radio-group.component.html +0 -12
  18. package/src/components/ruc-meta-radio-group/ruc-meta-radio-group.component.spec.ts +0 -98
  19. package/src/components/ruc-meta-radio-group/ruc-meta-radio-group.component.ts +0 -28
  20. package/src/components/ruc-meta-select/ruc-meta-select.component.css +0 -9
  21. package/src/components/ruc-meta-select/ruc-meta-select.component.html +0 -12
  22. package/src/components/ruc-meta-select/ruc-meta-select.component.spec.ts +0 -1165
  23. package/src/components/ruc-meta-select/ruc-meta-select.component.ts +0 -45
  24. package/src/components/ruc-text-area/ruc-text-area.component.css +0 -0
  25. package/src/components/ruc-text-area/ruc-text-area.component.html +0 -16
  26. package/src/components/ruc-text-area/ruc-text-area.component.spec.ts +0 -100
  27. package/src/components/ruc-text-area/ruc-text-area.component.ts +0 -30
  28. package/src/index.ts +0 -2
  29. package/src/interfaces/metaFormsDefault.ts +0 -71
  30. package/src/lib/ruclib-metaform/ruclib-metaform.component.html +0 -99
  31. package/src/lib/ruclib-metaform/ruclib-metaform.component.scss +0 -15
  32. package/src/lib/ruclib-metaform/ruclib-metaform.component.spec.ts +0 -1253
  33. package/src/lib/ruclib-metaform/ruclib-metaform.component.stories.ts +0 -676
  34. package/src/lib/ruclib-metaform/ruclib-metaform.component.ts +0 -91
  35. package/src/lib/ruclib-metaform.module.ts +0 -59
  36. package/src/services/ruc-meta-form-validation.service.spec.ts +0 -75
  37. package/src/services/ruc-meta-form-validation.service.ts +0 -30
  38. package/src/services/ruc-meta-form.service.spec.ts +0 -63
  39. package/src/services/ruc-meta-form.service.ts +0 -20
  40. package/src/test-setup.ts +0 -1
  41. package/tsconfig.json +0 -30
  42. package/tsconfig.lib.json +0 -17
  43. package/tsconfig.lib.prod.json +0 -9
  44. package/tsconfig.spec.json +0 -16
  45. /package/{dist/components → components}/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.d.ts +0 -0
  46. /package/{dist/components → components}/ruc-meta-inputs/ruc-meta-inputs.component.d.ts +0 -0
  47. /package/{dist/components → components}/ruc-meta-radio-group/ruc-meta-radio-group.component.d.ts +0 -0
  48. /package/{dist/components → components}/ruc-meta-select/ruc-meta-select.component.d.ts +0 -0
  49. /package/{dist/components → components}/ruc-text-area/ruc-text-area.component.d.ts +0 -0
  50. /package/{dist/esm2020 → esm2020}/components/ruc-meta-checkbox-group/ruc-meta-checkbox-group.component.mjs +0 -0
  51. /package/{dist/esm2020 → esm2020}/components/ruc-meta-inputs/ruc-meta-inputs.component.mjs +0 -0
  52. /package/{dist/esm2020 → esm2020}/components/ruc-meta-radio-group/ruc-meta-radio-group.component.mjs +0 -0
  53. /package/{dist/esm2020 → esm2020}/components/ruc-meta-select/ruc-meta-select.component.mjs +0 -0
  54. /package/{dist/esm2020 → esm2020}/components/ruc-text-area/ruc-text-area.component.mjs +0 -0
  55. /package/{dist/esm2020 → esm2020}/index.mjs +0 -0
  56. /package/{dist/esm2020 → esm2020}/interfaces/metaFormsDefault.mjs +0 -0
  57. /package/{dist/esm2020 → esm2020}/lib/ruclib-metaform/ruclib-metaform.component.mjs +0 -0
  58. /package/{dist/esm2020 → esm2020}/lib/ruclib-metaform.module.mjs +0 -0
  59. /package/{dist/esm2020 → esm2020}/ruc-lib-metaform.mjs +0 -0
  60. /package/{dist/esm2020 → esm2020}/services/ruc-meta-form-validation.service.mjs +0 -0
  61. /package/{dist/esm2020 → esm2020}/services/ruc-meta-form.service.mjs +0 -0
  62. /package/{dist/fesm2015 → fesm2015}/ruc-lib-metaform.mjs +0 -0
  63. /package/{dist/fesm2015 → fesm2015}/ruc-lib-metaform.mjs.map +0 -0
  64. /package/{dist/fesm2020 → fesm2020}/ruc-lib-metaform.mjs +0 -0
  65. /package/{dist/fesm2020 → fesm2020}/ruc-lib-metaform.mjs.map +0 -0
  66. /package/{dist/index.d.ts → index.d.ts} +0 -0
  67. /package/{dist/interfaces → interfaces}/metaFormsDefault.d.ts +0 -0
  68. /package/{dist/lib → lib}/ruclib-metaform/ruclib-metaform.component.d.ts +0 -0
  69. /package/{dist/lib → lib}/ruclib-metaform.module.d.ts +0 -0
  70. /package/{dist/services → services}/ruc-meta-form-validation.service.d.ts +0 -0
  71. /package/{dist/services → services}/ruc-meta-form.service.d.ts +0 -0
@@ -1,1165 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
-
3
- import { RucMetaSelectComponent } from './ruc-meta-select.component';
4
- import { RucMetaFormService } from '../../services/ruc-meta-form.service';
5
- import { HttpClientModule } from '@angular/common/http';
6
- import { MetaFormConfig } from '../../interfaces/metaFormsDefault';
7
- import { TextFieldModule } from '@angular/cdk/text-field';
8
-
9
- describe('RucMetaSelectComponent', () => {
10
- let component: RucMetaSelectComponent;
11
- let fixture: ComponentFixture<RucMetaSelectComponent>;
12
- let mockFormData: MetaFormConfig[] = [];
13
- mockFormData = [
14
- {
15
- "formType": "simple",
16
- "fieldType": "input",
17
- "inputType": "text",
18
- "id": "firstName",
19
- "name": "firstName",
20
- "errorMsg": false,
21
- "label": "First Name",
22
- "className": "firstName",
23
- "value": "",
24
- "alt": "na",
25
- "appearance": "outline",
26
- "min": "4",
27
- "max": "20",
28
- "width": "100",
29
- "height": "20",
30
- "checked": false,
31
- "disabled": false,
32
- "maxlength": "100",
33
- "readonly": false,
34
- "required": false,
35
- "size": "100",
36
- "tooltip": "First Name",
37
- "tooltipPosition": "right",
38
- "pattern": "any",
39
- "placeholder": "First Name",
40
- "autofocus": true,
41
- "autocomplete": ["amar", "bharat", "charan"],
42
- "customComponentName": "none",
43
- "rucDialogInput": {},
44
- "hasDependentFields": false,
45
- "dependentFieldParentId": "any",
46
- "dependentFields": [],
47
- "toolTipDescription": "none",
48
- "showErrorOnPopUp": true,
49
- "groupOptions": []
50
- },
51
- {
52
- "formType": "simple",
53
- "fieldType": "input",
54
- "inputType": "text",
55
- "id": "lastName",
56
- "errorMsg": false,
57
- "name": "lastName",
58
- "label": "Last Name",
59
- "className": "lastName",
60
- "value": "",
61
- "alt": "na",
62
- "appearance": "outline",
63
- "min": "4",
64
- "max": "20",
65
- "width": "100",
66
- "height": "20",
67
- "checked": false,
68
- "disabled": false,
69
- "maxlength": "100",
70
- "readonly": false,
71
- "required": true,
72
- "size": "100",
73
- "sameRow": true,
74
- "sameRowColumnWidth": "50",
75
- "tooltip": "Last Name",
76
- "tooltipPosition": "below",
77
- "pattern": "any",
78
- "placeholder": "Last Name",
79
- "autofocus": true,
80
- "autocomplete": ["singh", "rai", "lal"],
81
- "customComponentName": "none",
82
- "rucDialogInput": {},
83
- "hasDependentFields": false,
84
- "dependentFieldParentId": "any",
85
- "dependentFields": [],
86
- "toolTipDescription": "none",
87
- "showErrorOnPopUp": true,
88
- "groupOptions": []
89
- },
90
-
91
- {
92
-
93
- "formType": "simple",
94
-
95
- "fieldType": "input",
96
-
97
- "inputType": "password",
98
-
99
- "id": "password",
100
-
101
- "errorMsg": false,
102
-
103
- "name": "password",
104
-
105
- "label": "Password",
106
-
107
- "className": "password",
108
-
109
- "value": "",
110
-
111
- "alt": "na",
112
-
113
- "appearance": "outline",
114
-
115
- "min": "4",
116
-
117
- "max": "20",
118
-
119
- "width": "100",
120
-
121
- "height": "20",
122
-
123
- "checked": false,
124
-
125
- "disabled": false,
126
-
127
- "maxlength": "100",
128
-
129
- "readonly": false,
130
-
131
- "required": true,
132
-
133
- "size": "100",
134
-
135
- "sameRow": true,
136
-
137
- "sameRowColumnWidth": "25",
138
-
139
- "tooltip": "Password",
140
-
141
- "tooltipPosition": "right",
142
-
143
- "pattern": "any",
144
-
145
- "placeholder": "First Name",
146
-
147
- "autofocus": true,
148
-
149
- "autocomplete": false,
150
-
151
- "customComponentName": "none",
152
-
153
- "rucDialogInput": {},
154
-
155
- "hasDependentFields": false,
156
-
157
- "dependentFieldParentId": "any",
158
-
159
- "dependentFields": [],
160
-
161
- "toolTipDescription": "none",
162
-
163
- "showErrorOnPopUp": true,
164
-
165
- "groupOptions": []
166
-
167
- },
168
-
169
- {
170
-
171
- "formType": "simple",
172
-
173
- "fieldType": "radio",
174
-
175
- "inputType": "radio",
176
-
177
- "id": "radio",
178
-
179
- "name": "radio",
180
-
181
- "errorMsg": false,
182
-
183
- "label": "Pick your favorite season",
184
-
185
- "className": "radio",
186
-
187
- "value": "",
188
-
189
- "alt": "na",
190
-
191
- "appearance": "outline",
192
-
193
- "min": "4",
194
-
195
- "max": "20",
196
-
197
- "width": "100",
198
-
199
- "height": "20",
200
-
201
- "checked": false,
202
-
203
- "disabled": false,
204
-
205
- "maxlength": "100",
206
-
207
- "readonly": false,
208
-
209
- "required": true,
210
-
211
- "size": "100",
212
-
213
- "sameRow": false,
214
-
215
- "sameRowColumnWidth": "100",
216
-
217
- "tooltip": "Radio",
218
-
219
- "tooltipPosition": "left",
220
-
221
- "pattern": "any",
222
-
223
- "placeholder": "",
224
-
225
- "autofocus": true,
226
-
227
- "autocomplete": false,
228
-
229
- "customComponentName": "none",
230
-
231
- "rucDialogInput": {},
232
-
233
- "hasDependentFields": false,
234
-
235
- "dependentFieldParentId": "any",
236
-
237
- "dependentFields": [],
238
-
239
- "toolTipDescription": "none",
240
-
241
- "showErrorOnPopUp": true,
242
-
243
- "groupOptions": [
244
-
245
- {
246
-
247
- "id": "Winter",
248
-
249
- "name": "Winter",
250
-
251
- "value": ""
252
-
253
- },
254
-
255
- {
256
-
257
- "id": "Spring",
258
-
259
- "name": "Spring",
260
-
261
- "value": ""
262
-
263
- },
264
-
265
- {
266
-
267
- "id": "Summer",
268
-
269
- "name": "Summer",
270
-
271
- "value": ""
272
-
273
- },
274
-
275
- {
276
-
277
- "id": "Autumn",
278
-
279
- "name": "Autumn",
280
-
281
- "value": ""
282
-
283
- }
284
-
285
- ]
286
-
287
- },
288
-
289
- {
290
-
291
- "formType": "simple",
292
-
293
- "fieldType": "checkbox",
294
-
295
- "inputType": "checkbox",
296
-
297
- "id": "radio",
298
-
299
- "name": "radio",
300
-
301
- "label": "Checkbox configuration",
302
-
303
- "className": "checkbox",
304
-
305
- "value": "",
306
-
307
- "alt": "na",
308
-
309
- "appearance": "outline",
310
-
311
- "min": "4",
312
-
313
- "max": "20",
314
-
315
- "width": "100",
316
-
317
- "height": "20",
318
-
319
- "checked": false,
320
-
321
- "disabled": false,
322
-
323
- "maxlength": "100",
324
-
325
- "readonly": false,
326
-
327
- "required": true,
328
-
329
- "size": "100",
330
-
331
- "sameRow": false,
332
-
333
- "sameRowColumnWidth": "100",
334
-
335
- "tooltip": "Checkpoint",
336
-
337
- "tooltipPosition": "above",
338
-
339
- "pattern": "any",
340
-
341
- "placeholder": "",
342
-
343
- "autofocus": true,
344
-
345
- "autocomplete": false,
346
-
347
- "customComponentName": "none",
348
-
349
- "rucDialogInput": {},
350
-
351
- "hasDependentFields": false,
352
-
353
- "dependentFieldParentId": "any",
354
-
355
- "dependentFields": [],
356
-
357
- "toolTipDescription": "none",
358
-
359
- "errorMsg": false,
360
-
361
- "customErrorMessage": "invalid selection",
362
-
363
- "showErrorOnPopUp": true,
364
-
365
- "groupOptions": [
366
-
367
- {
368
-
369
- "id": "Winter",
370
-
371
- "name": "Winter",
372
-
373
- "value": "Winter"
374
-
375
- },
376
-
377
- {
378
-
379
- "id": "Spring",
380
-
381
- "name": "Spring",
382
-
383
- "value": "Spring"
384
-
385
- },
386
-
387
- {
388
-
389
- "id": "Summer",
390
-
391
- "name": "Summer",
392
-
393
- "value": "Summer"
394
-
395
- },
396
-
397
- {
398
-
399
- "id": "Autumn",
400
-
401
- "name": "Autumn",
402
-
403
- "value": "Autumn"
404
-
405
- }
406
-
407
- ]
408
-
409
- },
410
-
411
- {
412
-
413
- "formType": "simple",
414
-
415
- "fieldType": "select",
416
-
417
- "inputType": "select",
418
-
419
- "id": "select",
420
-
421
- "name": "select",
422
-
423
- "label": "select configuration",
424
-
425
- "className": "select",
426
-
427
- "value": "",
428
-
429
- "alt": "na",
430
-
431
- "appearance": "outline",
432
-
433
- "min": "4",
434
-
435
- "max": "20",
436
-
437
- "width": "100",
438
-
439
- "height": "20",
440
-
441
- "checked": false,
442
-
443
- "disabled": false,
444
-
445
- "maxlength": "100",
446
-
447
- "readonly": false,
448
-
449
- "required": true,
450
-
451
- "size": "100",
452
-
453
-
454
- "sameRow": true,
455
-
456
- "tooltip": "select",
457
-
458
- "tooltipPosition": "below",
459
-
460
- "sameRowColumnWidth": "100",
461
-
462
- "pattern": "any",
463
-
464
- "placeholder": "",
465
-
466
- "autofocus": true,
467
-
468
- "autocomplete": false,
469
-
470
- "customComponentName": "none",
471
-
472
- "rucDialogInput": {},
473
-
474
- "hasDependentFields": true,
475
-
476
- "toolTipDescription": "none",
477
-
478
- "errorMsg": false,
479
-
480
- "customErrorMessage": "Invalid select option",
481
-
482
- "showErrorOnPopUp": true,
483
-
484
- "groupOptions": [
485
-
486
- {
487
-
488
- "id": "w11",
489
-
490
- "name": "Winter",
491
-
492
- "value": "Winter"
493
-
494
- },
495
-
496
- {
497
-
498
- "id": "s1",
499
-
500
- "name": "Spring",
501
-
502
- "value": "Spring"
503
-
504
- },
505
-
506
- {
507
-
508
- "id": "su1",
509
-
510
- "name": "Summer",
511
-
512
- "value": "Summer",
513
-
514
- "disable": true
515
-
516
- },
517
-
518
- {
519
-
520
- "id": "a1",
521
-
522
- "name": "Autumn",
523
-
524
- "value": "Autumn"
525
-
526
- }
527
-
528
- ],
529
-
530
- "dependentFields":
531
-
532
- [
533
-
534
- {
535
-
536
- "formType": "simple",
537
-
538
- "fieldType": "input",
539
-
540
- "inputType": "text",
541
-
542
- "id": "w1",
543
-
544
- "name": "w1",
545
-
546
- "errorMsg": false,
547
-
548
- "label": "Winter Name",
549
-
550
- "className": "winter",
551
-
552
- "value": "",
553
-
554
- "alt": "na",
555
-
556
- "appearance": "outline",
557
-
558
- "min": "4",
559
-
560
- "max": "20",
561
-
562
- "width": "50%",
563
-
564
- "height": "20",
565
-
566
- "checked": false,
567
-
568
- "disabled": false,
569
-
570
- "maxlength": "100",
571
-
572
- "readonly": false,
573
-
574
- "required": false,
575
-
576
- "size": "100",
577
-
578
- "pattern": "any",
579
-
580
- "placeholder": "w1 Name",
581
-
582
- "autofocus": false,
583
-
584
- "autocomplete": "",
585
-
586
- "customComponentName": "none",
587
-
588
- "rucDialogInput": {},
589
-
590
- "hasDependentFields": false,
591
-
592
- "dependentFieldParentId": "w11",
593
-
594
- "dependentFields": [],
595
-
596
- "toolTipDescription": "none",
597
-
598
- "showErrorOnPopUp": true,
599
-
600
- "groupOptions": []
601
-
602
- },
603
-
604
- {
605
-
606
- "formType": "simple",
607
-
608
- "fieldType": "input",
609
-
610
- "inputType": "text",
611
-
612
- "id": "a11",
613
-
614
- "name": "a11",
615
-
616
- "errorMsg": false,
617
-
618
- "label": "Autumn Name",
619
-
620
- "className": "Autumn",
621
-
622
- "value": "",
623
-
624
- "alt": "na",
625
-
626
- "appearance": "outline",
627
-
628
- "min": "4",
629
-
630
- "max": "20",
631
-
632
- "width": "50%",
633
-
634
- "height": "20",
635
-
636
- "checked": false,
637
-
638
- "disabled": false,
639
-
640
- "maxlength": "100",
641
-
642
- "readonly": false,
643
-
644
- "required": false,
645
-
646
- "size": "100",
647
-
648
- "pattern": "any",
649
-
650
- "placeholder": "Autumn Name",
651
-
652
- "autofocus": false,
653
-
654
- "autocomplete": "",
655
-
656
- "customComponentName": "none",
657
-
658
- "rucDialogInput": {},
659
-
660
- "hasDependentFields": false,
661
-
662
- "dependentFieldParentId": "a1",
663
-
664
- "dependentFields": [],
665
-
666
- "toolTipDescription": "none",
667
-
668
- "showErrorOnPopUp": true,
669
-
670
- "groupOptions": []
671
-
672
- }]
673
-
674
-
675
-
676
- },
677
-
678
- {
679
-
680
- "formType": "simple",
681
-
682
- "fieldType": "select",
683
-
684
- "inputType": "select",
685
-
686
- "id": "country",
687
-
688
- "name": "select",
689
-
690
- "label": "select Country",
691
-
692
- "className": "select",
693
-
694
- "value": "India",
695
-
696
- "alt": "na",
697
-
698
- "min": "4",
699
-
700
- "max": "20",
701
-
702
- "width": "50%",
703
-
704
- "size": "100",
705
-
706
- "height": "20",
707
-
708
- "appearance": "outline",
709
-
710
- "autofocus": true,
711
-
712
- "autocomplete": false,
713
-
714
- "sameRow": false,
715
-
716
- "sameRowColumnWidth": "100",
717
-
718
- "tooltip": "select",
719
-
720
- "tooltipPosition": "above",
721
-
722
- "rucDialogInput": {},
723
-
724
- "hasDependentFields": true,
725
-
726
- "errorMsg": false,
727
-
728
- "customErrorMessage": "Invalid select option",
729
-
730
- "showErrorOnPopUp": true,
731
-
732
- "selectedParentId": "ind1",
733
-
734
- "groupOptions": [
735
-
736
- {
737
-
738
- "id": "ind1",
739
-
740
- "name": "India",
741
-
742
- "value": "India"
743
-
744
- },
745
-
746
- {
747
-
748
- "id": "usa1",
749
-
750
- "name": "USA",
751
-
752
- "value": "USA"
753
-
754
- },
755
-
756
- {
757
-
758
- "id": "uk1",
759
-
760
- "name": "UK",
761
-
762
- "value": "UK"
763
-
764
- },
765
-
766
- {
767
-
768
- "id": "ch1",
769
-
770
- "name": "Chaina",
771
-
772
- "value": "Chaina"
773
-
774
- }
775
-
776
- ],
777
-
778
- "dependentFields": [
779
-
780
- {
781
-
782
- "formType": "simple",
783
-
784
- "fieldType": "select",
785
-
786
- "inputType": "select",
787
-
788
- "id": "indianState",
789
-
790
- "name": "select",
791
-
792
- "label": "select State",
793
-
794
- "className": "select",
795
-
796
- "value": "MP",
797
-
798
- "appearance": "outline",
799
-
800
- "hasDependentFields": true,
801
-
802
- "dependentFieldParentId": "ind1",
803
-
804
- "selectedParentId": "mp1",
805
-
806
- "groupOptions": [
807
-
808
- {
809
-
810
- "id": "mp1",
811
-
812
- "name": "MP",
813
-
814
- "value": "MP"
815
-
816
- },
817
-
818
- {
819
-
820
- "id": "up1",
821
-
822
- "name": "UP",
823
-
824
- "value": "UP"
825
-
826
- },
827
-
828
- {
829
-
830
- "id": "pb1",
831
-
832
- "name": "PB",
833
-
834
- "value": "PB"
835
-
836
- }
837
-
838
- ],
839
-
840
- "dependentFields": [
841
-
842
- {
843
-
844
- "formType": "simple",
845
-
846
- "fieldType": "select",
847
-
848
- "inputType": "select",
849
-
850
- "id": "mpCity",
851
-
852
- "name": "select",
853
-
854
- "label": "select City",
855
-
856
- "className": "select",
857
-
858
- "appearance": "outline",
859
-
860
- "value": "INDORE",
861
-
862
- "hasDependentFields": false,
863
-
864
- "dependentFieldParentId": "mp1",
865
-
866
- "selectedParentId": "indre1",
867
-
868
- "groupOptions": [
869
-
870
- {
871
-
872
- "id": "indre1",
873
-
874
- "name": "INDORE",
875
-
876
- "value": "INDORE"
877
-
878
- },
879
-
880
- {
881
-
882
- "id": "bh1",
883
-
884
- "name": "bhopal",
885
-
886
- "value": "bhopal"
887
-
888
- }
889
-
890
- ],
891
-
892
- "dependentFields": [
893
-
894
-
895
-
896
- ]
897
-
898
- },
899
-
900
- {
901
-
902
- "formType": "simple",
903
-
904
- "fieldType": "select",
905
-
906
- "inputType": "select",
907
-
908
- "id": "upcity",
909
-
910
- "name": "select",
911
-
912
- "appearance": "outline",
913
-
914
- "label": "select City",
915
-
916
- "className": "select",
917
-
918
- "value": "",
919
-
920
- "hasDependentFields": false,
921
-
922
- "dependentFieldParentId": "up1",
923
-
924
- "groupOptions": [
925
-
926
- {
927
-
928
- "id": "m1",
929
-
930
- "name": "Mathura",
931
-
932
- "value": "Mathura"
933
-
934
- },
935
-
936
- {
937
-
938
- "id": "v1",
939
-
940
- "name": "Vrindavan",
941
-
942
- "value": "Vrindavan"
943
-
944
- }
945
-
946
- ],
947
-
948
- "dependentFields": [
949
-
950
-
951
-
952
- ]
953
-
954
- }
955
-
956
- ]
957
-
958
- },
959
-
960
- {
961
-
962
- "formType": "simple",
963
-
964
- "fieldType": "select",
965
-
966
- "inputType": "select",
967
-
968
- "id": "usaState",
969
-
970
- "name": "select",
971
-
972
- "appearance": "outline",
973
-
974
- "label": "select State",
975
-
976
- "className": "select",
977
-
978
- "value": "",
979
-
980
- "hasDependentFields": true,
981
-
982
- "dependentFieldParentId": "usa1",
983
-
984
- "groupOptions": [
985
-
986
- {
987
-
988
- "id": "p1",
989
-
990
- "name": "Phenix",
991
-
992
- "value": "Phenix"
993
-
994
- },
995
-
996
- {
997
-
998
- "id": "v1",
999
-
1000
- "name": "Vasingtan",
1001
-
1002
- "value": "Vasingtan"
1003
-
1004
- }
1005
-
1006
- ],
1007
-
1008
- "dependentFields": [
1009
-
1010
- {
1011
-
1012
- "formType": "simple",
1013
-
1014
- "fieldType": "select",
1015
-
1016
- "inputType": "select",
1017
-
1018
- "id": "phinexCity",
1019
-
1020
- "name": "select",
1021
-
1022
- "appearance": "outline",
1023
-
1024
- "label": "select City",
1025
-
1026
- "className": "select",
1027
-
1028
- "value": "",
1029
-
1030
- "hasDependentFields": false,
1031
-
1032
- "dependentFieldParentId": "p1",
1033
-
1034
- "groupOptions": [
1035
-
1036
- {
1037
-
1038
- "id": "p11",
1039
-
1040
- "name": "p111",
1041
-
1042
- "value": "p111"
1043
-
1044
- },
1045
-
1046
- {
1047
-
1048
- "id": "p2",
1049
-
1050
- "name": "p222",
1051
-
1052
- "value": "p222"
1053
-
1054
- }
1055
-
1056
- ],
1057
-
1058
- "dependentFields": [
1059
-
1060
-
1061
-
1062
- ]
1063
-
1064
- },
1065
-
1066
- {
1067
-
1068
- "formType": "simple",
1069
-
1070
- "fieldType": "select",
1071
-
1072
- "inputType": "select",
1073
-
1074
- "id": "vashigtonCity",
1075
-
1076
- "name": "select",
1077
-
1078
- "appearance": "outline",
1079
-
1080
- "label": "select City",
1081
-
1082
- "className": "select",
1083
-
1084
- "value": "",
1085
-
1086
- "hasDependentFields": false,
1087
-
1088
- "dependentFieldParentId": "v1",
1089
-
1090
- "groupOptions": [
1091
-
1092
- {
1093
-
1094
- "id": "v11",
1095
-
1096
- "name": "v111",
1097
-
1098
- "value": "v111"
1099
-
1100
- },
1101
-
1102
- {
1103
-
1104
- "id": "v2",
1105
-
1106
- "name": "v222",
1107
-
1108
- "value": "v222"
1109
-
1110
- }
1111
-
1112
- ],
1113
-
1114
- "dependentFields": [
1115
-
1116
-
1117
-
1118
- ]
1119
-
1120
- }
1121
-
1122
- ]
1123
-
1124
- }
1125
-
1126
- ]
1127
-
1128
- }
1129
-
1130
- ]
1131
- beforeEach(async () => {
1132
- await TestBed.configureTestingModule({
1133
- imports: [HttpClientModule, TextFieldModule],
1134
- declarations: [RucMetaSelectComponent],
1135
- providers: [RucMetaFormService]
1136
- })
1137
- .compileComponents();
1138
- });
1139
-
1140
- beforeEach(() => {
1141
- fixture = TestBed.createComponent(RucMetaSelectComponent);
1142
- component = fixture.componentInstance;
1143
- component.rucInputData = mockFormData;
1144
- fixture.detectChanges();
1145
-
1146
- });
1147
-
1148
- it('should create', () => {
1149
- expect(component).toBeTruthy();
1150
- });
1151
-
1152
- it('should call modelChangeFn', () => {
1153
- component.rucInputData.groupOptions = mockFormData[6].groupOptions;
1154
- component.rucInputData.dependentFields = mockFormData[6].dependentFields;
1155
- const event = {
1156
- value: "India"
1157
- }
1158
- const spy = spyOn(component.transferUserInput, 'emit');
1159
- component.modelChangeFn(event);
1160
- component.removDependentFieldParentIdFromOther(mockFormData[6].dependentFields);
1161
-
1162
- expect(spy).toHaveBeenCalled();
1163
- });
1164
-
1165
- });