@senior-gestao-empresarial/angular-components 5.0.0 → 5.1.1
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/senior-gestao-empresarial-angular-components.umd.js +119 -43
- package/bundles/senior-gestao-empresarial-angular-components.umd.js.map +1 -1
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js +2 -2
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js.map +1 -1
- package/components/lookups/entities/e-081-tab-lookup.d.ts +8 -0
- package/components/lookups/erp-lookups.d.ts +1 -0
- package/components/lookups/index.d.ts +1 -0
- package/components/nps/index.d.ts +1 -0
- package/components/nps/nps.service.d.ts +4 -35
- package/components/nps/protocols/index.d.ts +3 -0
- package/components/nps/protocols/tenant-full-dto.d.ts +3 -0
- package/components/nps/protocols/token-senior-x.d.ts +14 -0
- package/components/nps/protocols/tracksale-request.d.ts +18 -0
- package/esm2015/components/lookups/entities/e-081-tab-lookup.js +73 -0
- package/esm2015/components/lookups/erp-lookups.js +14 -19
- package/esm2015/components/lookups/erp-lookups.module.js +3 -1
- package/esm2015/components/lookups/index.js +2 -1
- package/esm2015/components/nps/index.js +1 -1
- package/esm2015/components/nps/nps.service.js +12 -9
- package/esm2015/components/nps/protocols/index.js +1 -0
- package/esm2015/components/nps/protocols/tenant-full-dto.js +1 -0
- package/esm2015/components/nps/protocols/token-senior-x.js +1 -0
- package/esm2015/components/nps/protocols/tracksale-request.js +1 -0
- package/esm5/components/lookups/entities/e-081-tab-lookup.js +76 -0
- package/esm5/components/lookups/erp-lookups.js +15 -19
- package/esm5/components/lookups/erp-lookups.module.js +3 -1
- package/esm5/components/lookups/index.js +2 -1
- package/esm5/components/nps/index.js +1 -1
- package/esm5/components/nps/nps.service.js +32 -23
- package/esm5/components/nps/protocols/index.js +1 -0
- package/esm5/components/nps/protocols/tenant-full-dto.js +1 -0
- package/esm5/components/nps/protocols/token-senior-x.js +1 -0
- package/esm5/components/nps/protocols/tracksale-request.js +1 -0
- package/fesm2015/senior-gestao-empresarial-angular-components.js +92 -27
- package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-angular-components.js +116 -41
- package/fesm5/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/senior-gestao-empresarial-angular-components.metadata.json +1 -1
|
@@ -13,8 +13,8 @@ import { TranslateService } from '@ngx-translate/core';
|
|
|
13
13
|
import { HttpInterceptorModule } from '@seniorsistemas/platform-components';
|
|
14
14
|
import { user } from '@seniorsistemas/senior-platform-data';
|
|
15
15
|
import { FormControl, FormGroup } from '@angular/forms';
|
|
16
|
-
import { get } from 'js-cookie';
|
|
17
16
|
import { Stomp } from '@stomp/stompjs';
|
|
17
|
+
import { get } from 'js-cookie';
|
|
18
18
|
import * as SockJS from 'sockjs-client';
|
|
19
19
|
|
|
20
20
|
var BreadcrumbComponent = /** @class */ (function () {
|
|
@@ -423,15 +423,7 @@ var ErpLookups = /** @class */ (function () {
|
|
|
423
423
|
}, this.entity, options.domain || this.domain, options.service || this.service)
|
|
424
424
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
425
425
|
.pipe(map(function (list) {
|
|
426
|
-
return list.contents.map(function (item) { return (__assign(__assign({}, item), { label: lookupDisplayFields
|
|
427
|
-
.map(function (field) {
|
|
428
|
-
if (field.indexOf(".") > 0)
|
|
429
|
-
return _this.getProp(item, field, prefix);
|
|
430
|
-
return item[field] !== undefined && item[field] !== null
|
|
431
|
-
? item[field]
|
|
432
|
-
: _this.translate.instant(prefix + ".empty_label");
|
|
433
|
-
})
|
|
434
|
-
.join(" - ") })); });
|
|
426
|
+
return list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getItemLabel(item, prefix, lookupDisplayFields) })); });
|
|
435
427
|
}))
|
|
436
428
|
.subscribe(function (data) {
|
|
437
429
|
_this.lookupSuggestionsObservable.next(data);
|
|
@@ -500,21 +492,25 @@ var ErpLookups = /** @class */ (function () {
|
|
|
500
492
|
.list({ page: page, sort: sort, filterQuery: filterQuery, displayFields: displayFields }, this.entity, options.domain || this.domain, options.service || this.service)
|
|
501
493
|
.pipe(takeUntil(this.ngUnsubscribe))
|
|
502
494
|
.pipe(map(function (list) { return ({
|
|
503
|
-
gridData: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: lookupDisplayFields
|
|
504
|
-
.map(function (field) {
|
|
505
|
-
if (field.indexOf(".") > 0)
|
|
506
|
-
return _this.getProp(item, field, prefix);
|
|
507
|
-
return item[field] !== undefined && item[field] !== null
|
|
508
|
-
? item[field]
|
|
509
|
-
: _this.translate.instant(prefix + ".empty_label");
|
|
510
|
-
})
|
|
511
|
-
.join(" - ") })); }),
|
|
495
|
+
gridData: list.contents.map(function (item) { return (__assign(__assign({}, item), { label: _this.getItemLabel(item, prefix, lookupDisplayFields) })); }),
|
|
512
496
|
totalRecords: list.totalElements
|
|
513
497
|
}); }))
|
|
514
498
|
.subscribe(function (data) {
|
|
515
499
|
_this.lookupSearchObservable.next(data);
|
|
516
500
|
});
|
|
517
501
|
};
|
|
502
|
+
ErpLookups.prototype.getItemLabel = function (item, prefix, lookupDisplayFields) {
|
|
503
|
+
var _this = this;
|
|
504
|
+
return lookupDisplayFields
|
|
505
|
+
.map(function (field) {
|
|
506
|
+
if (field.indexOf(".") > 0)
|
|
507
|
+
return _this.getProp(item, field, prefix);
|
|
508
|
+
return item[field] !== undefined && item[field] !== null
|
|
509
|
+
? item[field]
|
|
510
|
+
: _this.translate.instant(prefix + ".empty_label");
|
|
511
|
+
})
|
|
512
|
+
.join(" - ");
|
|
513
|
+
};
|
|
518
514
|
ErpLookups.ctorParameters = function () { return [
|
|
519
515
|
{ type: ErpLookupsService },
|
|
520
516
|
{ type: TranslateService },
|
|
@@ -1837,6 +1833,75 @@ var E080SerLookup = /** @class */ (function (_super) {
|
|
|
1837
1833
|
return E080SerLookup;
|
|
1838
1834
|
}(ErpLookups));
|
|
1839
1835
|
|
|
1836
|
+
var E081TabLookup = /** @class */ (function (_super) {
|
|
1837
|
+
__extends(E081TabLookup, _super);
|
|
1838
|
+
function E081TabLookup(lookupService, translate) {
|
|
1839
|
+
var _this = _super.call(this, lookupService, translate, "e081tab", [
|
|
1840
|
+
{
|
|
1841
|
+
name: "codTpr",
|
|
1842
|
+
type: FieldType.String,
|
|
1843
|
+
},
|
|
1844
|
+
{
|
|
1845
|
+
name: "desTpr",
|
|
1846
|
+
type: FieldType.String,
|
|
1847
|
+
},
|
|
1848
|
+
], [
|
|
1849
|
+
{
|
|
1850
|
+
name: "codTpr",
|
|
1851
|
+
type: FieldType.String
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
name: "desTpr",
|
|
1855
|
+
type: FieldType.String
|
|
1856
|
+
},
|
|
1857
|
+
{
|
|
1858
|
+
name: "e031moe.codMoe",
|
|
1859
|
+
type: FieldType.String
|
|
1860
|
+
},
|
|
1861
|
+
{
|
|
1862
|
+
name: "e031moe.desMoe",
|
|
1863
|
+
type: FieldType.String
|
|
1864
|
+
},
|
|
1865
|
+
{
|
|
1866
|
+
name: "e031moe.sigMoe",
|
|
1867
|
+
type: FieldType.String
|
|
1868
|
+
}
|
|
1869
|
+
], [
|
|
1870
|
+
{
|
|
1871
|
+
name: "codTpr",
|
|
1872
|
+
type: FieldType.String
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
name: "desTpr",
|
|
1876
|
+
type: FieldType.String
|
|
1877
|
+
},
|
|
1878
|
+
{
|
|
1879
|
+
name: "e031moe.codMoe",
|
|
1880
|
+
type: FieldType.String
|
|
1881
|
+
},
|
|
1882
|
+
{
|
|
1883
|
+
name: "e031moe.desMoe",
|
|
1884
|
+
type: FieldType.String
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
name: "e031moe.sigMoe",
|
|
1888
|
+
type: FieldType.String
|
|
1889
|
+
}
|
|
1890
|
+
], "erpx_com_ven", "foundation") || this;
|
|
1891
|
+
_this.lookupService = lookupService;
|
|
1892
|
+
_this.translate = translate;
|
|
1893
|
+
return _this;
|
|
1894
|
+
}
|
|
1895
|
+
E081TabLookup.ctorParameters = function () { return [
|
|
1896
|
+
{ type: ErpLookupsService },
|
|
1897
|
+
{ type: TranslateService }
|
|
1898
|
+
]; };
|
|
1899
|
+
E081TabLookup = __decorate([
|
|
1900
|
+
Injectable()
|
|
1901
|
+
], E081TabLookup);
|
|
1902
|
+
return E081TabLookup;
|
|
1903
|
+
}(ErpLookups));
|
|
1904
|
+
|
|
1840
1905
|
var E085PesLookup = /** @class */ (function (_super) {
|
|
1841
1906
|
__extends(E085PesLookup, _super);
|
|
1842
1907
|
function E085PesLookup(lookupService, translate) {
|
|
@@ -5740,6 +5805,7 @@ var ErpLookupsModule = /** @class */ (function () {
|
|
|
5740
5805
|
E090PesLookup,
|
|
5741
5806
|
E075DerLookup,
|
|
5742
5807
|
E080SerLookup,
|
|
5808
|
+
E081TabLookup,
|
|
5743
5809
|
E024MsgLookup,
|
|
5744
5810
|
E032EdcLookup,
|
|
5745
5811
|
E082TprLookup,
|
|
@@ -6400,38 +6466,47 @@ var UtilsModule = /** @class */ (function () {
|
|
|
6400
6466
|
return UtilsModule;
|
|
6401
6467
|
}());
|
|
6402
6468
|
|
|
6469
|
+
// https://widget.tracksale.co/
|
|
6403
6470
|
var NpsService = /** @class */ (function () {
|
|
6404
6471
|
function NpsService() {
|
|
6405
6472
|
}
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
return
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6412
|
-
|
|
6473
|
+
NpsService.prototype.getUserInformation = function () {
|
|
6474
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
6475
|
+
return __generator(this, function (_a) {
|
|
6476
|
+
switch (_a.label) {
|
|
6477
|
+
case 0: return [4 /*yield*/, user.getToken()];
|
|
6478
|
+
case 1: return [2 /*return*/, _a.sent()];
|
|
6479
|
+
}
|
|
6480
|
+
});
|
|
6481
|
+
});
|
|
6482
|
+
};
|
|
6413
6483
|
/**
|
|
6414
6484
|
* Executa o serviço de NPS utilizando os dados do usuário atual, no caso sobreescrevendos os campos name, email, identification,
|
|
6415
6485
|
* tags.tenant e tags.email fornecidos no request original. Esses serão sobreescritos com os valores retornados pelo cookie
|
|
6416
|
-
* com.senior.pau.userdata.
|
|
6486
|
+
* com.senior.pau.userdata.
|
|
6487
|
+
*
|
|
6417
6488
|
* @param tracksaleRequest request que será enviado ao serviço de nps
|
|
6418
6489
|
*/
|
|
6419
6490
|
NpsService.prototype.currentUserInitNPS = function (tracksaleRequest) {
|
|
6420
6491
|
return __awaiter(this, void 0, void 0, function () {
|
|
6421
|
-
var _a, tenantName, email,
|
|
6492
|
+
var _a, tenantName, email, fullName, copyTracksaleRequest;
|
|
6422
6493
|
return __generator(this, function (_b) {
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
{};
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6494
|
+
switch (_b.label) {
|
|
6495
|
+
case 0: return [4 /*yield*/, this.getUserInformation()];
|
|
6496
|
+
case 1:
|
|
6497
|
+
_a = _b.sent(), tenantName = _a.tenantName, email = _a.email, fullName = _a.fullName;
|
|
6498
|
+
copyTracksaleRequest = __assign({}, tracksaleRequest);
|
|
6499
|
+
copyTracksaleRequest.tags =
|
|
6500
|
+
(tracksaleRequest.tags && __assign({}, tracksaleRequest.tags)) ||
|
|
6501
|
+
{};
|
|
6502
|
+
copyTracksaleRequest.name = fullName;
|
|
6503
|
+
copyTracksaleRequest.email = email;
|
|
6504
|
+
copyTracksaleRequest.identification = email;
|
|
6505
|
+
copyTracksaleRequest.tags.tenant = tenantName;
|
|
6506
|
+
copyTracksaleRequest.tags.email = email;
|
|
6507
|
+
this.initNPS(copyTracksaleRequest);
|
|
6508
|
+
return [2 /*return*/];
|
|
6509
|
+
}
|
|
6435
6510
|
});
|
|
6436
6511
|
});
|
|
6437
6512
|
};
|
|
@@ -6922,5 +6997,5 @@ var ModulesEnum;
|
|
|
6922
6997
|
* Generated bundle index. Do not edit.
|
|
6923
6998
|
*/
|
|
6924
6999
|
|
|
6925
|
-
export { BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E044CcuFinRatDepLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E080SerLookup, E082TprLookup, E085PesLookup, E090PesLookup, E091PlfFinRatLookup, E095PesLookup, E099UsuComGerLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E600CcoLookup, E640LotLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, LigacaoItemFornecedorLookup, LookupValidationUtils, ModulesEnum, NcmLookup, NpsService, ParametersLookup, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, WebsocketService, naturezaReceitaPisCofins, ErpLookupsService as ɵa, StorageService as ɵb, VerifyModulePermissionService as ɵc };
|
|
7000
|
+
export { BankLookup, BeneficioFiscalLookup, BreadcrumbComponent, BreadcrumbModule, Breakpoints, CountryLookup, CplTriNotaSaidaE001EndLookup, CplTriNotaSaidaE001PesLookup, CplTriNotaSaidaE001TnsLookup, CplTriNotaSaidaE007UfsLookup, CplTriNotaSaidaE008RaiLookup, CplTriNotaSaidaE015MedLookup, CplTriNotaSaidaE020SnfLookup, CplTriNotaSaidaE024MsgLookup, CplTriNotaSaidaE028CpgLookup, CplTriNotaSaidaE032EdcLookup, CplTriNotaSaidaE051DisLookup, CplTriNotaSaidaE066FpgLookup, CplTriNotaSaidaE070EmpLookup, CplTriNotaSaidaE070FilLookup, CplTriNotaSaidaE075DerLookup, CplTriNotaSaidaE080SerLookup, CplTriNotaSaidaNaturezaReceitaPisCofinsLookup, CplTriNotaSaidaNcmLookup, CplTriNotaSaidaNfEntradaLookup, CplTriNotaSaidaNfSaidaLookup, CurrencyLookup, E001EndLookup, E001PesLookup, E001TnsLookup, E001TnsSupEstLookup, E002TptLookup, E007UfsLookup, E008CepLookup, E008RaiLookup, E012FamLookup, E015MedLookup, E020SnfLookup, E021MotLookup, E023CrpLookup, E024MsgLookup, E027EqiLookup, E027StrLookup, E028CpgLookup, E030AgeLookup, E030BanLookup, E031MoeLookup, E032EdcLookup, E035OcrLookup, E036InsLookup, E039PorLookup, E044CcuFinRatDepLookup, E044CcuLookup, E045PlaLookup, E046HpdLookup, E047NtgLookup, E048FctLookup, E048SfcLookup, E051DisLookup, E066FpgLookup, E067FinLookup, E070EmpLookup, E070EntLookup, E070FilLookup, E073PesLookup, E073VeiLookup, E075DerLookup, E080SerLookup, E081TabLookup, E082TprLookup, E085PesLookup, E090PesLookup, E091PlfFinRatLookup, E095PesLookup, E099UsuComGerLookup, E140InsLookup, E140NfsLookup, E200LotLookup, E200SerLookup, E205DepLookup, E210DxpE075DerLookup, E210DxpLookup, E301TcrLookup, E403FprLookup, E420IcpLookup, E420IpcLookup, E420OcpLookup, E600CcoLookup, E640LotLookup, EnumLogicalOperator, EquipmentLookup, ErpLookups, ErpLookupsModule, ErpPolling, ExportUtils, FiltersStorageService, FormUtilsService, LigacaoItemFornecedorLookup, LookupValidationUtils, ModulesEnum, NcmLookup, NpsService, ParametersLookup, ProdutoServicoLookup, QuantidadeDisponivelDemandaLookup, RequisicaoLookup, TypeTaxesLookup, UnidadeMedidaLookup, UtilsModule, VerifyModulePermission, WebsocketService, naturezaReceitaPisCofins, ErpLookupsService as ɵa, StorageService as ɵb, VerifyModulePermissionService as ɵc };
|
|
6926
7001
|
//# sourceMappingURL=senior-gestao-empresarial-angular-components.js.map
|