1 line
1.5 KiB
JSON
1 line
1.5 KiB
JSON
{"ast":null,"code":"import * as React from 'react';\nexport const useGridLocaleText = (apiRef, props) => {\n const getLocaleText = React.useCallback(key => {\n if (props.localeText[key] == null) {\n throw new Error(`Missing translation for key ${key}.`);\n }\n return props.localeText[key];\n }, [props.localeText]);\n apiRef.current.getLocaleText = getLocaleText;\n};","map":{"version":3,"names":["React","useGridLocaleText","apiRef","props","getLocaleText","useCallback","key","localeText","Error","current"],"sources":["/home/gnx/Desktop/ETB/ETB-FrontEnd/node_modules/@mui/x-data-grid/hooks/core/useGridLocaleText.js"],"sourcesContent":["import * as React from 'react';\nexport const useGridLocaleText = (apiRef, props) => {\n const getLocaleText = React.useCallback(key => {\n if (props.localeText[key] == null) {\n throw new Error(`Missing translation for key ${key}.`);\n }\n\n return props.localeText[key];\n }, [props.localeText]);\n apiRef.current.getLocaleText = getLocaleText;\n};"],"mappings":"AAAA,OAAO,KAAKA,KAAK,MAAM,OAAO;AAC9B,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,MAAM,EAAEC,KAAK,KAAK;EAClD,MAAMC,aAAa,GAAGJ,KAAK,CAACK,WAAW,CAACC,GAAG,IAAI;IAC7C,IAAIH,KAAK,CAACI,UAAU,CAACD,GAAG,CAAC,IAAI,IAAI,EAAE;MACjC,MAAM,IAAIE,KAAK,CAAC,+BAA+BF,GAAG,GAAG,CAAC;IACxD;IAEA,OAAOH,KAAK,CAACI,UAAU,CAACD,GAAG,CAAC;EAC9B,CAAC,EAAE,CAACH,KAAK,CAACI,UAAU,CAAC,CAAC;EACtBL,MAAM,CAACO,OAAO,CAACL,aAAa,GAAGA,aAAa;AAC9C,CAAC","ignoreList":[]},"metadata":{},"sourceType":"module","externalDependencies":[]} |