UNPKG

jade-integration-utils

Version:

A tool made for any type of http requisitions and to manage localstorage. This package works into Angular and Ionic projects (maybe you can run this in ReactNative, MAYBE!).

885 lines (869 loc) 34.5 kB
import { __decorate } from 'tslib'; import { EventEmitter, ɵɵdefineInjectable, Injectable, ɵɵinject, ElementRef, Renderer2, Input, Directive, Component, Injector, NgModule } from '@angular/core'; import { HttpClient, HttpClientModule } from '@angular/common/http'; import { Router } from '@angular/router'; import { CommonModule } from '@angular/common'; import { BrowserModule } from '@angular/platform-browser'; var EventEmitterService = /** @class */ (function () { function EventEmitterService() { } EventEmitterService.get = function (nomeEvento) { if (!this.emitters[nomeEvento]) this.emitters[nomeEvento] = new EventEmitter(); return this.emitters[nomeEvento]; }; EventEmitterService.emitters = {}; EventEmitterService.ɵprov = ɵɵdefineInjectable({ factory: function EventEmitterService_Factory() { return new EventEmitterService(); }, token: EventEmitterService, providedIn: "root" }); EventEmitterService = __decorate([ Injectable({ providedIn: 'root' }) ], EventEmitterService); return EventEmitterService; }()); var StorageService = /** @class */ (function () { function StorageService() { } StorageService.get = function (index) { var obj = localStorage.getItem(index); return obj ? JSON.parse(obj) : null; }; StorageService.set = function (index, object) { localStorage.setItem(index, JSON.stringify(object)); }; StorageService.getSession = function (index) { var obj = sessionStorage.getItem(index); return obj ? JSON.parse(obj) : null; }; StorageService.setSession = function (index, object) { sessionStorage.setItem(index, JSON.stringify(object)); }; StorageService.getTemp = function () { var obj = sessionStorage.getItem('temp'); return obj ? JSON.parse(obj) : null; }; StorageService.setTemp = function (object) { sessionStorage.setItem('temp', JSON.stringify(object)); }; StorageService.clearTemp = function () { sessionStorage.removeItem('temp'); }; StorageService.clear = function () { localStorage.clear(); sessionStorage.clear(); }; StorageService.APIMaps = function () { return "AIzaSyBiQp1xNr0h8WLV_6OlbMu2E83ezjShoAk"; }; StorageService.ɵprov = ɵɵdefineInjectable({ factory: function StorageService_Factory() { return new StorageService(); }, token: StorageService, providedIn: "root" }); StorageService = __decorate([ Injectable({ providedIn: 'root' }) ], StorageService); return StorageService; }()); var HttpStatusService = /** @class */ (function () { function HttpStatusService(http) { this.http = http; this._url = ''; this._AUTH = "auth"; this._options = { headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*" }, responseType: "json" }; } HttpStatusService.prototype.configure = function (url) { this._url = url; }; HttpStatusService.prototype.set_token = function (auth) { StorageService.set(this._AUTH, "Bearer " + auth); this._options.headers.Authorization = (this.get_token()) ? StorageService.get(this._AUTH) : null; }; HttpStatusService.prototype.get_token = function () { return StorageService.get(this._AUTH); }; HttpStatusService.prototype.get = function (endpoint) { return this.http.get(this._url + endpoint, this._options).toPromise(); }; HttpStatusService.prototype.get_file = function (endpoint) { this.options.responseType = "blob"; return this.http.get(this._url + endpoint, this._options).toPromise(); }; HttpStatusService.prototype.post = function (endpoint, body) { return this.http.post(this._url + endpoint, body, this._options).toPromise(); }; HttpStatusService.prototype.formData = function (endpoint, body) { delete this._options.headers["Content-Type"]; return this.http.post(this._url + endpoint, body, this._options).toPromise(); }; HttpStatusService.prototype.put = function (endpoint, body) { return this.http.put(this._url + endpoint, body, this._options).toPromise(); }; HttpStatusService.prototype.delete = function (endpoint) { return this.http.delete(this._url + endpoint, this._options).toPromise(); }; Object.defineProperty(HttpStatusService.prototype, "options", { get: function () { return this._options; }, set: function (option) { this._options = option; }, enumerable: true, configurable: true }); HttpStatusService.prototype.default_options = function () { this._options = { headers: { "Content-Type": "application/json", "Access-Control-Allow-Origin": "*" }, responseType: "json" }; }; HttpStatusService.ctorParameters = function () { return [ { type: HttpClient } ]; }; HttpStatusService.ɵprov = ɵɵdefineInjectable({ factory: function HttpStatusService_Factory() { return new HttpStatusService(ɵɵinject(HttpClient)); }, token: HttpStatusService, providedIn: "root" }); HttpStatusService = __decorate([ Injectable({ providedIn: 'root' }) ], HttpStatusService); return HttpStatusService; }()); var GenericService = /** @class */ (function () { function GenericService(http, router) { this.http = http; this.router = router; this._auth = "Authentication"; } /** * configureHttp */ GenericService.prototype.configureHttp = function (url) { this.http.configure(url); }; /** * * @param endpoint end point to access * @param queryParams = null; a string for example: name=Ronaldo&type=2 doesn't write ? \n(In case send GET without queryParams, just pass null end use endpoint to do it. Ex: cars/example) */ GenericService.prototype.get = function (endpoint, queryParams) { var new_endpoint = ''; if (queryParams) { console.log(queryParams); new_endpoint = '/' + endpoint + '?' + queryParams; } else { new_endpoint = '/' + endpoint; } this.default_options(); this.auth = this.auth; return this.http.get(new_endpoint); }; /** * * @param endpoint end point to access * @param queryParams = null; a string for example: name=Ronaldo&type=2 doesn't write ? \n(In case send GET without queryParams, just pass null end use endpoint to do it. Ex: cars/example) */ GenericService.prototype.get_file = function (endpoint, queryParams) { var new_endpoint = ''; if (queryParams) { console.log(queryParams); new_endpoint = '/' + endpoint + '?' + queryParams; } else { new_endpoint = '/' + endpoint; } return this.http.get_file(new_endpoint); }; /** * * @param endpoint end point to access * @param queryParams = null; a string for example: name=Ronaldo&type=2 doesn't write ? \n(In case send GET without queryParams, just pass null end use endpoint to do it. Ex: cars/example) */ GenericService.prototype.get_any = function (endpoint, queryParams) { var new_endpoint = ''; if (queryParams) { console.log(queryParams); new_endpoint = '/' + endpoint + '?' + queryParams; } else { new_endpoint = '/' + endpoint; } this.default_options(); this.auth = this.auth; return this.http.get(new_endpoint); }; GenericService.prototype.getById = function (id, endpoint) { this.default_options(); this.auth = this.auth; return this.http.get('/' + endpoint + '/' + id); }; /** * Use to request POST. * @param body K -> K is the model dto to pass with body * @param endpoint String -> string to be pass with endpoint access */ GenericService.prototype.post = function (body, endpoint) { this.default_options(); this.auth = this.auth; return this.http.post('/' + endpoint, body); }; /** * Use to request formData with files * Don't forget.to call default_options * @param body K -> K is the model dto to pass with body * @param endpoint String -> string to be pass with endpoint access */ GenericService.prototype.formData = function (body, endpoint) { return this.http.formData('/' + endpoint, body); }; /** * Use to request POST. * @param body K -> K is the model dto to pass with body * @param endpoint String -> string to be pass with endpoint access */ GenericService.prototype.put = function (body, endpoint) { return this.http.put('/' + endpoint, body); }; GenericService.prototype.delete = function (id, endpoint) { return this.http.delete('/' + endpoint + '/' + id); }; GenericService.prototype.set_token = function (auth) { this.http.set_token(auth); }; GenericService.prototype.get_token = function () { return this.http.get_token(); }; Object.defineProperty(GenericService.prototype, "options", { get: function () { return this.http.options; }, set: function (options) { this.http.options = options; }, enumerable: true, configurable: true }); GenericService.prototype.default_options = function () { this.http.default_options(); }; Object.defineProperty(GenericService.prototype, "auth", { get: function () { return StorageService.get(this._auth); }, set: function (auth) { StorageService.set(this._auth, auth); this.set_token(auth); }, enumerable: true, configurable: true }); GenericService.prototype.downloadFile = function (data) { var blob = new Blob([data]); var url = window.URL.createObjectURL(blob); window.open(url); }; GenericService.ctorParameters = function () { return [ { type: HttpStatusService }, { type: Router } ]; }; GenericService.ɵprov = ɵɵdefineInjectable({ factory: function GenericService_Factory() { return new GenericService(ɵɵinject(HttpStatusService), ɵɵinject(Router)); }, token: GenericService, providedIn: "root" }); GenericService = __decorate([ Injectable({ providedIn: 'root' }) ], GenericService); return GenericService; }()); var HttpMethod = /** @class */ (function () { function HttpMethod() { } HttpMethod.GET = "get"; HttpMethod.POST = "post"; HttpMethod.PUT = "put"; HttpMethod.DELETE = "delete"; HttpMethod.OPTIONS = "options"; HttpMethod.PATCH = "patch"; return HttpMethod; }()); var HttpXHRService = /** @class */ (function () { function HttpXHRService(standard_api_url, headers) { this._AUTH = 'auth'; this._standard_url = standard_api_url; this._xhttp = new XMLHttpRequest(); if (!headers) { this._headers = new Array(); this._headers.push({ header: 'Content-Type', value: 'application/json' }); this._headers.push({ header: 'Authorization', value: StorageService.get(this._AUTH), }); this._headers.push({ header: 'Accept', value: '*/*' }); this._headers.push({ header: 'Access-Control-Allow-Credentials', value: 'true', }); this._headers.push({ header: 'Access-Control-Allow-Origin', value: 'http://localhost:4200', }); this._headers.push({ header: 'Access-Control-Allow-Methods', value: 'GET, POST, PATCH, DELETE, PUT, OPTIONS', }); this._headers.push({ header: 'Access-Control-Allow-Headers', value: 'Content-Type, Access-Control-Allow-Headers, Authorization, X-Requested-With', }); } else { this._headers = headers; } } HttpXHRService.prototype.set_token = function (auth) { StorageService.set(this._AUTH, 'Bearer ' + auth); }; HttpXHRService.prototype.get_token = function () { return StorageService.get(this._AUTH); }; HttpXHRService.prototype.get = function (endpoint) { this._xhttp.open(HttpMethod.GET, this._standard_url + endpoint); return this._send_request(); }; HttpXHRService.prototype.get_file = function (endpoint) { this._xhttp.open(HttpMethod.GET, this._standard_url + endpoint); return this._send_request(); }; HttpXHRService.prototype.post = function (endpoint, body) { this._xhttp.open(HttpMethod.POST, this._standard_url + endpoint); return this._send_request(body); }; HttpXHRService.prototype.formData = function (endpoint, body) { this._xhttp.open(HttpMethod.POST, this._standard_url + endpoint); return this._send_request(body); }; HttpXHRService.prototype.put = function (endpoint, body) { this._xhttp.open(HttpMethod.PUT, this._standard_url + endpoint); return this._send_request(body); }; HttpXHRService.prototype.delete = function (endpoint) { this._xhttp.open(HttpMethod.DELETE, this._standard_url + endpoint); return this._send_request(); }; HttpXHRService.prototype._send_request = function (data, timeout) { var _this = this; if (data === void 0) { data = null; } if (timeout === void 0) { timeout = 60000; } var token = this.get_token(); this._xhttp.setRequestHeader('Content-Type', 'application/json'); for (var index = 0; index < this._headers.length; index++) { var header = this._headers[index]; if (header.header != 'Authorization') { this._xhttp.setRequestHeader(header.header, header.value); } if (header.header == "Authorization" && token != null) { this._xhttp.setRequestHeader(header.header, token); } } this._xhttp.withCredentials = token ? true : false; this._xhttp.responseType = 'json'; return new Promise(function (resolve, reject) { _this._xhttp.onreadystatechange = function () { if (this.readyState == 4) { resolve(this.response); } }; _this._xhttp.send(JSON.stringify(data)); if (timeout) { setTimeout(function () { reject('timeout'); if (this._xhttp) this._xhttp.abort(); else this._xhttp = new XMLHttpRequest(); }, timeout); } }); }; return HttpXHRService; }()); var XHRManager = /** @class */ (function () { function XHRManager(api_url, endpoint) { this._auth = "Authentication"; this.http_xhr = new HttpXHRService(api_url); this._endpoint = endpoint; } /** * * @param endpoint end point to access * @param queryParams = null; a string for example: name=Ronaldo&type=2 doesn't write ? \n(In case send GET without queryParams, just pass null end use endpoint to do it. Ex: cars/example) */ XHRManager.prototype.get = function (endpoint, queryParams) { var new_endpoint = ''; if (queryParams) { new_endpoint = '/' + endpoint + '?' + queryParams; } else { new_endpoint = '/' + endpoint; } return this.http_xhr.get(new_endpoint); }; /** * * @param endpoint end point to access * @param queryParams = null; a string for example: name=Ronaldo&type=2 doesn't write ? \n(In case send GET without queryParams, just pass null end use endpoint to do it. Ex: cars/example) */ XHRManager.prototype.get_file = function (endpoint, queryParams) { var new_endpoint = ''; if (queryParams) { new_endpoint = '/' + endpoint + '?' + queryParams; } else { new_endpoint = '/' + endpoint; } return this.http_xhr.get_file(new_endpoint); }; /** * * @param endpoint end point to access * @param queryParams = null; a string for example: name=Ronaldo&type=2 doesn't write ? \n(In case send GET without queryParams, just pass null end use endpoint to do it. Ex: cars/example) */ XHRManager.prototype.get_any = function (endpoint, queryParams) { var new_endpoint = ''; if (queryParams) { new_endpoint = '/' + endpoint + '?' + queryParams; } else { new_endpoint = '/' + endpoint; } return this.http_xhr.get(new_endpoint); }; XHRManager.prototype.getById = function (id, endpoint) { return this.http_xhr.get('/' + endpoint + '/' + id); }; /** * Use to request POST. * @param body K -> K is the model dto to pass with body * @param endpoint String -> string to be pass with endpoint access */ XHRManager.prototype.post = function (body, endpoint) { return this.http_xhr.post('/' + endpoint, body); }; /** * Use to request formData with files * Don't forget.to call default_options * @param body K -> K is the model dto to pass with body * @param endpoint String -> string to be pass with endpoint access */ XHRManager.prototype.formData = function (body, endpoint) { return this.http_xhr.formData('/' + endpoint, body); }; /** * Use to request POST. * @param body K -> K is the model dto to pass with body * @param endpoint String -> string to be pass with endpoint access */ XHRManager.prototype.put = function (body, endpoint) { return this.http_xhr.put('/' + endpoint, body); }; XHRManager.prototype.delete = function (id, endpoint) { return this.http_xhr.delete('/' + endpoint + '/' + id); }; XHRManager.prototype.set_token = function (auth) { this.http_xhr.set_token(auth); }; XHRManager.prototype.get_token = function () { return this.http_xhr.get_token(); }; Object.defineProperty(XHRManager.prototype, "auth", { get: function () { return StorageService.get(this._auth); }, set: function (auth) { StorageService.set(this._auth, auth); this.set_token(auth); }, enumerable: true, configurable: true }); XHRManager.prototype.downloadFile = function (data) { var blob = new Blob([data]); var url = window.URL.createObjectURL(blob); window.open(url); }; return XHRManager; }()); var CheckRoleDirective = /** @class */ (function () { function CheckRoleDirective(el, renderer) { var _this = this; var user = StorageService.getSession('user'); setTimeout(function () { if (user !== null && _this.roles.indexOf(user.role.sigla) == -1) { renderer.setStyle(el.nativeElement, 'display', 'none'); } }, 100); } CheckRoleDirective.ctorParameters = function () { return [ { type: ElementRef }, { type: Renderer2 } ]; }; __decorate([ Input('checkRole') ], CheckRoleDirective.prototype, "roles", void 0); CheckRoleDirective = __decorate([ Directive({ selector: '[jiuCheckRole]' }) ], CheckRoleDirective); return CheckRoleDirective; }()); function loading(flag) { return function (target, key, descriptor) { var originalMethod = descriptor.value; descriptor.value = function () { var _this = this; var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } this[flag] = true; var result = originalMethod.apply(this, args); if (result) { result.next = function (val) { _this[flag] = false; return result._next(val); }; result.error = function (err) { //console.log(err); _this[flag] = false; return result._error(err); }; } else { this[flag] = false; } return result; }; return descriptor; }; } var DataService = /** @class */ (function () { function DataService(api_url, endpoint) { this._endpoint = ""; this.xMan = new XHRManager(api_url, endpoint); this.element_list = new Array(); this.loading = false; this._endpoint = endpoint; } DataService.prototype.remove_e_query = function (query) { query = query.startsWith("&") ? query.replace(query.charAt(0), "") : query; return query; }; DataService.prototype.getById = function (id, callbackHandler) { var _this = this; this.loading = true; this.xMan.getById(id, this._endpoint) .then(function (result) { _this.bind_results(result); if (callbackHandler) callbackHandler(result); }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; DataService.prototype.bind_results = function (result) { var _a, _b, _c; this.page = (_a = result === null || result === void 0 ? void 0 : result.page) !== null && _a !== void 0 ? _a : this.page; this.fetch = (_b = result === null || result === void 0 ? void 0 : result.fetch) !== null && _b !== void 0 ? _b : this.fetch; this.itemsCount = (_c = result === null || result === void 0 ? void 0 : result.itemsCount) !== null && _c !== void 0 ? _c : this.itemsCount; if (result.objects != null) this.element_list = result.objects; this.results = result; this.get_pages_array(); }; DataService.prototype.get = function (filter, callbackHandler, pagination) { var _this = this; if (pagination === void 0) { pagination = false; } this.loading = true; var query = this.serialize_query(filter) + (pagination ? '&' + this.get_pagination_query() : ''); console.log(query); this.xMan.get(this._endpoint, query) .then(function (result) { _this.bind_results(result); if (callbackHandler) callbackHandler(result); }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; DataService.prototype.getAll = function (callbackHandler, pagination) { var _this = this; if (pagination === void 0) { pagination = false; } this.loading = true; var pagination_query = (pagination ? this.get_pagination_query() : ''); console.log(pagination); this.xMan.get(this._endpoint, pagination_query) .then(function (result) { _this.bind_results(result); if (callbackHandler) callbackHandler(result); }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; DataService.prototype.next = function (filter) { this.page += 1; this.get(filter, true); }; DataService.prototype.previous = function (filter) { if (this.page > 1) this.page -= 1; this.get(filter, true); }; /** * calls a http get to not configured endpoint * * @param endpoint another endpoint */ DataService.prototype.get_by_endpoint = function (endpoint, callbackHandler, query_params, pagination) { var _this = this; if (pagination === void 0) { pagination = false; } this.loading = true; console.log(pagination); this.xMan.get(endpoint + (pagination ? this.get_pagination_query() : '')) .then(function (result) { _this.bind_results(result); if (callbackHandler) callbackHandler(result); }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; /** * this function calls a http post from before configured api * * @param body parameter that send's a different custom body * @param callbackHandler @optional function to call when requests finish * @param message @optional string to show after requests finish */ DataService.prototype.post = function (body, callbackHandler) { var _this = this; this.loading = true; this.xMan.post(this.remove_resource(body), this._endpoint) .then(function (result) { _this.results = result; if (callbackHandler) callbackHandler(result); }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; /** * this function calls a http post from before configured api * * @param body parameter that send's a custom body * @param callbackHandler @optional function to call when requests finish * @param message @optional string to show after requests finish */ DataService.prototype.create = function (body, callbackHandler) { var _this = this; this.loading = true; this.xMan.post(this.remove_resource(body), this._endpoint) .then(function (result) { _this.results = result; if (callbackHandler) callbackHandler(result); }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; /** * call's a Put method to the url before configured * @param body of requisition of request * @param callbackHandler function that call's on request's finished * @param message @optional string to show after requests finish */ DataService.prototype.update = function (body, callbackHandler) { var _this = this; this.loading = true; this.xMan.put(this.remove_resource(body), this._endpoint) .then(function (result) { _this.results = result; if (callbackHandler) callbackHandler(result); }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; /** * call's a Put method to the url before configured * @param body of requisition of request * @param callbackHandler function that call's on request's finished * @param message @optional string to show after requests finish */ DataService.prototype.put = function (body, callbackHandler) { var _this = this; this.loading = true; this.xMan.put(body, this._endpoint) .then(function (result) { _this.results = result; if (callbackHandler) callbackHandler(result); }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; /** * calls http DELETE to configured endpoint * * @param id Id to delete * @param callbackHandler a function to run after delete function as done */ DataService.prototype.delete = function (id, callbackHandler) { var _this = this; this.loading = true; this.xMan.delete(id, this._endpoint) .then(function (results) { if (results.target) { if (callbackHandler) callbackHandler(results); } else { alert("Ocorreu um erro!"); } }) .catch(function (error) { return _this.showError(error); }) .finally(function () { return _this.loading = false; }); }; /** * Set's Authentication bearer * @param auth strings containing authentication bearer */ DataService.prototype.set_auth = function (auth) { this.xMan.set_token(auth); }; DataService.prototype.get_auth = function () { return this.xMan.get_token(); }; DataService.prototype.get_pages_array = function () { this.page_array = new Array(); var pagesCount = this.itemsCount / this.fetch; for (var index = 1; index <= pagesCount; index++) { this.page_array.push(index); } }; DataService.prototype.get_pagination_query = function () { return "fetch=" + this.fetch + "&page=" + this.page; }; DataService.prototype.show_success = function (msg) { alert(msg || 'Saved with success'); }; DataService.prototype.showError = function (error) { console.log("***API ERROR REPORT***"); console.log(error); console.log("--------------------"); }; DataService.prototype.logout = function () { StorageService.clear(); this.xMan.auth = ''; window.location.reload(); }; DataService.prototype.serialize_query = function (obj) { var str = []; for (var p in obj) { if (typeof obj[p] === 'object') { for (var key in obj[p]) { if (p == 'resource') continue; if (Object.prototype.hasOwnProperty.call(obj[p], key)) { var element = obj[p][key]; if (this.serialize_query(obj[p])) str.push(encodeURIComponent(p) + "." + this.serialize_query(obj[p])); } } } else if (obj.hasOwnProperty(p)) { if (encodeURIComponent(obj[p])) str.push(encodeURIComponent(p) + "=" + encodeURIComponent(obj[p])); } } var results = str.join("&"); return results; }; DataService.prototype.auto_bind = function (result, target) { for (var p in result) { if (target.hasOwnProperty(p) && result.hasOwnProperty(p)) { target[p] = result[p]; } } }; DataService.prototype.remove_resource = function (target) { this.target = JSON.parse(JSON.stringify(target)); for (var p in this.target) { if (this.target.hasOwnProperty(p)) { if (p == 'resource' || p == 'endpoint') { delete this.target[p]; } ; } } return this.target; }; DataService.normalizeString = function (text) { text = text.toLowerCase(); text = text.replace(new RegExp('[ÁÀÂÃ]', 'gi'), 'a'); text = text.replace(new RegExp('[ÉÈÊ]', 'gi'), 'e'); text = text.replace(new RegExp('[ÍÌÎ]', 'gi'), 'i'); text = text.replace(new RegExp('[ÓÒÔÕ]', 'gi'), 'o'); text = text.replace(new RegExp('[ÚÙÛ]', 'gi'), 'u'); text = text.replace(new RegExp('[Ç]', 'gi'), 'c'); text = text.replace(/[^a-z0-9 -]/g, ''); return text; }; DataService.user_session = "session-user"; return DataService; }()); var JadeIntegrationUtilsComponent = /** @class */ (function () { function JadeIntegrationUtilsComponent() { } JadeIntegrationUtilsComponent.prototype.ngOnInit = function () { }; JadeIntegrationUtilsComponent = __decorate([ Component({ selector: 'JadeIntegrationUtilsComponent', template: "" }) ], JadeIntegrationUtilsComponent); return JadeIntegrationUtilsComponent; }()); var InjectorInstance; var JadeIntegrationUtilsModule = /** @class */ (function () { function JadeIntegrationUtilsModule(_injector) { this._injector = _injector; InjectorInstance = this._injector; } JadeIntegrationUtilsModule.ctorParameters = function () { return [ { type: Injector } ]; }; JadeIntegrationUtilsModule = __decorate([ NgModule({ declarations: [ JadeIntegrationUtilsComponent, CheckRoleDirective ], imports: [ CommonModule, BrowserModule, HttpClientModule ], exports: [ HttpClientModule ], bootstrap: [JadeIntegrationUtilsComponent] }) ], JadeIntegrationUtilsModule); return JadeIntegrationUtilsModule; }()); /* * Public API Surface of ng-shared-utils */ /** * Generated bundle index. Do not edit. */ export { CheckRoleDirective, DataService, EventEmitterService, GenericService, HttpStatusService, HttpXHRService, InjectorInstance, JadeIntegrationUtilsModule, StorageService, XHRManager, loading, JadeIntegrationUtilsComponent as ɵa }; //# sourceMappingURL=jade-integration-utils.js.map