@bigbinary/neeto-commons-frontend 4.4.0-beta-4 → 4.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,8 +8,11 @@ var _neetoCist = require("@bigbinary/neeto-cist");
|
|
|
8
8
|
/* eslint-disable @bigbinary/neeto/no-globalProps-reassignment */
|
|
9
9
|
|
|
10
10
|
function initializeGlobalProps() {
|
|
11
|
-
var _document$getElements, _document$getElements2;
|
|
11
|
+
var _document$getElements, _document$getElements2, _window, _window$globalProps;
|
|
12
12
|
window.globalProps = (0, _neetoCist.keysToCamelCase)(JSON.parse(((_document$getElements = document.getElementsByClassName("root-container")[0]) === null || _document$getElements === void 0 ? void 0 : (_document$getElements2 = _document$getElements.dataset) === null || _document$getElements2 === void 0 ? void 0 : _document$getElements2.reactProps) || "{}"));
|
|
13
|
+
if ((_window = window) !== null && _window !== void 0 && (_window$globalProps = _window.globalProps) !== null && _window$globalProps !== void 0 && _window$globalProps.appName) {
|
|
14
|
+
window.globalProps.appName = (0, _neetoCist.capitalize)(window.globalProps.appName);
|
|
15
|
+
}
|
|
13
16
|
(0, _neetoCist.deepFreezeObject)(window.globalProps);
|
|
14
17
|
}
|
|
15
18
|
//# sourceMappingURL=globalProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalProps.js","names":["_neetoCist","require","initializeGlobalProps","_document$getElements","_document$getElements2","window","globalProps","keysToCamelCase","JSON","parse","document","getElementsByClassName","dataset","reactProps","deepFreezeObject"],"sources":["../../../src/initializers/globalProps.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-globalProps-reassignment */\nimport { keysToCamelCase, deepFreezeObject } 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 deepFreezeObject(window.globalProps);\n}\n"],"mappings":";;;;;;AACA,IAAAA,UAAA,GAAAC,OAAA;AADA;;AAGe,SAASC,qBAAqBA,CAAA,EAAG;EAAA,IAAAC,qBAAA,EAAAC,sBAAA;EAC9CC,MAAM,CAACC,WAAW,GAAG,IAAAC,0BAAe,EAClCC,IAAI,CAACC,KAAK,CACR,
|
|
1
|
+
{"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"}
|
|
@@ -1,8 +1,11 @@
|
|
|
1
1
|
/* eslint-disable @bigbinary/neeto/no-globalProps-reassignment */
|
|
2
|
-
import { keysToCamelCase, deepFreezeObject } from "@bigbinary/neeto-cist";
|
|
2
|
+
import { keysToCamelCase, deepFreezeObject, capitalize } from "@bigbinary/neeto-cist";
|
|
3
3
|
export default function initializeGlobalProps() {
|
|
4
|
-
var _document$getElements, _document$getElements2;
|
|
4
|
+
var _document$getElements, _document$getElements2, _window, _window$globalProps;
|
|
5
5
|
window.globalProps = keysToCamelCase(JSON.parse(((_document$getElements = document.getElementsByClassName("root-container")[0]) === null || _document$getElements === void 0 ? void 0 : (_document$getElements2 = _document$getElements.dataset) === null || _document$getElements2 === void 0 ? void 0 : _document$getElements2.reactProps) || "{}"));
|
|
6
|
+
if ((_window = window) !== null && _window !== void 0 && (_window$globalProps = _window.globalProps) !== null && _window$globalProps !== void 0 && _window$globalProps.appName) {
|
|
7
|
+
window.globalProps.appName = capitalize(window.globalProps.appName);
|
|
8
|
+
}
|
|
6
9
|
deepFreezeObject(window.globalProps);
|
|
7
10
|
}
|
|
8
11
|
//# sourceMappingURL=globalProps.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"globalProps.js","names":["keysToCamelCase","deepFreezeObject","initializeGlobalProps","_document$getElements","_document$getElements2","window","globalProps","JSON","parse","document","getElementsByClassName","dataset","reactProps"],"sources":["../../src/initializers/globalProps.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/no-globalProps-reassignment */\nimport { keysToCamelCase, deepFreezeObject } 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 deepFreezeObject(window.globalProps);\n}\n"],"mappings":"AAAA;AACA,SAASA,eAAe,EAAEC,gBAAgB;
|
|
1
|
+
{"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,IAAI,CACvB,CACF;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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "4.4.0
|
|
3
|
+
"version": "4.4.0",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -105,4 +105,4 @@
|
|
|
105
105
|
"webpack": "^5.75.0",
|
|
106
106
|
"yup": "^1.3.3"
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
}
|