theme.keycloak.v2.admin.resources.assets.JsonFileUpload-DGJ9M0nq.js.map Maven / Gradle / Ivy
{"version":3,"file":"JsonFileUpload-DGJ9M0nq.js","sources":["../../src/components/json-file-upload/JsonFileUpload.tsx"],"sourcesContent":["import { Language } from \"@patternfly/react-code-editor\";\n\nimport { FileUploadForm, FileUploadFormProps } from \"./FileUploadForm\";\n\nexport type JsonFileUploadProps = Omit<\n FileUploadFormProps,\n \"onChange\" | \"language\" | \"extension\"\n> & {\n onChange: (obj: object) => void;\n};\n\nexport const JsonFileUpload = ({ onChange, ...props }: JsonFileUploadProps) => {\n const handleChange = (value: string) => {\n try {\n onChange(JSON.parse(value));\n } catch (error) {\n onChange({});\n console.warn(\"Invalid json, ignoring value using {}\");\n }\n };\n\n return (\n \n );\n};\n"],"names":["JsonFileUpload","onChange","props","handleChange","value","jsx","FileUploadForm","Language"],"mappings":"sIAWO,MAAMA,EAAiB,CAAC,CAAE,SAAAC,EAAU,GAAGC,KAAiC,CACvE,MAAAC,EAAgBC,GAAkB,CAClC,GAAA,CACOH,EAAA,KAAK,MAAMG,CAAK,CAAC,OACZ,CACdH,EAAS,CAAE,CAAA,EACX,QAAQ,KAAK,uCAAuC,CACtD,CAAA,EAIA,OAAAI,EAACC,EAAA,CACE,GAAGJ,EACJ,SAAUK,EAAS,KACnB,UAAU,QACV,SAAUJ,CAAA,CAAA,CAGhB"}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy