@rjsf/semantic-ui 5.2.0 → 5.2.1
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.
- package/LICENSE.md +183 -183
- package/README.md +15 -12
- package/dist/semantic-ui.cjs.development.js +383 -335
- package/dist/semantic-ui.cjs.development.js.map +1 -1
- package/dist/semantic-ui.cjs.production.min.js +1 -1
- package/dist/semantic-ui.cjs.production.min.js.map +1 -1
- package/dist/semantic-ui.esm.js +383 -334
- package/dist/semantic-ui.esm.js.map +1 -1
- package/dist/semantic-ui.umd.development.js +385 -338
- package/dist/semantic-ui.umd.development.js.map +1 -1
- package/dist/semantic-ui.umd.production.min.js +1 -1
- package/dist/semantic-ui.umd.production.min.js.map +1 -1
- package/package.json +5 -5
package/dist/semantic-ui.esm.js
CHANGED
|
@@ -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
|
|
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
|
|
44
|
+
return jsx(Button, _extends({
|
|
44
45
|
title: translateString(TranslatableString.AddItemButton),
|
|
45
46
|
color: color
|
|
46
47
|
}, props, {
|
|
47
48
|
icon: true,
|
|
48
|
-
size:
|
|
49
|
-
|
|
50
|
-
|
|
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:
|
|
105
|
-
pointing:
|
|
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,14 +147,14 @@ 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 ?
|
|
150
|
+
Component = _ref3$component === void 0 ? 'div' : _ref3$component,
|
|
149
151
|
props = _objectWithoutPropertiesLoose(_ref3, _excluded$3);
|
|
150
|
-
return wrap ?
|
|
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:
|
|
157
|
+
display: 'grid',
|
|
156
158
|
gridTemplateColumns: "1fr " + (vertical ? 65 : 110) + "px"
|
|
157
159
|
};
|
|
158
160
|
};
|
|
@@ -184,40 +186,47 @@ function ArrayFieldItemTemplate(props) {
|
|
|
184
186
|
horizontalButtons = _uiOptions$semantic$h === void 0 ? false : _uiOptions$semantic$h,
|
|
185
187
|
_uiOptions$semantic$w = _uiOptions$semantic.wrapItem,
|
|
186
188
|
wrapItem = _uiOptions$semantic$w === void 0 ? false : _uiOptions$semantic$w;
|
|
187
|
-
return
|
|
188
|
-
className:
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
189
|
+
return jsx("div", {
|
|
190
|
+
className: 'array-item',
|
|
191
|
+
children: jsx(MaybeWrap, {
|
|
192
|
+
wrap: wrapItem,
|
|
193
|
+
component: Segment,
|
|
194
|
+
children: jsxs(Grid, {
|
|
195
|
+
style: index !== 0 ? _extends({}, gridStyle(!horizontalButtons), {
|
|
196
|
+
alignItems: 'center'
|
|
197
|
+
}) : gridStyle(!horizontalButtons),
|
|
198
|
+
children: [jsx(Grid.Column, {
|
|
199
|
+
width: 16,
|
|
200
|
+
verticalAlign: 'middle',
|
|
201
|
+
children: children
|
|
202
|
+
}), hasToolbar && jsx(Grid.Column, {
|
|
203
|
+
children: (hasMoveUp || hasMoveDown || hasRemove) && jsxs(Button.Group, {
|
|
204
|
+
size: 'mini',
|
|
205
|
+
vertical: !horizontalButtons,
|
|
206
|
+
children: [(hasMoveUp || hasMoveDown) && jsx(MoveUpButton, {
|
|
207
|
+
className: 'array-item-move-up',
|
|
208
|
+
disabled: disabled || readonly || !hasMoveUp,
|
|
209
|
+
onClick: onReorderClick(index, index - 1),
|
|
210
|
+
uiSchema: uiSchema,
|
|
211
|
+
registry: registry
|
|
212
|
+
}), (hasMoveUp || hasMoveDown) && jsx(MoveDownButton, {
|
|
213
|
+
className: 'array-item-move-down',
|
|
214
|
+
disabled: disabled || readonly || !hasMoveDown,
|
|
215
|
+
onClick: onReorderClick(index, index + 1),
|
|
216
|
+
uiSchema: uiSchema,
|
|
217
|
+
registry: registry
|
|
218
|
+
}), hasRemove && jsx(RemoveButton, {
|
|
219
|
+
className: 'array-item-remove',
|
|
220
|
+
disabled: disabled || readonly,
|
|
221
|
+
onClick: onDropIndexClick(index),
|
|
222
|
+
uiSchema: uiSchema,
|
|
223
|
+
registry: registry
|
|
224
|
+
})]
|
|
225
|
+
})
|
|
226
|
+
})]
|
|
227
|
+
})
|
|
228
|
+
})
|
|
229
|
+
});
|
|
221
230
|
}
|
|
222
231
|
|
|
223
232
|
var _excluded$2 = ["key", "uiSchema"];
|
|
@@ -254,57 +263,58 @@ function ArrayFieldTemplate(props) {
|
|
|
254
263
|
wrapItem: wrapItem
|
|
255
264
|
};
|
|
256
265
|
var uiOptions = getUiOptions(uiSchema);
|
|
257
|
-
var ArrayFieldDescriptionTemplate = getTemplate(
|
|
258
|
-
var ArrayFieldItemTemplate = getTemplate(
|
|
259
|
-
var ArrayFieldTitleTemplate = getTemplate(
|
|
266
|
+
var ArrayFieldDescriptionTemplate = getTemplate('ArrayFieldDescriptionTemplate', registry, uiOptions);
|
|
267
|
+
var ArrayFieldItemTemplate = getTemplate('ArrayFieldItemTemplate', registry, uiOptions);
|
|
268
|
+
var ArrayFieldTitleTemplate = getTemplate('ArrayFieldTitleTemplate', registry, uiOptions);
|
|
260
269
|
// Button templates are not overridden in the uiSchema
|
|
261
270
|
var AddButton = registry.templates.ButtonTemplates.AddButton;
|
|
262
|
-
return
|
|
263
|
-
className: cleanClassNames([className, isFixedItems(schema) ?
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
271
|
+
return jsxs("div", {
|
|
272
|
+
className: cleanClassNames([className, isFixedItems(schema) ? '' : 'sortable-form-fields']),
|
|
273
|
+
children: [jsx(ArrayFieldTitleTemplate, {
|
|
274
|
+
idSchema: idSchema,
|
|
275
|
+
title: uiOptions.title || title,
|
|
276
|
+
schema: schema,
|
|
277
|
+
uiSchema: uiSchema,
|
|
278
|
+
required: required,
|
|
279
|
+
registry: registry
|
|
280
|
+
}), jsx(ArrayFieldDescriptionTemplate, {
|
|
281
|
+
idSchema: idSchema,
|
|
282
|
+
description: uiOptions.description || schema.description,
|
|
283
|
+
schema: schema,
|
|
284
|
+
uiSchema: uiSchema,
|
|
285
|
+
registry: registry
|
|
286
|
+
}), jsxs("div", {
|
|
287
|
+
children: [jsx("div", {
|
|
288
|
+
className: 'row array-item-list',
|
|
289
|
+
children: items && items.map(function (_ref) {
|
|
290
|
+
var _extends2;
|
|
291
|
+
var key = _ref.key,
|
|
292
|
+
_ref$uiSchema = _ref.uiSchema,
|
|
293
|
+
itemUiSchema = _ref$uiSchema === void 0 ? {} : _ref$uiSchema,
|
|
294
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$2);
|
|
295
|
+
// Merge in the semantic props from the ArrayFieldTemplate into each of the items
|
|
296
|
+
var mergedUiSchema = _extends({}, itemUiSchema, (_extends2 = {}, _extends2[UI_OPTIONS_KEY] = _extends({}, itemUiSchema[UI_OPTIONS_KEY], {
|
|
297
|
+
semantic: semantic
|
|
298
|
+
}), _extends2));
|
|
299
|
+
return jsx(ArrayFieldItemTemplate, _extends({}, props, {
|
|
300
|
+
uiSchema: mergedUiSchema
|
|
301
|
+
}), key);
|
|
302
|
+
})
|
|
303
|
+
}), canAdd && jsx("div", {
|
|
304
|
+
style: {
|
|
305
|
+
marginTop: '1rem',
|
|
306
|
+
position: 'relative',
|
|
307
|
+
textAlign: 'right'
|
|
308
|
+
},
|
|
309
|
+
children: jsx(AddButton, {
|
|
310
|
+
onClick: onAddClick,
|
|
311
|
+
disabled: disabled || readonly,
|
|
312
|
+
uiSchema: uiSchema,
|
|
313
|
+
registry: registry
|
|
314
|
+
})
|
|
315
|
+
})]
|
|
316
|
+
}, "array-item-list-" + idSchema.$id)]
|
|
317
|
+
});
|
|
308
318
|
}
|
|
309
319
|
|
|
310
320
|
/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.
|
|
@@ -322,6 +332,7 @@ function BaseInputTemplate(props) {
|
|
|
322
332
|
readonly = props.readonly,
|
|
323
333
|
disabled = props.disabled,
|
|
324
334
|
onChange = props.onChange,
|
|
335
|
+
onChangeOverride = props.onChangeOverride,
|
|
325
336
|
onBlur = props.onBlur,
|
|
326
337
|
onFocus = props.onFocus,
|
|
327
338
|
autofocus = props.autofocus,
|
|
@@ -342,7 +353,7 @@ function BaseInputTemplate(props) {
|
|
|
342
353
|
var schemaUtils = registry.schemaUtils;
|
|
343
354
|
var _onChange = function _onChange(_ref) {
|
|
344
355
|
var value = _ref.target.value;
|
|
345
|
-
return onChange(value ===
|
|
356
|
+
return onChange(value === '' ? options.emptyValue : value);
|
|
346
357
|
};
|
|
347
358
|
var _onBlur = function _onBlur() {
|
|
348
359
|
return onBlur && onBlur(id, value);
|
|
@@ -351,32 +362,33 @@ function BaseInputTemplate(props) {
|
|
|
351
362
|
return onFocus && onFocus(id, value);
|
|
352
363
|
};
|
|
353
364
|
var displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);
|
|
354
|
-
return
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
365
|
+
return jsxs(Fragment, {
|
|
366
|
+
children: [jsx(Form.Input, _extends({
|
|
367
|
+
id: id,
|
|
368
|
+
name: id,
|
|
369
|
+
placeholder: placeholder
|
|
370
|
+
}, inputProps, {
|
|
371
|
+
label: displayLabel ? label || schema.title : false,
|
|
372
|
+
required: required,
|
|
373
|
+
autoFocus: autofocus,
|
|
374
|
+
disabled: disabled || readonly,
|
|
375
|
+
list: schema.examples ? examplesId(id) : undefined
|
|
376
|
+
}, semanticProps, {
|
|
377
|
+
value: value || value === 0 ? value : '',
|
|
378
|
+
error: rawErrors.length > 0,
|
|
379
|
+
onChange: onChangeOverride || _onChange,
|
|
380
|
+
onBlur: _onBlur,
|
|
381
|
+
onFocus: _onFocus,
|
|
382
|
+
"aria-describedby": ariaDescribedByIds(id, !!schema.examples)
|
|
383
|
+
}), id), Array.isArray(schema.examples) && jsx("datalist", {
|
|
384
|
+
id: examplesId(id),
|
|
385
|
+
children: schema.examples.concat(schema["default"] && !schema.examples.includes(schema["default"]) ? [schema["default"]] : []).map(function (example) {
|
|
386
|
+
return jsx("option", {
|
|
387
|
+
value: example
|
|
388
|
+
}, example);
|
|
389
|
+
})
|
|
390
|
+
})]
|
|
391
|
+
});
|
|
380
392
|
}
|
|
381
393
|
|
|
382
394
|
/** The `DescriptionField` is the template to use to render the description of a field
|
|
@@ -389,10 +401,11 @@ function DescriptionField(props) {
|
|
|
389
401
|
if (!description) {
|
|
390
402
|
return null;
|
|
391
403
|
}
|
|
392
|
-
return
|
|
404
|
+
return jsx("p", {
|
|
393
405
|
id: id,
|
|
394
|
-
className:
|
|
395
|
-
|
|
406
|
+
className: 'sui-description',
|
|
407
|
+
children: description
|
|
408
|
+
});
|
|
396
409
|
}
|
|
397
410
|
|
|
398
411
|
/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`
|
|
@@ -403,13 +416,18 @@ function ErrorList(_ref) {
|
|
|
403
416
|
var errors = _ref.errors,
|
|
404
417
|
registry = _ref.registry;
|
|
405
418
|
var translateString = registry.translateString;
|
|
406
|
-
return
|
|
407
|
-
negative: true
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
419
|
+
return jsxs(Message, {
|
|
420
|
+
negative: true,
|
|
421
|
+
children: [jsx(Message.Header, {
|
|
422
|
+
children: translateString(TranslatableString.ErrorsLabel)
|
|
423
|
+
}), jsx(Message.List, {
|
|
424
|
+
children: errors.map(function (error, index) {
|
|
425
|
+
return jsx(Message.Item, {
|
|
426
|
+
children: error.stack
|
|
427
|
+
}, "error-" + index);
|
|
428
|
+
})
|
|
429
|
+
})]
|
|
430
|
+
});
|
|
413
431
|
}
|
|
414
432
|
|
|
415
433
|
var _excluded$1 = ["icon", "iconType", "color", "className", "uiSchema", "registry"];
|
|
@@ -419,7 +437,7 @@ function IconButton(props) {
|
|
|
419
437
|
color = props.color,
|
|
420
438
|
className = props.className,
|
|
421
439
|
otherProps = _objectWithoutPropertiesLoose(props, _excluded$1);
|
|
422
|
-
return
|
|
440
|
+
return jsx(Button, _extends({
|
|
423
441
|
icon: icon,
|
|
424
442
|
size: iconType,
|
|
425
443
|
color: color,
|
|
@@ -428,33 +446,33 @@ function IconButton(props) {
|
|
|
428
446
|
}
|
|
429
447
|
function MoveDownButton(props) {
|
|
430
448
|
var translateString = props.registry.translateString;
|
|
431
|
-
return
|
|
449
|
+
return jsx(IconButton, _extends({
|
|
432
450
|
title: translateString(TranslatableString.MoveDownButton)
|
|
433
451
|
}, props, {
|
|
434
|
-
icon:
|
|
452
|
+
icon: 'angle down'
|
|
435
453
|
}));
|
|
436
454
|
}
|
|
437
455
|
function MoveUpButton(props) {
|
|
438
456
|
var translateString = props.registry.translateString;
|
|
439
|
-
return
|
|
457
|
+
return jsx(IconButton, _extends({
|
|
440
458
|
title: translateString(TranslatableString.MoveUpButton)
|
|
441
459
|
}, props, {
|
|
442
|
-
icon:
|
|
460
|
+
icon: 'angle up'
|
|
443
461
|
}));
|
|
444
462
|
}
|
|
445
463
|
function RemoveButton(props) {
|
|
446
464
|
var translateString = props.registry.translateString;
|
|
447
|
-
return
|
|
465
|
+
return jsx(IconButton, _extends({
|
|
448
466
|
title: translateString(TranslatableString.RemoveButton)
|
|
449
467
|
}, props, {
|
|
450
|
-
icon:
|
|
468
|
+
icon: 'trash'
|
|
451
469
|
}));
|
|
452
470
|
}
|
|
453
471
|
|
|
454
472
|
var DEFAULT_OPTIONS$1 = {
|
|
455
473
|
options: {
|
|
456
|
-
pointing:
|
|
457
|
-
size:
|
|
474
|
+
pointing: 'above',
|
|
475
|
+
size: 'small'
|
|
458
476
|
}
|
|
459
477
|
};
|
|
460
478
|
/** The `FieldErrorTemplate` component renders the errors local to the particular field
|
|
@@ -476,19 +494,21 @@ function FieldErrorTemplate(_ref) {
|
|
|
476
494
|
size = options.size;
|
|
477
495
|
if (errors && errors.length > 0) {
|
|
478
496
|
var id = errorId(idSchema);
|
|
479
|
-
return
|
|
497
|
+
return jsx(Label, {
|
|
480
498
|
id: id,
|
|
481
|
-
color:
|
|
482
|
-
pointing: pointing ||
|
|
483
|
-
size: size ||
|
|
484
|
-
basic: true
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
499
|
+
color: 'red',
|
|
500
|
+
pointing: pointing || 'above',
|
|
501
|
+
size: size || 'small',
|
|
502
|
+
basic: true,
|
|
503
|
+
children: jsx(List, {
|
|
504
|
+
bulleted: true,
|
|
505
|
+
children: errors.map(function (error) {
|
|
506
|
+
return jsx(List.Item, {
|
|
507
|
+
children: error
|
|
508
|
+
}, nanoid());
|
|
509
|
+
})
|
|
510
|
+
})
|
|
511
|
+
});
|
|
492
512
|
}
|
|
493
513
|
return null;
|
|
494
514
|
}
|
|
@@ -502,8 +522,8 @@ function FieldHelpTemplate(props) {
|
|
|
502
522
|
help = props.help;
|
|
503
523
|
if (help) {
|
|
504
524
|
var id = helpId(idSchema);
|
|
505
|
-
return
|
|
506
|
-
size:
|
|
525
|
+
return jsx(Message, {
|
|
526
|
+
size: 'mini',
|
|
507
527
|
info: true,
|
|
508
528
|
id: id,
|
|
509
529
|
content: help
|
|
@@ -537,16 +557,17 @@ function FieldTemplate(props) {
|
|
|
537
557
|
var wrapLabel = semanticProps.wrapLabel,
|
|
538
558
|
wrapContent = semanticProps.wrapContent;
|
|
539
559
|
var uiOptions = getUiOptions(uiSchema);
|
|
540
|
-
var WrapIfAdditionalTemplate = getTemplate(
|
|
541
|
-
var DescriptionFieldTemplate = getTemplate(
|
|
560
|
+
var WrapIfAdditionalTemplate = getTemplate('WrapIfAdditionalTemplate', registry, uiOptions);
|
|
561
|
+
var DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, uiOptions);
|
|
542
562
|
if (hidden) {
|
|
543
|
-
return
|
|
563
|
+
return jsx("div", {
|
|
544
564
|
style: {
|
|
545
|
-
display:
|
|
546
|
-
}
|
|
547
|
-
|
|
565
|
+
display: 'none'
|
|
566
|
+
},
|
|
567
|
+
children: children
|
|
568
|
+
});
|
|
548
569
|
}
|
|
549
|
-
return
|
|
570
|
+
return jsx(WrapIfAdditionalTemplate, _extends({
|
|
550
571
|
classNames: classNames,
|
|
551
572
|
style: style,
|
|
552
573
|
id: id,
|
|
@@ -554,23 +575,27 @@ function FieldTemplate(props) {
|
|
|
554
575
|
registry: registry,
|
|
555
576
|
schema: schema,
|
|
556
577
|
uiSchema: uiSchema
|
|
557
|
-
}, otherProps
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
578
|
+
}, otherProps, {
|
|
579
|
+
children: jsx(Form.Group, {
|
|
580
|
+
widths: 'equal',
|
|
581
|
+
grouped: true,
|
|
582
|
+
children: jsxs(MaybeWrap, {
|
|
583
|
+
wrap: wrapContent,
|
|
584
|
+
className: 'sui-field-content',
|
|
585
|
+
children: [children, displayLabel && rawDescription && jsx(MaybeWrap, {
|
|
586
|
+
wrap: wrapLabel,
|
|
587
|
+
className: 'sui-field-label',
|
|
588
|
+
children: rawDescription && jsx(DescriptionFieldTemplate, {
|
|
589
|
+
id: descriptionId(id),
|
|
590
|
+
description: rawDescription,
|
|
591
|
+
schema: schema,
|
|
592
|
+
uiSchema: uiSchema,
|
|
593
|
+
registry: registry
|
|
594
|
+
})
|
|
595
|
+
}), help, errors]
|
|
596
|
+
})
|
|
597
|
+
}, id)
|
|
598
|
+
}));
|
|
574
599
|
}
|
|
575
600
|
|
|
576
601
|
/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the
|
|
@@ -593,42 +618,48 @@ function ObjectFieldTemplate(props) {
|
|
|
593
618
|
idSchema = props.idSchema,
|
|
594
619
|
registry = props.registry;
|
|
595
620
|
var uiOptions = getUiOptions(uiSchema);
|
|
596
|
-
var TitleFieldTemplate = getTemplate(
|
|
597
|
-
var DescriptionFieldTemplate = getTemplate(
|
|
621
|
+
var TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, uiOptions);
|
|
622
|
+
var DescriptionFieldTemplate = getTemplate('DescriptionFieldTemplate', registry, uiOptions);
|
|
598
623
|
// Button templates are not overridden in the uiSchema
|
|
599
624
|
var AddButton = registry.templates.ButtonTemplates.AddButton;
|
|
600
625
|
var fieldTitle = uiOptions.title || title;
|
|
601
626
|
var fieldDescription = uiOptions.description || description;
|
|
602
|
-
return
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
627
|
+
return jsxs(Fragment, {
|
|
628
|
+
children: [fieldTitle && jsx(TitleFieldTemplate, {
|
|
629
|
+
id: titleId(idSchema),
|
|
630
|
+
title: fieldTitle,
|
|
631
|
+
required: required,
|
|
632
|
+
schema: schema,
|
|
633
|
+
uiSchema: uiSchema,
|
|
634
|
+
registry: registry
|
|
635
|
+
}), fieldDescription && jsx(DescriptionFieldTemplate, {
|
|
636
|
+
id: descriptionId(idSchema),
|
|
637
|
+
description: fieldDescription,
|
|
638
|
+
schema: schema,
|
|
639
|
+
uiSchema: uiSchema,
|
|
640
|
+
registry: registry
|
|
641
|
+
}), properties.map(function (prop) {
|
|
642
|
+
return prop.content;
|
|
643
|
+
}), canExpand(schema, uiSchema, formData) && jsx(Grid.Column, {
|
|
644
|
+
width: 16,
|
|
645
|
+
verticalAlign: 'middle',
|
|
646
|
+
children: jsx(Grid.Row, {
|
|
647
|
+
children: jsx("div", {
|
|
648
|
+
style: {
|
|
649
|
+
marginTop: '1rem',
|
|
650
|
+
position: 'relative',
|
|
651
|
+
textAlign: 'right'
|
|
652
|
+
},
|
|
653
|
+
children: jsx(AddButton, {
|
|
654
|
+
onClick: onAddClick(schema),
|
|
655
|
+
disabled: disabled || readonly,
|
|
656
|
+
uiSchema: uiSchema,
|
|
657
|
+
registry: registry
|
|
658
|
+
})
|
|
659
|
+
})
|
|
660
|
+
})
|
|
661
|
+
})]
|
|
662
|
+
});
|
|
632
663
|
}
|
|
633
664
|
|
|
634
665
|
/** The `SubmitButton` renders a button that represent the `Submit` action on a form
|
|
@@ -643,10 +674,12 @@ function SubmitButton(_ref) {
|
|
|
643
674
|
if (norender) {
|
|
644
675
|
return null;
|
|
645
676
|
}
|
|
646
|
-
return
|
|
647
|
-
type:
|
|
677
|
+
return jsx(Button, _extends({
|
|
678
|
+
type: 'submit',
|
|
648
679
|
primary: true
|
|
649
|
-
}, submitButtonProps
|
|
680
|
+
}, submitButtonProps, {
|
|
681
|
+
children: submitText
|
|
682
|
+
}));
|
|
650
683
|
}
|
|
651
684
|
|
|
652
685
|
var DEFAULT_OPTIONS = {
|
|
@@ -668,11 +701,12 @@ function TitleField(_ref) {
|
|
|
668
701
|
if (!title) {
|
|
669
702
|
return null;
|
|
670
703
|
}
|
|
671
|
-
return
|
|
704
|
+
return jsx(Header, _extends({
|
|
672
705
|
id: id
|
|
673
706
|
}, semanticProps, {
|
|
674
|
-
as:
|
|
675
|
-
|
|
707
|
+
as: 'h5',
|
|
708
|
+
children: title
|
|
709
|
+
}));
|
|
676
710
|
}
|
|
677
711
|
|
|
678
712
|
/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are
|
|
@@ -705,51 +739,60 @@ function WrapIfAdditionalTemplate(props) {
|
|
|
705
739
|
wrapperStyle = _registry$formContext.wrapperStyle;
|
|
706
740
|
var additional = (ADDITIONAL_PROPERTY_FLAG in schema);
|
|
707
741
|
if (!additional) {
|
|
708
|
-
return
|
|
742
|
+
return jsx("div", {
|
|
709
743
|
className: classNames,
|
|
710
|
-
style: style
|
|
711
|
-
|
|
744
|
+
style: style,
|
|
745
|
+
children: children
|
|
746
|
+
});
|
|
712
747
|
}
|
|
713
748
|
var handleBlur = function handleBlur(_ref) {
|
|
714
749
|
var target = _ref.target;
|
|
715
750
|
return onKeyChange(target.value);
|
|
716
751
|
};
|
|
717
|
-
return
|
|
752
|
+
return jsx("div", {
|
|
718
753
|
className: classNames,
|
|
719
754
|
style: style,
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
755
|
+
children: jsx(Grid, {
|
|
756
|
+
columns: 'equal',
|
|
757
|
+
children: jsxs(Grid.Row, {
|
|
758
|
+
children: [jsx(Grid.Column, {
|
|
759
|
+
className: 'form-additional',
|
|
760
|
+
children: jsx(Form.Group, {
|
|
761
|
+
widths: 'equal',
|
|
762
|
+
grouped: true,
|
|
763
|
+
children: jsx(Form.Input, {
|
|
764
|
+
className: 'form-group',
|
|
765
|
+
hasFeedback: true,
|
|
766
|
+
fluid: true,
|
|
767
|
+
htmlFor: "" + id,
|
|
768
|
+
label: keyLabel,
|
|
769
|
+
required: required,
|
|
770
|
+
defaultValue: label,
|
|
771
|
+
disabled: disabled || readonlyAsDisabled && readonly,
|
|
772
|
+
id: "" + id,
|
|
773
|
+
name: "" + id,
|
|
774
|
+
onBlur: !readonly ? handleBlur : undefined,
|
|
775
|
+
style: wrapperStyle,
|
|
776
|
+
type: 'text'
|
|
777
|
+
})
|
|
778
|
+
})
|
|
779
|
+
}), jsx(Grid.Column, {
|
|
780
|
+
className: 'form-additional',
|
|
781
|
+
verticalAlign: 'middle',
|
|
782
|
+
children: children
|
|
783
|
+
}), jsx(Grid.Column, {
|
|
784
|
+
children: jsx(RemoveButton, {
|
|
785
|
+
iconType: 'mini',
|
|
786
|
+
className: 'array-item-remove',
|
|
787
|
+
disabled: disabled || readonly,
|
|
788
|
+
onClick: onDropPropertyClick(label),
|
|
789
|
+
uiSchema: uiSchema,
|
|
790
|
+
registry: registry
|
|
791
|
+
})
|
|
792
|
+
})]
|
|
793
|
+
})
|
|
794
|
+
})
|
|
795
|
+
}, id + "-key");
|
|
753
796
|
}
|
|
754
797
|
|
|
755
798
|
function generateTemplates() {
|
|
@@ -818,20 +861,20 @@ function CheckboxWidget(props) {
|
|
|
818
861
|
var _onFocus = function _onFocus() {
|
|
819
862
|
return onFocus && onFocus(id, value);
|
|
820
863
|
};
|
|
821
|
-
var checked = value ==
|
|
822
|
-
return
|
|
864
|
+
var checked = value == 'true' || value == true;
|
|
865
|
+
return jsx(Form.Checkbox, _extends({
|
|
823
866
|
id: id,
|
|
824
867
|
name: id,
|
|
825
868
|
disabled: disabled || readonly,
|
|
826
869
|
autoFocus: autofocus
|
|
827
870
|
}, semanticProps, {
|
|
828
|
-
checked: typeof value ===
|
|
871
|
+
checked: typeof value === 'undefined' ? false : checked,
|
|
829
872
|
error: rawErrors.length > 0,
|
|
830
873
|
onChange: _onChange,
|
|
831
874
|
onBlur: _onBlur,
|
|
832
875
|
onFocus: _onFocus,
|
|
833
876
|
required: required,
|
|
834
|
-
label: label ||
|
|
877
|
+
label: label || '',
|
|
835
878
|
"aria-describedby": ariaDescribedByIds(id)
|
|
836
879
|
}));
|
|
837
880
|
}
|
|
@@ -857,7 +900,7 @@ function CheckboxesWidget(props) {
|
|
|
857
900
|
_props$rawErrors = props.rawErrors,
|
|
858
901
|
rawErrors = _props$rawErrors === void 0 ? [] : _props$rawErrors,
|
|
859
902
|
registry = props.registry;
|
|
860
|
-
var TitleFieldTemplate = getTemplate(
|
|
903
|
+
var TitleFieldTemplate = getTemplate('TitleFieldTemplate', registry, options);
|
|
861
904
|
var enumOptions = options.enumOptions,
|
|
862
905
|
enumDisabled = options.enumDisabled,
|
|
863
906
|
inline = options.inline;
|
|
@@ -893,34 +936,37 @@ function CheckboxesWidget(props) {
|
|
|
893
936
|
} : {
|
|
894
937
|
grouped: true
|
|
895
938
|
};
|
|
896
|
-
return
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
939
|
+
return jsxs(Fragment, {
|
|
940
|
+
children: [title && jsx(TitleFieldTemplate, {
|
|
941
|
+
id: titleId(id),
|
|
942
|
+
title: title,
|
|
943
|
+
schema: schema,
|
|
944
|
+
uiSchema: uiSchema,
|
|
945
|
+
registry: registry
|
|
946
|
+
}), jsx(Form.Group, _extends({
|
|
947
|
+
id: id,
|
|
948
|
+
name: id
|
|
949
|
+
}, inlineOption, {
|
|
950
|
+
children: Array.isArray(enumOptions) && enumOptions.map(function (option, index) {
|
|
951
|
+
var checked = enumOptionsIsSelected(option.value, checkboxesValues);
|
|
952
|
+
var itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
953
|
+
return jsx(Form.Checkbox, _extends({
|
|
954
|
+
id: optionId(id, index),
|
|
955
|
+
name: id,
|
|
956
|
+
label: option.label
|
|
957
|
+
}, semanticProps, {
|
|
958
|
+
checked: checked,
|
|
959
|
+
error: rawErrors.length > 0,
|
|
960
|
+
disabled: disabled || itemDisabled || readonly,
|
|
961
|
+
autoFocus: autofocus && index === 0,
|
|
962
|
+
onChange: _onChange(index),
|
|
963
|
+
onBlur: _onBlur,
|
|
964
|
+
onFocus: _onFocus,
|
|
965
|
+
"aria-describedby": ariaDescribedByIds(id)
|
|
966
|
+
}), index);
|
|
967
|
+
})
|
|
968
|
+
}))]
|
|
969
|
+
});
|
|
924
970
|
}
|
|
925
971
|
|
|
926
972
|
/** The `RadioWidget` is a widget for rendering a radio group.
|
|
@@ -965,26 +1011,28 @@ function RadioWidget(props) {
|
|
|
965
1011
|
} : {
|
|
966
1012
|
grouped: true
|
|
967
1013
|
};
|
|
968
|
-
return
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
1014
|
+
return jsx(Form.Group, _extends({}, inlineOption, {
|
|
1015
|
+
children: Array.isArray(enumOptions) && enumOptions.map(function (option, index) {
|
|
1016
|
+
var checked = enumOptionsIsSelected(option.value, value);
|
|
1017
|
+
var itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;
|
|
1018
|
+
return /*#__PURE__*/createElement(Form.Field, _extends({
|
|
1019
|
+
required: required,
|
|
1020
|
+
control: Radio,
|
|
1021
|
+
id: optionId(id, index),
|
|
1022
|
+
name: id
|
|
1023
|
+
}, semanticProps, {
|
|
1024
|
+
onFocus: _onFocus,
|
|
1025
|
+
onBlur: _onBlur,
|
|
1026
|
+
onChange: _onChange,
|
|
1027
|
+
label: option.label,
|
|
1028
|
+
value: String(index),
|
|
1029
|
+
error: rawErrors.length > 0,
|
|
1030
|
+
key: index,
|
|
1031
|
+
checked: checked,
|
|
1032
|
+
disabled: disabled || itemDisabled || readonly,
|
|
1033
|
+
"aria-describedby": ariaDescribedByIds(id)
|
|
1034
|
+
}));
|
|
1035
|
+
})
|
|
988
1036
|
}));
|
|
989
1037
|
}
|
|
990
1038
|
|
|
@@ -1019,7 +1067,7 @@ function RangeWidget(props) {
|
|
|
1019
1067
|
// eslint-disable-next-line no-shadow
|
|
1020
1068
|
var _onChange = function _onChange(_ref) {
|
|
1021
1069
|
var value = _ref.target.value;
|
|
1022
|
-
return onChange && onChange(value ===
|
|
1070
|
+
return onChange && onChange(value === '' ? options.emptyValue : value);
|
|
1023
1071
|
};
|
|
1024
1072
|
var _onBlur = function _onBlur() {
|
|
1025
1073
|
return onBlur && onBlur(id, value);
|
|
@@ -1027,21 +1075,24 @@ function RangeWidget(props) {
|
|
|
1027
1075
|
var _onFocus = function _onFocus() {
|
|
1028
1076
|
return onFocus && onFocus(id, value);
|
|
1029
1077
|
};
|
|
1030
|
-
return
|
|
1031
|
-
|
|
1032
|
-
|
|
1033
|
-
|
|
1034
|
-
|
|
1035
|
-
|
|
1036
|
-
|
|
1037
|
-
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
|
|
1078
|
+
return jsxs(Fragment, {
|
|
1079
|
+
children: [jsx(Input, _extends({
|
|
1080
|
+
id: id,
|
|
1081
|
+
name: id,
|
|
1082
|
+
type: 'range',
|
|
1083
|
+
required: required,
|
|
1084
|
+
disabled: disabled || readonly
|
|
1085
|
+
}, rangeSpec(schema), semanticProps, {
|
|
1086
|
+
value: value || '',
|
|
1087
|
+
error: rawErrors.length > 0,
|
|
1088
|
+
onChange: _onChange,
|
|
1089
|
+
onBlur: _onBlur,
|
|
1090
|
+
onFocus: _onFocus,
|
|
1091
|
+
"aria-describedby": ariaDescribedByIds(id)
|
|
1092
|
+
}), id), jsx("span", {
|
|
1093
|
+
children: value
|
|
1094
|
+
})]
|
|
1095
|
+
});
|
|
1045
1096
|
}
|
|
1046
1097
|
|
|
1047
1098
|
/**
|
|
@@ -1093,7 +1144,7 @@ function SelectWidget(props) {
|
|
|
1093
1144
|
formContext: formContext,
|
|
1094
1145
|
options: options,
|
|
1095
1146
|
defaultSchemaProps: {
|
|
1096
|
-
inverted:
|
|
1147
|
+
inverted: 'false',
|
|
1097
1148
|
selection: true,
|
|
1098
1149
|
fluid: true,
|
|
1099
1150
|
scrolling: true,
|
|
@@ -1103,7 +1154,7 @@ function SelectWidget(props) {
|
|
|
1103
1154
|
var enumDisabled = options.enumDisabled,
|
|
1104
1155
|
enumOptions = options.enumOptions,
|
|
1105
1156
|
optEmptyVal = options.emptyValue;
|
|
1106
|
-
var emptyValue = multiple ? [] :
|
|
1157
|
+
var emptyValue = multiple ? [] : '';
|
|
1107
1158
|
var dropdownOptions = createDefaultValueOptionsForDropDown(enumOptions, enumDisabled);
|
|
1108
1159
|
var _onChange = function _onChange(_, _ref2) {
|
|
1109
1160
|
var value = _ref2.value;
|
|
@@ -1119,13 +1170,12 @@ function SelectWidget(props) {
|
|
|
1119
1170
|
return onFocus(id, enumOptionsValueForIndex(value, enumOptions, optEmptyVal));
|
|
1120
1171
|
};
|
|
1121
1172
|
var selectedIndexes = enumOptionsIndexForValue(value, enumOptions, multiple);
|
|
1122
|
-
return
|
|
1123
|
-
key: id,
|
|
1173
|
+
return jsx(Form.Dropdown, _extends({
|
|
1124
1174
|
id: id,
|
|
1125
1175
|
name: id,
|
|
1126
1176
|
label: label || schema.title,
|
|
1127
|
-
multiple: typeof multiple ===
|
|
1128
|
-
value: typeof value ===
|
|
1177
|
+
multiple: typeof multiple === 'undefined' ? false : multiple,
|
|
1178
|
+
value: typeof value === 'undefined' ? emptyValue : selectedIndexes,
|
|
1129
1179
|
error: rawErrors.length > 0,
|
|
1130
1180
|
disabled: disabled,
|
|
1131
1181
|
placeholder: placeholder
|
|
@@ -1138,7 +1188,7 @@ function SelectWidget(props) {
|
|
|
1138
1188
|
onBlur: _onBlur,
|
|
1139
1189
|
onFocus: _onFocus,
|
|
1140
1190
|
"aria-describedby": ariaDescribedByIds(id)
|
|
1141
|
-
}));
|
|
1191
|
+
}), id);
|
|
1142
1192
|
}
|
|
1143
1193
|
|
|
1144
1194
|
/** The `TextareaWidget` is a widget for rendering input fields as textarea.
|
|
@@ -1175,7 +1225,7 @@ function TextareaWidget(props) {
|
|
|
1175
1225
|
// eslint-disable-next-line no-shadow
|
|
1176
1226
|
var _onChange = function _onChange(_ref) {
|
|
1177
1227
|
var value = _ref.target.value;
|
|
1178
|
-
return onChange && onChange(value ===
|
|
1228
|
+
return onChange && onChange(value === '' ? options.emptyValue : value);
|
|
1179
1229
|
};
|
|
1180
1230
|
var _onBlur = function _onBlur() {
|
|
1181
1231
|
return onBlur && onBlur(id, value);
|
|
@@ -1184,9 +1234,8 @@ function TextareaWidget(props) {
|
|
|
1184
1234
|
return onFocus && onFocus(id, value);
|
|
1185
1235
|
};
|
|
1186
1236
|
var displayLabel = schemaUtils.getDisplayLabel(schema, uiSchema);
|
|
1187
|
-
return
|
|
1237
|
+
return jsx(Form.TextArea, _extends({
|
|
1188
1238
|
id: id,
|
|
1189
|
-
key: id,
|
|
1190
1239
|
name: id,
|
|
1191
1240
|
label: displayLabel ? label || schema.title : false,
|
|
1192
1241
|
placeholder: placeholder,
|
|
@@ -1194,14 +1243,14 @@ function TextareaWidget(props) {
|
|
|
1194
1243
|
required: required,
|
|
1195
1244
|
disabled: disabled || readonly
|
|
1196
1245
|
}, semanticProps, {
|
|
1197
|
-
value: value ||
|
|
1246
|
+
value: value || '',
|
|
1198
1247
|
error: rawErrors.length > 0,
|
|
1199
1248
|
rows: options.rows || 5,
|
|
1200
1249
|
onChange: _onChange,
|
|
1201
1250
|
onBlur: _onBlur,
|
|
1202
1251
|
onFocus: _onFocus,
|
|
1203
1252
|
"aria-describedby": ariaDescribedByIds(id)
|
|
1204
|
-
}));
|
|
1253
|
+
}), id);
|
|
1205
1254
|
}
|
|
1206
1255
|
|
|
1207
1256
|
function generateWidgets() {
|