@esfaenza/httpservice 11.2.57 → 11.2.58
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 +7 -14
- package/bundles/esfaenza-httpservice.umd.js.map +1 -1
- package/bundles/esfaenza-httpservice.umd.min.js +1 -1
- package/bundles/esfaenza-httpservice.umd.min.js.map +1 -1
- package/esfaenza-httpservice.d.ts +1 -1
- package/esfaenza-httpservice.metadata.json +1 -1
- package/esm2015/esfaenza-httpservice.js +2 -2
- package/esm2015/lib/httpservice.module.js +2 -3
- package/esm2015/lib/httpservice.service.js +5 -6
- package/esm2015/lib/tokens.js +1 -5
- package/fesm2015/esfaenza-httpservice.js +5 -11
- package/fesm2015/esfaenza-httpservice.js.map +1 -1
- package/lib/httpservice.service.d.ts +1 -2
- package/lib/tokens.d.ts +0 -4
- package/package.json +1 -1
|
@@ -321,10 +321,6 @@
|
|
|
321
321
|
* Durata della cache lato libreria dopo il quale la cache verrà ripulita
|
|
322
322
|
*/
|
|
323
323
|
var CLIENT_CACHE_DURATION_S = new core.InjectionToken('CLIENT_CACHE_DURATION_S');
|
|
324
|
-
/**
|
|
325
|
-
* URL del Backend a cui inviare le chiamate
|
|
326
|
-
*/
|
|
327
|
-
var BACKEND_URL = new core.InjectionToken('BACKEND_URL');
|
|
328
324
|
/**
|
|
329
325
|
* Locale della libreria per messaggi d'errore ed Header di default "Accept-Language". Sono supportati "it-IT" ed "en-US"
|
|
330
326
|
*/
|
|
@@ -471,9 +467,8 @@
|
|
|
471
467
|
/**
|
|
472
468
|
* @ignore
|
|
473
469
|
*/
|
|
474
|
-
function HTTPService(
|
|
470
|
+
function HTTPService(EXTENSION_CLASS, HTTP_INVALIDATION, LOCALE, APP_NAME, CLIENT_CACHE_DURATION_S, CACHE_BY_USER, DEBUG_MODE, http, localStorage, utisExts) {
|
|
475
471
|
var _a, _b;
|
|
476
|
-
this.BACKEND_URL = BACKEND_URL;
|
|
477
472
|
this.EXTENSION_CLASS = EXTENSION_CLASS;
|
|
478
473
|
this.HTTP_INVALIDATION = HTTP_INVALIDATION;
|
|
479
474
|
this.LOCALE = LOCALE;
|
|
@@ -862,7 +857,8 @@
|
|
|
862
857
|
var cache = this.localStorage.getLocalItem(this.localStorageHttpCacheKey);
|
|
863
858
|
var tmp = /#cache(:?-(\d+))/gi.exec(url);
|
|
864
859
|
var cacheTime = tmp ? tmp[2] : null;
|
|
865
|
-
var
|
|
860
|
+
var normalizedUrl_tmp = url.replace("#cache" + (cacheTime ? "-" + cacheTime : ""), "");
|
|
861
|
+
var normalizedUrl = normalizedUrl_tmp.substring(normalizedUrl_tmp.indexOf('/api'));
|
|
866
862
|
if (!cache || !this.HTTP_INVALIDATION || !this.HTTP_INVALIDATION[normalizedUrl])
|
|
867
863
|
return;
|
|
868
864
|
var apisToInvalidate = this.HTTP_INVALIDATION[normalizedUrl];
|
|
@@ -1290,7 +1286,6 @@
|
|
|
1290
1286
|
{ type: core.Injectable }
|
|
1291
1287
|
];
|
|
1292
1288
|
HTTPService.ctorParameters = function () { return [
|
|
1293
|
-
{ type: undefined, decorators: [{ type: core.Inject, args: [BACKEND_URL,] }] },
|
|
1294
1289
|
{ type: HttpServiceExtensions },
|
|
1295
1290
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [HTTP_INVALIDATION,] }] },
|
|
1296
1291
|
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [HTTP_LOCALE,] }] },
|
|
@@ -1314,7 +1309,6 @@
|
|
|
1314
1309
|
HttpServiceExtensions,
|
|
1315
1310
|
{ provide: HTTP_INVALIDATION, useValue: config === null || config === void 0 ? void 0 : config.httpInvalidation },
|
|
1316
1311
|
{ provide: CLIENT_CACHE_DURATION_S, useValue: config === null || config === void 0 ? void 0 : config.clientCacheDurationS },
|
|
1317
|
-
{ provide: BACKEND_URL, useValue: config === null || config === void 0 ? void 0 : config.backendUrl },
|
|
1318
1312
|
{ provide: HTTP_LOCALE, useValue: (config === null || config === void 0 ? void 0 : config.httpLocale) || 'it-IT' },
|
|
1319
1313
|
{ provide: APP_NAME, useValue: config === null || config === void 0 ? void 0 : config.appName },
|
|
1320
1314
|
{ provide: CACHE_BY_USER, useValue: config === null || config === void 0 ? void 0 : config.cacheByUser },
|
|
@@ -1358,11 +1352,10 @@
|
|
|
1358
1352
|
exports.HttpserviceModule = HttpserviceModule;
|
|
1359
1353
|
exports["ɵa"] = HTTP_INVALIDATION;
|
|
1360
1354
|
exports["ɵb"] = CLIENT_CACHE_DURATION_S;
|
|
1361
|
-
exports["ɵc"] =
|
|
1362
|
-
exports["ɵd"] =
|
|
1363
|
-
exports["ɵe"] =
|
|
1364
|
-
exports["ɵf"] =
|
|
1365
|
-
exports["ɵg"] = DEBUG_MODE;
|
|
1355
|
+
exports["ɵc"] = HTTP_LOCALE;
|
|
1356
|
+
exports["ɵd"] = APP_NAME;
|
|
1357
|
+
exports["ɵe"] = CACHE_BY_USER;
|
|
1358
|
+
exports["ɵf"] = DEBUG_MODE;
|
|
1366
1359
|
|
|
1367
1360
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1368
1361
|
|