@universis/ngx-tables 0.6.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.
Files changed (103) hide show
  1. package/LICENSE +163 -0
  2. package/README.md +121 -0
  3. package/bundles/universis-ngx-tables.umd.js +4591 -0
  4. package/bundles/universis-ngx-tables.umd.js.map +1 -0
  5. package/bundles/universis-ngx-tables.umd.min.js +2 -0
  6. package/bundles/universis-ngx-tables.umd.min.js.map +1 -0
  7. package/esm2015/lib/components/add-items/add-items.component.js +142 -0
  8. package/esm2015/lib/components/advanced-aggregator/advanced-aggregator.component.js +120 -0
  9. package/esm2015/lib/components/advanced-aggregator-list/advanced-aggregator-list.component.js +53 -0
  10. package/esm2015/lib/components/advanced-list/advanced-list.component.js +173 -0
  11. package/esm2015/lib/components/advanced-row-action/advanced-row-action.component.js +175 -0
  12. package/esm2015/lib/components/advanced-search-form/advanced-search-form.component.js +134 -0
  13. package/esm2015/lib/components/advanced-select/advanced-select.component.js +51 -0
  14. package/esm2015/lib/components/advanced-select/advanced-select.service.js +40 -0
  15. package/esm2015/lib/components/advanced-table/advanced-filter-value-provider.service.js +37 -0
  16. package/esm2015/lib/components/advanced-table/advanced-table-resolvers.js +44 -0
  17. package/esm2015/lib/components/advanced-table/advanced-table-search-base.js +23 -0
  18. package/esm2015/lib/components/advanced-table/advanced-table-search.component.js +519 -0
  19. package/esm2015/lib/components/advanced-table/advanced-table-settings.component.js +109 -0
  20. package/esm2015/lib/components/advanced-table/advanced-table.component.js +1007 -0
  21. package/esm2015/lib/components/advanced-table/advanced-table.formatters.interface.js +16 -0
  22. package/esm2015/lib/components/advanced-table/advanced-table.formatters.js +271 -0
  23. package/esm2015/lib/components/advanced-table/advanced-table.interfaces.js +2 -0
  24. package/esm2015/lib/components/advanced-table-modal/advanced-table-modal-base.component.js +379 -0
  25. package/esm2015/lib/components/table-simple-header/table-simple-header.component.js +52 -0
  26. package/esm2015/lib/directives/advanced-table-editor.directive.js +157 -0
  27. package/esm2015/lib/directives/btnexp.directive.js +225 -0
  28. package/esm2015/lib/i18n/tables.el.js +104 -0
  29. package/esm2015/lib/i18n/tables.en.js +103 -0
  30. package/esm2015/lib/pipes/advanced-aggregator.pipe.js +35 -0
  31. package/esm2015/lib/pipes/advansed-aggregator-list-title-parse.pipe.js +46 -0
  32. package/esm2015/lib/services/advanced-aggregator/advanced-aggregator.service.js +117 -0
  33. package/esm2015/lib/tables.activated-table.service.js +36 -0
  34. package/esm2015/lib/tables.module.js +134 -0
  35. package/esm2015/public_api.js +22 -0
  36. package/esm2015/universis-ngx-tables.js +14 -0
  37. package/esm5/lib/components/add-items/add-items.component.js +153 -0
  38. package/esm5/lib/components/advanced-aggregator/advanced-aggregator.component.js +169 -0
  39. package/esm5/lib/components/advanced-aggregator-list/advanced-aggregator-list.component.js +56 -0
  40. package/esm5/lib/components/advanced-list/advanced-list.component.js +185 -0
  41. package/esm5/lib/components/advanced-row-action/advanced-row-action.component.js +179 -0
  42. package/esm5/lib/components/advanced-search-form/advanced-search-form.component.js +137 -0
  43. package/esm5/lib/components/advanced-select/advanced-select.component.js +56 -0
  44. package/esm5/lib/components/advanced-select/advanced-select.service.js +43 -0
  45. package/esm5/lib/components/advanced-table/advanced-filter-value-provider.service.js +50 -0
  46. package/esm5/lib/components/advanced-table/advanced-table-resolvers.js +48 -0
  47. package/esm5/lib/components/advanced-table/advanced-table-search-base.js +29 -0
  48. package/esm5/lib/components/advanced-table/advanced-table-search.component.js +556 -0
  49. package/esm5/lib/components/advanced-table/advanced-table-settings.component.js +115 -0
  50. package/esm5/lib/components/advanced-table/advanced-table.component.js +1035 -0
  51. package/esm5/lib/components/advanced-table/advanced-table.formatters.interface.js +16 -0
  52. package/esm5/lib/components/advanced-table/advanced-table.formatters.js +313 -0
  53. package/esm5/lib/components/advanced-table/advanced-table.interfaces.js +2 -0
  54. package/esm5/lib/components/advanced-table-modal/advanced-table-modal-base.component.js +295 -0
  55. package/esm5/lib/components/table-simple-header/table-simple-header.component.js +58 -0
  56. package/esm5/lib/directives/advanced-table-editor.directive.js +175 -0
  57. package/esm5/lib/directives/btnexp.directive.js +253 -0
  58. package/esm5/lib/i18n/tables.el.js +104 -0
  59. package/esm5/lib/i18n/tables.en.js +103 -0
  60. package/esm5/lib/pipes/advanced-aggregator.pipe.js +39 -0
  61. package/esm5/lib/pipes/advansed-aggregator-list-title-parse.pipe.js +49 -0
  62. package/esm5/lib/services/advanced-aggregator/advanced-aggregator.service.js +130 -0
  63. package/esm5/lib/tables.activated-table.service.js +43 -0
  64. package/esm5/lib/tables.module.js +139 -0
  65. package/esm5/public_api.js +22 -0
  66. package/esm5/universis-ngx-tables.js +14 -0
  67. package/fesm2015/universis-ngx-tables.js +4127 -0
  68. package/fesm2015/universis-ngx-tables.js.map +1 -0
  69. package/fesm5/universis-ngx-tables.js +4313 -0
  70. package/fesm5/universis-ngx-tables.js.map +1 -0
  71. package/lib/advanced-aggregator.d.ts +124 -0
  72. package/lib/components/add-items/add-items.component.d.ts +44 -0
  73. package/lib/components/advanced-aggregator/advanced-aggregator.component.d.ts +45 -0
  74. package/lib/components/advanced-aggregator-list/advanced-aggregator-list.component.d.ts +25 -0
  75. package/lib/components/advanced-list/advanced-list.component.d.ts +42 -0
  76. package/lib/components/advanced-row-action/advanced-row-action.component.d.ts +42 -0
  77. package/lib/components/advanced-search-form/advanced-search-form.component.d.ts +27 -0
  78. package/lib/components/advanced-select/advanced-select.component.d.ts +14 -0
  79. package/lib/components/advanced-select/advanced-select.service.d.ts +9 -0
  80. package/lib/components/advanced-table/advanced-filter-value-provider.service.d.ts +8 -0
  81. package/lib/components/advanced-table/advanced-table-resolvers.d.ts +12 -0
  82. package/lib/components/advanced-table/advanced-table-search-base.d.ts +7 -0
  83. package/lib/components/advanced-table/advanced-table-search.component.d.ts +80 -0
  84. package/lib/components/advanced-table/advanced-table-settings.component.d.ts +35 -0
  85. package/lib/components/advanced-table/advanced-table.component.d.ts +142 -0
  86. package/lib/components/advanced-table/advanced-table.formatters.d.ts +62 -0
  87. package/lib/components/advanced-table/advanced-table.formatters.interface.d.ts +15 -0
  88. package/lib/components/advanced-table/advanced-table.interfaces.d.ts +27 -0
  89. package/lib/components/advanced-table-modal/advanced-table-modal-base.component.d.ts +82 -0
  90. package/lib/components/table-simple-header/table-simple-header.component.d.ts +14 -0
  91. package/lib/directives/advanced-table-editor.directive.d.ts +25 -0
  92. package/lib/directives/btnexp.directive.d.ts +68 -0
  93. package/lib/i18n/tables.el.d.ts +102 -0
  94. package/lib/i18n/tables.en.d.ts +101 -0
  95. package/lib/pipes/advanced-aggregator.pipe.d.ts +21 -0
  96. package/lib/pipes/advansed-aggregator-list-title-parse.pipe.d.ts +21 -0
  97. package/lib/services/advanced-aggregator/advanced-aggregator.service.d.ts +32 -0
  98. package/lib/tables.activated-table.service.d.ts +9 -0
  99. package/lib/tables.module.d.ts +7 -0
  100. package/package.json +51 -0
  101. package/public_api.d.ts +18 -0
  102. package/universis-ngx-tables.d.ts +12 -0
  103. package/universis-ngx-tables.metadata.json +1 -0
@@ -0,0 +1,62 @@
1
+ import { TableColumnConfiguration } from './advanced-table.interfaces';
2
+ import { Injector } from '@angular/core';
3
+ export declare abstract class AdvancedColumnFormatter implements TableColumnConfiguration {
4
+ protected injector: Injector;
5
+ className: string;
6
+ defaultContent: string;
7
+ formatString: string;
8
+ formatter: string;
9
+ hidden: boolean;
10
+ name: string;
11
+ order: string;
12
+ property: string;
13
+ sortable: boolean;
14
+ title: string;
15
+ formatOptions?: any;
16
+ actions?: Array<any>;
17
+ abstract render(data: any, type: any, row: any, meta: any): any;
18
+ }
19
+ export declare class NestedPropertyFormatter extends AdvancedColumnFormatter {
20
+ render(data: any, type: any, row: any, meta: any): any;
21
+ constructor();
22
+ }
23
+ export declare class ButtonFormatter extends AdvancedColumnFormatter {
24
+ render(data: any, type: any, row: any, meta: any): string;
25
+ constructor();
26
+ }
27
+ export declare class LinkFormatter extends AdvancedColumnFormatter {
28
+ render(data: any, type: any, row: any, meta: any): any;
29
+ constructor();
30
+ }
31
+ export declare class ActionLinkFormatter extends AdvancedColumnFormatter {
32
+ render(data: any, type: any, row: any, meta: any): any;
33
+ constructor();
34
+ }
35
+ export declare class SelectRowFormatter extends AdvancedColumnFormatter {
36
+ render(data: any, type: any, row: any, meta: any): any;
37
+ constructor();
38
+ }
39
+ export declare class TemplateFormatter extends AdvancedColumnFormatter {
40
+ render(data: any, type: any, row: any, meta: any): any;
41
+ constructor();
42
+ }
43
+ export declare class TrueFalseFormatter extends AdvancedColumnFormatter {
44
+ render(data: any, type: any, row: any, meta: any): any;
45
+ constructor();
46
+ }
47
+ export declare class TranslationFormatter extends AdvancedColumnFormatter {
48
+ render(data: any, type: any, row: any, meta: any): any;
49
+ constructor();
50
+ }
51
+ export declare class DateTimeFormatter extends AdvancedColumnFormatter {
52
+ render(data: any, type: any, row: any, meta: any): any;
53
+ constructor();
54
+ }
55
+ export declare class NgClassFormatter extends AdvancedColumnFormatter {
56
+ render(data: any, type: any, row: any, meta: any): any;
57
+ constructor();
58
+ }
59
+ export declare class LanguageFormatter extends AdvancedColumnFormatter {
60
+ render(data: any, type: any, row: any, meta: any): any;
61
+ constructor();
62
+ }
@@ -0,0 +1,15 @@
1
+ import { ActionLinkFormatter, ButtonFormatter, DateTimeFormatter, LanguageFormatter, LinkFormatter, NestedPropertyFormatter, NgClassFormatter, SelectRowFormatter, TemplateFormatter, TranslationFormatter, TrueFalseFormatter } from './advanced-table.formatters';
2
+ export interface IAdvancedTableFormatters {
3
+ ActionLinkFormatter?: ActionLinkFormatter;
4
+ ButtonFormatter?: ButtonFormatter;
5
+ DateTimeFormatter?: DateTimeFormatter;
6
+ LanguageFormatter?: LanguageFormatter;
7
+ LinkFormatter?: LinkFormatter;
8
+ NestedPropertyFormatter?: NestedPropertyFormatter;
9
+ NgClassFormatter?: NgClassFormatter;
10
+ SelectRowFormatter?: SelectRowFormatter;
11
+ TemplateFormatter?: TemplateFormatter;
12
+ TranslationFormatter?: TranslationFormatter;
13
+ TrueFalseFormatter?: TrueFalseFormatter;
14
+ }
15
+ export declare const FORMATTERS: IAdvancedTableFormatters;
@@ -0,0 +1,27 @@
1
+ export declare interface TableColumnConfiguration {
2
+ name?: string;
3
+ title: string;
4
+ sortable?: boolean;
5
+ class?: string;
6
+ defaultContent?: string;
7
+ formatter?: string;
8
+ formatString?: string;
9
+ hidden?: boolean;
10
+ property?: string;
11
+ order?: string;
12
+ formatOptions?: any;
13
+ formatters?: Array<any>;
14
+ virtual?: boolean;
15
+ export?: boolean;
16
+ }
17
+ export declare interface TableConfiguration {
18
+ criteria: any;
19
+ defaults: any;
20
+ title?: string;
21
+ model: string;
22
+ searchExpression?: string;
23
+ columns: Array<TableColumnConfiguration>;
24
+ searches: Array<any>;
25
+ selectable?: boolean;
26
+ multipleSelect?: boolean;
27
+ }
@@ -0,0 +1,82 @@
1
+ import { ElementRef, OnDestroy, OnInit, AfterViewInit } from '@angular/core';
2
+ import { RouterModalOkCancel } from '@universis/common/routing';
3
+ import { ActivatedRoute, Router } from '@angular/router';
4
+ import { TableConfiguration } from '../advanced-table/advanced-table.interfaces';
5
+ import { Subscription } from 'rxjs';
6
+ import { AdvancedTableComponent, AdvancedTableDataResult } from '../advanced-table/advanced-table.component';
7
+ import { AngularDataContext } from '@themost/angular';
8
+ import { AdvancedFilterValueProvider } from './../advanced-table/advanced-filter-value-provider.service';
9
+ import { DatePipe } from '@angular/common';
10
+ export declare interface PageInfo {
11
+ page: number;
12
+ pages: number;
13
+ start: number;
14
+ end: number;
15
+ length: number;
16
+ recordsTotal: number;
17
+ recordsDisplay: number;
18
+ serverSide?: boolean;
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\" dropdown>\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\" *dropdownMenu>\n <a class=\"dropdown-item\" *ngFor=\"let filter of defaultFilters\" (click)=\"advancedSearch(filter.filter ? filter : '')\">\n {{ filter.name | translate }}\n </a>\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\" dropdown>\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\" *dropdownMenu>\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
+ export declare class AdvancedTableModalBaseComponent extends RouterModalOkCancel implements OnInit, OnDestroy, AfterViewInit {
22
+ protected _context: AngularDataContext;
23
+ protected advancedFilterValueProvider: AdvancedFilterValueProvider;
24
+ protected datePipe: DatePipe;
25
+ ngAfterViewInit(): void;
26
+ private static readonly DEFAULT_ALL_FILTER;
27
+ advancedTable: AdvancedTableComponent;
28
+ emptyTable: ElementRef;
29
+ dropdownFilter: ElementRef;
30
+ dropdownLength: ElementRef;
31
+ tableConfig: TableConfiguration;
32
+ tableConfigSrc: string;
33
+ pageLength: number;
34
+ searchText: string;
35
+ lengthMenu: Array<number>;
36
+ private subscription;
37
+ recordsTotal: number;
38
+ loading: boolean;
39
+ recordsFiltered: number;
40
+ defaultFilters: Array<any>;
41
+ defaultFilter: {
42
+ name: string;
43
+ filter: any;
44
+ };
45
+ pageInfo: PageInfo;
46
+ private _template;
47
+ configChangesSubscription: Subscription;
48
+ constructor(_router: Router, _activatedRoute: ActivatedRoute, _context: AngularDataContext, advancedFilterValueProvider: AdvancedFilterValueProvider, datePipe: DatePipe);
49
+ private _getInputs;
50
+ hasInputs(): Array<string>;
51
+ ngOnInit(): void;
52
+ cancel(): Promise<any>;
53
+ ok(): Promise<any>;
54
+ ngOnDestroy(): void;
55
+ onDataLoad(data: AdvancedTableDataResult): void;
56
+ previousPage(): void;
57
+ nextPage(): void;
58
+ onTableInit(dataTable: any): void;
59
+ firstPage(): void;
60
+ lastPage(): void;
61
+ setLength(value: number): void;
62
+ onKeyUp(event: KeyboardEvent): void;
63
+ /**
64
+ *
65
+ * Reads the modal table and returns a list of filters to use in the table
66
+ * query.
67
+ *
68
+ * @param tableConfig {object} The table configuration from json file
69
+ * @param defaultFilterValues {object} A list of default filters
70
+ * @param {object} searchItem The searchItem to use
71
+ *
72
+ */
73
+ getFilters(tableConfig: any, defaultFilterValues: {}, searchItem: any): Array<string>;
74
+ /**
75
+ *
76
+ * Runs a filter against the modal table
77
+ *
78
+ * @param {object} filter The filter to use in the search
79
+ *
80
+ */
81
+ advancedSearch(filter: any): Promise<any>;
82
+ }
@@ -0,0 +1,14 @@
1
+ import { OnInit, OnDestroy, OnChanges, SimpleChanges } from '@angular/core';
2
+ import { AdvancedTableComponent } from '../advanced-table/advanced-table.component';
3
+ import { Subscription } from 'rxjs';
4
+ export declare class SimpleHeaderToolsComponent {
5
+ }
6
+ export declare class TableSimpleHeaderComponent implements OnInit, OnDestroy, OnChanges {
7
+ ngOnChanges(changes: SimpleChanges): void;
8
+ ngOnDestroy(): void;
9
+ table: AdvancedTableComponent;
10
+ recordsTotal: number;
11
+ dataLoadSubscription: Subscription;
12
+ constructor();
13
+ ngOnInit(): void;
14
+ }
@@ -0,0 +1,25 @@
1
+ import { EventEmitter } from '@angular/core';
2
+ import { AdvancedTableComponent } from '../components/advanced-table/advanced-table.component';
3
+ export declare class AdvancedTableNotNullError extends Error {
4
+ constructor();
5
+ }
6
+ export declare class AdvancedTableEditorDirective {
7
+ private table;
8
+ dirty: boolean;
9
+ dirtyChange: EventEmitter<boolean>;
10
+ constructor(table: AdvancedTableComponent);
11
+ /**
12
+ * Add rows to table and mark them as added rows
13
+ */
14
+ add(...addItems: any[]): void;
15
+ /**
16
+ * Marks rows as removed rows
17
+ */
18
+ remove(...removeItems: any[]): void;
19
+ set(items: any[]): void;
20
+ /**
21
+ * Undo changes
22
+ */
23
+ undo(): void;
24
+ rows(): {}[];
25
+ }
@@ -0,0 +1,68 @@
1
+ import { ActivatedTableService } from '../tables.activated-table.service';
2
+ import { AngularDataContext } from '@themost/angular';
3
+ import { ConfigurationService, ErrorService, LoadingService } from '@universis/common';
4
+ import { TranslateService } from '@ngx-translate/core';
5
+ import { ClientDataQueryable } from '@themost/client';
6
+ import { TableConfiguration } from '../components/advanced-table/advanced-table.interfaces';
7
+ export declare class BtnExpDirective {
8
+ private _activatedTable;
9
+ private _context;
10
+ private _config;
11
+ private _translate;
12
+ private _loadingService;
13
+ private _errorService;
14
+ constructor(_activatedTable: ActivatedTableService, _context: AngularDataContext, _config: ConfigurationService, _translate: TranslateService, _loadingService: LoadingService, _errorService: ErrorService);
15
+ clickEvent(event: any): Promise<void>;
16
+ /**
17
+ * Sets the parameters to the query based on
18
+ * the active filters of the activated table
19
+ * @param {ClientDataQueryable} query
20
+ * @param params: The filters of the last query of the activated table
21
+ * @return ClientDataQueryable
22
+ */
23
+ setParams(query: ClientDataQueryable, params: any): ClientDataQueryable;
24
+ /**
25
+ * Sets the headers to the query based on
26
+ * the default headers of the DataContext
27
+ * and appending the accept header to get
28
+ * an xlsx file from the API
29
+ * @param {ClientDataQueryable} query
30
+ * @param {Headers} headers: The headers to append to the query
31
+ * @return ClientDataQueryable
32
+ */
33
+ setHeaders(query: ClientDataQueryable, headers: Headers): ClientDataQueryable;
34
+ /**
35
+ * Constructs the select parameter of the
36
+ * ClientDataQuery by replacing the target name
37
+ * of the field based on the localized translation
38
+ * of that property on the advanced tabled
39
+ * @param {ClientDataQueryable} query
40
+ * @param tableConfig: The configuration of the activated table
41
+ * @return ClientDataQueryable
42
+ */
43
+ constructQueryParam(query: ClientDataQueryable, tableConfig: TableConfiguration): ClientDataQueryable;
44
+ /**
45
+ * Constructs the fetch URL based the query parameters
46
+ * @param {ClientDataQueryable} query
47
+ * @return String
48
+ */
49
+ constructURL(query: any): String;
50
+ /**
51
+ * Constructs the query by setting the parameters of the
52
+ * advanced table's active filters, sets the necessary headers
53
+ * and build the select parameter of the query
54
+ * @param {ClientDataQueryable} query
55
+ * @param params: The filters of the last query of the activated table
56
+ * @param tableConfig: The configuration of the activated table
57
+ * @param {Headers} headers: The headers to append to the query
58
+ * @return ClientDataQueryable
59
+ */
60
+ constructQuery(query: any, params: any, tableConfig: any, headers: Headers): ClientDataQueryable;
61
+ /**
62
+ * Fetches and saves the xlsx file
63
+ * @param {String} url
64
+ * @param {Headers} serviceHeaders: The headers to append to the query
65
+ * @param modelName: The model name of the advanced table
66
+ */
67
+ downloadFile(url: any, serviceHeaders: Headers, modelName: any): void;
68
+ }
@@ -0,0 +1,102 @@
1
+ export declare const TABLES_EL: {
2
+ "Tables": {
3
+ "Export": string;
4
+ "More": string;
5
+ "Search": string;
6
+ "SearchPlaceholder": string;
7
+ "GroupBy": string;
8
+ "DataTable": {
9
+ "paginate": {
10
+ "first": string;
11
+ "last": string;
12
+ "next": string;
13
+ "previous": string;
14
+ };
15
+ "info": string;
16
+ "infoEmpty": string;
17
+ "loading": string;
18
+ "processing": string;
19
+ "emptyTable": string;
20
+ };
21
+ "ColumnDisplay": string;
22
+ "ColumnDisplayInfo": string;
23
+ "Save": string;
24
+ "Apply": string;
25
+ "Cancel": string;
26
+ "RecordsPerPage": string;
27
+ "PageInfo": string;
28
+ "SearchListPlaceholder": string;
29
+ "Filters": string;
30
+ "All": string;
31
+ "AddItem": string;
32
+ "EmptyTableTitle": string;
33
+ "EmptyTableMessage": string;
34
+ "RemoveItem": string;
35
+ "Items": string;
36
+ "Item": string;
37
+ "AddItemMessage": {
38
+ "title": string;
39
+ "one": string;
40
+ "many": string;
41
+ };
42
+ "RemoveItemMessage": {
43
+ "title": string;
44
+ "one": string;
45
+ "many": string;
46
+ };
47
+ "RemoveItemsTitle": string;
48
+ "RemoveItemsMessage": string;
49
+ "SelectAll": string;
50
+ "ClearSelection": string;
51
+ "Actions": {
52
+ "Label": string;
53
+ "Start": string;
54
+ "ActionMessage": {
55
+ "None": string;
56
+ "One": string;
57
+ "Many": string;
58
+ };
59
+ "CompletedWithErrors": {
60
+ "Title": string;
61
+ "Description": {
62
+ "One": string;
63
+ "Many": string;
64
+ };
65
+ };
66
+ "CompletedWithSuccess": {
67
+ "Title": string;
68
+ };
69
+ };
70
+ };
71
+ "TrueFalse": {
72
+ "long": {
73
+ "Yes": string;
74
+ "No": string;
75
+ };
76
+ };
77
+ "AdvancedSearch": {
78
+ "Choose": string;
79
+ "ChooseDate": string;
80
+ "SavedSearches": string;
81
+ "ToggleDropdown": string;
82
+ "SaveCurrentSearch": string;
83
+ "SaveAs": string;
84
+ "Save": string;
85
+ "Delete": string;
86
+ "More": string;
87
+ "Less": string;
88
+ "Modal": {
89
+ "Title": string;
90
+ "Help": string;
91
+ "TitleOnUserError": string;
92
+ "TitleOnListAlreadyCreated": string;
93
+ "NoListDefined": string;
94
+ "EmptyCriteriaList": string;
95
+ "SaveNameLabel": string;
96
+ "SaveNamePlaceholder": string;
97
+ "Accept": string;
98
+ "Decline": string;
99
+ "Close": string;
100
+ };
101
+ };
102
+ };
@@ -0,0 +1,101 @@
1
+ export declare const TABLES_EN: {
2
+ "Tables": {
3
+ "Export": string;
4
+ "More": string;
5
+ "Search": string;
6
+ "SearchPlaceholder": string;
7
+ "GroupBy": string;
8
+ "DataTable": {
9
+ "paginate": {
10
+ "first": string;
11
+ "last": string;
12
+ "next": string;
13
+ "previous": string;
14
+ };
15
+ "info": string;
16
+ "infoEmpty": string;
17
+ "processing": string;
18
+ "emptyTable": string;
19
+ };
20
+ "ColumnDisplay": string;
21
+ "ColumnDisplayInfo": string;
22
+ "Save": string;
23
+ "Apply": string;
24
+ "Cancel": string;
25
+ "RecordsPerPage": string;
26
+ "PageInfo": string;
27
+ "SearchListPlaceHolder": string;
28
+ "Filters": string;
29
+ "All": string;
30
+ "AddItem": string;
31
+ "EmptyTableTitle": string;
32
+ "EmptyTableMessage": string;
33
+ "RemoveItem": string;
34
+ "Items": string;
35
+ "Item": string;
36
+ "AddItemMessage": {
37
+ "title": string;
38
+ "one": string;
39
+ "many": string;
40
+ };
41
+ "RemoveItemMessage": {
42
+ "title": string;
43
+ "one": string;
44
+ "many": string;
45
+ };
46
+ "RemoveItemsTitle": string;
47
+ "RemoveItemsMessage": string;
48
+ "SelectAll": string;
49
+ "ClearSelection": string;
50
+ "Actions": {
51
+ "Label": string;
52
+ "Start": string;
53
+ "ActionMessage": {
54
+ "None": string;
55
+ "One": string;
56
+ "Many": string;
57
+ };
58
+ "CompletedWithErrors": {
59
+ "Title": string;
60
+ "Description": {
61
+ "One": string;
62
+ "Many": string;
63
+ };
64
+ };
65
+ "CompletedWithSuccess": {
66
+ "Title": string;
67
+ };
68
+ };
69
+ };
70
+ "TrueFalse": {
71
+ "long": {
72
+ "Yes": string;
73
+ "No": string;
74
+ };
75
+ };
76
+ "AdvancedSearch": {
77
+ "Choose": string;
78
+ "ChooseDate": string;
79
+ "SavedSearches": string;
80
+ "ToggleDropdown": string;
81
+ "SaveCurrentSearch": string;
82
+ "SaveAs": string;
83
+ "Save": string;
84
+ "Delete": string;
85
+ "More": string;
86
+ "Less": string;
87
+ "Modal": {
88
+ "Title": string;
89
+ "Help": string;
90
+ "TitleOnUserError": string;
91
+ "TitleOnListAlreadyCreated": string;
92
+ "NoListDefined": string;
93
+ "EmptyCriteriaList": string;
94
+ "SaveNameLabel": string;
95
+ "SaveNamePlaceholder": string;
96
+ "Accept": string;
97
+ "Decline": string;
98
+ "Close": string;
99
+ };
100
+ };
101
+ };
@@ -0,0 +1,21 @@
1
+ import { PipeTransform } from "@angular/core";
2
+ /**
3
+ *
4
+ * @class AdvancedAggregatorPipe
5
+ * @classdesc Given a list of items runs a user defined function against that list
6
+ *
7
+ */
8
+ export declare class AdvancedAggregatorPipe implements PipeTransform {
9
+ /**
10
+ *
11
+ * @override
12
+ *
13
+ * @param items The list of items to run the aggregator against
14
+ * @param functionPool The functions that are available from the list caller
15
+ * @param functionName The name of the function to be called
16
+ *
17
+ * @returns {string} The value to show at the UI
18
+ *
19
+ */
20
+ transform(items: any[], functionPool: any, functionName: string): any;
21
+ }
@@ -0,0 +1,21 @@
1
+ import { PipeTransform } from "@angular/core";
2
+ import { TranslateService } from "@ngx-translate/core";
3
+ /**
4
+ *
5
+ * @class ParseTitlePipe
6
+ * @classdesc Given a title of an aggregator list, translates and evaluates the parameter if any
7
+ *
8
+ */
9
+ export declare class ParseTitlePipe implements PipeTransform {
10
+ private _translateService;
11
+ constructor(_translateService: TranslateService);
12
+ /**
13
+ *
14
+ * @override
15
+ *
16
+ * @param {string} title The title of the list
17
+ * @param {string} key The current list key that is being used
18
+ *
19
+ */
20
+ transform(title: string, key: string): any;
21
+ }
@@ -0,0 +1,32 @@
1
+ import { AngularDataContext } from '@themost/angular';
2
+ import { TemplatePipe } from '@universis/common';
3
+ export declare class AdvancedAggregatorService {
4
+ private _context;
5
+ private _template;
6
+ constructor(_context: AngularDataContext, _template: TemplatePipe);
7
+ /**
8
+ *
9
+ * Formats and executes the data query
10
+ *
11
+ * @param {string} model The target model
12
+ * @param {object} fixedParams Pairs of parameters to always be applied
13
+ * @param {string} queryStatement The default query to use for fetching the data (e.g. expands etc)
14
+ * @param {Array<string>} filters A list of filter expressions to append at the query
15
+ * @param {string} searchTemplate The template to use for searching expressions
16
+ * @param {string} searchValue The value of the user search
17
+ *
18
+ * @returns {Promise<any>} The response of the query execution
19
+ */
20
+ fetchData(model: string, fixedParams: object, queryStatement: string, filters: string[], searchTemplate?: string, searchValue?: string): Promise<any>;
21
+ /**
22
+ *
23
+ * Formats the received data to use flat keys
24
+ *
25
+ * @param config The applied configuration
26
+ * @param data The raw data
27
+ *
28
+ * @returns {Array<any>} The flat-key object list
29
+ *
30
+ */
31
+ formatData(config: any, data: any): any;
32
+ }
@@ -0,0 +1,9 @@
1
+ import { ActivatedRoute, Router } from '@angular/router';
2
+ import { AdvancedTableComponent } from './components/advanced-table/advanced-table.component';
3
+ export declare class ActivatedTableService {
4
+ private _router;
5
+ private _activatedRoute;
6
+ private _activeTable;
7
+ constructor(_router: Router, _activatedRoute: ActivatedRoute);
8
+ activeTable: AdvancedTableComponent;
9
+ }
@@ -0,0 +1,7 @@
1
+ import { OnInit } from '@angular/core';
2
+ import { TranslateService } from '@ngx-translate/core';
3
+ export declare class TablesModule implements OnInit {
4
+ private _translateService;
5
+ constructor(_translateService: TranslateService);
6
+ ngOnInit(): Promise<void>;
7
+ }
package/package.json ADDED
@@ -0,0 +1,51 @@
1
+ {
2
+ "name": "@universis/ngx-tables",
3
+ "version": "0.6.0",
4
+ "dependencies": {
5
+ "tslib": "^1.9.0"
6
+ },
7
+ "peerDependencies": {
8
+ "@angular/common": "^6.0.0 || ^7.0.0 || ^8.0.0",
9
+ "@angular/core": "^6.0.0 || ^7.0.0 || ^8.0.0",
10
+ "@angular/elements": "^6.1.10 || ^7.0.0 || ^8.0.0",
11
+ "@angular/forms": "^6.0.0 || ^7.0.0 || ^8.0.0",
12
+ "@angular/http": "^6.0.0 || ^7.0.0 || ^8.0.0",
13
+ "@angular/router": "^6.0.0 || ^7.0.0 || ^8.0.0",
14
+ "@universis/common": "^1.2.10",
15
+ "@universis/forms": "^0.5.6",
16
+ "@universis/theme": "^1.1.5",
17
+ "angular-formio": "^4.3.14",
18
+ "datatables": "^1.10.18",
19
+ "datatables.net": "1.10.24",
20
+ "datatables.net-buttons": "^1.5.6",
21
+ "datatables.net-buttons-dt": "^1.5.6",
22
+ "datatables.net-scroller": "^1.5.1",
23
+ "iso-639-1": "^2.1.8",
24
+ "jquery": "^3.3.1",
25
+ "lodash": "^4.17.4",
26
+ "mathjs": "^5.1.2",
27
+ "moment": "^2.22.2",
28
+ "@ngx-translate/core": "^10.0.2",
29
+ "@ngx-translate/http-loader": "^3.0.1",
30
+ "@themost/angular": "^6.5.2",
31
+ "@themost/client": "^2.5.3",
32
+ "ngx-bootstrap": "3.2.0",
33
+ "ngx-pipes": "^2.7.5",
34
+ "jsrsasign": "^10.0.5"
35
+ },
36
+ "devDependencies": {
37
+ "@types/datatables.net": "^1.10.19",
38
+ "@types/datatables.net-scroller": "^1.4.0",
39
+ "@types/jquery": "^3.5.5"
40
+ },
41
+ "main": "bundles/universis-ngx-tables.umd.js",
42
+ "module": "fesm5/universis-ngx-tables.js",
43
+ "es2015": "fesm2015/universis-ngx-tables.js",
44
+ "esm5": "esm5/universis-ngx-tables.js",
45
+ "esm2015": "esm2015/universis-ngx-tables.js",
46
+ "fesm5": "fesm5/universis-ngx-tables.js",
47
+ "fesm2015": "fesm2015/universis-ngx-tables.js",
48
+ "typings": "universis-ngx-tables.d.ts",
49
+ "metadata": "universis-ngx-tables.metadata.json",
50
+ "sideEffects": false
51
+ }