@esfaenza/httpservice 11.2.38 → 11.2.41
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/esfaenza-httpservice.umd.js +12 -9
- package/bundles/esfaenza-httpservice.umd.js.map +1 -1
- package/bundles/esfaenza-httpservice.umd.min.js +2 -2
- package/bundles/esfaenza-httpservice.umd.min.js.map +1 -1
- package/esfaenza-httpservice.metadata.json +1 -1
- package/esm2015/lib/httpservice.service.js +10 -6
- package/fesm2015/esfaenza-httpservice.js +9 -5
- package/fesm2015/esfaenza-httpservice.js.map +1 -1
- package/lib/httpservice.service.d.ts +4 -2
- package/package.json +3 -2
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@esfaenza/preferences'), require('rxjs/operators'), require('rxjs')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@esfaenza/httpservice', ['exports', '@angular/common/http', '@angular/core', '@esfaenza/preferences', 'rxjs/operators', 'rxjs'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza.httpservice = {}), global.ng.common.http, global.ng.core, global.preferences, global.rxjs.operators, global.rxjs));
|
|
5
|
-
})(this, (function (exports, http, core, preferences, operators, rxjs) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@esfaenza/preferences'), require('@esfaenza/extensions'), require('rxjs/operators'), require('rxjs')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@esfaenza/httpservice', ['exports', '@angular/common/http', '@angular/core', '@esfaenza/preferences', '@esfaenza/extensions', 'rxjs/operators', 'rxjs'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.esfaenza = global.esfaenza || {}, global.esfaenza.httpservice = {}), global.ng.common.http, global.ng.core, global.preferences, global.extensions, global.rxjs.operators, global.rxjs));
|
|
5
|
+
})(this, (function (exports, http, core, preferences, extensions, operators, rxjs) { 'use strict';
|
|
6
6
|
|
|
7
7
|
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
@@ -471,7 +471,7 @@
|
|
|
471
471
|
/**
|
|
472
472
|
* @ignore
|
|
473
473
|
*/
|
|
474
|
-
function HTTPService(BACKEND_URL, EXTENSION_CLASS, HTTP_INVALIDATION, LOCALE, APP_NAME, CLIENT_CACHE_DURATION_S, CACHE_BY_USER, DEBUG_MODE, http, localStorage) {
|
|
474
|
+
function HTTPService(BACKEND_URL, EXTENSION_CLASS, HTTP_INVALIDATION, LOCALE, APP_NAME, CLIENT_CACHE_DURATION_S, CACHE_BY_USER, DEBUG_MODE, http, localStorage, utisExts) {
|
|
475
475
|
var _a, _b;
|
|
476
476
|
this.BACKEND_URL = BACKEND_URL;
|
|
477
477
|
this.EXTENSION_CLASS = EXTENSION_CLASS;
|
|
@@ -483,6 +483,7 @@
|
|
|
483
483
|
this.DEBUG_MODE = DEBUG_MODE;
|
|
484
484
|
this.http = http;
|
|
485
485
|
this.localStorage = localStorage;
|
|
486
|
+
this.utisExts = utisExts;
|
|
486
487
|
/** Cache dello stato delle chiamate HTTP attualmente effettuate. Ogni chiamata è rappresentata da un GUID e lo status assume valore **false** solo sugli errori */
|
|
487
488
|
this.callStatus = {};
|
|
488
489
|
/** Nome della cache in cui vengono storicizzate le informazioni sulle risposte delle chiamate sotto forma di dictionary */
|
|
@@ -726,12 +727,12 @@
|
|
|
726
727
|
* @param {Function} afterGetFile Callback da chiamare dopo aver gestito la risposta del **getFileCallback**, in caso **handleError** fosse **false** verrà richiamato anche in caso di errore
|
|
727
728
|
* @param {boolean} handleError Indica se di default gli errori devono essere gestiti dalla libreria o se devono essere ignorati
|
|
728
729
|
*/
|
|
729
|
-
HTTPService.prototype.postGetFile = function (url, bodyData, filename, getFileCallback, afterGetFile, handleError) {
|
|
730
|
+
HTTPService.prototype.postGetFile = function (url, bodyData, filename, getFileCallback, afterGetFile, handleError, pars) {
|
|
730
731
|
var _this = this;
|
|
731
732
|
if (afterGetFile === void 0) { afterGetFile = null; }
|
|
732
733
|
if (handleError === void 0) { handleError = true; }
|
|
733
734
|
var myGuid = this.defaultStartCall(url);
|
|
734
|
-
this.http.post(url, bodyData, { headers: this.getHeaders(), observe: 'response', responseType: "blob" }).pipe(operators.catchError(function (err, caught) {
|
|
735
|
+
this.http.post(url, bodyData, { params: pars, headers: this.getHeaders(), observe: 'response', responseType: "blob" }).pipe(operators.catchError(function (err, caught) {
|
|
735
736
|
if (afterGetFile && !handleError)
|
|
736
737
|
afterGetFile();
|
|
737
738
|
return _this.registerErrorAndReturnEmptyObservable(err, myGuid, handleError);
|
|
@@ -1160,7 +1161,8 @@
|
|
|
1160
1161
|
item = cache_1[cachingKey];
|
|
1161
1162
|
}
|
|
1162
1163
|
}
|
|
1163
|
-
|
|
1164
|
+
// Per assicurarmi che il rifeirmento degli oggetti sia diverso utilizzo il deepClone
|
|
1165
|
+
return new CacheInfos(url, useCaching, cachingKey, cacheTime, this.utisExts.deepClone(item));
|
|
1164
1166
|
};
|
|
1165
1167
|
/**
|
|
1166
1168
|
* Inserisce un oggetto nella cache appropriata in base alle informazioni contenute nel parametro **cacheInfos**
|
|
@@ -1290,7 +1292,8 @@
|
|
|
1290
1292
|
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [CACHE_BY_USER,] }] },
|
|
1291
1293
|
{ type: Boolean, decorators: [{ type: core.Optional }, { type: core.Inject, args: [DEBUG_MODE,] }] },
|
|
1292
1294
|
{ type: http.HttpClient },
|
|
1293
|
-
{ type: preferences.PreferencesService }
|
|
1295
|
+
{ type: preferences.PreferencesService },
|
|
1296
|
+
{ type: extensions.UtilityService }
|
|
1294
1297
|
]; };
|
|
1295
1298
|
|
|
1296
1299
|
var HttpserviceModule = /** @class */ (function () {
|