{"version":3,"file":"ErrorListTemplate.mjs","sources":["../../src/templates/ErrorListTemplate.tsx"],"sourcesContent":["import { Alert, List, Spoiler } from '@mantine/core';\nimport { ErrorListProps, FormContextType, RJSFSchema, StrictRJSFSchema, TranslatableString } from '@rjsf/utils';\nimport { IconZoomExclamation } from '@tabler/icons-react';\n\n/** The `ErrorList` component is the template that renders the all the errors associated with the fields in the `Form`\n *\n * @param props - The `ErrorListProps` for this component\n */\nexport default function ErrorList<T = any, S extends StrictRJSFSchema = RJSFSchema, F extends FormContextType = any>({\n  errors,\n  registry,\n}: ErrorListProps<T, S, F>) {\n  const { translateString } = registry;\n  return (\n    <Alert title={translateString(TranslatableString.ErrorsLabel)} icon={<IconZoomExclamation />}>\n      <Spoiler maxHeight={120} showLabel='Show more' hideLabel='Hide'>\n        <List size='sm'>\n          {errors.map((error, index) => (\n            <List.Item key={`error-${index}`}>{error.stack}</List.Item>\n          ))}\n        </List>\n      </Spoiler>\n    </Alert>\n  );\n}\n"],"names":[],"mappings":";;;;;AAKe,SAAS,SAAS,CAAC;AAClC,EAAE,MAAM;AACR,EAAE,QAAQ;AACV,CAAC,EAAE;AACH,EAAE,MAAM,EAAE,eAAe,EAAE,GAAG,QAAQ,CAAC;AACvC,EAAE,uBAAuB,GAAG,CAAC,KAAK,EAAE,EAAE,KAAK,EAAE,eAAe,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,IAAI,kBAAkB,GAAG,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,QAAQ,kBAAkB,GAAG,CAAC,OAAO,EAAE,EAAE,SAAS,EAAE,GAAG,EAAE,SAAS,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,kBAAkB,GAAG,CAAC,IAAI,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,KAAK,qBAAqB,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,QAAQ,EAAE,KAAK,CAAC,KAAK,EAAE,EAAE,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;AACra;;;;"}