@@ -4,6 +4,28 @@ import TabsText from './examples-texts/tabs';
4
4
import CustomComponentText from './examples-texts/custom-component' ;
5
5
import WizardText from './examples-texts/wizard' ;
6
6
import SelectText from './examples-texts/select' ;
7
+ import DualListSelect from './examples-texts/dual-list-select' ;
8
+
9
+ const formGroupVariants = [
10
+ {
11
+ name : 'isDisabled' ,
12
+ title : 'Disabled'
13
+ } ,
14
+ {
15
+ name : 'helperText' ,
16
+ title : 'Helper text' ,
17
+ component : 'input'
18
+ } ,
19
+ {
20
+ name : 'description' ,
21
+ title : 'Description' ,
22
+ component : 'input'
23
+ } ,
24
+ {
25
+ name : 'isReadOnly' ,
26
+ title : 'Read only'
27
+ }
28
+ ] ;
7
29
8
30
export const baseExamples = [
9
31
{
@@ -22,15 +44,7 @@ export const baseExamples = [
22
44
} ,
23
45
canBeRequired : true ,
24
46
variants : [
25
- {
26
- name : 'isDisabled' ,
27
- title : 'Disabled'
28
- } ,
29
- {
30
- name : 'helperText' ,
31
- title : 'Helper text' ,
32
- component : 'input'
33
- } ,
47
+ ...formGroupVariants ,
34
48
{
35
49
name : 'label' ,
36
50
title : 'Label' ,
@@ -46,38 +60,26 @@ export const baseExamples = [
46
60
name : 'placeholder' ,
47
61
title : 'Placeholder' ,
48
62
component : 'input'
49
- } ,
50
- {
51
- name : 'isReadOnly' ,
52
- title : 'Read only'
53
63
}
54
64
]
55
65
} ,
56
66
{
57
- component : componentTypes . TEXTAREA ,
58
- link : componentTypes . TEXTAREA ,
67
+ component : componentTypes . TEXTAREA_FIELD ,
68
+ link : componentTypes . TEXTAREA_FIELD ,
59
69
linkText : 'Text area' ,
60
70
ContentText : GenericComponentText ,
61
71
canBeRequired : true ,
62
72
value : {
63
73
fields : [
64
74
{
65
- component : componentTypes . TEXTAREA ,
75
+ component : componentTypes . TEXTAREA_FIELD ,
66
76
label : 'Long text' ,
67
77
name : 'long-text'
68
78
}
69
79
]
70
80
} ,
71
81
variants : [
72
- {
73
- name : 'isDisabled' ,
74
- title : 'Disabled'
75
- } ,
76
- {
77
- name : 'helperText' ,
78
- title : 'Helper text' ,
79
- component : 'input'
80
- } ,
82
+ ...formGroupVariants ,
81
83
{
82
84
name : 'label' ,
83
85
title : 'Label' ,
@@ -88,10 +90,6 @@ export const baseExamples = [
88
90
name : 'placeholder' ,
89
91
title : 'Placeholder' ,
90
92
component : 'input'
91
- } ,
92
- {
93
- name : 'isReadOnly' ,
94
- title : 'Read only'
95
93
}
96
94
]
97
95
} ,
@@ -114,10 +112,7 @@ export const baseExamples = [
114
112
]
115
113
} ,
116
114
variants : [
117
- {
118
- name : 'isDisabled' ,
119
- title : 'Disabled'
120
- } ,
115
+ ...formGroupVariants ,
121
116
{
122
117
name : 'label' ,
123
118
title : 'Label' ,
@@ -147,10 +142,7 @@ export const baseExamples = [
147
142
]
148
143
} ,
149
144
variants : [
150
- {
151
- name : 'isDisabled' ,
152
- title : 'Disabled'
153
- } ,
145
+ ...formGroupVariants ,
154
146
{
155
147
name : 'label' ,
156
148
title : 'Label' ,
@@ -160,15 +152,15 @@ export const baseExamples = [
160
152
]
161
153
} ,
162
154
{
163
- component : componentTypes . SELECT ,
164
- link : componentTypes . SELECT ,
155
+ component : componentTypes . SELECT_COMPONENT ,
156
+ link : componentTypes . SELECT_COMPONENT ,
165
157
linkText : 'Select' ,
166
158
ContentText : SelectText ,
167
159
canBeRequired : true ,
168
160
value : {
169
161
fields : [
170
162
{
171
- component : componentTypes . SELECT ,
163
+ component : componentTypes . SELECT_COMPONENT ,
172
164
label : 'Select' ,
173
165
name : 'select' ,
174
166
simpleValue : true ,
@@ -181,10 +173,7 @@ export const baseExamples = [
181
173
]
182
174
} ,
183
175
variants : [
184
- {
185
- name : 'isDisabled' ,
186
- title : 'Disabled'
187
- } ,
176
+ ...formGroupVariants ,
188
177
{
189
178
name : 'label' ,
190
179
title : 'Label' ,
@@ -234,14 +223,7 @@ export const baseExamples = [
234
223
]
235
224
} ,
236
225
variants : [
237
- {
238
- name : 'isReadOnly' ,
239
- title : 'Read only'
240
- } ,
241
- {
242
- name : 'isDisabled' ,
243
- title : 'Disabled'
244
- } ,
226
+ ...formGroupVariants ,
245
227
{
246
228
name : 'label' ,
247
229
title : 'Label' ,
@@ -276,6 +258,7 @@ export const baseExamples = [
276
258
]
277
259
} ,
278
260
variants : [
261
+ ...formGroupVariants ,
279
262
{
280
263
name : 'label' ,
281
264
title : 'Label' ,
@@ -323,6 +306,7 @@ export const baseExamples = [
323
306
]
324
307
} ,
325
308
variants : [
309
+ ...formGroupVariants ,
326
310
{
327
311
name : 'label' ,
328
312
title : 'Label' ,
@@ -440,10 +424,7 @@ export const baseExamples = [
440
424
]
441
425
} ,
442
426
variants : [
443
- {
444
- name : 'isDisabled' ,
445
- title : 'Disabled'
446
- } ,
427
+ ...formGroupVariants ,
447
428
{
448
429
name : 'label' ,
449
430
title : 'Label' ,
@@ -477,6 +458,43 @@ Vestibulum vulputate inceptos himenaeos.`
477
458
]
478
459
}
479
460
} ,
461
+ {
462
+ component : 'dual-list-select' ,
463
+ link : 'dual-list-select' ,
464
+ linkText : 'Dual list select' ,
465
+ ContentText : DualListSelect ,
466
+ variants : [ ...formGroupVariants ] ,
467
+ value : {
468
+ fields : [
469
+ {
470
+ component : 'dual-list-select' ,
471
+ name : 'dual-list-select' ,
472
+ options : [
473
+ {
474
+ value : 'cats' ,
475
+ label : 'cats'
476
+ } ,
477
+ {
478
+ value : 'cats_1' ,
479
+ label : 'cats_1'
480
+ } ,
481
+ {
482
+ value : 'cats_2' ,
483
+ label : 'cats_2'
484
+ } ,
485
+ {
486
+ value : 'zebras' ,
487
+ label : 'zebras'
488
+ } ,
489
+ {
490
+ value : 'pigeons' ,
491
+ label : 'pigeons'
492
+ }
493
+ ]
494
+ }
495
+ ]
496
+ }
497
+ } ,
480
498
{
481
499
component : componentTypes . WIZARD ,
482
500
link : componentTypes . WIZARD ,
@@ -490,7 +508,8 @@ Vestibulum vulputate inceptos himenaeos.`
490
508
fields : [
491
509
{
492
510
title : 'Get started with adding source' ,
493
- name : 1 ,
511
+ name : 'step-1' ,
512
+ stepKey : 1 ,
494
513
nextStep : {
495
514
when : 'source-type' ,
496
515
stepMapper : {
@@ -500,13 +519,13 @@ Vestibulum vulputate inceptos himenaeos.`
500
519
} ,
501
520
fields : [
502
521
{
503
- component : componentTypes . TEXTAREA ,
522
+ component : componentTypes . TEXTAREA_FIELD ,
504
523
name : 'source-name' ,
505
524
type : 'text' ,
506
525
label : 'Source name'
507
526
} ,
508
527
{
509
- component : componentTypes . SELECT ,
528
+ component : componentTypes . SELECT_COMPONENT ,
510
529
name : 'source-type' ,
511
530
label : 'Source type' ,
512
531
isRequired : true ,
@@ -533,7 +552,8 @@ Vestibulum vulputate inceptos himenaeos.`
533
552
} ,
534
553
{
535
554
title : 'Configure AWS' ,
536
- name : 'aws' ,
555
+ name : 'step-2' ,
556
+ stepKey : 'aws' ,
537
557
nextStep : 'summary' ,
538
558
fields : [
539
559
{
@@ -544,8 +564,9 @@ Vestibulum vulputate inceptos himenaeos.`
544
564
]
545
565
} ,
546
566
{
547
- name : 'google' ,
567
+ stepKey : 'google' ,
548
568
title : 'Configure google' ,
569
+ name : 'step-3' ,
549
570
nextStep : 'summary' ,
550
571
fields : [
551
572
{
@@ -562,6 +583,7 @@ Vestibulum vulputate inceptos himenaeos.`
562
583
component : 'summary'
563
584
}
564
585
] ,
586
+ stepKey : 'summary' ,
565
587
name : 'summary'
566
588
}
567
589
]
@@ -570,8 +592,8 @@ Vestibulum vulputate inceptos himenaeos.`
570
592
} ,
571
593
variants : [ ] ,
572
594
next : {
573
- link : '/others/miq-components ' ,
574
- label : 'ManageIQ components '
595
+ link : '/releases ' ,
596
+ label : 'Releases '
575
597
} ,
576
598
prev : {
577
599
link : '/component-example/time-picker' ,
0 commit comments