@messaia/cdk 13.3.5 → 13.3.6-rc01

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 (32) hide show
  1. package/esm2020/lib/base/base.module.mjs +26 -8
  2. package/esm2020/lib/base/components/dynamic-table-config-dialog.comnponent.mjs +93 -0
  3. package/esm2020/lib/base/components/generic-list.component.mjs +22 -2
  4. package/esm2020/lib/forms/components/generic-form/generic-form.component.mjs +9 -2
  5. package/esm2020/lib/table/components/dynamic-table/dynamic-table.component.mjs +97 -21
  6. package/esm2020/lib/table/components/filter-clear.component.mjs +3 -3
  7. package/esm2020/lib/table/components/filter-date.component.mjs +3 -3
  8. package/esm2020/lib/table/components/filter-input.component.mjs +3 -3
  9. package/esm2020/lib/table/components/filter-select.component.mjs +3 -3
  10. package/esm2020/lib/table/functions/decorators.mjs +5 -3
  11. package/esm2020/lib/table/functions/functions.mjs +2 -2
  12. package/esm2020/lib/table/models/table-column-config.mjs +63 -0
  13. package/esm2020/lib/table/models/table-column.mjs +2 -1
  14. package/esm2020/lib/table/table.module.mjs +2 -1
  15. package/fesm2015/messaia-cdk.mjs +3014 -2751
  16. package/fesm2015/messaia-cdk.mjs.map +1 -1
  17. package/fesm2020/messaia-cdk.mjs +2993 -2735
  18. package/fesm2020/messaia-cdk.mjs.map +1 -1
  19. package/lib/base/base.module.d.ts +14 -5
  20. package/lib/base/components/dynamic-table-config-dialog.comnponent.d.ts +39 -0
  21. package/lib/base/components/generic-list.component.d.ts +4 -0
  22. package/lib/common/styles/_layout.scss +149 -92
  23. package/lib/forms/components/generic-form/generic-form.component.d.ts +5 -1
  24. package/lib/table/components/dynamic-table/dynamic-table.component.d.ts +47 -9
  25. package/lib/table/components/filter-clear.component.d.ts +1 -1
  26. package/lib/table/components/filter-date.component.d.ts +1 -1
  27. package/lib/table/components/filter-input.component.d.ts +1 -1
  28. package/lib/table/components/filter-select.component.d.ts +1 -1
  29. package/lib/table/models/table-column-config.d.ts +30 -0
  30. package/lib/table/models/table-column.d.ts +2 -0
  31. package/lib/table/table.module.d.ts +1 -0
  32. package/package.json +1 -1
@@ -3,9 +3,11 @@ import { MatMenuTrigger } from '@angular/material/menu';
3
3
  import { MatPaginator } from '@angular/material/paginator';
4
4
  import { MatSort } from '@angular/material/sort';
5
5
  import { MatTable } from '@angular/material/table';
6
+ import { BehaviorSubject, Observable } from 'rxjs';
6
7
  import { DynamicBuilder } from '../../../common/helpers/dynamic-builder';
7
8
  import { TableColumnType } from '../../enums/table-column-type';
8
9
  import { TableColumn } from '../../models/table-column';
10
+ import { TableColumnConfig } from '../../models/table-column-config';
9
11
  import { TableMenuItem } from '../../models/table-menu-item';
10
12
  import { TableDataSource } from '../../table.data-source';
11
13
  import * as i0 from "@angular/core";
@@ -39,6 +41,10 @@ export declare class VdDynamicTableComponent implements OnInit {
39
41
  * dataSourceFilter: any
40
42
  */
41
43
  dataSourceFilter: any;
44
+ /**
45
+ * Static table
46
+ */
47
+ static: boolean;
42
48
  /**
43
49
  * filterable?
44
50
  */
@@ -113,6 +119,22 @@ export declare class VdDynamicTableComponent implements OnInit {
113
119
  */
114
120
  get columns(): TableColumn[];
115
121
  set columns(columns: TableColumn[]);
122
+ /**
123
+ * columnsSubject: Subject<(TableColumn | string)[]>
124
+ */
125
+ columnsSubject: BehaviorSubject<(TableColumn | string)[]>;
126
+ /**
127
+ * columns$: Observable<(TableColumn | string)[]>
128
+ */
129
+ columns$: Observable<(TableColumn | string)[]>;
130
+ /**
131
+ * Displayed columns
132
+ */
133
+ displayedColumns$: Observable<string[]>;
134
+ /**
135
+ * Displayed filter columns
136
+ */
137
+ displayedFilterColumns$: Observable<string[]>;
116
138
  /**
117
139
  * Table row menu items
118
140
  */
@@ -129,24 +151,21 @@ export declare class VdDynamicTableComponent implements OnInit {
129
151
  * ColumnType: ColumnType
130
152
  */
131
153
  ColumnType: typeof TableColumnType;
132
- /**
133
- * Displayed columns
134
- */
135
- displayedColumns: string[];
136
- /**
137
- * Displayed filter columns
138
- */
139
- displayedFilterColumns: string[];
140
154
  /**
141
155
  * expandedRow: any
142
156
  */
143
157
  expandedRow: any;
158
+ /**
159
+ * Default page size
160
+ */
161
+ pageSize: number;
144
162
  /**
145
163
  * Page size options
146
164
  */
147
165
  pageSizeOptions: Array<number>;
148
166
  /**
149
167
  * Constructor
168
+ * @param dynamicBuilder
150
169
  */
151
170
  constructor(dynamicBuilder: DynamicBuilder);
152
171
  /**
@@ -157,6 +176,10 @@ export declare class VdDynamicTableComponent implements OnInit {
157
176
  * It is invoked only once when the directive is instantiated.
158
177
  */
159
178
  ngOnInit(): void;
179
+ /**
180
+ * Updates the table columns
181
+ */
182
+ updateColumns(loadConfig?: boolean): void;
160
183
  /**
161
184
  * Counts visible action menus
162
185
  * @param row
@@ -196,11 +219,26 @@ export declare class VdDynamicTableComponent implements OnInit {
196
219
  * changes (add/remove/move rows).
197
220
  */
198
221
  renderRows(): void;
222
+ /**
223
+ * Saves the table config
224
+ * @param config
225
+ */
226
+ saveConfigs(configs: TableColumnConfig[]): void;
227
+ /**
228
+ * Gets cell class
229
+ * @param column
230
+ */
231
+ protected getCellClass(column: TableColumn, row: any): any;
232
+ /**
233
+ * Gets cell class
234
+ * @param column
235
+ */
236
+ protected getVisibilityClass(column: TableColumn): any;
199
237
  /**
200
238
  * Responds to user-initiated events
201
239
  * @param event
202
240
  */
203
241
  handleContextMenuEvent(event: PointerEvent): void;
204
242
  static ɵfac: i0.ɵɵFactoryDeclaration<VdDynamicTableComponent, never>;
205
- static ɵcmp: i0.ɵɵComponentDeclaration<VdDynamicTableComponent, "vd-dynamic-table", never, { "dataSource": "dataSource"; "data": "data"; "classType": "classType"; "context": "context"; "dataSourceFilter": "dataSourceFilter"; "filterable": "filterable"; "paginable": "paginable"; "selectable": "selectable"; "sortActive": "sortActive"; "sortDirection": "sortDirection"; "stickyHeader": "stickyHeader"; "stickyFilter": "stickyFilter"; "rowNgClass": "rowNgClass"; "detailsTemplate": "detailsTemplate"; "readonly": "readonly"; "selectAllFilter": "selectAllFilter"; "columns": "columns"; "rowMenuItems": "rowMenuItems"; "excludedColumns": "excludedColumns"; }, { "rowClick": "rowClick"; }, never, never>;
243
+ static ɵcmp: i0.ɵɵComponentDeclaration<VdDynamicTableComponent, "vd-dynamic-table", never, { "dataSource": "dataSource"; "data": "data"; "classType": "classType"; "context": "context"; "dataSourceFilter": "dataSourceFilter"; "static": "static"; "filterable": "filterable"; "paginable": "paginable"; "selectable": "selectable"; "sortActive": "sortActive"; "sortDirection": "sortDirection"; "stickyHeader": "stickyHeader"; "stickyFilter": "stickyFilter"; "rowNgClass": "rowNgClass"; "detailsTemplate": "detailsTemplate"; "readonly": "readonly"; "selectAllFilter": "selectAllFilter"; "columns": "columns"; "rowMenuItems": "rowMenuItems"; "excludedColumns": "excludedColumns"; "pageSize": "pageSize"; "pageSizeOptions": "pageSizeOptions"; }, { "rowClick": "rowClick"; }, never, ["[table-footer]"]>;
206
244
  }
@@ -12,5 +12,5 @@ export declare class FilterClearComponent {
12
12
  */
13
13
  clear(): void;
14
14
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterClearComponent, never>;
15
- static ɵcmp: i0.ɵɵComponentDeclaration<FilterClearComponent, "mat-header-cell[filter-clear],[mat-header-cell][filter-clear]", never, {}, {}, never, never>;
15
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterClearComponent, "mat-header-cell[filter-clear], [mat-header-cell][filter-clear], [filter-clear]", never, {}, {}, never, never>;
16
16
  }
@@ -66,5 +66,5 @@ export declare class FilterDateComponent implements ControlValueAccessor {
66
66
  */
67
67
  private pad;
68
68
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterDateComponent, never>;
69
- static ɵcmp: i0.ɵɵComponentDeclaration<FilterDateComponent, "mat-header-cell[filter-date],[mat-header-cell][filter-date]", never, { "field": "field"; "debounce": "debounce"; "placeholder": "placeholder"; }, {}, never, never>;
69
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterDateComponent, "mat-header-cell[filter-date], [mat-header-cell][filter-date], [filter-date]", never, { "field": "field"; "debounce": "debounce"; "placeholder": "placeholder"; }, {}, never, never>;
70
70
  }
@@ -90,5 +90,5 @@ export declare class FilterInputComponent implements OnInit, ControlValueAccesso
90
90
  */
91
91
  private reload;
92
92
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterInputComponent, never>;
93
- static ɵcmp: i0.ɵɵComponentDeclaration<FilterInputComponent, "mat-header-cell[filter-input],[mat-header-cell][filter-input]", never, { "field": "field"; "operator": "operator"; "onlyNumber": "onlyNumber"; "debounce": "debounce"; "placeholder": "placeholder"; }, {}, never, never>;
93
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterInputComponent, "mat-header-cell[filter-input], [mat-header-cell][filter-input], [filter-input]", never, { "field": "field"; "operator": "operator"; "onlyNumber": "onlyNumber"; "debounce": "debounce"; "placeholder": "placeholder"; }, {}, never, never>;
94
94
  }
@@ -174,5 +174,5 @@ export declare class FilterSelectComponent implements OnInit, ControlValueAccess
174
174
  */
175
175
  onTouched: () => void;
176
176
  static ɵfac: i0.ɵɵFactoryDeclaration<FilterSelectComponent, never>;
177
- static ɵcmp: i0.ɵɵComponentDeclaration<FilterSelectComponent, "mat-header-cell[filter-select],[mat-header-cell][filter-select]", never, { "endpoint": "endpoint"; "params": "params"; "projection": "projection"; "sortBy": "sortBy"; "sorted": "sorted"; "enum": "enum"; "key": "key"; "text": "text"; "prefix": "prefix"; "multiple": "multiple"; "options": "options"; "filteredOptions": "filteredOptions"; "filterable": "filterable"; "field": "field"; "placeholder": "placeholder"; "cache": "cache"; }, {}, ["optionTemplate"], never>;
177
+ static ɵcmp: i0.ɵɵComponentDeclaration<FilterSelectComponent, "mat-header-cell[filter-select], [mat-header-cell][filter-select], [filter-select]", never, { "endpoint": "endpoint"; "params": "params"; "projection": "projection"; "sortBy": "sortBy"; "sorted": "sorted"; "enum": "enum"; "key": "key"; "text": "text"; "prefix": "prefix"; "multiple": "multiple"; "options": "options"; "filteredOptions": "filteredOptions"; "filterable": "filterable"; "field": "field"; "placeholder": "placeholder"; "cache": "cache"; }, {}, ["optionTemplate"], never>;
178
178
  }
@@ -0,0 +1,30 @@
1
+ export declare class TableColumnConfig {
2
+ name: string;
3
+ sortBy?: string;
4
+ header?: string;
5
+ index?: number;
6
+ hidden?: boolean;
7
+ disabled?: boolean;
8
+ showGtXs?: boolean;
9
+ showGtSm?: boolean;
10
+ showGtMd?: boolean;
11
+ showGtLg?: boolean;
12
+ showGtXl?: boolean;
13
+ showGtXxl?: boolean;
14
+ width?: number;
15
+ widthUnit?: string;
16
+ minWidth?: number;
17
+ minWidthUnit?: string;
18
+ maxWidth?: number;
19
+ maxWidthUnit?: string;
20
+ sticky?: boolean;
21
+ stickyEnd?: boolean;
22
+ hide?: Function;
23
+ tooltip?: Function;
24
+ tooltipClass?: string;
25
+ /**
26
+ * constructor
27
+ * @param init
28
+ */
29
+ constructor(init?: Partial<TableColumnConfig>);
30
+ }
@@ -18,6 +18,7 @@ export declare class TableColumn {
18
18
  content?: Function;
19
19
  contentLength?: number;
20
20
  event?: Function | string;
21
+ change?: Function;
21
22
  inputType?: string;
22
23
  filterInputNumber?: boolean;
23
24
  filterOperator?: string;
@@ -51,6 +52,7 @@ export declare class TableColumn {
51
52
  cellNgClass?: Function;
52
53
  tooltip?: Function;
53
54
  tooltipClass?: string;
55
+ configurable?: boolean;
54
56
  /**
55
57
  * constructor
56
58
  * @param init
@@ -35,6 +35,7 @@ export { Column, Table } from './functions/decorators';
35
35
  export { getTableDefinition } from './functions/functions';
36
36
  export { Pagination } from './models/pagination';
37
37
  export { TableColumn } from './models/table-column';
38
+ export { TableColumnConfig } from './models/table-column-config';
38
39
  export { TableDefinition } from './models/table-definition';
39
40
  export { TableMenuItem } from './models/table-menu-item';
40
41
  export { TableDataSource } from './table.data-source';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@messaia/cdk",
3
- "version": "13.3.5",
3
+ "version": "13.3.6-rc01",
4
4
  "peerDependencies": {},
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org"