@universis/ngx-tables 0.6.7 → 0.6.11
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/universis-ngx-tables.umd.js +252 -84
- package/bundles/universis-ngx-tables.umd.js.map +1 -1
- package/bundles/universis-ngx-tables.umd.min.js +1 -1
- package/bundles/universis-ngx-tables.umd.min.js.map +1 -1
- package/esm2015/lib/components/advanced-select/advanced-select.component.js +2 -2
- package/esm2015/lib/components/advanced-table/advanced-table-search.component.js +3 -3
- package/esm2015/lib/components/advanced-table/advanced-table.component.js +18 -6
- package/esm2015/lib/components/advanced-table/advanced-table.formatters.interface.js +4 -2
- package/esm2015/lib/components/advanced-table/advanced-table.formatters.js +195 -58
- package/esm2015/lib/components/advanced-table-modal/advanced-table-modal-base.component.js +17 -10
- package/esm2015/lib/tables.module.js +1 -3
- package/esm5/lib/components/advanced-select/advanced-select.component.js +2 -2
- package/esm5/lib/components/advanced-table/advanced-table-search.component.js +3 -3
- package/esm5/lib/components/advanced-table/advanced-table.component.js +18 -6
- package/esm5/lib/components/advanced-table/advanced-table.formatters.interface.js +4 -2
- package/esm5/lib/components/advanced-table/advanced-table.formatters.js +202 -67
- package/esm5/lib/components/advanced-table-modal/advanced-table-modal-base.component.js +12 -5
- package/esm5/lib/tables.module.js +1 -3
- package/fesm2015/universis-ngx-tables.js +233 -77
- package/fesm2015/universis-ngx-tables.js.map +1 -1
- package/fesm5/universis-ngx-tables.js +233 -81
- package/fesm5/universis-ngx-tables.js.map +1 -1
- package/lib/components/advanced-table/advanced-table.formatters.d.ts +15 -0
- package/lib/components/advanced-table/advanced-table.formatters.interface.d.ts +3 -1
- package/lib/components/advanced-table-modal/advanced-table-modal-base.component.d.ts +5 -1
- package/package.json +1 -1
- package/universis-ngx-tables.metadata.json +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { TableColumnConfiguration } from './advanced-table.interfaces';
|
|
2
2
|
import { Injector } from '@angular/core';
|
|
3
|
+
import { NavigationExtras, UrlTree } from '@angular/router';
|
|
3
4
|
export declare abstract class AdvancedColumnFormatter implements TableColumnConfiguration {
|
|
4
5
|
static templateCache: Map<string, (data: any) => string>;
|
|
5
6
|
protected injector: Injector;
|
|
@@ -17,6 +18,10 @@ export declare abstract class AdvancedColumnFormatter implements TableColumnConf
|
|
|
17
18
|
actions?: Array<any>;
|
|
18
19
|
static template(expr: string): (data: any) => string;
|
|
19
20
|
abstract render(data: any, type: string, row: any, meta: any): any;
|
|
21
|
+
protected createUrlTree(data: any, options: {
|
|
22
|
+
commands: any[];
|
|
23
|
+
navigationExtras?: NavigationExtras;
|
|
24
|
+
}): UrlTree;
|
|
20
25
|
}
|
|
21
26
|
export interface OnAdvancedColumnAfterRender {
|
|
22
27
|
afterRender(cell: any, cellData: any, rowData: any, rowIndex: number, colIndex: number): void;
|
|
@@ -38,6 +43,16 @@ export declare class ActionLinkFormatter extends AdvancedColumnFormatter impleme
|
|
|
38
43
|
constructor();
|
|
39
44
|
afterRender(cell: any, cellData: any, rowData: any, rowIndex: number, colIndex: number): void;
|
|
40
45
|
}
|
|
46
|
+
export declare class ActionButtonFormatter extends AdvancedColumnFormatter implements OnAdvancedColumnAfterRender {
|
|
47
|
+
render(data: any, type: string, row: any, meta: any): any;
|
|
48
|
+
constructor();
|
|
49
|
+
afterRender(cell: any, cellData: any, rowData: any, rowIndex: number, colIndex: number): void;
|
|
50
|
+
}
|
|
51
|
+
export declare class ActionSplitButtonFormatter extends AdvancedColumnFormatter implements OnAdvancedColumnAfterRender {
|
|
52
|
+
render(data: any, type: string, row: any, meta: any): any;
|
|
53
|
+
constructor();
|
|
54
|
+
afterRender(cell: any, cellData: any, rowData: any, rowIndex: number, colIndex: number): void;
|
|
55
|
+
}
|
|
41
56
|
export declare class SelectRowFormatter extends AdvancedColumnFormatter {
|
|
42
57
|
render(data: any, type: any, row: any, meta: any): any;
|
|
43
58
|
constructor();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ActionLinkFormatter, ButtonFormatter, DateTimeFormatter, LanguageFormatter, LinkFormatter, NestedPropertyFormatter, NgClassFormatter, SelectRowFormatter, TemplateFormatter, TranslationFormatter, TrueFalseFormatter } from './advanced-table.formatters';
|
|
1
|
+
import { ActionLinkFormatter, ButtonFormatter, DateTimeFormatter, LanguageFormatter, LinkFormatter, NestedPropertyFormatter, NgClassFormatter, SelectRowFormatter, TemplateFormatter, TranslationFormatter, TrueFalseFormatter, ActionButtonFormatter, ActionSplitButtonFormatter } from './advanced-table.formatters';
|
|
2
2
|
export interface IAdvancedTableFormatters {
|
|
3
3
|
ActionLinkFormatter?: ActionLinkFormatter;
|
|
4
4
|
ButtonFormatter?: ButtonFormatter;
|
|
@@ -11,5 +11,7 @@ export interface IAdvancedTableFormatters {
|
|
|
11
11
|
TemplateFormatter?: TemplateFormatter;
|
|
12
12
|
TranslationFormatter?: TranslationFormatter;
|
|
13
13
|
TrueFalseFormatter?: TrueFalseFormatter;
|
|
14
|
+
ActionButtonFormatter?: ActionButtonFormatter;
|
|
15
|
+
ActionSplitButtonFormatter?: ActionSplitButtonFormatter;
|
|
14
16
|
}
|
|
15
17
|
export declare const FORMATTERS: IAdvancedTableFormatters;
|
|
@@ -17,7 +17,7 @@ export declare interface PageInfo {
|
|
|
17
17
|
recordsDisplay: number;
|
|
18
18
|
serverSide?: boolean;
|
|
19
19
|
}
|
|
20
|
-
export declare const AdvancedTableModalBaseTemplate = "\n<div>\n <!-- search -->\n <div class=\"row mt-3\">\n <div class=\"col-12 col-lg-3\">\n <div class=\"input-group mb-3\">\n <input spellcheck=\"false\" type=\"text\"\n (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"searchText\"\n class=\"form-control bg-gray-100 border-0\"\n placeholder=\"{{'Tables.SearchPlaceholder' | translate}}\" aria-label=\"Search\" aria-describedby=\"basic-addon2\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-default bg-gray-100 border-0\" type=\"button\">\n <i class=\"fa fa-search text-secondary\"></i>\n </button>\n </div>\n </div>\n </div>\n <div #emptyTable class=\"d-none\">\n <div>\n <div class=\"mt-4\">\n <div class=\"icon-circle bg-gray-300 border-gray-100\"></div>\n </div>\n <div class=\"mt-4\">\n <h4 class=\"font-3xl text-dark\" [translate]=\"'Tables.EmptyTableTitle'\"></h4>\n <p class=\"font-lg text-dark\" [translate]=\"'Tables.EmptyTableMessage'\"></p>\n </div>\n\n </div>\n </div>\n <div class=\"col-12 col-lg-5\">\n <div class=\"btn-toolbar\">\n <button class=\"btn btn-gray-100\">\n <i class=\"fa fa-sliders-h pr-2 text-secondary\" aria-hidden=\"true\"></i>{{'Tables.Filters' | translate}}\n </button>\n <div #dropdownFilter class=\"dropdown ml-3\"
|
|
20
|
+
export declare const AdvancedTableModalBaseTemplate = "\n<div>\n <!-- search -->\n <div class=\"row mt-3\">\n <div class=\"col-12 col-lg-3\">\n <div class=\"input-group mb-3\">\n <input spellcheck=\"false\" type=\"text\"\n (keyup)=\"onKeyUp($event)\" [(ngModel)]=\"searchText\"\n class=\"form-control bg-gray-100 border-0\"\n placeholder=\"{{'Tables.SearchPlaceholder' | translate}}\" aria-label=\"Search\" aria-describedby=\"basic-addon2\">\n <div class=\"input-group-append\">\n <button class=\"btn btn-default bg-gray-100 border-0\" type=\"button\">\n <i class=\"fa fa-search text-secondary\"></i>\n </button>\n </div>\n </div>\n </div>\n <div #emptyTable class=\"d-none\">\n <div>\n <div class=\"mt-4\">\n <div class=\"icon-circle bg-gray-300 border-gray-100\"></div>\n </div>\n <div class=\"mt-4\">\n <h4 class=\"font-3xl text-dark\" [translate]=\"'Tables.EmptyTableTitle'\"></h4>\n <p class=\"font-lg text-dark\" [translate]=\"'Tables.EmptyTableMessage'\"></p>\n </div>\n\n </div>\n </div>\n <div class=\"col-12 col-lg-5\">\n <div class=\"btn-toolbar\">\n <button class=\"btn btn-gray-100\">\n <i class=\"fa fa-sliders-h pr-2 text-secondary\" aria-hidden=\"true\"></i>{{'Tables.Filters' | translate}}\n </button>\n <div #dropdownFilter class=\"dropdown ml-3\">\n <button class=\"btn btn-gray-100 dropdown-toggle\"\n type=\"button\" id=\"dropdownDefaultFilters\"\n data-toggle=\"dropdown\" dropdownToggle>\n {{ this.defaultFilter.name | translate }}\n </button>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownDefaultFilters\">\n <button type=\"button\" class=\"dropdown-item\" *ngFor=\"let filter of defaultFilters\" (click)=\"onFilterSelect(filter)\">\n {{ filter.name | translate }}\n </button>\n </div>\n </div>\n </div>\n </div>\n <div class=\"col text-lg-right mt-3 mt-lg-0\">\n <button [disabled]=\"true\" class=\"btn rounded-pill btn-outline-theme\">\n <span class=\"pr-2 font-lg\">+</span><span [translate]=\"'Tables.AddItem'\"></span>\n </button>\n </div>\n </div>\n <div class=\"row\">\n <div class=\"col-12\" [ngClass]=\"{ 'component-loading': loading}\">\n <app-advanced-table #advancedTable (init)=\"onTableInit($event)\"\n (load)=\"onDataLoad($event)\"\n [selectable]=\"true\"\n [multipleSelect]=\"true\"\n [scrollX]=\"false\" [scrollY]=\"320\"\n [pageLength]=\"pageLength\"\n [scrollable]=\"false\" [showFooter]=\"false\"\n [showActions]=\"false\" [lengthMenu]=\"lengthMenu\"\n [config]=\"tableConfig\" [configSrc]=\"tableConfigSrc\"></app-advanced-table>\n </div>\n </div>\n <div class=\"row mt-3 table-custom-pager\">\n <div class=\"col-12 d-flex\" *ngIf=\"recordsTotal\">\n <div class=\"mt-2 ml-auto mr-3 text-secondary\" [translate]=\"'Tables.RecordsPerPage'\"></div>\n <div #dropdownLength class=\"dropdown mr-3\">\n <button class=\"btn btn-gray-100 dropdown-toggle\"\n type=\"button\" id=\"dropdownPageSize\" data-toggle=\"dropdown\"\n dropdownToggle>\n {{pageLength}}\n </button>\n <div class=\"dropdown-menu\" aria-labelledby=\"dropdownPageSize\">\n <button (click)=\"setLength(item)\"\n class=\"dropdown-item dropdown-item-theme\"\n type=\"button\" *ngFor=\"let item of lengthMenu\">{{item}}</button>\n </div>\n </div>\n <div class=\"mt-2 mr-2\" [translate]=\"'Tables.PageInfo'\" [translateParams]=\"pageInfo\"></div>\n <button [disabled]=\"pageInfo && pageInfo.page === 0\" class=\"btn text-nowrap\" (click)=\"firstPage()\">\n <i class=\"fa fa-chevron-left text-color-theme\"></i>\n <i class=\"fa fa-chevron-left text-color-theme\"></i>\n </button>\n <button [disabled]=\"pageInfo && pageInfo.page===0\" class=\"btn\" (click)=\"previousPage()\">\n <i class=\"fa fa-chevron-left text-color-theme\"></i>\n </button>\n <button [disabled]=\"pageInfo && pageInfo.page===pageInfo.pages-1\" class=\"btn\" (click)=\"nextPage()\">\n <i class=\"fa fa-chevron-right text-color-theme\"></i>\n </button>\n <button [disabled]=\"pageInfo && pageInfo.page===pageInfo.pages-1\" class=\"btn text-nowrap\" (click)=\"lastPage()\">\n <i class=\"fa fa-chevron-right text-color-theme\"></i>\n <i class=\"fa fa-chevron-right text-color-theme\"></i>\n </button>\n </div>\n </div>\n </div>\n";
|
|
21
21
|
export declare class AdvancedTableModalBaseComponent extends RouterModalOkCancel implements OnInit, OnDestroy, AfterViewInit {
|
|
22
22
|
protected _context: AngularDataContext;
|
|
23
23
|
protected advancedFilterValueProvider: AdvancedFilterValueProvider;
|
|
@@ -71,6 +71,10 @@ export declare class AdvancedTableModalBaseComponent extends RouterModalOkCancel
|
|
|
71
71
|
*
|
|
72
72
|
*/
|
|
73
73
|
getFilters(tableConfig: any, defaultFilterValues: {}, searchItem: any): Array<string>;
|
|
74
|
+
onFilterSelect(value: {
|
|
75
|
+
filter: any;
|
|
76
|
+
name: string;
|
|
77
|
+
} | any): void;
|
|
74
78
|
/**
|
|
75
79
|
*
|
|
76
80
|
* Runs a filter against the modal table
|