@ukhomeoffice/cop-react-form-renderer 5.88.7 → 5.88.8

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.
@@ -14,6 +14,7 @@ describe('utils', function () {
14
14
  var gbCurrency = {
15
15
  currencyName: 'Great British Pounds',
16
16
  currencyCode: 'GBP',
17
+ hint: 'hint',
17
18
  value: 'GBP',
18
19
  label: 'GBP',
19
20
  slangTerm: 'quid'
@@ -21,6 +22,7 @@ describe('utils', function () {
21
22
  var usCurrency = {
22
23
  currencyName: 'United States Dollars',
23
24
  currencyCode: 'USD',
25
+ hint: 'hint',
24
26
  value: 'USD',
25
27
  label: 'USD',
26
28
  slangTerm: 'bucks',
@@ -29,19 +31,23 @@ describe('utils', function () {
29
31
  var options = {
30
32
  alpha: {
31
33
  value: 'a',
32
- label: 'Alpha'
34
+ label: 'Alpha',
35
+ hint: 'hint'
33
36
  },
34
37
  bravo: {
35
38
  value: 'b',
36
- label: 'Bravo'
39
+ label: 'Bravo',
40
+ hint: 'hint'
37
41
  },
38
42
  alIncluded: {
39
43
  value: 'c',
40
- label: 'Call me alan'
44
+ label: 'Call me alan',
45
+ hint: 'hint'
41
46
  },
42
47
  alStart: {
43
48
  value: 'd',
44
- label: 'Word Alphabet'
49
+ label: 'Word Alphabet',
50
+ hint: 'hint'
45
51
  }
46
52
  };
47
53
  var testCurrencies = [gbCurrency, usCurrency];
@@ -71,7 +77,8 @@ describe('utils', function () {
71
77
  expect(results.length).toEqual(1);
72
78
  expect(results).toEqual([{
73
79
  value: 'a',
74
- label: 'Alpha'
80
+ label: 'Alpha',
81
+ hint: 'hint'
75
82
  }]);
76
83
  });
77
84
  });
@@ -249,6 +256,7 @@ describe('utils', function () {
249
256
  options: [gbCurrency, {
250
257
  currencyName: 'United States Dollars',
251
258
  currencyCode: 'USD',
259
+ hint: 'hint',
252
260
  value: 'USD'
253
261
  }]
254
262
  }
@@ -263,6 +271,7 @@ describe('utils', function () {
263
271
  expect(results).toEqual([gbCurrency, {
264
272
  currencyName: 'United States Dollars',
265
273
  currencyCode: 'USD',
274
+ hint: 'hint',
266
275
  value: 'USD',
267
276
  label: ''
268
277
  }]);
@@ -32,7 +32,8 @@ var interpolateOptions = function interpolateOptions(config, options) {
32
32
  }
33
33
  return _objectSpread(_objectSpread({}, opt), {}, {
34
34
  value: _copReactComponents.Utils.interpolateString(opt.value, config.formData),
35
- label: _copReactComponents.Utils.interpolateString(opt.label, config.formData)
35
+ label: _copReactComponents.Utils.interpolateString(opt.label, config.formData),
36
+ hint: _copReactComponents.Utils.interpolateString(opt.hint, config.formData)
36
37
  });
37
38
  }).filter(function (n) {
38
39
  return n;
@@ -16,10 +16,12 @@ describe('utils', function () {
16
16
  var CONFIG = {
17
17
  options: [{
18
18
  value: 'a',
19
- label: 'Alpha'
19
+ label: 'Alpha',
20
+ hint: ''
20
21
  }, {
21
22
  value: 'b',
22
- label: 'Bravo'
23
+ label: 'Bravo',
24
+ hint: ''
23
25
  }]
24
26
  };
25
27
  (0, _getOptions.default)(CONFIG, function (options) {
@@ -31,10 +33,12 @@ describe('utils', function () {
31
33
  data: {
32
34
  options: [{
33
35
  value: 'a',
34
- label: 'Alpha'
36
+ label: 'Alpha',
37
+ hint: ''
35
38
  }, {
36
39
  value: 'b',
37
- label: 'Bravo'
40
+ label: 'Bravo',
41
+ hint: ''
38
42
  }]
39
43
  }
40
44
  };
@@ -46,10 +50,12 @@ describe('utils', function () {
46
50
  var CONFIG = {
47
51
  options: [{
48
52
  value: 'a',
49
- label: 'Alpha'
53
+ label: 'Alpha',
54
+ hint: ''
50
55
  }, {
51
56
  value: 'b',
52
- label: 'Bravo'
57
+ label: 'Bravo',
58
+ hint: ''
53
59
  }],
54
60
  data: {
55
61
  options: [{
@@ -71,6 +77,7 @@ describe('utils', function () {
71
77
  options: [{
72
78
  value: 'a',
73
79
  label: 'Alpha',
80
+ hint: '',
74
81
  show_when: {
75
82
  field: 'other',
76
83
  op: 'eq',
@@ -79,6 +86,7 @@ describe('utils', function () {
79
86
  }, {
80
87
  value: 'b',
81
88
  label: 'Bravo',
89
+ hint: '',
82
90
  show_when: {
83
91
  field: 'other',
84
92
  op: 'neq',
@@ -99,6 +107,7 @@ describe('utils', function () {
99
107
  options: [{
100
108
  value: 'a',
101
109
  label: 'Alpha',
110
+ hint: '',
102
111
  show_when: {
103
112
  type: 'or',
104
113
  conditions: [{
@@ -114,6 +123,7 @@ describe('utils', function () {
114
123
  }, {
115
124
  value: 'b',
116
125
  label: 'Bravo',
126
+ hint: '',
117
127
  show_when: {
118
128
  type: 'or',
119
129
  conditions: [{
@@ -152,16 +162,19 @@ describe('utils', function () {
152
162
  options: [{
153
163
  id: 1,
154
164
  description: 'First refdata item',
165
+ hint: '',
155
166
  value: 'firstValue',
156
167
  label: 'First label'
157
168
  }, {
158
169
  id: 2,
159
170
  description: 'Second refdata item',
171
+ hint: '',
160
172
  value: 'secondValue',
161
173
  label: 'Second label'
162
174
  }, {
163
175
  id: 3,
164
176
  description: 'Third refdata item',
177
+ hint: '',
165
178
  value: 'thirdValue',
166
179
  label: 'Third label'
167
180
  }]
@@ -169,11 +182,13 @@ describe('utils', function () {
169
182
  var MERGED_CONFIG = [{
170
183
  id: 1,
171
184
  description: 'First refdata item',
185
+ hint: '',
172
186
  value: 'firstValue',
173
187
  label: 'First label'
174
188
  }, {
175
189
  id: 2,
176
190
  description: 'Second refdata item',
191
+ hint: '',
177
192
  value: 'secondValue',
178
193
  nested: [{
179
194
  value: 'a',
@@ -183,6 +198,7 @@ describe('utils', function () {
183
198
  }, {
184
199
  id: 3,
185
200
  description: 'Third refdata item',
201
+ hint: '',
186
202
  value: 'thirdValue',
187
203
  label: 'Third label'
188
204
  }];
@@ -196,11 +212,13 @@ describe('utils', function () {
196
212
  options: [{
197
213
  value: 'a',
198
214
  label: 'Alpha',
199
- description: 'first'
215
+ description: 'first',
216
+ hint: ''
200
217
  }, {
201
218
  value: 'b',
202
219
  label: 'Bravo',
203
- description: 'second'
220
+ description: 'second',
221
+ hint: ''
204
222
  }]
205
223
  };
206
224
  (0, _getOptions.default)(CONFIG, function (options) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ukhomeoffice/cop-react-form-renderer",
3
- "version": "5.88.7",
3
+ "version": "5.88.8",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "clean": "rimraf dist",