@veloceapps/api 6.0.0-25 → 6.0.0-27
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/veloceapps-api.umd.js +18 -8
- package/bundles/veloceapps-api.umd.js.map +1 -1
- package/esm2015/lib/services/configuration-settings-api.service.js +14 -5
- package/fesm2015/veloceapps-api.js +13 -4
- package/fesm2015/veloceapps-api.js.map +1 -1
- package/lib/services/configuration-settings-api.service.d.ts +3 -1
- package/package.json +1 -1
@@ -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('@veloceapps/core'), require('rxjs'), require('rxjs/operators'), require('@angular/common'), require('lodash'), require('moment')) :
|
3
|
-
typeof define === 'function' && define.amd ? define('@veloceapps/api', ['exports', '@angular/common/http', '@angular/core', '@veloceapps/core', 'rxjs', 'rxjs/operators', '@angular/common', 'lodash', 'moment'], factory) :
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloceapps = global.veloceapps || {}, global.veloceapps.api = {}), global.ng.common.http, global.ng.core, global["@veloceapps/core"], global.rxjs, global.rxjs.operators, global.ng.common, global.lodash, global.moment));
|
5
|
-
})(this, (function (exports, i4, i0, i1, rxjs, operators, common, _, moment_) { 'use strict';
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common/http'), require('@angular/core'), require('@veloceapps/core'), require('rxjs'), require('rxjs/operators'), require('primeng/api'), require('@angular/common'), require('lodash'), require('moment')) :
|
3
|
+
typeof define === 'function' && define.amd ? define('@veloceapps/api', ['exports', '@angular/common/http', '@angular/core', '@veloceapps/core', 'rxjs', 'rxjs/operators', 'primeng/api', '@angular/common', 'lodash', 'moment'], factory) :
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.veloceapps = global.veloceapps || {}, global.veloceapps.api = {}), global.ng.common.http, global.ng.core, global["@veloceapps/core"], global.rxjs, global.rxjs.operators, global.i2, global.ng.common, global.lodash, global.moment));
|
5
|
+
})(this, (function (exports, i4, i0, i1, rxjs, operators, i2, common, _, moment_) { 'use strict';
|
6
6
|
|
7
7
|
function _interopNamespace(e) {
|
8
8
|
if (e && e.__esModule) return e;
|
@@ -25,6 +25,7 @@
|
|
25
25
|
var i4__namespace = /*#__PURE__*/_interopNamespace(i4);
|
26
26
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
27
27
|
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
28
|
+
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
28
29
|
var ___namespace = /*#__PURE__*/_interopNamespace(_);
|
29
30
|
var moment___namespace = /*#__PURE__*/_interopNamespace(moment_);
|
30
31
|
|
@@ -813,8 +814,9 @@
|
|
813
814
|
}());
|
814
815
|
|
815
816
|
var ConfigurationSettingsApiService = /** @class */ (function () {
|
816
|
-
function ConfigurationSettingsApiService(httpService) {
|
817
|
+
function ConfigurationSettingsApiService(httpService, messageService) {
|
817
818
|
this.httpService = httpService;
|
819
|
+
this.messageService = messageService;
|
818
820
|
this.SERVICE_URL = '/configuration-settings';
|
819
821
|
}
|
820
822
|
ConfigurationSettingsApiService.prototype.fetchSettings = function (options) {
|
@@ -823,10 +825,18 @@
|
|
823
825
|
.pipe(operators.map(function (settings) { return settings.map(function (setting) { return ConfigurationSettingsDTO.fromDTO(setting); }); }));
|
824
826
|
};
|
825
827
|
ConfigurationSettingsApiService.prototype.fetchSetting = function (settingsKey, options) {
|
828
|
+
var _this = this;
|
826
829
|
return this.httpService
|
827
|
-
.api(Object.assign({ url: this.SERVICE_URL + "/byKey/" + settingsKey, method: 'get' }, options))
|
830
|
+
.api(Object.assign(Object.assign({ url: this.SERVICE_URL + "/byKey/" + settingsKey, method: 'get' }, options), { skipErrorHandler: true }))
|
828
831
|
.pipe(operators.map(function (setting) { return ConfigurationSettingsDTO.fromDTO(setting, settingsKey); }), operators.catchError(function (err) {
|
829
832
|
if (err instanceof i4.HttpErrorResponse && err.status === 404) {
|
833
|
+
if (!(options === null || options === void 0 ? void 0 : options.skipErrorHandler)) {
|
834
|
+
_this.messageService.add({
|
835
|
+
severity: 'error',
|
836
|
+
summary: "Configuration Setting \"" + settingsKey + "\" is not found",
|
837
|
+
sticky: true,
|
838
|
+
});
|
839
|
+
}
|
830
840
|
return rxjs.of(null);
|
831
841
|
}
|
832
842
|
throw err;
|
@@ -852,11 +862,11 @@
|
|
852
862
|
};
|
853
863
|
return ConfigurationSettingsApiService;
|
854
864
|
}());
|
855
|
-
ConfigurationSettingsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationSettingsApiService, deps: [{ token: i1__namespace.BaseHttpService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
865
|
+
ConfigurationSettingsApiService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationSettingsApiService, deps: [{ token: i1__namespace.BaseHttpService }, { token: i2__namespace.MessageService }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
856
866
|
ConfigurationSettingsApiService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationSettingsApiService });
|
857
867
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.17", ngImport: i0__namespace, type: ConfigurationSettingsApiService, decorators: [{
|
858
868
|
type: i0.Injectable
|
859
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }]; } });
|
869
|
+
}], ctorParameters: function () { return [{ type: i1__namespace.BaseHttpService }, { type: i2__namespace.MessageService }]; } });
|
860
870
|
|
861
871
|
var ContextApiService = /** @class */ (function () {
|
862
872
|
function ContextApiService(httpService) {
|