@react-magma/schema-renderer 11.0.0-next.0 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/BasicTemplate/index.d.ts +2 -1
- package/dist/components/Checkbox/index.d.ts +1 -1
- package/dist/components/Combobox/index.d.ts +1 -1
- package/dist/components/Custom/index.d.ts +1 -1
- package/dist/components/DatePicker/index.d.ts +1 -1
- package/dist/components/FieldArray/FieldArray.d.ts +2 -1
- package/dist/components/FieldArray/FieldArrayItem.d.ts +2 -1
- package/dist/components/FormGroup/index.d.ts +1 -1
- package/dist/components/FormTemplate/index.d.ts +2 -1
- package/dist/components/Input/index.d.ts +1 -1
- package/dist/components/Modal/index.d.ts +1 -1
- package/dist/components/PasswordInput/index.d.ts +1 -1
- package/dist/components/Radio/index.d.ts +1 -1
- package/dist/components/SchemaRenderer/SchemaRenderer.d.ts +2 -1
- package/dist/components/SchemaRenderer/SchemaRenderer.stories.d.ts +2 -1
- package/dist/components/Select/index.d.ts +1 -1
- package/dist/components/Spy/index.d.ts +2 -1
- package/dist/components/Textarea/index.d.ts +1 -1
- package/dist/components/TimePicker/index.d.ts +1 -1
- package/dist/components/Toggle/index.d.ts +1 -1
- package/dist/schema-renderer.cjs.development.js +28 -35
- package/dist/schema-renderer.cjs.development.js.map +1 -1
- package/dist/schema-renderer.cjs.production.min.js +1 -1
- package/dist/schema-renderer.cjs.production.min.js.map +1 -1
- package/dist/schema-renderer.esm.js +28 -35
- package/dist/schema-renderer.esm.js.map +1 -1
- package/package.json +23 -23
- package/src/components/BasicTemplate/index.tsx +2 -8
- package/src/components/Checkbox/index.tsx +2 -1
- package/src/components/Combobox/index.tsx +2 -1
- package/src/components/ComponentMapper/index.ts +9 -10
- package/src/components/Custom/index.tsx +1 -0
- package/src/components/DatePicker/index.tsx +2 -1
- package/src/components/FieldArray/FieldArray.tsx +3 -7
- package/src/components/FieldArray/FieldArrayItem.tsx +2 -1
- package/src/components/FormGroup/index.tsx +1 -0
- package/src/components/FormTemplate/index.tsx +2 -2
- package/src/components/Input/index.tsx +2 -1
- package/src/components/Modal/index.tsx +1 -1
- package/src/components/PasswordInput/index.tsx +2 -1
- package/src/components/Radio/index.tsx +2 -1
- package/src/components/SchemaRenderer/SchemaRenderer.stories.tsx +5 -6
- package/src/components/SchemaRenderer/SchemaRenderer.test.tsx +2 -0
- package/src/components/SchemaRenderer/SchemaRenderer.tsx +1 -0
- package/src/components/Select/index.tsx +2 -1
- package/src/components/Spy/index.tsx +1 -0
- package/src/components/TemplateMapper/index.ts +3 -1
- package/src/components/Textarea/index.tsx +2 -1
- package/src/components/TimePicker/index.tsx +2 -1
- package/src/components/Toggle/index.tsx +2 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-renderer.cjs.production.min.js","sources":["../src/components/ComponentMapper/index.ts","../src/components/Checkbox/index.tsx","../src/components/Combobox/index.tsx","../src/components/Custom/index.tsx","../src/components/DatePicker/index.tsx","../src/components/FieldArray/FieldArrayItem.tsx","../src/components/FormGroup/index.tsx","../src/components/Input/index.tsx","../src/components/Modal/index.tsx","../src/components/PasswordInput/index.tsx","../src/components/Radio/index.tsx","../src/components/Select/index.tsx","../src/components/Textarea/index.tsx","../src/components/TimePicker/index.tsx","../src/components/Toggle/index.tsx","../src/components/TemplateMapper/index.ts","../src/components/FieldArray/FieldArray.tsx","../src/components/Spy/index.tsx","../src/components/BasicTemplate/index.tsx","../src/components/FormTemplate/index.tsx","../src/components/SchemaRenderer/SchemaRenderer.tsx"],"sourcesContent":["import { ComponentMapper } from '@data-driven-forms/react-form-renderer';\n\nimport { Checkbox } from '../Checkbox';\nimport { Combobox } from '../Combobox';\nimport { Custom } from '../Custom';\nimport { DatePicker } from '../DatePicker';\nimport { FieldArray } from '../FieldArray';\nimport { FormGroup } from '../FormGroup';\nimport { Input } from '../Input';\nimport { Modal } from '../Modal';\nimport { PasswordInput } from '../PasswordInput';\nimport { Radio } from '../Radio';\nimport { Spy } from '../Spy';\nimport { Select } from '../Select';\nimport { Textarea } from '../Textarea';\nimport { TimePicker } from '../TimePicker';\nimport { Toggle } from '../Toggle';\n\nimport {\n Alert,\n Banner,\n Heading,\n Hyperlink,\n Toast,\n Paragraph,\n} from 'react-magma-dom';\n\nexport enum componentTypes {\n ALERT = 'ALERT',\n BANNER = 'BANNER',\n CUSTOM = 'CUSTOM',\n HEADING = 'HEADING',\n HYPERLINK = 'HYPERLINK',\n TOAST = 'TOAST',\n CHECKBOX = 'CHECKBOX',\n COMBOBOX = 'COMBOBOX',\n DATE_PICKER = 'DATE_PICKER',\n FIELD_ARRAY = 'FIELD_ARRAY',\n FORM_GROUP = 'FORM_GROUP',\n INPUT = 'INPUT',\n MODAL = 'MODAL',\n PARAGRAPH = 'PARAGRAPH',\n PASSWORD_INPUT = 'PASSWORD_INPUT',\n RADIO = 'RADIO',\n SPY = 'SPY',\n SELECT = 'SELECT',\n TEXTAREA = 'TEXTAREA',\n TIME_PICKER = 'TIME_PICKER',\n TOGGLE = 'TOGGLE',\n}\n\nexport const componentMapper: ComponentMapper = {\n [componentTypes.ALERT]: Alert,\n [componentTypes.BANNER]: Banner,\n [componentTypes.CUSTOM]: Custom,\n [componentTypes.HEADING]: Heading,\n [componentTypes.HYPERLINK]: Hyperlink,\n [componentTypes.TOAST]: Toast,\n [componentTypes.CHECKBOX]: Checkbox,\n [componentTypes.COMBOBOX]: Combobox,\n [componentTypes.DATE_PICKER]: DatePicker,\n [componentTypes.FIELD_ARRAY]: FieldArray,\n [componentTypes.FORM_GROUP]: FormGroup,\n [componentTypes.INPUT]: Input,\n [componentTypes.MODAL]: Modal,\n [componentTypes.PARAGRAPH]: Paragraph,\n [componentTypes.PASSWORD_INPUT]: PasswordInput,\n [componentTypes.RADIO]: Radio,\n [componentTypes.SPY]: Spy,\n [componentTypes.SELECT]: Select,\n [componentTypes.TEXTAREA]: Textarea,\n [componentTypes.TIME_PICKER]: TimePicker,\n [componentTypes.TOGGLE]: Toggle,\n};\n\nexport { ComponentMapper };\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Checkbox as MagmaCheckbox,\n CheckboxProps as MagmaCheckboxProps,\n FormGroup,\n FormGroupProps as MagmaFormGroupProps,\n} from 'react-magma-dom';\n\ninterface MagmaMultiCheckboxProps extends MagmaFormGroupProps {\n options: MagmaCheckboxProps[];\n}\n\ntype CheckboxProps = MagmaCheckboxProps & UseFieldApiConfig;\ntype MultiCheckboxProps = MagmaMultiCheckboxProps & UseFieldApiConfig;\n\nconst GroupedCheckbox = (props: CheckboxProps) => {\n const { input } = useFieldApi({\n name: props.name,\n type: 'checkbox',\n value: props.value,\n });\n return <MagmaCheckbox {...props} {...input} />;\n};\n\nconst CheckboxMapping = (props: MultiCheckboxProps) => {\n const {\n input,\n options,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) ||\n rest.errorMessage;\n\n if (options && options.length > 0) {\n return (\n <FormGroup errorMessage={errorMessage} {...rest}>\n {options.map((option: MagmaCheckboxProps) => {\n return (\n <GroupedCheckbox\n name={name}\n {...option}\n key={option.value?.toString()}\n />\n );\n })}\n </FormGroup>\n );\n } else {\n return (\n <MagmaCheckbox\n {...input}\n name={name}\n labelText={rest.labelText}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n }\n};\n\nexport const Checkbox = React.memo(CheckboxMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport { Combobox as MagmaCombobox } from 'react-magma-dom';\nimport { XORComboboxProps as MagmaComboboxProps } from 'react-magma-dom/dist/components/Combobox';\n\nexport type ComboboxProps = MagmaComboboxProps<ComboOption> & UseFieldApiConfig;\n\ninterface ComboOption {\n label: string;\n value: string;\n name: string;\n}\n\ninterface ComboOptionEvent {\n selectedItem: ComboOption;\n}\n\ninterface MultiComboOptionEvent {\n selectedItems: ComboOption[];\n}\n\nconst ComboboxMapping = (props: ComboboxProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n options,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n const innerRef = React.useRef<HTMLInputElement>(null);\n\n const [items, updateItems] = React.useState(\n options.map(({ labelText, ...rest }: { labelText: string }) => {\n return { label: labelText, ...rest };\n })\n );\n\n const newItemTransform = ({ value }: { value: string }) => {\n return {\n label: value,\n value: value.toLowerCase(),\n };\n };\n\n const onItemCreated = (item: any) => {\n updateItems([...items, item]);\n input.onChange(item.value);\n };\n\n if (rest.isMulti) {\n rest.onSelectedItemsChange = (evt: MultiComboOptionEvent) => {\n input.onChange(evt.selectedItems.map(item => item.value));\n };\n rest.selectedItems = items.filter((item: { value: string }) =>\n input.value.includes(item.value)\n );\n } else {\n rest.onSelectedItemChange = (evt: ComboOptionEvent) => {\n input.onChange(evt.selectedItem.value);\n };\n rest.selectedItem = items\n .filter((item: { value: string }) => item.value === input.value)\n .pop();\n }\n\n return (\n <MagmaCombobox\n {...input}\n id={name}\n innerRef={innerRef}\n items={items}\n newItemTransform={newItemTransform}\n onItemCreated={onItemCreated}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Combobox = React.memo(ComboboxMapping);\n","import * as React from 'react';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\n\nconst CustomMapping = (props: any) => {\n const { customComponent: CustomComponent, ...rest } = useFieldApi(props);\n const { getState } = useFormApi();\n\n return <CustomComponent {...rest} data={getState().values} />;\n};\n\nexport const Custom = React.memo(CustomMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n DatePicker as MagmaDatePicker,\n DatePickerProps as MagmaDatePickerProps,\n} from 'react-magma-dom';\n\nexport type DatePickerProps = MagmaDatePickerProps & UseFieldApiConfig;\n\nconst DatePickerMapping = (props: DatePickerProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaDatePicker\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const DatePicker = React.memo(DatePickerMapping);\n","import * as React from 'react';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport { IconButton, ButtonVariant, ThemeContext } from 'react-magma-dom';\nimport { DeleteIcon } from 'react-magma-icons';\n\nexport const FieldArrayItem = ({\n fields,\n fieldIndex,\n name,\n remove,\n length,\n minItems,\n removeLabel,\n}: any) => {\n const { renderForm } = useFormApi();\n const theme = React.useContext(ThemeContext);\n\n const editedFields = React.useMemo(() => {\n return fields.map((field: any) => {\n const computedName = field.name ? `${name}.${field.name}` : uuidv4();\n return {\n ...field,\n name: computedName,\n key: computedName,\n labelText: fieldIndex === 0 ? field.labelText : null,\n children: (\n <IconButton\n aria-label={removeLabel}\n icon={<DeleteIcon />}\n variant={ButtonVariant.link}\n onClick={() => remove(fieldIndex)}\n disabled={length <= minItems}\n />\n ),\n };\n });\n }, [fields, name, fieldIndex]);\n\n return (\n <div style={{ marginTop: theme.spaceScale.spacing04 }}>\n {editedFields.map((field: any) => renderForm([field]))}\n </div>\n );\n};\n","import React from 'react';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport {\n FormGroup as MagmaFormGroup,\n FormGroupProps as MagmaFormGroupProps,\n} from 'react-magma-dom';\n\nexport interface FormGroupProps extends MagmaFormGroupProps {\n fields: any;\n showError?: boolean;\n}\n\nconst FormGroupMapping = (props: FormGroupProps) => {\n const { renderForm } = useFormApi();\n\n const subfields = React.useMemo(() => {\n return props.fields.map((field: any) => ({\n ...field,\n showError: props.showError,\n }));\n }, [props.fields, props.showError]);\n\n return <MagmaFormGroup {...props}>{renderForm(subfields)}</MagmaFormGroup>;\n};\n\nexport const FormGroup = React.memo(FormGroupMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Input as MagmaInput,\n InputType,\n InputProps as MagmaInputProps,\n} from 'react-magma-dom';\n\nexport type InputProps = MagmaInputProps & UseFieldApiConfig;\n\nconst InputMapping = (props: InputProps) => {\n const {\n input,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n input: { type = 'text', ...inputRest },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaInput\n {...inputRest}\n type={InputType[type as keyof typeof InputType] || InputType.text}\n id={id}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n};\n\nexport const Input = React.memo(InputMapping);\n","import React from 'react';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\n\nimport {\n Modal as MagmaModal,\n ModalProps as MagmaModalProps,\n} from 'react-magma-dom';\n\nexport interface ModalProps extends MagmaModalProps {\n fields: any;\n showError?: boolean;\n}\n\nconst ModalMapping = (props: ModalProps) => {\n const { renderForm } = useFormApi();\n\n const subfields = React.useMemo(() => {\n return props.fields.map((field: any) => ({\n ...field,\n showError: props.showError,\n }));\n }, [props.fields, props.showError]);\n\n return <MagmaModal {...props}>{renderForm(subfields)}</MagmaModal>;\n};\n\nexport const Modal = React.memo(ModalMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n PasswordInput as MagmaPasswordInput,\n PasswordInputProps as MagmaPasswordInputProps,\n} from 'react-magma-dom';\n\nexport type PasswordInputProps = MagmaPasswordInputProps & UseFieldApiConfig;\n\nconst PasswordInputMapping = (props: PasswordInputProps) => {\n const {\n input,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaPasswordInput\n {...input}\n labelText={rest.labelText}\n id={id}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n};\n\nexport const PasswordInput = React.memo(PasswordInputMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Radio as MagmaRadio,\n RadioProps,\n RadioGroup,\n RadioGroupProps as MagmaRadioGroupProps,\n} from 'react-magma-dom';\n\ntype RadioGroupProps = MagmaRadioGroupProps & UseFieldApiConfig;\n\nconst RadioMapping = (props: RadioGroupProps) => {\n const {\n input,\n options,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi({ ...props, type: 'radio' });\n const name = input.name || uuidv4();\n\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) ||\n rest.errorMessage;\n\n return (\n <RadioGroup\n onChange={input.onChange}\n errorMessage={errorMessage}\n name={name}\n {...rest}\n >\n {options.map((option: RadioProps) => {\n return <MagmaRadio {...option} key={option.value?.toString()} />;\n })}\n </RadioGroup>\n );\n};\n\nexport const Radio = React.memo(RadioMapping);\n","import * as React from 'react';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport { Select as MagmaSelect } from 'react-magma-dom';\n\ninterface SelectOption {\n label: string;\n value: string;\n name: string;\n}\n\ninterface SelectOptionEvent {\n selectedItem: SelectOption;\n}\n\ninterface MultiSelectOptionEvent {\n selectedItems: SelectOption[];\n}\n\nconst SelectMapping = (props: any) => {\n const {\n input,\n validateOnMount,\n showError,\n options,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n if (rest.isMulti) {\n rest.onSelectedItemsChange = (evt: MultiSelectOptionEvent) => {\n input.onChange(evt.selectedItems.map(item => item.value));\n };\n } else {\n rest.onSelectedItemChange = (evt: SelectOptionEvent) => {\n input.onChange(evt.selectedItem.value);\n };\n }\n\n return (\n <MagmaSelect\n id={name}\n items={options.map(({ labelText, ...rest }: { labelText: string }) => {\n return { label: labelText, ...rest };\n })}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Select = React.memo(SelectMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Textarea as MagmaTextarea,\n TextareaProps as MagmaTextareaProps,\n} from 'react-magma-dom';\n\nexport type TextareaProps = MagmaTextareaProps & UseFieldApiConfig;\n\nconst TextareaMapping = (props: TextareaProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaTextarea\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Textarea = React.memo(TextareaMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n TimePicker as MagmaTimePicker,\n TimePickerProps as MagmaTimePickerProps,\n} from 'react-magma-dom';\n\nexport type TimePickerProps = MagmaTimePickerProps & UseFieldApiConfig;\n\nconst TimePickerMapping = (props: TimePickerProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaTimePicker\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const TimePicker = React.memo(TimePickerMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Toggle as MagmaToggle,\n ToggleProps as MagmaToggleProps,\n} from 'react-magma-dom';\n\nexport type ToggleProps = MagmaToggleProps & UseFieldApiConfig;\n\nconst ToggleMapping = (props: ToggleProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaToggle\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Toggle = React.memo(ToggleMapping);\n","import * as React from 'react';\nimport { BasicTemplate } from '../BasicTemplate';\nimport { FormTemplate } from '../FormTemplate';\n\nimport { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';\nexport interface TemplateMapper {\n [key: string]: (props: FormTemplateRenderProps) => React.ReactElement;\n}\n\nexport enum templateTypes {\n BASIC = 'BASIC',\n FORM = 'FORM',\n}\n\nexport const templateMapper: TemplateMapper = {\n [templateTypes.BASIC]: BasicTemplate,\n [templateTypes.FORM]: FormTemplate,\n};\n","import * as React from 'react';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { FieldArray as FieldArrayBase } from '@data-driven-forms/react-form-renderer';\nimport {\n Button,\n ButtonColor,\n ButtonType,\n Paragraph,\n} from 'react-magma-dom';\n\nimport { FieldArrayItem } from './FieldArrayItem';\n\nexport const FieldArray = ({ ...props }: any) => {\n const {\n arrayValidator,\n label,\n description,\n fields: formFields,\n defaultItem,\n meta,\n minItems,\n maxItems,\n noItemsMessage = \"You haven't added any items yet!\",\n FormControlProps,\n ...rest\n } = useFieldApi(props);\n\n const { dirty, submitFailed, error } = meta;\n const isError = (dirty || submitFailed) && error && typeof error === 'string';\n\n return (\n <FieldArrayBase\n key={rest.input.name}\n name={rest.input.name}\n validate={arrayValidator}\n >\n {({ fields: { map, value = [], push, remove } }) => {\n return (\n <>\n {<h6>label</h6>}\n <Button\n color={ButtonColor.primary}\n type={ButtonType.button}\n onClick={() => push(defaultItem)}\n disabled={value.length >= maxItems}\n >\n ADD ITEM\n </Button>\n {description && <Paragraph>{description}</Paragraph>}\n {value.length <= 0 ? (\n <Paragraph>{noItemsMessage}</Paragraph>\n ) : (\n map((name, index) => (\n <FieldArrayItem\n key={name}\n fields={formFields}\n name={name}\n fieldIndex={index}\n remove={remove}\n length={value.length}\n minItems={minItems}\n removeLabel=\"REMOVE\"\n />\n ))\n )}\n {isError && <Paragraph>{error}</Paragraph>}\n </>\n );\n }}\n </FieldArrayBase>\n );\n};\n","import React from 'react';\nimport { FormSpy } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\n\nexport const Spy = (props: any) => {\n const { template: Template, ...rest } = useFieldApi(props);\n return (\n <FormSpy {...rest}>\n {props => {\n return <Template {...props} />;\n }}\n </FormSpy>\n );\n};\n","import React from 'react';\n\nimport { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';\n\nexport const BasicTemplate = ({\n formFields,\n}: FormTemplateRenderProps) => {\n return (\n <div>\n {formFields}\n </div>\n );\n};\n","import React from 'react';\nimport {\n Button,\n ButtonColor,\n ButtonVariant,\n ButtonType,\n Form,\n ButtonGroup,\n} from 'react-magma-dom';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\n\nexport interface FormTemplateProps {\n formFields: any;\n schema: any;\n}\n\nexport const FormTemplate = ({\n formFields,\n schema: { cancelLabel, submitLabel },\n schema,\n}: FormTemplateProps) => {\n const { handleSubmit, onCancel, getState } = useFormApi();\n const { submitting, pristine } = getState();\n\n const actions = (\n <ButtonGroup>\n <Button\n disabled={pristine}\n variant={ButtonVariant.link}\n onClick={onCancel}\n >\n {cancelLabel || 'Cancel'}\n </Button>\n <Button\n disabled={submitting}\n type={ButtonType.submit}\n color={ButtonColor.primary}\n >\n {submitLabel || 'Submit'}\n </Button>\n </ButtonGroup>\n );\n\n const actionsVisible = React.useMemo(() => {\n return true;\n }, []);\n\n return (\n <Form\n onSubmit={handleSubmit}\n header={schema.title}\n description={schema.description}\n actions={actionsVisible ? actions : undefined}\n >\n {formFields}\n </Form>\n );\n};\n","import React from 'react';\n// import FormRender from '@data-driven-forms/react-form-renderer/dist/cjs/form-renderer';\n\nimport {\n FormRenderer,\n FormRendererProps,\n Schema as DataDrivenFormSchema,\n} from '@data-driven-forms/react-form-renderer';\nimport { componentMapper, ComponentMapper } from '../ComponentMapper';\nimport { templateMapper } from '../TemplateMapper';\nimport { ValidatorMapper } from '../ValidatorMapper';\n\nexport interface Schema extends DataDrivenFormSchema {\n type: string;\n}\n\nexport interface SchemaRendererProps\n extends Omit<FormRendererProps, 'FormTemplate' | 'componentMapper'> {\n schema: Schema;\n customComponentMapper?: ComponentMapper;\n customValidatorMapper?: ValidatorMapper;\n}\n\nexport const SchemaRenderer = ({\n schema,\n customComponentMapper = componentMapper,\n customValidatorMapper,\n ...rest\n}: SchemaRendererProps) => {\n return (\n <FormRenderer\n onCancel={() => {}}\n onSubmit={() => {}}\n {...rest}\n componentMapper={customComponentMapper}\n validatorMapper={customValidatorMapper}\n FormTemplate={templateMapper[schema.type]}\n schema={schema}\n />\n );\n};\n"],"names":["componentTypes","GroupedCheckbox","props","_useFieldApi","useFieldApi","name","type","value","React","MagmaCheckbox","input","CheckboxMapping","_useFieldApi2","options","validateOnMount","showError","_useFieldApi2$meta","meta","error","submitFailed","rest","_objectWithoutPropertiesLoose","_excluded","uuidv4","errorMessage","length","FormGroup","map","option","key","_option$value","toString","labelText","Checkbox","memo","ComboboxMapping","_useFieldApi$meta","innerRef","useRef","_React$useState","useState","_ref","_extends","label","_excluded2","items","updateItems","isMulti","onSelectedItemsChange","evt","onChange","selectedItems","item","filter","includes","onSelectedItemChange","selectedItem","pop","MagmaCombobox","id","newItemTransform","_ref2","toLowerCase","onItemCreated","concat","Combobox","CustomMapping","CustomComponent","customComponent","_useFormApi","useFormApi","data","getState","values","Custom","DatePickerMapping","MagmaDatePicker","DatePicker","FieldArrayItem","fields","fieldIndex","remove","minItems","removeLabel","renderForm","theme","ThemeContext","editedFields","field","computedName","children","IconButton","icon","DeleteIcon","variant","ButtonVariant","link","onClick","disabled","style","marginTop","spaceScale","spacing04","FormGroupMapping","subfields","useMemo","MagmaFormGroup","InputMapping","_useFieldApi$input","_useFieldApi$input$ty","inputRest","MagmaInput","InputType","text","Input","ModalMapping","MagmaModal","Modal","PasswordInputMapping","MagmaPasswordInput","PasswordInput","RadioMapping","RadioGroup","MagmaRadio","Radio","SelectMapping","MagmaSelect","Select","TextareaMapping","MagmaTextarea","Textarea","TimePickerMapping","MagmaTimePicker","TimePicker","ToggleMapping","MagmaToggle","Toggle","templateTypes","componentMapper","_componentMapper","ALERT","Alert","BANNER","Banner","CUSTOM","HEADING","Heading","HYPERLINK","Hyperlink","TOAST","Toast","CHECKBOX","COMBOBOX","DATE_PICKER","FIELD_ARRAY","_objectDestructuringEmpty","arrayValidator","description","formFields","defaultItem","maxItems","_useFieldApi$noItemsM","noItemsMessage","isError","dirty","FieldArrayBase","validate","_ref2$fields","_ref2$fields$value","push","Button","color","ButtonColor","primary","ButtonType","button","Paragraph","index","FORM_GROUP","INPUT","MODAL","PARAGRAPH","PASSWORD_INPUT","RADIO","SPY","Template","template","FormSpy","SELECT","TEXTAREA","TIME_PICKER","TOGGLE","templateMapper","_templateMapper","BASIC","FORM","_ref$schema","schema","cancelLabel","submitLabel","handleSubmit","onCancel","_getState","submitting","actions","ButtonGroup","pristine","submit","actionsVisible","Form","onSubmit","header","title","undefined","_ref$customComponentM","customComponentMapper","customValidatorMapper","FormRenderer","validatorMapper","FormTemplate"],"mappings":"43BA2BYA,6DCTNC,EAAkB,SAACC,GACvB,IAAAC,EAAkBC,EAAY,CAC5BC,KAAMH,EAAMG,KACZC,KAAM,WACNC,MAAOL,EAAMK,QAEf,OAAOC,gBAACC,4BAAkBP,EALbC,EAALO,SAQJC,EAAkB,SAACT,GACvB,IAAAU,EAOIR,EAAYF,GANdQ,EAAKE,EAALF,MACAG,EAAOD,EAAPC,QACAC,EAAeF,EAAfE,gBACAC,EAASH,EAATG,UAASC,EAAAJ,EACTK,KAAQC,EAAKF,EAALE,MAAOC,EAAYH,EAAZG,aACZC,EAAIC,EAAAT,EAAAU,GAEHjB,EAAOK,EAAML,MAAQkB,OAErBC,GACFV,GAAmBK,GAAgBJ,IAAcG,GACnDE,EAAKI,aAEP,OAAIX,GAAWA,EAAQY,OAAS,EAE5BjB,gBAACkB,2BAAUF,aAAcA,GAAkBJ,GACxCP,EAAQc,KAAI,SAACC,SACZ,OACEpB,gBAACP,iBACCI,KAAMA,GACFuB,GACJC,WAAGC,EAAEF,EAAOrB,cAAPuB,EAAcC,kBAQ3BvB,gBAACC,4BACKC,GACJL,KAAMA,EACN2B,UAAWZ,EAAKY,UAChBR,aAAcA,GACVJ,KAMCa,EAAWzB,EAAM0B,KAAKvB,qFC9C7BwB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AW3D,EAAQS,EAClC3I,uBAAe8L,aAAczD,GAAUM,EACvC3I,uBAAe+L,QAASvD,GAAMG,Ie/DrBF,GAAAA,wBAAAA,yCAEVA,eAGF,IAAauD,KAAcC,OACxBxD,sBAAcyD,OGXY,SAAHzJ,GAGxB,OACEjC,2BAHQiC,EAAVqH,aHUoCmC,GACnCxD,sBAAc0D,MICW,SAAH1J,OACvBqH,EAAUrH,EAAVqH,WAAUsC,EAAA3J,EACV4J,OAAUC,EAAWF,EAAXE,YAAaC,EAAWH,EAAXG,YACvBF,EAAM5J,EAAN4J,OAEAhI,EAA6CC,IAArCkI,EAAYnI,EAAZmI,aAAcC,EAAQpI,EAARoI,SACtBC,GAAiClI,EADOH,EAARG,YACxBmI,EAAUD,EAAVC,WAEFC,EACJpM,gBAACqM,mBACCrM,gBAACkK,UACCxE,SALsBwG,EAARI,SAMdhH,QAASC,gBAAcC,KACvBC,QAASwG,GAERH,GAAe,UAElB9L,gBAACkK,UACCxE,SAAUyG,EACVrM,KAAMwK,aAAWiC,OACjBpC,MAAOC,cAAYC,SAElB0B,GAAe,WAKhBS,EAAiBxM,EAAMiG,SAAQ,WACnC,OAAO,IACN,IAEH,OACEjG,gBAACyM,QACCC,SAAUV,EACVW,OAAQd,EAAOe,MACfvD,YAAawC,EAAOxC,YACpB+C,QAASI,EAAiBJ,OAAUS,GAEnCvD,IJvC6BmC,kHKON,SAAHxJ,OACzB4J,EAAM5J,EAAN4J,OAAMiB,EAAA7K,EACN8K,sBAAAA,WAAqBD,EAAG5E,GAAe4E,EACvCE,EAAqB/K,EAArB+K,sBACGpM,EAAIC,EAAAoB,EAAAnB,IAEP,OACEd,gBAACiN,8BACChB,SAAU,aACVS,SAAU,cACN9L,GACJsH,gBAAiB6E,EACjBG,gBAAiBF,EACjBG,aAAc3B,GAAeK,EAAO/L,MACpC+L,OAAQA"}
|
|
1
|
+
{"version":3,"file":"schema-renderer.cjs.production.min.js","sources":["../src/components/ComponentMapper/index.ts","../src/components/Checkbox/index.tsx","../src/components/Combobox/index.tsx","../src/components/Custom/index.tsx","../src/components/DatePicker/index.tsx","../src/components/FieldArray/FieldArrayItem.tsx","../src/components/FormGroup/index.tsx","../src/components/Input/index.tsx","../src/components/Modal/index.tsx","../src/components/PasswordInput/index.tsx","../src/components/Radio/index.tsx","../src/components/Select/index.tsx","../src/components/Textarea/index.tsx","../src/components/TimePicker/index.tsx","../src/components/Toggle/index.tsx","../src/components/TemplateMapper/index.ts","../src/components/FieldArray/FieldArray.tsx","../src/components/Spy/index.tsx","../src/components/BasicTemplate/index.tsx","../src/components/FormTemplate/index.tsx","../src/components/SchemaRenderer/SchemaRenderer.tsx"],"sourcesContent":["import { ComponentMapper } from '@data-driven-forms/react-form-renderer';\nimport {\n Alert,\n Banner,\n Heading,\n Hyperlink,\n Toast,\n Paragraph,\n} from 'react-magma-dom';\n\nimport { Checkbox } from '../Checkbox';\nimport { Combobox } from '../Combobox';\nimport { Custom } from '../Custom';\nimport { DatePicker } from '../DatePicker';\nimport { FieldArray } from '../FieldArray';\nimport { FormGroup } from '../FormGroup';\nimport { Input } from '../Input';\nimport { Modal } from '../Modal';\nimport { PasswordInput } from '../PasswordInput';\nimport { Radio } from '../Radio';\nimport { Select } from '../Select';\nimport { Spy } from '../Spy';\nimport { Textarea } from '../Textarea';\nimport { TimePicker } from '../TimePicker';\nimport { Toggle } from '../Toggle';\n\nexport enum componentTypes {\n ALERT = 'ALERT',\n BANNER = 'BANNER',\n CUSTOM = 'CUSTOM',\n HEADING = 'HEADING',\n HYPERLINK = 'HYPERLINK',\n TOAST = 'TOAST',\n CHECKBOX = 'CHECKBOX',\n COMBOBOX = 'COMBOBOX',\n DATE_PICKER = 'DATE_PICKER',\n FIELD_ARRAY = 'FIELD_ARRAY',\n FORM_GROUP = 'FORM_GROUP',\n INPUT = 'INPUT',\n MODAL = 'MODAL',\n PARAGRAPH = 'PARAGRAPH',\n PASSWORD_INPUT = 'PASSWORD_INPUT',\n RADIO = 'RADIO',\n SPY = 'SPY',\n SELECT = 'SELECT',\n TEXTAREA = 'TEXTAREA',\n TIME_PICKER = 'TIME_PICKER',\n TOGGLE = 'TOGGLE',\n}\n\nexport const componentMapper: ComponentMapper = {\n [componentTypes.ALERT]: Alert,\n [componentTypes.BANNER]: Banner,\n [componentTypes.CUSTOM]: Custom,\n [componentTypes.HEADING]: Heading,\n [componentTypes.HYPERLINK]: Hyperlink,\n [componentTypes.TOAST]: Toast,\n [componentTypes.CHECKBOX]: Checkbox,\n [componentTypes.COMBOBOX]: Combobox,\n [componentTypes.DATE_PICKER]: DatePicker,\n [componentTypes.FIELD_ARRAY]: FieldArray,\n [componentTypes.FORM_GROUP]: FormGroup,\n [componentTypes.INPUT]: Input,\n [componentTypes.MODAL]: Modal,\n [componentTypes.PARAGRAPH]: Paragraph,\n [componentTypes.PASSWORD_INPUT]: PasswordInput,\n [componentTypes.RADIO]: Radio,\n [componentTypes.SPY]: Spy,\n [componentTypes.SELECT]: Select,\n [componentTypes.TEXTAREA]: Textarea,\n [componentTypes.TIME_PICKER]: TimePicker,\n [componentTypes.TOGGLE]: Toggle,\n};\n\nexport { ComponentMapper };\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Checkbox as MagmaCheckbox,\n CheckboxProps as MagmaCheckboxProps,\n FormGroup,\n FormGroupProps as MagmaFormGroupProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\ninterface MagmaMultiCheckboxProps extends MagmaFormGroupProps {\n options: MagmaCheckboxProps[];\n}\n\ntype CheckboxProps = MagmaCheckboxProps & UseFieldApiConfig;\ntype MultiCheckboxProps = MagmaMultiCheckboxProps & UseFieldApiConfig;\n\nconst GroupedCheckbox = (props: CheckboxProps) => {\n const { input } = useFieldApi({\n name: props.name,\n type: 'checkbox',\n value: props.value,\n });\n return <MagmaCheckbox {...props} {...input} />;\n};\n\nconst CheckboxMapping = (props: MultiCheckboxProps) => {\n const {\n input,\n options,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) ||\n rest.errorMessage;\n\n if (options && options.length > 0) {\n return (\n <FormGroup errorMessage={errorMessage} {...rest}>\n {options.map((option: MagmaCheckboxProps) => {\n return (\n <GroupedCheckbox\n name={name}\n {...option}\n key={option.value?.toString()}\n />\n );\n })}\n </FormGroup>\n );\n } else {\n return (\n <MagmaCheckbox\n {...input}\n name={name}\n labelText={rest.labelText}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n }\n};\n\nexport const Checkbox = React.memo(CheckboxMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { Combobox as MagmaCombobox } from 'react-magma-dom';\nimport { XORComboboxProps as MagmaComboboxProps } from 'react-magma-dom/dist/components/Combobox';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type ComboboxProps = MagmaComboboxProps<ComboOption> & UseFieldApiConfig;\n\ninterface ComboOption {\n label: string;\n value: string;\n name: string;\n}\n\ninterface ComboOptionEvent {\n selectedItem: ComboOption;\n}\n\ninterface MultiComboOptionEvent {\n selectedItems: ComboOption[];\n}\n\nconst ComboboxMapping = (props: ComboboxProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n options,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n const innerRef = React.useRef<HTMLInputElement>(null);\n\n const [items, updateItems] = React.useState(\n options.map(({ labelText, ...rest }: { labelText: string }) => {\n return { label: labelText, ...rest };\n })\n );\n\n const newItemTransform = ({ value }: { value: string }) => {\n return {\n label: value,\n value: value.toLowerCase(),\n };\n };\n\n const onItemCreated = (item: any) => {\n updateItems([...items, item]);\n input.onChange(item.value);\n };\n\n if (rest.isMulti) {\n rest.onSelectedItemsChange = (evt: MultiComboOptionEvent) => {\n input.onChange(evt.selectedItems.map(item => item.value));\n };\n rest.selectedItems = items.filter((item: { value: string }) =>\n input.value.includes(item.value)\n );\n } else {\n rest.onSelectedItemChange = (evt: ComboOptionEvent) => {\n input.onChange(evt.selectedItem.value);\n };\n rest.selectedItem = items\n .filter((item: { value: string }) => item.value === input.value)\n .pop();\n }\n\n return (\n <MagmaCombobox\n {...input}\n id={name}\n innerRef={innerRef}\n items={items}\n newItemTransform={newItemTransform}\n onItemCreated={onItemCreated}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Combobox = React.memo(ComboboxMapping);\n","import * as React from 'react';\n\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\n\nconst CustomMapping = (props: any) => {\n const { customComponent: CustomComponent, ...rest } = useFieldApi(props);\n const { getState } = useFormApi();\n\n return <CustomComponent {...rest} data={getState().values} />;\n};\n\nexport const Custom = React.memo(CustomMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n DatePicker as MagmaDatePicker,\n DatePickerProps as MagmaDatePickerProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type DatePickerProps = MagmaDatePickerProps & UseFieldApiConfig;\n\nconst DatePickerMapping = (props: DatePickerProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaDatePicker\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const DatePicker = React.memo(DatePickerMapping);\n","import * as React from 'react';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport { IconButton, ButtonVariant, ThemeContext } from 'react-magma-dom';\nimport { DeleteIcon } from 'react-magma-icons';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport const FieldArrayItem = ({\n fields,\n fieldIndex,\n name,\n remove,\n length,\n minItems,\n removeLabel,\n}: any) => {\n const { renderForm } = useFormApi();\n const theme = React.useContext(ThemeContext);\n\n const editedFields = React.useMemo(() => {\n return fields.map((field: any) => {\n const computedName = field.name ? `${name}.${field.name}` : uuidv4();\n return {\n ...field,\n name: computedName,\n key: computedName,\n labelText: fieldIndex === 0 ? field.labelText : null,\n children: (\n <IconButton\n aria-label={removeLabel}\n icon={<DeleteIcon />}\n variant={ButtonVariant.link}\n onClick={() => remove(fieldIndex)}\n disabled={length <= minItems}\n />\n ),\n };\n });\n }, [fields, name, fieldIndex]);\n\n return (\n <div style={{ marginTop: theme.spaceScale.spacing04 }}>\n {editedFields.map((field: any) => renderForm([field]))}\n </div>\n );\n};\n","import React from 'react';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport {\n FormGroup as MagmaFormGroup,\n FormGroupProps as MagmaFormGroupProps,\n} from 'react-magma-dom';\n\nexport interface FormGroupProps extends MagmaFormGroupProps {\n fields: any;\n showError?: boolean;\n}\n\nconst FormGroupMapping = (props: FormGroupProps) => {\n const { renderForm } = useFormApi();\n\n const subfields = React.useMemo(() => {\n return props.fields.map((field: any) => ({\n ...field,\n showError: props.showError,\n }));\n }, [props.fields, props.showError]);\n\n return <MagmaFormGroup {...props}>{renderForm(subfields)}</MagmaFormGroup>;\n};\n\nexport const FormGroup = React.memo(FormGroupMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Input as MagmaInput,\n InputType,\n InputProps as MagmaInputProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type InputProps = MagmaInputProps & UseFieldApiConfig;\n\nconst InputMapping = (props: InputProps) => {\n const {\n input,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n input: { type = 'text', ...inputRest },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaInput\n {...inputRest}\n type={InputType[type as keyof typeof InputType] || InputType.text}\n id={id}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n};\n\nexport const Input = React.memo(InputMapping);\n","import React from 'react';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport {\n Modal as MagmaModal,\n ModalProps as MagmaModalProps,\n} from 'react-magma-dom';\n\nexport interface ModalProps extends MagmaModalProps {\n fields: any;\n showError?: boolean;\n}\n\nconst ModalMapping = (props: ModalProps) => {\n const { renderForm } = useFormApi();\n\n const subfields = React.useMemo(() => {\n return props.fields.map((field: any) => ({\n ...field,\n showError: props.showError,\n }));\n }, [props.fields, props.showError]);\n\n return <MagmaModal {...props}>{renderForm(subfields)}</MagmaModal>;\n};\n\nexport const Modal = React.memo(ModalMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n PasswordInput as MagmaPasswordInput,\n PasswordInputProps as MagmaPasswordInputProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type PasswordInputProps = MagmaPasswordInputProps & UseFieldApiConfig;\n\nconst PasswordInputMapping = (props: PasswordInputProps) => {\n const {\n input,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaPasswordInput\n {...input}\n labelText={rest.labelText}\n id={id}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n};\n\nexport const PasswordInput = React.memo(PasswordInputMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Radio as MagmaRadio,\n RadioProps,\n RadioGroup,\n RadioGroupProps as MagmaRadioGroupProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\ntype RadioGroupProps = MagmaRadioGroupProps & UseFieldApiConfig;\n\nconst RadioMapping = (props: RadioGroupProps) => {\n const {\n input,\n options,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi({ ...props, type: 'radio' });\n const name = input.name || uuidv4();\n\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) ||\n rest.errorMessage;\n\n return (\n <RadioGroup\n onChange={input.onChange}\n errorMessage={errorMessage}\n name={name}\n {...rest}\n >\n {options.map((option: RadioProps) => {\n return <MagmaRadio {...option} key={option.value?.toString()} />;\n })}\n </RadioGroup>\n );\n};\n\nexport const Radio = React.memo(RadioMapping);\n","import * as React from 'react';\n\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { Select as MagmaSelect } from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\ninterface SelectOption {\n label: string;\n value: string;\n name: string;\n}\n\ninterface SelectOptionEvent {\n selectedItem: SelectOption;\n}\n\ninterface MultiSelectOptionEvent {\n selectedItems: SelectOption[];\n}\n\nconst SelectMapping = (props: any) => {\n const {\n input,\n validateOnMount,\n showError,\n options,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n if (rest.isMulti) {\n rest.onSelectedItemsChange = (evt: MultiSelectOptionEvent) => {\n input.onChange(evt.selectedItems.map(item => item.value));\n };\n } else {\n rest.onSelectedItemChange = (evt: SelectOptionEvent) => {\n input.onChange(evt.selectedItem.value);\n };\n }\n\n return (\n <MagmaSelect\n id={name}\n items={options.map(({ labelText, ...rest }: { labelText: string }) => {\n return { label: labelText, ...rest };\n })}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Select = React.memo(SelectMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Textarea as MagmaTextarea,\n TextareaProps as MagmaTextareaProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type TextareaProps = MagmaTextareaProps & UseFieldApiConfig;\n\nconst TextareaMapping = (props: TextareaProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaTextarea\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Textarea = React.memo(TextareaMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n TimePicker as MagmaTimePicker,\n TimePickerProps as MagmaTimePickerProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type TimePickerProps = MagmaTimePickerProps & UseFieldApiConfig;\n\nconst TimePickerMapping = (props: TimePickerProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaTimePicker\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const TimePicker = React.memo(TimePickerMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Toggle as MagmaToggle,\n ToggleProps as MagmaToggleProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type ToggleProps = MagmaToggleProps & UseFieldApiConfig;\n\nconst ToggleMapping = (props: ToggleProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaToggle\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Toggle = React.memo(ToggleMapping);\n","import * as React from 'react';\n\nimport { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';\n\nimport { BasicTemplate } from '../BasicTemplate';\nimport { FormTemplate } from '../FormTemplate';\n\nexport interface TemplateMapper {\n [key: string]: (props: FormTemplateRenderProps) => React.ReactElement;\n}\n\nexport enum templateTypes {\n BASIC = 'BASIC',\n FORM = 'FORM',\n}\n\nexport const templateMapper: TemplateMapper = {\n [templateTypes.BASIC]: BasicTemplate,\n [templateTypes.FORM]: FormTemplate,\n};\n","import * as React from 'react';\n\nimport { FieldArray as FieldArrayBase } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { Button, ButtonColor, ButtonType, Paragraph } from 'react-magma-dom';\n\nimport { FieldArrayItem } from './FieldArrayItem';\n\nexport const FieldArray = ({ ...props }: any) => {\n const {\n arrayValidator,\n label,\n description,\n fields: formFields,\n defaultItem,\n meta,\n minItems,\n maxItems,\n noItemsMessage = \"You haven't added any items yet!\",\n FormControlProps,\n ...rest\n } = useFieldApi(props);\n\n const { dirty, submitFailed, error } = meta;\n const isError = (dirty || submitFailed) && error && typeof error === 'string';\n\n return (\n <FieldArrayBase\n key={rest.input.name}\n name={rest.input.name}\n validate={arrayValidator}\n >\n {({ fields: { map, value = [], push, remove } }) => {\n return (\n <>\n {<h6>label</h6>}\n <Button\n color={ButtonColor.primary}\n type={ButtonType.button}\n onClick={() => push(defaultItem)}\n disabled={value.length >= maxItems}\n >\n ADD ITEM\n </Button>\n {description && <Paragraph>{description}</Paragraph>}\n {value.length <= 0 ? (\n <Paragraph>{noItemsMessage}</Paragraph>\n ) : (\n map((name, index) => (\n <FieldArrayItem\n key={name}\n fields={formFields}\n name={name}\n fieldIndex={index}\n remove={remove}\n length={value.length}\n minItems={minItems}\n removeLabel=\"REMOVE\"\n />\n ))\n )}\n {isError && <Paragraph>{error}</Paragraph>}\n </>\n );\n }}\n </FieldArrayBase>\n );\n};\n","import React from 'react';\n\nimport { FormSpy } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\n\nexport const Spy = (props: any) => {\n const { template: Template, ...rest } = useFieldApi(props);\n return (\n <FormSpy {...rest}>\n {props => {\n return <Template {...props} />;\n }}\n </FormSpy>\n );\n};\n","import React from 'react';\n\nimport { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';\n\nexport const BasicTemplate = ({ formFields }: FormTemplateRenderProps) => {\n return <div>{formFields}</div>;\n};\n","import React from 'react';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport {\n Button,\n ButtonColor,\n ButtonVariant,\n ButtonType,\n Form,\n ButtonGroup,\n} from 'react-magma-dom';\n\nexport interface FormTemplateProps {\n formFields: any;\n schema: any;\n}\n\nexport const FormTemplate = ({\n formFields,\n schema: { cancelLabel, submitLabel },\n schema,\n}: FormTemplateProps) => {\n const { handleSubmit, onCancel, getState } = useFormApi();\n const { submitting, pristine } = getState();\n\n const actions = (\n <ButtonGroup>\n <Button\n disabled={pristine}\n variant={ButtonVariant.link}\n onClick={onCancel}\n >\n {cancelLabel || 'Cancel'}\n </Button>\n <Button\n disabled={submitting}\n type={ButtonType.submit}\n color={ButtonColor.primary}\n >\n {submitLabel || 'Submit'}\n </Button>\n </ButtonGroup>\n );\n\n const actionsVisible = React.useMemo(() => {\n return true;\n }, []);\n\n return (\n <Form\n onSubmit={handleSubmit}\n header={schema.title}\n description={schema.description}\n actions={actionsVisible ? actions : undefined}\n >\n {formFields}\n </Form>\n );\n};\n","import React from 'react';\n// import FormRender from '@data-driven-forms/react-form-renderer/dist/cjs/form-renderer';\n\nimport {\n FormRenderer,\n FormRendererProps,\n Schema as DataDrivenFormSchema,\n} from '@data-driven-forms/react-form-renderer';\n\nimport { componentMapper, ComponentMapper } from '../ComponentMapper';\nimport { templateMapper } from '../TemplateMapper';\nimport { ValidatorMapper } from '../ValidatorMapper';\n\nexport interface Schema extends DataDrivenFormSchema {\n type: string;\n}\n\nexport interface SchemaRendererProps\n extends Omit<FormRendererProps, 'FormTemplate' | 'componentMapper'> {\n schema: Schema;\n customComponentMapper?: ComponentMapper;\n customValidatorMapper?: ValidatorMapper;\n}\n\nexport const SchemaRenderer = ({\n schema,\n customComponentMapper = componentMapper,\n customValidatorMapper,\n ...rest\n}: SchemaRendererProps) => {\n return (\n <FormRenderer\n onCancel={() => {}}\n onSubmit={() => {}}\n {...rest}\n componentMapper={customComponentMapper}\n validatorMapper={customValidatorMapper}\n FormTemplate={templateMapper[schema.type]}\n schema={schema}\n />\n );\n};\n"],"names":["componentTypes","GroupedCheckbox","props","_useFieldApi","useFieldApi","name","type","value","React","MagmaCheckbox","input","CheckboxMapping","_useFieldApi2","options","validateOnMount","showError","_useFieldApi2$meta","meta","error","submitFailed","rest","_objectWithoutPropertiesLoose","_excluded","uuidv4","errorMessage","length","FormGroup","map","option","key","_option$value","toString","labelText","Checkbox","memo","ComboboxMapping","_useFieldApi$meta","innerRef","useRef","_React$useState","useState","_ref","_extends","label","_excluded2","items","updateItems","isMulti","onSelectedItemsChange","evt","onChange","selectedItems","item","filter","includes","onSelectedItemChange","selectedItem","pop","MagmaCombobox","id","newItemTransform","_ref2","toLowerCase","onItemCreated","concat","Combobox","CustomMapping","CustomComponent","customComponent","_useFormApi","useFormApi","data","getState","values","Custom","DatePickerMapping","MagmaDatePicker","DatePicker","FieldArrayItem","fields","fieldIndex","remove","minItems","removeLabel","renderForm","theme","ThemeContext","editedFields","field","computedName","children","IconButton","icon","DeleteIcon","variant","ButtonVariant","link","onClick","disabled","style","marginTop","spaceScale","spacing04","FormGroupMapping","subfields","useMemo","MagmaFormGroup","InputMapping","_useFieldApi$input","_useFieldApi$input$ty","inputRest","MagmaInput","InputType","text","Input","ModalMapping","MagmaModal","Modal","PasswordInputMapping","MagmaPasswordInput","PasswordInput","RadioMapping","RadioGroup","MagmaRadio","Radio","SelectMapping","MagmaSelect","Select","TextareaMapping","MagmaTextarea","Textarea","TimePickerMapping","MagmaTimePicker","TimePicker","ToggleMapping","MagmaToggle","Toggle","templateTypes","componentMapper","_componentMapper","ALERT","Alert","BANNER","Banner","CUSTOM","HEADING","Heading","HYPERLINK","Hyperlink","TOAST","Toast","CHECKBOX","COMBOBOX","DATE_PICKER","FIELD_ARRAY","_objectDestructuringEmpty","arrayValidator","description","formFields","defaultItem","maxItems","_useFieldApi$noItemsM","noItemsMessage","isError","dirty","FieldArrayBase","validate","_ref2$fields","_ref2$fields$value","push","Button","color","ButtonColor","primary","ButtonType","button","Paragraph","index","FORM_GROUP","INPUT","MODAL","PARAGRAPH","PASSWORD_INPUT","RADIO","SPY","Template","template","FormSpy","SELECT","TEXTAREA","TIME_PICKER","TOGGLE","templateMapper","_templateMapper","BASIC","FORM","_ref$schema","schema","cancelLabel","submitLabel","handleSubmit","onCancel","_getState","submitting","actions","ButtonGroup","pristine","submit","actionsVisible","Form","onSubmit","header","title","undefined","_ref$customComponentM","customComponentMapper","customValidatorMapper","FormRenderer","validatorMapper","FormTemplate"],"mappings":"o2BA0BYA,6DCPNC,EAAkB,SAACC,GACvB,IAAAC,EAAkBC,EAAY,CAC5BC,KAAMH,EAAMG,K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AASC,gBAAcC,KACvBC,QAASwG,GAERH,GAAe,UAElB9L,gBAACkK,UACCxE,SAAUyG,EACVrM,KAAMwK,aAAWiC,OACjBpC,MAAOC,cAAYC,SAElB0B,GAAe,WAKhBS,EAAiBxM,EAAMiG,SAAQ,WACnC,OAAO,IACN,IAEH,OACEjG,gBAACyM,QACCC,SAAUV,EACVW,OAAQd,EAAOe,MACfvD,YAAawC,EAAOxC,YACpB+C,QAASI,EAAiBJ,OAAUS,GAEnCvD,IJrC6BmC,kHKMN,SAAHxJ,OACzB4J,EAAM5J,EAAN4J,OAAMiB,EAAA7K,EACN8K,sBAAAA,WAAqBD,EAAG5E,GAAe4E,EACvCE,EAAqB/K,EAArB+K,sBACGpM,EAAIC,EAAAoB,EAAAnB,IAEP,OACEd,gBAACiN,8BACChB,SAAU,aACVS,SAAU,cACN9L,GACJsH,gBAAiB6E,EACjBG,gBAAiBF,EACjBG,aAAc3B,GAAeK,EAAO/L,MACpC+L,OAAQA"}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
1
|
import React__default, { memo, createElement, useContext, useMemo, Fragment } from 'react';
|
|
2
2
|
import { FieldArray as FieldArray$1, FormSpy, FormRenderer } from '@data-driven-forms/react-form-renderer';
|
|
3
|
+
import { FormGroup as FormGroup$1, Checkbox as Checkbox$1, Combobox as Combobox$1, DatePicker as DatePicker$1, ThemeContext, IconButton, ButtonVariant, Button, ButtonColor, ButtonType, Paragraph, Input as Input$1, InputType, Modal as Modal$1, PasswordInput as PasswordInput$1, RadioGroup, Radio as Radio$1, Select as Select$1, Textarea as Textarea$1, TimePicker as TimePicker$1, Toggle as Toggle$1, Alert, Banner, Heading, Hyperlink, Toast, ButtonGroup, Form } from 'react-magma-dom';
|
|
3
4
|
import useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';
|
|
4
5
|
import { v4 } from 'uuid';
|
|
5
|
-
import { FormGroup as FormGroup$1, Checkbox as Checkbox$1, Combobox as Combobox$1, DatePicker as DatePicker$1, ThemeContext, IconButton, ButtonVariant, Button, ButtonColor, ButtonType, Paragraph, Input as Input$1, InputType, Modal as Modal$1, PasswordInput as PasswordInput$1, RadioGroup, Radio as Radio$1, Select as Select$1, Textarea as Textarea$1, TimePicker as TimePicker$1, Toggle as Toggle$1, Alert, Banner, Heading, Hyperlink, Toast, ButtonGroup, Form } from 'react-magma-dom';
|
|
6
6
|
import useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';
|
|
7
7
|
import { DeleteIcon } from 'react-magma-icons';
|
|
8
8
|
export { default as validatorTypes } from '@data-driven-forms/react-form-renderer/validator-types';
|
|
9
9
|
|
|
10
10
|
function _extends() {
|
|
11
|
-
_extends = Object.assign ? Object.assign.bind() : function (
|
|
12
|
-
for (var
|
|
13
|
-
var
|
|
14
|
-
for (var
|
|
15
|
-
if (Object.prototype.hasOwnProperty.call(source, key)) {
|
|
16
|
-
target[key] = source[key];
|
|
17
|
-
}
|
|
18
|
-
}
|
|
11
|
+
return _extends = Object.assign ? Object.assign.bind() : function (n) {
|
|
12
|
+
for (var e = 1; e < arguments.length; e++) {
|
|
13
|
+
var t = arguments[e];
|
|
14
|
+
for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
|
|
19
15
|
}
|
|
20
|
-
return
|
|
21
|
-
};
|
|
22
|
-
return _extends.apply(this, arguments);
|
|
16
|
+
return n;
|
|
17
|
+
}, _extends.apply(null, arguments);
|
|
23
18
|
}
|
|
24
|
-
function _objectDestructuringEmpty(
|
|
25
|
-
if (
|
|
19
|
+
function _objectDestructuringEmpty(t) {
|
|
20
|
+
if (null == t) throw new TypeError("Cannot destructure " + t);
|
|
26
21
|
}
|
|
27
|
-
function _objectWithoutPropertiesLoose(
|
|
28
|
-
if (
|
|
29
|
-
var
|
|
30
|
-
for (var
|
|
31
|
-
if (
|
|
32
|
-
|
|
33
|
-
target[key] = source[key];
|
|
34
|
-
}
|
|
22
|
+
function _objectWithoutPropertiesLoose(r, e) {
|
|
23
|
+
if (null == r) return {};
|
|
24
|
+
var t = {};
|
|
25
|
+
for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
|
|
26
|
+
if (-1 !== e.indexOf(n)) continue;
|
|
27
|
+
t[n] = r[n];
|
|
35
28
|
}
|
|
36
|
-
return
|
|
29
|
+
return t;
|
|
37
30
|
}
|
|
38
31
|
|
|
39
32
|
var _excluded = ["input", "options", "validateOnMount", "showError", "meta"];
|
|
@@ -367,17 +360,7 @@ var RadioMapping = function RadioMapping(props) {
|
|
|
367
360
|
};
|
|
368
361
|
var Radio = /*#__PURE__*/React__default.memo(RadioMapping);
|
|
369
362
|
|
|
370
|
-
var _excluded$8 = ["
|
|
371
|
-
var Spy = function Spy(props) {
|
|
372
|
-
var _useFieldApi = useFieldApi(props),
|
|
373
|
-
Template = _useFieldApi.template,
|
|
374
|
-
rest = _objectWithoutPropertiesLoose(_useFieldApi, _excluded$8);
|
|
375
|
-
return React__default.createElement(FormSpy, Object.assign({}, rest), function (props) {
|
|
376
|
-
return React__default.createElement(Template, Object.assign({}, props));
|
|
377
|
-
});
|
|
378
|
-
};
|
|
379
|
-
|
|
380
|
-
var _excluded$9 = ["input", "validateOnMount", "showError", "options", "type", "meta"],
|
|
363
|
+
var _excluded$8 = ["input", "validateOnMount", "showError", "options", "type", "meta"],
|
|
381
364
|
_excluded2$2 = ["labelText"];
|
|
382
365
|
var SelectMapping = function SelectMapping(props) {
|
|
383
366
|
var _useFieldApi = useFieldApi(props),
|
|
@@ -388,7 +371,7 @@ var SelectMapping = function SelectMapping(props) {
|
|
|
388
371
|
_useFieldApi$meta = _useFieldApi.meta,
|
|
389
372
|
error = _useFieldApi$meta.error,
|
|
390
373
|
submitFailed = _useFieldApi$meta.submitFailed,
|
|
391
|
-
rest = _objectWithoutPropertiesLoose(_useFieldApi, _excluded$
|
|
374
|
+
rest = _objectWithoutPropertiesLoose(_useFieldApi, _excluded$8);
|
|
392
375
|
var name = input.name || v4();
|
|
393
376
|
var errorMessage = (validateOnMount || submitFailed || showError) && error || '';
|
|
394
377
|
if (rest.isMulti) {
|
|
@@ -417,6 +400,16 @@ var SelectMapping = function SelectMapping(props) {
|
|
|
417
400
|
};
|
|
418
401
|
var Select = /*#__PURE__*/memo(SelectMapping);
|
|
419
402
|
|
|
403
|
+
var _excluded$9 = ["template"];
|
|
404
|
+
var Spy = function Spy(props) {
|
|
405
|
+
var _useFieldApi = useFieldApi(props),
|
|
406
|
+
Template = _useFieldApi.template,
|
|
407
|
+
rest = _objectWithoutPropertiesLoose(_useFieldApi, _excluded$9);
|
|
408
|
+
return React__default.createElement(FormSpy, Object.assign({}, rest), function (props) {
|
|
409
|
+
return React__default.createElement(Template, Object.assign({}, props));
|
|
410
|
+
});
|
|
411
|
+
};
|
|
412
|
+
|
|
420
413
|
var _excluded$a = ["input", "validateOnMount", "showError", "type", "meta"];
|
|
421
414
|
var TextareaMapping = function TextareaMapping(props) {
|
|
422
415
|
var _useFieldApi = useFieldApi(props),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema-renderer.esm.js","sources":["../src/components/Checkbox/index.tsx","../src/components/Combobox/index.tsx","../src/components/Custom/index.tsx","../src/components/DatePicker/index.tsx","../src/components/FieldArray/FieldArrayItem.tsx","../src/components/FieldArray/FieldArray.tsx","../src/components/FormGroup/index.tsx","../src/components/Input/index.tsx","../src/components/Modal/index.tsx","../src/components/PasswordInput/index.tsx","../src/components/Radio/index.tsx","../src/components/Spy/index.tsx","../src/components/Select/index.tsx","../src/components/Textarea/index.tsx","../src/components/TimePicker/index.tsx","../src/components/Toggle/index.tsx","../src/components/ComponentMapper/index.ts","../src/components/BasicTemplate/index.tsx","../src/components/FormTemplate/index.tsx","../src/components/TemplateMapper/index.ts","../src/components/SchemaRenderer/SchemaRenderer.tsx"],"sourcesContent":["import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Checkbox as MagmaCheckbox,\n CheckboxProps as MagmaCheckboxProps,\n FormGroup,\n FormGroupProps as MagmaFormGroupProps,\n} from 'react-magma-dom';\n\ninterface MagmaMultiCheckboxProps extends MagmaFormGroupProps {\n options: MagmaCheckboxProps[];\n}\n\ntype CheckboxProps = MagmaCheckboxProps & UseFieldApiConfig;\ntype MultiCheckboxProps = MagmaMultiCheckboxProps & UseFieldApiConfig;\n\nconst GroupedCheckbox = (props: CheckboxProps) => {\n const { input } = useFieldApi({\n name: props.name,\n type: 'checkbox',\n value: props.value,\n });\n return <MagmaCheckbox {...props} {...input} />;\n};\n\nconst CheckboxMapping = (props: MultiCheckboxProps) => {\n const {\n input,\n options,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) ||\n rest.errorMessage;\n\n if (options && options.length > 0) {\n return (\n <FormGroup errorMessage={errorMessage} {...rest}>\n {options.map((option: MagmaCheckboxProps) => {\n return (\n <GroupedCheckbox\n name={name}\n {...option}\n key={option.value?.toString()}\n />\n );\n })}\n </FormGroup>\n );\n } else {\n return (\n <MagmaCheckbox\n {...input}\n name={name}\n labelText={rest.labelText}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n }\n};\n\nexport const Checkbox = React.memo(CheckboxMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport { Combobox as MagmaCombobox } from 'react-magma-dom';\nimport { XORComboboxProps as MagmaComboboxProps } from 'react-magma-dom/dist/components/Combobox';\n\nexport type ComboboxProps = MagmaComboboxProps<ComboOption> & UseFieldApiConfig;\n\ninterface ComboOption {\n label: string;\n value: string;\n name: string;\n}\n\ninterface ComboOptionEvent {\n selectedItem: ComboOption;\n}\n\ninterface MultiComboOptionEvent {\n selectedItems: ComboOption[];\n}\n\nconst ComboboxMapping = (props: ComboboxProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n options,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n const innerRef = React.useRef<HTMLInputElement>(null);\n\n const [items, updateItems] = React.useState(\n options.map(({ labelText, ...rest }: { labelText: string }) => {\n return { label: labelText, ...rest };\n })\n );\n\n const newItemTransform = ({ value }: { value: string }) => {\n return {\n label: value,\n value: value.toLowerCase(),\n };\n };\n\n const onItemCreated = (item: any) => {\n updateItems([...items, item]);\n input.onChange(item.value);\n };\n\n if (rest.isMulti) {\n rest.onSelectedItemsChange = (evt: MultiComboOptionEvent) => {\n input.onChange(evt.selectedItems.map(item => item.value));\n };\n rest.selectedItems = items.filter((item: { value: string }) =>\n input.value.includes(item.value)\n );\n } else {\n rest.onSelectedItemChange = (evt: ComboOptionEvent) => {\n input.onChange(evt.selectedItem.value);\n };\n rest.selectedItem = items\n .filter((item: { value: string }) => item.value === input.value)\n .pop();\n }\n\n return (\n <MagmaCombobox\n {...input}\n id={name}\n innerRef={innerRef}\n items={items}\n newItemTransform={newItemTransform}\n onItemCreated={onItemCreated}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Combobox = React.memo(ComboboxMapping);\n","import * as React from 'react';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\n\nconst CustomMapping = (props: any) => {\n const { customComponent: CustomComponent, ...rest } = useFieldApi(props);\n const { getState } = useFormApi();\n\n return <CustomComponent {...rest} data={getState().values} />;\n};\n\nexport const Custom = React.memo(CustomMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n DatePicker as MagmaDatePicker,\n DatePickerProps as MagmaDatePickerProps,\n} from 'react-magma-dom';\n\nexport type DatePickerProps = MagmaDatePickerProps & UseFieldApiConfig;\n\nconst DatePickerMapping = (props: DatePickerProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaDatePicker\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const DatePicker = React.memo(DatePickerMapping);\n","import * as React from 'react';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport { IconButton, ButtonVariant, ThemeContext } from 'react-magma-dom';\nimport { DeleteIcon } from 'react-magma-icons';\n\nexport const FieldArrayItem = ({\n fields,\n fieldIndex,\n name,\n remove,\n length,\n minItems,\n removeLabel,\n}: any) => {\n const { renderForm } = useFormApi();\n const theme = React.useContext(ThemeContext);\n\n const editedFields = React.useMemo(() => {\n return fields.map((field: any) => {\n const computedName = field.name ? `${name}.${field.name}` : uuidv4();\n return {\n ...field,\n name: computedName,\n key: computedName,\n labelText: fieldIndex === 0 ? field.labelText : null,\n children: (\n <IconButton\n aria-label={removeLabel}\n icon={<DeleteIcon />}\n variant={ButtonVariant.link}\n onClick={() => remove(fieldIndex)}\n disabled={length <= minItems}\n />\n ),\n };\n });\n }, [fields, name, fieldIndex]);\n\n return (\n <div style={{ marginTop: theme.spaceScale.spacing04 }}>\n {editedFields.map((field: any) => renderForm([field]))}\n </div>\n );\n};\n","import * as React from 'react';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { FieldArray as FieldArrayBase } from '@data-driven-forms/react-form-renderer';\nimport {\n Button,\n ButtonColor,\n ButtonType,\n Paragraph,\n} from 'react-magma-dom';\n\nimport { FieldArrayItem } from './FieldArrayItem';\n\nexport const FieldArray = ({ ...props }: any) => {\n const {\n arrayValidator,\n label,\n description,\n fields: formFields,\n defaultItem,\n meta,\n minItems,\n maxItems,\n noItemsMessage = \"You haven't added any items yet!\",\n FormControlProps,\n ...rest\n } = useFieldApi(props);\n\n const { dirty, submitFailed, error } = meta;\n const isError = (dirty || submitFailed) && error && typeof error === 'string';\n\n return (\n <FieldArrayBase\n key={rest.input.name}\n name={rest.input.name}\n validate={arrayValidator}\n >\n {({ fields: { map, value = [], push, remove } }) => {\n return (\n <>\n {<h6>label</h6>}\n <Button\n color={ButtonColor.primary}\n type={ButtonType.button}\n onClick={() => push(defaultItem)}\n disabled={value.length >= maxItems}\n >\n ADD ITEM\n </Button>\n {description && <Paragraph>{description}</Paragraph>}\n {value.length <= 0 ? (\n <Paragraph>{noItemsMessage}</Paragraph>\n ) : (\n map((name, index) => (\n <FieldArrayItem\n key={name}\n fields={formFields}\n name={name}\n fieldIndex={index}\n remove={remove}\n length={value.length}\n minItems={minItems}\n removeLabel=\"REMOVE\"\n />\n ))\n )}\n {isError && <Paragraph>{error}</Paragraph>}\n </>\n );\n }}\n </FieldArrayBase>\n );\n};\n","import React from 'react';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport {\n FormGroup as MagmaFormGroup,\n FormGroupProps as MagmaFormGroupProps,\n} from 'react-magma-dom';\n\nexport interface FormGroupProps extends MagmaFormGroupProps {\n fields: any;\n showError?: boolean;\n}\n\nconst FormGroupMapping = (props: FormGroupProps) => {\n const { renderForm } = useFormApi();\n\n const subfields = React.useMemo(() => {\n return props.fields.map((field: any) => ({\n ...field,\n showError: props.showError,\n }));\n }, [props.fields, props.showError]);\n\n return <MagmaFormGroup {...props}>{renderForm(subfields)}</MagmaFormGroup>;\n};\n\nexport const FormGroup = React.memo(FormGroupMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Input as MagmaInput,\n InputType,\n InputProps as MagmaInputProps,\n} from 'react-magma-dom';\n\nexport type InputProps = MagmaInputProps & UseFieldApiConfig;\n\nconst InputMapping = (props: InputProps) => {\n const {\n input,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n input: { type = 'text', ...inputRest },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaInput\n {...inputRest}\n type={InputType[type as keyof typeof InputType] || InputType.text}\n id={id}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n};\n\nexport const Input = React.memo(InputMapping);\n","import React from 'react';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\n\nimport {\n Modal as MagmaModal,\n ModalProps as MagmaModalProps,\n} from 'react-magma-dom';\n\nexport interface ModalProps extends MagmaModalProps {\n fields: any;\n showError?: boolean;\n}\n\nconst ModalMapping = (props: ModalProps) => {\n const { renderForm } = useFormApi();\n\n const subfields = React.useMemo(() => {\n return props.fields.map((field: any) => ({\n ...field,\n showError: props.showError,\n }));\n }, [props.fields, props.showError]);\n\n return <MagmaModal {...props}>{renderForm(subfields)}</MagmaModal>;\n};\n\nexport const Modal = React.memo(ModalMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n PasswordInput as MagmaPasswordInput,\n PasswordInputProps as MagmaPasswordInputProps,\n} from 'react-magma-dom';\n\nexport type PasswordInputProps = MagmaPasswordInputProps & UseFieldApiConfig;\n\nconst PasswordInputMapping = (props: PasswordInputProps) => {\n const {\n input,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaPasswordInput\n {...input}\n labelText={rest.labelText}\n id={id}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n};\n\nexport const PasswordInput = React.memo(PasswordInputMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Radio as MagmaRadio,\n RadioProps,\n RadioGroup,\n RadioGroupProps as MagmaRadioGroupProps,\n} from 'react-magma-dom';\n\ntype RadioGroupProps = MagmaRadioGroupProps & UseFieldApiConfig;\n\nconst RadioMapping = (props: RadioGroupProps) => {\n const {\n input,\n options,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi({ ...props, type: 'radio' });\n const name = input.name || uuidv4();\n\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) ||\n rest.errorMessage;\n\n return (\n <RadioGroup\n onChange={input.onChange}\n errorMessage={errorMessage}\n name={name}\n {...rest}\n >\n {options.map((option: RadioProps) => {\n return <MagmaRadio {...option} key={option.value?.toString()} />;\n })}\n </RadioGroup>\n );\n};\n\nexport const Radio = React.memo(RadioMapping);\n","import React from 'react';\nimport { FormSpy } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\n\nexport const Spy = (props: any) => {\n const { template: Template, ...rest } = useFieldApi(props);\n return (\n <FormSpy {...rest}>\n {props => {\n return <Template {...props} />;\n }}\n </FormSpy>\n );\n};\n","import * as React from 'react';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport { Select as MagmaSelect } from 'react-magma-dom';\n\ninterface SelectOption {\n label: string;\n value: string;\n name: string;\n}\n\ninterface SelectOptionEvent {\n selectedItem: SelectOption;\n}\n\ninterface MultiSelectOptionEvent {\n selectedItems: SelectOption[];\n}\n\nconst SelectMapping = (props: any) => {\n const {\n input,\n validateOnMount,\n showError,\n options,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n if (rest.isMulti) {\n rest.onSelectedItemsChange = (evt: MultiSelectOptionEvent) => {\n input.onChange(evt.selectedItems.map(item => item.value));\n };\n } else {\n rest.onSelectedItemChange = (evt: SelectOptionEvent) => {\n input.onChange(evt.selectedItem.value);\n };\n }\n\n return (\n <MagmaSelect\n id={name}\n items={options.map(({ labelText, ...rest }: { labelText: string }) => {\n return { label: labelText, ...rest };\n })}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Select = React.memo(SelectMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Textarea as MagmaTextarea,\n TextareaProps as MagmaTextareaProps,\n} from 'react-magma-dom';\n\nexport type TextareaProps = MagmaTextareaProps & UseFieldApiConfig;\n\nconst TextareaMapping = (props: TextareaProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaTextarea\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Textarea = React.memo(TextareaMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n TimePicker as MagmaTimePicker,\n TimePickerProps as MagmaTimePickerProps,\n} from 'react-magma-dom';\n\nexport type TimePickerProps = MagmaTimePickerProps & UseFieldApiConfig;\n\nconst TimePickerMapping = (props: TimePickerProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaTimePicker\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const TimePicker = React.memo(TimePickerMapping);\n","import React from 'react';\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { v4 as uuidv4 } from 'uuid';\nimport {\n Toggle as MagmaToggle,\n ToggleProps as MagmaToggleProps,\n} from 'react-magma-dom';\n\nexport type ToggleProps = MagmaToggleProps & UseFieldApiConfig;\n\nconst ToggleMapping = (props: ToggleProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaToggle\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Toggle = React.memo(ToggleMapping);\n","import { ComponentMapper } from '@data-driven-forms/react-form-renderer';\n\nimport { Checkbox } from '../Checkbox';\nimport { Combobox } from '../Combobox';\nimport { Custom } from '../Custom';\nimport { DatePicker } from '../DatePicker';\nimport { FieldArray } from '../FieldArray';\nimport { FormGroup } from '../FormGroup';\nimport { Input } from '../Input';\nimport { Modal } from '../Modal';\nimport { PasswordInput } from '../PasswordInput';\nimport { Radio } from '../Radio';\nimport { Spy } from '../Spy';\nimport { Select } from '../Select';\nimport { Textarea } from '../Textarea';\nimport { TimePicker } from '../TimePicker';\nimport { Toggle } from '../Toggle';\n\nimport {\n Alert,\n Banner,\n Heading,\n Hyperlink,\n Toast,\n Paragraph,\n} from 'react-magma-dom';\n\nexport enum componentTypes {\n ALERT = 'ALERT',\n BANNER = 'BANNER',\n CUSTOM = 'CUSTOM',\n HEADING = 'HEADING',\n HYPERLINK = 'HYPERLINK',\n TOAST = 'TOAST',\n CHECKBOX = 'CHECKBOX',\n COMBOBOX = 'COMBOBOX',\n DATE_PICKER = 'DATE_PICKER',\n FIELD_ARRAY = 'FIELD_ARRAY',\n FORM_GROUP = 'FORM_GROUP',\n INPUT = 'INPUT',\n MODAL = 'MODAL',\n PARAGRAPH = 'PARAGRAPH',\n PASSWORD_INPUT = 'PASSWORD_INPUT',\n RADIO = 'RADIO',\n SPY = 'SPY',\n SELECT = 'SELECT',\n TEXTAREA = 'TEXTAREA',\n TIME_PICKER = 'TIME_PICKER',\n TOGGLE = 'TOGGLE',\n}\n\nexport const componentMapper: ComponentMapper = {\n [componentTypes.ALERT]: Alert,\n [componentTypes.BANNER]: Banner,\n [componentTypes.CUSTOM]: Custom,\n [componentTypes.HEADING]: Heading,\n [componentTypes.HYPERLINK]: Hyperlink,\n [componentTypes.TOAST]: Toast,\n [componentTypes.CHECKBOX]: Checkbox,\n [componentTypes.COMBOBOX]: Combobox,\n [componentTypes.DATE_PICKER]: DatePicker,\n [componentTypes.FIELD_ARRAY]: FieldArray,\n [componentTypes.FORM_GROUP]: FormGroup,\n [componentTypes.INPUT]: Input,\n [componentTypes.MODAL]: Modal,\n [componentTypes.PARAGRAPH]: Paragraph,\n [componentTypes.PASSWORD_INPUT]: PasswordInput,\n [componentTypes.RADIO]: Radio,\n [componentTypes.SPY]: Spy,\n [componentTypes.SELECT]: Select,\n [componentTypes.TEXTAREA]: Textarea,\n [componentTypes.TIME_PICKER]: TimePicker,\n [componentTypes.TOGGLE]: Toggle,\n};\n\nexport { ComponentMapper };\n","import React from 'react';\n\nimport { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';\n\nexport const BasicTemplate = ({\n formFields,\n}: FormTemplateRenderProps) => {\n return (\n <div>\n {formFields}\n </div>\n );\n};\n","import React from 'react';\nimport {\n Button,\n ButtonColor,\n ButtonVariant,\n ButtonType,\n Form,\n ButtonGroup,\n} from 'react-magma-dom';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\n\nexport interface FormTemplateProps {\n formFields: any;\n schema: any;\n}\n\nexport const FormTemplate = ({\n formFields,\n schema: { cancelLabel, submitLabel },\n schema,\n}: FormTemplateProps) => {\n const { handleSubmit, onCancel, getState } = useFormApi();\n const { submitting, pristine } = getState();\n\n const actions = (\n <ButtonGroup>\n <Button\n disabled={pristine}\n variant={ButtonVariant.link}\n onClick={onCancel}\n >\n {cancelLabel || 'Cancel'}\n </Button>\n <Button\n disabled={submitting}\n type={ButtonType.submit}\n color={ButtonColor.primary}\n >\n {submitLabel || 'Submit'}\n </Button>\n </ButtonGroup>\n );\n\n const actionsVisible = React.useMemo(() => {\n return true;\n }, []);\n\n return (\n <Form\n onSubmit={handleSubmit}\n header={schema.title}\n description={schema.description}\n actions={actionsVisible ? actions : undefined}\n >\n {formFields}\n </Form>\n );\n};\n","import * as React from 'react';\nimport { BasicTemplate } from '../BasicTemplate';\nimport { FormTemplate } from '../FormTemplate';\n\nimport { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';\nexport interface TemplateMapper {\n [key: string]: (props: FormTemplateRenderProps) => React.ReactElement;\n}\n\nexport enum templateTypes {\n BASIC = 'BASIC',\n FORM = 'FORM',\n}\n\nexport const templateMapper: TemplateMapper = {\n [templateTypes.BASIC]: BasicTemplate,\n [templateTypes.FORM]: FormTemplate,\n};\n","import React from 'react';\n// import FormRender from '@data-driven-forms/react-form-renderer/dist/cjs/form-renderer';\n\nimport {\n FormRenderer,\n FormRendererProps,\n Schema as DataDrivenFormSchema,\n} from '@data-driven-forms/react-form-renderer';\nimport { componentMapper, ComponentMapper } from '../ComponentMapper';\nimport { templateMapper } from '../TemplateMapper';\nimport { ValidatorMapper } from '../ValidatorMapper';\n\nexport interface Schema extends DataDrivenFormSchema {\n type: string;\n}\n\nexport interface SchemaRendererProps\n extends Omit<FormRendererProps, 'FormTemplate' | 'componentMapper'> {\n schema: Schema;\n customComponentMapper?: ComponentMapper;\n customValidatorMapper?: ValidatorMapper;\n}\n\nexport const SchemaRenderer = ({\n schema,\n customComponentMapper = componentMapper,\n customValidatorMapper,\n ...rest\n}: SchemaRendererProps) => {\n return (\n <FormRenderer\n onCancel={() => {}}\n onSubmit={() => {}}\n {...rest}\n componentMapper={customComponentMapper}\n validatorMapper={customValidatorMapper}\n FormTemplate={templateMapper[schema.type]}\n schema={schema}\n />\n );\n};\n"],"names":["GroupedCheckbox","props","_useFieldApi","useFieldApi","name","type","value","input","React","MagmaCheckbox","CheckboxMapping","_useFieldApi2","options","validateOnMount","showError","_useFieldApi2$meta","meta","error","submitFailed","rest","_objectWithoutPropertiesLoose","_excluded","uuidv4","errorMessage","length","FormGroup","map","option","key","_option$value","toString","labelText","Checkbox","memo","ComboboxMapping","_useFieldApi$meta","innerRef","useRef","_React$useState","useState","_ref","_excluded2","_extends","label","items","updateItems","newItemTransform","_ref2","toLowerCase","onItemCreated","item","concat","onChange","isMulti","onSelectedItemsChange","evt","selectedItems","filter","includes","onSelectedItemChange","selectedItem","pop","MagmaCombobox","id","Combobox","CustomMapping","CustomComponent","customComponent","_useFormApi","useFormApi","getState","data","values","Custom","DatePickerMapping","MagmaDatePicker","DatePicker","FieldArrayItem","fields","fieldIndex","remove","minItems","removeLabel","renderForm","theme","ThemeContext","editedFields","field","computedName","children","IconButton","icon","DeleteIcon","variant","ButtonVariant","link","onClick","disabled","style","marginTop","spaceScale","spacing04","FieldArray","_objectDestructuringEmpty","arrayValidator","description","formFields","defaultItem","maxItems","_useFieldApi$noItemsM","noItemsMessage","FormControlProps","dirty","isError","FieldArrayBase","validate","_ref2$fields","_ref2$fields$value","push","Button","color","ButtonColor","primary","ButtonType","button","Paragraph","index","FormGroupMapping","subfields","useMemo","MagmaFormGroup","InputMapping","_useFieldApi$input","_useFieldApi$input$ty","inputRest","MagmaInput","InputType","text","Input","ModalMapping","MagmaModal","Modal","PasswordInputMapping","MagmaPasswordInput","PasswordInput","RadioMapping","RadioGroup","MagmaRadio","Radio","Spy","Template","template","FormSpy","SelectMapping","MagmaSelect","Select","TextareaMapping","MagmaTextarea","Textarea","TimePickerMapping","MagmaTimePicker","TimePicker","ToggleMapping","MagmaToggle","Toggle","componentTypes","componentMapper","_componentMapper","ALERT","Alert","BANNER","Banner","CUSTOM","HEADING","Heading","HYPERLINK","Hyperlink","TOAST","Toast","CHECKBOX","COMBOBOX","DATE_PICKER","FIELD_ARRAY","FORM_GROUP","INPUT","MODAL","PARAGRAPH","PASSWORD_INPUT","RADIO","SPY","SELECT","TEXTAREA","TIME_PICKER","TOGGLE","BasicTemplate","FormTemplate","_ref$schema","schema","cancelLabel","submitLabel","handleSubmit","onCancel","_getState","submitting","pristine","actions","ButtonGroup","submit","actionsVisible","Form","onSubmit","header","title","undefined","templateTypes","templateMapper","_templateMapper","BASIC","FORM","SchemaRenderer","_ref$customComponentM","customComponentMapper","customValidatorMapper","FormRenderer","validatorMapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,KAAoB;EAC3C,IAAAC,YAAA,GAAkBC,WAAW,CAAC;MAC5BC,IAAI,EAAEH,KAAK,CAACG,IAAI;MAChBC,IAAI,EAAE,UAAU;MAChBC,KAAK,EAAEL,KAAK,CAACK;KACd,CAAC;IAJMC,KAAK,GAAAL,YAAA,CAALK,KAAK;EAKb,OAAOC,6BAACC,UAAa,oBAAKR,KAAK,EAAMM,KAAK,EAAI;AAChD,CAAC;AAED,IAAMG,eAAe,GAAG,SAAlBA,eAAeA,CAAIT,KAAyB;EAChD,IAAAU,aAAA,GAOIR,WAAW,CAACF,KAAK,CAAC;IANpBM,KAAK,GAAAI,aAAA,CAALJ,KAAK;IACLK,OAAO,GAAAD,aAAA,CAAPC,OAAO;IACPC,eAAe,GAAAF,aAAA,CAAfE,eAAe;IACfC,SAAS,GAAAH,aA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GvB,aAAa,EAAAsB,eAAA,CACnCF,aAAa,CAACI,IAAI,IAAGvB,YAAY,EAAAqB,eAAA,CACnC;;;ACjBD,IAuBaG,cAAc,GAAG,SAAjBA,cAAcA,CAAAnL,IAAA;MACzB6J,MAAM,GAAA7J,IAAA,CAAN6J,MAAM;IAAAuB,qBAAA,GAAApL,IAAA,CACNqL,qBAAqB;IAArBA,qBAAqB,GAAAD,qBAAA,cAAGtD,eAAe,GAAAsD,qBAAA;IACvCE,qBAAqB,GAAAtL,IAAA,CAArBsL,qBAAqB;IAClB3M,IAAI,GAAAC,6BAAA,CAAAoB,IAAA,EAAAnB,WAAA;EAEP,OACEb,6BAACuN,YAAY;IACXtB,QAAQ,EAAE,SAAAA,aAAQ;IAClBS,QAAQ,EAAE,SAAAA;KACN/L,IAAI;IACRmJ,eAAe,EAAEuD,qBAAqB;IACtCG,eAAe,EAAEF,qBAAqB;IACtC3B,YAAY,EAAEoB,cAAc,CAAClB,MAAM,CAAChM,IAAI,CAAC;IACzCgM,MAAM,EAAEA;KACR;AAEN,CAAC;;;;"}
|
|
1
|
+
{"version":3,"file":"schema-renderer.esm.js","sources":["../src/components/Checkbox/index.tsx","../src/components/Combobox/index.tsx","../src/components/Custom/index.tsx","../src/components/DatePicker/index.tsx","../src/components/FieldArray/FieldArrayItem.tsx","../src/components/FieldArray/FieldArray.tsx","../src/components/FormGroup/index.tsx","../src/components/Input/index.tsx","../src/components/Modal/index.tsx","../src/components/PasswordInput/index.tsx","../src/components/Radio/index.tsx","../src/components/Select/index.tsx","../src/components/Spy/index.tsx","../src/components/Textarea/index.tsx","../src/components/TimePicker/index.tsx","../src/components/Toggle/index.tsx","../src/components/ComponentMapper/index.ts","../src/components/BasicTemplate/index.tsx","../src/components/FormTemplate/index.tsx","../src/components/TemplateMapper/index.ts","../src/components/SchemaRenderer/SchemaRenderer.tsx"],"sourcesContent":["import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Checkbox as MagmaCheckbox,\n CheckboxProps as MagmaCheckboxProps,\n FormGroup,\n FormGroupProps as MagmaFormGroupProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\ninterface MagmaMultiCheckboxProps extends MagmaFormGroupProps {\n options: MagmaCheckboxProps[];\n}\n\ntype CheckboxProps = MagmaCheckboxProps & UseFieldApiConfig;\ntype MultiCheckboxProps = MagmaMultiCheckboxProps & UseFieldApiConfig;\n\nconst GroupedCheckbox = (props: CheckboxProps) => {\n const { input } = useFieldApi({\n name: props.name,\n type: 'checkbox',\n value: props.value,\n });\n return <MagmaCheckbox {...props} {...input} />;\n};\n\nconst CheckboxMapping = (props: MultiCheckboxProps) => {\n const {\n input,\n options,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) ||\n rest.errorMessage;\n\n if (options && options.length > 0) {\n return (\n <FormGroup errorMessage={errorMessage} {...rest}>\n {options.map((option: MagmaCheckboxProps) => {\n return (\n <GroupedCheckbox\n name={name}\n {...option}\n key={option.value?.toString()}\n />\n );\n })}\n </FormGroup>\n );\n } else {\n return (\n <MagmaCheckbox\n {...input}\n name={name}\n labelText={rest.labelText}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n }\n};\n\nexport const Checkbox = React.memo(CheckboxMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { Combobox as MagmaCombobox } from 'react-magma-dom';\nimport { XORComboboxProps as MagmaComboboxProps } from 'react-magma-dom/dist/components/Combobox';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type ComboboxProps = MagmaComboboxProps<ComboOption> & UseFieldApiConfig;\n\ninterface ComboOption {\n label: string;\n value: string;\n name: string;\n}\n\ninterface ComboOptionEvent {\n selectedItem: ComboOption;\n}\n\ninterface MultiComboOptionEvent {\n selectedItems: ComboOption[];\n}\n\nconst ComboboxMapping = (props: ComboboxProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n options,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n const innerRef = React.useRef<HTMLInputElement>(null);\n\n const [items, updateItems] = React.useState(\n options.map(({ labelText, ...rest }: { labelText: string }) => {\n return { label: labelText, ...rest };\n })\n );\n\n const newItemTransform = ({ value }: { value: string }) => {\n return {\n label: value,\n value: value.toLowerCase(),\n };\n };\n\n const onItemCreated = (item: any) => {\n updateItems([...items, item]);\n input.onChange(item.value);\n };\n\n if (rest.isMulti) {\n rest.onSelectedItemsChange = (evt: MultiComboOptionEvent) => {\n input.onChange(evt.selectedItems.map(item => item.value));\n };\n rest.selectedItems = items.filter((item: { value: string }) =>\n input.value.includes(item.value)\n );\n } else {\n rest.onSelectedItemChange = (evt: ComboOptionEvent) => {\n input.onChange(evt.selectedItem.value);\n };\n rest.selectedItem = items\n .filter((item: { value: string }) => item.value === input.value)\n .pop();\n }\n\n return (\n <MagmaCombobox\n {...input}\n id={name}\n innerRef={innerRef}\n items={items}\n newItemTransform={newItemTransform}\n onItemCreated={onItemCreated}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Combobox = React.memo(ComboboxMapping);\n","import * as React from 'react';\n\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\n\nconst CustomMapping = (props: any) => {\n const { customComponent: CustomComponent, ...rest } = useFieldApi(props);\n const { getState } = useFormApi();\n\n return <CustomComponent {...rest} data={getState().values} />;\n};\n\nexport const Custom = React.memo(CustomMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n DatePicker as MagmaDatePicker,\n DatePickerProps as MagmaDatePickerProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type DatePickerProps = MagmaDatePickerProps & UseFieldApiConfig;\n\nconst DatePickerMapping = (props: DatePickerProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaDatePicker\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const DatePicker = React.memo(DatePickerMapping);\n","import * as React from 'react';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport { IconButton, ButtonVariant, ThemeContext } from 'react-magma-dom';\nimport { DeleteIcon } from 'react-magma-icons';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport const FieldArrayItem = ({\n fields,\n fieldIndex,\n name,\n remove,\n length,\n minItems,\n removeLabel,\n}: any) => {\n const { renderForm } = useFormApi();\n const theme = React.useContext(ThemeContext);\n\n const editedFields = React.useMemo(() => {\n return fields.map((field: any) => {\n const computedName = field.name ? `${name}.${field.name}` : uuidv4();\n return {\n ...field,\n name: computedName,\n key: computedName,\n labelText: fieldIndex === 0 ? field.labelText : null,\n children: (\n <IconButton\n aria-label={removeLabel}\n icon={<DeleteIcon />}\n variant={ButtonVariant.link}\n onClick={() => remove(fieldIndex)}\n disabled={length <= minItems}\n />\n ),\n };\n });\n }, [fields, name, fieldIndex]);\n\n return (\n <div style={{ marginTop: theme.spaceScale.spacing04 }}>\n {editedFields.map((field: any) => renderForm([field]))}\n </div>\n );\n};\n","import * as React from 'react';\n\nimport { FieldArray as FieldArrayBase } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { Button, ButtonColor, ButtonType, Paragraph } from 'react-magma-dom';\n\nimport { FieldArrayItem } from './FieldArrayItem';\n\nexport const FieldArray = ({ ...props }: any) => {\n const {\n arrayValidator,\n label,\n description,\n fields: formFields,\n defaultItem,\n meta,\n minItems,\n maxItems,\n noItemsMessage = \"You haven't added any items yet!\",\n FormControlProps,\n ...rest\n } = useFieldApi(props);\n\n const { dirty, submitFailed, error } = meta;\n const isError = (dirty || submitFailed) && error && typeof error === 'string';\n\n return (\n <FieldArrayBase\n key={rest.input.name}\n name={rest.input.name}\n validate={arrayValidator}\n >\n {({ fields: { map, value = [], push, remove } }) => {\n return (\n <>\n {<h6>label</h6>}\n <Button\n color={ButtonColor.primary}\n type={ButtonType.button}\n onClick={() => push(defaultItem)}\n disabled={value.length >= maxItems}\n >\n ADD ITEM\n </Button>\n {description && <Paragraph>{description}</Paragraph>}\n {value.length <= 0 ? (\n <Paragraph>{noItemsMessage}</Paragraph>\n ) : (\n map((name, index) => (\n <FieldArrayItem\n key={name}\n fields={formFields}\n name={name}\n fieldIndex={index}\n remove={remove}\n length={value.length}\n minItems={minItems}\n removeLabel=\"REMOVE\"\n />\n ))\n )}\n {isError && <Paragraph>{error}</Paragraph>}\n </>\n );\n }}\n </FieldArrayBase>\n );\n};\n","import React from 'react';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport {\n FormGroup as MagmaFormGroup,\n FormGroupProps as MagmaFormGroupProps,\n} from 'react-magma-dom';\n\nexport interface FormGroupProps extends MagmaFormGroupProps {\n fields: any;\n showError?: boolean;\n}\n\nconst FormGroupMapping = (props: FormGroupProps) => {\n const { renderForm } = useFormApi();\n\n const subfields = React.useMemo(() => {\n return props.fields.map((field: any) => ({\n ...field,\n showError: props.showError,\n }));\n }, [props.fields, props.showError]);\n\n return <MagmaFormGroup {...props}>{renderForm(subfields)}</MagmaFormGroup>;\n};\n\nexport const FormGroup = React.memo(FormGroupMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Input as MagmaInput,\n InputType,\n InputProps as MagmaInputProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type InputProps = MagmaInputProps & UseFieldApiConfig;\n\nconst InputMapping = (props: InputProps) => {\n const {\n input,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n input: { type = 'text', ...inputRest },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaInput\n {...inputRest}\n type={InputType[type as keyof typeof InputType] || InputType.text}\n id={id}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n};\n\nexport const Input = React.memo(InputMapping);\n","import React from 'react';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport {\n Modal as MagmaModal,\n ModalProps as MagmaModalProps,\n} from 'react-magma-dom';\n\nexport interface ModalProps extends MagmaModalProps {\n fields: any;\n showError?: boolean;\n}\n\nconst ModalMapping = (props: ModalProps) => {\n const { renderForm } = useFormApi();\n\n const subfields = React.useMemo(() => {\n return props.fields.map((field: any) => ({\n ...field,\n showError: props.showError,\n }));\n }, [props.fields, props.showError]);\n\n return <MagmaModal {...props}>{renderForm(subfields)}</MagmaModal>;\n};\n\nexport const Modal = React.memo(ModalMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n PasswordInput as MagmaPasswordInput,\n PasswordInputProps as MagmaPasswordInputProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type PasswordInputProps = MagmaPasswordInputProps & UseFieldApiConfig;\n\nconst PasswordInputMapping = (props: PasswordInputProps) => {\n const {\n input,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaPasswordInput\n {...input}\n labelText={rest.labelText}\n id={id}\n errorMessage={errorMessage}\n {...rest}\n />\n );\n};\n\nexport const PasswordInput = React.memo(PasswordInputMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Radio as MagmaRadio,\n RadioProps,\n RadioGroup,\n RadioGroupProps as MagmaRadioGroupProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\ntype RadioGroupProps = MagmaRadioGroupProps & UseFieldApiConfig;\n\nconst RadioMapping = (props: RadioGroupProps) => {\n const {\n input,\n options,\n validateOnMount,\n showError,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi({ ...props, type: 'radio' });\n const name = input.name || uuidv4();\n\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) ||\n rest.errorMessage;\n\n return (\n <RadioGroup\n onChange={input.onChange}\n errorMessage={errorMessage}\n name={name}\n {...rest}\n >\n {options.map((option: RadioProps) => {\n return <MagmaRadio {...option} key={option.value?.toString()} />;\n })}\n </RadioGroup>\n );\n};\n\nexport const Radio = React.memo(RadioMapping);\n","import * as React from 'react';\n\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport { Select as MagmaSelect } from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\ninterface SelectOption {\n label: string;\n value: string;\n name: string;\n}\n\ninterface SelectOptionEvent {\n selectedItem: SelectOption;\n}\n\ninterface MultiSelectOptionEvent {\n selectedItems: SelectOption[];\n}\n\nconst SelectMapping = (props: any) => {\n const {\n input,\n validateOnMount,\n showError,\n options,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const name = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n if (rest.isMulti) {\n rest.onSelectedItemsChange = (evt: MultiSelectOptionEvent) => {\n input.onChange(evt.selectedItems.map(item => item.value));\n };\n } else {\n rest.onSelectedItemChange = (evt: SelectOptionEvent) => {\n input.onChange(evt.selectedItem.value);\n };\n }\n\n return (\n <MagmaSelect\n id={name}\n items={options.map(({ labelText, ...rest }: { labelText: string }) => {\n return { label: labelText, ...rest };\n })}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Select = React.memo(SelectMapping);\n","import React from 'react';\n\nimport { FormSpy } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\n\nexport const Spy = (props: any) => {\n const { template: Template, ...rest } = useFieldApi(props);\n return (\n <FormSpy {...rest}>\n {props => {\n return <Template {...props} />;\n }}\n </FormSpy>\n );\n};\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Textarea as MagmaTextarea,\n TextareaProps as MagmaTextareaProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type TextareaProps = MagmaTextareaProps & UseFieldApiConfig;\n\nconst TextareaMapping = (props: TextareaProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaTextarea\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Textarea = React.memo(TextareaMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n TimePicker as MagmaTimePicker,\n TimePickerProps as MagmaTimePickerProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type TimePickerProps = MagmaTimePickerProps & UseFieldApiConfig;\n\nconst TimePickerMapping = (props: TimePickerProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaTimePicker\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const TimePicker = React.memo(TimePickerMapping);\n","import React from 'react';\n\nimport { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';\nimport useFieldApi from '@data-driven-forms/react-form-renderer/use-field-api';\nimport {\n Toggle as MagmaToggle,\n ToggleProps as MagmaToggleProps,\n} from 'react-magma-dom';\nimport { v4 as uuidv4 } from 'uuid';\n\nexport type ToggleProps = MagmaToggleProps & UseFieldApiConfig;\n\nconst ToggleMapping = (props: ToggleProps) => {\n const {\n input,\n validateOnMount,\n showError,\n type,\n meta: { error, submitFailed },\n ...rest\n } = useFieldApi(props);\n const id = input.name || uuidv4();\n const errorMessage =\n ((validateOnMount || submitFailed || showError) && error) || '';\n\n return (\n <MagmaToggle\n {...input}\n id={id}\n errorMessage={errorMessage}\n labelText={rest.labelText}\n {...rest}\n />\n );\n};\n\nexport const Toggle = React.memo(ToggleMapping);\n","import { ComponentMapper } from '@data-driven-forms/react-form-renderer';\nimport {\n Alert,\n Banner,\n Heading,\n Hyperlink,\n Toast,\n Paragraph,\n} from 'react-magma-dom';\n\nimport { Checkbox } from '../Checkbox';\nimport { Combobox } from '../Combobox';\nimport { Custom } from '../Custom';\nimport { DatePicker } from '../DatePicker';\nimport { FieldArray } from '../FieldArray';\nimport { FormGroup } from '../FormGroup';\nimport { Input } from '../Input';\nimport { Modal } from '../Modal';\nimport { PasswordInput } from '../PasswordInput';\nimport { Radio } from '../Radio';\nimport { Select } from '../Select';\nimport { Spy } from '../Spy';\nimport { Textarea } from '../Textarea';\nimport { TimePicker } from '../TimePicker';\nimport { Toggle } from '../Toggle';\n\nexport enum componentTypes {\n ALERT = 'ALERT',\n BANNER = 'BANNER',\n CUSTOM = 'CUSTOM',\n HEADING = 'HEADING',\n HYPERLINK = 'HYPERLINK',\n TOAST = 'TOAST',\n CHECKBOX = 'CHECKBOX',\n COMBOBOX = 'COMBOBOX',\n DATE_PICKER = 'DATE_PICKER',\n FIELD_ARRAY = 'FIELD_ARRAY',\n FORM_GROUP = 'FORM_GROUP',\n INPUT = 'INPUT',\n MODAL = 'MODAL',\n PARAGRAPH = 'PARAGRAPH',\n PASSWORD_INPUT = 'PASSWORD_INPUT',\n RADIO = 'RADIO',\n SPY = 'SPY',\n SELECT = 'SELECT',\n TEXTAREA = 'TEXTAREA',\n TIME_PICKER = 'TIME_PICKER',\n TOGGLE = 'TOGGLE',\n}\n\nexport const componentMapper: ComponentMapper = {\n [componentTypes.ALERT]: Alert,\n [componentTypes.BANNER]: Banner,\n [componentTypes.CUSTOM]: Custom,\n [componentTypes.HEADING]: Heading,\n [componentTypes.HYPERLINK]: Hyperlink,\n [componentTypes.TOAST]: Toast,\n [componentTypes.CHECKBOX]: Checkbox,\n [componentTypes.COMBOBOX]: Combobox,\n [componentTypes.DATE_PICKER]: DatePicker,\n [componentTypes.FIELD_ARRAY]: FieldArray,\n [componentTypes.FORM_GROUP]: FormGroup,\n [componentTypes.INPUT]: Input,\n [componentTypes.MODAL]: Modal,\n [componentTypes.PARAGRAPH]: Paragraph,\n [componentTypes.PASSWORD_INPUT]: PasswordInput,\n [componentTypes.RADIO]: Radio,\n [componentTypes.SPY]: Spy,\n [componentTypes.SELECT]: Select,\n [componentTypes.TEXTAREA]: Textarea,\n [componentTypes.TIME_PICKER]: TimePicker,\n [componentTypes.TOGGLE]: Toggle,\n};\n\nexport { ComponentMapper };\n","import React from 'react';\n\nimport { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';\n\nexport const BasicTemplate = ({ formFields }: FormTemplateRenderProps) => {\n return <div>{formFields}</div>;\n};\n","import React from 'react';\n\nimport useFormApi from '@data-driven-forms/react-form-renderer/use-form-api';\nimport {\n Button,\n ButtonColor,\n ButtonVariant,\n ButtonType,\n Form,\n ButtonGroup,\n} from 'react-magma-dom';\n\nexport interface FormTemplateProps {\n formFields: any;\n schema: any;\n}\n\nexport const FormTemplate = ({\n formFields,\n schema: { cancelLabel, submitLabel },\n schema,\n}: FormTemplateProps) => {\n const { handleSubmit, onCancel, getState } = useFormApi();\n const { submitting, pristine } = getState();\n\n const actions = (\n <ButtonGroup>\n <Button\n disabled={pristine}\n variant={ButtonVariant.link}\n onClick={onCancel}\n >\n {cancelLabel || 'Cancel'}\n </Button>\n <Button\n disabled={submitting}\n type={ButtonType.submit}\n color={ButtonColor.primary}\n >\n {submitLabel || 'Submit'}\n </Button>\n </ButtonGroup>\n );\n\n const actionsVisible = React.useMemo(() => {\n return true;\n }, []);\n\n return (\n <Form\n onSubmit={handleSubmit}\n header={schema.title}\n description={schema.description}\n actions={actionsVisible ? actions : undefined}\n >\n {formFields}\n </Form>\n );\n};\n","import * as React from 'react';\n\nimport { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';\n\nimport { BasicTemplate } from '../BasicTemplate';\nimport { FormTemplate } from '../FormTemplate';\n\nexport interface TemplateMapper {\n [key: string]: (props: FormTemplateRenderProps) => React.ReactElement;\n}\n\nexport enum templateTypes {\n BASIC = 'BASIC',\n FORM = 'FORM',\n}\n\nexport const templateMapper: TemplateMapper = {\n [templateTypes.BASIC]: BasicTemplate,\n [templateTypes.FORM]: FormTemplate,\n};\n","import React from 'react';\n// import FormRender from '@data-driven-forms/react-form-renderer/dist/cjs/form-renderer';\n\nimport {\n FormRenderer,\n FormRendererProps,\n Schema as DataDrivenFormSchema,\n} from '@data-driven-forms/react-form-renderer';\n\nimport { componentMapper, ComponentMapper } from '../ComponentMapper';\nimport { templateMapper } from '../TemplateMapper';\nimport { ValidatorMapper } from '../ValidatorMapper';\n\nexport interface Schema extends DataDrivenFormSchema {\n type: string;\n}\n\nexport interface SchemaRendererProps\n extends Omit<FormRendererProps, 'FormTemplate' | 'componentMapper'> {\n schema: Schema;\n customComponentMapper?: ComponentMapper;\n customValidatorMapper?: ValidatorMapper;\n}\n\nexport const SchemaRenderer = ({\n schema,\n customComponentMapper = componentMapper,\n customValidatorMapper,\n ...rest\n}: SchemaRendererProps) => {\n return (\n <FormRenderer\n onCancel={() => {}}\n onSubmit={() => {}}\n {...rest}\n componentMapper={customComponentMapper}\n validatorMapper={customValidatorMapper}\n FormTemplate={templateMapper[schema.type]}\n schema={schema}\n />\n );\n};\n"],"names":["GroupedCheckbox","props","_useFieldApi","useFieldApi","name","type","value","input","React","MagmaCheckbox","CheckboxMapping","_useFieldApi2","options","validateOnMount","showError","_useFieldApi2$meta","meta","error","submitFailed","rest","_objectWithoutPropertiesLoose","_excluded","uuidv4","errorMessage","length","FormGroup","map","option","key","_option$value","toString","labelText","Checkbox","memo","ComboboxMapping","_useFieldApi$meta","innerRef","useRef","_React$useState","useState","_ref","_excluded2","_extends","label","items","updateItems","newItemTransform","_ref2","toLowerCase","onItemCreated","item","concat","onChange","isMulti","onSelectedItemsChange","evt","selectedItems","filter","includes","onSelectedItemChange","selectedItem","pop","MagmaCombobox","id","Combobox","CustomMapping","CustomComponent","customComponent","_useFormApi","useFormApi","getState","data","values","Custom","DatePickerMapping","MagmaDatePicker","DatePicker","FieldArrayItem","fields","fieldIndex","remove","minItems","removeLabel","renderForm","theme","ThemeContext","editedFields","field","computedName","children","IconButton","icon","DeleteIcon","variant","ButtonVariant","link","onClick","disabled","style","marginTop","spaceScale","spacing04","FieldArray","_objectDestructuringEmpty","arrayValidator","description","formFields","defaultItem","maxItems","_useFieldApi$noItemsM","noItemsMessage","FormControlProps","dirty","isError","FieldArrayBase","validate","_ref2$fields","_ref2$fields$value","push","Button","color","ButtonColor","primary","ButtonType","button","Paragraph","index","FormGroupMapping","subfields","useMemo","MagmaFormGroup","InputMapping","_useFieldApi$input","_useFieldApi$input$ty","inputRest","MagmaInput","InputType","text","Input","ModalMapping","MagmaModal","Modal","PasswordInputMapping","MagmaPasswordInput","PasswordInput","RadioMapping","RadioGroup","MagmaRadio","Radio","SelectMapping","MagmaSelect","Select","Spy","Template","template","FormSpy","TextareaMapping","MagmaTextarea","Textarea","TimePickerMapping","MagmaTimePicker","TimePicker","ToggleMapping","MagmaToggle","Toggle","componentTypes","componentMapper","_componentMapper","ALERT","Alert","BANNER","Banner","CUSTOM","HEADING","Heading","HYPERLINK","Hyperlink","TOAST","Toast","CHECKBOX","COMBOBOX","DATE_PICKER","FIELD_ARRAY","FORM_GROUP","INPUT","MODAL","PARAGRAPH","PASSWORD_INPUT","RADIO","SPY","SELECT","TEXTAREA","TIME_PICKER","TOGGLE","BasicTemplate","FormTemplate","_ref$schema","schema","cancelLabel","submitLabel","handleSubmit","onCancel","_getState","submitting","pristine","actions","ButtonGroup","submit","actionsVisible","Form","onSubmit","header","title","undefined","templateTypes","templateMapper","_templateMapper","BASIC","FORM","SchemaRenderer","_ref$customComponentM","customComponentMapper","customValidatorMapper","FormRenderer","validatorMapper"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmBA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAIC,KAAoB;EAC3C,IAAAC,YAAA,GAAkBC,WAAW,CAAC;MAC5BC,IAAI,EAAEH,KAAK,CAACG,IAAI;MAChBC,IAAI,EAAE,UAAU;MAChBC,KAAK,EAAEL,KAAK,CAACK;KACd,CAAC;IAJMC,KAAK,GAAAL,YAAA,CAALK,KAAK;EAKb,OAAOC,6BAACC,UAAa,oBAAKR,KAAK,EAAMM,KAAK,EAAI;AAChD,CAAC;AAED,IAAMG,eAAe,GAAG,SAAlBA,eAAeA,CAAIT,KAAyB;EAChD,IAAAU,aAAA,GAOIR,WAAW,CAACF,KAAK,CAAC;IANpBM,KAAK,GAAAI,aAAA,CAALJ,KAAK;IACLK,OAAO,GAAAD,aAAA,CAAPC,OA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