All Downloads are FREE. Search and download functionalities are using the official Maven repository.

package.initializers.globalProps.js.map Maven / Gradle / Ivy

Go to download

A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.

There is a newer version: 4.12.3
Show newest version
{"version":3,"file":"globalProps.js","names":["keysToCamelCase","deepFreezeObject","capitalize","initializeGlobalProps","_document$getElements","_document$getElements2","_window","_window$globalProps","window","globalProps","JSON","parse","document","getElementsByClassName","dataset","reactProps","appName"],"sources":["../../src/initializers/globalProps.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-globalProps-reassignment */\nimport { keysToCamelCase, deepFreezeObject, capitalize } from \"neetocist\";\n\nexport default function initializeGlobalProps() {\n  window.globalProps = keysToCamelCase(\n    JSON.parse(\n      document.getElementsByClassName(\"root-container\")[0]?.dataset\n        ?.reactProps || \"{}\"\n    )\n  );\n\n  if (window?.globalProps?.appName) {\n    window.globalProps.appName = capitalize(window.globalProps.appName);\n  }\n\n  deepFreezeObject(window.globalProps);\n}\n"],"mappings":"AAAA;AACA,SAASA,eAAe,EAAEC,gBAAgB,EAAEC,UAAU;AAEtD,eAAe,SAASC,qBAAqBA,CAAA,EAAG;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,OAAA,EAAAC,mBAAA;EAC9CC,MAAM,CAACC,WAAW,GAAGT,eAAe,CAClCU,IAAI,CAACC,KAAK,CACR,EAAAP,qBAAA,GAAAQ,QAAQ,CAACC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,cAAAT,qBAAA,wBAAAC,sBAAA,GAApDD,qBAAA,CAAsDU,OAAO,cAAAT,sBAAA,uBAA7DA,sBAAA,CACIU,UAAU,KAAI,IACpB,CACF,CAAC;EAED,KAAAT,OAAA,GAAIE,MAAM,cAAAF,OAAA,gBAAAC,mBAAA,GAAND,OAAA,CAAQG,WAAW,cAAAF,mBAAA,eAAnBA,mBAAA,CAAqBS,OAAO,EAAE;IAChCR,MAAM,CAACC,WAAW,CAACO,OAAO,GAAGd,UAAU,CAACM,MAAM,CAACC,WAAW,CAACO,OAAO,CAAC;EACrE;EAEAf,gBAAgB,CAACO,MAAM,CAACC,WAAW,CAAC;AACtC","ignoreList":[]}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy