@rjsf/semantic-ui 6.0.0-beta.19 → 6.0.0-beta.20
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/dist/index.cjs +13 -13
- package/dist/index.cjs.map +2 -2
- package/dist/semantic-ui.esm.js +13 -13
- package/dist/semantic-ui.esm.js.map +2 -2
- package/dist/semantic-ui.umd.js +13 -13
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js +3 -3
- package/lib/ArrayFieldTemplate/ArrayFieldTemplate.js.map +1 -1
- package/lib/BaseInputTemplate/BaseInputTemplate.js.map +1 -1
- package/lib/CheckboxWidget/CheckboxWidget.js.map +1 -1
- package/lib/CheckboxesWidget/CheckboxesWidget.js.map +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.d.ts +1 -1
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js +2 -2
- package/lib/FieldErrorTemplate/FieldErrorTemplate.js.map +1 -1
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js +2 -2
- package/lib/FieldHelpTemplate/FieldHelpTemplate.js.map +1 -1
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js +3 -3
- package/lib/ObjectFieldTemplate/ObjectFieldTemplate.js.map +1 -1
- package/lib/RadioWidget/RadioWidget.js.map +1 -1
- package/lib/RangeWidget/RangeWidget.js.map +1 -1
- package/lib/SelectWidget/SelectWidget.js.map +1 -1
- package/lib/TextareaWidget/TextareaWidget.js.map +1 -1
- package/lib/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/ArrayFieldTemplate/ArrayFieldTemplate.tsx +5 -5
- package/src/BaseInputTemplate/BaseInputTemplate.tsx +3 -3
- package/src/CheckboxWidget/CheckboxWidget.tsx +2 -2
- package/src/CheckboxesWidget/CheckboxesWidget.tsx +2 -2
- package/src/FieldErrorTemplate/FieldErrorTemplate.tsx +2 -2
- package/src/FieldHelpTemplate/FieldHelpTemplate.tsx +2 -2
- package/src/ObjectFieldTemplate/ObjectFieldTemplate.tsx +4 -4
- package/src/RadioWidget/RadioWidget.tsx +1 -1
- package/src/RangeWidget/RangeWidget.tsx +1 -1
- package/src/SelectWidget/SelectWidget.tsx +1 -1
- package/src/TextareaWidget/TextareaWidget.tsx +1 -1
- package/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx +1 -1
package/dist/index.cjs
CHANGED
|
@@ -145,7 +145,7 @@ var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
|
145
145
|
function ArrayFieldTemplate(props) {
|
|
146
146
|
const {
|
|
147
147
|
uiSchema,
|
|
148
|
-
|
|
148
|
+
fieldPathId,
|
|
149
149
|
canAdd,
|
|
150
150
|
className,
|
|
151
151
|
// classNames, This is not part of the type, so it is likely never passed in
|
|
@@ -189,7 +189,7 @@ function ArrayFieldTemplate(props) {
|
|
|
189
189
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
190
190
|
ArrayFieldTitleTemplate,
|
|
191
191
|
{
|
|
192
|
-
|
|
192
|
+
fieldPathId,
|
|
193
193
|
title: uiOptions.title || title,
|
|
194
194
|
schema,
|
|
195
195
|
uiSchema,
|
|
@@ -200,7 +200,7 @@ function ArrayFieldTemplate(props) {
|
|
|
200
200
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
201
201
|
ArrayFieldDescriptionTemplate,
|
|
202
202
|
{
|
|
203
|
-
|
|
203
|
+
fieldPathId,
|
|
204
204
|
description: uiOptions.description || schema.description,
|
|
205
205
|
schema,
|
|
206
206
|
uiSchema,
|
|
@@ -229,7 +229,7 @@ function ArrayFieldTemplate(props) {
|
|
|
229
229
|
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
230
230
|
AddButton2,
|
|
231
231
|
{
|
|
232
|
-
id: (0, import_utils4.buttonId)(
|
|
232
|
+
id: (0, import_utils4.buttonId)(fieldPathId, "add"),
|
|
233
233
|
className: "rjsf-array-item-add",
|
|
234
234
|
onClick: onAddClick,
|
|
235
235
|
disabled: disabled || readonly,
|
|
@@ -239,7 +239,7 @@ function ArrayFieldTemplate(props) {
|
|
|
239
239
|
)
|
|
240
240
|
}
|
|
241
241
|
)
|
|
242
|
-
] }, `array-item-list-${
|
|
242
|
+
] }, `array-item-list-${fieldPathId.$id}`)
|
|
243
243
|
] });
|
|
244
244
|
}
|
|
245
245
|
|
|
@@ -386,7 +386,7 @@ var DEFAULT_OPTIONS = {
|
|
|
386
386
|
size: "small"
|
|
387
387
|
}
|
|
388
388
|
};
|
|
389
|
-
function FieldErrorTemplate({ errors,
|
|
389
|
+
function FieldErrorTemplate({ errors, fieldPathId, uiSchema, registry }) {
|
|
390
390
|
const { formContext } = registry;
|
|
391
391
|
const options = getSemanticErrorProps({
|
|
392
392
|
formContext,
|
|
@@ -395,7 +395,7 @@ function FieldErrorTemplate({ errors, idSchema, uiSchema, registry }) {
|
|
|
395
395
|
});
|
|
396
396
|
const { pointing, size } = options;
|
|
397
397
|
if (errors && errors.length > 0) {
|
|
398
|
-
const id = (0, import_utils8.errorId)(
|
|
398
|
+
const id = (0, import_utils8.errorId)(fieldPathId);
|
|
399
399
|
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_semantic_ui_react6.Label, { id, color: "red", pointing: pointing || "above", size: size || "small", basic: true, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_semantic_ui_react6.List, { bulleted: true, children: errors.map((error) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_semantic_ui_react6.List.Item, { children: error }, (0, import_uniqueId.default)("field-error-"))) }) });
|
|
400
400
|
}
|
|
401
401
|
return null;
|
|
@@ -406,9 +406,9 @@ var import_semantic_ui_react7 = require("semantic-ui-react");
|
|
|
406
406
|
var import_utils9 = require("@rjsf/utils");
|
|
407
407
|
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
408
408
|
function FieldHelpTemplate(props) {
|
|
409
|
-
const {
|
|
409
|
+
const { fieldPathId, help } = props;
|
|
410
410
|
if (help) {
|
|
411
|
-
const id = (0, import_utils9.helpId)(
|
|
411
|
+
const id = (0, import_utils9.helpId)(fieldPathId);
|
|
412
412
|
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_semantic_ui_react7.Message, { size: "mini", info: true, id, content: help });
|
|
413
413
|
}
|
|
414
414
|
return null;
|
|
@@ -508,7 +508,7 @@ function ObjectFieldTemplate(props) {
|
|
|
508
508
|
uiSchema,
|
|
509
509
|
schema,
|
|
510
510
|
formData,
|
|
511
|
-
|
|
511
|
+
fieldPathId,
|
|
512
512
|
registry
|
|
513
513
|
} = props;
|
|
514
514
|
const uiOptions = (0, import_utils11.getUiOptions)(uiSchema);
|
|
@@ -525,7 +525,7 @@ function ObjectFieldTemplate(props) {
|
|
|
525
525
|
title && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
526
526
|
TitleFieldTemplate,
|
|
527
527
|
{
|
|
528
|
-
id: (0, import_utils11.titleId)(
|
|
528
|
+
id: (0, import_utils11.titleId)(fieldPathId),
|
|
529
529
|
title,
|
|
530
530
|
required,
|
|
531
531
|
schema,
|
|
@@ -536,7 +536,7 @@ function ObjectFieldTemplate(props) {
|
|
|
536
536
|
description && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
537
537
|
DescriptionFieldTemplate,
|
|
538
538
|
{
|
|
539
|
-
id: (0, import_utils11.descriptionId)(
|
|
539
|
+
id: (0, import_utils11.descriptionId)(fieldPathId),
|
|
540
540
|
description,
|
|
541
541
|
schema,
|
|
542
542
|
uiSchema,
|
|
@@ -555,7 +555,7 @@ function ObjectFieldTemplate(props) {
|
|
|
555
555
|
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
556
556
|
AddButton2,
|
|
557
557
|
{
|
|
558
|
-
id: (0, import_utils11.buttonId)(
|
|
558
|
+
id: (0, import_utils11.buttonId)(fieldPathId, "add"),
|
|
559
559
|
className: "rjsf-object-property-expand",
|
|
560
560
|
onClick: onAddClick(schema),
|
|
561
561
|
disabled: disabled || readonly,
|
package/dist/index.cjs.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/index.ts", "../src/SemanticUIForm/SemanticUIForm.ts", "../src/Theme/Theme.ts", "../src/AddButton/AddButton.tsx", "../src/ArrayFieldItemTemplate/ArrayFieldItemTemplate.tsx", "../src/util.tsx", "../src/ArrayFieldTemplate/ArrayFieldTemplate.tsx", "../src/BaseInputTemplate/BaseInputTemplate.tsx", "../src/DescriptionField/DescriptionField.tsx", "../src/ErrorList/ErrorList.tsx", "../src/IconButton/IconButton.tsx", "../src/FieldErrorTemplate/FieldErrorTemplate.tsx", "../src/FieldHelpTemplate/FieldHelpTemplate.tsx", "../src/FieldTemplate/FieldTemplate.tsx", "../src/GridTemplate/GridTemplate.tsx", "../src/MultiSchemaFieldTemplate/MultiSchemaFieldTemplate.tsx", "../src/ObjectFieldTemplate/ObjectFieldTemplate.tsx", "../src/SubmitButton/SubmitButton.tsx", "../src/TitleField/TitleField.tsx", "../src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx", "../src/Templates/Templates.ts", "../src/CheckboxWidget/CheckboxWidget.tsx", "../src/CheckboxesWidget/CheckboxesWidget.tsx", "../src/RadioWidget/RadioWidget.tsx", "../src/RangeWidget/RangeWidget.tsx", "../src/SelectWidget/SelectWidget.tsx", "../src/TextareaWidget/TextareaWidget.tsx", "../src/Widgets/Widgets.tsx"],
|
|
4
|
-
"sourcesContent": ["/**\n * @deprecated - This theme will be deleted in a future release of RJSF once we upgrade to React 19\n */\nimport SemanticUIForm from './SemanticUIForm/SemanticUIForm';\n\nexport { default as Templates, generateTemplates } from './Templates';\nexport { default as Form, generateForm } from './SemanticUIForm';\nexport { default as Theme, generateTheme } from './Theme';\nexport { default as Widgets, generateWidgets } from './Widgets';\n\nexport default SemanticUIForm;\n", "import { ComponentType } from 'react';\nimport { withTheme, FormProps } from '@rjsf/core';\nimport { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport { generateTheme } from '../Theme';\n\nexport function generateForm<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): ComponentType<FormProps<T, S, F>> {\n return withTheme<T, S, F>(generateTheme<T, S, F>());\n}\n\nexport default generateForm();\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport { ThemeProps } from '@rjsf/core';\nimport { Form as SuiForm } from 'semantic-ui-react';\n\nimport { generateTemplates } from '../Templates';\nimport { generateWidgets } from '../Widgets';\n\nexport function generateTheme<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): ThemeProps<T, S, F> {\n return {\n templates: generateTemplates<T, S, F>(),\n widgets: generateWidgets<T, S, F>(),\n _internalFormWrapper: SuiForm,\n };\n}\n\nexport default generateTheme();\n", "import { Button, Icon, ButtonProps } from 'semantic-ui-react';\nimport { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\n/** The `AddButton` renders a button that represent the `Add` action on a form\n */\nexport default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n uiSchema,\n registry,\n color,\n ...props\n}: IconButtonProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <Button\n title={translateString(TranslatableString.AddItemButton)}\n color={color as ButtonProps['color']}\n {...props}\n icon\n size='tiny'\n >\n <Icon name='plus' />\n </Button>\n );\n}\n", "import {\n ArrayFieldItemTemplateType,\n FormContextType,\n GenericObjectType,\n RJSFSchema,\n StrictRJSFSchema,\n getUiOptions,\n getTemplate,\n} from '@rjsf/utils';\nimport { Button, Grid, Segment } from 'semantic-ui-react';\n\nimport { MaybeWrap } from '../util';\n\nconst gridStyle = (vertical: boolean) => ({\n display: 'grid',\n gridTemplateColumns: `1fr ${vertical ? 65 : 150}px`,\n});\n\n/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.\n *\n * @param props - The `ArrayFieldItemTemplateType` props for the component\n */\nexport default function ArrayFieldItemTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldItemTemplateType<T, S, F>) {\n const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(\n 'ArrayFieldItemButtonsTemplate',\n registry,\n uiOptions,\n );\n // Pull the semantic props out of the uiOptions that were put in via the ArrayFieldTemplate\n const { horizontalButtons = true, wrapItem = false } = uiOptions.semantic as GenericObjectType;\n return (\n <div className='rjsf-array-item'>\n <MaybeWrap wrap={wrapItem} component={Segment}>\n <Grid style={{ ...gridStyle(!horizontalButtons), alignItems: 'center' }}>\n <Grid.Column width={16} verticalAlign='middle'>\n {children}\n </Grid.Column>\n {hasToolbar && (\n <Grid.Column>\n <Button.Group size='mini' vertical={!horizontalButtons}>\n <ArrayFieldItemButtonsTemplate {...buttonsProps} />\n </Button.Group>\n </Grid.Column>\n )}\n </Grid>\n </MaybeWrap>\n </div>\n );\n}\n", "import { ElementType } from 'react';\nimport {\n UiSchema,\n GenericObjectType,\n getUiOptions,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n UIOptionsType,\n} from '@rjsf/utils';\n\nexport type SemanticPropsTypes<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = {\n formContext?: F;\n uiSchema?: UiSchema<T, S, F>;\n options?: UIOptionsType<T, S, F>;\n defaultSchemaProps?: GenericObjectType;\n defaultContextProps?: GenericObjectType;\n};\n\nexport type SemanticErrorPropsType<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> = {\n formContext?: F;\n uiSchema?: UiSchema<T, S, F>;\n options?: UIOptionsType<T, S, F>;\n defaultProps?: GenericObjectType;\n};\n\nexport type WrapProps = GenericObjectType & {\n wrap: boolean;\n component?: ElementType;\n};\n\n/**\n * Extract props meant for semantic UI components from props that are\n * passed to Widgets, Templates and Fields.\n * @param {Object} params\n * @param {Object?} params.formContext\n * @param {Object?} params.uiSchema\n * @param {Object?} params.options\n * @param {Object?} params.defaultSchemaProps\n * @param {Object?} params.defaultContextProps\n * @returns {any}\n */\nexport function getSemanticProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n formContext = {} as F,\n uiSchema = {},\n options = {},\n defaultSchemaProps = { fluid: true, inverted: false },\n defaultContextProps = {},\n}: SemanticPropsTypes<T, S, F>) {\n const formContextProps = formContext.semantic;\n const schemaProps = getUiOptions<T, S, F>(uiSchema).semantic;\n const optionProps = options.semantic;\n // formContext props should overide other props\n return Object.assign(\n {},\n { ...defaultSchemaProps },\n { ...defaultContextProps },\n schemaProps,\n optionProps,\n formContextProps,\n );\n}\n\n/**\n * Extract error props meant for semantic UI components from props that are\n * passed to Widgets, Templates and Fields.\n * @param {Object} params\n * @param {Object?} params.formContext\n * @param {Object?} params.uiSchema\n * @param {Object?} params.defaultProps\n * @returns {any}\n */\nexport function getSemanticErrorProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({\n formContext = {} as F,\n uiSchema = {},\n options = {},\n defaultProps = { size: 'small', pointing: 'above' },\n}: SemanticErrorPropsType<T, S, F>) {\n const formContextProps = formContext.semantic && formContext.semantic.errorOptions;\n const semanticOptions: GenericObjectType = getUiOptions<T, S, F>(uiSchema).semantic as GenericObjectType;\n const schemaProps = semanticOptions && semanticOptions.errorOptions;\n const optionProps = options.semantic && (options.semantic as GenericObjectType).errorOptions;\n\n return Object.assign({}, { ...defaultProps }, schemaProps, optionProps, formContextProps);\n}\n\n/**\n * Combine multiple strings containing class names into a single string,\n * removing duplicates. E.g.\n * cleanClassNames('bar', 'baz bar', 'x y ', undefined)\n * // 'bar baz x y'\n * @param {Array} classNameArr\n * @param {Array} omit\n * @returns {string}\n */\nexport function cleanClassNames(classNameArr: Array<string | undefined>, omit: string[] = []) {\n // Split each arg on whitespace, and add it to an array. Skip false-y args\n // like \"\" and undefined.\n const classList = classNameArr\n .filter(Boolean)\n .reduce<string[]>((previous, current) => previous.concat(current!.trim().split(/\\s+/)), []);\n\n // Remove any class names from omit, and make the rest unique before\n // returning them as a string\n return [...new Set(classList.filter((cn) => !omit.includes(cn)))].join(' ');\n}\n\n/**\n *\n * @param {boolean} wrap\n * @param Component\n * @param {Object} props\n * @returns {*}\n * @constructor\n */\nexport function MaybeWrap({ wrap, component: Component = 'div', ...props }: WrapProps) {\n return wrap ? <Component {...props} /> : props.children;\n}\n", "import {\n getTemplate,\n getUiOptions,\n isFixedItems,\n ArrayFieldTemplateProps,\n ArrayFieldItemTemplateType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n UI_OPTIONS_KEY,\n buttonId,\n} from '@rjsf/utils';\n\nimport { cleanClassNames, getSemanticProps } from '../util';\n\n/** The `ArrayFieldTemplate` component is the template used to render all items in an array.\n *\n * @param props - The `ArrayFieldItemTemplateType` props for the component\n */\nexport default function ArrayFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldTemplateProps<T, S, F>) {\n const {\n uiSchema,\n idSchema,\n canAdd,\n className,\n // classNames, This is not part of the type, so it is likely never passed in\n disabled,\n items,\n onAddClick,\n // options, This is not part of the type, so it is likely never passed in\n readonly,\n required,\n schema,\n title,\n registry,\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext: registry.formContext,\n defaultSchemaProps: { horizontalButtons: true, wrapItem: false },\n });\n const { horizontalButtons, wrapItem } = semanticProps;\n const semantic = { horizontalButtons, wrapItem };\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldDescriptionTemplate = getTemplate<'ArrayFieldDescriptionTemplate', T, S, F>(\n 'ArrayFieldDescriptionTemplate',\n registry,\n uiOptions,\n );\n const ArrayFieldItemTemplate = getTemplate<'ArrayFieldItemTemplate', T, S, F>(\n 'ArrayFieldItemTemplate',\n registry,\n uiOptions,\n );\n const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>(\n 'ArrayFieldTitleTemplate',\n registry,\n uiOptions,\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <div className={cleanClassNames([className, isFixedItems<S>(schema) ? '' : 'sortable-form-fields'])}>\n <ArrayFieldTitleTemplate\n idSchema={idSchema}\n title={uiOptions.title || title}\n schema={schema}\n uiSchema={uiSchema}\n required={required}\n registry={registry}\n />\n <ArrayFieldDescriptionTemplate\n idSchema={idSchema}\n description={uiOptions.description || schema.description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n <div key={`array-item-list-${idSchema.$id}`}>\n <div className='row array-item-list'>\n {items &&\n items.map(({ key, uiSchema: itemUiSchema = {}, ...props }: ArrayFieldItemTemplateType<T, S, F>) => {\n // Merge in the semantic props from the ArrayFieldTemplate into each of the items\n const mergedUiSchema = {\n ...itemUiSchema,\n [UI_OPTIONS_KEY]: {\n ...itemUiSchema[UI_OPTIONS_KEY],\n semantic,\n },\n };\n return <ArrayFieldItemTemplate key={key} {...props} uiSchema={mergedUiSchema} />;\n })}\n </div>\n {canAdd && (\n <div\n style={{\n marginTop: '1rem',\n position: 'relative',\n textAlign: 'right',\n }}\n >\n <AddButton\n id={buttonId<T>(idSchema, 'add')}\n className='rjsf-array-item-add'\n onClick={onAddClick}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n )}\n </div>\n </div>\n );\n}\n", "import { ChangeEvent } from 'react';\nimport { Form } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\nimport {\n ariaDescribedByIds,\n BaseInputTemplateProps,\n examplesId,\n getInputProps,\n labelValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.\n * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.\n * It can be customized/overridden for other themes or individual implementations as needed.\n *\n * @param props - The `WidgetProps` for this template\n */\nexport default function BaseInputTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: BaseInputTemplateProps<T, S, F>) {\n const {\n id,\n placeholder,\n label,\n hideLabel,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onChangeOverride,\n onBlur,\n onFocus,\n autofocus,\n options,\n schema,\n uiSchema,\n registry,\n type,\n rawErrors = [],\n } = props;\n const inputProps = getInputProps<T, S, F>(schema, type, options);\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext: registry.formContext,\n options,\n });\n const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>\n onChange(value === '' ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n\n return (\n <>\n <Form.Input\n key={id}\n id={id}\n name={id}\n placeholder={placeholder}\n {...inputProps}\n label={labelValue(label || undefined, hideLabel, false)}\n required={required}\n autoFocus={autofocus}\n disabled={disabled || readonly}\n list={schema.examples ? examplesId<T>(id) : undefined}\n {...semanticProps}\n value={value || value === 0 ? value : ''}\n error={rawErrors.length > 0}\n onChange={onChangeOverride || _onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id, !!schema.examples)}\n />\n {Array.isArray(schema.examples) && (\n <datalist id={examplesId<T>(id)}>\n {(schema.examples as string[])\n .concat(schema.default && !schema.examples.includes(schema.default) ? ([schema.default] as string[]) : [])\n .map((example) => {\n return <option key={example} value={example} />;\n })}\n </datalist>\n )}\n </>\n );\n}\n", "import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport { RichDescription } from '@rjsf/core';\n\n/** The `DescriptionField` is the template to use to render the description of a field\n *\n * @param props - The `DescriptionFieldProps` for this component\n */\nexport default function DescriptionField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: DescriptionFieldProps<T, S, F>) {\n const { id, description, registry, uiSchema } = props;\n if (!description) {\n return null;\n }\n return (\n <p id={id} className='sui-description'>\n <RichDescription description={description} registry={registry} uiSchema={uiSchema} />\n </p>\n );\n}\n", "import { Message } from 'semantic-ui-react';\nimport { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\n/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`\n *\n * @param props - The `ErrorListProps` for this component\n */\nexport default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n errors,\n registry,\n}: ErrorListProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <Message negative>\n <Message.Header>{translateString(TranslatableString.ErrorsLabel)}</Message.Header>\n <Message.List>\n {errors.map((error, index) => (\n <Message.Item key={`error-${index}`}>{error.stack}</Message.Item>\n ))}\n </Message.List>\n </Message>\n );\n}\n", "import { Button, ButtonProps } from 'semantic-ui-react';\nimport { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\nfunction IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const { icon, iconType, color, className, uiSchema, registry, ...otherProps } = props;\n return (\n <Button\n icon={icon}\n size={iconType as ButtonProps['size']}\n color={color as ButtonProps['color']}\n className={className}\n {...otherProps}\n />\n );\n}\n\nexport default IconButton;\n\nexport function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.CopyButton)} {...props} icon='copy' />;\n}\n\nexport function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveDownButton)} {...props} icon='angle down' />;\n}\n\nexport function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveUpButton)} {...props} icon='angle up' />;\n}\n\nexport function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.RemoveButton)} {...props} icon='trash' />;\n}\n", "import { errorId, FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport uniqueId from 'lodash/uniqueId';\nimport { Label, List } from 'semantic-ui-react';\n\nimport { getSemanticErrorProps } from '../util';\n\nconst DEFAULT_OPTIONS = {\n options: {\n pointing: 'above',\n size: 'small',\n },\n};\n\n/** The `FieldErrorTemplate` component renders the errors local to the particular field\n *\n * @param props - The `FieldErrorProps` for the errors being rendered\n */\nexport default function FieldErrorTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({ errors, idSchema, uiSchema, registry }: FieldErrorProps<T, S, F>) {\n const { formContext } = registry;\n const options = getSemanticErrorProps<T, S, F>({\n formContext,\n uiSchema,\n defaultProps: DEFAULT_OPTIONS,\n });\n const { pointing, size } = options;\n if (errors && errors.length > 0) {\n const id = errorId<T>(idSchema);\n return (\n <Label id={id} color='red' pointing={pointing || 'above'} size={size || 'small'} basic>\n <List bulleted>\n {errors.map((error) => (\n <List.Item key={uniqueId('field-error-')}>{error}</List.Item>\n ))}\n </List>\n </Label>\n );\n }\n return null;\n}\n", "import { Message } from 'semantic-ui-react';\nimport { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema, helpId } from '@rjsf/utils';\n\n/** The `FieldHelpTemplate` component renders any help desired for a field\n *\n * @param props - The `FieldHelpProps` to be rendered\n */\nexport default function FieldHelpTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldHelpProps<T, S, F>) {\n const { idSchema, help } = props;\n if (help) {\n const id = helpId<T>(idSchema);\n return <Message size='mini' info id={id} content={help} />;\n }\n return null;\n}\n", "import {\n FieldTemplateProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n getTemplate,\n getUiOptions,\n} from '@rjsf/utils';\nimport { Form } from 'semantic-ui-react';\nimport { getSemanticProps, MaybeWrap } from '../util';\n\n/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field\n * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.\n *\n * @param props - The `FieldTemplateProps` for this component\n */\nexport default function FieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldTemplateProps<T, S, F>) {\n const {\n id,\n children,\n classNames,\n style,\n displayLabel,\n label,\n errors,\n help,\n hidden,\n description,\n rawDescription,\n registry,\n schema,\n uiSchema,\n ...otherProps\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n ...otherProps,\n formContext: registry.formContext,\n });\n const { wrapLabel, wrapContent } = semanticProps;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>(\n 'WrapIfAdditionalTemplate',\n registry,\n uiOptions,\n );\n\n if (hidden) {\n return <div style={{ display: 'none' }}>{children}</div>;\n }\n\n return (\n <WrapIfAdditionalTemplate\n classNames={classNames}\n style={style}\n id={id}\n label={label}\n registry={registry}\n schema={schema}\n uiSchema={uiSchema}\n {...otherProps}\n >\n <Form.Group key={id} widths='equal' grouped>\n <MaybeWrap wrap={wrapContent} className='sui-field-content'>\n {children}\n {displayLabel && rawDescription && (\n <MaybeWrap wrap={wrapLabel} className='sui-field-label'>\n {description}\n </MaybeWrap>\n )}\n {help}\n {errors}\n </MaybeWrap>\n </Form.Group>\n </WrapIfAdditionalTemplate>\n );\n}\n", "import { Grid } from 'semantic-ui-react';\nimport { GridTemplateProps } from '@rjsf/utils';\n\n/** Renders a `GridTemplate` for semantic-ui, which is expecting the column sizing information coming in via the\n * extra props provided by the caller, which are spread directly on the `Flex`.\n *\n * @param props - The GridTemplateProps, including the extra props containing the semantic-ui grid positioning details\n */\nexport default function GridTemplate(props: GridTemplateProps) {\n const { children, column, ...rest } = props;\n if (column) {\n return <Grid.Column {...rest}>{children}</Grid.Column>;\n }\n return <Grid {...rest}>{children}</Grid>;\n}\n", "import { FormContextType, MultiSchemaFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nexport default function MultiSchemaFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: MultiSchemaFieldTemplateProps<T, S, F>) {\n const { selector, optionSchemaField } = props;\n\n return (\n <div>\n <div>{selector}</div>\n {optionSchemaField}\n </div>\n );\n}\n", "import { Grid } from 'semantic-ui-react';\nimport {\n FormContextType,\n ObjectFieldTemplateProps,\n RJSFSchema,\n StrictRJSFSchema,\n canExpand,\n descriptionId,\n getTemplate,\n getUiOptions,\n titleId,\n buttonId,\n} from '@rjsf/utils';\n\n/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the\n * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all\n * the properties.\n *\n * @param props - The `ObjectFieldTemplateProps` for this component\n */\nexport default function ObjectFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ObjectFieldTemplateProps<T, S, F>) {\n const {\n description,\n onAddClick,\n title,\n properties,\n disabled,\n readonly,\n required,\n uiSchema,\n schema,\n formData,\n idSchema,\n registry,\n } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, uiOptions);\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n uiOptions,\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <>\n {title && (\n <TitleFieldTemplate\n id={titleId<T>(idSchema)}\n title={title}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {description && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(idSchema)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {properties.map((prop) => prop.content)}\n {canExpand<T, S, F>(schema, uiSchema, formData) && (\n <Grid.Column width={16} verticalAlign='middle'>\n <Grid.Row>\n <div\n style={{\n marginTop: '1rem',\n position: 'relative',\n textAlign: 'right',\n }}\n >\n <AddButton\n id={buttonId<T>(idSchema, 'add')}\n className='rjsf-object-property-expand'\n onClick={onAddClick(schema)}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n </Grid.Row>\n </Grid.Column>\n )}\n </>\n );\n}\n", "import { Button } from 'semantic-ui-react';\nimport { getSubmitButtonOptions, FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils';\n\n/** The `SubmitButton` renders a button that represent the `Submit` action on a form\n */\nexport default function SubmitButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({ uiSchema }: SubmitButtonProps<T, S, F>) {\n const { submitText, norender, props: submitButtonProps = {} } = getSubmitButtonOptions<T, S, F>(uiSchema);\n if (norender) {\n return null;\n }\n return (\n <Button type='submit' primary {...submitButtonProps}>\n {submitText}\n </Button>\n );\n}\n", "import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport { Header } from 'semantic-ui-react';\n\nimport { getSemanticProps } from '../util';\n\nconst DEFAULT_OPTIONS = {\n inverted: false,\n dividing: true,\n};\n\n/** The `TitleField` is the template to use to render the title of a field\n *\n * @param props - The `TitleFieldProps` for this component\n */\nexport default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n title,\n uiSchema,\n}: TitleFieldProps<T, S, F>) {\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n defaultSchemaProps: DEFAULT_OPTIONS,\n });\n if (!title) {\n return null;\n }\n return (\n <Header id={id} {...semanticProps} as='h5'>\n {title}\n </Header>\n );\n}\n", "import { FocusEvent } from 'react';\nimport {\n ADDITIONAL_PROPERTY_FLAG,\n buttonId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n WrapIfAdditionalTemplateProps,\n} from '@rjsf/utils';\nimport { Form, Grid } from 'semantic-ui-react';\n\n/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are\n * part of an `additionalProperties` part of a schema.\n *\n * @param props - The `WrapIfAdditionalProps` for this component\n */\nexport default function WrapIfAdditionalTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WrapIfAdditionalTemplateProps<T, S, F>) {\n const {\n children,\n classNames,\n style,\n disabled,\n id,\n label,\n onDropPropertyClick,\n onKeyChange,\n readonly,\n required,\n schema,\n uiSchema,\n registry,\n } = props;\n const { templates, translateString } = registry;\n // Button templates are not overridden in the uiSchema\n const { RemoveButton } = templates.ButtonTemplates;\n const keyLabel = translateString(TranslatableString.KeyLabel, [label]);\n const { readonlyAsDisabled = true, wrapperStyle } = registry.formContext;\n\n const additional = ADDITIONAL_PROPERTY_FLAG in schema;\n\n if (!additional) {\n return (\n <div className={classNames} style={style}>\n {children}\n </div>\n );\n }\n\n const handleBlur = ({ target }: FocusEvent<HTMLInputElement>) => onKeyChange(target.value);\n\n return (\n <div className={classNames} style={style} key={`${id}-key`}>\n <Grid columns='equal'>\n <Grid.Row>\n <Grid.Column className='form-additional'>\n <Form.Group widths='equal' grouped>\n <Form.Input\n className='form-group'\n hasFeedback\n fluid\n htmlFor={`${id}`}\n label={keyLabel}\n required={required}\n defaultValue={label}\n disabled={disabled || (readonlyAsDisabled && readonly)}\n id={`${id}`}\n name={`${id}`}\n onBlur={!readonly ? handleBlur : undefined}\n style={wrapperStyle}\n type='text'\n ></Form.Input>\n </Form.Group>\n </Grid.Column>\n <Grid.Column className='form-additional' verticalAlign='middle'>\n {children}\n </Grid.Column>\n <Grid.Column>\n <RemoveButton\n id={buttonId<T>(id, 'remove')}\n iconType='mini'\n className='rjsf-object-property-remove'\n disabled={disabled || readonly}\n onClick={onDropPropertyClick(label)}\n uiSchema={uiSchema}\n registry={registry}\n />\n </Grid.Column>\n </Grid.Row>\n </Grid>\n </div>\n );\n}\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';\n\nimport AddButton from '../AddButton';\nimport ArrayFieldItemTemplate from '../ArrayFieldItemTemplate';\nimport ArrayFieldTemplate from '../ArrayFieldTemplate';\nimport BaseInputTemplate from '../BaseInputTemplate';\nimport DescriptionField from '../DescriptionField';\nimport ErrorList from '../ErrorList';\nimport { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from '../IconButton';\nimport FieldErrorTemplate from '../FieldErrorTemplate';\nimport FieldHelpTemplate from '../FieldHelpTemplate';\nimport FieldTemplate from '../FieldTemplate';\nimport GridTemplate from '../GridTemplate';\nimport MultiSchemaFieldTemplate from '../MultiSchemaFieldTemplate';\nimport ObjectFieldTemplate from '../ObjectFieldTemplate';\nimport SubmitButton from '../SubmitButton';\nimport TitleField from '../TitleField';\nimport WrapIfAdditionalTemplate from '../WrapIfAdditionalTemplate';\n\nexport function generateTemplates<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): Partial<TemplatesType<T, S, F>> {\n return {\n ArrayFieldItemTemplate,\n ArrayFieldTemplate,\n BaseInputTemplate,\n ButtonTemplates: {\n AddButton,\n CopyButton,\n MoveDownButton,\n MoveUpButton,\n RemoveButton,\n SubmitButton,\n },\n DescriptionFieldTemplate: DescriptionField,\n ErrorListTemplate: ErrorList,\n FieldErrorTemplate,\n FieldHelpTemplate,\n FieldTemplate,\n GridTemplate,\n MultiSchemaFieldTemplate,\n ObjectFieldTemplate,\n TitleFieldTemplate: TitleField,\n WrapIfAdditionalTemplate,\n };\n}\n\nexport default generateTemplates();\n", "import { FormEvent } from 'react';\nimport {\n ariaDescribedByIds,\n descriptionId,\n getTemplate,\n labelValue,\n schemaRequiresTrueValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\nimport { Form, CheckboxProps } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\n\n/** The `CheckBoxWidget` is a widget for rendering boolean properties.\n * It is typically used to represent a boolean.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function CheckboxWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n value,\n disabled,\n readonly,\n label = '',\n hideLabel,\n autofocus,\n onChange,\n onBlur,\n options,\n onFocus,\n schema,\n uiSchema,\n rawErrors = [],\n registry,\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n options,\n formContext: registry.formContext,\n uiSchema,\n defaultSchemaProps: {\n inverted: 'false',\n },\n });\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n options,\n );\n // Because an unchecked checkbox will cause html5 validation to fail, only add\n // the \"required\" attribute if the field value must be \"true\", due to the\n // \"const\" or \"enum\" keywords\n const required = schemaRequiresTrueValue<S>(schema);\n const checked = value == 'true' || value == true;\n const _onChange = (_: FormEvent<HTMLInputElement>, data: CheckboxProps) => onChange && onChange(data.checked);\n const _onBlur: React.FocusEventHandler<HTMLInputElement> = () => onBlur && onBlur(id, value);\n const _onFocus: React.FocusEventHandler<HTMLInputElement> = () => onFocus && onFocus(id, value);\n const description = options.description ?? schema.description;\n\n return (\n <>\n {!hideLabel && description && (\n <DescriptionFieldTemplate\n id={descriptionId<T>(id)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n <Form.Checkbox\n id={id}\n name={id}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n {...semanticProps}\n checked={typeof value === 'undefined' ? false : checked}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n required={required}\n label={labelValue(label, hideLabel, false)}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n </>\n );\n}\n", "import { ChangeEvent } from 'react';\nimport { Form } from 'semantic-ui-react';\nimport {\n ariaDescribedByIds,\n enumOptionsDeselectValue,\n enumOptionsIsSelected,\n enumOptionsSelectValue,\n getTemplate,\n optionId,\n titleId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\nimport { getSemanticProps } from '../util';\n\n/** The `CheckboxesWidget` is a widget for rendering checkbox groups.\n * It is typically used to represent an array of enums.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function CheckboxesWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n disabled,\n options,\n value,\n autofocus,\n readonly,\n label,\n hideLabel,\n onChange,\n onBlur,\n onFocus,\n schema,\n uiSchema,\n rawErrors = [],\n registry,\n } = props;\n const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, options);\n const { enumOptions, enumDisabled, inline } = options;\n const checkboxesValues = Array.isArray(value) ? value : [value];\n const semanticProps = getSemanticProps<T, S, F>({\n options,\n formContext: registry.formContext,\n uiSchema,\n defaultSchemaProps: {\n inverted: 'false',\n },\n });\n const _onChange =\n (index: number) =>\n ({ target: { checked } }: ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line no-shadow\n if (checked) {\n onChange(enumOptionsSelectValue<S>(index, checkboxesValues, enumOptions));\n } else {\n onChange(enumOptionsDeselectValue<S>(index, checkboxesValues, enumOptions));\n }\n };\n\n const _onBlur = () => onBlur(id, value);\n const _onFocus = () => onFocus(id, value);\n const inlineOption = inline ? { inline: true } : { grouped: true };\n return (\n <>\n {!hideLabel && !!label && (\n <TitleFieldTemplate id={titleId<T>(id)} title={label} schema={schema} uiSchema={uiSchema} registry={registry} />\n )}\n <Form.Group id={id} name={id} {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, checkboxesValues);\n const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;\n return (\n <Form.Checkbox\n id={optionId(id, index)}\n name={id}\n key={index}\n label={option.label}\n {...semanticProps}\n checked={checked}\n error={rawErrors.length > 0}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && index === 0}\n onChange={_onChange(index)}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n })}\n </Form.Group>\n </>\n );\n}\n", "import { FormEvent } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsIsSelected,\n enumOptionsValueForIndex,\n optionId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\nimport { CheckboxProps, Form, Radio } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\n\n/** The `RadioWidget` is a widget for rendering a radio group.\n * It is typically used with a string property constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const {\n id,\n value,\n required,\n disabled,\n readonly,\n onChange,\n onBlur,\n onFocus,\n options,\n registry,\n uiSchema,\n rawErrors = [],\n } = props;\n const { enumOptions, enumDisabled, emptyValue } = options;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext: registry.formContext,\n options,\n uiSchema,\n });\n const _onChange = (_: FormEvent<HTMLInputElement>, { value: eventValue }: CheckboxProps) => {\n return onChange(enumOptionsValueForIndex<S>(eventValue!, enumOptions, emptyValue));\n };\n\n const _onBlur = () => onBlur(id, value);\n const _onFocus = () => onFocus(id, value);\n const inlineOption = options.inline ? { inline: true } : { grouped: true };\n return (\n <Form.Group {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, value);\n const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;\n return (\n <Form.Field\n required={required}\n control={Radio}\n id={optionId(id, index)}\n name={id}\n {...semanticProps}\n onFocus={_onFocus}\n onBlur={_onBlur}\n onChange={_onChange}\n label={option.label}\n value={String(index)}\n error={rawErrors.length > 0}\n key={index}\n checked={checked}\n disabled={disabled || itemDisabled || readonly}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n })}\n </Form.Group>\n );\n}\n", "import { ChangeEvent } from 'react';\nimport { Input } from 'semantic-ui-react';\nimport { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps, rangeSpec } from '@rjsf/utils';\nimport { getSemanticProps } from '../util';\n\n/** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result\n * in a div, with the value along side it.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RangeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const {\n id,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onBlur,\n onFocus,\n options,\n schema,\n uiSchema,\n registry,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext: registry.formContext,\n options,\n uiSchema,\n defaultSchemaProps: {\n fluid: true,\n },\n });\n\n // eslint-disable-next-line no-shadow\n const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>\n onChange && onChange(value === '' ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n\n return (\n <>\n <Input\n id={id}\n key={id}\n name={id}\n type='range'\n required={required}\n disabled={disabled || readonly}\n {...rangeSpec<S>(schema)}\n {...semanticProps}\n value={value || ''}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n <span>{value}</span>\n </>\n );\n}\n", "import { FocusEvent, SyntheticEvent } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsIndexForValue,\n enumOptionsValueForIndex,\n labelValue,\n EnumOptionsType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n UIOptionsType,\n} from '@rjsf/utils';\nimport map from 'lodash/map';\nimport { Form, DropdownProps, DropdownItemProps } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\n\n/**\n * Returns and creates an array format required for semantic drop down\n * @param {array} enumOptions - array of items for the dropdown\n * @param {array} enumDisabled - array of enum option values to disable\n * @param {boolean} showPlaceholderOption - whether to show a placeholder option\n * @param {string} placeholder - placeholder option label\n * @returns {*}\n */\nfunction createDefaultValueOptionsForDropDown<S extends StrictRJSFSchema = RJSFSchema>(\n enumOptions?: EnumOptionsType<S>[],\n enumDisabled?: UIOptionsType['enumDisabled'],\n showPlaceholderOption?: boolean,\n placeholder?: string,\n) {\n const disabledOptions = enumDisabled || [];\n const options: DropdownItemProps[] = map(enumOptions, ({ label, value }, index) => ({\n disabled: disabledOptions.indexOf(value) !== -1,\n key: label,\n text: label,\n value: String(index),\n }));\n if (showPlaceholderOption) {\n options.unshift({ value: '', text: placeholder || '' });\n }\n return options;\n}\n\n/** The `SelectWidget` is a widget for rendering dropdowns.\n * It is typically used with string properties constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function SelectWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const {\n uiSchema,\n registry,\n id,\n options,\n label,\n hideLabel,\n required,\n disabled,\n readonly,\n value,\n multiple,\n placeholder,\n autofocus,\n onChange,\n onBlur,\n onFocus,\n rawErrors = [],\n schema,\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext: registry.formContext,\n options,\n defaultSchemaProps: {\n inverted: 'false',\n selection: true,\n fluid: true,\n scrolling: true,\n upward: false,\n },\n });\n const { enumDisabled, enumOptions, emptyValue: optEmptyVal } = options;\n const emptyValue = multiple ? [] : '';\n const showPlaceholderOption = !multiple && schema.default === undefined;\n const dropdownOptions = createDefaultValueOptionsForDropDown<S>(\n enumOptions,\n enumDisabled,\n showPlaceholderOption,\n placeholder,\n );\n const _onChange = (_: SyntheticEvent<HTMLElement>, { value }: DropdownProps) =>\n onChange(enumOptionsValueForIndex<S>(value as string[], enumOptions, optEmptyVal));\n // eslint-disable-next-line no-shadow\n const _onBlur = (_: FocusEvent<HTMLElement>, { target }: DropdownProps) =>\n onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, optEmptyVal));\n const _onFocus = (_: FocusEvent<HTMLElement>, { target }: DropdownProps) =>\n onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, optEmptyVal));\n const selectedIndexes = enumOptionsIndexForValue<S>(value, enumOptions, multiple);\n\n return (\n <Form.Dropdown\n key={id}\n id={id}\n name={id}\n label={labelValue(label || undefined, hideLabel, false)}\n multiple={typeof multiple === 'undefined' ? false : multiple}\n value={typeof value === 'undefined' ? emptyValue : selectedIndexes}\n error={rawErrors.length > 0}\n disabled={disabled}\n placeholder={placeholder}\n {...semanticProps}\n required={required}\n autoFocus={autofocus}\n readOnly={readonly}\n options={dropdownOptions}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n", "import { ChangeEvent } from 'react';\nimport {\n ariaDescribedByIds,\n labelValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\nimport { Form } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\n\n/** The `TextareaWidget` is a widget for rendering input fields as textarea.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function TextareaWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n placeholder,\n value,\n required,\n disabled,\n autofocus,\n label,\n hideLabel,\n readonly,\n onBlur,\n onFocus,\n onChange,\n options,\n registry,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext: registry.formContext,\n options,\n defaultSchemaProps: { inverted: 'false' },\n });\n // eslint-disable-next-line no-shadow\n const _onChange = ({ target: { value } }: ChangeEvent<HTMLTextAreaElement>) =>\n onChange && onChange(value === '' ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n return (\n <Form.TextArea\n id={id}\n key={id}\n name={id}\n label={labelValue(label || undefined, hideLabel, false)}\n placeholder={placeholder}\n autoFocus={autofocus}\n required={required}\n disabled={disabled || readonly}\n {...semanticProps}\n value={value || ''}\n error={rawErrors.length > 0}\n rows={options.rows || 5}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds<T>(id)}\n />\n );\n}\n", "import { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport CheckboxWidget from '../CheckboxWidget/CheckboxWidget';\nimport CheckboxesWidget from '../CheckboxesWidget/CheckboxesWidget';\nimport RadioWidget from '../RadioWidget/RadioWidget';\nimport RangeWidget from '../RangeWidget/RangeWidget';\nimport SelectWidget from '../SelectWidget/SelectWidget';\nimport TextareaWidget from '../TextareaWidget/TextareaWidget';\n\nexport function generateWidgets<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): RegistryWidgetsType<T, S, F> {\n return {\n CheckboxWidget,\n CheckboxesWidget,\n RadioWidget,\n RangeWidget,\n SelectWidget,\n TextareaWidget,\n };\n}\n\nexport default generateWidgets();\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,eAAqC;;;ACCrC,IAAAC,6BAAgC;;;ACFhC,+BAA0C;AAC1C,mBAAmG;AAmB7F;AAfS,SAAR,UAA8G;AAAA,EACnH;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA6B;AAC3B,QAAM,EAAE,gBAAgB,IAAI;AAC5B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,gBAAgB,gCAAmB,aAAa;AAAA,MACvD;AAAA,MACC,GAAG;AAAA,MACJ,MAAI;AAAA,MACJ,MAAK;AAAA,MAEL,sDAAC,iCAAK,MAAK,QAAO;AAAA;AAAA,EACpB;AAEJ;;;ACvBA,IAAAC,gBAQO;AACP,IAAAC,4BAAsC;;;ACRtC,IAAAC,gBAQO;AAmHS,IAAAC,sBAAA;AA9ET,SAAS,iBAAoG;AAAA,EAClH,cAAc,CAAC;AAAA,EACf,WAAW,CAAC;AAAA,EACZ,UAAU,CAAC;AAAA,EACX,qBAAqB,EAAE,OAAO,MAAM,UAAU,MAAM;AAAA,EACpD,sBAAsB,CAAC;AACzB,GAAgC;AAC9B,QAAM,mBAAmB,YAAY;AACrC,QAAM,kBAAc,4BAAsB,QAAQ,EAAE;AACpD,QAAM,cA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IAAI,KAAK;AAChD,QAAM,WAAW,MAAM,WAAW,QAAQ,IAAI,KAAK;AACnD,SACE;AAAA,IAAC,gCAAK;AAAA,IAAL;AAAA,MACC;AAAA,MAEA,MAAM;AAAA,MACN,WAAO,2BAAW,SAAS,QAAW,WAAW,KAAK;AAAA,MACtD;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA,UAAU,YAAY;AAAA,MACrB,GAAG;AAAA,MACJ,OAAO,SAAS;AAAA,MAChB,OAAO,UAAU,SAAS;AAAA,MAC1B,MAAM,QAAQ,QAAQ;AAAA,MACtB,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,wBAAkB,mCAAsB,EAAE;AAAA;AAAA,IAdrC;AAAA,EAeP;AAEJ;;;AC3DO,SAAS,kBAIkB;AAChC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,kBAAQ,gBAAgB;;;AzBjBxB,SAAS,gBAIS;AACvB,SAAO;AAAA,IACL,WAAW,kBAA2B;AAAA,IACtC,SAAS,gBAAyB;AAAA,IAClC,sBAAsB,2BAAAC;AAAA,EACxB;AACF;AAEA,IAAO,gBAAQ,cAAc;;;ADbtB,SAAS,eAIuB;AACrC,aAAO,wBAAmB,cAAuB,CAAC;AACpD;AAEA,IAAO,yBAAQ,aAAa;;;ADJ5B,IAAO,gBAAQ;",
|
|
4
|
+
"sourcesContent": ["/**\n * @deprecated - This theme will be deleted in a future release of RJSF once we upgrade to React 19\n */\nimport SemanticUIForm from './SemanticUIForm/SemanticUIForm';\n\nexport { default as Templates, generateTemplates } from './Templates';\nexport { default as Form, generateForm } from './SemanticUIForm';\nexport { default as Theme, generateTheme } from './Theme';\nexport { default as Widgets, generateWidgets } from './Widgets';\n\nexport default SemanticUIForm;\n", "import { ComponentType } from 'react';\nimport { withTheme, FormProps } from '@rjsf/core';\nimport { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport { generateTheme } from '../Theme';\n\nexport function generateForm<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): ComponentType<FormProps<T, S, F>> {\n return withTheme<T, S, F>(generateTheme<T, S, F>());\n}\n\nexport default generateForm();\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport { ThemeProps } from '@rjsf/core';\nimport { Form as SuiForm } from 'semantic-ui-react';\n\nimport { generateTemplates } from '../Templates';\nimport { generateWidgets } from '../Widgets';\n\nexport function generateTheme<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): ThemeProps<T, S, F> {\n return {\n templates: generateTemplates<T, S, F>(),\n widgets: generateWidgets<T, S, F>(),\n _internalFormWrapper: SuiForm,\n };\n}\n\nexport default generateTheme();\n", "import { Button, Icon, ButtonProps } from 'semantic-ui-react';\nimport { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\n/** The `AddButton` renders a button that represent the `Add` action on a form\n */\nexport default function AddButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n uiSchema,\n registry,\n color,\n ...props\n}: IconButtonProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <Button\n title={translateString(TranslatableString.AddItemButton)}\n color={color as ButtonProps['color']}\n {...props}\n icon\n size='tiny'\n >\n <Icon name='plus' />\n </Button>\n );\n}\n", "import {\n ArrayFieldItemTemplateType,\n FormContextType,\n GenericObjectType,\n RJSFSchema,\n StrictRJSFSchema,\n getUiOptions,\n getTemplate,\n} from '@rjsf/utils';\nimport { Button, Grid, Segment } from 'semantic-ui-react';\n\nimport { MaybeWrap } from '../util';\n\nconst gridStyle = (vertical: boolean) => ({\n display: 'grid',\n gridTemplateColumns: `1fr ${vertical ? 65 : 150}px`,\n});\n\n/** The `ArrayFieldItemTemplate` component is the template used to render an items of an array.\n *\n * @param props - The `ArrayFieldItemTemplateType` props for the component\n */\nexport default function ArrayFieldItemTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldItemTemplateType<T, S, F>) {\n const { children, buttonsProps, hasToolbar, uiSchema, registry } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldItemButtonsTemplate = getTemplate<'ArrayFieldItemButtonsTemplate', T, S, F>(\n 'ArrayFieldItemButtonsTemplate',\n registry,\n uiOptions,\n );\n // Pull the semantic props out of the uiOptions that were put in via the ArrayFieldTemplate\n const { horizontalButtons = true, wrapItem = false } = uiOptions.semantic as GenericObjectType;\n return (\n <div className='rjsf-array-item'>\n <MaybeWrap wrap={wrapItem} component={Segment}>\n <Grid style={{ ...gridStyle(!horizontalButtons), alignItems: 'center' }}>\n <Grid.Column width={16} verticalAlign='middle'>\n {children}\n </Grid.Column>\n {hasToolbar && (\n <Grid.Column>\n <Button.Group size='mini' vertical={!horizontalButtons}>\n <ArrayFieldItemButtonsTemplate {...buttonsProps} />\n </Button.Group>\n </Grid.Column>\n )}\n </Grid>\n </MaybeWrap>\n </div>\n );\n}\n", "import { ElementType } from 'react';\nimport {\n UiSchema,\n GenericObjectType,\n getUiOptions,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n UIOptionsType,\n} from '@rjsf/utils';\n\nexport type SemanticPropsTypes<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any> = {\n formContext?: F;\n uiSchema?: UiSchema<T, S, F>;\n options?: UIOptionsType<T, S, F>;\n defaultSchemaProps?: GenericObjectType;\n defaultContextProps?: GenericObjectType;\n};\n\nexport type SemanticErrorPropsType<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n> = {\n formContext?: F;\n uiSchema?: UiSchema<T, S, F>;\n options?: UIOptionsType<T, S, F>;\n defaultProps?: GenericObjectType;\n};\n\nexport type WrapProps = GenericObjectType & {\n wrap: boolean;\n component?: ElementType;\n};\n\n/**\n * Extract props meant for semantic UI components from props that are\n * passed to Widgets, Templates and Fields.\n * @param {Object} params\n * @param {Object?} params.formContext\n * @param {Object?} params.uiSchema\n * @param {Object?} params.options\n * @param {Object?} params.defaultSchemaProps\n * @param {Object?} params.defaultContextProps\n * @returns {any}\n */\nexport function getSemanticProps<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n formContext = {} as F,\n uiSchema = {},\n options = {},\n defaultSchemaProps = { fluid: true, inverted: false },\n defaultContextProps = {},\n}: SemanticPropsTypes<T, S, F>) {\n const formContextProps = formContext.semantic;\n const schemaProps = getUiOptions<T, S, F>(uiSchema).semantic;\n const optionProps = options.semantic;\n // formContext props should overide other props\n return Object.assign(\n {},\n { ...defaultSchemaProps },\n { ...defaultContextProps },\n schemaProps,\n optionProps,\n formContextProps,\n );\n}\n\n/**\n * Extract error props meant for semantic UI components from props that are\n * passed to Widgets, Templates and Fields.\n * @param {Object} params\n * @param {Object?} params.formContext\n * @param {Object?} params.uiSchema\n * @param {Object?} params.defaultProps\n * @returns {any}\n */\nexport function getSemanticErrorProps<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({\n formContext = {} as F,\n uiSchema = {},\n options = {},\n defaultProps = { size: 'small', pointing: 'above' },\n}: SemanticErrorPropsType<T, S, F>) {\n const formContextProps = formContext.semantic && formContext.semantic.errorOptions;\n const semanticOptions: GenericObjectType = getUiOptions<T, S, F>(uiSchema).semantic as GenericObjectType;\n const schemaProps = semanticOptions && semanticOptions.errorOptions;\n const optionProps = options.semantic && (options.semantic as GenericObjectType).errorOptions;\n\n return Object.assign({}, { ...defaultProps }, schemaProps, optionProps, formContextProps);\n}\n\n/**\n * Combine multiple strings containing class names into a single string,\n * removing duplicates. E.g.\n * cleanClassNames('bar', 'baz bar', 'x y ', undefined)\n * // 'bar baz x y'\n * @param {Array} classNameArr\n * @param {Array} omit\n * @returns {string}\n */\nexport function cleanClassNames(classNameArr: Array<string | undefined>, omit: string[] = []) {\n // Split each arg on whitespace, and add it to an array. Skip false-y args\n // like \"\" and undefined.\n const classList = classNameArr\n .filter(Boolean)\n .reduce<string[]>((previous, current) => previous.concat(current!.trim().split(/\\s+/)), []);\n\n // Remove any class names from omit, and make the rest unique before\n // returning them as a string\n return [...new Set(classList.filter((cn) => !omit.includes(cn)))].join(' ');\n}\n\n/**\n *\n * @param {boolean} wrap\n * @param Component\n * @param {Object} props\n * @returns {*}\n * @constructor\n */\nexport function MaybeWrap({ wrap, component: Component = 'div', ...props }: WrapProps) {\n return wrap ? <Component {...props} /> : props.children;\n}\n", "import {\n getTemplate,\n getUiOptions,\n isFixedItems,\n ArrayFieldTemplateProps,\n ArrayFieldItemTemplateType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n UI_OPTIONS_KEY,\n buttonId,\n} from '@rjsf/utils';\n\nimport { cleanClassNames, getSemanticProps } from '../util';\n\n/** The `ArrayFieldTemplate` component is the template used to render all items in an array.\n *\n * @param props - The `ArrayFieldItemTemplateType` props for the component\n */\nexport default function ArrayFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ArrayFieldTemplateProps<T, S, F>) {\n const {\n uiSchema,\n fieldPathId,\n canAdd,\n className,\n // classNames, This is not part of the type, so it is likely never passed in\n disabled,\n items,\n onAddClick,\n // options, This is not part of the type, so it is likely never passed in\n readonly,\n required,\n schema,\n title,\n registry,\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext: registry.formContext,\n defaultSchemaProps: { horizontalButtons: true, wrapItem: false },\n });\n const { horizontalButtons, wrapItem } = semanticProps;\n const semantic = { horizontalButtons, wrapItem };\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const ArrayFieldDescriptionTemplate = getTemplate<'ArrayFieldDescriptionTemplate', T, S, F>(\n 'ArrayFieldDescriptionTemplate',\n registry,\n uiOptions,\n );\n const ArrayFieldItemTemplate = getTemplate<'ArrayFieldItemTemplate', T, S, F>(\n 'ArrayFieldItemTemplate',\n registry,\n uiOptions,\n );\n const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>(\n 'ArrayFieldTitleTemplate',\n registry,\n uiOptions,\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <div className={cleanClassNames([className, isFixedItems<S>(schema) ? '' : 'sortable-form-fields'])}>\n <ArrayFieldTitleTemplate\n fieldPathId={fieldPathId}\n title={uiOptions.title || title}\n schema={schema}\n uiSchema={uiSchema}\n required={required}\n registry={registry}\n />\n <ArrayFieldDescriptionTemplate\n fieldPathId={fieldPathId}\n description={uiOptions.description || schema.description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n <div key={`array-item-list-${fieldPathId.$id}`}>\n <div className='row array-item-list'>\n {items &&\n items.map(({ key, uiSchema: itemUiSchema = {}, ...props }: ArrayFieldItemTemplateType<T, S, F>) => {\n // Merge in the semantic props from the ArrayFieldTemplate into each of the items\n const mergedUiSchema = {\n ...itemUiSchema,\n [UI_OPTIONS_KEY]: {\n ...itemUiSchema[UI_OPTIONS_KEY],\n semantic,\n },\n };\n return <ArrayFieldItemTemplate key={key} {...props} uiSchema={mergedUiSchema} />;\n })}\n </div>\n {canAdd && (\n <div\n style={{\n marginTop: '1rem',\n position: 'relative',\n textAlign: 'right',\n }}\n >\n <AddButton\n id={buttonId(fieldPathId, 'add')}\n className='rjsf-array-item-add'\n onClick={onAddClick}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n )}\n </div>\n </div>\n );\n}\n", "import { ChangeEvent } from 'react';\nimport { Form } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\nimport {\n ariaDescribedByIds,\n BaseInputTemplateProps,\n examplesId,\n getInputProps,\n labelValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n} from '@rjsf/utils';\n\n/** The `BaseInputTemplate` is the template to use to render the basic `<input>` component for the `core` theme.\n * It is used as the template for rendering many of the <input> based widgets that differ by `type` and callbacks only.\n * It can be customized/overridden for other themes or individual implementations as needed.\n *\n * @param props - The `WidgetProps` for this template\n */\nexport default function BaseInputTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: BaseInputTemplateProps<T, S, F>) {\n const {\n id,\n placeholder,\n label,\n hideLabel,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onChangeOverride,\n onBlur,\n onFocus,\n autofocus,\n options,\n schema,\n uiSchema,\n registry,\n type,\n rawErrors = [],\n } = props;\n const inputProps = getInputProps<T, S, F>(schema, type, options);\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext: registry.formContext,\n options,\n });\n const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>\n onChange(value === '' ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n\n return (\n <>\n <Form.Input\n key={id}\n id={id}\n name={id}\n placeholder={placeholder}\n {...inputProps}\n label={labelValue(label || undefined, hideLabel, false)}\n required={required}\n autoFocus={autofocus}\n disabled={disabled || readonly}\n list={schema.examples ? examplesId(id) : undefined}\n {...semanticProps}\n value={value || value === 0 ? value : ''}\n error={rawErrors.length > 0}\n onChange={onChangeOverride || _onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds(id, !!schema.examples)}\n />\n {Array.isArray(schema.examples) && (\n <datalist id={examplesId(id)}>\n {(schema.examples as string[])\n .concat(schema.default && !schema.examples.includes(schema.default) ? ([schema.default] as string[]) : [])\n .map((example) => {\n return <option key={example} value={example} />;\n })}\n </datalist>\n )}\n </>\n );\n}\n", "import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport { RichDescription } from '@rjsf/core';\n\n/** The `DescriptionField` is the template to use to render the description of a field\n *\n * @param props - The `DescriptionFieldProps` for this component\n */\nexport default function DescriptionField<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: DescriptionFieldProps<T, S, F>) {\n const { id, description, registry, uiSchema } = props;\n if (!description) {\n return null;\n }\n return (\n <p id={id} className='sui-description'>\n <RichDescription description={description} registry={registry} uiSchema={uiSchema} />\n </p>\n );\n}\n", "import { Message } from 'semantic-ui-react';\nimport { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\n/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`\n *\n * @param props - The `ErrorListProps` for this component\n */\nexport default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n errors,\n registry,\n}: ErrorListProps<T, S, F>) {\n const { translateString } = registry;\n return (\n <Message negative>\n <Message.Header>{translateString(TranslatableString.ErrorsLabel)}</Message.Header>\n <Message.List>\n {errors.map((error, index) => (\n <Message.Item key={`error-${index}`}>{error.stack}</Message.Item>\n ))}\n </Message.List>\n </Message>\n );\n}\n", "import { Button, ButtonProps } from 'semantic-ui-react';\nimport { FormContextType, IconButtonProps, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\n\nfunction IconButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const { icon, iconType, color, className, uiSchema, registry, ...otherProps } = props;\n return (\n <Button\n icon={icon}\n size={iconType as ButtonProps['size']}\n color={color as ButtonProps['color']}\n className={className}\n {...otherProps}\n />\n );\n}\n\nexport default IconButton;\n\nexport function CopyButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.CopyButton)} {...props} icon='copy' />;\n}\n\nexport function MoveDownButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveDownButton)} {...props} icon='angle down' />;\n}\n\nexport function MoveUpButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.MoveUpButton)} {...props} icon='angle up' />;\n}\n\nexport function RemoveButton<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: IconButtonProps<T, S, F>,\n) {\n const {\n registry: { translateString },\n } = props;\n return <IconButton title={translateString(TranslatableString.RemoveButton)} {...props} icon='trash' />;\n}\n", "import { errorId, FieldErrorProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport uniqueId from 'lodash/uniqueId';\nimport { Label, List } from 'semantic-ui-react';\n\nimport { getSemanticErrorProps } from '../util';\n\nconst DEFAULT_OPTIONS = {\n options: {\n pointing: 'above',\n size: 'small',\n },\n};\n\n/** The `FieldErrorTemplate` component renders the errors local to the particular field\n *\n * @param props - The `FieldErrorProps` for the errors being rendered\n */\nexport default function FieldErrorTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({ errors, fieldPathId, uiSchema, registry }: FieldErrorProps<T, S, F>) {\n const { formContext } = registry;\n const options = getSemanticErrorProps<T, S, F>({\n formContext,\n uiSchema,\n defaultProps: DEFAULT_OPTIONS,\n });\n const { pointing, size } = options;\n if (errors && errors.length > 0) {\n const id = errorId(fieldPathId);\n return (\n <Label id={id} color='red' pointing={pointing || 'above'} size={size || 'small'} basic>\n <List bulleted>\n {errors.map((error) => (\n <List.Item key={uniqueId('field-error-')}>{error}</List.Item>\n ))}\n </List>\n </Label>\n );\n }\n return null;\n}\n", "import { Message } from 'semantic-ui-react';\nimport { FieldHelpProps, FormContextType, RJSFSchema, StrictRJSFSchema, helpId } from '@rjsf/utils';\n\n/** The `FieldHelpTemplate` component renders any help desired for a field\n *\n * @param props - The `FieldHelpProps` to be rendered\n */\nexport default function FieldHelpTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldHelpProps<T, S, F>) {\n const { fieldPathId, help } = props;\n if (help) {\n const id = helpId(fieldPathId);\n return <Message size='mini' info id={id} content={help} />;\n }\n return null;\n}\n", "import {\n FieldTemplateProps,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n getTemplate,\n getUiOptions,\n} from '@rjsf/utils';\nimport { Form } from 'semantic-ui-react';\nimport { getSemanticProps, MaybeWrap } from '../util';\n\n/** The `FieldTemplate` component is the template used by `SchemaField` to render any field. It renders the field\n * content, (label, description, children, errors and help) inside of a `WrapIfAdditional` component.\n *\n * @param props - The `FieldTemplateProps` for this component\n */\nexport default function FieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: FieldTemplateProps<T, S, F>) {\n const {\n id,\n children,\n classNames,\n style,\n displayLabel,\n label,\n errors,\n help,\n hidden,\n description,\n rawDescription,\n registry,\n schema,\n uiSchema,\n ...otherProps\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n ...otherProps,\n formContext: registry.formContext,\n });\n const { wrapLabel, wrapContent } = semanticProps;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const WrapIfAdditionalTemplate = getTemplate<'WrapIfAdditionalTemplate', T, S, F>(\n 'WrapIfAdditionalTemplate',\n registry,\n uiOptions,\n );\n\n if (hidden) {\n return <div style={{ display: 'none' }}>{children}</div>;\n }\n\n return (\n <WrapIfAdditionalTemplate\n classNames={classNames}\n style={style}\n id={id}\n label={label}\n registry={registry}\n schema={schema}\n uiSchema={uiSchema}\n {...otherProps}\n >\n <Form.Group key={id} widths='equal' grouped>\n <MaybeWrap wrap={wrapContent} className='sui-field-content'>\n {children}\n {displayLabel && rawDescription && (\n <MaybeWrap wrap={wrapLabel} className='sui-field-label'>\n {description}\n </MaybeWrap>\n )}\n {help}\n {errors}\n </MaybeWrap>\n </Form.Group>\n </WrapIfAdditionalTemplate>\n );\n}\n", "import { Grid } from 'semantic-ui-react';\nimport { GridTemplateProps } from '@rjsf/utils';\n\n/** Renders a `GridTemplate` for semantic-ui, which is expecting the column sizing information coming in via the\n * extra props provided by the caller, which are spread directly on the `Flex`.\n *\n * @param props - The GridTemplateProps, including the extra props containing the semantic-ui grid positioning details\n */\nexport default function GridTemplate(props: GridTemplateProps) {\n const { children, column, ...rest } = props;\n if (column) {\n return <Grid.Column {...rest}>{children}</Grid.Column>;\n }\n return <Grid {...rest}>{children}</Grid>;\n}\n", "import { FormContextType, MultiSchemaFieldTemplateProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nexport default function MultiSchemaFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: MultiSchemaFieldTemplateProps<T, S, F>) {\n const { selector, optionSchemaField } = props;\n\n return (\n <div>\n <div>{selector}</div>\n {optionSchemaField}\n </div>\n );\n}\n", "import { Grid } from 'semantic-ui-react';\nimport {\n FormContextType,\n ObjectFieldTemplateProps,\n RJSFSchema,\n StrictRJSFSchema,\n canExpand,\n descriptionId,\n getTemplate,\n getUiOptions,\n titleId,\n buttonId,\n} from '@rjsf/utils';\n\n/** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the\n * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all\n * the properties.\n *\n * @param props - The `ObjectFieldTemplateProps` for this component\n */\nexport default function ObjectFieldTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: ObjectFieldTemplateProps<T, S, F>) {\n const {\n description,\n onAddClick,\n title,\n properties,\n disabled,\n readonly,\n required,\n uiSchema,\n schema,\n formData,\n fieldPathId,\n registry,\n } = props;\n const uiOptions = getUiOptions<T, S, F>(uiSchema);\n const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, uiOptions);\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n uiOptions,\n );\n // Button templates are not overridden in the uiSchema\n const {\n ButtonTemplates: { AddButton },\n } = registry.templates;\n return (\n <>\n {title && (\n <TitleFieldTemplate\n id={titleId(fieldPathId)}\n title={title}\n required={required}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {description && (\n <DescriptionFieldTemplate\n id={descriptionId(fieldPathId)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n {properties.map((prop) => prop.content)}\n {canExpand<T, S, F>(schema, uiSchema, formData) && (\n <Grid.Column width={16} verticalAlign='middle'>\n <Grid.Row>\n <div\n style={{\n marginTop: '1rem',\n position: 'relative',\n textAlign: 'right',\n }}\n >\n <AddButton\n id={buttonId(fieldPathId, 'add')}\n className='rjsf-object-property-expand'\n onClick={onAddClick(schema)}\n disabled={disabled || readonly}\n uiSchema={uiSchema}\n registry={registry}\n />\n </div>\n </Grid.Row>\n </Grid.Column>\n )}\n </>\n );\n}\n", "import { Button } from 'semantic-ui-react';\nimport { getSubmitButtonOptions, FormContextType, RJSFSchema, StrictRJSFSchema, SubmitButtonProps } from '@rjsf/utils';\n\n/** The `SubmitButton` renders a button that represent the `Submit` action on a form\n */\nexport default function SubmitButton<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>({ uiSchema }: SubmitButtonProps<T, S, F>) {\n const { submitText, norender, props: submitButtonProps = {} } = getSubmitButtonOptions<T, S, F>(uiSchema);\n if (norender) {\n return null;\n }\n return (\n <Button type='submit' primary {...submitButtonProps}>\n {submitText}\n </Button>\n );\n}\n", "import { FormContextType, TitleFieldProps, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\nimport { Header } from 'semantic-ui-react';\n\nimport { getSemanticProps } from '../util';\n\nconst DEFAULT_OPTIONS = {\n inverted: false,\n dividing: true,\n};\n\n/** The `TitleField` is the template to use to render the title of a field\n *\n * @param props - The `TitleFieldProps` for this component\n */\nexport default function TitleField<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n id,\n title,\n uiSchema,\n}: TitleFieldProps<T, S, F>) {\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n defaultSchemaProps: DEFAULT_OPTIONS,\n });\n if (!title) {\n return null;\n }\n return (\n <Header id={id} {...semanticProps} as='h5'>\n {title}\n </Header>\n );\n}\n", "import { FocusEvent } from 'react';\nimport {\n ADDITIONAL_PROPERTY_FLAG,\n buttonId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n TranslatableString,\n WrapIfAdditionalTemplateProps,\n} from '@rjsf/utils';\nimport { Form, Grid } from 'semantic-ui-react';\n\n/** The `WrapIfAdditional` component is used by the `FieldTemplate` to rename, or remove properties that are\n * part of an `additionalProperties` part of a schema.\n *\n * @param props - The `WrapIfAdditionalProps` for this component\n */\nexport default function WrapIfAdditionalTemplate<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WrapIfAdditionalTemplateProps<T, S, F>) {\n const {\n children,\n classNames,\n style,\n disabled,\n id,\n label,\n onDropPropertyClick,\n onKeyChange,\n readonly,\n required,\n schema,\n uiSchema,\n registry,\n } = props;\n const { templates, translateString } = registry;\n // Button templates are not overridden in the uiSchema\n const { RemoveButton } = templates.ButtonTemplates;\n const keyLabel = translateString(TranslatableString.KeyLabel, [label]);\n const { readonlyAsDisabled = true, wrapperStyle } = registry.formContext;\n\n const additional = ADDITIONAL_PROPERTY_FLAG in schema;\n\n if (!additional) {\n return (\n <div className={classNames} style={style}>\n {children}\n </div>\n );\n }\n\n const handleBlur = ({ target }: FocusEvent<HTMLInputElement>) => onKeyChange(target.value);\n\n return (\n <div className={classNames} style={style} key={`${id}-key`}>\n <Grid columns='equal'>\n <Grid.Row>\n <Grid.Column className='form-additional'>\n <Form.Group widths='equal' grouped>\n <Form.Input\n className='form-group'\n hasFeedback\n fluid\n htmlFor={`${id}`}\n label={keyLabel}\n required={required}\n defaultValue={label}\n disabled={disabled || (readonlyAsDisabled && readonly)}\n id={`${id}`}\n name={`${id}`}\n onBlur={!readonly ? handleBlur : undefined}\n style={wrapperStyle}\n type='text'\n ></Form.Input>\n </Form.Group>\n </Grid.Column>\n <Grid.Column className='form-additional' verticalAlign='middle'>\n {children}\n </Grid.Column>\n <Grid.Column>\n <RemoveButton\n id={buttonId(id, 'remove')}\n iconType='mini'\n className='rjsf-object-property-remove'\n disabled={disabled || readonly}\n onClick={onDropPropertyClick(label)}\n uiSchema={uiSchema}\n registry={registry}\n />\n </Grid.Column>\n </Grid.Row>\n </Grid>\n </div>\n );\n}\n", "import { FormContextType, RJSFSchema, StrictRJSFSchema, TemplatesType } from '@rjsf/utils';\n\nimport AddButton from '../AddButton';\nimport ArrayFieldItemTemplate from '../ArrayFieldItemTemplate';\nimport ArrayFieldTemplate from '../ArrayFieldTemplate';\nimport BaseInputTemplate from '../BaseInputTemplate';\nimport DescriptionField from '../DescriptionField';\nimport ErrorList from '../ErrorList';\nimport { CopyButton, MoveDownButton, MoveUpButton, RemoveButton } from '../IconButton';\nimport FieldErrorTemplate from '../FieldErrorTemplate';\nimport FieldHelpTemplate from '../FieldHelpTemplate';\nimport FieldTemplate from '../FieldTemplate';\nimport GridTemplate from '../GridTemplate';\nimport MultiSchemaFieldTemplate from '../MultiSchemaFieldTemplate';\nimport ObjectFieldTemplate from '../ObjectFieldTemplate';\nimport SubmitButton from '../SubmitButton';\nimport TitleField from '../TitleField';\nimport WrapIfAdditionalTemplate from '../WrapIfAdditionalTemplate';\n\nexport function generateTemplates<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): Partial<TemplatesType<T, S, F>> {\n return {\n ArrayFieldItemTemplate,\n ArrayFieldTemplate,\n BaseInputTemplate,\n ButtonTemplates: {\n AddButton,\n CopyButton,\n MoveDownButton,\n MoveUpButton,\n RemoveButton,\n SubmitButton,\n },\n DescriptionFieldTemplate: DescriptionField,\n ErrorListTemplate: ErrorList,\n FieldErrorTemplate,\n FieldHelpTemplate,\n FieldTemplate,\n GridTemplate,\n MultiSchemaFieldTemplate,\n ObjectFieldTemplate,\n TitleFieldTemplate: TitleField,\n WrapIfAdditionalTemplate,\n };\n}\n\nexport default generateTemplates();\n", "import { FormEvent } from 'react';\nimport {\n ariaDescribedByIds,\n descriptionId,\n getTemplate,\n labelValue,\n schemaRequiresTrueValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\nimport { Form, CheckboxProps } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\n\n/** The `CheckBoxWidget` is a widget for rendering boolean properties.\n * It is typically used to represent a boolean.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function CheckboxWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n value,\n disabled,\n readonly,\n label = '',\n hideLabel,\n autofocus,\n onChange,\n onBlur,\n options,\n onFocus,\n schema,\n uiSchema,\n rawErrors = [],\n registry,\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n options,\n formContext: registry.formContext,\n uiSchema,\n defaultSchemaProps: {\n inverted: 'false',\n },\n });\n const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>(\n 'DescriptionFieldTemplate',\n registry,\n options,\n );\n // Because an unchecked checkbox will cause html5 validation to fail, only add\n // the \"required\" attribute if the field value must be \"true\", due to the\n // \"const\" or \"enum\" keywords\n const required = schemaRequiresTrueValue<S>(schema);\n const checked = value == 'true' || value == true;\n const _onChange = (_: FormEvent<HTMLInputElement>, data: CheckboxProps) => onChange && onChange(data.checked);\n const _onBlur: React.FocusEventHandler<HTMLInputElement> = () => onBlur && onBlur(id, value);\n const _onFocus: React.FocusEventHandler<HTMLInputElement> = () => onFocus && onFocus(id, value);\n const description = options.description ?? schema.description;\n\n return (\n <>\n {!hideLabel && description && (\n <DescriptionFieldTemplate\n id={descriptionId(id)}\n description={description}\n schema={schema}\n uiSchema={uiSchema}\n registry={registry}\n />\n )}\n <Form.Checkbox\n id={id}\n name={id}\n disabled={disabled || readonly}\n autoFocus={autofocus}\n {...semanticProps}\n checked={typeof value === 'undefined' ? false : checked}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n required={required}\n label={labelValue(label, hideLabel, false)}\n aria-describedby={ariaDescribedByIds(id)}\n />\n </>\n );\n}\n", "import { ChangeEvent } from 'react';\nimport { Form } from 'semantic-ui-react';\nimport {\n ariaDescribedByIds,\n enumOptionsDeselectValue,\n enumOptionsIsSelected,\n enumOptionsSelectValue,\n getTemplate,\n optionId,\n titleId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\nimport { getSemanticProps } from '../util';\n\n/** The `CheckboxesWidget` is a widget for rendering checkbox groups.\n * It is typically used to represent an array of enums.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function CheckboxesWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n disabled,\n options,\n value,\n autofocus,\n readonly,\n label,\n hideLabel,\n onChange,\n onBlur,\n onFocus,\n schema,\n uiSchema,\n rawErrors = [],\n registry,\n } = props;\n const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, options);\n const { enumOptions, enumDisabled, inline } = options;\n const checkboxesValues = Array.isArray(value) ? value : [value];\n const semanticProps = getSemanticProps<T, S, F>({\n options,\n formContext: registry.formContext,\n uiSchema,\n defaultSchemaProps: {\n inverted: 'false',\n },\n });\n const _onChange =\n (index: number) =>\n ({ target: { checked } }: ChangeEvent<HTMLInputElement>) => {\n // eslint-disable-next-line no-shadow\n if (checked) {\n onChange(enumOptionsSelectValue<S>(index, checkboxesValues, enumOptions));\n } else {\n onChange(enumOptionsDeselectValue<S>(index, checkboxesValues, enumOptions));\n }\n };\n\n const _onBlur = () => onBlur(id, value);\n const _onFocus = () => onFocus(id, value);\n const inlineOption = inline ? { inline: true } : { grouped: true };\n return (\n <>\n {!hideLabel && !!label && (\n <TitleFieldTemplate id={titleId(id)} title={label} schema={schema} uiSchema={uiSchema} registry={registry} />\n )}\n <Form.Group id={id} name={id} {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, checkboxesValues);\n const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;\n return (\n <Form.Checkbox\n id={optionId(id, index)}\n name={id}\n key={index}\n label={option.label}\n {...semanticProps}\n checked={checked}\n error={rawErrors.length > 0}\n disabled={disabled || itemDisabled || readonly}\n autoFocus={autofocus && index === 0}\n onChange={_onChange(index)}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds(id)}\n />\n );\n })}\n </Form.Group>\n </>\n );\n}\n", "import { FormEvent } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsIsSelected,\n enumOptionsValueForIndex,\n optionId,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\nimport { CheckboxProps, Form, Radio } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\n\n/** The `RadioWidget` is a widget for rendering a radio group.\n * It is typically used with a string property constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RadioWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const {\n id,\n value,\n required,\n disabled,\n readonly,\n onChange,\n onBlur,\n onFocus,\n options,\n registry,\n uiSchema,\n rawErrors = [],\n } = props;\n const { enumOptions, enumDisabled, emptyValue } = options;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext: registry.formContext,\n options,\n uiSchema,\n });\n const _onChange = (_: FormEvent<HTMLInputElement>, { value: eventValue }: CheckboxProps) => {\n return onChange(enumOptionsValueForIndex<S>(eventValue!, enumOptions, emptyValue));\n };\n\n const _onBlur = () => onBlur(id, value);\n const _onFocus = () => onFocus(id, value);\n const inlineOption = options.inline ? { inline: true } : { grouped: true };\n return (\n <Form.Group {...inlineOption}>\n {Array.isArray(enumOptions) &&\n enumOptions.map((option, index) => {\n const checked = enumOptionsIsSelected<S>(option.value, value);\n const itemDisabled = Array.isArray(enumDisabled) && enumDisabled.indexOf(option.value) !== -1;\n return (\n <Form.Field\n required={required}\n control={Radio}\n id={optionId(id, index)}\n name={id}\n {...semanticProps}\n onFocus={_onFocus}\n onBlur={_onBlur}\n onChange={_onChange}\n label={option.label}\n value={String(index)}\n error={rawErrors.length > 0}\n key={index}\n checked={checked}\n disabled={disabled || itemDisabled || readonly}\n aria-describedby={ariaDescribedByIds(id)}\n />\n );\n })}\n </Form.Group>\n );\n}\n", "import { ChangeEvent } from 'react';\nimport { Input } from 'semantic-ui-react';\nimport { ariaDescribedByIds, FormContextType, RJSFSchema, StrictRJSFSchema, WidgetProps, rangeSpec } from '@rjsf/utils';\nimport { getSemanticProps } from '../util';\n\n/** The `RangeWidget` component uses the `BaseInputTemplate` changing the type to `range` and wrapping the result\n * in a div, with the value along side it.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function RangeWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const {\n id,\n value,\n required,\n readonly,\n disabled,\n onChange,\n onBlur,\n onFocus,\n options,\n schema,\n uiSchema,\n registry,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext: registry.formContext,\n options,\n uiSchema,\n defaultSchemaProps: {\n fluid: true,\n },\n });\n\n // eslint-disable-next-line no-shadow\n const _onChange = ({ target: { value } }: ChangeEvent<HTMLInputElement>) =>\n onChange && onChange(value === '' ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n\n return (\n <>\n <Input\n id={id}\n key={id}\n name={id}\n type='range'\n required={required}\n disabled={disabled || readonly}\n {...rangeSpec<S>(schema)}\n {...semanticProps}\n value={value || ''}\n error={rawErrors.length > 0}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds(id)}\n />\n <span>{value}</span>\n </>\n );\n}\n", "import { FocusEvent, SyntheticEvent } from 'react';\nimport {\n ariaDescribedByIds,\n enumOptionsIndexForValue,\n enumOptionsValueForIndex,\n labelValue,\n EnumOptionsType,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n UIOptionsType,\n} from '@rjsf/utils';\nimport map from 'lodash/map';\nimport { Form, DropdownProps, DropdownItemProps } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\n\n/**\n * Returns and creates an array format required for semantic drop down\n * @param {array} enumOptions - array of items for the dropdown\n * @param {array} enumDisabled - array of enum option values to disable\n * @param {boolean} showPlaceholderOption - whether to show a placeholder option\n * @param {string} placeholder - placeholder option label\n * @returns {*}\n */\nfunction createDefaultValueOptionsForDropDown<S extends StrictRJSFSchema = RJSFSchema>(\n enumOptions?: EnumOptionsType<S>[],\n enumDisabled?: UIOptionsType['enumDisabled'],\n showPlaceholderOption?: boolean,\n placeholder?: string,\n) {\n const disabledOptions = enumDisabled || [];\n const options: DropdownItemProps[] = map(enumOptions, ({ label, value }, index) => ({\n disabled: disabledOptions.indexOf(value) !== -1,\n key: label,\n text: label,\n value: String(index),\n }));\n if (showPlaceholderOption) {\n options.unshift({ value: '', text: placeholder || '' });\n }\n return options;\n}\n\n/** The `SelectWidget` is a widget for rendering dropdowns.\n * It is typically used with string properties constrained with enum options.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function SelectWidget<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>(\n props: WidgetProps<T, S, F>,\n) {\n const {\n uiSchema,\n registry,\n id,\n options,\n label,\n hideLabel,\n required,\n disabled,\n readonly,\n value,\n multiple,\n placeholder,\n autofocus,\n onChange,\n onBlur,\n onFocus,\n rawErrors = [],\n schema,\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n uiSchema,\n formContext: registry.formContext,\n options,\n defaultSchemaProps: {\n inverted: 'false',\n selection: true,\n fluid: true,\n scrolling: true,\n upward: false,\n },\n });\n const { enumDisabled, enumOptions, emptyValue: optEmptyVal } = options;\n const emptyValue = multiple ? [] : '';\n const showPlaceholderOption = !multiple && schema.default === undefined;\n const dropdownOptions = createDefaultValueOptionsForDropDown<S>(\n enumOptions,\n enumDisabled,\n showPlaceholderOption,\n placeholder,\n );\n const _onChange = (_: SyntheticEvent<HTMLElement>, { value }: DropdownProps) =>\n onChange(enumOptionsValueForIndex<S>(value as string[], enumOptions, optEmptyVal));\n // eslint-disable-next-line no-shadow\n const _onBlur = (_: FocusEvent<HTMLElement>, { target }: DropdownProps) =>\n onBlur(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, optEmptyVal));\n const _onFocus = (_: FocusEvent<HTMLElement>, { target }: DropdownProps) =>\n onFocus(id, enumOptionsValueForIndex<S>(target && target.value, enumOptions, optEmptyVal));\n const selectedIndexes = enumOptionsIndexForValue<S>(value, enumOptions, multiple);\n\n return (\n <Form.Dropdown\n key={id}\n id={id}\n name={id}\n label={labelValue(label || undefined, hideLabel, false)}\n multiple={typeof multiple === 'undefined' ? false : multiple}\n value={typeof value === 'undefined' ? emptyValue : selectedIndexes}\n error={rawErrors.length > 0}\n disabled={disabled}\n placeholder={placeholder}\n {...semanticProps}\n required={required}\n autoFocus={autofocus}\n readOnly={readonly}\n options={dropdownOptions}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds(id)}\n />\n );\n}\n", "import { ChangeEvent } from 'react';\nimport {\n ariaDescribedByIds,\n labelValue,\n FormContextType,\n RJSFSchema,\n StrictRJSFSchema,\n WidgetProps,\n} from '@rjsf/utils';\nimport { Form } from 'semantic-ui-react';\nimport { getSemanticProps } from '../util';\n\n/** The `TextareaWidget` is a widget for rendering input fields as textarea.\n *\n * @param props - The `WidgetProps` for this component\n */\nexport default function TextareaWidget<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(props: WidgetProps<T, S, F>) {\n const {\n id,\n placeholder,\n value,\n required,\n disabled,\n autofocus,\n label,\n hideLabel,\n readonly,\n onBlur,\n onFocus,\n onChange,\n options,\n registry,\n rawErrors = [],\n } = props;\n const semanticProps = getSemanticProps<T, S, F>({\n formContext: registry.formContext,\n options,\n defaultSchemaProps: { inverted: 'false' },\n });\n // eslint-disable-next-line no-shadow\n const _onChange = ({ target: { value } }: ChangeEvent<HTMLTextAreaElement>) =>\n onChange && onChange(value === '' ? options.emptyValue : value);\n const _onBlur = () => onBlur && onBlur(id, value);\n const _onFocus = () => onFocus && onFocus(id, value);\n return (\n <Form.TextArea\n id={id}\n key={id}\n name={id}\n label={labelValue(label || undefined, hideLabel, false)}\n placeholder={placeholder}\n autoFocus={autofocus}\n required={required}\n disabled={disabled || readonly}\n {...semanticProps}\n value={value || ''}\n error={rawErrors.length > 0}\n rows={options.rows || 5}\n onChange={_onChange}\n onBlur={_onBlur}\n onFocus={_onFocus}\n aria-describedby={ariaDescribedByIds(id)}\n />\n );\n}\n", "import { FormContextType, RegistryWidgetsType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';\n\nimport CheckboxWidget from '../CheckboxWidget/CheckboxWidget';\nimport CheckboxesWidget from '../CheckboxesWidget/CheckboxesWidget';\nimport RadioWidget from '../RadioWidget/RadioWidget';\nimport RangeWidget from '../RangeWidget/RangeWidget';\nimport SelectWidget from '../SelectWidget/SelectWidget';\nimport TextareaWidget from '../TextareaWidget/TextareaWidget';\n\nexport function generateWidgets<\n T = any,\n S extends StrictRJSFSchema = RJSFSchema,\n F extends FormContextType = any,\n>(): RegistryWidgetsType<T, S, F> {\n return {\n CheckboxWidget,\n CheckboxesWidget,\n RadioWidget,\n RangeWidget,\n SelectWidget,\n TextareaWidget,\n };\n}\n\nexport default generateWidgets();\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACCA,IAAAA,eAAqC;;;ACCrC,IAAAC,6BAAgC;;;ACFhC,+BAA0C;AAC1C,mBAAmG;AAmB7F;AAfS,SAAR,UAA8G;AAAA,EACnH;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,GAA6B;AAC3B,QAAM,EAAE,gBAAgB,IAAI;AAC5B,SACE;AAAA,IAAC;AAAA;AAAA,MACC,OAAO,gBAAgB,gCAAmB,aAAa;AAAA,MACvD;AAAA,MACC,GAAG;AAAA,MACJ,MAAI;AAAA,MACJ,MAAK;AAAA,MAEL,sDAAC,iCAAK,MAAK,QAAO;AAAA;AAAA,EACpB;AAEJ;;;ACvBA,IAAAC,gBAQO;AACP,IAAAC,4BAAsC;;;ACRtC,IAAAC,gBAQO;AAmHS,IAAAC,sBAAA;AA9ET,SAAS,iBAAoG;AAAA,EAClH,cAAc,CAAC;AAAA,EACf,WAAW,CAAC;AAAA,EACZ,UAAU,CAAC;AAAA,EACX,qBAAqB,EAAE,OAAO,MAAM,UAAU,MAAM;AAAA,EACpD,sBAAsB,CAAC;AACzB,GAAgC;AAC9B,QAAM,mBAAmB,YAAY;AACrC,QAAM,kBAAc,4BAAsB,QAAQ,EAAE;AACpD,QAAM,cAAc,QAAQ;AAE5B,SAAO,OAAO;AAAA,IACZ,CAAC;AAAA,IACD,EAAE,GAAG,mBAAmB;AAAA,IACxB,EAAE,GAAG,oBAAoB;AA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A,MAAM;AAAA,MACN,WAAO,2BAAW,SAAS,QAAW,WAAW,KAAK;AAAA,MACtD;AAAA,MACA,WAAW;AAAA,MACX;AAAA,MACA,UAAU,YAAY;AAAA,MACrB,GAAG;AAAA,MACJ,OAAO,SAAS;AAAA,MAChB,OAAO,UAAU,SAAS;AAAA,MAC1B,MAAM,QAAQ,QAAQ;AAAA,MACtB,UAAU;AAAA,MACV,QAAQ;AAAA,MACR,SAAS;AAAA,MACT,wBAAkB,mCAAmB,EAAE;AAAA;AAAA,IAdlC;AAAA,EAeP;AAEJ;;;AC3DO,SAAS,kBAIkB;AAChC,SAAO;AAAA,IACL;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF;AACF;AAEA,IAAO,kBAAQ,gBAAgB;;;AzBjBxB,SAAS,gBAIS;AACvB,SAAO;AAAA,IACL,WAAW,kBAA2B;AAAA,IACtC,SAAS,gBAAyB;AAAA,IAClC,sBAAsB,2BAAAC;AAAA,EACxB;AACF;AAEA,IAAO,gBAAQ,cAAc;;;ADbtB,SAAS,eAIuB;AACrC,aAAO,wBAAmB,cAAuB,CAAC;AACpD;AAEA,IAAO,yBAAQ,aAAa;;;ADJ5B,IAAO,gBAAQ;",
|
|
6
6
|
"names": ["import_core", "import_semantic_ui_react", "import_utils", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "import_jsx_runtime", "import_utils", "import_jsx_runtime", "ArrayFieldItemTemplate", "AddButton", "props", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "value", "import_jsx_runtime", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "import_utils", "import_semantic_ui_react", "import_jsx_runtime", "uniqueId", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "import_utils", "import_semantic_ui_react", "import_jsx_runtime", "WrapIfAdditionalTemplate", "import_semantic_ui_react", "import_jsx_runtime", "import_jsx_runtime", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "AddButton", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "import_semantic_ui_react", "import_jsx_runtime", "DEFAULT_OPTIONS", "import_utils", "import_semantic_ui_react", "import_jsx_runtime", "RemoveButton", "import_utils", "import_semantic_ui_react", "import_jsx_runtime", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "import_utils", "import_semantic_ui_react", "import_jsx_runtime", "import_semantic_ui_react", "import_utils", "import_jsx_runtime", "value", "import_utils", "import_semantic_ui_react", "import_jsx_runtime", "map", "value", "import_utils", "import_semantic_ui_react", "import_jsx_runtime", "value", "SuiForm"]
|
|
7
7
|
}
|
package/dist/semantic-ui.esm.js
CHANGED
|
@@ -112,7 +112,7 @@ import { jsx as jsx4, jsxs as jsxs2 } from "react/jsx-runtime";
|
|
|
112
112
|
function ArrayFieldTemplate(props) {
|
|
113
113
|
const {
|
|
114
114
|
uiSchema,
|
|
115
|
-
|
|
115
|
+
fieldPathId,
|
|
116
116
|
canAdd,
|
|
117
117
|
className,
|
|
118
118
|
// classNames, This is not part of the type, so it is likely never passed in
|
|
@@ -156,7 +156,7 @@ function ArrayFieldTemplate(props) {
|
|
|
156
156
|
/* @__PURE__ */ jsx4(
|
|
157
157
|
ArrayFieldTitleTemplate,
|
|
158
158
|
{
|
|
159
|
-
|
|
159
|
+
fieldPathId,
|
|
160
160
|
title: uiOptions.title || title,
|
|
161
161
|
schema,
|
|
162
162
|
uiSchema,
|
|
@@ -167,7 +167,7 @@ function ArrayFieldTemplate(props) {
|
|
|
167
167
|
/* @__PURE__ */ jsx4(
|
|
168
168
|
ArrayFieldDescriptionTemplate,
|
|
169
169
|
{
|
|
170
|
-
|
|
170
|
+
fieldPathId,
|
|
171
171
|
description: uiOptions.description || schema.description,
|
|
172
172
|
schema,
|
|
173
173
|
uiSchema,
|
|
@@ -196,7 +196,7 @@ function ArrayFieldTemplate(props) {
|
|
|
196
196
|
children: /* @__PURE__ */ jsx4(
|
|
197
197
|
AddButton2,
|
|
198
198
|
{
|
|
199
|
-
id: buttonId(
|
|
199
|
+
id: buttonId(fieldPathId, "add"),
|
|
200
200
|
className: "rjsf-array-item-add",
|
|
201
201
|
onClick: onAddClick,
|
|
202
202
|
disabled: disabled || readonly,
|
|
@@ -206,7 +206,7 @@ function ArrayFieldTemplate(props) {
|
|
|
206
206
|
)
|
|
207
207
|
}
|
|
208
208
|
)
|
|
209
|
-
] }, `array-item-list-${
|
|
209
|
+
] }, `array-item-list-${fieldPathId.$id}`)
|
|
210
210
|
] });
|
|
211
211
|
}
|
|
212
212
|
|
|
@@ -358,7 +358,7 @@ var DEFAULT_OPTIONS = {
|
|
|
358
358
|
size: "small"
|
|
359
359
|
}
|
|
360
360
|
};
|
|
361
|
-
function FieldErrorTemplate({ errors,
|
|
361
|
+
function FieldErrorTemplate({ errors, fieldPathId, uiSchema, registry }) {
|
|
362
362
|
const { formContext } = registry;
|
|
363
363
|
const options = getSemanticErrorProps({
|
|
364
364
|
formContext,
|
|
@@ -367,7 +367,7 @@ function FieldErrorTemplate({ errors, idSchema, uiSchema, registry }) {
|
|
|
367
367
|
});
|
|
368
368
|
const { pointing, size } = options;
|
|
369
369
|
if (errors && errors.length > 0) {
|
|
370
|
-
const id = errorId(
|
|
370
|
+
const id = errorId(fieldPathId);
|
|
371
371
|
return /* @__PURE__ */ jsx9(Label, { id, color: "red", pointing: pointing || "above", size: size || "small", basic: true, children: /* @__PURE__ */ jsx9(List, { bulleted: true, children: errors.map((error) => /* @__PURE__ */ jsx9(List.Item, { children: error }, uniqueId("field-error-"))) }) });
|
|
372
372
|
}
|
|
373
373
|
return null;
|
|
@@ -378,9 +378,9 @@ import { Message as Message2 } from "semantic-ui-react";
|
|
|
378
378
|
import { helpId } from "@rjsf/utils";
|
|
379
379
|
import { jsx as jsx10 } from "react/jsx-runtime";
|
|
380
380
|
function FieldHelpTemplate(props) {
|
|
381
|
-
const {
|
|
381
|
+
const { fieldPathId, help } = props;
|
|
382
382
|
if (help) {
|
|
383
|
-
const id = helpId(
|
|
383
|
+
const id = helpId(fieldPathId);
|
|
384
384
|
return /* @__PURE__ */ jsx10(Message2, { size: "mini", info: true, id, content: help });
|
|
385
385
|
}
|
|
386
386
|
return null;
|
|
@@ -490,7 +490,7 @@ function ObjectFieldTemplate(props) {
|
|
|
490
490
|
uiSchema,
|
|
491
491
|
schema,
|
|
492
492
|
formData,
|
|
493
|
-
|
|
493
|
+
fieldPathId,
|
|
494
494
|
registry
|
|
495
495
|
} = props;
|
|
496
496
|
const uiOptions = getUiOptions5(uiSchema);
|
|
@@ -507,7 +507,7 @@ function ObjectFieldTemplate(props) {
|
|
|
507
507
|
title && /* @__PURE__ */ jsx14(
|
|
508
508
|
TitleFieldTemplate,
|
|
509
509
|
{
|
|
510
|
-
id: titleId(
|
|
510
|
+
id: titleId(fieldPathId),
|
|
511
511
|
title,
|
|
512
512
|
required,
|
|
513
513
|
schema,
|
|
@@ -518,7 +518,7 @@ function ObjectFieldTemplate(props) {
|
|
|
518
518
|
description && /* @__PURE__ */ jsx14(
|
|
519
519
|
DescriptionFieldTemplate,
|
|
520
520
|
{
|
|
521
|
-
id: descriptionId(
|
|
521
|
+
id: descriptionId(fieldPathId),
|
|
522
522
|
description,
|
|
523
523
|
schema,
|
|
524
524
|
uiSchema,
|
|
@@ -537,7 +537,7 @@ function ObjectFieldTemplate(props) {
|
|
|
537
537
|
children: /* @__PURE__ */ jsx14(
|
|
538
538
|
AddButton2,
|
|
539
539
|
{
|
|
540
|
-
id: buttonId2(
|
|
540
|
+
id: buttonId2(fieldPathId, "add"),
|
|
541
541
|
className: "rjsf-object-property-expand",
|
|
542
542
|
onClick: onAddClick(schema),
|
|
543
543
|
disabled: disabled || readonly,
|