ngx-sp-infra 6.23.1 → 6.23.3

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.
@@ -4869,7 +4869,7 @@ class AuditoriaButtonComponent {
4869
4869
  initializeAuditoriaRoute() {
4870
4870
  // const match = this._router.url.match(/^[^/]+\/[^/]+\/([^/]+)\/[^/]+/);
4871
4871
  // const currentProduct = match ? match[1] : null;
4872
- const currentHostName = window.location.hostname;
4872
+ const currentHostName = window.location.host;
4873
4873
  const localHostnames = [
4874
4874
  "localhost",
4875
4875
  "127.0.0.1"
@@ -6524,11 +6524,11 @@ class HostOutsystemsServerService {
6524
6524
  this._BASE_URL = "";
6525
6525
  // `https://${window.location.host}/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api/Menu`;
6526
6526
  //private readonly _BASE_URL: string = `https://siscandesinfra.sispro.com.br/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api/Menu`;
6527
- this.GENERICS_BASE_URL = window.location.hostname.includes('localhost') ? `http://localhost:44384/api/Generics` : `https://${window.location.hostname}/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api/Generics`;
6528
- this.MENU_BASE_URL = window.location.hostname.includes('localhost') ? `http://localhost:44384/api/Menu` : `https://${window.location.hostname}/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api/Menu`;
6527
+ this.GENERICS_BASE_URL = window.location.host.includes('localhost') ? `http://localhost:44384/api/Generics` : `https://${window.location.host}/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api/Generics`;
6528
+ this.MENU_BASE_URL = window.location.host.includes('localhost') ? `http://localhost:44384/api/Menu` : `https://${window.location.host}/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api/Menu`;
6529
6529
  const raw = localStorage.getItem('user_auth_v6');
6530
6530
  this.token = raw ? JSON.parse(raw) : null;
6531
- if (this.localHostnames.includes(window.location.hostname)) {
6531
+ if (this.localHostnames.includes(window.location.host)) {
6532
6532
  this._BASE_URL = `https://siscandesinfra.sispro.com.br/SisproErpCloud/Service_Private/Infra/SpInfra2ErpWS/api/Menu`;
6533
6533
  }
6534
6534
  else {
@@ -9907,7 +9907,7 @@ class LibHeaderComponent {
9907
9907
  initializeAuditoriaRoute() {
9908
9908
  // const match = this._router.url.match(/^[^/]+\/[^/]+\/([^/]+)\/[^/]+/);
9909
9909
  // const currentProduct = match ? match[1] : null;
9910
- const currentHostName = window.location.hostname;
9910
+ const currentHostName = window.location.host;
9911
9911
  const localHostnames = [
9912
9912
  "localhost",
9913
9913
  "127.0.0.1"
@@ -11035,14 +11035,17 @@ class LoadingScreenComponent {
11035
11035
  // #region PUBLIC
11036
11036
  /** Indica se devo bloquear o unload do navegador quando ativo */
11037
11037
  this.blockUnload = false;
11038
+ this.message = 'Carregando Informações...';
11038
11039
  }
11039
11040
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LoadingScreenComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
11040
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: LoadingScreenComponent, isStandalone: true, selector: "lib-loading-screen", host: { listeners: { "window:beforeunload": "beforeUnloadHandler($event)" }, properties: { "class.h-100": "this.beforeUnloadHandler" } }, ngImport: i0, template: "<div class=\"loader-background\">\n <div class=\"d-flex flex-column justify-content-center align-items-center loader-content\">\n <div class=\"text-center\">\n <img src=\"assets/imgs/logo.png\" alt=\"Loading Logo\" class=\"mb-3\" style=\"max-width: 150px;\">\n <h2 class=\"fw-bold\">Carregando Informa\u00E7\u00F5es...</h2>\n <p class=\"text-muted\">Por favor, aguarde enquanto os dados s\u00E3o carregados.</p>\n </div>\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\n </div>\n</div>\n", styles: [".loader-background{z-index:1999;position:absolute;top:0;width:100%;height:100%;background-color:#ffffffbf!important}.loader-content{opacity:100%!important;height:100%}\n"] }); }
11041
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.2.25", type: LoadingScreenComponent, isStandalone: true, selector: "lib-loading-screen", inputs: { message: "message" }, host: { listeners: { "window:beforeunload": "beforeUnloadHandler($event)" }, properties: { "class.h-100": "this.beforeUnloadHandler" } }, ngImport: i0, template: "<div class=\"loader-background\">\n <div class=\"d-flex flex-column justify-content-center align-items-center loader-content\">\n <div class=\"text-center\">\n <img src=\"assets/imgs/logo.png\" alt=\"Loading Logo\" class=\"mb-3\" style=\"max-width: 150px;\">\n <h2 class=\"fw-bold\">{{ message }}</h2>\n <p class=\"text-muted\">Por favor, aguarde enquanto os dados s\u00E3o carregados.</p>\n </div>\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\n </div>\n</div>\n", styles: [".loader-background{z-index:1999;position:absolute;top:0;width:100%;height:100%;background-color:#ffffffbf!important}.loader-content{opacity:100%!important;height:100%}\n"] }); }
11041
11042
  }
11042
11043
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImport: i0, type: LoadingScreenComponent, decorators: [{
11043
11044
  type: Component,
11044
- args: [{ selector: 'lib-loading-screen', imports: [], template: "<div class=\"loader-background\">\n <div class=\"d-flex flex-column justify-content-center align-items-center loader-content\">\n <div class=\"text-center\">\n <img src=\"assets/imgs/logo.png\" alt=\"Loading Logo\" class=\"mb-3\" style=\"max-width: 150px;\">\n <h2 class=\"fw-bold\">Carregando Informa\u00E7\u00F5es...</h2>\n <p class=\"text-muted\">Por favor, aguarde enquanto os dados s\u00E3o carregados.</p>\n </div>\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\n </div>\n</div>\n", styles: [".loader-background{z-index:1999;position:absolute;top:0;width:100%;height:100%;background-color:#ffffffbf!important}.loader-content{opacity:100%!important;height:100%}\n"] }]
11045
- }], ctorParameters: () => [], propDecorators: { beforeUnloadHandler: [{
11045
+ args: [{ selector: 'lib-loading-screen', imports: [], template: "<div class=\"loader-background\">\n <div class=\"d-flex flex-column justify-content-center align-items-center loader-content\">\n <div class=\"text-center\">\n <img src=\"assets/imgs/logo.png\" alt=\"Loading Logo\" class=\"mb-3\" style=\"max-width: 150px;\">\n <h2 class=\"fw-bold\">{{ message }}</h2>\n <p class=\"text-muted\">Por favor, aguarde enquanto os dados s\u00E3o carregados.</p>\n </div>\n <div class=\"spinner-border text-primary\" role=\"status\"></div>\n </div>\n</div>\n", styles: [".loader-background{z-index:1999;position:absolute;top:0;width:100%;height:100%;background-color:#ffffffbf!important}.loader-content{opacity:100%!important;height:100%}\n"] }]
11046
+ }], ctorParameters: () => [], propDecorators: { message: [{
11047
+ type: Input
11048
+ }], beforeUnloadHandler: [{
11046
11049
  type: HostBinding,
11047
11050
  args: ['class.h-100']
11048
11051
  }, {
@@ -11214,8 +11217,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.25", ngImpo
11214
11217
  class PessoaService {
11215
11218
  constructor(_httpClient) {
11216
11219
  this._httpClient = _httpClient;
11217
- this.PAPEL_BASE_URL = window.location.hostname.includes('localhost') ? `http://localhost:44384/api/Papeis` : `https://${window.location.hostname}/SisproErpCloud/Service_Private/Corporativo/SpCrp2CrpPessoaWS/api/Papeis`;
11218
- this.PESSOA_BASE_URL = window.location.hostname.includes('localhost') ? `http://localhost:44384/api/Pessoas` : `https://${window.location.hostname}/SisproErpCloud/Service_Private/Corporativo/SpCrp2CrpPessoaWS/api/Pessoas`;
11220
+ this.PAPEL_BASE_URL = window.location.host.includes('localhost') ? `http://localhost:44384/api/Papeis` : `https://${window.location.host}/SisproErpCloud/Service_Private/Corporativo/SpCrp2CrpPessoaWS/api/Papeis`;
11221
+ this.PESSOA_BASE_URL = window.location.host.includes('localhost') ? `http://localhost:44384/api/Pessoas` : `https://${window.location.host}/SisproErpCloud/Service_Private/Corporativo/SpCrp2CrpPessoaWS/api/Pessoas`;
11219
11222
  }
11220
11223
  GetPapeisSelected(idCrpPessoa) {
11221
11224
  const headers = new HttpHeaders()
@@ -11952,7 +11955,7 @@ class SearchInputComponent {
11952
11955
  // - local + RotaOS => https://<productionHost>/<rotaOS>
11953
11956
  // - server + RotaV6 => https://<serverHost>/<rotaV6>
11954
11957
  // - server + RotaOS => https://<serverHost>/<rotaOS>
11955
- const isLocal = window.location.hostname.includes('localhost') || window.location.hostname === '127.0.0.1';
11958
+ const isLocal = window.location.host.includes('localhost') || window.location.host === '127.0.0.1';
11956
11959
  // Production host to use when we need to redirect to server from local
11957
11960
  const productionHost = isLocal ? 'v6siscandes.sispro.com.br' : window.location.host;
11958
11961
  const protocol = window.location.protocol;
@@ -14069,9 +14072,12 @@ class GlobalLoadingService {
14069
14072
  * Exibe o loading na tela.
14070
14073
  * @param blockUnload Indica se deve bloquear o unload do navegador enquanto o loading estiver sendo exibido. Recomenda-se usar true em casos de ações de Salvar/Atualizar.
14071
14074
  */
14072
- show(blockUnload = false) {
14075
+ show(blockUnload = false, message) {
14073
14076
  // Já existe o componente anexado
14074
14077
  if (this._componentRef) {
14078
+ if (message !== undefined) {
14079
+ this._componentRef.instance.message = message;
14080
+ }
14075
14081
  return;
14076
14082
  }
14077
14083
  // 1. Resolve a fábrica do componente
@@ -14080,6 +14086,9 @@ class GlobalLoadingService {
14080
14086
  this._componentRef = componentFactory.create(this.injector);
14081
14087
  // 2.1. Passa o parâmetro blockUnload para o componente
14082
14088
  this._componentRef.instance.blockUnload = blockUnload;
14089
+ if (message !== undefined) {
14090
+ this._componentRef.instance.message = message;
14091
+ }
14083
14092
  // 3. Anexa a view à ApplicationRef para que faça parte do ciclo de detecção de mudanças
14084
14093
  this.appRef.attachView(this._componentRef.hostView);
14085
14094
  // 4. Converte a view em nó DOM e adiciona ao body