@tilde-nlp/ngx-common 2.0.6 → 2.0.7

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.
@@ -11,4 +11,8 @@ export interface ColumnSelectConfig {
11
11
  * If column select feature is enabled.
12
12
  */
13
13
  enabled?: boolean;
14
+ /**
15
+ * If true, enables batch select.
16
+ */
17
+ batchSelect?: boolean;
14
18
  }
@@ -1,7 +1,9 @@
1
+ import { SelectionModel } from '@angular/cdk/collections';
1
2
  import { AfterContentInit, AfterViewInit, ElementRef, EventEmitter, OnInit, QueryList } from '@angular/core';
2
3
  import { MatSort } from '@angular/material/sort';
3
4
  import { MatColumnDef, MatHeaderRowDef, MatNoDataRow, MatRowDef, MatTable } from '@angular/material/table';
4
5
  import { TranslateService } from '@ngx-translate/core';
6
+ import { Observable } from 'rxjs';
5
7
  import { FilterBarSettings } from '../filter-bar';
6
8
  import { FilterBarChangeEvent } from '../filter-bar/models/filter-bar-change-event.model';
7
9
  import { DOMService } from '../services';
@@ -12,9 +14,11 @@ import * as i0 from "@angular/core";
12
14
  export declare class MultiFunctionalTableComponent<T> implements OnInit, AfterContentInit, AfterViewInit {
13
15
  private readonly domService;
14
16
  private readonly translateService;
17
+ readonly selection: SelectionModel<T>;
15
18
  config: MultiFunctionalTableConfig<T>;
16
19
  filterBarChange: EventEmitter<FilterBarChangeEvent>;
17
20
  exported: EventEmitter<T[]>;
21
+ selectionChange: Observable<T[]>;
18
22
  headerRowDefs: QueryList<MatHeaderRowDef>;
19
23
  rowDefs: QueryList<MatRowDef<T>>;
20
24
  columnDefs: QueryList<MatColumnDef>;
@@ -24,7 +28,7 @@ export declare class MultiFunctionalTableComponent<T> implements OnInit, AfterCo
24
28
  tableElementRef: ElementRef<HTMLElement>;
25
29
  displayColumns: string[];
26
30
  columnSelectActive: boolean;
27
- filterActive: boolean;
31
+ get filterActive(): boolean | undefined;
28
32
  exportActive: boolean;
29
33
  noDataRowActive: boolean;
30
34
  filterBarVisible: boolean;
@@ -32,7 +36,9 @@ export declare class MultiFunctionalTableComponent<T> implements OnInit, AfterCo
32
36
  noDataRowConfig: NoDataRowConfig;
33
37
  noDataRowIcon: string;
34
38
  configurableColumns: ColumnConfig[];
39
+ batchSelectedEnabled: boolean;
35
40
  private localStorageValue;
41
+ readonly batchColumnName = "batch";
36
42
  constructor(domService: DOMService, translateService: TranslateService);
37
43
  ngOnInit(): void;
38
44
  ngAfterContentInit(): void;
@@ -41,6 +47,9 @@ export declare class MultiFunctionalTableComponent<T> implements OnInit, AfterCo
41
47
  toggleFilterBar(): void;
42
48
  filtersChanged(filters: FilterBarChangeEvent): void;
43
49
  export(): void;
50
+ isAllSelected(): boolean;
51
+ toggleAllRowSelection(): void;
52
+ toggleElementSelection(element: T): void;
44
53
  private exportToFile;
45
54
  private updateLocalStorage;
46
55
  private readFromLocalStorage;
@@ -49,5 +58,5 @@ export declare class MultiFunctionalTableComponent<T> implements OnInit, AfterCo
49
58
  private setNoDataRowProperties;
50
59
  private setExportProperties;
51
60
  static ɵfac: i0.ɵɵFactoryDeclaration<MultiFunctionalTableComponent<any>, never>;
52
- static ɵcmp: i0.ɵɵComponentDeclaration<MultiFunctionalTableComponent<any>, "tld-multi-functional-table", never, { "config": "config"; }, { "filterBarChange": "filterBarChange"; "exported": "exported"; }, ["noDataRow", "headerRowDefs", "rowDefs", "columnDefs"], ["[additionalActions]", "*"], false>;
61
+ static ɵcmp: i0.ɵɵComponentDeclaration<MultiFunctionalTableComponent<any>, "tld-multi-functional-table", never, { "config": "config"; }, { "filterBarChange": "filterBarChange"; "exported": "exported"; "selectionChange": "selectionChange"; }, ["noDataRow", "headerRowDefs", "rowDefs", "columnDefs"], ["[additionalActions]", "*"], false>;
53
62
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tilde-nlp/ngx-common",
3
- "version": "2.0.6",
3
+ "version": "2.0.7",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^14.0.0",
6
6
  "@angular/core": "^14.0.0",
@@ -0,0 +1,10 @@
1
+ .mat-dialog-container {
2
+ min-width: 22rem;
3
+ width: 40rem !important;
4
+ }
5
+
6
+ [mat-dialog-actions] {
7
+ margin-top: 3rem;
8
+ display: flex;
9
+ gap: 1rem;
10
+ }
@@ -3,6 +3,7 @@
3
3
  @use "./components/buttons.scss";
4
4
  @use "./components/links.scss";
5
5
  @use "./components/icons.scss";
6
+ @use "./components/dialogs.scss";
6
7
  // @use "./components/borders.scss";
7
8
  @use "./components/strapi-html.scss";
8
9
  @use "./tilde-fonts.scss";