Skip to content

Commit 3da4c23

Browse files
committed
Removes all mention of keys from schemas
1 parent 3f0ebc0 commit 3da4c23

File tree

13 files changed

+66
-79
lines changed

13 files changed

+66
-79
lines changed

packages/mui-component-mapper/demo/demo-schemas/sandbox.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const output = {
1414
fields: [
1515
{
1616
title: 'Text boxes',
17-
key: '637',
17+
name: '637',
1818
fields: [
1919
{
2020
name: 'text_box_1',
@@ -121,7 +121,7 @@ const output = {
121121
},
122122
{
123123
title: 'Text areas',
124-
key: '638',
124+
name: '638',
125125
fields: [
126126
{
127127
name: 'textarea_box_1',
@@ -138,11 +138,11 @@ const output = {
138138
{
139139
title: 'Tab 2',
140140
description: 'Checks',
141-
key: '554',
141+
name: '554',
142142
fields: [
143143
{
144144
title: 'Check boxes',
145-
key: '639',
145+
name: '639',
146146
fields: [
147147
{
148148
name: 'check_box_1',
@@ -165,7 +165,7 @@ const output = {
165165
},
166166
{
167167
title: 'Radios',
168-
key: '640',
168+
name: '640',
169169
fields: [
170170
{
171171
name: 'radio_button_1',
@@ -239,11 +239,11 @@ const output = {
239239
{
240240
title: 'Tab 3',
241241
description: '',
242-
key: '555',
242+
name: '555',
243243
fields: [
244244
{
245245
title: 'Dropdowns',
246-
key: '641',
246+
name: '641',
247247
fields: [
248248
{
249249
name: 'dropdown_list_1',
@@ -382,11 +382,11 @@ const output = {
382382
{
383383
title: 'Tab 4',
384384
description: '',
385-
key: '556',
385+
name: '556',
386386
fields: [
387387
{
388388
title: 'Datepickers',
389-
key: '642',
389+
name: '642',
390390
fields: [
391391
{
392392
name: 'date_control_1',
@@ -405,7 +405,7 @@ const output = {
405405
},
406406
{
407407
title: 'Timepickers',
408-
key: '643',
408+
name: '643',
409409
fields: [
410410
{
411411
name: 'date_time_control_1',
@@ -428,11 +428,11 @@ const output = {
428428
{
429429
title: 'Mixed',
430430
description: '',
431-
key: '558',
431+
name: '558',
432432
fields: [
433433
{
434434
title: 'New Section',
435-
key: '645',
435+
name: '645',
436436
fields: [
437437
{
438438
name: 'text_box_10',
@@ -518,7 +518,7 @@ const output = {
518518
},
519519
],
520520
component: components.TABS,
521-
key: '57',
521+
name: '57',
522522
},
523523
],
524524
};

packages/mui-component-mapper/src/tests/subform.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,11 @@ describe('subform', () => {
99
const props = {
1010
fields: [
1111
{
12-
key: 'cosiKey',
1312
title: 'cosiTitle',
1413
name: 'cosiName',
1514
fields: [],
1615
},
1716
{
18-
key: 'cosiKey2',
1917
title: 'cosiTitle2',
2018
name: 'cosiName2',
2119
fields: [],

packages/mui-component-mapper/src/tests/tabs.test.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,11 @@ describe('tabs', () => {
1010
const props = {
1111
fields: [
1212
{
13-
key: 'cosiKey',
1413
title: 'cosiTitle',
1514
name: 'cosiName',
1615
fields: [],
1716
},
1817
{
19-
key: 'cosiKey2',
2018
title: 'cosiTitle2',
2119
name: 'cosiName2',
2220
fields: [],

packages/pf3-component-mapper/demo/demo-schemas/sandbox.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const output = {
5454
},
5555
{
5656
title: 'Text boxes',
57-
key: '637',
57+
name: '637',
5858
fields: [
5959
{
6060
name: 'text_box_1',
@@ -162,7 +162,7 @@ const output = {
162162
},
163163
{
164164
title: 'Text areas',
165-
key: '638',
165+
name: '638',
166166
fields: [
167167
{
168168
name: 'textarea_box_1',
@@ -179,11 +179,11 @@ const output = {
179179
{
180180
title: 'Tab 2',
181181
description: 'Checks',
182-
key: '554',
182+
name: '554',
183183
fields: [
184184
{
185185
title: 'Check boxes',
186-
key: '639',
186+
name: '639',
187187
fields: [
188188
{
189189
name: 'check_box_1',
@@ -216,7 +216,7 @@ const output = {
216216
},
217217
{
218218
title: 'Radios',
219-
key: '640',
219+
name: '640',
220220
fields: [
221221
{
222222
name: 'radio_button_1',
@@ -290,11 +290,11 @@ const output = {
290290
{
291291
title: 'Tab 3',
292292
description: '',
293-
key: '555',
293+
name: '555',
294294
fields: [
295295
{
296296
title: 'Dropdowns',
297-
key: '641',
297+
name: '641',
298298
fields: [
299299
{
300300
name: 'dropdown_list_1',
@@ -434,11 +434,11 @@ const output = {
434434
{
435435
title: 'Tab 4',
436436
description: '',
437-
key: '556',
437+
name: '556',
438438
fields: [
439439
{
440440
title: 'Datepickers',
441-
key: '642',
441+
name: '642',
442442
fields: [
443443
{
444444
component: components.SELECT,
@@ -479,7 +479,7 @@ const output = {
479479
},
480480
{
481481
title: 'Timepickers',
482-
key: '643',
482+
name: '643',
483483
fields: [
484484
{
485485
name: 'date_time_control_1',
@@ -502,11 +502,11 @@ const output = {
502502
{
503503
title: 'Mixed',
504504
description: '',
505-
key: '558',
505+
name: '558',
506506
fields: [
507507
{
508508
title: 'New Section',
509-
key: '645',
509+
name: '645',
510510
fields: [
511511
{
512512
name: 'text_box_10',
@@ -592,7 +592,7 @@ const output = {
592592
},
593593
],
594594
component: components.TABS,
595-
key: '57',
595+
name: '57',
596596
},
597597
],
598598
};

packages/pf3-component-mapper/src/tests/__snapshots__/tabs.test.js.snap

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ exports[`<FormTabs /> should render form tabs 1`] = `
1212
"name": "foo",
1313
},
1414
],
15-
"key": "tab1",
15+
"name": "tab1",
1616
"title": "Tab 1",
1717
},
1818
Object {
1919
"component": "tabs",
2020
"fields": Array [],
21-
"key": "tab2",
21+
"name": "tab2",
2222
"title": "Tab 2",
2323
},
2424
]
@@ -260,7 +260,7 @@ exports[`<FormTabs /> should render form tabs with error state 1`] = `
260260
"name": "nested.field",
261261
},
262262
],
263-
"key": "tab1",
263+
"name": "tab1",
264264
"title": "Tab 1",
265265
"validateFields": Array [
266266
"foo",

packages/pf3-component-mapper/src/tests/tabs.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ describe('<FormTabs />', () => {
1212
fields: [{
1313
component: componentTypes.TABS,
1414
title: 'Tab 1',
15-
key: 'tab1',
15+
name: 'tab1',
1616
fields: [{
1717
name: 'foo',
1818
component: 'foo',
1919
}],
2020
}, {
2121
component: componentTypes.TABS,
2222
title: 'Tab 2',
23-
key: 'tab2',
23+
name: 'tab2',
2424
fields: [],
2525
}],
2626
formOptions: {
@@ -43,7 +43,7 @@ describe('<FormTabs />', () => {
4343
fields: [{
4444
component: componentTypes.TABS,
4545
title: 'Tab 1',
46-
key: 'tab1',
46+
name: 'tab1',
4747
validateFields: [ 'foo', 'nested.field' ],
4848
fields: [{
4949
name: 'foo',

packages/pf4-component-mapper/demo/demo-schemas/sandbox.js

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ const output = {
3333
fields: [
3434
{
3535
title: 'Text boxes',
36-
key: '637',
36+
name: '637',
3737
fields: [
3838
{
3939
name: 'switch_1',
@@ -123,7 +123,7 @@ const output = {
123123
},
124124
{
125125
title: 'Text areas',
126-
key: '638',
126+
name: '638',
127127
fields: [
128128
{
129129
name: 'textarea_box_1',
@@ -140,11 +140,11 @@ const output = {
140140
{
141141
title: 'Tab 2',
142142
description: 'Checks',
143-
key: '554',
143+
name: '554',
144144
fields: [
145145
{
146146
title: 'Check boxes',
147-
key: '639',
147+
name: '639',
148148
fields: [
149149
{
150150
name: 'check_box_1',
@@ -163,7 +163,7 @@ const output = {
163163
},
164164
{
165165
title: 'Radios',
166-
key: '640',
166+
name: '640',
167167
fields: [
168168
{
169169
name: 'radio_button_1',
@@ -237,11 +237,11 @@ const output = {
237237
{
238238
title: 'Tab 3',
239239
description: '',
240-
key: '555',
240+
name: '555',
241241
fields: [
242242
{
243243
title: 'Dropdowns',
244-
key: '641',
244+
name: '641',
245245
fields: [
246246
{
247247
name: 'async-drop-down',
@@ -412,11 +412,11 @@ const output = {
412412
{
413413
title: 'Tab 4',
414414
description: '',
415-
key: '556',
415+
name: '556',
416416
fields: [
417417
{
418418
title: 'Datepickers',
419-
key: '642',
419+
name: '642',
420420
fields: [
421421
{
422422
name: 'date_control_1',
@@ -435,7 +435,7 @@ const output = {
435435
},
436436
{
437437
title: 'Timepickers',
438-
key: '643',
438+
name: '643',
439439
fields: [
440440
{
441441
name: 'date_time_control_1',
@@ -458,11 +458,11 @@ const output = {
458458
{
459459
title: 'Mixed',
460460
description: '',
461-
key: '558',
461+
name: '558',
462462
fields: [
463463
{
464464
title: 'New Section',
465-
key: '645',
465+
name: '645',
466466
fields: [
467467
{
468468
name: 'text_box_10',
@@ -548,7 +548,7 @@ const output = {
548548
},
549549
],
550550
component: components.TABS,
551-
key: '57',
551+
name: '57',
552552
},
553553
],
554554
};

packages/pf4-component-mapper/src/tests/sub-form.test.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { shallow } from 'enzyme';
55

66
describe('SubForm component', () => {
77
const props = {
8-
key: 'cosiKey',
98
title: 'cosiTitle',
109
name: 'cosiName',
1110
fields: [],

0 commit comments

Comments
 (0)