@senior-gestao-empresarial/angular-components 7.14.1 → 7.15.0-b6a23810-5d75-4998-9373-4e317db69da6
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 +63 -3
- package/bundles/senior-gestao-empresarial-angular-components.umd.js.map +1 -1
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js +1 -1
- package/bundles/senior-gestao-empresarial-angular-components.umd.min.js.map +1 -1
- package/components/lookups/entities/lista-servico-nacional-lookup.d.ts +8 -0
- package/components/lookups/erp-lookups.d.ts +11 -3
- package/components/lookups/index.d.ts +1 -0
- package/esm2015/components/lookups/entities/lista-servico-nacional-lookup.js +34 -0
- package/esm2015/components/lookups/erp-lookups.js +24 -3
- package/esm2015/components/lookups/erp-lookups.module.js +3 -1
- package/esm2015/components/lookups/index.js +2 -1
- package/esm5/components/lookups/entities/lista-servico-nacional-lookup.js +37 -0
- package/esm5/components/lookups/erp-lookups.js +33 -5
- package/esm5/components/lookups/erp-lookups.module.js +3 -1
- package/esm5/components/lookups/index.js +2 -1
- package/fesm2015/senior-gestao-empresarial-angular-components.js +52 -3
- package/fesm2015/senior-gestao-empresarial-angular-components.js.map +1 -1
- package/fesm5/senior-gestao-empresarial-angular-components.js +62 -4
- 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
|
@@ -429,6 +429,19 @@
|
|
|
429
429
|
/** Contains string value (Ex: /Products?$filter=containing(lower(name), lower('my name'))) */
|
|
430
430
|
EnumLogicalOperator["Contains"] = "containing";
|
|
431
431
|
})(exports.EnumLogicalOperator || (exports.EnumLogicalOperator = {}));
|
|
432
|
+
var ErpLookupsSearchField = /** @class */ (function (_super) {
|
|
433
|
+
__extends(ErpLookupsSearchField, _super);
|
|
434
|
+
function ErpLookupsSearchField(searchFieldOptions) {
|
|
435
|
+
var args = [];
|
|
436
|
+
for (var _i = 1; _i < arguments.length; _i++) {
|
|
437
|
+
args[_i - 1] = arguments[_i];
|
|
438
|
+
}
|
|
439
|
+
var _this = _super.call(this, args) || this;
|
|
440
|
+
_this.searchFieldOptions = searchFieldOptions;
|
|
441
|
+
return _this;
|
|
442
|
+
}
|
|
443
|
+
return ErpLookupsSearchField;
|
|
444
|
+
}(angularComponents.FormField));
|
|
432
445
|
var ErpLookups = /** @class */ (function () {
|
|
433
446
|
/**
|
|
434
447
|
* Criação de um lookup.
|
|
@@ -471,6 +484,9 @@
|
|
|
471
484
|
translationKey = prefix + ".lookup_" + _this.toSnakeCase(_this.entity) + "_" + _this.toSnakeCase(fieldName);
|
|
472
485
|
label = _this.translate.instant(translationKey);
|
|
473
486
|
}
|
|
487
|
+
if ("searchFieldOptions" in field) {
|
|
488
|
+
return new ErpLookupsSearchField(field.searchFieldOptions, __assign(__assign({}, field), { label: label }));
|
|
489
|
+
}
|
|
474
490
|
return new angularComponents.FormField(__assign(__assign({}, field), { label: label }));
|
|
475
491
|
});
|
|
476
492
|
};
|
|
@@ -654,13 +670,24 @@
|
|
|
654
670
|
var name = _a.name;
|
|
655
671
|
return filterData[name] != undefined && filterData[name] != "";
|
|
656
672
|
})
|
|
657
|
-
.map(function (
|
|
658
|
-
var
|
|
673
|
+
.map(function (formField) {
|
|
674
|
+
var _a;
|
|
675
|
+
var name = formField.name, type = formField.type, multiple = formField.multiple;
|
|
659
676
|
var value = filterData[name];
|
|
660
677
|
if (typeof value == "number")
|
|
661
678
|
return name + " eq " + value;
|
|
662
|
-
else if (type == angularComponents.FieldType.Date)
|
|
679
|
+
else if (type == angularComponents.FieldType.Date) {
|
|
680
|
+
if ('searchFieldOptions' in formField &&
|
|
681
|
+
((_a = formField.searchFieldOptions) === null || _a === void 0 ? void 0 : _a.useAs) ===
|
|
682
|
+
angularComponents.FieldType.DateTime) {
|
|
683
|
+
return "(" + name + " " + exports.EnumLogicalOperator.Gt + " '" + moment(value)
|
|
684
|
+
.startOf('day')
|
|
685
|
+
.toISOString() + "' " + exports.EnumLogicalOperator.And + " " + name + " " + exports.EnumLogicalOperator.Lt + " '" + moment(value)
|
|
686
|
+
.endOf('day')
|
|
687
|
+
.toISOString() + "')";
|
|
688
|
+
}
|
|
663
689
|
return name + " eq '" + moment(value).format("YYYY-MM-DD") + "'";
|
|
690
|
+
}
|
|
664
691
|
else if (type == angularComponents.FieldType.Time)
|
|
665
692
|
return name + " eq '" + moment(value).format("HH:mm:ss") + "'";
|
|
666
693
|
else if (type == angularComponents.FieldType.DateTime)
|
|
@@ -7300,6 +7327,36 @@
|
|
|
7300
7327
|
return IndOperacaoFornecimentoLookup;
|
|
7301
7328
|
}(ErpLookups));
|
|
7302
7329
|
|
|
7330
|
+
var lookupFields$3 = [
|
|
7331
|
+
{
|
|
7332
|
+
name: "codigo",
|
|
7333
|
+
type: angularComponents.FieldType.String,
|
|
7334
|
+
},
|
|
7335
|
+
{
|
|
7336
|
+
name: "descricao",
|
|
7337
|
+
type: angularComponents.FieldType.String,
|
|
7338
|
+
},
|
|
7339
|
+
];
|
|
7340
|
+
var searchFields$1 = __spread(lookupFields$3);
|
|
7341
|
+
var searchGridFields = __spread(lookupFields$3);
|
|
7342
|
+
var ListaServicoNacionalLookup = /** @class */ (function (_super) {
|
|
7343
|
+
__extends(ListaServicoNacionalLookup, _super);
|
|
7344
|
+
function ListaServicoNacionalLookup(lookupService, translate) {
|
|
7345
|
+
var _this = _super.call(this, lookupService, translate, "listaServicoNacional", lookupFields$3, searchFields$1, searchGridFields, "erpx_cpl_imp", "cadastros") || this;
|
|
7346
|
+
_this.lookupService = lookupService;
|
|
7347
|
+
_this.translate = translate;
|
|
7348
|
+
return _this;
|
|
7349
|
+
}
|
|
7350
|
+
ListaServicoNacionalLookup.ctorParameters = function () { return [
|
|
7351
|
+
{ type: ErpLookupsService },
|
|
7352
|
+
{ type: core$1.TranslateService }
|
|
7353
|
+
]; };
|
|
7354
|
+
ListaServicoNacionalLookup = __decorate([
|
|
7355
|
+
core.Injectable()
|
|
7356
|
+
], ListaServicoNacionalLookup);
|
|
7357
|
+
return ListaServicoNacionalLookup;
|
|
7358
|
+
}(ErpLookups));
|
|
7359
|
+
|
|
7303
7360
|
var ErpLookupsModule = /** @class */ (function () {
|
|
7304
7361
|
function ErpLookupsModule() {
|
|
7305
7362
|
}
|
|
@@ -7431,6 +7488,7 @@
|
|
|
7431
7488
|
OrigemMercadoriaLookup,
|
|
7432
7489
|
E095HfoSupGerLookup,
|
|
7433
7490
|
IndOperacaoFornecimentoLookup,
|
|
7491
|
+
ListaServicoNacionalLookup
|
|
7434
7492
|
],
|
|
7435
7493
|
declarations: [],
|
|
7436
7494
|
exports: [],
|
|
@@ -8982,6 +9040,7 @@
|
|
|
8982
9040
|
exports.EquipmentLookup = EquipmentLookup;
|
|
8983
9041
|
exports.ErpLookups = ErpLookups;
|
|
8984
9042
|
exports.ErpLookupsModule = ErpLookupsModule;
|
|
9043
|
+
exports.ErpLookupsSearchField = ErpLookupsSearchField;
|
|
8985
9044
|
exports.ErpLookupsService = ErpLookupsService;
|
|
8986
9045
|
exports.ErpPolling = ErpPolling;
|
|
8987
9046
|
exports.ExportUtils = ExportUtils;
|
|
@@ -8991,6 +9050,7 @@
|
|
|
8991
9050
|
exports.IndOperacaoFornecimentoLookup = IndOperacaoFornecimentoLookup;
|
|
8992
9051
|
exports.LeiComplementar1162003Lookup = LeiComplementar1162003Lookup;
|
|
8993
9052
|
exports.LigacaoItemFornecedorLookup = LigacaoItemFornecedorLookup;
|
|
9053
|
+
exports.ListaServicoNacionalLookup = ListaServicoNacionalLookup;
|
|
8994
9054
|
exports.LookupValidationUtils = LookupValidationUtils;
|
|
8995
9055
|
exports.NbsLookup = NbsLookup;
|
|
8996
9056
|
exports.NcmLookup = NcmLookup;
|