@rjsf/semantic-ui 5.2.0 → 5.3.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.
@@ -1,8 +1,9 @@
1
1
  import { withTheme } from '@rjsf/core';
2
2
  import { Button, Icon, Segment, Grid, Form, Message, Label, List, Header, Radio, Input } from 'semantic-ui-react';
3
- import React from 'react';
3
+ import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
4
4
  import { TranslatableString, getUiOptions, getTemplate, isFixedItems, UI_OPTIONS_KEY, getInputProps, examplesId, ariaDescribedByIds, errorId, helpId, descriptionId, titleId, canExpand, getSubmitButtonOptions, ADDITIONAL_PROPERTY_FLAG, schemaRequiresTrueValue, enumOptionsIsSelected, optionId, enumOptionsSelectValue, enumOptionsDeselectValue, enumOptionsValueForIndex, rangeSpec, enumOptionsIndexForValue } from '@rjsf/utils';
5
5
  import { nanoid } from 'nanoid';
6
+ import { createElement } from 'react';
6
7
  import map from 'lodash-es/map';
7
8
 
8
9
  function _extends() {
@@ -40,14 +41,15 @@ function AddButton(_ref) {
40
41
  color = _ref.color,
41
42
  props = _objectWithoutPropertiesLoose(_ref, _excluded$4);
42
43
  var translateString = registry.translateString;
43
- return /*#__PURE__*/React.createElement(Button, _extends({
44
+ return jsx(Button, _extends({
44
45
  title: translateString(TranslatableString.AddItemButton),
45
46
  color: color
46
47
  }, props, {
47
48
  icon: true,
48
- size: "tiny"
49
- }), /*#__PURE__*/React.createElement(Icon, {
50
- name: "plus"
49
+ size: 'tiny',
50
+ children: jsx(Icon, {
51
+ name: 'plus'
52
+ })
51
53
  }));
52
54
  }
53
55
 
@@ -101,8 +103,8 @@ function getSemanticErrorProps(_ref2) {
101
103
  options = _ref2$options === void 0 ? {} : _ref2$options,
102
104
  _ref2$defaultProps = _ref2.defaultProps,
103
105
  defaultProps = _ref2$defaultProps === void 0 ? {
104
- size: "small",
105
- pointing: "above"
106
+ size: 'small',
107
+ pointing: 'above'
106
108
  } : _ref2$defaultProps;
107
109
  var formContextProps = formContext.semantic && formContext.semantic.errorOptions;
108
110
  var semanticOptions = getUiOptions(uiSchema).semantic;
@@ -132,7 +134,7 @@ function cleanClassNames(classNameArr, omit) {
132
134
  // returning them as a string
133
135
  return [].concat(new Set(classList.filter(function (cn) {
134
136
  return !omit.includes(cn);
135
- }))).join(" ");
137
+ }))).join(' ');
136
138
  }
137
139
  /**
138
140
  *
@@ -145,15 +147,15 @@ function cleanClassNames(classNameArr, omit) {
145
147
  function MaybeWrap(_ref3) {
146
148
  var wrap = _ref3.wrap,
147
149
  _ref3$component = _ref3.component,
148
- Component = _ref3$component === void 0 ? "div" : _ref3$component,
150
+ Component = _ref3$component === void 0 ? 'div' : _ref3$component,
149
151
  props = _objectWithoutPropertiesLoose(_ref3, _excluded$3);
150
- return wrap ? /*#__PURE__*/React.createElement(Component, _extends({}, props)) : props.children;
152
+ return wrap ? jsx(Component, _extends({}, props)) : props.children;
151
153
  }
152
154
 
153
155
  var gridStyle = function gridStyle(vertical) {
154
156
  return {
155
- display: "grid",
156
- gridTemplateColumns: "1fr " + (vertical ? 65 : 110) + "px"
157
+ display: 'grid',
158
+ gridTemplateColumns: "1fr " + (vertical ? 65 : 150) + "px"
157
159
  };
158
160
  };
159
161
  /** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.
@@ -164,16 +166,19 @@ function ArrayFieldItemTemplate(props) {
164
166
  var children = props.children,
165
167
  disabled = props.disabled,
166
168
  hasToolbar = props.hasToolbar,
169
+ hasCopy = props.hasCopy,
167
170
  hasMoveDown = props.hasMoveDown,
168
171
  hasMoveUp = props.hasMoveUp,
169
172
  hasRemove = props.hasRemove,
170
173
  index = props.index,
174
+ onCopyIndexClick = props.onCopyIndexClick,
171
175
  onDropIndexClick = props.onDropIndexClick,
172
176
  onReorderClick = props.onReorderClick,
173
177
  readonly = props.readonly,
174
178
  uiSchema = props.uiSchema,
175
179
  registry = props.registry;
176
180
  var _registry$templates$B = registry.templates.ButtonTemplates,
181
+ CopyButton = _registry$templates$B.CopyButton,
177
182
  MoveDownButton = _registry$templates$B.MoveDownButton,
178
183
  MoveUpButton = _registry$templates$B.MoveUpButton,
179
184
  RemoveButton = _registry$templates$B.RemoveButton;
@@ -181,43 +186,56 @@ function ArrayFieldItemTemplate(props) {
181
186
  // Pull the semantic props out of the uiOptions that were put in via the ArrayFieldTemplate
182
187
  var _uiOptions$semantic = uiOptions.semantic,
183
188
  _uiOptions$semantic$h = _uiOptions$semantic.horizontalButtons,
184
- horizontalButtons = _uiOptions$semantic$h === void 0 ? false : _uiOptions$semantic$h,
189
+ horizontalButtons = _uiOptions$semantic$h === void 0 ? true : _uiOptions$semantic$h,
185
190
  _uiOptions$semantic$w = _uiOptions$semantic.wrapItem,
186
191
  wrapItem = _uiOptions$semantic$w === void 0 ? false : _uiOptions$semantic$w;
187
- return /*#__PURE__*/React.createElement("div", {
188
- className: "array-item"
189
- }, /*#__PURE__*/React.createElement(MaybeWrap, {
190
- wrap: wrapItem,
191
- component: Segment
192
- }, /*#__PURE__*/React.createElement(Grid, {
193
- style: index !== 0 ? _extends({}, gridStyle(!horizontalButtons), {
194
- alignItems: "center"
195
- }) : gridStyle(!horizontalButtons)
196
- }, /*#__PURE__*/React.createElement(Grid.Column, {
197
- width: 16,
198
- verticalAlign: "middle"
199
- }, children), hasToolbar && /*#__PURE__*/React.createElement(Grid.Column, null, (hasMoveUp || hasMoveDown || hasRemove) && /*#__PURE__*/React.createElement(Button.Group, {
200
- size: "mini",
201
- vertical: !horizontalButtons
202
- }, (hasMoveUp || hasMoveDown) && /*#__PURE__*/React.createElement(MoveUpButton, {
203
- className: "array-item-move-up",
204
- disabled: disabled || readonly || !hasMoveUp,
205
- onClick: onReorderClick(index, index - 1),
206
- uiSchema: uiSchema,
207
- registry: registry
208
- }), (hasMoveUp || hasMoveDown) && /*#__PURE__*/React.createElement(MoveDownButton, {
209
- className: "array-item-move-down",
210
- disabled: disabled || readonly || !hasMoveDown,
211
- onClick: onReorderClick(index, index + 1),
212
- uiSchema: uiSchema,
213
- registry: registry
214
- }), hasRemove && /*#__PURE__*/React.createElement(RemoveButton, {
215
- className: "array-item-remove",
216
- disabled: disabled || readonly,
217
- onClick: onDropIndexClick(index),
218
- uiSchema: uiSchema,
219
- registry: registry
220
- }))))));
192
+ return jsx("div", {
193
+ className: 'array-item',
194
+ children: jsx(MaybeWrap, {
195
+ wrap: wrapItem,
196
+ component: Segment,
197
+ children: jsxs(Grid, {
198
+ style: _extends({}, gridStyle(!horizontalButtons), {
199
+ alignItems: 'center'
200
+ }),
201
+ children: [jsx(Grid.Column, {
202
+ width: 16,
203
+ verticalAlign: 'middle',
204
+ children: children
205
+ }), hasToolbar && jsx(Grid.Column, {
206
+ children: (hasMoveUp || hasMoveDown || hasRemove) && jsxs(Button.Group, {
207
+ size: 'mini',
208
+ vertical: !horizontalButtons,
209
+ children: [(hasMoveUp || hasMoveDown) && jsx(MoveUpButton, {
210
+ className: 'array-item-move-up',
211
+ disabled: disabled || readonly || !hasMoveUp,
212
+ onClick: onReorderClick(index, index - 1),
213
+ uiSchema: uiSchema,
214
+ registry: registry
215
+ }), (hasMoveUp || hasMoveDown) && jsx(MoveDownButton, {
216
+ className: 'array-item-move-down',
217
+ disabled: disabled || readonly || !hasMoveDown,
218
+ onClick: onReorderClick(index, index + 1),
219
+ uiSchema: uiSchema,
220
+ registry: registry
221
+ }), hasCopy && jsx(CopyButton, {
222
+ className: 'array-item-copy',
223
+ disabled: disabled || readonly,
224
+ onClick: onCopyIndexClick(index),
225
+ uiSchema: uiSchema,
226
+ registry: registry
227
+ }), hasRemove && jsx(RemoveButton, {
228
+ className: 'array-item-remove',
229
+ disabled: disabled || readonly,
230
+ onClick: onDropIndexClick(index),
231
+ uiSchema: uiSchema,
232
+ registry: registry
233
+ })]
234
+ })
235
+ })]
236
+ })
237
+ })
238
+ });
221
239
  }
222
240
 
223
241
  var _excluded$2 = ["key", "uiSchema"];
@@ -243,7 +261,7 @@ function ArrayFieldTemplate(props) {
243
261
  uiSchema: uiSchema,
244
262
  formContext: formContext,
245
263
  defaultSchemaProps: {
246
- horizontalButtons: false,
264
+ horizontalButtons: true,
247
265
  wrapItem: false
248
266
  }
249
267
  });
@@ -254,57 +272,58 @@ function ArrayFieldTemplate(props) {
254
272
  wrapItem: wrapItem
255
273
  };
256
274
  var uiOptions = getUiOptions(uiSchema);
257
- var ArrayFieldDescriptionTemplate = getTemplate("ArrayFieldDescriptionTemplate", registry, uiOptions);
258
- var ArrayFieldItemTemplate = getTemplate("ArrayFieldItemTemplate", registry, uiOptions);
259
- var ArrayFieldTitleTemplate = getTemplate("ArrayFieldTitleTemplate", registry, uiOptions);
275
+ var ArrayFieldDescriptionTemplate = getTemplate('ArrayFieldDescriptionTemplate', registry, uiOptions);
276
+ var ArrayFieldItemTemplate = getTemplate('ArrayFieldItemTemplate', registry, uiOptions);
277
+ var ArrayFieldTitleTemplate = getTemplate('ArrayFieldTitleTemplate', registry, uiOptions);
260
278
  // Button templates are not overridden in the uiSchema
261
279
  var AddButton = registry.templates.ButtonTemplates.AddButton;
262
- return /*#__PURE__*/React.createElement("div", {
263
- className: cleanClassNames([className, isFixedItems(schema) ? "" : "sortable-form-fields"])
264
- }, /*#__PURE__*/React.createElement(ArrayFieldTitleTemplate, {
265
- idSchema: idSchema,
266
- title: uiOptions.title || title,
267
- schema: schema,
268
- uiSchema: uiSchema,
269
- required: required,
270
- registry: registry
271
- }), /*#__PURE__*/React.createElement(ArrayFieldDescriptionTemplate, {
272
- idSchema: idSchema,
273
- description: uiOptions.description || schema.description,
274
- schema: schema,
275
- uiSchema: uiSchema,
276
- registry: registry
277
- }), /*#__PURE__*/React.createElement("div", {
278
- key: "array-item-list-" + idSchema.$id
279
- }, /*#__PURE__*/React.createElement("div", {
280
- className: "row array-item-list"
281
- }, items && items.map(function (_ref) {
282
- var _extends2;
283
- var key = _ref.key,
284
- _ref$uiSchema = _ref.uiSchema,
285
- itemUiSchema = _ref$uiSchema === void 0 ? {} : _ref$uiSchema,
286
- props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
287
- // Merge in the semantic props from the ArrayFieldTemplate into each of the items
288
- var mergedUiSchema = _extends({}, itemUiSchema, (_extends2 = {}, _extends2[UI_OPTIONS_KEY] = _extends({}, itemUiSchema[UI_OPTIONS_KEY], {
289
- semantic: semantic
290
- }), _extends2));
291
- return /*#__PURE__*/React.createElement(ArrayFieldItemTemplate, _extends({
292
- key: key
293
- }, props, {
294
- uiSchema: mergedUiSchema
295
- }));
296
- })), canAdd && /*#__PURE__*/React.createElement("div", {
297
- style: {
298
- marginTop: "1rem",
299
- position: "relative",
300
- textAlign: "right"
301
- }
302
- }, /*#__PURE__*/React.createElement(AddButton, {
303
- onClick: onAddClick,
304
- disabled: disabled || readonly,
305
- uiSchema: uiSchema,
306
- registry: registry
307
- }))));
280
+ return jsxs("div", {
281
+ className: cleanClassNames([className, isFixedItems(schema) ? '' : 'sortable-form-fields']),
282
+ children: [jsx(ArrayFieldTitleTemplate, {
283
+ idSchema: idSchema,
284
+ title: uiOptions.title || title,
285
+ schema: schema,
286
+ uiSchema: uiSchema,
287
+ required: required,
288
+ registry: registry
289
+ }), jsx(ArrayFieldDescriptionTemplate, {
290
+ idSchema: idSchema,
291
+ description: uiOptions.description || schema.description,
292
+ schema: schema,
293
+ uiSchema: uiSchema,
294
+ registry: registry
295
+ }), jsxs("div", {
296
+ children: [jsx("div", {
297
+ className: 'row array-item-list',
298
+ children: items && items.map(function (_ref) {
299
+ var _extends2;
300
+ var key = _ref.key,
301
+ _ref$uiSchema = _ref.uiSchema,
302
+ itemUiSchema = _ref$uiSchema === void 0 ? {} : _ref$uiSchema,
303
+ props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
304
+ // Merge in the semantic props from the ArrayFieldTemplate into each of the items
305
+ var mergedUiSchema = _extends({}, itemUiSchema, (_extends2 = {}, _extends2[UI_OPTIONS_KEY] = _extends({}, itemUiSchema[UI_OPTIONS_KEY], {
306
+ semantic: semantic
307
+ }), _extends2));
308
+ return jsx(ArrayFieldItemTemplate, _extends({}, props, {
309
+ uiSchema: mergedUiSchema
310
+ }), key);
311
+ })
312
+ }), canAdd && jsx("div", {
313
+ style: {
314
+ marginTop: '1rem',
315
+ position: 'relative',
316
+ textAlign: 'right'
317
+ },
318
+ children: jsx(AddButton, {
319
+ onClick: onAddClick,
320
+ disabled: disabled || readonly,
321
+ uiSchema: uiSchema,
322
+ registry: registry
323
+ })
324
+ })]
325
+ }, "array-item-list-" + idSchema.$id)]
326
+ });
308
327
  }
309
328
 
310
329
  /** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
@@ -322,6 +341,7 @@ function BaseInputTemplate(props) {
322
341
  readonly = props.readonly,
323
342
  disabled = props.disabled,
324
343
  onChange = props.onChange,
344
+ onChangeOverride = props.onChangeOverride,
325
345
  onBlur = props.onBlur,
326
346
  onFocus = props.onFocus,
327
347
  autofocus = props.autofocus,
@@ -342,7 +362,7 @@ function BaseInputTemplate(props) {
342
362
  var schemaUtils = registry.schemaUtils;
343
363
  var _onChange = function _onChange(_ref) {
344
364
  var value = _ref.target.value;
345
- return onChange(value === "" ? options.emptyValue : value);
365
+ return onChange(value === '' ? options.emptyValue : value);
346
366
  };
347
367
  var _onBlur = function _onBlur() {
348
368
  return onBlur && onBlur(id, value);
@@ -351,32 +371,33 @@ function BaseInputTemplate(props) {
351
371
  return onFocus && onFocus(id, value);
352
372
  };
353
373
  var displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);
354
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Form.Input, _extends({
355
- key: id,
356
- id: id,
357
- name: id,
358
- placeholder: placeholder
359
- }, inputProps, {
360
- label: displayLabel ? label || schema.title : false,
361
- required: required,
362
- autoFocus: autofocus,
363
- disabled: disabled || readonly,
364
- list: schema.examples ? examplesId(id) : undefined
365
- }, semanticProps, {
366
- value: value || value === 0 ? value : "",
367
- error: rawErrors.length > 0,
368
- onChange: _onChange,
369
- onBlur: _onBlur,
370
- onFocus: _onFocus,
371
- "aria-describedby": ariaDescribedByIds(id, !!schema.examples)
372
- })), Array.isArray(schema.examples) && /*#__PURE__*/React.createElement("datalist", {
373
- id: examplesId(id)
374
- }, schema.examples.concat(schema["default"] && !schema.examples.includes(schema["default"]) ? [schema["default"]] : []).map(function (example) {
375
- return /*#__PURE__*/React.createElement("option", {
376
- key: example,
377
- value: example
378
- });
379
- })));
374
+ return jsxs(Fragment, {
375
+ children: [jsx(Form.Input, _extends({
376
+ id: id,
377
+ name: id,
378
+ placeholder: placeholder
379
+ }, inputProps, {
380
+ label: displayLabel ? label || schema.title : false,
381
+ required: required,
382
+ autoFocus: autofocus,
383
+ disabled: disabled || readonly,
384
+ list: schema.examples ? examplesId(id) : undefined
385
+ }, semanticProps, {
386
+ value: value || value === 0 ? value : '',
387
+ error: rawErrors.length > 0,
388
+ onChange: onChangeOverride || _onChange,
389
+ onBlur: _onBlur,
390
+ onFocus: _onFocus,
391
+ "aria-describedby": ariaDescribedByIds(id, !!schema.examples)
392
+ }), id), Array.isArray(schema.examples) && jsx("datalist", {
393
+ id: examplesId(id),
394
+ children: schema.examples.concat(schema["default"] && !schema.examples.includes(schema["default"]) ? [schema["default"]] : []).map(function (example) {
395
+ return jsx("option", {
396
+ value: example
397
+ }, example);
398
+ })
399
+ })]
400
+ });
380
401
  }
381
402
 
382
403
  /** The `DescriptionField` is the template to use to render the description of a field
@@ -389,10 +410,11 @@ function DescriptionField(props) {
389
410
  if (!description) {
390
411
  return null;
391
412
  }
392
- return /*#__PURE__*/React.createElement("p", {
413
+ return jsx("p", {
393
414
  id: id,
394
- className: "sui-description"
395
- }, description);
415
+ className: 'sui-description',
416
+ children: description
417
+ });
396
418
  }
397
419
 
398
420
  /** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
@@ -403,13 +425,18 @@ function ErrorList(_ref) {
403
425
  var errors = _ref.errors,
404
426
  registry = _ref.registry;
405
427
  var translateString = registry.translateString;
406
- return /*#__PURE__*/React.createElement(Message, {
407
- negative: true
408
- }, /*#__PURE__*/React.createElement(Message.Header, null, translateString(TranslatableString.ErrorsLabel)), /*#__PURE__*/React.createElement(Message.List, null, errors.map(function (error, index) {
409
- return /*#__PURE__*/React.createElement(Message.Item, {
410
- key: "error-" + index
411
- }, error.stack);
412
- })));
428
+ return jsxs(Message, {
429
+ negative: true,
430
+ children: [jsx(Message.Header, {
431
+ children: translateString(TranslatableString.ErrorsLabel)
432
+ }), jsx(Message.List, {
433
+ children: errors.map(function (error, index) {
434
+ return jsx(Message.Item, {
435
+ children: error.stack
436
+ }, "error-" + index);
437
+ })
438
+ })]
439
+ });
413
440
  }
414
441
 
415
442
  var _excluded$1 = ["icon", "iconType", "color", "className", "uiSchema", "registry"];
@@ -419,42 +446,50 @@ function IconButton(props) {
419
446
  color = props.color,
420
447
  className = props.className,
421
448
  otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
422
- return /*#__PURE__*/React.createElement(Button, _extends({
449
+ return jsx(Button, _extends({
423
450
  icon: icon,
424
451
  size: iconType,
425
452
  color: color,
426
453
  className: className
427
454
  }, otherProps));
428
455
  }
456
+ function CopyButton(props) {
457
+ var translateString = props.registry.translateString;
458
+ return jsx(IconButton, _extends({
459
+ title: translateString(TranslatableString.CopyButton)
460
+ }, props, {
461
+ icon: 'copy'
462
+ }));
463
+ }
429
464
  function MoveDownButton(props) {
430
465
  var translateString = props.registry.translateString;
431
- return /*#__PURE__*/React.createElement(IconButton, _extends({
466
+ return jsx(IconButton, _extends({
432
467
  title: translateString(TranslatableString.MoveDownButton)
433
468
  }, props, {
434
- icon: "angle down"
469
+ icon: 'angle down'
435
470
  }));
436
471
  }
437
472
  function MoveUpButton(props) {
438
473
  var translateString = props.registry.translateString;
439
- return /*#__PURE__*/React.createElement(IconButton, _extends({
474
+ return jsx(IconButton, _extends({
440
475
  title: translateString(TranslatableString.MoveUpButton)
441
476
  }, props, {
442
- icon: "angle up"
477
+ icon: 'angle up'
443
478
  }));
444
479
  }
445
480
  function RemoveButton(props) {
446
481
  var translateString = props.registry.translateString;
447
- return /*#__PURE__*/React.createElement(IconButton, _extends({
482
+ return jsx(IconButton, _extends({
448
483
  title: translateString(TranslatableString.RemoveButton)
449
484
  }, props, {
450
- icon: "trash"
485
+ icon: 'trash'
451
486
  }));
452
487
  }
453
488
 
454
489
  var DEFAULT_OPTIONS$1 = {
455
490
  options: {
456
- pointing: "above",
457
- size: "small"
491
+ pointing: 'above',
492
+ size: 'small'
458
493
  }
459
494
  };
460
495
  /** The `FieldErrorTemplate` component renders the errors local to the particular field
@@ -476,19 +511,21 @@ function FieldErrorTemplate(_ref) {
476
511
  size = options.size;
477
512
  if (errors && errors.length > 0) {
478
513
  var id = errorId(idSchema);
479
- return /*#__PURE__*/React.createElement(Label, {
514
+ return jsx(Label, {
480
515
  id: id,
481
- color: "red",
482
- pointing: pointing || "above",
483
- size: size || "small",
484
- basic: true
485
- }, /*#__PURE__*/React.createElement(List, {
486
- bulleted: true
487
- }, errors.map(function (error) {
488
- return /*#__PURE__*/React.createElement(List.Item, {
489
- key: nanoid()
490
- }, error);
491
- })));
516
+ color: 'red',
517
+ pointing: pointing || 'above',
518
+ size: size || 'small',
519
+ basic: true,
520
+ children: jsx(List, {
521
+ bulleted: true,
522
+ children: errors.map(function (error) {
523
+ return jsx(List.Item, {
524
+ children: error
525
+ }, nanoid());
526
+ })
527
+ })
528
+ });
492
529
  }
493
530
  return null;
494
531
  }
@@ -502,8 +539,8 @@ function FieldHelpTemplate(props) {
502
539
  help = props.help;
503
540
  if (help) {
504
541
  var id = helpId(idSchema);
505
- return /*#__PURE__*/React.createElement(Message, {
506
- size: "mini",
542
+ return jsx(Message, {
543
+ size: 'mini',
507
544
  info: true,
508
545
  id: id,
509
546
  content: help
@@ -537,16 +574,17 @@ function FieldTemplate(props) {
537
574
  var wrapLabel = semanticProps.wrapLabel,
538
575
  wrapContent = semanticProps.wrapContent;
539
576
  var uiOptions = getUiOptions(uiSchema);
540
- var WrapIfAdditionalTemplate = getTemplate("WrapIfAdditionalTemplate", registry, uiOptions);
541
- var DescriptionFieldTemplate = getTemplate("DescriptionFieldTemplate", registry, uiOptions);
577
+ var WrapIfAdditionalTemplate = getTemplate('WrapIfAdditionalTemplate', registry, uiOptions);
578
+ var DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, uiOptions);
542
579
  if (hidden) {
543
- return /*#__PURE__*/React.createElement("div", {
580
+ return jsx("div", {
544
581
  style: {
545
- display: "none"
546
- }
547
- }, children);
582
+ display: 'none'
583
+ },
584
+ children: children
585
+ });
548
586
  }
549
- return /*#__PURE__*/React.createElement(WrapIfAdditionalTemplate, _extends({
587
+ return jsx(WrapIfAdditionalTemplate, _extends({
550
588
  classNames: classNames,
551
589
  style: style,
552
590
  id: id,
@@ -554,23 +592,27 @@ function FieldTemplate(props) {
554
592
  registry: registry,
555
593
  schema: schema,
556
594
  uiSchema: uiSchema
557
- }, otherProps), /*#__PURE__*/React.createElement(Form.Group, {
558
- key: id,
559
- widths: "equal",
560
- grouped: true
561
- }, /*#__PURE__*/React.createElement(MaybeWrap, {
562
- wrap: wrapContent,
563
- className: "sui-field-content"
564
- }, children, displayLabel && rawDescription && /*#__PURE__*/React.createElement(MaybeWrap, {
565
- wrap: wrapLabel,
566
- className: "sui-field-label"
567
- }, rawDescription && /*#__PURE__*/React.createElement(DescriptionFieldTemplate, {
568
- id: descriptionId(id),
569
- description: rawDescription,
570
- schema: schema,
571
- uiSchema: uiSchema,
572
- registry: registry
573
- })), help, errors)));
595
+ }, otherProps, {
596
+ children: jsx(Form.Group, {
597
+ widths: 'equal',
598
+ grouped: true,
599
+ children: jsxs(MaybeWrap, {
600
+ wrap: wrapContent,
601
+ className: 'sui-field-content',
602
+ children: [children, displayLabel && rawDescription && jsx(MaybeWrap, {
603
+ wrap: wrapLabel,
604
+ className: 'sui-field-label',
605
+ children: rawDescription && jsx(DescriptionFieldTemplate, {
606
+ id: descriptionId(id),
607
+ description: rawDescription,
608
+ schema: schema,
609
+ uiSchema: uiSchema,
610
+ registry: registry
611
+ })
612
+ }), help, errors]
613
+ })
614
+ }, id)
615
+ }));
574
616
  }
575
617
 
576
618
  /** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
@@ -593,42 +635,48 @@ function ObjectFieldTemplate(props) {
593
635
  idSchema = props.idSchema,
594
636
  registry = props.registry;
595
637
  var uiOptions = getUiOptions(uiSchema);
596
- var TitleFieldTemplate = getTemplate("TitleFieldTemplate", registry, uiOptions);
597
- var DescriptionFieldTemplate = getTemplate("DescriptionFieldTemplate", registry, uiOptions);
638
+ var TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, uiOptions);
639
+ var DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, uiOptions);
598
640
  // Button templates are not overridden in the uiSchema
599
641
  var AddButton = registry.templates.ButtonTemplates.AddButton;
600
642
  var fieldTitle = uiOptions.title || title;
601
643
  var fieldDescription = uiOptions.description || description;
602
- return /*#__PURE__*/React.createElement(React.Fragment, null, fieldTitle && /*#__PURE__*/React.createElement(TitleFieldTemplate, {
603
- id: titleId(idSchema),
604
- title: fieldTitle,
605
- required: required,
606
- schema: schema,
607
- uiSchema: uiSchema,
608
- registry: registry
609
- }), fieldDescription && /*#__PURE__*/React.createElement(DescriptionFieldTemplate, {
610
- id: descriptionId(idSchema),
611
- description: fieldDescription,
612
- schema: schema,
613
- uiSchema: uiSchema,
614
- registry: registry
615
- }), properties.map(function (prop) {
616
- return prop.content;
617
- }), canExpand(schema, uiSchema, formData) && /*#__PURE__*/React.createElement(Grid.Column, {
618
- width: 16,
619
- verticalAlign: "middle"
620
- }, /*#__PURE__*/React.createElement(Grid.Row, null, /*#__PURE__*/React.createElement("div", {
621
- style: {
622
- marginTop: "1rem",
623
- position: "relative",
624
- textAlign: "right"
625
- }
626
- }, /*#__PURE__*/React.createElement(AddButton, {
627
- onClick: onAddClick(schema),
628
- disabled: disabled || readonly,
629
- uiSchema: uiSchema,
630
- registry: registry
631
- })))));
644
+ return jsxs(Fragment, {
645
+ children: [fieldTitle && jsx(TitleFieldTemplate, {
646
+ id: titleId(idSchema),
647
+ title: fieldTitle,
648
+ required: required,
649
+ schema: schema,
650
+ uiSchema: uiSchema,
651
+ registry: registry
652
+ }), fieldDescription && jsx(DescriptionFieldTemplate, {
653
+ id: descriptionId(idSchema),
654
+ description: fieldDescription,
655
+ schema: schema,
656
+ uiSchema: uiSchema,
657
+ registry: registry
658
+ }), properties.map(function (prop) {
659
+ return prop.content;
660
+ }), canExpand(schema, uiSchema, formData) && jsx(Grid.Column, {
661
+ width: 16,
662
+ verticalAlign: 'middle',
663
+ children: jsx(Grid.Row, {
664
+ children: jsx("div", {
665
+ style: {
666
+ marginTop: '1rem',
667
+ position: 'relative',
668
+ textAlign: 'right'
669
+ },
670
+ children: jsx(AddButton, {
671
+ onClick: onAddClick(schema),
672
+ disabled: disabled || readonly,
673
+ uiSchema: uiSchema,
674
+ registry: registry
675
+ })
676
+ })
677
+ })
678
+ })]
679
+ });
632
680
  }
633
681
 
634
682
  /** The `SubmitButton` renders a button that represent the `Submit` action on a form
@@ -643,10 +691,12 @@ function SubmitButton(_ref) {
643
691
  if (norender) {
644
692
  return null;
645
693
  }
646
- return /*#__PURE__*/React.createElement(Button, _extends({
647
- type: "submit",
694
+ return jsx(Button, _extends({
695
+ type: 'submit',
648
696
  primary: true
649
- }, submitButtonProps), submitText);
697
+ }, submitButtonProps, {
698
+ children: submitText
699
+ }));
650
700
  }
651
701
 
652
702
  var DEFAULT_OPTIONS = {
@@ -668,11 +718,12 @@ function TitleField(_ref) {
668
718
  if (!title) {
669
719
  return null;
670
720
  }
671
- return /*#__PURE__*/React.createElement(Header, _extends({
721
+ return jsx(Header, _extends({
672
722
  id: id
673
723
  }, semanticProps, {
674
- as: "h5"
675
- }), title);
724
+ as: 'h5',
725
+ children: title
726
+ }));
676
727
  }
677
728
 
678
729
  /** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are
@@ -705,51 +756,60 @@ function WrapIfAdditionalTemplate(props) {
705
756
  wrapperStyle = _registry$formContext.wrapperStyle;
706
757
  var additional = (ADDITIONAL_PROPERTY_FLAG in schema);
707
758
  if (!additional) {
708
- return /*#__PURE__*/React.createElement("div", {
759
+ return jsx("div", {
709
760
  className: classNames,
710
- style: style
711
- }, children);
761
+ style: style,
762
+ children: children
763
+ });
712
764
  }
713
765
  var handleBlur = function handleBlur(_ref) {
714
766
  var target = _ref.target;
715
767
  return onKeyChange(target.value);
716
768
  };
717
- return /*#__PURE__*/React.createElement("div", {
769
+ return jsx("div", {
718
770
  className: classNames,
719
771
  style: style,
720
- key: id + "-key"
721
- }, /*#__PURE__*/React.createElement(Grid, {
722
- columns: "equal"
723
- }, /*#__PURE__*/React.createElement(Grid.Row, null, /*#__PURE__*/React.createElement(Grid.Column, {
724
- className: "form-additional"
725
- }, /*#__PURE__*/React.createElement(Form.Group, {
726
- widths: "equal",
727
- grouped: true
728
- }, /*#__PURE__*/React.createElement(Form.Input, {
729
- className: "form-group",
730
- hasFeedback: true,
731
- fluid: true,
732
- htmlFor: "" + id,
733
- label: keyLabel,
734
- required: required,
735
- defaultValue: label,
736
- disabled: disabled || readonlyAsDisabled && readonly,
737
- id: "" + id,
738
- name: "" + id,
739
- onBlur: !readonly ? handleBlur : undefined,
740
- style: wrapperStyle,
741
- type: "text"
742
- }))), /*#__PURE__*/React.createElement(Grid.Column, {
743
- className: "form-additional",
744
- verticalAlign: "middle"
745
- }, children), /*#__PURE__*/React.createElement(Grid.Column, null, /*#__PURE__*/React.createElement(RemoveButton, {
746
- iconType: "mini",
747
- className: "array-item-remove",
748
- disabled: disabled || readonly,
749
- onClick: onDropPropertyClick(label),
750
- uiSchema: uiSchema,
751
- registry: registry
752
- })))));
772
+ children: jsx(Grid, {
773
+ columns: 'equal',
774
+ children: jsxs(Grid.Row, {
775
+ children: [jsx(Grid.Column, {
776
+ className: 'form-additional',
777
+ children: jsx(Form.Group, {
778
+ widths: 'equal',
779
+ grouped: true,
780
+ children: jsx(Form.Input, {
781
+ className: 'form-group',
782
+ hasFeedback: true,
783
+ fluid: true,
784
+ htmlFor: "" + id,
785
+ label: keyLabel,
786
+ required: required,
787
+ defaultValue: label,
788
+ disabled: disabled || readonlyAsDisabled && readonly,
789
+ id: "" + id,
790
+ name: "" + id,
791
+ onBlur: !readonly ? handleBlur : undefined,
792
+ style: wrapperStyle,
793
+ type: 'text'
794
+ })
795
+ })
796
+ }), jsx(Grid.Column, {
797
+ className: 'form-additional',
798
+ verticalAlign: 'middle',
799
+ children: children
800
+ }), jsx(Grid.Column, {
801
+ children: jsx(RemoveButton, {
802
+ iconType: 'mini',
803
+ className: 'array-item-remove',
804
+ disabled: disabled || readonly,
805
+ onClick: onDropPropertyClick(label),
806
+ uiSchema: uiSchema,
807
+ registry: registry
808
+ })
809
+ })]
810
+ })
811
+ })
812
+ }, id + "-key");
753
813
  }
754
814
 
755
815
  function generateTemplates() {
@@ -759,6 +819,7 @@ function generateTemplates() {
759
819
  BaseInputTemplate: BaseInputTemplate,
760
820
  ButtonTemplates: {
761
821
  AddButton: AddButton,
822
+ CopyButton: CopyButton,
762
823
  MoveDownButton: MoveDownButton,
763
824
  MoveUpButton: MoveUpButton,
764
825
  RemoveButton: RemoveButton,
@@ -802,7 +863,7 @@ function CheckboxWidget(props) {
802
863
  formContext: formContext,
803
864
  uiSchema: uiSchema,
804
865
  defaultSchemaProps: {
805
- inverted: false
866
+ inverted: 'false'
806
867
  }
807
868
  });
808
869
  // Because an unchecked checkbox will cause html5 validation to fail, only add
@@ -818,20 +879,20 @@ function CheckboxWidget(props) {
818
879
  var _onFocus = function _onFocus() {
819
880
  return onFocus && onFocus(id, value);
820
881
  };
821
- var checked = value == "true" || value == true;
822
- return /*#__PURE__*/React.createElement(Form.Checkbox, _extends({
882
+ var checked = value == 'true' || value == true;
883
+ return jsx(Form.Checkbox, _extends({
823
884
  id: id,
824
885
  name: id,
825
886
  disabled: disabled || readonly,
826
887
  autoFocus: autofocus
827
888
  }, semanticProps, {
828
- checked: typeof value === "undefined" ? false : checked,
889
+ checked: typeof value === 'undefined' ? false : checked,
829
890
  error: rawErrors.length > 0,
830
891
  onChange: _onChange,
831
892
  onBlur: _onBlur,
832
893
  onFocus: _onFocus,
833
894
  required: required,
834
- label: label || "",
895
+ label: label || '',
835
896
  "aria-describedby": ariaDescribedByIds(id)
836
897
  }));
837
898
  }
@@ -857,7 +918,7 @@ function CheckboxesWidget(props) {
857
918
  _props$rawErrors = props.rawErrors,
858
919
  rawErrors = _props$rawErrors === void 0 ? [] : _props$rawErrors,
859
920
  registry = props.registry;
860
- var TitleFieldTemplate = getTemplate("TitleFieldTemplate", registry, options);
921
+ var TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, options);
861
922
  var enumOptions = options.enumOptions,
862
923
  enumDisabled = options.enumDisabled,
863
924
  inline = options.inline;
@@ -868,7 +929,7 @@ function CheckboxesWidget(props) {
868
929
  formContext: formContext,
869
930
  uiSchema: uiSchema,
870
931
  defaultSchemaProps: {
871
- inverted: false
932
+ inverted: 'false'
872
933
  }
873
934
  });
874
935
  var _onChange = function _onChange(index) {
@@ -893,34 +954,37 @@ function CheckboxesWidget(props) {
893
954
  } : {
894
955
  grouped: true
895
956
  };
896
- return /*#__PURE__*/React.createElement(React.Fragment, null, title && /*#__PURE__*/React.createElement(TitleFieldTemplate, {
897
- id: titleId(id),
898
- title: title,
899
- schema: schema,
900
- uiSchema: uiSchema,
901
- registry: registry
902
- }), /*#__PURE__*/React.createElement(Form.Group, _extends({
903
- id: id,
904
- name: id
905
- }, inlineOption), Array.isArray(enumOptions) && enumOptions.map(function (option, index) {
906
- var checked = enumOptionsIsSelected(option.value, checkboxesValues);
907
- var itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
908
- return /*#__PURE__*/React.createElement(Form.Checkbox, _extends({
909
- id: optionId(id, index),
910
- name: id,
911
- key: index,
912
- label: option.label
913
- }, semanticProps, {
914
- checked: checked,
915
- error: rawErrors.length > 0,
916
- disabled: disabled || itemDisabled || readonly,
917
- autoFocus: autofocus && index === 0,
918
- onChange: _onChange(index),
919
- onBlur: _onBlur,
920
- onFocus: _onFocus,
921
- "aria-describedby": ariaDescribedByIds(id)
922
- }));
923
- })));
957
+ return jsxs(Fragment, {
958
+ children: [title && jsx(TitleFieldTemplate, {
959
+ id: titleId(id),
960
+ title: title,
961
+ schema: schema,
962
+ uiSchema: uiSchema,
963
+ registry: registry
964
+ }), jsx(Form.Group, _extends({
965
+ id: id,
966
+ name: id
967
+ }, inlineOption, {
968
+ children: Array.isArray(enumOptions) && enumOptions.map(function (option, index) {
969
+ var checked = enumOptionsIsSelected(option.value, checkboxesValues);
970
+ var itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
971
+ return jsx(Form.Checkbox, _extends({
972
+ id: optionId(id, index),
973
+ name: id,
974
+ label: option.label
975
+ }, semanticProps, {
976
+ checked: checked,
977
+ error: rawErrors.length > 0,
978
+ disabled: disabled || itemDisabled || readonly,
979
+ autoFocus: autofocus && index === 0,
980
+ onChange: _onChange(index),
981
+ onBlur: _onBlur,
982
+ onFocus: _onFocus,
983
+ "aria-describedby": ariaDescribedByIds(id)
984
+ }), index);
985
+ })
986
+ }))]
987
+ });
924
988
  }
925
989
 
926
990
  /** The `RadioWidget` is a widget for rendering a radio group.
@@ -965,26 +1029,28 @@ function RadioWidget(props) {
965
1029
  } : {
966
1030
  grouped: true
967
1031
  };
968
- return /*#__PURE__*/React.createElement(Form.Group, _extends({}, inlineOption), Array.isArray(enumOptions) && enumOptions.map(function (option, index) {
969
- var checked = enumOptionsIsSelected(option.value, value);
970
- var itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
971
- return /*#__PURE__*/React.createElement(Form.Field, _extends({
972
- required: required,
973
- control: Radio,
974
- id: optionId(id, index),
975
- name: id
976
- }, semanticProps, {
977
- onFocus: _onFocus,
978
- onBlur: _onBlur,
979
- onChange: _onChange,
980
- label: option.label,
981
- value: String(index),
982
- error: rawErrors.length > 0,
983
- key: index,
984
- checked: checked,
985
- disabled: disabled || itemDisabled || readonly,
986
- "aria-describedby": ariaDescribedByIds(id)
987
- }));
1032
+ return jsx(Form.Group, _extends({}, inlineOption, {
1033
+ children: Array.isArray(enumOptions) && enumOptions.map(function (option, index) {
1034
+ var checked = enumOptionsIsSelected(option.value, value);
1035
+ var itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
1036
+ return /*#__PURE__*/createElement(Form.Field, _extends({
1037
+ required: required,
1038
+ control: Radio,
1039
+ id: optionId(id, index),
1040
+ name: id
1041
+ }, semanticProps, {
1042
+ onFocus: _onFocus,
1043
+ onBlur: _onBlur,
1044
+ onChange: _onChange,
1045
+ label: option.label,
1046
+ value: String(index),
1047
+ error: rawErrors.length > 0,
1048
+ key: index,
1049
+ checked: checked,
1050
+ disabled: disabled || itemDisabled || readonly,
1051
+ "aria-describedby": ariaDescribedByIds(id)
1052
+ }));
1053
+ })
988
1054
  }));
989
1055
  }
990
1056
 
@@ -1019,7 +1085,7 @@ function RangeWidget(props) {
1019
1085
  // eslint-disable-next-line no-shadow
1020
1086
  var _onChange = function _onChange(_ref) {
1021
1087
  var value = _ref.target.value;
1022
- return onChange && onChange(value === "" ? options.emptyValue : value);
1088
+ return onChange && onChange(value === '' ? options.emptyValue : value);
1023
1089
  };
1024
1090
  var _onBlur = function _onBlur() {
1025
1091
  return onBlur && onBlur(id, value);
@@ -1027,21 +1093,24 @@ function RangeWidget(props) {
1027
1093
  var _onFocus = function _onFocus() {
1028
1094
  return onFocus && onFocus(id, value);
1029
1095
  };
1030
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Input, _extends({
1031
- id: id,
1032
- key: id,
1033
- name: id,
1034
- type: "range",
1035
- required: required,
1036
- disabled: disabled || readonly
1037
- }, rangeSpec(schema), semanticProps, {
1038
- value: value || "",
1039
- error: rawErrors.length > 0,
1040
- onChange: _onChange,
1041
- onBlur: _onBlur,
1042
- onFocus: _onFocus,
1043
- "aria-describedby": ariaDescribedByIds(id)
1044
- })), /*#__PURE__*/React.createElement("span", null, value));
1096
+ return jsxs(Fragment, {
1097
+ children: [jsx(Input, _extends({
1098
+ id: id,
1099
+ name: id,
1100
+ type: 'range',
1101
+ required: required,
1102
+ disabled: disabled || readonly
1103
+ }, rangeSpec(schema), semanticProps, {
1104
+ value: value || '',
1105
+ error: rawErrors.length > 0,
1106
+ onChange: _onChange,
1107
+ onBlur: _onBlur,
1108
+ onFocus: _onFocus,
1109
+ "aria-describedby": ariaDescribedByIds(id)
1110
+ }), id), jsx("span", {
1111
+ children: value
1112
+ })]
1113
+ });
1045
1114
  }
1046
1115
 
1047
1116
  /**
@@ -1093,7 +1162,7 @@ function SelectWidget(props) {
1093
1162
  formContext: formContext,
1094
1163
  options: options,
1095
1164
  defaultSchemaProps: {
1096
- inverted: "false",
1165
+ inverted: 'false',
1097
1166
  selection: true,
1098
1167
  fluid: true,
1099
1168
  scrolling: true,
@@ -1103,7 +1172,7 @@ function SelectWidget(props) {
1103
1172
  var enumDisabled = options.enumDisabled,
1104
1173
  enumOptions = options.enumOptions,
1105
1174
  optEmptyVal = options.emptyValue;
1106
- var emptyValue = multiple ? [] : "";
1175
+ var emptyValue = multiple ? [] : '';
1107
1176
  var dropdownOptions = createDefaultValueOptionsForDropDown(enumOptions, enumDisabled);
1108
1177
  var _onChange = function _onChange(_, _ref2) {
1109
1178
  var value = _ref2.value;
@@ -1119,13 +1188,12 @@ function SelectWidget(props) {
1119
1188
  return onFocus(id, enumOptionsValueForIndex(value, enumOptions, optEmptyVal));
1120
1189
  };
1121
1190
  var selectedIndexes = enumOptionsIndexForValue(value, enumOptions, multiple);
1122
- return /*#__PURE__*/React.createElement(Form.Dropdown, _extends({
1123
- key: id,
1191
+ return jsx(Form.Dropdown, _extends({
1124
1192
  id: id,
1125
1193
  name: id,
1126
1194
  label: label || schema.title,
1127
- multiple: typeof multiple === "undefined" ? false : multiple,
1128
- value: typeof value === "undefined" ? emptyValue : selectedIndexes,
1195
+ multiple: typeof multiple === 'undefined' ? false : multiple,
1196
+ value: typeof value === 'undefined' ? emptyValue : selectedIndexes,
1129
1197
  error: rawErrors.length > 0,
1130
1198
  disabled: disabled,
1131
1199
  placeholder: placeholder
@@ -1138,7 +1206,7 @@ function SelectWidget(props) {
1138
1206
  onBlur: _onBlur,
1139
1207
  onFocus: _onFocus,
1140
1208
  "aria-describedby": ariaDescribedByIds(id)
1141
- }));
1209
+ }), id);
1142
1210
  }
1143
1211
 
1144
1212
  /** The `TextareaWidget` is a widget for rendering input fields as textarea.
@@ -1168,14 +1236,14 @@ function TextareaWidget(props) {
1168
1236
  formContext: formContext,
1169
1237
  options: options,
1170
1238
  defaultSchemaProps: {
1171
- inverted: false
1239
+ inverted: 'false'
1172
1240
  }
1173
1241
  });
1174
1242
  var schemaUtils = registry.schemaUtils;
1175
1243
  // eslint-disable-next-line no-shadow
1176
1244
  var _onChange = function _onChange(_ref) {
1177
1245
  var value = _ref.target.value;
1178
- return onChange && onChange(value === "" ? options.emptyValue : value);
1246
+ return onChange && onChange(value === '' ? options.emptyValue : value);
1179
1247
  };
1180
1248
  var _onBlur = function _onBlur() {
1181
1249
  return onBlur && onBlur(id, value);
@@ -1184,9 +1252,8 @@ function TextareaWidget(props) {
1184
1252
  return onFocus && onFocus(id, value);
1185
1253
  };
1186
1254
  var displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);
1187
- return /*#__PURE__*/React.createElement(Form.TextArea, _extends({
1255
+ return jsx(Form.TextArea, _extends({
1188
1256
  id: id,
1189
- key: id,
1190
1257
  name: id,
1191
1258
  label: displayLabel ? label || schema.title : false,
1192
1259
  placeholder: placeholder,
@@ -1194,14 +1261,14 @@ function TextareaWidget(props) {
1194
1261
  required: required,
1195
1262
  disabled: disabled || readonly
1196
1263
  }, semanticProps, {
1197
- value: value || "",
1264
+ value: value || '',
1198
1265
  error: rawErrors.length > 0,
1199
1266
  rows: options.rows || 5,
1200
1267
  onChange: _onChange,
1201
1268
  onBlur: _onBlur,
1202
1269
  onFocus: _onFocus,
1203
1270
  "aria-describedby": ariaDescribedByIds(id)
1204
- }));
1271
+ }), id);
1205
1272
  }
1206
1273
 
1207
1274
  function generateWidgets() {