@elderbyte/ngx-starter 19.1.26 → 19.2.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 (36) hide show
  1. package/fesm2022/elderbyte-ngx-starter.mjs +2238 -1875
  2. package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
  3. package/lib/common/selection/selection-model.d.ts +3 -0
  4. package/lib/components/data-view/base/elder-data-view-base.d.ts +22 -42
  5. package/lib/components/data-view/base/elder-data-view.d.ts +7 -3
  6. package/lib/components/data-view/common/activation/data-view-activation-controller.service.d.ts +69 -0
  7. package/lib/components/data-view/common/activation/elder-activation-options.d.ts +16 -0
  8. package/lib/components/data-view/common/activation/model/activation-model.d.ts +49 -0
  9. package/lib/components/data-view/common/activation/public_api.d.ts +6 -0
  10. package/lib/components/data-view/common/elder-data-common.module.d.ts +0 -9
  11. package/lib/components/data-view/common/public_api.d.ts +11 -0
  12. package/lib/components/data-view/common/selection/data-context-selection.directive.d.ts +2 -2
  13. package/lib/components/data-view/common/selection/elder-selection-master-checkbox/elder-selection-master-checkbox.component.d.ts +5 -9
  14. package/lib/components/data-view/grid/activation/elder-grid-activation.directive.d.ts +46 -0
  15. package/lib/components/data-view/grid/elder-grid/elder-grid.component.d.ts +9 -11
  16. package/lib/components/data-view/grid/elder-grid.module.d.ts +20 -17
  17. package/lib/components/data-view/grid/elder-tile/elder-tile.component.d.ts +53 -0
  18. package/lib/components/data-view/master-detail/elder-master-detail.service.d.ts +1 -1
  19. package/lib/components/data-view/master-detail/master-detail-activation-event.d.ts +1 -1
  20. package/lib/components/data-view/public_api.d.ts +1 -1
  21. package/lib/components/data-view/table/activation/elder-delete-active.directive.d.ts +9 -11
  22. package/lib/components/data-view/table/activation/elder-table-activation.directive.d.ts +13 -50
  23. package/lib/components/data-view/table/activation/public_api.d.ts +0 -5
  24. package/lib/components/data-view/table/elder-table/elder-table.component.d.ts +16 -15
  25. package/lib/components/data-view/table/elder-table-row.directive.d.ts +10 -8
  26. package/lib/components/i18n/entities/elder-localized-input-table/elder-localized-input-table.component.d.ts +6 -0
  27. package/lib/components/select-chip-list/chip-list-select/elder-chip-list-select.component.d.ts +18 -10
  28. package/package.json +1 -1
  29. package/src/lib/components/data-view/grid/elder-grid/elder-grid.component.scss +9 -80
  30. package/src/lib/components/data-view/grid/elder-tile/elder-tile.component.scss +110 -0
  31. package/theming/abstracts/_elder-design-tokens.scss +13 -1
  32. package/lib/components/data-view/table/activation/elder-activation-context.d.ts +0 -7
  33. package/lib/components/data-view/table/activation/elder-table-activation-options.d.ts +0 -16
  34. /package/lib/components/data-view/{table/activation → common/activation/model}/activation-event-source.d.ts +0 -0
  35. /package/lib/components/data-view/{table/activation → common/activation/model}/item-activation-event.d.ts +0 -0
  36. /package/lib/components/data-view/{table/activation → common/activation/model}/item-activation-options.d.ts +0 -0
@@ -1,4 +1,5 @@
1
1
  import { Observable } from 'rxjs';
2
+ import { Signal } from '@angular/core';
2
3
  export type KeyGetterFn<T> = (item: T) => any;
3
4
  /**
4
5
  * Provides a model of a selection.
@@ -16,6 +17,7 @@ export declare class SelectionModel<T> {
16
17
  private _multiple;
17
18
  private readonly _selectionMap;
18
19
  private readonly _selection;
20
+ private readonly _selectionSig;
19
21
  private _keyGetterFn;
20
22
  private _selectableEvaluatorFn;
21
23
  static readonly FallbackKeyGetterFn: (a: any) => any;
@@ -40,6 +42,7 @@ export declare class SelectionModel<T> {
40
42
  **************************************************************************/
41
43
  get changed(): Observable<T[]>;
42
44
  get selection(): Observable<T[]>;
45
+ get selectionSig(): Signal<T[]>;
43
46
  get selectionSnapshot(): T[];
44
47
  set selectableEvaluatorFn(fn: (item: T) => boolean);
45
48
  set keyGetterFn(fn: KeyGetterFn<T>);
@@ -1,13 +1,14 @@
1
1
  import { BooleanInput } from '@angular/cdk/coercion';
2
- import { OnDestroy, OnInit } from '@angular/core';
3
- import { BehaviorSubject, Observable, Subject } from 'rxjs';
2
+ import { OnDestroy, OnInit, Signal } from '@angular/core';
3
+ import { Observable, Subject } from 'rxjs';
4
4
  import { IDataContext, IDataContextActivePage, IDataContextContinuable } from '../../../common/data/data-context/data-context';
5
5
  import { SelectionModel } from '../../../common/selection/selection-model';
6
6
  import { ElderDataViewInteractionMode, IElderDataView } from './elder-data-view';
7
7
  import { ElderDataViewOptionsProvider } from './elder-data-view-options-provider';
8
- import { MatCardAppearance } from '@angular/material/card';
8
+ import { DataContextStatus } from '../../../common/data/data-context/data-context-status';
9
+ import { PageRequest } from '../../../common/data/page';
9
10
  import * as i0 from "@angular/core";
10
- export declare abstract class ElderDataViewBaseComponent implements IElderDataView, OnInit, OnDestroy {
11
+ export declare abstract class ElderDataViewBaseComponent<T = any> implements IElderDataView, OnInit, OnDestroy {
11
12
  protected readonly dataViewOptionsProvider: ElderDataViewOptionsProvider;
12
13
  /***************************************************************************
13
14
  * *
@@ -17,7 +18,7 @@ export declare abstract class ElderDataViewBaseComponent implements IElderDataVi
17
18
  /**
18
19
  * Underlying data context.
19
20
  */
20
- readonly dataContext$: BehaviorSubject<IDataContext<any>>;
21
+ private readonly _dataContext$;
21
22
  /**
22
23
  * Holds the current selection
23
24
  */
@@ -36,20 +37,16 @@ export declare abstract class ElderDataViewBaseComponent implements IElderDataVi
36
37
  * Heights are generally reduced.
37
38
  */
38
39
  private _dense;
39
- /**
40
- * @deprecated This property is no longer relevant, since we always render the elements as embedded.
41
- * The appearance of the surrounding card container.
42
- */
43
- private _appearance;
44
- /**
45
- * @deprecated This property is no longer relevant, since we always render the elements as embedded.
46
- * If true, this table is in embedded mode.
47
- * No borders / floating visible so that the table can be embedded into another container
48
- */
49
- private _embedded;
50
40
  private readonly _itemClickSubject;
51
41
  private readonly EntityIdKeyFn;
52
42
  protected readonly destroy$: Subject<void>;
43
+ readonly dc: Signal<IDataContext<T> | undefined>;
44
+ readonly dcStatus: Signal<DataContextStatus>;
45
+ readonly total: Signal<string>;
46
+ readonly canLoadMore: Signal<boolean | undefined>;
47
+ readonly viewData: Signal<T[] | undefined>;
48
+ readonly currentPage: Signal<PageRequest | undefined>;
49
+ readonly currentSelection: Signal<T[] | undefined>;
53
50
  /***************************************************************************
54
51
  * *
55
52
  * Constructor *
@@ -68,6 +65,7 @@ export declare abstract class ElderDataViewBaseComponent implements IElderDataVi
68
65
  * Properties *
69
66
  * *
70
67
  **************************************************************************/
68
+ get dataContext$(): Observable<IDataContext<any>>;
71
69
  get dataContext(): IDataContext<any>;
72
70
  set dataContext(data: IDataContext<any>);
73
71
  get dataActivePaged(): IDataContextActivePage<any>;
@@ -99,26 +97,6 @@ export declare abstract class ElderDataViewBaseComponent implements IElderDataVi
99
97
  **************************************************************************/
100
98
  set dense(value: BooleanInput);
101
99
  get dense(): boolean;
102
- /**
103
- * @deprecated Switch to appearance="raised"
104
- */
105
- set float(value: BooleanInput);
106
- /**
107
- * @deprecated , since we always render the elements as embedded.
108
- */
109
- set appearance(value: MatCardAppearance);
110
- /**
111
- * @deprecated , since we always render the elements as embedded.
112
- */
113
- get appearance(): MatCardAppearance;
114
- /**
115
- * @deprecated , since we always render the elements as embedded.
116
- */
117
- set embedded(value: boolean | '');
118
- /**
119
- * @deprecated , since we always render the elements as embedded.
120
- */
121
- get embedded(): boolean | '';
122
100
  /***************************************************************************
123
101
  * *
124
102
  * Event Entry Points *
@@ -130,19 +108,21 @@ export declare abstract class ElderDataViewBaseComponent implements IElderDataVi
130
108
  * @param data
131
109
  * @protected
132
110
  */
133
- protected onDataContextSet(data: IDataContext<any>): void;
134
- onItemClick(entity: any): void;
135
- onItemDoubleClick(entity: any): void;
136
- getId(entity: any): any;
111
+ protected onDataContextSet(data: IDataContext<T>): void;
112
+ onItemClick(entity: T): void;
113
+ onItemDoubleClick(entity: T): void;
114
+ getId(entity: T): any;
115
+ abstract hasItemFocus(item: T): boolean;
137
116
  /***************************************************************************
138
117
  * *
139
118
  * Private Methods *
140
119
  * *
141
120
  **************************************************************************/
121
+ private canLoadMoreObs;
142
122
  /**
143
123
  * Performs clean up of the current data context if auto clean up is enabled.
144
124
  */
145
125
  protected autoCleanUp(): void;
146
- static ɵfac: i0.ɵɵFactoryDeclaration<ElderDataViewBaseComponent, never>;
147
- static ɵdir: i0.ɵɵDirectiveDeclaration<ElderDataViewBaseComponent, never, never, { "interactionMode": { "alias": "interactionMode"; "required": false; }; "cleanUp": { "alias": "cleanUp"; "required": false; }; "selectableEvaluatorFn": { "alias": "selectableEvaluatorFn"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "selectionMultiEnabled": { "alias": "selectionMultiEnabled"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; "float": { "alias": "float"; "required": false; }; "appearance": { "alias": "appearance"; "required": false; }; "embedded": { "alias": "embedded"; "required": false; }; }, { "selectionChange": "selectionChange"; "selectionSingleChange": "selectionSingleChange"; "itemClick": "itemClick"; }, never, never, true, never>;
126
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElderDataViewBaseComponent<any>, never>;
127
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ElderDataViewBaseComponent<any>, never, never, { "interactionMode": { "alias": "interactionMode"; "required": false; }; "cleanUp": { "alias": "cleanUp"; "required": false; }; "selectableEvaluatorFn": { "alias": "selectableEvaluatorFn"; "required": false; }; "selection": { "alias": "selection"; "required": false; }; "selectionMultiEnabled": { "alias": "selectionMultiEnabled"; "required": false; }; "dense": { "alias": "dense"; "required": false; }; }, { "selectionChange": "selectionChange"; "selectionSingleChange": "selectionSingleChange"; "itemClick": "itemClick"; }, never, never, true, never>;
148
128
  }
@@ -1,7 +1,11 @@
1
1
  import { SelectionModel } from '../../../common/selection/selection-model';
2
2
  import { InjectionToken } from '@angular/core';
3
- export declare const ELDER_DATA_VIEW: InjectionToken<IElderDataView>;
3
+ import { Observable } from 'rxjs';
4
+ import { IDataContext } from '../../../common/data/data-context/data-context';
5
+ export declare const ELDER_DATA_VIEW: InjectionToken<IElderDataView<any>>;
4
6
  export { ElderDataViewInteractionMode } from '../elder-data-view-interaction-mode';
5
- export interface IElderDataView {
6
- readonly selectionModel: SelectionModel<any>;
7
+ export interface IElderDataView<T = any> {
8
+ readonly selectionModel: SelectionModel<T>;
9
+ readonly dataContext$: Observable<IDataContext<T>>;
10
+ hasItemFocus(item: T): boolean;
7
11
  }
@@ -0,0 +1,69 @@
1
+ import { IElderDataView } from '../../base/elder-data-view';
2
+ import { ActivationModel } from './model/activation-model';
3
+ import { ElderActivationOptions } from './elder-activation-options';
4
+ import { ItemActivationOptions } from './model/item-activation-options';
5
+ import { NoInputArgs } from '../../../../common/utils/input-utils';
6
+ import * as i0 from "@angular/core";
7
+ export declare class DataViewActivationController<T> {
8
+ private readonly activationModel;
9
+ /***************************************************************************
10
+ * *
11
+ * Fields *
12
+ * *
13
+ **************************************************************************/
14
+ private dataSource$;
15
+ private dataInView$;
16
+ private options;
17
+ /***************************************************************************
18
+ * *
19
+ * Constructor *
20
+ * *
21
+ **************************************************************************/
22
+ constructor(dataView: IElderDataView, activationModel: ActivationModel<T>);
23
+ private bindToViewData;
24
+ /***************************************************************************
25
+ * *
26
+ * Public Activation API *
27
+ * *
28
+ **************************************************************************/
29
+ activationOptions(options: ElderActivationOptions | NoInputArgs): void;
30
+ activateAndFocus(item: T): void;
31
+ activate(item: T, options: ItemActivationOptions): void;
32
+ /***************************************************************************
33
+ * *
34
+ * Public Data API *
35
+ * *
36
+ **************************************************************************/
37
+ nextCloseTo(active: T): T;
38
+ previousDataItem(): T;
39
+ nextDataItem(): T;
40
+ isItemActive(item: T): boolean;
41
+ hasItemFocus(item: T): boolean;
42
+ /***************************************************************************
43
+ * *
44
+ * Properties *
45
+ * *
46
+ **************************************************************************/
47
+ private get data();
48
+ get activeItem(): T;
49
+ /***************************************************************************
50
+ * *
51
+ * Private methods *
52
+ * *
53
+ **************************************************************************/
54
+ private previousDataItemInternal;
55
+ private nextDataItemInternal;
56
+ private handleAutoActivations;
57
+ private autoActivateItem;
58
+ private deactivateById;
59
+ private get hasActiveItem();
60
+ private activateFirst;
61
+ private activateLast;
62
+ private getCurrentIndex;
63
+ private getItemAtIndex;
64
+ private findItemIndex;
65
+ private itemEqualsId;
66
+ private getId;
67
+ static ɵfac: i0.ɵɵFactoryDeclaration<DataViewActivationController<any>, never>;
68
+ static ɵprov: i0.ɵɵInjectableDeclaration<DataViewActivationController<any>>;
69
+ }
@@ -0,0 +1,16 @@
1
+ export type ElderAutoActivationMode = 'never' | 'once' | 'always';
2
+ export type ElderAutoActivateItem = 'first' | 'last';
3
+ export interface ElderActivationOptions {
4
+ /**
5
+ * After reaching the last element, start over at the first?
6
+ */
7
+ loop?: boolean;
8
+ /**
9
+ * Attempt to activate an item when the rows change.
10
+ */
11
+ autoActivation?: ElderAutoActivationMode;
12
+ /**
13
+ * Activate the specified item, if no other item is currently activated.
14
+ */
15
+ autoActivateItem?: ElderAutoActivateItem;
16
+ }
@@ -0,0 +1,49 @@
1
+ import { Observable } from 'rxjs';
2
+ import { ItemActivationEvent } from './item-activation-event';
3
+ import { ItemActivationOptions } from './item-activation-options';
4
+ import { IElderDataView } from '../../../base/elder-data-view';
5
+ import * as i0 from "@angular/core";
6
+ export declare class ActivationModel<T = any> {
7
+ private readonly dataView;
8
+ /***************************************************************************
9
+ * *
10
+ * Fields *
11
+ * *
12
+ **************************************************************************/
13
+ private readonly log;
14
+ private readonly itemActivationEventSubject;
15
+ private readonly _activeItem$;
16
+ private dataSource$;
17
+ /***************************************************************************
18
+ * *
19
+ * Constructor *
20
+ * *
21
+ **************************************************************************/
22
+ constructor(dataView: IElderDataView);
23
+ /***************************************************************************
24
+ * *
25
+ * Properties *
26
+ * *
27
+ **************************************************************************/
28
+ get itemActivationEvents(): Observable<ItemActivationEvent<T>>;
29
+ get activeItem$(): Observable<T>;
30
+ get activeItem(): T;
31
+ /***************************************************************************
32
+ * *
33
+ * Public API *
34
+ * *
35
+ **************************************************************************/
36
+ activate(item: T, options: ItemActivationOptions): void;
37
+ isItemActive(item: T): boolean;
38
+ hasItemFocus(item: T): boolean;
39
+ /***************************************************************************
40
+ * *
41
+ * Private methods *
42
+ * *
43
+ **************************************************************************/
44
+ private updateActiveItem;
45
+ private itemEquals;
46
+ private getId;
47
+ static ɵfac: i0.ɵɵFactoryDeclaration<ActivationModel<any>, never>;
48
+ static ɵprov: i0.ɵɵInjectableDeclaration<ActivationModel<any>>;
49
+ }
@@ -0,0 +1,6 @@
1
+ export * from './model/activation-event-source';
2
+ export * from './model/item-activation-event';
3
+ export * from './model/item-activation-options';
4
+ export * from './model/activation-model';
5
+ export * from './elder-activation-options';
6
+ export * from './data-view-activation-controller.service';
@@ -19,15 +19,6 @@ import * as i17 from "./composite-sort/composite-sort-dc.directive";
19
19
  import * as i18 from "./selection/elder-selection-master-checkbox/elder-selection-master-checkbox.component";
20
20
  import * as i19 from "./selection/data-context-selection.directive";
21
21
  import * as i20 from "./data-context-state-indicator/data-context-state-indicator.component";
22
- export { ElderSingleSortComponent } from './elder-single-sort/elder-single-sort.component';
23
- export { ElderCompositeSortComponent } from './composite-sort/elder-composite-sort/elder-composite-sort.component';
24
- export { ElderCompositeSortDcDirective } from './composite-sort/composite-sort-dc.directive';
25
- export { CompositeSort } from './composite-sort/composite-sort';
26
- export { ElderDataToolbarComponent, ElderToolbarContentDirective, ElderToolbarContentSlot, } from './elder-data-toolbar/elder-data-toolbar.component';
27
- export { ElderSelectionMasterCheckboxComponent } from './selection/elder-selection-master-checkbox/elder-selection-master-checkbox.component';
28
- export { MasterSelectionState } from './selection/master-selection-state';
29
- export { DataContextSelectionDirective } from './selection/data-context-selection.directive';
30
- export { DataContextStateIndicatorComponent } from './data-context-state-indicator/data-context-state-indicator.component';
31
22
  export declare class ElderDataCommonModule {
32
23
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderDataCommonModule, never>;
33
24
  static ɵmod: i0.ɵɵNgModuleDeclaration<ElderDataCommonModule, never, [typeof i1.CommonModule, typeof i2.RouterModule, typeof i3.MatDividerModule, typeof i4.MatCheckboxModule, typeof i5.MatMenuModule, typeof i6.MatButtonModule, typeof i7.MatIconModule, typeof i8.MatBadgeModule, typeof i9.MatProgressBarModule, typeof i10.MatDialogModule, typeof i11.MatTooltipModule, typeof i12.TranslateModule, typeof i13.ElderBadgeModule, typeof i14.ElderDataToolbarComponent, typeof i14.ElderToolbarContentDirective, typeof i15.ElderSingleSortComponent, typeof i16.ElderCompositeSortComponent, typeof i17.ElderCompositeSortDcDirective, typeof i18.ElderSelectionMasterCheckboxComponent, typeof i19.DataContextSelectionDirective, typeof i20.DataContextStateIndicatorComponent], [typeof i14.ElderDataToolbarComponent, typeof i14.ElderToolbarContentDirective, typeof i15.ElderSingleSortComponent, typeof i16.ElderCompositeSortComponent, typeof i17.ElderCompositeSortDcDirective, typeof i18.ElderSelectionMasterCheckboxComponent, typeof i19.DataContextSelectionDirective, typeof i20.DataContextStateIndicatorComponent]>;
@@ -0,0 +1,11 @@
1
+ export { ElderSingleSortComponent } from './elder-single-sort/elder-single-sort.component';
2
+ export { ElderCompositeSortComponent } from './composite-sort/elder-composite-sort/elder-composite-sort.component';
3
+ export { ElderCompositeSortDcDirective } from './composite-sort/composite-sort-dc.directive';
4
+ export { CompositeSort } from './composite-sort/composite-sort';
5
+ export { ElderDataToolbarComponent, ElderToolbarContentDirective, ElderToolbarContentSlot, } from './elder-data-toolbar/elder-data-toolbar.component';
6
+ export { ElderSelectionMasterCheckboxComponent } from './selection/elder-selection-master-checkbox/elder-selection-master-checkbox.component';
7
+ export { MasterSelectionState } from './selection/master-selection-state';
8
+ export { DataContextSelectionDirective } from './selection/data-context-selection.directive';
9
+ export { DataContextStateIndicatorComponent } from './data-context-state-indicator/data-context-state-indicator.component';
10
+ export * from './activation/public_api';
11
+ export { ElderDataCommonModule } from './elder-data-common.module';
@@ -1,5 +1,5 @@
1
+ import { Signal } from '@angular/core';
1
2
  import { SelectionModel } from '../../../../common/selection/selection-model';
2
- import { Observable } from 'rxjs';
3
3
  import { IDataContext } from '../../../../common/data/data-context/data-context';
4
4
  import { MasterSelectionState } from './master-selection-state';
5
5
  import * as i0 from "@angular/core";
@@ -12,7 +12,7 @@ export declare class DataContextSelectionDirective {
12
12
  private readonly log;
13
13
  private readonly selectionModel$;
14
14
  private readonly dataContext$;
15
- readonly selectionState$: Observable<MasterSelectionState>;
15
+ readonly selectionState: Signal<MasterSelectionState>;
16
16
  /***************************************************************************
17
17
  * *
18
18
  * Constructor *
@@ -1,26 +1,22 @@
1
- import { OnInit } from '@angular/core';
1
+ import { Signal } from '@angular/core';
2
2
  import { DataContextSelectionDirective } from '../data-context-selection.directive';
3
+ import { MasterSelectionState } from '../master-selection-state';
3
4
  import * as i0 from "@angular/core";
4
- export declare class ElderSelectionMasterCheckboxComponent implements OnInit {
5
+ export declare class ElderSelectionMasterCheckboxComponent {
5
6
  readonly dataContextSelection: DataContextSelectionDirective;
6
7
  /***************************************************************************
7
8
  * *
8
9
  * Fields *
9
10
  * *
10
11
  **************************************************************************/
11
- private readonly logger;
12
+ private readonly log;
13
+ readonly selectionState: Signal<MasterSelectionState | undefined>;
12
14
  /***************************************************************************
13
15
  * *
14
16
  * Constructor *
15
17
  * *
16
18
  **************************************************************************/
17
19
  constructor(dataContextSelection: DataContextSelectionDirective);
18
- /***************************************************************************
19
- * *
20
- * Life Cycle *
21
- * *
22
- **************************************************************************/
23
- ngOnInit(): void;
24
20
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderSelectionMasterCheckboxComponent, never>;
25
21
  static ɵcmp: i0.ɵɵComponentDeclaration<ElderSelectionMasterCheckboxComponent, "elder-selection-master-checkbox", never, {}, {}, never, never, true, never>;
26
22
  }
@@ -0,0 +1,46 @@
1
+ import { DestroyRef } from '@angular/core';
2
+ import { ActivationModel } from '../../common/activation/model/activation-model';
3
+ import { DataViewActivationController } from '../../common/activation/data-view-activation-controller.service';
4
+ import { ElderGridComponent } from '../elder-grid/elder-grid.component';
5
+ import { ElderActivationOptions } from '../../common/activation/elder-activation-options';
6
+ import { NoInputArgs } from '../../../../common/utils/input-utils';
7
+ import { Observable } from 'rxjs';
8
+ import { ItemActivationEvent } from '../../common/activation/model/item-activation-event';
9
+ import { ItemActivationOptions } from '../../common/activation/model/item-activation-options';
10
+ import * as i0 from "@angular/core";
11
+ export declare class ElderGridActivationDirective<T = any> {
12
+ private readonly elderGrid;
13
+ private readonly destroyRef;
14
+ private readonly activationModel;
15
+ readonly controller: DataViewActivationController<T>;
16
+ /***************************************************************************
17
+ * *
18
+ * Constructor *
19
+ * *
20
+ **************************************************************************/
21
+ constructor(elderGrid: ElderGridComponent, destroyRef: DestroyRef, activationModel: ActivationModel<T>, controller: DataViewActivationController<T>);
22
+ /***************************************************************************
23
+ * *.
24
+ * Host Listeners *
25
+ * *
26
+ **************************************************************************/
27
+ onKeydown(event: KeyboardEvent): void;
28
+ /***************************************************************************
29
+ * *
30
+ * Properties *
31
+ * *
32
+ **************************************************************************/
33
+ set activationOptions(options: ElderActivationOptions | NoInputArgs);
34
+ get activeItemEventChange(): Observable<ItemActivationEvent<T>>;
35
+ get activeItemChange(): Observable<T>;
36
+ get activeItem(): T;
37
+ set activeItem(item: T);
38
+ /***************************************************************************
39
+ * *
40
+ * Public API *
41
+ * *
42
+ **************************************************************************/
43
+ activate(item: T, options: ItemActivationOptions): void;
44
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElderGridActivationDirective<any>, never>;
45
+ static ɵdir: i0.ɵɵDirectiveDeclaration<ElderGridActivationDirective<any>, "[elderGridActivation]", never, { "activationOptions": { "alias": "elderTableActivation"; "required": false; }; "activeItem": { "alias": "activeItem"; "required": false; }; }, { "activeItemEventChange": "activeItemEventChange"; "activeItemChange": "activeItemChange"; }, never, never, true, never>;
46
+ }
@@ -1,4 +1,4 @@
1
- import { AfterViewInit, OnInit, TemplateRef, TrackByFunction, ViewContainerRef } from '@angular/core';
1
+ import { AfterViewInit, OnInit, Signal, TemplateRef, TrackByFunction, ViewContainerRef } from '@angular/core';
2
2
  import { Observable } from 'rxjs';
3
3
  import { IDataContext, IDataContextContinuable } from '../../../../common/data/data-context/data-context';
4
4
  import { CdkVirtualScrollViewport } from '@angular/cdk/scrolling';
@@ -8,6 +8,7 @@ import { MatPaginator } from '@angular/material/paginator';
8
8
  import { ElderDataViewOptionsProvider } from '../../base/elder-data-view-options-provider';
9
9
  import { BreakpointObserver } from '@angular/cdk/layout';
10
10
  import { CompositeSort } from '../../common/composite-sort/composite-sort';
11
+ import { ElderTileComponent } from '../elder-tile/elder-tile.component';
11
12
  import * as i0 from "@angular/core";
12
13
  declare class GridRow<T> {
13
14
  readonly id: string;
@@ -31,7 +32,7 @@ export declare class ElderGridToolbarDirective {
31
32
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderGridToolbarDirective, never>;
32
33
  static ɵdir: i0.ɵɵDirectiveDeclaration<ElderGridToolbarDirective, "[elderGridToolbar]", never, {}, {}, never, never, true, never>;
33
34
  }
34
- export declare class ElderGridComponent<T = any> extends ElderDataViewBaseComponent implements OnInit, AfterViewInit {
35
+ export declare class ElderGridComponent<T = any> extends ElderDataViewBaseComponent<T> implements OnInit, AfterViewInit {
35
36
  private breakpointObserver;
36
37
  /***************************************************************************
37
38
  * *
@@ -48,23 +49,19 @@ export declare class ElderGridComponent<T = any> extends ElderDataViewBaseCompon
48
49
  readonly scrollContainerId: string;
49
50
  readonly TrackGridRowByIdFn: TrackByFunction<GridRow<T>>;
50
51
  dataRows$: Observable<GridRow<T>[]>;
51
- canLoadMore$: Observable<boolean>;
52
- total$: Observable<string>;
53
52
  tileTemplateQuery: TemplateRef<any>;
54
53
  private _tileTemplate;
55
54
  toolbarVisible: boolean;
56
55
  footerVisible: boolean;
57
56
  itemHeight: number;
57
+ readonly tileOutlined: import("@angular/core").InputSignalWithTransform<boolean, import("@angular/cdk/coercion").BooleanInput>;
58
58
  responsiveColumnCount: boolean;
59
59
  virtualScrollViewPort: CdkVirtualScrollViewport;
60
+ readonly tiles: Signal<readonly ElderTileComponent<any>[]>;
60
61
  availableCompositeSorts: CompositeSort[];
61
62
  set availableSorts(availableSorts: string[] | CompositeSort[]);
62
63
  sortTranslationPrefix: string;
63
64
  hiddenField: string;
64
- /**
65
- * @deprecated No longer required. Id is automatically picked from the DataSource.
66
- */
67
- idField: string;
68
65
  selectionVisible: boolean;
69
66
  pageSizeOptions: number[];
70
67
  matPaginator: MatPaginator;
@@ -101,9 +98,9 @@ export declare class ElderGridComponent<T = any> extends ElderDataViewBaseCompon
101
98
  * Public API *
102
99
  * *
103
100
  **************************************************************************/
104
- inSelectionMode(currentSelection: any[]): boolean;
105
101
  requestMoreDataZoned(event: unknown): void;
106
- showTile(tile: any): boolean;
102
+ isTileVisible(tile: any): boolean;
103
+ hasItemFocus(item: T): boolean;
107
104
  /***************************************************************************
108
105
  * *
109
106
  * Private Methods *
@@ -114,7 +111,8 @@ export declare class ElderGridComponent<T = any> extends ElderDataViewBaseCompon
114
111
  private rowId;
115
112
  private responsiveColumn;
116
113
  private activeColumnCount;
114
+ private getTileForItem;
117
115
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderGridComponent<any>, [{ optional: true; }, { optional: true; skipSelf: true; }, null]>;
118
- static ɵcmp: i0.ɵɵComponentDeclaration<ElderGridComponent<any>, "elder-grid", never, { "toolbarVisible": { "alias": "toolbarVisible"; "required": false; }; "footerVisible": { "alias": "footerVisible"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; "responsiveColumnCount": { "alias": "responsiveColumnCount"; "required": false; }; "availableSorts": { "alias": "availableSorts"; "required": false; }; "sortTranslationPrefix": { "alias": "sortTranslationPrefix"; "required": false; }; "hiddenField": { "alias": "hiddenField"; "required": false; }; "idField": { "alias": "idField"; "required": false; }; "selectionVisible": { "alias": "selectionVisible"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "tileTemplate": { "alias": "tileTemplate"; "required": false; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; }; "data": { "alias": "data"; "required": false; }; "columnCount": { "alias": "columnCount"; "required": false; }; }, {}, ["tileTemplateQuery", "toolbarTemplateQuery"], never, true, never>;
116
+ static ɵcmp: i0.ɵɵComponentDeclaration<ElderGridComponent<any>, "elder-grid", never, { "toolbarVisible": { "alias": "toolbarVisible"; "required": false; }; "footerVisible": { "alias": "footerVisible"; "required": false; }; "itemHeight": { "alias": "itemHeight"; "required": false; }; "tileOutlined": { "alias": "tileOutlined"; "required": false; "isSignal": true; }; "responsiveColumnCount": { "alias": "responsiveColumnCount"; "required": false; }; "availableSorts": { "alias": "availableSorts"; "required": false; }; "sortTranslationPrefix": { "alias": "sortTranslationPrefix"; "required": false; }; "hiddenField": { "alias": "hiddenField"; "required": false; }; "selectionVisible": { "alias": "selectionVisible"; "required": false; }; "pageSizeOptions": { "alias": "pageSizeOptions"; "required": false; }; "tileTemplate": { "alias": "tileTemplate"; "required": false; }; "toolbarTemplate": { "alias": "toolbarTemplate"; "required": false; }; "data": { "alias": "data"; "required": false; }; "columnCount": { "alias": "columnCount"; "required": false; }; }, {}, ["tileTemplateQuery", "toolbarTemplateQuery"], never, true, never>;
119
117
  }
120
118
  export {};
@@ -1,25 +1,28 @@
1
1
  import * as i0 from "@angular/core";
2
2
  import * as i1 from "@angular/common";
3
- import * as i2 from "@angular/material/core";
4
- import * as i3 from "@angular/material/progress-bar";
5
- import * as i4 from "@angular/material/menu";
6
- import * as i5 from "@angular/cdk/a11y";
7
- import * as i6 from "@angular/material/divider";
8
- import * as i7 from "@angular/material/icon";
9
- import * as i8 from "@angular/material/button";
10
- import * as i9 from "@angular/material/select";
11
- import * as i10 from "@angular/cdk/drag-drop";
12
- import * as i11 from "@angular/cdk/scrolling";
13
- import * as i12 from "@ngx-translate/core";
14
- import * as i13 from "../common/elder-data-common.module";
15
- import * as i14 from "../../infinitescroll/elder-infinite-scroll.module";
16
- import * as i15 from "../../forms/directives/elder-forms-directives.module";
17
- import * as i16 from "@angular/material/paginator";
18
- import * as i17 from "@angular/material/card";
3
+ import * as i2 from "@angular/material/progress-bar";
4
+ import * as i3 from "@angular/material/menu";
5
+ import * as i4 from "@angular/cdk/a11y";
6
+ import * as i5 from "@angular/material/divider";
7
+ import * as i6 from "@angular/material/icon";
8
+ import * as i7 from "@angular/material/button";
9
+ import * as i8 from "@angular/material/select";
10
+ import * as i9 from "@angular/cdk/drag-drop";
11
+ import * as i10 from "@angular/cdk/scrolling";
12
+ import * as i11 from "@ngx-translate/core";
13
+ import * as i12 from "../common/elder-data-common.module";
14
+ import * as i13 from "../../infinitescroll/elder-infinite-scroll.module";
15
+ import * as i14 from "../../forms/directives/elder-forms-directives.module";
16
+ import * as i15 from "@angular/material/paginator";
17
+ import * as i16 from "@angular/material/card";
18
+ import * as i17 from "./elder-tile/elder-tile.component";
19
19
  import * as i18 from "./elder-grid/elder-grid.component";
20
+ import * as i19 from "./activation/elder-grid-activation.directive";
20
21
  export { ElderGridTileDirective, ElderGridToolbarDirective, ElderGridComponent, } from './elder-grid/elder-grid.component';
22
+ export { ElderTileComponent } from './elder-tile/elder-tile.component';
23
+ export { ElderGridActivationDirective } from './activation/elder-grid-activation.directive';
21
24
  export declare class ElderGridModule {
22
25
  static ɵfac: i0.ɵɵFactoryDeclaration<ElderGridModule, never>;
23
- static ɵmod: i0.ɵɵNgModuleDeclaration<ElderGridModule, never, [typeof i1.CommonModule, typeof i2.MatCommonModule, typeof i3.MatProgressBarModule, typeof i4.MatMenuModule, typeof i5.A11yModule, typeof i6.MatDividerModule, typeof i7.MatIconModule, typeof i8.MatButtonModule, typeof i9.MatSelectModule, typeof i10.DragDropModule, typeof i11.ScrollingModule, typeof i12.TranslateModule, typeof i13.ElderDataCommonModule, typeof i14.ElderInfiniteScrollModule, typeof i15.ElderFormsDirectivesModule, typeof i16.MatPaginatorModule, typeof i17.MatCardModule, typeof i18.ElderGridComponent, typeof i18.ElderGridTileDirective, typeof i18.ElderGridToolbarDirective], [typeof i18.ElderGridComponent, typeof i18.ElderGridTileDirective, typeof i18.ElderGridToolbarDirective]>;
26
+ static ɵmod: i0.ɵɵNgModuleDeclaration<ElderGridModule, never, [typeof i1.CommonModule, typeof i2.MatProgressBarModule, typeof i3.MatMenuModule, typeof i4.A11yModule, typeof i5.MatDividerModule, typeof i6.MatIconModule, typeof i7.MatButtonModule, typeof i8.MatSelectModule, typeof i9.DragDropModule, typeof i10.ScrollingModule, typeof i11.TranslateModule, typeof i12.ElderDataCommonModule, typeof i13.ElderInfiniteScrollModule, typeof i14.ElderFormsDirectivesModule, typeof i15.MatPaginatorModule, typeof i16.MatCardModule, typeof i17.ElderTileComponent, typeof i18.ElderGridComponent, typeof i18.ElderGridTileDirective, typeof i18.ElderGridToolbarDirective, typeof i19.ElderGridActivationDirective], [typeof i17.ElderTileComponent, typeof i18.ElderGridComponent, typeof i18.ElderGridTileDirective, typeof i18.ElderGridToolbarDirective, typeof i19.ElderGridActivationDirective]>;
24
27
  static ɵinj: i0.ɵɵInjectorDeclaration<ElderGridModule>;
25
28
  }
@@ -0,0 +1,53 @@
1
+ import { ElementRef, Signal } from '@angular/core';
2
+ import { BooleanInput } from '@angular/cdk/coercion';
3
+ import { SelectionModel } from '../../../../common/selection/selection-model';
4
+ import { ElderDataViewInteractionMode } from '../../elder-data-view-interaction-mode';
5
+ import { ActivationModel } from '../../common/activation/model/activation-model';
6
+ import * as i0 from "@angular/core";
7
+ export declare class ElderTileComponent<T = any> {
8
+ private readonly activationModel;
9
+ /***************************************************************************
10
+ * *
11
+ * Fields *
12
+ * *
13
+ **************************************************************************/
14
+ readonly value: import("@angular/core").InputSignal<T>;
15
+ readonly selectionEnabled: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
16
+ readonly selectionModel: import("@angular/core").InputSignal<SelectionModel<T>>;
17
+ readonly interactionMode: import("@angular/core").InputSignal<ElderDataViewInteractionMode>;
18
+ readonly outlined: import("@angular/core").InputSignalWithTransform<boolean, BooleanInput>;
19
+ private readonly logger;
20
+ private readonly _activated;
21
+ private readonly _focused;
22
+ readonly focusable: boolean;
23
+ readonly elderTileRef: Signal<ElementRef<any>>;
24
+ /***************************************************************************
25
+ * *
26
+ * Constructor *
27
+ * *
28
+ **************************************************************************/
29
+ constructor(activationModel: ActivationModel);
30
+ private handleActivationEvent;
31
+ private isItemActive;
32
+ private updateTileActivation;
33
+ /***************************************************************************
34
+ * *
35
+ * Host Listener *
36
+ * *
37
+ **************************************************************************/
38
+ onFocus(event: any): void;
39
+ onBlur(event: any): void;
40
+ onClick(): void;
41
+ get activated(): Signal<boolean>;
42
+ get hasFocus(): boolean;
43
+ /***************************************************************************
44
+ * *
45
+ * Public API *
46
+ * *
47
+ **************************************************************************/
48
+ inSelectionMode(currentSelection: any[]): boolean;
49
+ bringToView(): void;
50
+ focus(): void;
51
+ static ɵfac: i0.ɵɵFactoryDeclaration<ElderTileComponent<any>, [{ optional: true; }]>;
52
+ static ɵcmp: i0.ɵɵComponentDeclaration<ElderTileComponent<any>, "elder-tile", never, { "value": { "alias": "value"; "required": true; "isSignal": true; }; "selectionEnabled": { "alias": "selectionEnabled"; "required": false; "isSignal": true; }; "selectionModel": { "alias": "selectionModel"; "required": false; "isSignal": true; }; "interactionMode": { "alias": "interactionMode"; "required": false; "isSignal": true; }; "outlined": { "alias": "outlined"; "required": false; "isSignal": true; }; }, {}, never, ["*"], true, never>;
53
+ }
@@ -2,7 +2,7 @@ import { OnDestroy } from '@angular/core';
2
2
  import { BehaviorSubject, Observable, Subject } from 'rxjs';
3
3
  import { ElderMasterDetailMode } from './elder-master-detail-mode';
4
4
  import { MasterDetailActivationEvent } from './master-detail-activation-event';
5
- import { ActivationEventSource } from '../table/activation/activation-event-source';
5
+ import { ActivationEventSource } from '../common/activation/model/activation-event-source';
6
6
  import * as i0 from "@angular/core";
7
7
  export interface IMasterDetailActivationOptions {
8
8
  source: ActivationEventSource;