ps-toolkit-ui 1.17.49 → 1.17.50
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/bundles/ps-toolkit-ui.umd.js +31 -2
- package/bundles/ps-toolkit-ui.umd.js.map +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js +1 -1
- package/bundles/ps-toolkit-ui.umd.min.js.map +1 -1
- package/esm2015/lib/classes/helper.class.js +32 -2
- package/esm2015/lib/classes/request.class.js +1 -2
- package/esm2015/lib/classes/table.class.js +2 -3
- package/fesm2015/ps-toolkit-ui.js +31 -2
- package/fesm2015/ps-toolkit-ui.js.map +1 -1
- package/lib/classes/helper.class.d.ts +2 -1
- package/package.json +1 -1
|
@@ -1839,6 +1839,36 @@
|
|
|
1839
1839
|
}
|
|
1840
1840
|
return formData;
|
|
1841
1841
|
};
|
|
1842
|
+
HelperClass.getClient = function (environment, request, url, method, data, done, fail) {
|
|
1843
|
+
var token = HelperClass.getCookie('Authorization');
|
|
1844
|
+
if (!(data instanceof FormData)) {
|
|
1845
|
+
data = HelperClass.jsonToFormData(data);
|
|
1846
|
+
}
|
|
1847
|
+
var settings = {
|
|
1848
|
+
url: (url.includes('https://') || url.includes('http://') ? '' : environment.apiUrl) + url,
|
|
1849
|
+
method: exports.Method[method].toString(),
|
|
1850
|
+
processData: false,
|
|
1851
|
+
contentType: false,
|
|
1852
|
+
data: data,
|
|
1853
|
+
headers: token == null ? {} : { Authorization: token }
|
|
1854
|
+
};
|
|
1855
|
+
if (request != null) {
|
|
1856
|
+
request.abort();
|
|
1857
|
+
}
|
|
1858
|
+
request = $$1.ajax(settings);
|
|
1859
|
+
request.done(function (response) {
|
|
1860
|
+
if (!environment.production) {
|
|
1861
|
+
console.log('%c' + exports.Method[method].toString() + ' : ' + url, 'background: #2f6054; color: white', response);
|
|
1862
|
+
}
|
|
1863
|
+
done(response);
|
|
1864
|
+
});
|
|
1865
|
+
request.fail(function (response) {
|
|
1866
|
+
if (!environment.production) {
|
|
1867
|
+
console.log('%c' + exports.Method[method].toString() + ' : ' + url, 'background: #8c413a; color: white', response);
|
|
1868
|
+
}
|
|
1869
|
+
fail(response);
|
|
1870
|
+
});
|
|
1871
|
+
};
|
|
1842
1872
|
return HelperClass;
|
|
1843
1873
|
}());
|
|
1844
1874
|
|
|
@@ -1971,7 +2001,6 @@
|
|
|
1971
2001
|
data: data,
|
|
1972
2002
|
headers: token == null ? {} : { Authorization: token }
|
|
1973
2003
|
};
|
|
1974
|
-
console.log('requestrequest', request);
|
|
1975
2004
|
if (request != null) {
|
|
1976
2005
|
request.abort();
|
|
1977
2006
|
}
|
|
@@ -9186,7 +9215,7 @@
|
|
|
9186
9215
|
}
|
|
9187
9216
|
btn.loading = true;
|
|
9188
9217
|
}
|
|
9189
|
-
|
|
9218
|
+
HelperClass.getClient(this.environment, this.request, this.url, this.method, this.searchData(), function (res) {
|
|
9190
9219
|
if (res.status === exports.ResultStatusEnum.Success) {
|
|
9191
9220
|
if (_this.vertical) {
|
|
9192
9221
|
var c_1 = {};
|