@react-aria/numberfield 3.12.4 → 3.13.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 (191) hide show
  1. package/dist/import.mjs +2 -2
  2. package/dist/main.js +2 -2
  3. package/dist/main.js.map +1 -1
  4. package/dist/module.js +2 -2
  5. package/dist/module.js.map +1 -1
  6. package/dist/types/src/index.d.ts +2 -0
  7. package/package.json +15 -21
  8. package/src/index.ts +3 -3
  9. package/dist/ar-AE.main.js +0 -8
  10. package/dist/ar-AE.main.js.map +0 -1
  11. package/dist/ar-AE.mjs +0 -10
  12. package/dist/ar-AE.module.js +0 -10
  13. package/dist/ar-AE.module.js.map +0 -1
  14. package/dist/bg-BG.main.js +0 -8
  15. package/dist/bg-BG.main.js.map +0 -1
  16. package/dist/bg-BG.mjs +0 -10
  17. package/dist/bg-BG.module.js +0 -10
  18. package/dist/bg-BG.module.js.map +0 -1
  19. package/dist/cs-CZ.main.js +0 -8
  20. package/dist/cs-CZ.main.js.map +0 -1
  21. package/dist/cs-CZ.mjs +0 -10
  22. package/dist/cs-CZ.module.js +0 -10
  23. package/dist/cs-CZ.module.js.map +0 -1
  24. package/dist/da-DK.main.js +0 -8
  25. package/dist/da-DK.main.js.map +0 -1
  26. package/dist/da-DK.mjs +0 -10
  27. package/dist/da-DK.module.js +0 -10
  28. package/dist/da-DK.module.js.map +0 -1
  29. package/dist/de-DE.main.js +0 -8
  30. package/dist/de-DE.main.js.map +0 -1
  31. package/dist/de-DE.mjs +0 -10
  32. package/dist/de-DE.module.js +0 -10
  33. package/dist/de-DE.module.js.map +0 -1
  34. package/dist/el-GR.main.js +0 -8
  35. package/dist/el-GR.main.js.map +0 -1
  36. package/dist/el-GR.mjs +0 -10
  37. package/dist/el-GR.module.js +0 -10
  38. package/dist/el-GR.module.js.map +0 -1
  39. package/dist/en-US.main.js +0 -8
  40. package/dist/en-US.main.js.map +0 -1
  41. package/dist/en-US.mjs +0 -10
  42. package/dist/en-US.module.js +0 -10
  43. package/dist/en-US.module.js.map +0 -1
  44. package/dist/es-ES.main.js +0 -8
  45. package/dist/es-ES.main.js.map +0 -1
  46. package/dist/es-ES.mjs +0 -10
  47. package/dist/es-ES.module.js +0 -10
  48. package/dist/es-ES.module.js.map +0 -1
  49. package/dist/et-EE.main.js +0 -8
  50. package/dist/et-EE.main.js.map +0 -1
  51. package/dist/et-EE.mjs +0 -10
  52. package/dist/et-EE.module.js +0 -10
  53. package/dist/et-EE.module.js.map +0 -1
  54. package/dist/fi-FI.main.js +0 -8
  55. package/dist/fi-FI.main.js.map +0 -1
  56. package/dist/fi-FI.mjs +0 -10
  57. package/dist/fi-FI.module.js +0 -10
  58. package/dist/fi-FI.module.js.map +0 -1
  59. package/dist/fr-FR.main.js +0 -8
  60. package/dist/fr-FR.main.js.map +0 -1
  61. package/dist/fr-FR.mjs +0 -10
  62. package/dist/fr-FR.module.js +0 -10
  63. package/dist/fr-FR.module.js.map +0 -1
  64. package/dist/he-IL.main.js +0 -8
  65. package/dist/he-IL.main.js.map +0 -1
  66. package/dist/he-IL.mjs +0 -10
  67. package/dist/he-IL.module.js +0 -10
  68. package/dist/he-IL.module.js.map +0 -1
  69. package/dist/hr-HR.main.js +0 -8
  70. package/dist/hr-HR.main.js.map +0 -1
  71. package/dist/hr-HR.mjs +0 -10
  72. package/dist/hr-HR.module.js +0 -10
  73. package/dist/hr-HR.module.js.map +0 -1
  74. package/dist/hu-HU.main.js +0 -8
  75. package/dist/hu-HU.main.js.map +0 -1
  76. package/dist/hu-HU.mjs +0 -10
  77. package/dist/hu-HU.module.js +0 -10
  78. package/dist/hu-HU.module.js.map +0 -1
  79. package/dist/intlStrings.main.js +0 -108
  80. package/dist/intlStrings.main.js.map +0 -1
  81. package/dist/intlStrings.mjs +0 -110
  82. package/dist/intlStrings.module.js +0 -110
  83. package/dist/intlStrings.module.js.map +0 -1
  84. package/dist/it-IT.main.js +0 -8
  85. package/dist/it-IT.main.js.map +0 -1
  86. package/dist/it-IT.mjs +0 -10
  87. package/dist/it-IT.module.js +0 -10
  88. package/dist/it-IT.module.js.map +0 -1
  89. package/dist/ja-JP.main.js +0 -8
  90. package/dist/ja-JP.main.js.map +0 -1
  91. package/dist/ja-JP.mjs +0 -10
  92. package/dist/ja-JP.module.js +0 -10
  93. package/dist/ja-JP.module.js.map +0 -1
  94. package/dist/ko-KR.main.js +0 -8
  95. package/dist/ko-KR.main.js.map +0 -1
  96. package/dist/ko-KR.mjs +0 -10
  97. package/dist/ko-KR.module.js +0 -10
  98. package/dist/ko-KR.module.js.map +0 -1
  99. package/dist/lt-LT.main.js +0 -8
  100. package/dist/lt-LT.main.js.map +0 -1
  101. package/dist/lt-LT.mjs +0 -10
  102. package/dist/lt-LT.module.js +0 -10
  103. package/dist/lt-LT.module.js.map +0 -1
  104. package/dist/lv-LV.main.js +0 -8
  105. package/dist/lv-LV.main.js.map +0 -1
  106. package/dist/lv-LV.mjs +0 -10
  107. package/dist/lv-LV.module.js +0 -10
  108. package/dist/lv-LV.module.js.map +0 -1
  109. package/dist/nb-NO.main.js +0 -8
  110. package/dist/nb-NO.main.js.map +0 -1
  111. package/dist/nb-NO.mjs +0 -10
  112. package/dist/nb-NO.module.js +0 -10
  113. package/dist/nb-NO.module.js.map +0 -1
  114. package/dist/nl-NL.main.js +0 -8
  115. package/dist/nl-NL.main.js.map +0 -1
  116. package/dist/nl-NL.mjs +0 -10
  117. package/dist/nl-NL.module.js +0 -10
  118. package/dist/nl-NL.module.js.map +0 -1
  119. package/dist/pl-PL.main.js +0 -8
  120. package/dist/pl-PL.main.js.map +0 -1
  121. package/dist/pl-PL.mjs +0 -10
  122. package/dist/pl-PL.module.js +0 -10
  123. package/dist/pl-PL.module.js.map +0 -1
  124. package/dist/pt-BR.main.js +0 -8
  125. package/dist/pt-BR.main.js.map +0 -1
  126. package/dist/pt-BR.mjs +0 -10
  127. package/dist/pt-BR.module.js +0 -10
  128. package/dist/pt-BR.module.js.map +0 -1
  129. package/dist/pt-PT.main.js +0 -8
  130. package/dist/pt-PT.main.js.map +0 -1
  131. package/dist/pt-PT.mjs +0 -10
  132. package/dist/pt-PT.module.js +0 -10
  133. package/dist/pt-PT.module.js.map +0 -1
  134. package/dist/ro-RO.main.js +0 -8
  135. package/dist/ro-RO.main.js.map +0 -1
  136. package/dist/ro-RO.mjs +0 -10
  137. package/dist/ro-RO.module.js +0 -10
  138. package/dist/ro-RO.module.js.map +0 -1
  139. package/dist/ru-RU.main.js +0 -8
  140. package/dist/ru-RU.main.js.map +0 -1
  141. package/dist/ru-RU.mjs +0 -10
  142. package/dist/ru-RU.module.js +0 -10
  143. package/dist/ru-RU.module.js.map +0 -1
  144. package/dist/sk-SK.main.js +0 -8
  145. package/dist/sk-SK.main.js.map +0 -1
  146. package/dist/sk-SK.mjs +0 -10
  147. package/dist/sk-SK.module.js +0 -10
  148. package/dist/sk-SK.module.js.map +0 -1
  149. package/dist/sl-SI.main.js +0 -8
  150. package/dist/sl-SI.main.js.map +0 -1
  151. package/dist/sl-SI.mjs +0 -10
  152. package/dist/sl-SI.module.js +0 -10
  153. package/dist/sl-SI.module.js.map +0 -1
  154. package/dist/sr-SP.main.js +0 -8
  155. package/dist/sr-SP.main.js.map +0 -1
  156. package/dist/sr-SP.mjs +0 -10
  157. package/dist/sr-SP.module.js +0 -10
  158. package/dist/sr-SP.module.js.map +0 -1
  159. package/dist/sv-SE.main.js +0 -8
  160. package/dist/sv-SE.main.js.map +0 -1
  161. package/dist/sv-SE.mjs +0 -10
  162. package/dist/sv-SE.module.js +0 -10
  163. package/dist/sv-SE.module.js.map +0 -1
  164. package/dist/tr-TR.main.js +0 -8
  165. package/dist/tr-TR.main.js.map +0 -1
  166. package/dist/tr-TR.mjs +0 -10
  167. package/dist/tr-TR.module.js +0 -10
  168. package/dist/tr-TR.module.js.map +0 -1
  169. package/dist/types.d.ts +0 -29
  170. package/dist/types.d.ts.map +0 -1
  171. package/dist/uk-UA.main.js +0 -8
  172. package/dist/uk-UA.main.js.map +0 -1
  173. package/dist/uk-UA.mjs +0 -10
  174. package/dist/uk-UA.module.js +0 -10
  175. package/dist/uk-UA.module.js.map +0 -1
  176. package/dist/useNumberField.main.js +0 -253
  177. package/dist/useNumberField.main.js.map +0 -1
  178. package/dist/useNumberField.mjs +0 -248
  179. package/dist/useNumberField.module.js +0 -248
  180. package/dist/useNumberField.module.js.map +0 -1
  181. package/dist/zh-CN.main.js +0 -8
  182. package/dist/zh-CN.main.js.map +0 -1
  183. package/dist/zh-CN.mjs +0 -10
  184. package/dist/zh-CN.module.js +0 -10
  185. package/dist/zh-CN.module.js.map +0 -1
  186. package/dist/zh-TW.main.js +0 -8
  187. package/dist/zh-TW.main.js.map +0 -1
  188. package/dist/zh-TW.mjs +0 -10
  189. package/dist/zh-TW.module.js +0 -10
  190. package/dist/zh-TW.module.js.map +0 -1
  191. package/src/useNumberField.ts +0 -331
@@ -1,331 +0,0 @@
1
- /*
2
- * Copyright 2020 Adobe. All rights reserved.
3
- * This file is licensed to you under the Apache License, Version 2.0 (the "License");
4
- * you may not use this file except in compliance with the License. You may obtain a copy
5
- * of the License at http://www.apache.org/licenses/LICENSE-2.0
6
- *
7
- * Unless required by applicable law or agreed to in writing, software distributed under
8
- * the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
9
- * OF ANY KIND, either express or implied. See the License for the specific language
10
- * governing permissions and limitations under the License.
11
- */
12
-
13
- import {AriaButtonProps} from '@react-types/button';
14
- import {AriaNumberFieldProps} from '@react-types/numberfield';
15
- import {chain, filterDOMProps, isAndroid, isIOS, isIPhone, mergeProps, useFormReset, useId} from '@react-aria/utils';
16
- import {DOMAttributes, GroupDOMAttributes, TextInputDOMProps, ValidationResult} from '@react-types/shared';
17
- import {
18
- InputHTMLAttributes,
19
- LabelHTMLAttributes,
20
- RefObject,
21
- useCallback,
22
- useMemo,
23
- useState
24
- } from 'react';
25
- // @ts-ignore
26
- import intlMessages from '../intl/*.json';
27
- import {NumberFieldState} from '@react-stately/numberfield';
28
- import {privateValidationStateProp} from '@react-stately/form';
29
- import {useFocus, useFocusWithin, useScrollWheel} from '@react-aria/interactions';
30
- import {useFormattedTextField} from '@react-aria/textfield';
31
- import {
32
- useLocalizedStringFormatter,
33
- useNumberFormatter
34
- } from '@react-aria/i18n';
35
- import {useSpinButton} from '@react-aria/spinbutton';
36
-
37
- export interface NumberFieldAria extends ValidationResult {
38
- /** Props for the label element. */
39
- labelProps: LabelHTMLAttributes<HTMLLabelElement>,
40
- /** Props for the group wrapper around the input and stepper buttons. */
41
- groupProps: GroupDOMAttributes,
42
- /** Props for the input element. */
43
- inputProps: InputHTMLAttributes<HTMLInputElement>,
44
- /** Props for the increment button, to be passed to `useButton`. */
45
- incrementButtonProps: AriaButtonProps,
46
- /** Props for the decrement button, to be passed to `useButton`. */
47
- decrementButtonProps: AriaButtonProps,
48
- /** Props for the number field's description element, if any. */
49
- descriptionProps: DOMAttributes,
50
- /** Props for the number field's error message element, if any. */
51
- errorMessageProps: DOMAttributes
52
- }
53
-
54
- /**
55
- * Provides the behavior and accessibility implementation for a number field component.
56
- * Number fields allow users to enter a number, and increment or decrement the value using stepper buttons.
57
- */
58
- export function useNumberField(props: AriaNumberFieldProps, state: NumberFieldState, inputRef: RefObject<HTMLInputElement | null>): NumberFieldAria {
59
- let {
60
- id,
61
- decrementAriaLabel,
62
- incrementAriaLabel,
63
- isDisabled,
64
- isReadOnly,
65
- isRequired,
66
- minValue,
67
- maxValue,
68
- autoFocus,
69
- label,
70
- formatOptions,
71
- onBlur = () => {},
72
- onFocus,
73
- onFocusChange,
74
- onKeyDown,
75
- onKeyUp,
76
- description,
77
- errorMessage,
78
- isWheelDisabled,
79
- ...otherProps
80
- } = props;
81
-
82
- let {
83
- increment,
84
- incrementToMax,
85
- decrement,
86
- decrementToMin,
87
- numberValue,
88
- inputValue,
89
- commit,
90
- commitValidation
91
- } = state;
92
-
93
- const stringFormatter = useLocalizedStringFormatter(intlMessages, '@react-aria/numberfield');
94
-
95
- let inputId = useId(id);
96
- let {focusProps} = useFocus({
97
- onBlur() {
98
- // Set input value to normalized valid value
99
- commit();
100
- }
101
- });
102
-
103
- let numberFormatter = useNumberFormatter(formatOptions);
104
- let intlOptions = useMemo(() => numberFormatter.resolvedOptions(), [numberFormatter]);
105
-
106
- // Replace negative textValue formatted using currencySign: 'accounting'
107
- // with a textValue that can be announced using a minus sign.
108
- let textValueFormatter = useNumberFormatter({...formatOptions, currencySign: undefined});
109
- let textValue = useMemo(() => isNaN(numberValue) ? '' : textValueFormatter.format(numberValue), [textValueFormatter, numberValue]);
110
-
111
- let {
112
- spinButtonProps,
113
- incrementButtonProps: incButtonProps,
114
- decrementButtonProps: decButtonProps
115
- } = useSpinButton(
116
- {
117
- isDisabled,
118
- isReadOnly,
119
- isRequired,
120
- maxValue,
121
- minValue,
122
- onIncrement: increment,
123
- onIncrementToMax: incrementToMax,
124
- onDecrement: decrement,
125
- onDecrementToMin: decrementToMin,
126
- value: numberValue,
127
- textValue
128
- }
129
- );
130
-
131
- let [focusWithin, setFocusWithin] = useState(false);
132
- let {focusWithinProps} = useFocusWithin({isDisabled, onFocusWithinChange: setFocusWithin});
133
-
134
- let onWheel = useCallback((e) => {
135
- // if on a trackpad, users can scroll in both X and Y at once, check the magnitude of the change
136
- // if it's mostly in the X direction, then just return, the user probably doesn't mean to inc/dec
137
- // this isn't perfect, events come in fast with small deltas and a part of the scroll may give a false indication
138
- // especially if the user is scrolling near 45deg
139
- if (Math.abs(e.deltaY) <= Math.abs(e.deltaX)) {
140
- return;
141
- }
142
- if (e.deltaY > 0) {
143
- increment();
144
- } else if (e.deltaY < 0) {
145
- decrement();
146
- }
147
- }, [decrement, increment]);
148
- // If the input isn't supposed to receive input, disable scrolling.
149
- let scrollingDisabled = isWheelDisabled || isDisabled || isReadOnly || !focusWithin;
150
- useScrollWheel({onScroll: onWheel, isDisabled: scrollingDisabled}, inputRef);
151
-
152
- // The inputMode attribute influences the software keyboard that is shown on touch devices.
153
- // Browsers and operating systems are quite inconsistent about what keys are available, however.
154
- // We choose between numeric and decimal based on whether we allow negative and fractional numbers,
155
- // and based on testing on various devices to determine what keys are available in each inputMode.
156
- let hasDecimals = (intlOptions.maximumFractionDigits ?? 0) > 0;
157
- let hasNegative = (state.minValue === undefined || isNaN(state.minValue)) || state.minValue < 0;
158
- let inputMode: TextInputDOMProps['inputMode'] = 'numeric';
159
- if (isIPhone()) {
160
- // iPhone doesn't have a minus sign in either numeric or decimal.
161
- // Note this is only for iPhone, not iPad, which always has both
162
- // minus and decimal in numeric.
163
- if (hasNegative) {
164
- inputMode = 'text';
165
- } else if (hasDecimals) {
166
- inputMode = 'decimal';
167
- }
168
- } else if (isAndroid()) {
169
- // Android numeric has both a decimal point and minus key.
170
- // decimal does not have a minus key.
171
- if (hasNegative) {
172
- inputMode = 'numeric';
173
- } else if (hasDecimals) {
174
- inputMode = 'decimal';
175
- }
176
- }
177
-
178
- let onChange = value => {
179
- if (state.validate(value)) {
180
- state.setInputValue(value);
181
- }
182
- };
183
-
184
- let domProps = filterDOMProps(props);
185
- let onKeyDownEnter = useCallback((e) => {
186
- if (e.nativeEvent.isComposing) {
187
- return;
188
- }
189
-
190
- if (e.key === 'Enter') {
191
- commit();
192
- commitValidation();
193
- } else {
194
- e.continuePropagation();
195
- }
196
- }, [commit, commitValidation]);
197
-
198
- let {isInvalid, validationErrors, validationDetails} = state.displayValidation;
199
- let {labelProps, inputProps: textFieldProps, descriptionProps, errorMessageProps} = useFormattedTextField({
200
- ...otherProps,
201
- ...domProps,
202
- // These props are added to a hidden input rather than the formatted textfield.
203
- name: undefined,
204
- form: undefined,
205
- label,
206
- autoFocus,
207
- isDisabled,
208
- isReadOnly,
209
- isRequired,
210
- validate: undefined,
211
- [privateValidationStateProp]: state,
212
- value: inputValue,
213
- defaultValue: '!', // an invalid value so that form reset is ignored in onChange above
214
- autoComplete: 'off',
215
- 'aria-label': props['aria-label'] || undefined,
216
- 'aria-labelledby': props['aria-labelledby'] || undefined,
217
- id: inputId,
218
- type: 'text', // Can't use type="number" because then we can't have things like $ in the field.
219
- inputMode,
220
- onChange,
221
- onBlur,
222
- onFocus,
223
- onFocusChange,
224
- onKeyDown: useMemo(() => chain(onKeyDownEnter, onKeyDown), [onKeyDownEnter, onKeyDown]),
225
- onKeyUp,
226
- description,
227
- errorMessage
228
- }, state, inputRef);
229
-
230
- useFormReset(inputRef, state.defaultNumberValue, state.setNumberValue);
231
-
232
- let inputProps: InputHTMLAttributes<HTMLInputElement> = mergeProps(
233
- spinButtonProps,
234
- focusProps,
235
- textFieldProps,
236
- {
237
- // override the spinbutton role, we can't focus a spin button with VO
238
- role: null,
239
- // ignore aria-roledescription on iOS so that required state will announce when it is present
240
- 'aria-roledescription': (!isIOS() ? stringFormatter.format('numberField') : null),
241
- 'aria-valuemax': null,
242
- 'aria-valuemin': null,
243
- 'aria-valuenow': null,
244
- 'aria-valuetext': null,
245
- autoCorrect: 'off',
246
- spellCheck: 'false'
247
- }
248
- );
249
-
250
- if (props.validationBehavior === 'native') {
251
- inputProps['aria-required'] = undefined;
252
- }
253
-
254
- let onButtonPressStart = (e) => {
255
- // If focus is already on the input, keep it there so we don't hide the
256
- // software keyboard when tapping the increment/decrement buttons.
257
- if (document.activeElement === inputRef.current) {
258
- return;
259
- }
260
-
261
- // Otherwise, when using a mouse, move focus to the input.
262
- // On touch, or with a screen reader, focus the button so that the software
263
- // keyboard does not appear and the screen reader cursor is not moved off the button.
264
- if (e.pointerType === 'mouse') {
265
- inputRef.current?.focus();
266
- } else {
267
- e.target.focus();
268
- }
269
- };
270
-
271
- // Determine the label for the increment and decrement buttons. There are 4 cases:
272
- //
273
- // 1. With a visible label that is a string: aria-label: `Increase ${props.label}`
274
- // 2. With a visible label that is JSX: aria-label: 'Increase', aria-labelledby: '${incrementId} ${labelId}'
275
- // 3. With an aria-label: aria-label: `Increase ${props['aria-label']}`
276
- // 4. With an aria-labelledby: aria-label: 'Increase', aria-labelledby: `${incrementId} ${props['aria-labelledby']}`
277
- //
278
- // (1) and (2) could possibly be combined and both use aria-labelledby. However, placing the label in
279
- // the aria-label string rather than using aria-labelledby gives more flexibility to translators to change
280
- // the order or add additional words around the label if needed.
281
- let fieldLabel = props['aria-label'] || (typeof props.label === 'string' ? props.label : '');
282
- let ariaLabelledby: string | undefined;
283
- if (!fieldLabel) {
284
- ariaLabelledby = props.label != null ? labelProps.id : props['aria-labelledby'];
285
- }
286
-
287
- let incrementId = useId();
288
- let decrementId = useId();
289
-
290
- let incrementButtonProps: AriaButtonProps = mergeProps(incButtonProps, {
291
- 'aria-label': incrementAriaLabel || stringFormatter.format('increase', {fieldLabel}).trim(),
292
- id: ariaLabelledby && !incrementAriaLabel ? incrementId : null,
293
- 'aria-labelledby': ariaLabelledby && !incrementAriaLabel ? `${incrementId} ${ariaLabelledby}` : null,
294
- 'aria-controls': inputId,
295
- excludeFromTabOrder: true,
296
- preventFocusOnPress: true,
297
- allowFocusWhenDisabled: true,
298
- isDisabled: !state.canIncrement,
299
- onPressStart: onButtonPressStart
300
- });
301
-
302
- let decrementButtonProps: AriaButtonProps = mergeProps(decButtonProps, {
303
- 'aria-label': decrementAriaLabel || stringFormatter.format('decrease', {fieldLabel}).trim(),
304
- id: ariaLabelledby && !decrementAriaLabel ? decrementId : null,
305
- 'aria-labelledby': ariaLabelledby && !decrementAriaLabel ? `${decrementId} ${ariaLabelledby}` : null,
306
- 'aria-controls': inputId,
307
- excludeFromTabOrder: true,
308
- preventFocusOnPress: true,
309
- allowFocusWhenDisabled: true,
310
- isDisabled: !state.canDecrement,
311
- onPressStart: onButtonPressStart
312
- });
313
-
314
- return {
315
- groupProps: {
316
- ...focusWithinProps,
317
- role: 'group',
318
- 'aria-disabled': isDisabled,
319
- 'aria-invalid': isInvalid ? 'true' : undefined
320
- },
321
- labelProps,
322
- inputProps,
323
- incrementButtonProps,
324
- decrementButtonProps,
325
- errorMessageProps,
326
- descriptionProps,
327
- isInvalid,
328
- validationErrors,
329
- validationDetails
330
- };
331
- }