@seniorsistemas/angular-components 14.12.0 → 14.13.0
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/seniorsistemas-angular-components.umd.js +160 -38
- package/bundles/seniorsistemas-angular-components.umd.js.map +1 -1
- package/bundles/seniorsistemas-angular-components.umd.min.js +2 -2
- package/bundles/seniorsistemas-angular-components.umd.min.js.map +1 -1
- package/components/table/table-paging/table-paging.component.d.ts +27 -0
- package/esm2015/components/table/table-paging/table-paging.component.js +111 -0
- package/esm2015/components/table/table.module.js +11 -4
- package/esm2015/seniorsistemas-angular-components.js +38 -36
- package/esm5/components/table/table-paging/table-paging.component.js +122 -0
- package/esm5/components/table/table.module.js +11 -4
- package/esm5/seniorsistemas-angular-components.js +38 -36
- package/fesm2015/seniorsistemas-angular-components.js +113 -4
- package/fesm2015/seniorsistemas-angular-components.js.map +1 -1
- package/fesm5/seniorsistemas-angular-components.js +125 -5
- package/fesm5/seniorsistemas-angular-components.js.map +1 -1
- package/package.json +1 -1
- package/seniorsistemas-angular-components.d.ts +37 -35
- package/seniorsistemas-angular-components.metadata.json +1 -1
|
@@ -4357,6 +4357,122 @@
|
|
|
4357
4357
|
return TokenListModule;
|
|
4358
4358
|
}());
|
|
4359
4359
|
|
|
4360
|
+
var TablePagingComponent = /** @class */ (function () {
|
|
4361
|
+
function TablePagingComponent(translate, hostProjectConfigs) {
|
|
4362
|
+
this.translate = translate;
|
|
4363
|
+
this.hostProjectConfigs = hostProjectConfigs;
|
|
4364
|
+
}
|
|
4365
|
+
TablePagingComponent.prototype.ngOnChanges = function (changes) {
|
|
4366
|
+
this.totalRecordsText = this.translate.instant(this.getTranslatePrefix() + "total_records", {
|
|
4367
|
+
value: changes.totalRecords.currentValue
|
|
4368
|
+
});
|
|
4369
|
+
};
|
|
4370
|
+
TablePagingComponent.prototype.getTranslatePrefix = function () {
|
|
4371
|
+
return this.hostProjectConfigs.domain + "." + this.hostProjectConfigs.service + ".";
|
|
4372
|
+
};
|
|
4373
|
+
TablePagingComponent.prototype.getTooltipText = function () {
|
|
4374
|
+
return this.translate.instant(this.getTranslatePrefix() + "export_to_csv");
|
|
4375
|
+
};
|
|
4376
|
+
TablePagingComponent.prototype.getActions = function () {
|
|
4377
|
+
var _this = this;
|
|
4378
|
+
var actions = [
|
|
4379
|
+
{
|
|
4380
|
+
id: "exportCurrentPage",
|
|
4381
|
+
label: this.translate.instant(this.getTranslatePrefix() + "export_current_page"),
|
|
4382
|
+
command: function () { return _this.exportCurrentPage(); }
|
|
4383
|
+
},
|
|
4384
|
+
{
|
|
4385
|
+
id: "exportSelected",
|
|
4386
|
+
label: this.translate.instant(this.getTranslatePrefix() + "export_selected_records"),
|
|
4387
|
+
command: function () { return _this.exportSelectedRecords(); }
|
|
4388
|
+
}
|
|
4389
|
+
];
|
|
4390
|
+
if (this.loadAllRecords) {
|
|
4391
|
+
actions.push({
|
|
4392
|
+
id: "exportAll",
|
|
4393
|
+
label: this.translate.instant(this.getTranslatePrefix() + "export_all_records"),
|
|
4394
|
+
command: function () { return _this.exportAllRecords(); }
|
|
4395
|
+
});
|
|
4396
|
+
}
|
|
4397
|
+
return actions;
|
|
4398
|
+
};
|
|
4399
|
+
TablePagingComponent.prototype.validateComponent = function () {
|
|
4400
|
+
if (!this.table) {
|
|
4401
|
+
throw new Error("Table component not defined");
|
|
4402
|
+
}
|
|
4403
|
+
};
|
|
4404
|
+
TablePagingComponent.prototype.getColumnsToExport = function () {
|
|
4405
|
+
return __spread(this.table.columns).map(function (column) {
|
|
4406
|
+
if (column.exportable === null || column.exportable === undefined) {
|
|
4407
|
+
column.exportable = true;
|
|
4408
|
+
}
|
|
4409
|
+
return column;
|
|
4410
|
+
});
|
|
4411
|
+
};
|
|
4412
|
+
TablePagingComponent.prototype.getRowsToExport = function () {
|
|
4413
|
+
return this.table.value;
|
|
4414
|
+
};
|
|
4415
|
+
TablePagingComponent.prototype.getSelectedRowsToExport = function () {
|
|
4416
|
+
return this.table.selection;
|
|
4417
|
+
};
|
|
4418
|
+
TablePagingComponent.prototype.getExportFileName = function () {
|
|
4419
|
+
var _a;
|
|
4420
|
+
return (_a = this.exportFileName) !== null && _a !== void 0 ? _a : "download";
|
|
4421
|
+
};
|
|
4422
|
+
TablePagingComponent.prototype.exportCurrentPage = function () {
|
|
4423
|
+
this.validateComponent();
|
|
4424
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), this.getRowsToExport(), undefined, this.getExportFileName());
|
|
4425
|
+
};
|
|
4426
|
+
TablePagingComponent.prototype.exportSelectedRecords = function () {
|
|
4427
|
+
this.validateComponent();
|
|
4428
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), this.getSelectedRowsToExport(), undefined, this.getExportFileName());
|
|
4429
|
+
};
|
|
4430
|
+
TablePagingComponent.prototype.exportAllRecords = function () {
|
|
4431
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4432
|
+
var data;
|
|
4433
|
+
return __generator(this, function (_a) {
|
|
4434
|
+
switch (_a.label) {
|
|
4435
|
+
case 0:
|
|
4436
|
+
this.validateComponent();
|
|
4437
|
+
return [4 /*yield*/, this.loadAllRecords()];
|
|
4438
|
+
case 1:
|
|
4439
|
+
data = _a.sent();
|
|
4440
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), data, undefined, this.getExportFileName());
|
|
4441
|
+
return [2 /*return*/];
|
|
4442
|
+
}
|
|
4443
|
+
});
|
|
4444
|
+
});
|
|
4445
|
+
};
|
|
4446
|
+
TablePagingComponent.ctorParameters = function () { return [
|
|
4447
|
+
{ type: core$1.TranslateService },
|
|
4448
|
+
{ type: undefined, decorators: [{ type: core.Inject, args: [HostProjectConfigsInjectionToken,] }] }
|
|
4449
|
+
]; };
|
|
4450
|
+
__decorate([
|
|
4451
|
+
core.Input()
|
|
4452
|
+
], TablePagingComponent.prototype, "totalRecords", void 0);
|
|
4453
|
+
__decorate([
|
|
4454
|
+
core.Input()
|
|
4455
|
+
], TablePagingComponent.prototype, "exportFileName", void 0);
|
|
4456
|
+
__decorate([
|
|
4457
|
+
core.Input()
|
|
4458
|
+
], TablePagingComponent.prototype, "table", void 0);
|
|
4459
|
+
__decorate([
|
|
4460
|
+
core.Input()
|
|
4461
|
+
], TablePagingComponent.prototype, "loadAllRecords", void 0);
|
|
4462
|
+
__decorate([
|
|
4463
|
+
core.Output()
|
|
4464
|
+
], TablePagingComponent.prototype, "totalRecordsText", void 0);
|
|
4465
|
+
TablePagingComponent = __decorate([
|
|
4466
|
+
core.Component({
|
|
4467
|
+
template: "<div class=\"paging-container\">\n <span class=\"total-records\">\n {{totalRecordsText}}\n </span>\n <s-button class=\"export-button\" \n priority=\"default\" \n iconClass=\"fa fa-fw fa-file-export\" \n [disabled]=\"false\" \n [auxiliary]=\"true\" \n [tooltip]=\"getTooltipText()\" \n [model]=\"getActions()\"></s-button>\n</div>\n",
|
|
4468
|
+
selector: "s-table-paging",
|
|
4469
|
+
styles: [".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]
|
|
4470
|
+
}),
|
|
4471
|
+
__param(1, core.Inject(HostProjectConfigsInjectionToken))
|
|
4472
|
+
], TablePagingComponent);
|
|
4473
|
+
return TablePagingComponent;
|
|
4474
|
+
}());
|
|
4475
|
+
|
|
4360
4476
|
var TableModule = /** @class */ (function () {
|
|
4361
4477
|
function TableModule() {
|
|
4362
4478
|
}
|
|
@@ -4365,19 +4481,23 @@
|
|
|
4365
4481
|
imports: [
|
|
4366
4482
|
common.CommonModule,
|
|
4367
4483
|
tooltip.TooltipModule,
|
|
4368
|
-
TokenListModule
|
|
4484
|
+
TokenListModule,
|
|
4485
|
+
core$1.TranslateModule,
|
|
4486
|
+
ButtonModule
|
|
4369
4487
|
],
|
|
4370
4488
|
exports: [
|
|
4371
4489
|
RowTogllerDirective,
|
|
4372
4490
|
NavigationDirective,
|
|
4373
4491
|
TableColumnsComponent,
|
|
4374
|
-
TableFrozenPositionDirective
|
|
4492
|
+
TableFrozenPositionDirective,
|
|
4493
|
+
TablePagingComponent
|
|
4375
4494
|
],
|
|
4376
4495
|
declarations: [
|
|
4377
4496
|
RowTogllerDirective,
|
|
4378
4497
|
NavigationDirective,
|
|
4379
4498
|
TableColumnsComponent,
|
|
4380
|
-
TableFrozenPositionDirective
|
|
4499
|
+
TableFrozenPositionDirective,
|
|
4500
|
+
TablePagingComponent
|
|
4381
4501
|
],
|
|
4382
4502
|
})
|
|
4383
4503
|
], TableModule);
|
|
@@ -9083,43 +9203,45 @@
|
|
|
9083
9203
|
exports.TokenListModule = TokenListModule;
|
|
9084
9204
|
exports.ɵa = LocalizedCurrencyImpurePipe;
|
|
9085
9205
|
exports.ɵb = LocalizedBignumberPipe;
|
|
9086
|
-
exports.ɵ
|
|
9087
|
-
exports.ɵ
|
|
9088
|
-
exports.ɵbd =
|
|
9089
|
-
exports.ɵbe =
|
|
9090
|
-
exports.ɵbf =
|
|
9091
|
-
exports.ɵbg =
|
|
9092
|
-
exports.ɵbh =
|
|
9093
|
-
exports.ɵbi =
|
|
9094
|
-
exports.ɵbj =
|
|
9095
|
-
exports.ɵbk =
|
|
9096
|
-
exports.ɵbl =
|
|
9097
|
-
exports.ɵbm =
|
|
9098
|
-
exports.ɵbn =
|
|
9206
|
+
exports.ɵba = TextAreaFieldComponent;
|
|
9207
|
+
exports.ɵbb = TextFieldComponent;
|
|
9208
|
+
exports.ɵbd = DecimalField;
|
|
9209
|
+
exports.ɵbe = StructureModule;
|
|
9210
|
+
exports.ɵbf = HeaderComponent;
|
|
9211
|
+
exports.ɵbg = FooterComponent;
|
|
9212
|
+
exports.ɵbh = InfoSignComponent;
|
|
9213
|
+
exports.ɵbi = NumberLocaleOptions;
|
|
9214
|
+
exports.ɵbj = ThumbnailService;
|
|
9215
|
+
exports.ɵbk = InfiniteScrollModule;
|
|
9216
|
+
exports.ɵbl = InfiniteScrollDirective;
|
|
9217
|
+
exports.ɵbm = CustomTranslationsModule;
|
|
9218
|
+
exports.ɵbn = CodeEditorComponent;
|
|
9219
|
+
exports.ɵbo = CoreFacade;
|
|
9220
|
+
exports.ɵbp = CodeMirror6Core;
|
|
9099
9221
|
exports.ɵc = LocalizedBignumberImpurePipe;
|
|
9100
9222
|
exports.ɵd = TokenListModule;
|
|
9101
|
-
exports.ɵe =
|
|
9102
|
-
exports.ɵf =
|
|
9103
|
-
exports.ɵg =
|
|
9104
|
-
exports.ɵh =
|
|
9105
|
-
exports.ɵi =
|
|
9106
|
-
exports.ɵj =
|
|
9107
|
-
exports.ɵk =
|
|
9108
|
-
exports.ɵl =
|
|
9109
|
-
exports.ɵm =
|
|
9110
|
-
exports.ɵn =
|
|
9111
|
-
exports.ɵo =
|
|
9112
|
-
exports.ɵp =
|
|
9113
|
-
exports.ɵq =
|
|
9114
|
-
exports.ɵr =
|
|
9115
|
-
exports.ɵs =
|
|
9116
|
-
exports.ɵt =
|
|
9117
|
-
exports.ɵu =
|
|
9118
|
-
exports.ɵv =
|
|
9119
|
-
exports.ɵw =
|
|
9120
|
-
exports.ɵx =
|
|
9121
|
-
exports.ɵy =
|
|
9122
|
-
exports.ɵz =
|
|
9223
|
+
exports.ɵe = ButtonModule;
|
|
9224
|
+
exports.ɵf = TableColumnsComponent;
|
|
9225
|
+
exports.ɵg = TablePagingComponent;
|
|
9226
|
+
exports.ɵh = InfoSignModule;
|
|
9227
|
+
exports.ɵi = MouseEventsModule;
|
|
9228
|
+
exports.ɵj = AutocompleteFieldComponent;
|
|
9229
|
+
exports.ɵk = BooleanFieldComponent;
|
|
9230
|
+
exports.ɵl = CalendarFieldComponent;
|
|
9231
|
+
exports.ɵm = ChipsFieldComponent;
|
|
9232
|
+
exports.ɵn = CurrencyFieldComponent;
|
|
9233
|
+
exports.ɵo = BaseFieldComponent;
|
|
9234
|
+
exports.ɵp = DynamicFieldComponent;
|
|
9235
|
+
exports.ɵq = DynamicFormDirective;
|
|
9236
|
+
exports.ɵr = FieldsetComponent;
|
|
9237
|
+
exports.ɵs = FileUploadComponent$1;
|
|
9238
|
+
exports.ɵt = LookupFieldComponent;
|
|
9239
|
+
exports.ɵu = NumberFieldComponent;
|
|
9240
|
+
exports.ɵv = BignumberFieldComponent;
|
|
9241
|
+
exports.ɵw = RadioButtonComponent;
|
|
9242
|
+
exports.ɵx = RowComponent;
|
|
9243
|
+
exports.ɵy = SectionComponent;
|
|
9244
|
+
exports.ɵz = SelectFieldComponent;
|
|
9123
9245
|
|
|
9124
9246
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
9125
9247
|
|