@react-magma/schema-renderer 11.0.0-next.1 → 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.
Files changed (50) hide show
  1. package/dist/components/BasicTemplate/index.d.ts +2 -1
  2. package/dist/components/Checkbox/index.d.ts +1 -1
  3. package/dist/components/Combobox/index.d.ts +1 -1
  4. package/dist/components/Custom/index.d.ts +1 -1
  5. package/dist/components/DatePicker/index.d.ts +1 -1
  6. package/dist/components/FieldArray/FieldArray.d.ts +2 -1
  7. package/dist/components/FieldArray/FieldArrayItem.d.ts +2 -1
  8. package/dist/components/FormGroup/index.d.ts +1 -1
  9. package/dist/components/FormTemplate/index.d.ts +2 -1
  10. package/dist/components/Input/index.d.ts +1 -1
  11. package/dist/components/Modal/index.d.ts +1 -1
  12. package/dist/components/PasswordInput/index.d.ts +1 -1
  13. package/dist/components/Radio/index.d.ts +1 -1
  14. package/dist/components/SchemaRenderer/SchemaRenderer.d.ts +2 -1
  15. package/dist/components/SchemaRenderer/SchemaRenderer.stories.d.ts +2 -1
  16. package/dist/components/Select/index.d.ts +1 -1
  17. package/dist/components/Spy/index.d.ts +2 -1
  18. package/dist/components/Textarea/index.d.ts +1 -1
  19. package/dist/components/TimePicker/index.d.ts +1 -1
  20. package/dist/components/Toggle/index.d.ts +1 -1
  21. package/dist/schema-renderer.cjs.development.js +28 -35
  22. package/dist/schema-renderer.cjs.development.js.map +1 -1
  23. package/dist/schema-renderer.cjs.production.min.js +1 -1
  24. package/dist/schema-renderer.cjs.production.min.js.map +1 -1
  25. package/dist/schema-renderer.esm.js +28 -35
  26. package/dist/schema-renderer.esm.js.map +1 -1
  27. package/package.json +23 -23
  28. package/src/components/BasicTemplate/index.tsx +2 -8
  29. package/src/components/Checkbox/index.tsx +2 -1
  30. package/src/components/Combobox/index.tsx +2 -1
  31. package/src/components/ComponentMapper/index.ts +9 -10
  32. package/src/components/Custom/index.tsx +1 -0
  33. package/src/components/DatePicker/index.tsx +2 -1
  34. package/src/components/FieldArray/FieldArray.tsx +3 -7
  35. package/src/components/FieldArray/FieldArrayItem.tsx +2 -1
  36. package/src/components/FormGroup/index.tsx +1 -0
  37. package/src/components/FormTemplate/index.tsx +2 -2
  38. package/src/components/Input/index.tsx +2 -1
  39. package/src/components/Modal/index.tsx +1 -1
  40. package/src/components/PasswordInput/index.tsx +2 -1
  41. package/src/components/Radio/index.tsx +2 -1
  42. package/src/components/SchemaRenderer/SchemaRenderer.stories.tsx +5 -6
  43. package/src/components/SchemaRenderer/SchemaRenderer.test.tsx +2 -0
  44. package/src/components/SchemaRenderer/SchemaRenderer.tsx +1 -0
  45. package/src/components/Select/index.tsx +2 -1
  46. package/src/components/Spy/index.tsx +1 -0
  47. package/src/components/TemplateMapper/index.ts +3 -1
  48. package/src/components/Textarea/index.tsx +2 -1
  49. package/src/components/TimePicker/index.tsx +2 -1
  50. package/src/components/Toggle/index.tsx +2 -1
@@ -1,2 +1,3 @@
1
+ import React from 'react';
1
2
  import { FormTemplateRenderProps } from '@data-driven-forms/react-form-renderer';
2
- export declare const BasicTemplate: ({ formFields, }: FormTemplateRenderProps) => JSX.Element;
3
+ export declare const BasicTemplate: ({ formFields }: FormTemplateRenderProps) => React.JSX.Element;
@@ -5,5 +5,5 @@ interface MagmaMultiCheckboxProps extends MagmaFormGroupProps {
5
5
  options: MagmaCheckboxProps[];
6
6
  }
7
7
  declare type MultiCheckboxProps = MagmaMultiCheckboxProps & UseFieldApiConfig;
8
- export declare const Checkbox: React.MemoExoticComponent<(props: MultiCheckboxProps) => JSX.Element>;
8
+ export declare const Checkbox: React.MemoExoticComponent<(props: MultiCheckboxProps) => React.JSX.Element>;
9
9
  export {};
@@ -7,5 +7,5 @@ interface ComboOption {
7
7
  value: string;
8
8
  name: string;
9
9
  }
10
- export declare const Combobox: React.MemoExoticComponent<(props: ComboboxProps) => JSX.Element>;
10
+ export declare const Combobox: React.MemoExoticComponent<(props: ComboboxProps) => React.JSX.Element>;
11
11
  export {};
@@ -1,2 +1,2 @@
1
1
  import * as React from 'react';
2
- export declare const Custom: React.MemoExoticComponent<(props: any) => JSX.Element>;
2
+ export declare const Custom: React.MemoExoticComponent<(props: any) => React.JSX.Element>;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';
3
3
  import { DatePickerProps as MagmaDatePickerProps } from 'react-magma-dom';
4
4
  export declare type DatePickerProps = MagmaDatePickerProps & UseFieldApiConfig;
5
- export declare const DatePicker: React.MemoExoticComponent<(props: DatePickerProps) => JSX.Element>;
5
+ export declare const DatePicker: React.MemoExoticComponent<(props: DatePickerProps) => React.JSX.Element>;
@@ -1 +1,2 @@
1
- export declare const FieldArray: ({ ...props }: any) => JSX.Element;
1
+ import * as React from 'react';
2
+ export declare const FieldArray: ({ ...props }: any) => React.JSX.Element;
@@ -1 +1,2 @@
1
- export declare const FieldArrayItem: ({ fields, fieldIndex, name, remove, length, minItems, removeLabel, }: any) => JSX.Element;
1
+ import * as React from 'react';
2
+ export declare const FieldArrayItem: ({ fields, fieldIndex, name, remove, length, minItems, removeLabel, }: any) => React.JSX.Element;
@@ -4,4 +4,4 @@ export interface FormGroupProps extends MagmaFormGroupProps {
4
4
  fields: any;
5
5
  showError?: boolean;
6
6
  }
7
- export declare const FormGroup: React.MemoExoticComponent<(props: FormGroupProps) => JSX.Element>;
7
+ export declare const FormGroup: React.MemoExoticComponent<(props: FormGroupProps) => React.JSX.Element>;
@@ -1,5 +1,6 @@
1
+ import React from 'react';
1
2
  export interface FormTemplateProps {
2
3
  formFields: any;
3
4
  schema: any;
4
5
  }
5
- export declare const FormTemplate: ({ formFields, schema: { cancelLabel, submitLabel }, schema, }: FormTemplateProps) => JSX.Element;
6
+ export declare const FormTemplate: ({ formFields, schema: { cancelLabel, submitLabel }, schema, }: FormTemplateProps) => React.JSX.Element;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';
3
3
  import { InputProps as MagmaInputProps } from 'react-magma-dom';
4
4
  export declare type InputProps = MagmaInputProps & UseFieldApiConfig;
5
- export declare const Input: React.MemoExoticComponent<(props: InputProps) => JSX.Element>;
5
+ export declare const Input: React.MemoExoticComponent<(props: InputProps) => React.JSX.Element>;
@@ -4,4 +4,4 @@ export interface ModalProps extends MagmaModalProps {
4
4
  fields: any;
5
5
  showError?: boolean;
6
6
  }
7
- export declare const Modal: React.MemoExoticComponent<(props: ModalProps) => JSX.Element>;
7
+ export declare const Modal: React.MemoExoticComponent<(props: ModalProps) => React.JSX.Element>;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';
3
3
  import { PasswordInputProps as MagmaPasswordInputProps } from 'react-magma-dom';
4
4
  export declare type PasswordInputProps = MagmaPasswordInputProps & UseFieldApiConfig;
5
- export declare const PasswordInput: React.MemoExoticComponent<(props: PasswordInputProps) => JSX.Element>;
5
+ export declare const PasswordInput: React.MemoExoticComponent<(props: PasswordInputProps) => React.JSX.Element>;
@@ -2,5 +2,5 @@ import React from 'react';
2
2
  import { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';
3
3
  import { RadioGroupProps as MagmaRadioGroupProps } from 'react-magma-dom';
4
4
  declare type RadioGroupProps = MagmaRadioGroupProps & UseFieldApiConfig;
5
- export declare const Radio: React.MemoExoticComponent<(props: RadioGroupProps) => JSX.Element>;
5
+ export declare const Radio: React.MemoExoticComponent<(props: RadioGroupProps) => React.JSX.Element>;
6
6
  export {};
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { FormRendererProps, Schema as DataDrivenFormSchema } from '@data-driven-forms/react-form-renderer';
2
3
  import { ComponentMapper } from '../ComponentMapper';
3
4
  import { ValidatorMapper } from '../ValidatorMapper';
@@ -9,4 +10,4 @@ export interface SchemaRendererProps extends Omit<FormRendererProps, 'FormTempla
9
10
  customComponentMapper?: ComponentMapper;
10
11
  customValidatorMapper?: ValidatorMapper;
11
12
  }
12
- export declare const SchemaRenderer: ({ schema, customComponentMapper, customValidatorMapper, ...rest }: SchemaRendererProps) => JSX.Element;
13
+ export declare const SchemaRenderer: ({ schema, customComponentMapper, customValidatorMapper, ...rest }: SchemaRendererProps) => React.JSX.Element;
@@ -1,3 +1,4 @@
1
+ import React from 'react';
1
2
  import { SchemaRendererProps } from './SchemaRenderer';
2
3
  declare const _default: import("@storybook/csf").ComponentAnnotations<import("@storybook/react/types-6-0").ReactFramework, import("@storybook/react/types-6-0").Args>;
3
4
  export default _default;
@@ -6,4 +7,4 @@ export declare const FormGroups: import("@storybook/csf").AnnotatedStoryFn<impor
6
7
  export declare const Basic: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, SchemaRendererProps>;
7
8
  export declare const Modal: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, SchemaRendererProps>;
8
9
  export declare const Array: import("@storybook/csf").AnnotatedStoryFn<import("@storybook/react/types-6-0").ReactFramework, SchemaRendererProps>;
9
- export declare function Example(): JSX.Element;
10
+ export declare function Example(): React.JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import * as React from 'react';
2
- export declare const Select: React.MemoExoticComponent<(props: any) => JSX.Element>;
2
+ export declare const Select: React.MemoExoticComponent<(props: any) => React.JSX.Element>;
@@ -1 +1,2 @@
1
- export declare const Spy: (props: any) => JSX.Element;
1
+ import React from 'react';
2
+ export declare const Spy: (props: any) => React.JSX.Element;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';
3
3
  import { TextareaProps as MagmaTextareaProps } from 'react-magma-dom';
4
4
  export declare type TextareaProps = MagmaTextareaProps & UseFieldApiConfig;
5
- export declare const Textarea: React.MemoExoticComponent<(props: TextareaProps) => JSX.Element>;
5
+ export declare const Textarea: React.MemoExoticComponent<(props: TextareaProps) => React.JSX.Element>;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';
3
3
  import { TimePickerProps as MagmaTimePickerProps } from 'react-magma-dom';
4
4
  export declare type TimePickerProps = MagmaTimePickerProps & UseFieldApiConfig;
5
- export declare const TimePicker: React.MemoExoticComponent<(props: TimePickerProps) => JSX.Element>;
5
+ export declare const TimePicker: React.MemoExoticComponent<(props: TimePickerProps) => React.JSX.Element>;
@@ -2,4 +2,4 @@ import React from 'react';
2
2
  import { UseFieldApiConfig } from '@data-driven-forms/react-form-renderer';
3
3
  import { ToggleProps as MagmaToggleProps } from 'react-magma-dom';
4
4
  export declare type ToggleProps = MagmaToggleProps & UseFieldApiConfig;
5
- export declare const Toggle: React.MemoExoticComponent<(props: ToggleProps) => JSX.Element>;
5
+ export declare const Toggle: React.MemoExoticComponent<(props: ToggleProps) => React.JSX.Element>;
@@ -7,40 +7,33 @@ function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'defau
7
7
  var React = require('react');
8
8
  var React__default = _interopDefault(React);
9
9
  var reactFormRenderer = require('@data-driven-forms/react-form-renderer');
10
+ var reactMagmaDom = require('react-magma-dom');
10
11
  var useFieldApi = _interopDefault(require('@data-driven-forms/react-form-renderer/use-field-api'));
11
12
  var uuid = require('uuid');
12
- var reactMagmaDom = require('react-magma-dom');
13
13
  var useFormApi = _interopDefault(require('@data-driven-forms/react-form-renderer/use-form-api'));
14
14
  var reactMagmaIcons = require('react-magma-icons');
15
15
  var validatorTypes = _interopDefault(require('@data-driven-forms/react-form-renderer/validator-types'));
16
16
 
17
17
  function _extends() {
18
- _extends = Object.assign ? Object.assign.bind() : function (target) {
19
- for (var i = 1; i < arguments.length; i++) {
20
- var source = arguments[i];
21
- for (var key in source) {
22
- if (Object.prototype.hasOwnProperty.call(source, key)) {
23
- target[key] = source[key];
24
- }
25
- }
18
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
19
+ for (var e = 1; e < arguments.length; e++) {
20
+ var t = arguments[e];
21
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
26
22
  }
27
- return target;
28
- };
29
- return _extends.apply(this, arguments);
23
+ return n;
24
+ }, _extends.apply(null, arguments);
30
25
  }
31
- function _objectDestructuringEmpty(obj) {
32
- if (obj == null) throw new TypeError("Cannot destructure " + obj);
26
+ function _objectDestructuringEmpty(t) {
27
+ if (null == t) throw new TypeError("Cannot destructure " + t);
33
28
  }
34
- function _objectWithoutPropertiesLoose(source, excluded) {
35
- if (source == null) return {};
36
- var target = {};
37
- for (var key in source) {
38
- if (Object.prototype.hasOwnProperty.call(source, key)) {
39
- if (excluded.indexOf(key) >= 0) continue;
40
- target[key] = source[key];
41
- }
29
+ function _objectWithoutPropertiesLoose(r, e) {
30
+ if (null == r) return {};
31
+ var t = {};
32
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
33
+ if (-1 !== e.indexOf(n)) continue;
34
+ t[n] = r[n];
42
35
  }
43
- return target;
36
+ return t;
44
37
  }
45
38
 
46
39
  var _excluded = ["input", "options", "validateOnMount", "showError", "meta"];
@@ -374,17 +367,7 @@ var RadioMapping = function RadioMapping(props) {
374
367
  };
375
368
  var Radio = /*#__PURE__*/React__default.memo(RadioMapping);
376
369
 
377
- var _excluded$8 = ["template"];
378
- var Spy = function Spy(props) {
379
- var _useFieldApi = useFieldApi(props),
380
- Template = _useFieldApi.template,
381
- rest = _objectWithoutPropertiesLoose(_useFieldApi, _excluded$8);
382
- return React__default.createElement(reactFormRenderer.FormSpy, Object.assign({}, rest), function (props) {
383
- return React__default.createElement(Template, Object.assign({}, props));
384
- });
385
- };
386
-
387
- var _excluded$9 = ["input", "validateOnMount", "showError", "options", "type", "meta"],
370
+ var _excluded$8 = ["input", "validateOnMount", "showError", "options", "type", "meta"],
388
371
  _excluded2$2 = ["labelText"];
389
372
  var SelectMapping = function SelectMapping(props) {
390
373
  var _useFieldApi = useFieldApi(props),
@@ -395,7 +378,7 @@ var SelectMapping = function SelectMapping(props) {
395
378
  _useFieldApi$meta = _useFieldApi.meta,
396
379
  error = _useFieldApi$meta.error,
397
380
  submitFailed = _useFieldApi$meta.submitFailed,
398
- rest = _objectWithoutPropertiesLoose(_useFieldApi, _excluded$9);
381
+ rest = _objectWithoutPropertiesLoose(_useFieldApi, _excluded$8);
399
382
  var name = input.name || uuid.v4();
400
383
  var errorMessage = (validateOnMount || submitFailed || showError) && error || '';
401
384
  if (rest.isMulti) {
@@ -424,6 +407,16 @@ var SelectMapping = function SelectMapping(props) {
424
407
  };
425
408
  var Select = /*#__PURE__*/React.memo(SelectMapping);
426
409
 
410
+ var _excluded$9 = ["template"];
411
+ var Spy = function Spy(props) {
412
+ var _useFieldApi = useFieldApi(props),
413
+ Template = _useFieldApi.template,
414
+ rest = _objectWithoutPropertiesLoose(_useFieldApi, _excluded$9);
415
+ return React__default.createElement(reactFormRenderer.FormSpy, Object.assign({}, rest), function (props) {
416
+ return React__default.createElement(Template, Object.assign({}, props));
417
+ });
418
+ };
419
+
427
420
  var _excluded$a = ["input", "validateOnMount", "showError", "type", "meta"];
428
421
  var TextareaMapping = function TextareaMapping(props) {
429
422
  var _useFieldApi = useFieldApi(props),
@@ -1 +1 @@
1
- {"version":3,"file":"schema-renderer.cjs.development.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,sBAAa,oBAAKR,KAAK,EAAMM,KAAK,EAAI;AAChD,CAAC;AAED,IAAMG,eAAe,GAAG,SAAlBA,eAAeA,CAAIT,KAAyB;EAChD,IAAAU,aAAA,GAOIR,WAAW,CAACF,KAAK,CAAC;IANpBM,K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AU,CACN;AAEX,CAAC;;;ACzDD,AAQA,WAAY4G,aAAa;EACvBA,gCAAe;EACfA,8BAAa;AACf,CAAC,EAHWA,qBAAa,KAAbA,qBAAa;AAKzB,IAAaC,cAAc,IAAAC,eAAA,OAAAA,eAAA,CACxBF,qBAAa,CAACG,KAAK,IAAGvB,aAAa,EAAAsB,eAAA,CACnCF,qBAAa,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,8BAAY;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.cjs.development.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,sBAAa,oBAAKR,KAAK,EAA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,EAAEV,YAAY;IACtBW,MAAM,EAAEd,MAAM,CAACe,KAAK;IACpB3G,WAAW,EAAE4F,MAAM,CAAC5F,WAAW;IAC/BoG,OAAO,EAAEG,cAAc,GAAGH,OAAO,GAAGQ;KAEnC3G,UAAU,CACN;AAEX,CAAC;;;ACtDD,AAOA,WAAY4G,aAAa;EACvBA,gCAAe;EACfA,8BAAa;AACf,CAAC,EAHWA,qBAAa,KAAbA,qBAAa;AAKzB,IAAaC,cAAc,IAAAC,eAAA,OAAAA,eAAA,CACxBF,qBAAa,CAACG,KAAK,IAAGvB,aAAa,EAAAsB,eAAA,CACnCF,qBAAa,CAACI,IAAI,IAAGvB,YAAY,EAAAqB,eAAA,CACnC;;;ACnBD,IAwBaG,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,8BAAY;IACXtB,QAAQ,EAAE,SAAVA,QAAQA,KAAU;IAClBS,QAAQ,EAAE,SAAVA,QAAQA;KACJ/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,2 +1,2 @@
1
- "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),r=e(t),n=require("@data-driven-forms/react-form-renderer"),o=e(require("@data-driven-forms/react-form-renderer/use-field-api")),a=require("uuid"),i=require("react-magma-dom"),s=e(require("@data-driven-forms/react-form-renderer/use-form-api")),l=require("react-magma-icons"),m=e(require("@data-driven-forms/react-form-renderer/validator-types"));function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e}).apply(this,arguments)}function p(e,t){if(null==e)return{};var r={};for(var n in e)if(Object.prototype.hasOwnProperty.call(e,n)){if(t.indexOf(n)>=0)continue;r[n]=e[n]}return r}var c,d,E=["input","options","validateOnMount","showError","meta"],v=function(e){var t=o({name:e.name,type:"checkbox",value:e.value});return r.createElement(i.Checkbox,Object.assign({},e,t.input))},T=function(e){var t=o(e),n=t.input,s=t.options,l=t.validateOnMount,m=t.showError,u=t.meta,c=u.error,d=u.submitFailed,T=p(t,E),f=n.name||a.v4(),O=(l||d||m)&&c||T.errorMessage;return s&&s.length>0?r.createElement(i.FormGroup,Object.assign({errorMessage:O},T),s.map((function(e){var t;return r.createElement(v,Object.assign({name:f},e,{key:null==(t=e.value)?void 0:t.toString()}))}))):r.createElement(i.Checkbox,Object.assign({},n,{name:f,labelText:T.labelText,errorMessage:O},T))},f=r.memo(T),O=["input","validateOnMount","showError","type","options","meta"],b=["labelText"],g=function(e){var t=o(e),n=t.input,s=t.validateOnMount,l=t.showError,m=t.options,c=t.meta,d=c.error,E=c.submitFailed,v=p(t,O),T=n.name||a.v4(),f=(s||E||l)&&d||"",g=r.useRef(null),y=r.useState(m.map((function(e){return u({label:e.labelText},p(e,b))}))),M=y[0],h=y[1];return v.isMulti?(v.onSelectedItemsChange=function(e){n.onChange(e.selectedItems.map((function(e){return e.value})))},v.selectedItems=M.filter((function(e){return n.value.includes(e.value)}))):(v.onSelectedItemChange=function(e){n.onChange(e.selectedItem.value)},v.selectedItem=M.filter((function(e){return e.value===n.value})).pop()),r.createElement(i.Combobox,Object.assign({},n,{id:T,innerRef:g,items:M,newItemTransform:function(e){var t=e.value;return{label:t,value:t.toLowerCase()}},onItemCreated:function(e){h([].concat(M,[e])),n.onChange(e.value)},errorMessage:f,labelText:v.labelText},v))},y=r.memo(g),M=["customComponent"],h=function(e){var r=o(e),n=r.customComponent,a=p(r,M),i=s();return t.createElement(n,Object.assign({},a,{data:(0,i.getState)().values}))},x=t.memo(h),I=["input","validateOnMount","showError","type","meta"],C=function(e){var t=o(e),n=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,I),E=n.name||a.v4();return r.createElement(i.DatePicker,Object.assign({},n,{id:E,errorMessage:(s||c||l)&&u||"",labelText:d.labelText},d))},R=r.memo(C),A=function(e){var r=e.fields,n=e.fieldIndex,o=e.name,m=e.remove,p=e.length,c=e.minItems,d=e.removeLabel,E=s().renderForm,v=t.useContext(i.ThemeContext),T=t.useMemo((function(){return r.map((function(e){var r=e.name?o+"."+e.name:a.v4();return u({},e,{name:r,key:r,labelText:0===n?e.labelText:null,children:t.createElement(i.IconButton,{"aria-label":d,icon:t.createElement(l.DeleteIcon,null),variant:i.ButtonVariant.link,onClick:function(){return m(n)},disabled:p<=c})})}))}),[r,o,n]);return t.createElement("div",{style:{marginTop:v.spaceScale.spacing04}},T.map((function(e){return E([e])})))},P=["arrayValidator","label","description","fields","defaultItem","meta","minItems","maxItems","noItemsMessage","FormControlProps"],S=function(e){var t=s().renderForm,n=r.useMemo((function(){return e.fields.map((function(t){return u({},t,{showError:e.showError})}))}),[e.fields,e.showError]);return r.createElement(i.FormGroup,Object.assign({},e),t(n))},F=r.memo(S),w=["type"],B=["input","validateOnMount","showError","meta","input"],j=function(e){var t=o(e),n=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=t.input,E=d.type,v=void 0===E?"text":E,T=p(d,w),f=p(t,B),O=n.name||a.v4();return r.createElement(i.Input,Object.assign({},T,{type:i.InputType[v]||i.InputType.text,id:O,errorMessage:(s||c||l)&&u||""},f))},L=r.memo(j),D=function(e){var t=s().renderForm,n=r.useMemo((function(){return e.fields.map((function(t){return u({},t,{showError:e.showError})}))}),[e.fields,e.showError]);return r.createElement(i.Modal,Object.assign({},e),t(n))},G=r.memo(D),N=["input","validateOnMount","showError","meta"],_=function(e){var t=o(e),n=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,N),E=n.name||a.v4();return r.createElement(i.PasswordInput,Object.assign({},n,{labelText:d.labelText,id:E,errorMessage:(s||c||l)&&u||""},d))},k=r.memo(_),H=["input","options","validateOnMount","showError","meta"],K=function(e){var t=o(u({},e,{type:"radio"})),n=t.input,s=t.options,l=t.validateOnMount,m=t.showError,c=t.meta,d=c.error,E=c.submitFailed,v=p(t,H),T=n.name||a.v4();return r.createElement(i.RadioGroup,Object.assign({onChange:n.onChange,errorMessage:(l||E||m)&&d||v.errorMessage,name:T},v),s.map((function(e){var t;return r.createElement(i.Radio,Object.assign({},e,{key:null==(t=e.value)?void 0:t.toString()}))})))},U=r.memo(K),Y=["template"],X=["input","validateOnMount","showError","options","type","meta"],q=["labelText"],V=function(e){var r=o(e),n=r.input,s=r.validateOnMount,l=r.showError,m=r.options,c=r.meta,d=c.error,E=c.submitFailed,v=p(r,X),T=n.name||a.v4(),f=(s||E||l)&&d||"";return v.isMulti?v.onSelectedItemsChange=function(e){n.onChange(e.selectedItems.map((function(e){return e.value})))}:v.onSelectedItemChange=function(e){n.onChange(e.selectedItem.value)},t.createElement(i.Select,Object.assign({id:T,items:m.map((function(e){return u({label:e.labelText},p(e,q))})),errorMessage:f,labelText:v.labelText},v))},W=t.memo(V),z=["input","validateOnMount","showError","type","meta"],J=function(e){var t=o(e),n=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,z),E=n.name||a.v4();return r.createElement(i.Textarea,Object.assign({},n,{id:E,errorMessage:(s||c||l)&&u||"",labelText:d.labelText},d))},Q=r.memo(J),Z=["input","validateOnMount","showError","type","meta"],$=function(e){var t=o(e),n=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,Z),E=n.name||a.v4();return r.createElement(i.TimePicker,Object.assign({},n,{id:E,errorMessage:(s||c||l)&&u||"",labelText:d.labelText},d))},ee=r.memo($),te=["input","validateOnMount","showError","type","meta"],re=function(e){var t=o(e),n=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,te),E=n.name||a.v4();return r.createElement(i.Toggle,Object.assign({},n,{id:E,errorMessage:(s||c||l)&&u||"",labelText:d.labelText},d))},ne=r.memo(re);(d=exports.componentTypes||(exports.componentTypes={})).ALERT="ALERT",d.BANNER="BANNER",d.CUSTOM="CUSTOM",d.HEADING="HEADING",d.HYPERLINK="HYPERLINK",d.TOAST="TOAST",d.CHECKBOX="CHECKBOX",d.COMBOBOX="COMBOBOX",d.DATE_PICKER="DATE_PICKER",d.FIELD_ARRAY="FIELD_ARRAY",d.FORM_GROUP="FORM_GROUP",d.INPUT="INPUT",d.MODAL="MODAL",d.PARAGRAPH="PARAGRAPH",d.PASSWORD_INPUT="PASSWORD_INPUT",d.RADIO="RADIO",d.SPY="SPY",d.SELECT="SELECT",d.TEXTAREA="TEXTAREA",d.TIME_PICKER="TIME_PICKER",d.TOGGLE="TOGGLE";var oe,ae,ie=((c={})[exports.componentTypes.ALERT]=i.Alert,c[exports.componentTypes.BANNER]=i.Banner,c[exports.componentTypes.CUSTOM]=x,c[exports.componentTypes.HEADING]=i.Heading,c[exports.componentTypes.HYPERLINK]=i.Hyperlink,c[exports.componentTypes.TOAST]=i.Toast,c[exports.componentTypes.CHECKBOX]=f,c[exports.componentTypes.COMBOBOX]=y,c[exports.componentTypes.DATE_PICKER]=R,c[exports.componentTypes.FIELD_ARRAY]=function(e){var r=u({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e)),a=o(r),s=a.arrayValidator,l=a.description,m=a.fields,c=a.defaultItem,d=a.meta,E=a.minItems,v=a.maxItems,T=a.noItemsMessage,f=void 0===T?"You haven't added any items yet!":T,O=p(a,P),b=d.error,g=(d.dirty||d.submitFailed)&&b&&"string"==typeof b;return t.createElement(n.FieldArray,{key:O.input.name,name:O.input.name,validate:s},(function(e){var r=e.fields,n=r.map,o=r.value,a=void 0===o?[]:o,s=r.push,u=r.remove;return t.createElement(t.Fragment,null,t.createElement("h6",null,"label"),t.createElement(i.Button,{color:i.ButtonColor.primary,type:i.ButtonType.button,onClick:function(){return s(c)},disabled:a.length>=v},"ADD ITEM"),l&&t.createElement(i.Paragraph,null,l),a.length<=0?t.createElement(i.Paragraph,null,f):n((function(e,r){return t.createElement(A,{key:e,fields:m,name:e,fieldIndex:r,remove:u,length:a.length,minItems:E,removeLabel:"REMOVE"})})),g&&t.createElement(i.Paragraph,null,b))}))},c[exports.componentTypes.FORM_GROUP]=F,c[exports.componentTypes.INPUT]=L,c[exports.componentTypes.MODAL]=G,c[exports.componentTypes.PARAGRAPH]=i.Paragraph,c[exports.componentTypes.PASSWORD_INPUT]=k,c[exports.componentTypes.RADIO]=U,c[exports.componentTypes.SPY]=function(e){var t=o(e),a=t.template,i=p(t,Y);return r.createElement(n.FormSpy,Object.assign({},i),(function(e){return r.createElement(a,Object.assign({},e))}))},c[exports.componentTypes.SELECT]=W,c[exports.componentTypes.TEXTAREA]=Q,c[exports.componentTypes.TIME_PICKER]=ee,c[exports.componentTypes.TOGGLE]=ne,c);(ae=exports.templateTypes||(exports.templateTypes={})).BASIC="BASIC",ae.FORM="FORM";var se=((oe={})[exports.templateTypes.BASIC]=function(e){return r.createElement("div",null,e.formFields)},oe[exports.templateTypes.FORM]=function(e){var t=e.formFields,n=e.schema,o=n.cancelLabel,a=n.submitLabel,l=e.schema,m=s(),u=m.handleSubmit,p=m.onCancel,c=(0,m.getState)(),d=c.submitting,E=r.createElement(i.ButtonGroup,null,r.createElement(i.Button,{disabled:c.pristine,variant:i.ButtonVariant.link,onClick:p},o||"Cancel"),r.createElement(i.Button,{disabled:d,type:i.ButtonType.submit,color:i.ButtonColor.primary},a||"Submit")),v=r.useMemo((function(){return!0}),[]);return r.createElement(i.Form,{onSubmit:u,header:l.title,description:l.description,actions:v?E:void 0},t)},oe),le=["schema","customComponentMapper","customValidatorMapper"];exports.validatorTypes=m,exports.SchemaRenderer=function(e){var t=e.schema,o=e.customComponentMapper,a=void 0===o?ie:o,i=e.customValidatorMapper,s=p(e,le);return r.createElement(n.FormRenderer,Object.assign({onCancel:function(){},onSubmit:function(){}},s,{componentMapper:a,validatorMapper:i,FormTemplate:se[t.type],schema:t}))},exports.componentMapper=ie,exports.templateMapper=se;
1
+ "use strict";function e(e){return e&&"object"==typeof e&&"default"in e?e.default:e}Object.defineProperty(exports,"__esModule",{value:!0});var t=require("react"),n=e(t),r=require("@data-driven-forms/react-form-renderer"),o=require("react-magma-dom"),a=e(require("@data-driven-forms/react-form-renderer/use-field-api")),i=require("uuid"),s=e(require("@data-driven-forms/react-form-renderer/use-form-api")),l=require("react-magma-icons"),m=e(require("@data-driven-forms/react-form-renderer/validator-types"));function u(){return(u=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(null,arguments)}function p(e,t){if(null==e)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(-1!==t.indexOf(r))continue;n[r]=e[r]}return n}var c,d,E=["input","options","validateOnMount","showError","meta"],v=function(e){var t=a({name:e.name,type:"checkbox",value:e.value});return n.createElement(o.Checkbox,Object.assign({},e,t.input))},T=function(e){var t=a(e),r=t.input,s=t.options,l=t.validateOnMount,m=t.showError,u=t.meta,c=u.error,d=u.submitFailed,T=p(t,E),f=r.name||i.v4(),O=(l||d||m)&&c||T.errorMessage;return s&&s.length>0?n.createElement(o.FormGroup,Object.assign({errorMessage:O},T),s.map((function(e){var t;return n.createElement(v,Object.assign({name:f},e,{key:null==(t=e.value)?void 0:t.toString()}))}))):n.createElement(o.Checkbox,Object.assign({},r,{name:f,labelText:T.labelText,errorMessage:O},T))},f=n.memo(T),O=["input","validateOnMount","showError","type","options","meta"],b=["labelText"],g=function(e){var t=a(e),r=t.input,s=t.validateOnMount,l=t.showError,m=t.options,c=t.meta,d=c.error,E=c.submitFailed,v=p(t,O),T=r.name||i.v4(),f=(s||E||l)&&d||"",g=n.useRef(null),M=n.useState(m.map((function(e){return u({label:e.labelText},p(e,b))}))),y=M[0],x=M[1];return v.isMulti?(v.onSelectedItemsChange=function(e){r.onChange(e.selectedItems.map((function(e){return e.value})))},v.selectedItems=y.filter((function(e){return r.value.includes(e.value)}))):(v.onSelectedItemChange=function(e){r.onChange(e.selectedItem.value)},v.selectedItem=y.filter((function(e){return e.value===r.value})).pop()),n.createElement(o.Combobox,Object.assign({},r,{id:T,innerRef:g,items:y,newItemTransform:function(e){var t=e.value;return{label:t,value:t.toLowerCase()}},onItemCreated:function(e){x([].concat(y,[e])),r.onChange(e.value)},errorMessage:f,labelText:v.labelText},v))},M=n.memo(g),y=["customComponent"],x=function(e){var n=a(e),r=n.customComponent,o=p(n,y),i=s();return t.createElement(r,Object.assign({},o,{data:(0,i.getState)().values}))},h=t.memo(x),I=["input","validateOnMount","showError","type","meta"],C=function(e){var t=a(e),r=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,I),E=r.name||i.v4();return n.createElement(o.DatePicker,Object.assign({},r,{id:E,errorMessage:(s||c||l)&&u||"",labelText:d.labelText},d))},R=n.memo(C),A=function(e){var n=e.fields,r=e.fieldIndex,a=e.name,m=e.remove,p=e.length,c=e.minItems,d=e.removeLabel,E=s().renderForm,v=t.useContext(o.ThemeContext),T=t.useMemo((function(){return n.map((function(e){var n=e.name?a+"."+e.name:i.v4();return u({},e,{name:n,key:n,labelText:0===r?e.labelText:null,children:t.createElement(o.IconButton,{"aria-label":d,icon:t.createElement(l.DeleteIcon,null),variant:o.ButtonVariant.link,onClick:function(){return m(r)},disabled:p<=c})})}))}),[n,a,r]);return t.createElement("div",{style:{marginTop:v.spaceScale.spacing04}},T.map((function(e){return E([e])})))},P=["arrayValidator","label","description","fields","defaultItem","meta","minItems","maxItems","noItemsMessage","FormControlProps"],S=function(e){var t=s().renderForm,r=n.useMemo((function(){return e.fields.map((function(t){return u({},t,{showError:e.showError})}))}),[e.fields,e.showError]);return n.createElement(o.FormGroup,Object.assign({},e),t(r))},F=n.memo(S),w=["type"],B=["input","validateOnMount","showError","meta","input"],j=function(e){var t=a(e),r=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=t.input,E=d.type,v=void 0===E?"text":E,T=p(d,w),f=p(t,B),O=r.name||i.v4();return n.createElement(o.Input,Object.assign({},T,{type:o.InputType[v]||o.InputType.text,id:O,errorMessage:(s||c||l)&&u||""},f))},L=n.memo(j),D=function(e){var t=s().renderForm,r=n.useMemo((function(){return e.fields.map((function(t){return u({},t,{showError:e.showError})}))}),[e.fields,e.showError]);return n.createElement(o.Modal,Object.assign({},e),t(r))},G=n.memo(D),N=["input","validateOnMount","showError","meta"],_=function(e){var t=a(e),r=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,N),E=r.name||i.v4();return n.createElement(o.PasswordInput,Object.assign({},r,{labelText:d.labelText,id:E,errorMessage:(s||c||l)&&u||""},d))},k=n.memo(_),H=["input","options","validateOnMount","showError","meta"],K=function(e){var t=a(u({},e,{type:"radio"})),r=t.input,s=t.options,l=t.validateOnMount,m=t.showError,c=t.meta,d=c.error,E=c.submitFailed,v=p(t,H),T=r.name||i.v4();return n.createElement(o.RadioGroup,Object.assign({onChange:r.onChange,errorMessage:(l||E||m)&&d||v.errorMessage,name:T},v),s.map((function(e){var t;return n.createElement(o.Radio,Object.assign({},e,{key:null==(t=e.value)?void 0:t.toString()}))})))},U=n.memo(K),Y=["input","validateOnMount","showError","options","type","meta"],X=["labelText"],q=function(e){var n=a(e),r=n.input,s=n.validateOnMount,l=n.showError,m=n.options,c=n.meta,d=c.error,E=c.submitFailed,v=p(n,Y),T=r.name||i.v4(),f=(s||E||l)&&d||"";return v.isMulti?v.onSelectedItemsChange=function(e){r.onChange(e.selectedItems.map((function(e){return e.value})))}:v.onSelectedItemChange=function(e){r.onChange(e.selectedItem.value)},t.createElement(o.Select,Object.assign({id:T,items:m.map((function(e){return u({label:e.labelText},p(e,X))})),errorMessage:f,labelText:v.labelText},v))},V=t.memo(q),W=["template"],z=["input","validateOnMount","showError","type","meta"],J=function(e){var t=a(e),r=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,z),E=r.name||i.v4();return n.createElement(o.Textarea,Object.assign({},r,{id:E,errorMessage:(s||c||l)&&u||"",labelText:d.labelText},d))},Q=n.memo(J),Z=["input","validateOnMount","showError","type","meta"],$=function(e){var t=a(e),r=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,Z),E=r.name||i.v4();return n.createElement(o.TimePicker,Object.assign({},r,{id:E,errorMessage:(s||c||l)&&u||"",labelText:d.labelText},d))},ee=n.memo($),te=["input","validateOnMount","showError","type","meta"],ne=function(e){var t=a(e),r=t.input,s=t.validateOnMount,l=t.showError,m=t.meta,u=m.error,c=m.submitFailed,d=p(t,te),E=r.name||i.v4();return n.createElement(o.Toggle,Object.assign({},r,{id:E,errorMessage:(s||c||l)&&u||"",labelText:d.labelText},d))},re=n.memo(ne);(d=exports.componentTypes||(exports.componentTypes={})).ALERT="ALERT",d.BANNER="BANNER",d.CUSTOM="CUSTOM",d.HEADING="HEADING",d.HYPERLINK="HYPERLINK",d.TOAST="TOAST",d.CHECKBOX="CHECKBOX",d.COMBOBOX="COMBOBOX",d.DATE_PICKER="DATE_PICKER",d.FIELD_ARRAY="FIELD_ARRAY",d.FORM_GROUP="FORM_GROUP",d.INPUT="INPUT",d.MODAL="MODAL",d.PARAGRAPH="PARAGRAPH",d.PASSWORD_INPUT="PASSWORD_INPUT",d.RADIO="RADIO",d.SPY="SPY",d.SELECT="SELECT",d.TEXTAREA="TEXTAREA",d.TIME_PICKER="TIME_PICKER",d.TOGGLE="TOGGLE";var oe,ae,ie=((c={})[exports.componentTypes.ALERT]=o.Alert,c[exports.componentTypes.BANNER]=o.Banner,c[exports.componentTypes.CUSTOM]=h,c[exports.componentTypes.HEADING]=o.Heading,c[exports.componentTypes.HYPERLINK]=o.Hyperlink,c[exports.componentTypes.TOAST]=o.Toast,c[exports.componentTypes.CHECKBOX]=f,c[exports.componentTypes.COMBOBOX]=M,c[exports.componentTypes.DATE_PICKER]=R,c[exports.componentTypes.FIELD_ARRAY]=function(e){var n=u({},(function(e){if(null==e)throw new TypeError("Cannot destructure "+e)}(e),e)),i=a(n),s=i.arrayValidator,l=i.description,m=i.fields,c=i.defaultItem,d=i.meta,E=i.minItems,v=i.maxItems,T=i.noItemsMessage,f=void 0===T?"You haven't added any items yet!":T,O=p(i,P),b=d.error,g=(d.dirty||d.submitFailed)&&b&&"string"==typeof b;return t.createElement(r.FieldArray,{key:O.input.name,name:O.input.name,validate:s},(function(e){var n=e.fields,r=n.map,a=n.value,i=void 0===a?[]:a,s=n.push,u=n.remove;return t.createElement(t.Fragment,null,t.createElement("h6",null,"label"),t.createElement(o.Button,{color:o.ButtonColor.primary,type:o.ButtonType.button,onClick:function(){return s(c)},disabled:i.length>=v},"ADD ITEM"),l&&t.createElement(o.Paragraph,null,l),i.length<=0?t.createElement(o.Paragraph,null,f):r((function(e,n){return t.createElement(A,{key:e,fields:m,name:e,fieldIndex:n,remove:u,length:i.length,minItems:E,removeLabel:"REMOVE"})})),g&&t.createElement(o.Paragraph,null,b))}))},c[exports.componentTypes.FORM_GROUP]=F,c[exports.componentTypes.INPUT]=L,c[exports.componentTypes.MODAL]=G,c[exports.componentTypes.PARAGRAPH]=o.Paragraph,c[exports.componentTypes.PASSWORD_INPUT]=k,c[exports.componentTypes.RADIO]=U,c[exports.componentTypes.SPY]=function(e){var t=a(e),o=t.template,i=p(t,W);return n.createElement(r.FormSpy,Object.assign({},i),(function(e){return n.createElement(o,Object.assign({},e))}))},c[exports.componentTypes.SELECT]=V,c[exports.componentTypes.TEXTAREA]=Q,c[exports.componentTypes.TIME_PICKER]=ee,c[exports.componentTypes.TOGGLE]=re,c);(ae=exports.templateTypes||(exports.templateTypes={})).BASIC="BASIC",ae.FORM="FORM";var se=((oe={})[exports.templateTypes.BASIC]=function(e){return n.createElement("div",null,e.formFields)},oe[exports.templateTypes.FORM]=function(e){var t=e.formFields,r=e.schema,a=r.cancelLabel,i=r.submitLabel,l=e.schema,m=s(),u=m.handleSubmit,p=m.onCancel,c=(0,m.getState)(),d=c.submitting,E=n.createElement(o.ButtonGroup,null,n.createElement(o.Button,{disabled:c.pristine,variant:o.ButtonVariant.link,onClick:p},a||"Cancel"),n.createElement(o.Button,{disabled:d,type:o.ButtonType.submit,color:o.ButtonColor.primary},i||"Submit")),v=n.useMemo((function(){return!0}),[]);return n.createElement(o.Form,{onSubmit:u,header:l.title,description:l.description,actions:v?E:void 0},t)},oe),le=["schema","customComponentMapper","customValidatorMapper"];exports.validatorTypes=m,exports.SchemaRenderer=function(e){var t=e.schema,o=e.customComponentMapper,a=void 0===o?ie:o,i=e.customValidatorMapper,s=p(e,le);return n.createElement(r.FormRenderer,Object.assign({onCancel:function(){},onSubmit:function(){}},s,{componentMapper:a,validatorMapper:i,FormTemplate:se[t.type],schema:t}))},exports.componentMapper=ie,exports.templateMapper=se;
2
2
  //# sourceMappingURL=schema-renderer.cjs.production.min.js.map