@react-native-ama/forms 1.2.1 → 2.0.0-beta.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.
Files changed (40) hide show
  1. package/dist/components/Form.d.ts +5 -2
  2. package/dist/components/Form.js +14 -31
  3. package/dist/components/FormSubmit.d.ts +7 -9
  4. package/dist/components/FormSubmit.js +2 -14
  5. package/dist/components/TextInput.d.ts +36 -4
  6. package/dist/components/TextInput.js +20 -73
  7. package/dist/hooks/useFocus.d.ts +4 -0
  8. package/dist/hooks/useFocus.js +69 -0
  9. package/dist/hooks/useFormField.d.ts +1 -7
  10. package/dist/hooks/useFormField.js +32 -25
  11. package/dist/hooks/useFormSubmit.d.ts +4 -0
  12. package/dist/hooks/useFormSubmit.js +14 -0
  13. package/dist/hooks/useTextInput.d.ts +59 -231
  14. package/dist/hooks/useTextInput.js +2 -37
  15. package/dist/index.d.ts +9 -12
  16. package/dist/index.js +3 -8
  17. package/dist/utils/checkFocusTrap.d.ts +8 -0
  18. package/dist/utils/checkFocusTrap.js +30 -0
  19. package/package.json +59 -18
  20. package/src/components/Form.test.tsx +63 -70
  21. package/src/components/Form.tsx +28 -52
  22. package/src/components/FormField.test.tsx +32 -16
  23. package/src/components/FormField.tsx +0 -1
  24. package/src/components/FormSubmit.test.tsx +17 -55
  25. package/src/components/FormSubmit.tsx +9 -36
  26. package/src/components/TextInput.test.tsx +83 -397
  27. package/src/components/TextInput.tsx +41 -109
  28. package/src/hooks/useFocus.test.ts +130 -0
  29. package/src/hooks/useFocus.ts +62 -0
  30. package/src/hooks/useFormField.test.tsx +183 -78
  31. package/src/hooks/useFormField.ts +36 -28
  32. package/src/hooks/useFormSubmit.test.tsx +18 -0
  33. package/src/hooks/useFormSubmit.ts +17 -0
  34. package/src/hooks/useTextInput.ts +10 -55
  35. package/src/index.ts +14 -19
  36. package/src/utils/checkFocusTrap.test.ts +80 -0
  37. package/src/utils/checkFocusTrap.ts +40 -0
  38. package/dist/components/FormSwitch.d.ts +0 -4
  39. package/dist/components/FormSwitch.js +0 -15
  40. package/src/components/FormSwitch.tsx +0 -17
@@ -1,241 +1,105 @@
1
- import * as UseChecks from '@react-native-ama/core/src/hooks/useChecks';
2
- import { ERROR_STYLE } from '@react-native-ama/internal';
3
1
  import { fireEvent, render } from '@testing-library/react-native';
4
2
  import * as React from 'react';
5
3
  import { Text } from 'react-native';
6
-
7
4
  import * as UseFormField from '../hooks/useFormField';
8
5
  import { TextInput } from './TextInput';
9
6
 
10
7
  beforeEach(() => {
11
8
  jest.clearAllMocks();
9
+ (UseFormField.useFormField as jest.Mock).mockReturnValue({
10
+ isLastField: jest.fn().mockReturnValue(false),
11
+ focusNextFormField: jest.fn(),
12
+ });
12
13
  });
13
14
 
14
15
  describe('TextInput', () => {
15
- it('register itself as form field by using the useFormField hook', () => {
16
- const useFormField = jest.spyOn(UseFormField, 'useFormField');
17
-
18
- render(
19
- <TextInput
20
- labelComponent={<Text testID="text">Test</Text>}
21
- hasValidation={false}
22
- returnKeyType="done"
23
- />,
24
- );
25
-
26
- expect(useFormField.mock.calls[0][0]).toMatchObject({
27
- ref: expect.objectContaining({ current: expect.any(Object) }),
28
- errorMessage: undefined,
29
- hasError: undefined,
30
- hasValidation: false,
31
- id: undefined,
32
- nextFieldId: undefined,
33
- nextFormFieldRef: undefined,
34
- });
35
- });
36
-
37
- it('renders the given labelComponent before the text input when labelPosition is undefined', () => {
16
+ it('renders the given renderLabel before the text input when labelPosition is undefined', () => {
38
17
  const renderAPI = render(
39
18
  <TextInput
40
- labelComponent={<Text testID="text">labelComponent</Text>}
41
- returnKeyType="done"
19
+ renderLabel={(a11yProps) => <Text {...a11yProps} testID="label">Label</Text>}
20
+ accessibilityLabel="First name"
42
21
  hasValidation={false}
43
22
  />,
44
23
  );
45
24
 
46
- expect(renderAPI.toJSON()).toMatchInlineSnapshot(`
47
- Array [
48
- <Text
49
- accessibilityElementsHidden={true}
50
- importantForAccessibility="no"
51
- testID="text"
52
- >
53
- labelComponent
54
- </Text>,
55
- <TextInput
56
- accessibilityHint=""
57
- accessibilityLabel="labelComponent"
58
- hasValidation={false}
59
- onLayout={[Function]}
60
- onSubmitEditing={[Function]}
61
- returnKeyType="done"
62
- style={Object {}}
63
- />,
64
- ]
65
- `);
25
+ const json = renderAPI.toJSON() as any[];
26
+ expect(json[0].props.testID).toBe('label');
27
+ expect(json[0].props.importantForAccessibility).toBe('no-hide-descendants');
28
+ expect(json[0].props.accessibilityElementsHidden).toBe(true);
66
29
  });
67
30
 
68
- it('renders the given labelComponent after the text input when labelPosition is "afterInput"', () => {
31
+ it('renders the given renderLabel after the text input when labelPosition is "afterInput"', () => {
69
32
  const renderAPI = render(
70
33
  <TextInput
71
- labelComponent={<Text testID="text"> labelComponent after</Text>}
34
+ renderLabel={(a11yProps) => <Text {...a11yProps} testID="label">Label</Text>}
35
+ accessibilityLabel="First name"
72
36
  labelPosition="afterInput"
73
- returnKeyType="done"
74
37
  hasValidation={false}
75
38
  />,
76
39
  );
77
40
 
78
- expect(renderAPI.toJSON()).toMatchInlineSnapshot(`
79
- Array [
80
- <TextInput
81
- accessibilityHint=""
82
- accessibilityLabel=" labelComponent after"
83
- hasValidation={false}
84
- onLayout={[Function]}
85
- onSubmitEditing={[Function]}
86
- returnKeyType="done"
87
- style={Object {}}
88
- />,
89
- <Text
90
- accessibilityElementsHidden={true}
91
- importantForAccessibility="no"
92
- testID="text"
93
- >
94
- labelComponent after
95
- </Text>,
96
- ]
97
- `);
41
+ const json = renderAPI.toJSON() as any[];
42
+ expect(json[json.length - 1].props.testID).toBe('label');
98
43
  });
99
44
 
100
- it('renders the given errorComponent after the labelComponent when errorPosition is "belowLabel"', () => {
45
+ it('renders the given renderError after the text input when errorPosition is "afterInput"', () => {
101
46
  const renderAPI = render(
102
47
  <TextInput
103
- labelComponent={<Text testID="text">the labelComponent</Text>}
104
- returnKeyType="done"
48
+ renderLabel={(a11yProps) => <Text {...a11yProps}>Label</Text>}
49
+ renderError={(a11yProps) => <Text {...a11yProps} testID="error">Error</Text>}
50
+ accessibilityLabel="First name"
105
51
  hasValidation={true}
106
- errorComponent={<Text>This is the errorComponent</Text>}
107
- errorPosition="belowLabel"
108
52
  hasError={true}
53
+ errorPosition="afterInput"
109
54
  />,
110
55
  );
111
56
 
112
- expect(renderAPI.toJSON()).toMatchInlineSnapshot(`
113
- Array [
114
- <Text
115
- accessibilityElementsHidden={true}
116
- importantForAccessibility="no"
117
- testID="text"
118
- >
119
- the labelComponent
120
- </Text>,
121
- <Text
122
- accessibilityElementsHidden={true}
123
- importantForAccessibility="no"
124
- >
125
- This is the errorComponent
126
- </Text>,
127
- <TextInput
128
- accessibilityHint="This is the errorComponent"
129
- accessibilityLabel="the labelComponent"
130
- hasError={true}
131
- hasValidation={true}
132
- onLayout={[Function]}
133
- onSubmitEditing={[Function]}
134
- returnKeyType="done"
135
- style={Object {}}
136
- />,
137
- ]
138
- `);
57
+ const json = renderAPI.toJSON() as any[];
58
+ expect(json[json.length - 1].props.testID).toBe('error');
139
59
  });
140
60
 
141
- it('renders the given errorComponent after the input when errorPosition is "afterInput"', () => {
61
+ it('renders the given renderError below the label when errorPosition is "belowLabel"', () => {
142
62
  const renderAPI = render(
143
63
  <TextInput
144
- labelComponent={<Text testID="text">the labelComponent</Text>}
145
- returnKeyType="done"
64
+ renderLabel={(a11yProps) => <Text {...a11yProps} testID="label">Label</Text>}
65
+ renderError={(a11yProps) => <Text {...a11yProps} testID="error">Error</Text>}
66
+ accessibilityLabel="First name"
146
67
  hasValidation={true}
147
- errorComponent={<Text>This is the errorComponent</Text>}
148
- errorPosition="afterInput"
149
68
  hasError={true}
69
+ errorPosition="belowLabel"
150
70
  />,
151
71
  );
152
72
 
153
- expect(renderAPI.toJSON()).toMatchInlineSnapshot(`
154
- Array [
155
- <Text
156
- accessibilityElementsHidden={true}
157
- importantForAccessibility="no"
158
- testID="text"
159
- >
160
- the labelComponent
161
- </Text>,
162
- <TextInput
163
- accessibilityHint="This is the errorComponent"
164
- accessibilityLabel="the labelComponent"
165
- hasError={true}
166
- hasValidation={true}
167
- onLayout={[Function]}
168
- onSubmitEditing={[Function]}
169
- returnKeyType="done"
170
- style={Object {}}
171
- />,
172
- <Text
173
- accessibilityElementsHidden={true}
174
- importantForAccessibility="no"
175
- >
176
- This is the errorComponent
177
- </Text>,
178
- ]
179
- `);
180
- });
181
-
182
- it('hides the labelComponent from the screen readers', () => {
183
- const renderAPI = render(
184
- <TextInput
185
- labelComponent={<Text testID="text">Test</Text>}
186
- labelPosition="afterInput"
187
- returnKeyType="done"
188
- hasValidation={false}
189
- />,
190
- );
191
-
192
- expect(renderAPI.getByTestId('text').props.importantForAccessibility).toBe(
193
- 'no',
194
- );
195
- expect(
196
- renderAPI.getByTestId('text').props.accessibilityElementsHidden,
197
- ).toBe(true);
73
+ const json = renderAPI.toJSON() as any[];
74
+ expect(json[0].props.testID).toBe('label');
75
+ expect(json[1].props.testID).toBe('error');
198
76
  });
199
77
 
200
- it('hides the errorComponent component from the screen readers', () => {
78
+ it('does not render errorComponent when hasError is false', () => {
201
79
  const renderAPI = render(
202
80
  <TextInput
203
- labelComponent={<Text>Test</Text>}
204
- labelPosition="afterInput"
205
- returnKeyType="done"
81
+ renderLabel={(a11yProps) => <Text {...a11yProps}>Label</Text>}
82
+ renderError={(a11yProps) => <Text {...a11yProps} testID="error">Error</Text>}
83
+ accessibilityLabel="First name"
206
84
  hasValidation={true}
207
- errorComponent={
208
- <Text testID="errorComponent-test-id">
209
- This is the errorComponent
210
- </Text>
211
- }
85
+ hasError={false}
212
86
  errorPosition="afterInput"
213
- hasError={true}
214
87
  />,
215
88
  );
216
89
 
217
- expect(
218
- renderAPI.getByTestId('errorComponent-test-id').props
219
- .importantForAccessibility,
220
- ).toBe('no');
221
- expect(
222
- renderAPI.getByTestId('errorComponent-test-id').props
223
- .accessibilityElementsHidden,
224
- ).toBe(true);
90
+ expect(renderAPI.queryByTestId('error')).toBeNull();
225
91
  });
226
92
 
227
93
  describe('returnKeyType', () => {
228
94
  it('sets the `returnKeyType="next"` if more fields have been registered', async () => {
229
- const isLastField = jest.fn().mockReturnValue(false);
230
-
231
- jest.spyOn(UseFormField, 'useFormField').mockReturnValue({
232
- isLastField,
233
- } as any);
95
+ (UseFormField.useFormField as jest.Mock).mockReturnValue({
96
+ isLastField: jest.fn().mockReturnValue(false),
97
+ focusNextFormField: jest.fn(),
98
+ });
234
99
 
235
100
  const renderAPI = render(
236
101
  <TextInput
237
- labelComponent={<Text testID="text">labelComponent</Text>}
238
- labelPosition="afterInput"
102
+ accessibilityLabel="First name"
239
103
  testID="test-id"
240
104
  hasValidation={false}
241
105
  />,
@@ -248,23 +112,21 @@ describe('TextInput', () => {
248
112
  );
249
113
  });
250
114
 
251
- it('sets the `returnKeyType="done"` if is last field registered', () => {
252
- const isLastField = jest.fn().mockReturnValue(true);
253
-
254
- jest.spyOn(UseFormField, 'useFormField').mockReturnValue({
255
- isLastField,
256
- } as any);
115
+ it('sets the `returnKeyType="done"` if is last field registered', async () => {
116
+ (UseFormField.useFormField as jest.Mock).mockReturnValue({
117
+ isLastField: jest.fn().mockReturnValue(true),
118
+ focusNextFormField: jest.fn(),
119
+ });
257
120
 
258
121
  const renderAPI = render(
259
122
  <TextInput
260
- labelComponent={<Text testID="text">labelComponent</Text>}
261
- labelPosition="afterInput"
123
+ accessibilityLabel="First name"
262
124
  testID="test-id"
263
125
  hasValidation={false}
264
126
  />,
265
127
  );
266
128
 
267
- fireEvent(renderAPI.getByTestId('test-id'), 'onLayout');
129
+ await fireEvent(renderAPI.getByTestId('test-id'), 'onLayout');
268
130
 
269
131
  expect(renderAPI.getByTestId('test-id').props.returnKeyType).toEqual(
270
132
  'done',
@@ -274,16 +136,14 @@ describe('TextInput', () => {
274
136
  it.each([true, false])(
275
137
  'keeps the `returnKeyType` value passed as prop',
276
138
  async isLastFieldValue => {
277
- const isLastField = jest.fn().mockReturnValue(isLastFieldValue);
278
-
279
- jest.spyOn(UseFormField, 'useFormField').mockReturnValue({
280
- isLastField,
281
- } as any);
139
+ (UseFormField.useFormField as jest.Mock).mockReturnValue({
140
+ isLastField: jest.fn().mockReturnValue(isLastFieldValue),
141
+ focusNextFormField: jest.fn(),
142
+ });
282
143
 
283
144
  const renderAPI = render(
284
145
  <TextInput
285
- labelComponent={<Text testID="text">labelComponent</Text>}
286
- labelPosition="afterInput"
146
+ accessibilityLabel="First name"
287
147
  testID="test-id"
288
148
  returnKeyType="google"
289
149
  hasValidation={false}
@@ -299,242 +159,68 @@ describe('TextInput', () => {
299
159
  );
300
160
  });
301
161
 
302
- describe('accessibilityLabel', () => {
303
- describe('Given no accessibility labelComponent is provided', () => {
304
- it('Then applies the given labelComponent content as accessibilityLabel', () => {
305
- const renderAPI = render(
306
- <TextInput
307
- labelComponent={<Text>First name:</Text>}
308
- returnKeyType="done"
309
- testID="text-input"
310
- hasValidation={false}
311
- />,
312
- );
313
-
314
- expect(
315
- renderAPI.getByTestId('text-input').props.accessibilityLabel,
316
- ).toBe('First name:');
317
- });
318
-
319
- it('strips the ending * from the labelComponent content before using as accessibility labelComponent', () => {
320
- const renderAPI = render(
321
- <TextInput
322
- labelComponent={<Text>First name (required)*</Text>}
323
- returnKeyType="done"
324
- testID="text-input"
325
- hasValidation={false}
326
- />,
327
- );
328
-
329
- expect(
330
- renderAPI.getByTestId('text-input').props.accessibilityLabel,
331
- ).toBe('First name (required)');
332
- });
333
- });
334
-
335
- it('uses the accessibilityLabel only if provided', () => {
336
- const renderAPI = render(
337
- <TextInput
338
- labelComponent={<Text>First name (required)*</Text>}
339
- returnKeyType="done"
340
- testID="text-input"
341
- accessibilityLabel="Please insert your first name"
342
- hasValidation={false}
343
- />,
344
- );
345
-
346
- expect(renderAPI.getByTestId('text-input').props.accessibilityLabel).toBe(
347
- 'Please insert your first name',
348
- );
349
- });
350
- });
351
-
352
- it('calls focusNextFormField onSubmitEditing event', () => {
353
- const focusNextFormField = jest.fn();
354
-
355
- jest.spyOn(UseFormField, 'useFormField').mockReturnValue({
356
- focusNextFormField,
357
- } as any);
358
-
359
- const fn = jest.fn();
360
-
361
- const renderAPI = render(
362
- <TextInput
363
- labelComponent={<Text>First name (required)*</Text>}
364
- returnKeyType="next"
365
- testID="text-input"
366
- accessibilityLabel="Please insert your first name"
367
- onSubmitEditing={fn}
368
- hasValidation={false}
369
- />,
370
- );
371
-
372
- fireEvent(
373
- renderAPI.getByTestId('text-input'),
374
- 'onSubmitEditing',
375
- 'whatever',
376
- );
377
-
378
- expect(fn).toHaveBeenCalledWith('whatever');
379
- });
380
-
381
- it('ignores the errorComponent message if hasError is not true', () => {
162
+ it('uses the accessibilityLabel prop', () => {
382
163
  const renderAPI = render(
383
164
  <TextInput
384
- labelComponent={<Text>First name (required)*</Text>}
385
- returnKeyType="next"
386
- testID="text-input"
387
165
  accessibilityLabel="Please insert your first name"
388
- hasValidation={true}
389
- hasError={false}
390
- errorMessage={'This is the errorComponent'}
391
- errorComponent={<></>}
392
- />,
393
- );
394
-
395
- expect(renderAPI.getByTestId('text-input').props.accessibilityHint).toBe(
396
- '',
397
- );
398
- });
399
-
400
- it('when hasError uses the text from the errorComponent as part of the accessibilityHint', () => {
401
- const renderAPI = render(
402
- <TextInput
403
- labelComponent={<Text>First name (required)*</Text>}
404
- returnKeyType="next"
405
166
  testID="text-input"
406
- accessibilityLabel="Please insert your first name"
407
- accessibilityHint="The hint"
408
- hasValidation={true}
409
- hasError={true}
410
- errorComponent={<Text>The first name cannot be blank</Text>}
167
+ hasValidation={false}
411
168
  />,
412
169
  );
413
170
 
414
- expect(renderAPI.getByTestId('text-input').props.accessibilityHint).toBe(
415
- 'The hint, The first name cannot be blank',
171
+ expect(renderAPI.getByTestId('text-input').props.accessibilityLabel).toBe(
172
+ 'Please insert your first name',
416
173
  );
417
174
  });
418
175
 
419
- it('when hasError uses the errorText, if specified, as part of the accessibilityHint', () => {
176
+ it('uses aria-label when accessibilityLabel is not provided', () => {
420
177
  const renderAPI = render(
421
178
  <TextInput
422
- labelComponent={<Text>First name (required)*</Text>}
423
- returnKeyType="next"
179
+ aria-label="aria label value"
424
180
  testID="text-input"
425
- accessibilityLabel="Please insert your first name"
426
- accessibilityHint="The hint"
427
- hasValidation={true}
428
- hasError={true}
429
- errorMessage="This text will be used"
430
- errorComponent={<Text>The first name cannot be blank</Text>}
181
+ hasValidation={false}
431
182
  />,
432
183
  );
433
184
 
434
- expect(renderAPI.getByTestId('text-input').props.accessibilityHint).toBe(
435
- 'The hint, This text will be used',
185
+ expect(renderAPI.getByTestId('text-input').props.accessibilityLabel).toBe(
186
+ 'aria label value',
436
187
  );
437
188
  });
438
189
 
439
- it('apply the style returned by useFormField', () => {
190
+ it('calls focusNextFormField onSubmitEditing event', () => {
440
191
  const focusNextFormField = jest.fn();
441
192
 
442
- jest.spyOn(UseFormField, 'useFormField').mockReturnValue({
193
+ (UseFormField.useFormField as jest.Mock).mockReturnValue({
443
194
  focusNextFormField,
444
- style: ERROR_STYLE,
445
- } as any);
195
+ isLastField: jest.fn().mockReturnValue(false),
196
+ });
197
+
198
+ const fn = jest.fn();
446
199
 
447
200
  const renderAPI = render(
448
201
  <TextInput
449
- labelComponent={<Text>First name (required)*</Text>}
202
+ accessibilityLabel="Please insert your first name"
450
203
  returnKeyType="next"
451
204
  testID="text-input"
452
- accessibilityLabel="Please insert your first name"
205
+ onSubmitEditing={fn}
453
206
  hasValidation={false}
454
207
  />,
455
208
  );
456
209
 
457
- expect(renderAPI.getByTestId('text-input').props.style).toEqual(
458
- ERROR_STYLE,
210
+ fireEvent(
211
+ renderAPI.getByTestId('text-input'),
212
+ 'onSubmitEditing',
213
+ 'whatever',
459
214
  );
460
- });
461
-
462
- describe('When __DEV__ is false', () => {
463
- let TextInputWithoutDev: typeof TextInput;
464
- let accessibilityLabelChecker: jest.Mock;
465
- let uppercaseChecker: jest.Mock;
466
- let onLayout: jest.Mock;
467
- let noUndefinedProperty: jest.Mock;
468
-
469
- beforeEach(function () {
470
- // @ts-ignore
471
- global.__DEV__ = false;
472
-
473
- accessibilityLabelChecker = jest.fn();
474
- noUndefinedProperty = jest.fn();
475
- uppercaseChecker = jest.fn();
476
- onLayout = jest.fn();
477
-
478
- // @ts-ignore
479
- jest.spyOn(UseChecks, 'useChecks').mockReturnValue({
480
- noUppercaseStringChecker: accessibilityLabelChecker,
481
- noUndefinedProperty,
482
- uppercaseChecker,
483
- onLayout,
484
- } as any);
485
-
486
- TextInputWithoutDev = require('./TextInput').TextInput;
487
- });
488
-
489
- it('does not perform any check', () => {
490
- render(
491
- <TextInputWithoutDev
492
- labelComponent={<Text>First name (required)*</Text>}
493
- returnKeyType="next"
494
- testID="text-input"
495
- accessibilityLabel="Please insert your first name"
496
- hasValidation={false}
497
- />,
498
- );
499
-
500
- expect(noUndefinedProperty).not.toHaveBeenCalled();
501
- });
502
215
 
503
- it('does not apply the debug style', () => {
504
- jest.spyOn(UseFormField, 'useFormField').mockReturnValue({
505
- style: ERROR_STYLE,
506
- } as any);
507
-
508
- const { getByTestId } = render(
509
- <TextInputWithoutDev
510
- labelComponent={<Text>First name (required)*</Text>}
511
- returnKeyType="next"
512
- testID="text-input"
513
- accessibilityLabel="Please insert your first name"
514
- hasValidation={false}
515
- />,
516
- );
517
-
518
- expect(getByTestId('text-input').props.style).toEqual(undefined);
519
- });
216
+ expect(fn).toHaveBeenCalledWith('whatever');
217
+ expect(focusNextFormField).toHaveBeenCalledWith();
520
218
  });
521
219
  });
522
220
 
523
- jest.mock('../hooks/useFormField', () => {
524
- return {
525
- useFormField: jest.fn().mockReturnValue({}),
526
- };
527
- });
528
-
529
- jest.mock('@react-native-ama/core', () => {
530
- const originalModule = jest.requireActual('@react-native-ama/core');
531
-
532
- return {
533
- ...originalModule,
534
- useAMAContext: () => {
535
- return {
536
- isScreenReaderEnabled: true,
537
- };
538
- },
539
- };
540
- });
221
+ jest.mock('../hooks/useFormField', () => ({
222
+ useFormField: jest.fn(() => ({
223
+ isLastField: jest.fn().mockReturnValue(false),
224
+ focusNextFormField: jest.fn(),
225
+ })),
226
+ }));