@bigbinary/neeto-commons-frontend 3.1.13-beta → 3.1.14
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.
- package/cjs/configs/nanos/webpack/resolve.js +15 -10
- package/cjs/initializers/axios/paramsSerializer.js +7 -1
- package/cjs/initializers/axios/paramsSerializer.js.map +1 -1
- package/configs/nanos/webpack/resolve.js +15 -10
- package/initializers/axios/paramsSerializer.js +7 -1
- package/initializers/axios/paramsSerializer.js.map +1 -1
- package/package.json +2 -2
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
1
2
|
const path = require("path");
|
|
2
3
|
|
|
3
4
|
const isCommonsFrontend = !__dirname.includes("node_modules");
|
|
@@ -7,18 +8,22 @@ const absolutePath = basePath =>
|
|
|
7
8
|
? path.join(__dirname, "../../../", basePath)
|
|
8
9
|
: path.join(__dirname, "../../../../../../", basePath);
|
|
9
10
|
|
|
11
|
+
const srcPath = fs.existsSync(absolutePath("src"))
|
|
12
|
+
? absolutePath("src")
|
|
13
|
+
: absolutePath("app/javascript/src");
|
|
14
|
+
|
|
10
15
|
module.exports = {
|
|
11
16
|
alias: {
|
|
12
|
-
apis:
|
|
13
|
-
assets:
|
|
14
|
-
components:
|
|
15
|
-
hooks:
|
|
16
|
-
reducers:
|
|
17
|
-
routes:
|
|
18
|
-
stores:
|
|
19
|
-
translations:
|
|
20
|
-
utils:
|
|
21
|
-
src:
|
|
17
|
+
apis: `${srcPath}/apis`,
|
|
18
|
+
assets: `${srcPath}/assets`,
|
|
19
|
+
components: `${srcPath}/components`,
|
|
20
|
+
hooks: `${srcPath}/hooks`,
|
|
21
|
+
reducers: `${srcPath}/reducers`,
|
|
22
|
+
routes: `${srcPath}/routes`,
|
|
23
|
+
stores: `${srcPath}/stores`,
|
|
24
|
+
translations: `${srcPath}/translations`,
|
|
25
|
+
utils: `${srcPath}/utils`,
|
|
26
|
+
src: srcPath,
|
|
22
27
|
neetoui: "@bigbinary/neetoui",
|
|
23
28
|
neetocommons: "@bigbinary/neeto-commons-frontend",
|
|
24
29
|
neetoicons: "@bigbinary/neeto-icons",
|
|
@@ -5,13 +5,19 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
value: true
|
|
6
6
|
});
|
|
7
7
|
exports["default"] = void 0;
|
|
8
|
+
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
8
9
|
var _axios = _interopRequireDefault(require("axios"));
|
|
9
10
|
var _qs = _interopRequireDefault(require("qs"));
|
|
11
|
+
var _ramda = require("ramda");
|
|
10
12
|
/* eslint-disable @bigbinary/neeto/use-snake-case-for-api-connector-filename */
|
|
11
13
|
|
|
12
14
|
var setParamsSerializer = function setParamsSerializer() {
|
|
13
15
|
_axios["default"].defaults.paramsSerializer = function (params) {
|
|
14
|
-
|
|
16
|
+
var modifiedParams = (0, _ramda.map)(function checkObject(value) {
|
|
17
|
+
if (Array.isArray(value)) return (0, _ramda.map)(checkObject, value);else if (value && (0, _typeof2["default"])(value) === "object") return JSON.stringify(value);
|
|
18
|
+
return value;
|
|
19
|
+
}, params);
|
|
20
|
+
return _qs["default"].stringify(modifiedParams, {
|
|
15
21
|
arrayFormat: "brackets"
|
|
16
22
|
});
|
|
17
23
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paramsSerializer.js","names":["_axios","_interopRequireDefault","require","_qs","setParamsSerializer","axios","defaults","paramsSerializer","params","
|
|
1
|
+
{"version":3,"file":"paramsSerializer.js","names":["_axios","_interopRequireDefault","require","_qs","_ramda","setParamsSerializer","axios","defaults","paramsSerializer","params","modifiedParams","map","checkObject","value","Array","isArray","_typeof2","JSON","stringify","qs","arrayFormat","_default","exports"],"sources":["../../../../src/initializers/axios/paramsSerializer.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/use-snake-case-for-api-connector-filename */\nimport axios from \"axios\";\nimport qs from \"qs\";\nimport { map } from \"ramda\";\n\nconst setParamsSerializer = () => {\n axios.defaults.paramsSerializer = function (params) {\n const modifiedParams = map(function checkObject(value) {\n if (Array.isArray(value)) return map(checkObject, value);\n else if (value && typeof value === \"object\") return JSON.stringify(value);\n\n return value;\n }, params);\n\n return qs.stringify(modifiedParams, { arrayFormat: \"brackets\" });\n };\n};\n\nexport default setParamsSerializer;\n"],"mappings":";;;;;;;;AACA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,GAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AAHA;;AAKA,IAAMG,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAA,EAAS;EAChCC,iBAAK,CAACC,QAAQ,CAACC,gBAAgB,GAAG,UAAUC,MAAM,EAAE;IAClD,IAAMC,cAAc,GAAG,IAAAC,UAAG,EAAC,SAASC,WAAWA,CAACC,KAAK,EAAE;MACrD,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE,OAAO,IAAAF,UAAG,EAACC,WAAW,EAAEC,KAAK,CAAC,CAAC,KACpD,IAAIA,KAAK,IAAI,IAAAG,QAAA,aAAOH,KAAK,MAAK,QAAQ,EAAE,OAAOI,IAAI,CAACC,SAAS,CAACL,KAAK,CAAC;MAEzE,OAAOA,KAAK;IACd,CAAC,EAAEJ,MAAM,CAAC;IAEV,OAAOU,cAAE,CAACD,SAAS,CAACR,cAAc,EAAE;MAAEU,WAAW,EAAE;IAAW,CAAC,CAAC;EAClE,CAAC;AACH,CAAC;AAAC,IAAAC,QAAA,GAEahB,mBAAmB;AAAAiB,OAAA,cAAAD,QAAA"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
const fs = require("fs");
|
|
1
2
|
const path = require("path");
|
|
2
3
|
|
|
3
4
|
const isCommonsFrontend = !__dirname.includes("node_modules");
|
|
@@ -7,18 +8,22 @@ const absolutePath = basePath =>
|
|
|
7
8
|
? path.join(__dirname, "../../../", basePath)
|
|
8
9
|
: path.join(__dirname, "../../../../../../", basePath);
|
|
9
10
|
|
|
11
|
+
const srcPath = fs.existsSync(absolutePath("src"))
|
|
12
|
+
? absolutePath("src")
|
|
13
|
+
: absolutePath("app/javascript/src");
|
|
14
|
+
|
|
10
15
|
module.exports = {
|
|
11
16
|
alias: {
|
|
12
|
-
apis:
|
|
13
|
-
assets:
|
|
14
|
-
components:
|
|
15
|
-
hooks:
|
|
16
|
-
reducers:
|
|
17
|
-
routes:
|
|
18
|
-
stores:
|
|
19
|
-
translations:
|
|
20
|
-
utils:
|
|
21
|
-
src:
|
|
17
|
+
apis: `${srcPath}/apis`,
|
|
18
|
+
assets: `${srcPath}/assets`,
|
|
19
|
+
components: `${srcPath}/components`,
|
|
20
|
+
hooks: `${srcPath}/hooks`,
|
|
21
|
+
reducers: `${srcPath}/reducers`,
|
|
22
|
+
routes: `${srcPath}/routes`,
|
|
23
|
+
stores: `${srcPath}/stores`,
|
|
24
|
+
translations: `${srcPath}/translations`,
|
|
25
|
+
utils: `${srcPath}/utils`,
|
|
26
|
+
src: srcPath,
|
|
22
27
|
neetoui: "@bigbinary/neetoui",
|
|
23
28
|
neetocommons: "@bigbinary/neeto-commons-frontend",
|
|
24
29
|
neetoicons: "@bigbinary/neeto-icons",
|
|
@@ -1,9 +1,15 @@
|
|
|
1
|
+
import _typeof from "@babel/runtime/helpers/typeof";
|
|
1
2
|
/* eslint-disable @bigbinary/neeto/use-snake-case-for-api-connector-filename */
|
|
2
3
|
import axios from "axios";
|
|
3
4
|
import qs from "qs";
|
|
5
|
+
import { map } from "ramda";
|
|
4
6
|
var setParamsSerializer = function setParamsSerializer() {
|
|
5
7
|
axios.defaults.paramsSerializer = function (params) {
|
|
6
|
-
|
|
8
|
+
var modifiedParams = map(function checkObject(value) {
|
|
9
|
+
if (Array.isArray(value)) return map(checkObject, value);else if (value && _typeof(value) === "object") return JSON.stringify(value);
|
|
10
|
+
return value;
|
|
11
|
+
}, params);
|
|
12
|
+
return qs.stringify(modifiedParams, {
|
|
7
13
|
arrayFormat: "brackets"
|
|
8
14
|
});
|
|
9
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paramsSerializer.js","names":["axios","qs","setParamsSerializer","defaults","paramsSerializer","params","stringify","arrayFormat"],"sources":["../../../src/initializers/axios/paramsSerializer.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/use-snake-case-for-api-connector-filename */\nimport axios from \"axios\";\nimport qs from \"qs\";\n\nconst setParamsSerializer = () => {\n axios.defaults.paramsSerializer = params
|
|
1
|
+
{"version":3,"file":"paramsSerializer.js","names":["axios","qs","map","setParamsSerializer","defaults","paramsSerializer","params","modifiedParams","checkObject","value","Array","isArray","_typeof","JSON","stringify","arrayFormat"],"sources":["../../../src/initializers/axios/paramsSerializer.js"],"sourcesContent":["/* eslint-disable @bigbinary/neeto/use-snake-case-for-api-connector-filename */\nimport axios from \"axios\";\nimport qs from \"qs\";\nimport { map } from \"ramda\";\n\nconst setParamsSerializer = () => {\n axios.defaults.paramsSerializer = function (params) {\n const modifiedParams = map(function checkObject(value) {\n if (Array.isArray(value)) return map(checkObject, value);\n else if (value && typeof value === \"object\") return JSON.stringify(value);\n\n return value;\n }, params);\n\n return qs.stringify(modifiedParams, { arrayFormat: \"brackets\" });\n };\n};\n\nexport default setParamsSerializer;\n"],"mappings":";AAAA;AACA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,EAAE,MAAM,IAAI;AACnB,SAASC,GAAG,QAAQ,OAAO;AAE3B,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAAA,EAAS;EAChCH,KAAK,CAACI,QAAQ,CAACC,gBAAgB,GAAG,UAAUC,MAAM,EAAE;IAClD,IAAMC,cAAc,GAAGL,GAAG,CAAC,SAASM,WAAWA,CAACC,KAAK,EAAE;MACrD,IAAIC,KAAK,CAACC,OAAO,CAACF,KAAK,CAAC,EAAE,OAAOP,GAAG,CAACM,WAAW,EAAEC,KAAK,CAAC,CAAC,KACpD,IAAIA,KAAK,IAAIG,OAAA,CAAOH,KAAK,MAAK,QAAQ,EAAE,OAAOI,IAAI,CAACC,SAAS,CAACL,KAAK,CAAC;MAEzE,OAAOA,KAAK;IACd,CAAC,EAAEH,MAAM,CAAC;IAEV,OAAOL,EAAE,CAACa,SAAS,CAACP,cAAc,EAAE;MAAEQ,WAAW,EAAE;IAAW,CAAC,CAAC;EAClE,CAAC;AACH,CAAC;AAED,eAAeZ,mBAAmB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.14",
|
|
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>",
|
|
@@ -97,4 +97,4 @@
|
|
|
97
97
|
"tailwindcss": "^3.4.1",
|
|
98
98
|
"webpack": "^5.75.0"
|
|
99
99
|
}
|
|
100
|
-
}
|
|
100
|
+
}
|