eoss-mobiles 0.2.21 → 0.2.22
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/lib/checkbox.js +11 -10
- package/lib/eoss-mobile.common.js +12 -11
- package/lib/flow.js +11 -10
- package/lib/index.js +1 -1
- package/lib/picker.js +11 -10
- package/lib/radio.js +11 -10
- package/lib/retrial-auth.js +11 -10
- package/lib/selector.js +11 -10
- package/lib/table-column.js +11 -10
- package/lib/table.js +11 -10
- package/lib/utils/axios.js +11 -10
- package/package.json +1 -1
- package/src/index.js +1 -1
- package/src/utils/axios.js +12 -11
package/lib/picker.js
CHANGED
|
@@ -1740,18 +1740,19 @@ var axios_ajax = function ajax(url) {
|
|
|
1740
1740
|
withCredentials: false
|
|
1741
1741
|
});
|
|
1742
1742
|
http.interceptors.request.use(function (config) {
|
|
1743
|
-
if (
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
config.headers['content-type']
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
config.headers['content-type']
|
|
1743
|
+
if ((params.params || params) instanceof FormData === false) {
|
|
1744
|
+
if (type === 'post' && !format) {
|
|
1745
|
+
config.params = external_qs_default.a.stringify(params.params || params);
|
|
1746
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1747
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1748
|
+
}
|
|
1749
|
+
} else {
|
|
1750
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1751
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1752
|
+
}
|
|
1753
|
+
config.params = params.params || params;
|
|
1751
1754
|
}
|
|
1752
|
-
config.params = params.params || params;
|
|
1753
1755
|
}
|
|
1754
|
-
|
|
1755
1756
|
if (util["a" /* default */].getStorage('token')) {
|
|
1756
1757
|
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1757
1758
|
}
|
package/lib/radio.js
CHANGED
|
@@ -1740,18 +1740,19 @@ var axios_ajax = function ajax(url) {
|
|
|
1740
1740
|
withCredentials: false
|
|
1741
1741
|
});
|
|
1742
1742
|
http.interceptors.request.use(function (config) {
|
|
1743
|
-
if (
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
config.headers['content-type']
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
config.headers['content-type']
|
|
1743
|
+
if ((params.params || params) instanceof FormData === false) {
|
|
1744
|
+
if (type === 'post' && !format) {
|
|
1745
|
+
config.params = external_qs_default.a.stringify(params.params || params);
|
|
1746
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1747
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1748
|
+
}
|
|
1749
|
+
} else {
|
|
1750
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1751
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1752
|
+
}
|
|
1753
|
+
config.params = params.params || params;
|
|
1751
1754
|
}
|
|
1752
|
-
config.params = params.params || params;
|
|
1753
1755
|
}
|
|
1754
|
-
|
|
1755
1756
|
if (util["a" /* default */].getStorage('token')) {
|
|
1756
1757
|
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1757
1758
|
}
|
package/lib/retrial-auth.js
CHANGED
|
@@ -1744,18 +1744,19 @@ var axios_ajax = function ajax(url) {
|
|
|
1744
1744
|
withCredentials: false
|
|
1745
1745
|
});
|
|
1746
1746
|
http.interceptors.request.use(function (config) {
|
|
1747
|
-
if (
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
config.headers['content-type']
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
config.headers['content-type']
|
|
1747
|
+
if ((params.params || params) instanceof FormData === false) {
|
|
1748
|
+
if (type === 'post' && !format) {
|
|
1749
|
+
config.params = external_qs_default.a.stringify(params.params || params);
|
|
1750
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1751
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1752
|
+
}
|
|
1753
|
+
} else {
|
|
1754
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1755
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1756
|
+
}
|
|
1757
|
+
config.params = params.params || params;
|
|
1755
1758
|
}
|
|
1756
|
-
config.params = params.params || params;
|
|
1757
1759
|
}
|
|
1758
|
-
|
|
1759
1760
|
if (util["a" /* default */].getStorage('token')) {
|
|
1760
1761
|
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1761
1762
|
}
|
package/lib/selector.js
CHANGED
|
@@ -1740,18 +1740,19 @@ var axios_ajax = function ajax(url) {
|
|
|
1740
1740
|
withCredentials: false
|
|
1741
1741
|
});
|
|
1742
1742
|
http.interceptors.request.use(function (config) {
|
|
1743
|
-
if (
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
config.headers['content-type']
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
config.headers['content-type']
|
|
1743
|
+
if ((params.params || params) instanceof FormData === false) {
|
|
1744
|
+
if (type === 'post' && !format) {
|
|
1745
|
+
config.params = external_qs_default.a.stringify(params.params || params);
|
|
1746
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1747
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1748
|
+
}
|
|
1749
|
+
} else {
|
|
1750
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1751
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1752
|
+
}
|
|
1753
|
+
config.params = params.params || params;
|
|
1751
1754
|
}
|
|
1752
|
-
config.params = params.params || params;
|
|
1753
1755
|
}
|
|
1754
|
-
|
|
1755
1756
|
if (util["a" /* default */].getStorage('token')) {
|
|
1756
1757
|
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1757
1758
|
}
|
package/lib/table-column.js
CHANGED
|
@@ -1740,18 +1740,19 @@ var axios_ajax = function ajax(url) {
|
|
|
1740
1740
|
withCredentials: false
|
|
1741
1741
|
});
|
|
1742
1742
|
http.interceptors.request.use(function (config) {
|
|
1743
|
-
if (
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
config.headers['content-type']
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
config.headers['content-type']
|
|
1743
|
+
if ((params.params || params) instanceof FormData === false) {
|
|
1744
|
+
if (type === 'post' && !format) {
|
|
1745
|
+
config.params = external_qs_default.a.stringify(params.params || params);
|
|
1746
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1747
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1748
|
+
}
|
|
1749
|
+
} else {
|
|
1750
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1751
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1752
|
+
}
|
|
1753
|
+
config.params = params.params || params;
|
|
1751
1754
|
}
|
|
1752
|
-
config.params = params.params || params;
|
|
1753
1755
|
}
|
|
1754
|
-
|
|
1755
1756
|
if (util["a" /* default */].getStorage('token')) {
|
|
1756
1757
|
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1757
1758
|
}
|
package/lib/table.js
CHANGED
|
@@ -1628,18 +1628,19 @@ var axios_ajax = function ajax(url) {
|
|
|
1628
1628
|
withCredentials: false
|
|
1629
1629
|
});
|
|
1630
1630
|
http.interceptors.request.use(function (config) {
|
|
1631
|
-
if (
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
config.headers['content-type']
|
|
1635
|
-
|
|
1636
|
-
|
|
1637
|
-
|
|
1638
|
-
config.headers['content-type']
|
|
1631
|
+
if ((params.params || params) instanceof FormData === false) {
|
|
1632
|
+
if (type === 'post' && !format) {
|
|
1633
|
+
config.params = external_qs_default.a.stringify(params.params || params);
|
|
1634
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1635
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
1636
|
+
}
|
|
1637
|
+
} else {
|
|
1638
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
1639
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
1640
|
+
}
|
|
1641
|
+
config.params = params.params || params;
|
|
1639
1642
|
}
|
|
1640
|
-
config.params = params.params || params;
|
|
1641
1643
|
}
|
|
1642
|
-
|
|
1643
1644
|
if (util["a" /* default */].getStorage('token')) {
|
|
1644
1645
|
config.headers.Authorization = util["a" /* default */].getStorage('token');
|
|
1645
1646
|
}
|
package/lib/utils/axios.js
CHANGED
|
@@ -35,18 +35,19 @@ var ajax = function ajax(url) {
|
|
|
35
35
|
withCredentials: false
|
|
36
36
|
});
|
|
37
37
|
http.interceptors.request.use(function (config) {
|
|
38
|
-
if (
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
config.headers['content-type']
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
config.headers['content-type']
|
|
38
|
+
if ((params.params || params) instanceof FormData === false) {
|
|
39
|
+
if (type === 'post' && !format) {
|
|
40
|
+
config.params = _qs2.default.stringify(params.params || params);
|
|
41
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
42
|
+
config.headers['content-type'] = 'application/x-www-form-urlencoded;charset=UTF-8';
|
|
43
|
+
}
|
|
44
|
+
} else {
|
|
45
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
46
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
47
|
+
}
|
|
48
|
+
config.params = params.params || params;
|
|
46
49
|
}
|
|
47
|
-
config.params = params.params || params;
|
|
48
50
|
}
|
|
49
|
-
|
|
50
51
|
if (_util2.default.getStorage('token')) {
|
|
51
52
|
config.headers.Authorization = _util2.default.getStorage('token');
|
|
52
53
|
}
|
package/package.json
CHANGED
package/src/index.js
CHANGED
package/src/utils/axios.js
CHANGED
|
@@ -15,19 +15,20 @@ const ajax = (url, params = {}, headers = {}, format = true, type = 'get') => {
|
|
|
15
15
|
});
|
|
16
16
|
http.interceptors.request.use(
|
|
17
17
|
config => {
|
|
18
|
-
if (
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
config.headers['content-type']
|
|
22
|
-
'
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
config.headers['content-type']
|
|
18
|
+
if ((params.params || params) instanceof FormData === false) {
|
|
19
|
+
if (type === 'post' && !format) {
|
|
20
|
+
config.params = qs.stringify(params.params || params);
|
|
21
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
22
|
+
config.headers['content-type'] =
|
|
23
|
+
'application/x-www-form-urlencoded;charset=UTF-8';
|
|
24
|
+
}
|
|
25
|
+
} else {
|
|
26
|
+
if (!config.headers['content-type'] && !headers['Content-Type']) {
|
|
27
|
+
config.headers['content-type'] = 'application/json;charset=UTF-8';
|
|
28
|
+
}
|
|
29
|
+
config.params = params.params || params;
|
|
27
30
|
}
|
|
28
|
-
config.params = params.params || params;
|
|
29
31
|
}
|
|
30
|
-
|
|
31
32
|
if ($.getStorage('token')) {
|
|
32
33
|
config.headers.Authorization = $.getStorage('token');
|
|
33
34
|
}
|