@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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { __spread, __assign, __decorate, __extends, __values, __param,
|
|
1
|
+
import { __spread, __assign, __decorate, __extends, __values, __param, __awaiter, __generator, __read } from 'tslib';
|
|
2
2
|
import { Input, Component, NgModule, EventEmitter, HostBinding, Output, ViewChild, Renderer2, HostListener, Directive, Injectable, Pipe, forwardRef, ViewEncapsulation, TemplateRef, ViewContainerRef, ComponentFactoryResolver, ChangeDetectorRef, ElementRef, InjectionToken, Inject, ContentChild, ApplicationRef, Injector, ContentChildren } from '@angular/core';
|
|
3
3
|
import { CommonModule } from '@angular/common';
|
|
4
4
|
import { BreadcrumbModule as BreadcrumbModule$1 } from 'primeng/breadcrumb';
|
|
@@ -4183,6 +4183,122 @@ var TokenListModule = /** @class */ (function () {
|
|
|
4183
4183
|
return TokenListModule;
|
|
4184
4184
|
}());
|
|
4185
4185
|
|
|
4186
|
+
var TablePagingComponent = /** @class */ (function () {
|
|
4187
|
+
function TablePagingComponent(translate, hostProjectConfigs) {
|
|
4188
|
+
this.translate = translate;
|
|
4189
|
+
this.hostProjectConfigs = hostProjectConfigs;
|
|
4190
|
+
}
|
|
4191
|
+
TablePagingComponent.prototype.ngOnChanges = function (changes) {
|
|
4192
|
+
this.totalRecordsText = this.translate.instant(this.getTranslatePrefix() + "total_records", {
|
|
4193
|
+
value: changes.totalRecords.currentValue
|
|
4194
|
+
});
|
|
4195
|
+
};
|
|
4196
|
+
TablePagingComponent.prototype.getTranslatePrefix = function () {
|
|
4197
|
+
return this.hostProjectConfigs.domain + "." + this.hostProjectConfigs.service + ".";
|
|
4198
|
+
};
|
|
4199
|
+
TablePagingComponent.prototype.getTooltipText = function () {
|
|
4200
|
+
return this.translate.instant(this.getTranslatePrefix() + "export_to_csv");
|
|
4201
|
+
};
|
|
4202
|
+
TablePagingComponent.prototype.getActions = function () {
|
|
4203
|
+
var _this = this;
|
|
4204
|
+
var actions = [
|
|
4205
|
+
{
|
|
4206
|
+
id: "exportCurrentPage",
|
|
4207
|
+
label: this.translate.instant(this.getTranslatePrefix() + "export_current_page"),
|
|
4208
|
+
command: function () { return _this.exportCurrentPage(); }
|
|
4209
|
+
},
|
|
4210
|
+
{
|
|
4211
|
+
id: "exportSelected",
|
|
4212
|
+
label: this.translate.instant(this.getTranslatePrefix() + "export_selected_records"),
|
|
4213
|
+
command: function () { return _this.exportSelectedRecords(); }
|
|
4214
|
+
}
|
|
4215
|
+
];
|
|
4216
|
+
if (this.loadAllRecords) {
|
|
4217
|
+
actions.push({
|
|
4218
|
+
id: "exportAll",
|
|
4219
|
+
label: this.translate.instant(this.getTranslatePrefix() + "export_all_records"),
|
|
4220
|
+
command: function () { return _this.exportAllRecords(); }
|
|
4221
|
+
});
|
|
4222
|
+
}
|
|
4223
|
+
return actions;
|
|
4224
|
+
};
|
|
4225
|
+
TablePagingComponent.prototype.validateComponent = function () {
|
|
4226
|
+
if (!this.table) {
|
|
4227
|
+
throw new Error("Table component not defined");
|
|
4228
|
+
}
|
|
4229
|
+
};
|
|
4230
|
+
TablePagingComponent.prototype.getColumnsToExport = function () {
|
|
4231
|
+
return __spread(this.table.columns).map(function (column) {
|
|
4232
|
+
if (column.exportable === null || column.exportable === undefined) {
|
|
4233
|
+
column.exportable = true;
|
|
4234
|
+
}
|
|
4235
|
+
return column;
|
|
4236
|
+
});
|
|
4237
|
+
};
|
|
4238
|
+
TablePagingComponent.prototype.getRowsToExport = function () {
|
|
4239
|
+
return this.table.value;
|
|
4240
|
+
};
|
|
4241
|
+
TablePagingComponent.prototype.getSelectedRowsToExport = function () {
|
|
4242
|
+
return this.table.selection;
|
|
4243
|
+
};
|
|
4244
|
+
TablePagingComponent.prototype.getExportFileName = function () {
|
|
4245
|
+
var _a;
|
|
4246
|
+
return (_a = this.exportFileName) !== null && _a !== void 0 ? _a : "download";
|
|
4247
|
+
};
|
|
4248
|
+
TablePagingComponent.prototype.exportCurrentPage = function () {
|
|
4249
|
+
this.validateComponent();
|
|
4250
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), this.getRowsToExport(), undefined, this.getExportFileName());
|
|
4251
|
+
};
|
|
4252
|
+
TablePagingComponent.prototype.exportSelectedRecords = function () {
|
|
4253
|
+
this.validateComponent();
|
|
4254
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), this.getSelectedRowsToExport(), undefined, this.getExportFileName());
|
|
4255
|
+
};
|
|
4256
|
+
TablePagingComponent.prototype.exportAllRecords = function () {
|
|
4257
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
4258
|
+
var data;
|
|
4259
|
+
return __generator(this, function (_a) {
|
|
4260
|
+
switch (_a.label) {
|
|
4261
|
+
case 0:
|
|
4262
|
+
this.validateComponent();
|
|
4263
|
+
return [4 /*yield*/, this.loadAllRecords()];
|
|
4264
|
+
case 1:
|
|
4265
|
+
data = _a.sent();
|
|
4266
|
+
ExportUtils.exportCSV(this.getColumnsToExport(), data, undefined, this.getExportFileName());
|
|
4267
|
+
return [2 /*return*/];
|
|
4268
|
+
}
|
|
4269
|
+
});
|
|
4270
|
+
});
|
|
4271
|
+
};
|
|
4272
|
+
TablePagingComponent.ctorParameters = function () { return [
|
|
4273
|
+
{ type: TranslateService },
|
|
4274
|
+
{ type: undefined, decorators: [{ type: Inject, args: [HostProjectConfigsInjectionToken,] }] }
|
|
4275
|
+
]; };
|
|
4276
|
+
__decorate([
|
|
4277
|
+
Input()
|
|
4278
|
+
], TablePagingComponent.prototype, "totalRecords", void 0);
|
|
4279
|
+
__decorate([
|
|
4280
|
+
Input()
|
|
4281
|
+
], TablePagingComponent.prototype, "exportFileName", void 0);
|
|
4282
|
+
__decorate([
|
|
4283
|
+
Input()
|
|
4284
|
+
], TablePagingComponent.prototype, "table", void 0);
|
|
4285
|
+
__decorate([
|
|
4286
|
+
Input()
|
|
4287
|
+
], TablePagingComponent.prototype, "loadAllRecords", void 0);
|
|
4288
|
+
__decorate([
|
|
4289
|
+
Output()
|
|
4290
|
+
], TablePagingComponent.prototype, "totalRecordsText", void 0);
|
|
4291
|
+
TablePagingComponent = __decorate([
|
|
4292
|
+
Component({
|
|
4293
|
+
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",
|
|
4294
|
+
selector: "s-table-paging",
|
|
4295
|
+
styles: [".paging-container{display:-ms-flexbox;display:flex;-ms-flex-align:center;align-items:center}.export-button{margin-left:6px}"]
|
|
4296
|
+
}),
|
|
4297
|
+
__param(1, Inject(HostProjectConfigsInjectionToken))
|
|
4298
|
+
], TablePagingComponent);
|
|
4299
|
+
return TablePagingComponent;
|
|
4300
|
+
}());
|
|
4301
|
+
|
|
4186
4302
|
var TableModule = /** @class */ (function () {
|
|
4187
4303
|
function TableModule() {
|
|
4188
4304
|
}
|
|
@@ -4191,19 +4307,23 @@ var TableModule = /** @class */ (function () {
|
|
|
4191
4307
|
imports: [
|
|
4192
4308
|
CommonModule,
|
|
4193
4309
|
TooltipModule,
|
|
4194
|
-
TokenListModule
|
|
4310
|
+
TokenListModule,
|
|
4311
|
+
TranslateModule,
|
|
4312
|
+
ButtonModule
|
|
4195
4313
|
],
|
|
4196
4314
|
exports: [
|
|
4197
4315
|
RowTogllerDirective,
|
|
4198
4316
|
NavigationDirective,
|
|
4199
4317
|
TableColumnsComponent,
|
|
4200
|
-
TableFrozenPositionDirective
|
|
4318
|
+
TableFrozenPositionDirective,
|
|
4319
|
+
TablePagingComponent
|
|
4201
4320
|
],
|
|
4202
4321
|
declarations: [
|
|
4203
4322
|
RowTogllerDirective,
|
|
4204
4323
|
NavigationDirective,
|
|
4205
4324
|
TableColumnsComponent,
|
|
4206
|
-
TableFrozenPositionDirective
|
|
4325
|
+
TableFrozenPositionDirective,
|
|
4326
|
+
TablePagingComponent
|
|
4207
4327
|
],
|
|
4208
4328
|
})
|
|
4209
4329
|
], TableModule);
|
|
@@ -8800,5 +8920,5 @@ var CodeEditorModule = /** @class */ (function () {
|
|
|
8800
8920
|
* Generated bundle index. Do not edit.
|
|
8801
8921
|
*/
|
|
8802
8922
|
|
|
8803
|
-
export { AngularComponentsModule, AutocompleteField, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb,
|
|
8923
|
+
export { AngularComponentsModule, AutocompleteField, BignumberField, BignumberInputDirective, BignumberInputModule, BooleanField, BooleanOptionsLabel, BreadcrumbComponent, BreadcrumbModule, Breakpoints, ButtonComponent, ButtonModule, ButtonPriority, ButtonSize, CalendarField, CalendarLocaleOptions, CalendarMaskDirective, CalendarMaskModule, ChipsField, CodeEditorModule, CollapseLinkComponent, CollapseLinkModule, ControlErrorsComponent, ControlErrorsModule, CurrencyField, CustomFieldsComponent, CustomFieldsModule, CustomFieldsService, DEFAULT_CALENDAR_LOCALE_OPTIONS, DEFAULT_LOCALE_OPTIONS, DEFAULT_NUMBER_LOCALE_OPTIONS, DoubleClickDirective, DynamicConfig, DynamicFormComponent, DynamicFormModule, DynamicType, EditableOverlayDirective, EditableOverlayModule, EmptyStateComponent, EmptyStateModule, EnumBadgeColors, EnumColumnFieldType, ExportUtils, Field, FieldType, Fieldset, FileUploadComponent, FileUploadModule, FormField, GlobalSearchComponent, GlobalSearchDropdownItemComponent, GlobalSearchModule, GlobalSearchSizeEnum, HostProjectConfigsInjectionToken, ImageCropperComponent, ImageCropperModule, ImageCropperService, InfoSignDirective, InfoSignModule, Languages, LoadingStateComponent, LoadingStateDirective, LoadingStateModule, LocaleModule, LocaleOptions, LocaleService, LocalizedCurrencyPipe, LocalizedCurrencyPipeOptions, LocalizedDateImpurePipe, LocalizedDatePipe, LocalizedNumberInputDirective, LocalizedNumberInputModule, LocalizedNumberPipe, LocalizedTimeImpurePipe, LocalizedTimePipe, LongPressDirective, LookupComponent, LookupField, MaskFormatterModule, MaskFormatterPipe, MouseEventsModule, NavigationDirective, NumberAlignmentOption, NumberField, NumberInputDirective, NumberInputModule, NumberLocaleOptions, ObjectCardComponent, ObjectCardFieldComponent, ObjectCardMainComponent, ObjectCardModule, Option, ProductHeaderComponent, ProductHeaderModule, RadioButtonField, RationButtonOption, RowTogllerDirective, Section, SelectField, SelectOption, SidebarComponent, SidebarModule, StatsCardComponent, StatsCardModule, StepState, StepsComponent, StepsModule, Structure, TableFrozenPositionDirective, TableHeaderCheckboxComponent, TableHeaderCheckboxModule, TableModule, TaxCalculationLanguageConfigs, TextAreaField, TextField, Themes, ThumbnailComponent, ThumbnailModule, ThumbnailSize, TileComponent, TileModule, TokenListComponent, TokenListModule, ValidateErrors, LocalizedCurrencyImpurePipe as ɵa, LocalizedBignumberPipe as ɵb, TextAreaFieldComponent as ɵba, TextFieldComponent as ɵbb, DecimalField as ɵbd, StructureModule as ɵbe, HeaderComponent as ɵbf, FooterComponent as ɵbg, InfoSignComponent as ɵbh, NumberLocaleOptions as ɵbi, ThumbnailService as ɵbj, InfiniteScrollModule as ɵbk, InfiniteScrollDirective as ɵbl, CustomTranslationsModule as ɵbm, CodeEditorComponent as ɵbn, CoreFacade as ɵbo, CodeMirror6Core as ɵbp, LocalizedBignumberImpurePipe as ɵc, TokenListModule as ɵd, ButtonModule as ɵe, TableColumnsComponent as ɵf, TablePagingComponent as ɵg, InfoSignModule as ɵh, MouseEventsModule as ɵi, AutocompleteFieldComponent as ɵj, BooleanFieldComponent as ɵk, CalendarFieldComponent as ɵl, ChipsFieldComponent as ɵm, CurrencyFieldComponent as ɵn, BaseFieldComponent as ɵo, DynamicFieldComponent as ɵp, DynamicFormDirective as ɵq, FieldsetComponent as ɵr, FileUploadComponent$1 as ɵs, LookupFieldComponent as ɵt, NumberFieldComponent as ɵu, BignumberFieldComponent as ɵv, RadioButtonComponent as ɵw, RowComponent as ɵx, SectionComponent as ɵy, SelectFieldComponent as ɵz };
|
|
8804
8924
|
//# sourceMappingURL=seniorsistemas-angular-components.js.map
|