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

package.cjs.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":["_neetoCist","require","initializeGlobalProps","_document$getElements","_document$getElements2","_window","_window$globalProps","window","globalProps","keysToCamelCase","JSON","parse","document","getElementsByClassName","dataset","reactProps","appName","capitalize","deepFreezeObject"],"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":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AADA;;AAGe,SAASC,qBAAqBA,CAAA,EAAG;EAAA,IAAAC,qBAAA,EAAAC,sBAAA,EAAAC,OAAA,EAAAC,mBAAA;EAC9CC,MAAM,CAACC,WAAW,GAAG,IAAAC,0BAAe,EAClCC,IAAI,CAACC,KAAK,CACR,EAAAR,qBAAA,GAAAS,QAAQ,CAACC,sBAAsB,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC,cAAAV,qBAAA,wBAAAC,sBAAA,GAApDD,qBAAA,CAAsDW,OAAO,cAAAV,sBAAA,uBAA7DA,sBAAA,CACIW,UAAU,KAAI,IAAI,CACvB,CACF;EAED,KAAAV,OAAA,GAAIE,MAAM,cAAAF,OAAA,gBAAAC,mBAAA,GAAND,OAAA,CAAQG,WAAW,cAAAF,mBAAA,eAAnBA,mBAAA,CAAqBU,OAAO,EAAE;IAChCT,MAAM,CAACC,WAAW,CAACQ,OAAO,GAAG,IAAAC,qBAAU,EAACV,MAAM,CAACC,WAAW,CAACQ,OAAO,CAAC;EACrE;EAEA,IAAAE,2BAAgB,EAACX,MAAM,CAACC,WAAW,CAAC;AACtC"}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy