ngx-sp-auth 4.6.4 → 4.6.6
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/fesm2022/ngx-sp-auth.mjs
CHANGED
|
@@ -1583,7 +1583,7 @@ class MenuServicesService {
|
|
|
1583
1583
|
this._httpClient = _httpClient;
|
|
1584
1584
|
this._customEnvironmentService = _customEnvironmentService;
|
|
1585
1585
|
this._BASE_URL = ""; // SpInfra2ErpWS
|
|
1586
|
-
this._BASE_URL_VERSION_INFRA = ""; //
|
|
1586
|
+
this._BASE_URL_VERSION_INFRA = ""; // SpInfra2VersionCore
|
|
1587
1587
|
this._BASE_URL_VERSION_CORPORATIVO = ""; // SpCrp2Version
|
|
1588
1588
|
this._HTTP_HEADERS = new HttpHeaders().set('Content-Type', 'application/json');
|
|
1589
1589
|
// #endregion Menu Dinâmico
|
|
@@ -1595,8 +1595,8 @@ class MenuServicesService {
|
|
|
1595
1595
|
this._subject = new Subject();
|
|
1596
1596
|
this._BASE_URL = `${this._customEnvironmentService.SpInfra2ErpWS}`; // SpInfra2ErpWS
|
|
1597
1597
|
this._BASE_URL = !this._customEnvironmentService.production ? this._BASE_URL : `${this._customEnvironmentService.SpInfra2ErpWS}`;
|
|
1598
|
-
this._BASE_URL_VERSION_INFRA = `${this._customEnvironmentService.SpInfra2AuthWS.replace('SpInfra2AuthWS', '
|
|
1599
|
-
this._BASE_URL_VERSION_INFRA = !this._customEnvironmentService.production ? this._BASE_URL_VERSION_INFRA : `${this._customEnvironmentService.SpInfra2AuthWS.replace('SpInfra2AuthWS', '
|
|
1598
|
+
this._BASE_URL_VERSION_INFRA = `${this._customEnvironmentService.SpInfra2AuthWS.replace('SpInfra2AuthWS', 'SpInfra2VersionCoreWS')}`; // SpInfra2VersionCoreWS
|
|
1599
|
+
this._BASE_URL_VERSION_INFRA = !this._customEnvironmentService.production ? this._BASE_URL_VERSION_INFRA : `${this._customEnvironmentService.SpInfra2AuthWS.replace('SpInfra2AuthWS', 'SpInfra2VersionCoreWS')}`;
|
|
1600
1600
|
this._BASE_URL_VERSION_CORPORATIVO = `${this._customEnvironmentService.SpInfra2AuthWS.replace('/Infra', '/Corporativo').replace('SpInfra2AuthWS', 'SpCrp2VersionWS')}`; // SpCrp2VersionWS
|
|
1601
1601
|
this._BASE_URL_VERSION_CORPORATIVO = !this._customEnvironmentService.production ? this._BASE_URL_VERSION_CORPORATIVO : `${this._customEnvironmentService.SpInfra2AuthWS.replace('/Infra', '/Corporativo').replace('SpInfra2AuthWS', 'SpCrp2VersionWS')}`;
|
|
1602
1602
|
}
|
|
@@ -1681,6 +1681,24 @@ class MenuServicesService {
|
|
|
1681
1681
|
}
|
|
1682
1682
|
}));
|
|
1683
1683
|
}
|
|
1684
|
+
getVersionBase() {
|
|
1685
|
+
const url = `${this._BASE_URL_VERSION_INFRA}/Version/base`;
|
|
1686
|
+
return this._httpClient.get(url, { 'headers': this._HTTP_HEADERS })
|
|
1687
|
+
.pipe(take(1), tap(response => {
|
|
1688
|
+
if (response.Error) {
|
|
1689
|
+
throw Error(response.ErrorMessage);
|
|
1690
|
+
}
|
|
1691
|
+
}));
|
|
1692
|
+
}
|
|
1693
|
+
getVersionModulos() {
|
|
1694
|
+
const url = `${this._BASE_URL_VERSION_INFRA}/Version/modulos`;
|
|
1695
|
+
return this._httpClient.get(url, { 'headers': this._HTTP_HEADERS })
|
|
1696
|
+
.pipe(take(1), tap(response => {
|
|
1697
|
+
if (response.Error) {
|
|
1698
|
+
throw Error(response.ErrorMessage);
|
|
1699
|
+
}
|
|
1700
|
+
}));
|
|
1701
|
+
}
|
|
1684
1702
|
// #endregion Menu: Version
|
|
1685
1703
|
// #region Menu: IsMenuAllowed
|
|
1686
1704
|
/** Método executado para validar a permissão de acesso a uma opção do menu. */
|
|
@@ -3314,7 +3332,7 @@ class VersoesModalComponent {
|
|
|
3314
3332
|
// #region ==========> PROPERTIES <==========
|
|
3315
3333
|
// #region PUBLIC
|
|
3316
3334
|
this.onClose = new EventEmitter();
|
|
3317
|
-
this.
|
|
3335
|
+
this.versionBase = '';
|
|
3318
3336
|
this.versionCorporativo = '';
|
|
3319
3337
|
this.closeSelf = () => { this.onClose.emit(); };
|
|
3320
3338
|
}
|
|
@@ -3324,9 +3342,9 @@ class VersoesModalComponent {
|
|
|
3324
3342
|
get releaseNotesUrl() {
|
|
3325
3343
|
let url = '';
|
|
3326
3344
|
if (window.location.host === 'localhost:4200')
|
|
3327
|
-
url = "https://siscandesinfra.sispro.com.br/SisproErpCloud/V6ReleaseNotes
|
|
3345
|
+
url = "https://siscandesinfra.sispro.com.br/SisproErpCloud/V6ReleaseNotes";
|
|
3328
3346
|
else
|
|
3329
|
-
url = `https://${window.location.host}/SisproErpCloud/V6ReleaseNotes
|
|
3347
|
+
url = `https://${window.location.host}/SisproErpCloud/V6ReleaseNotes`;
|
|
3330
3348
|
return url;
|
|
3331
3349
|
}
|
|
3332
3350
|
// #endregion PUBLIC
|
|
@@ -3338,25 +3356,35 @@ class VersoesModalComponent {
|
|
|
3338
3356
|
* Este método receberá no futuro uma lista de Versões de produtos cadastrados e listados em ordem.
|
|
3339
3357
|
*/
|
|
3340
3358
|
getVersions() {
|
|
3341
|
-
this._menuService.
|
|
3342
|
-
next: response => this.
|
|
3359
|
+
this._menuService.getVersionBase().subscribe({
|
|
3360
|
+
next: response => this.versionBase = response.Data,
|
|
3343
3361
|
error: error => this._authUtils.showHttpError(error)
|
|
3344
3362
|
});
|
|
3345
3363
|
// Versão do Corporativo
|
|
3364
|
+
// TODO: Excluir
|
|
3346
3365
|
this._menuService.getVersionCorporativo().subscribe({
|
|
3347
3366
|
next: response => this.versionCorporativo = response.Version,
|
|
3348
3367
|
error: error => this._authUtils.showHttpError(error)
|
|
3349
3368
|
});
|
|
3369
|
+
// Versão dos Módulos
|
|
3370
|
+
this._menuService.getVersionModulos().subscribe({
|
|
3371
|
+
next: response => {
|
|
3372
|
+
console.log(response);
|
|
3373
|
+
this.versions = response.Data;
|
|
3374
|
+
},
|
|
3375
|
+
error: error => this._authUtils.showHttpError(error)
|
|
3376
|
+
});
|
|
3350
3377
|
}
|
|
3351
3378
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: VersoesModalComponent, deps: [{ token: MenuServicesService }, { token: AuthUtilService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
3352
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "
|
|
3379
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.17", type: VersoesModalComponent, isStandalone: true, selector: "versoes-modal", outputs: { onClose: "onClose" }, ngImport: i0, template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered modal-lg\">\n <h4 class=\"modal-title pull-left color-modal fw-bold\" style=\"font-size: 20px;\"> Vers\u00E3o atual: {{ versionBase }} </h4>\n <button (click)=\"closeSelf()\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <p>Patches dos m\u00F3dulos espec\u00EDficos:</p>\n\n <ul class=\"p-0\">\n @for (versao of versions; track versao.Projeto) {\n <li>\n <span class=\"fw-bold\">{{ versao.Projeto }} | <a type=\"button\" class=\"text-decoration-none text-primary fw-bold\" tooltip=\"Clique aqui para acessar o que mudou nesta vers\u00E3o\" [routerLink]=\"[ releaseNotesUrl, versionBase, versao.Projeto ]\" >{{ versao.Versao }} <lib-icon iconName=\"acessoexterno\" iconSize=\"small\" /> </a></span>\n </li>\n }\n </ul>\n\n <p class=\"mb-0 mt-3\">Acesse as release notes de todas as vers\u00F5es do ERP <a [href]=\"releaseNotesUrl\" target=\"_blank\" class=\"fw-bold text-decoration-none text-primary\">clicando aqui</a> </p>\n </div>\n</div>", styles: ["ul{list-style-type:none!important}\n"], dependencies: [{ kind: "ngmodule", type: InfraModule }, { kind: "component", type: i3.LibIconsComponent, selector: "lib-icon", inputs: ["iconName", "iconColor", "iconSize", "iconFill"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: CommonModule }] }); }
|
|
3353
3380
|
}
|
|
3354
3381
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.17", ngImport: i0, type: VersoesModalComponent, decorators: [{
|
|
3355
3382
|
type: Component,
|
|
3356
3383
|
args: [{ selector: 'versoes-modal', imports: [
|
|
3357
3384
|
InfraModule,
|
|
3358
|
-
|
|
3359
|
-
|
|
3385
|
+
RouterLink,
|
|
3386
|
+
CommonModule,
|
|
3387
|
+
], template: "<div class=\"main-container\">\n <div class=\"modal-header modal-style modal-dialog-centered modal-lg\">\n <h4 class=\"modal-title pull-left color-modal fw-bold\" style=\"font-size: 20px;\"> Vers\u00E3o atual: {{ versionBase }} </h4>\n <button (click)=\"closeSelf()\" type=\"button\" class=\"btn-close\" data-bs-dismiss=\"modal\" aria-label=\"Close\"></button>\n </div>\n <div class=\"modal-body\">\n <p>Patches dos m\u00F3dulos espec\u00EDficos:</p>\n\n <ul class=\"p-0\">\n @for (versao of versions; track versao.Projeto) {\n <li>\n <span class=\"fw-bold\">{{ versao.Projeto }} | <a type=\"button\" class=\"text-decoration-none text-primary fw-bold\" tooltip=\"Clique aqui para acessar o que mudou nesta vers\u00E3o\" [routerLink]=\"[ releaseNotesUrl, versionBase, versao.Projeto ]\" >{{ versao.Versao }} <lib-icon iconName=\"acessoexterno\" iconSize=\"small\" /> </a></span>\n </li>\n }\n </ul>\n\n <p class=\"mb-0 mt-3\">Acesse as release notes de todas as vers\u00F5es do ERP <a [href]=\"releaseNotesUrl\" target=\"_blank\" class=\"fw-bold text-decoration-none text-primary\">clicando aqui</a> </p>\n </div>\n</div>", styles: ["ul{list-style-type:none!important}\n"] }]
|
|
3360
3388
|
}], ctorParameters: () => [{ type: MenuServicesService }, { type: AuthUtilService }], propDecorators: { onClose: [{
|
|
3361
3389
|
type: Output
|
|
3362
3390
|
}] } });
|