@elderbyte/ngx-starter 15.17.3 → 15.18.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.
- package/esm2020/lib/components/data-view/common/data-context-state-indicator/data-context-state-indicator.component.mjs +2 -2
- package/esm2020/lib/components/data-view/master-detail/elder-detail-dialog/elder-detail-dialog.component.mjs +6 -6
- package/esm2020/lib/components/data-view/master-detail/elder-detail.directive.mjs +8 -6
- package/esm2020/lib/components/data-view/master-detail/elder-master-activation.directive.mjs +26 -11
- package/esm2020/lib/components/data-view/master-detail/elder-master-detail-activation-event.mjs +12 -0
- package/esm2020/lib/components/data-view/master-detail/elder-master-detail-provider.mjs +7 -7
- package/esm2020/lib/components/data-view/master-detail/elder-master-detail.component.mjs +8 -8
- package/esm2020/lib/components/data-view/master-detail/elder-master-detail.module.mjs +3 -2
- package/esm2020/lib/components/data-view/master-detail/elder-master-detail.service.mjs +73 -0
- package/esm2020/lib/components/data-view/table/activation/activation-event-source.mjs +7 -0
- package/esm2020/lib/components/data-view/table/activation/active-item-event.mjs +9 -0
- package/esm2020/lib/components/data-view/table/activation/elder-activation-context.mjs +2 -0
- package/esm2020/lib/components/data-view/table/activation/elder-delete-active.directive.mjs +3 -3
- package/esm2020/lib/components/data-view/table/activation/elder-table-activation.directive.mjs +27 -17
- package/esm2020/lib/components/data-view/table/activation/item-activation-options.mjs +7 -0
- package/esm2020/lib/components/data-view/table/activation/public_api.mjs +8 -0
- package/esm2020/lib/components/data-view/table/elder-table/elder-table.component.mjs +6 -3
- package/esm2020/lib/components/data-view/table/elder-table-row.directive.mjs +28 -15
- package/esm2020/lib/components/data-view/table/elder-table.module.mjs +6 -8
- package/fesm2015/elderbyte-ngx-starter.mjs +151 -82
- package/fesm2015/elderbyte-ngx-starter.mjs.map +1 -1
- package/fesm2020/elderbyte-ngx-starter.mjs +151 -82
- package/fesm2020/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/components/data-view/master-detail/elder-detail-dialog/elder-detail-dialog.component.d.ts +2 -2
- package/lib/components/data-view/master-detail/elder-detail.directive.d.ts +2 -2
- package/lib/components/data-view/master-detail/elder-master-activation.directive.d.ts +11 -4
- package/lib/components/data-view/master-detail/elder-master-detail-activation-event.d.ts +8 -0
- package/lib/components/data-view/master-detail/elder-master-detail-provider.d.ts +5 -5
- package/lib/components/data-view/master-detail/elder-master-detail.component.d.ts +2 -2
- package/lib/components/data-view/master-detail/elder-master-detail.module.d.ts +2 -1
- package/lib/components/data-view/master-detail/{master-detail.service.d.ts → elder-master-detail.service.d.ts} +8 -7
- package/lib/components/data-view/table/activation/activation-event-source.d.ts +5 -0
- package/lib/components/data-view/table/activation/active-item-event.d.ts +8 -0
- package/lib/components/data-view/table/activation/elder-activation-context.d.ts +7 -0
- package/lib/components/data-view/table/activation/elder-table-activation.directive.d.ts +10 -5
- package/lib/components/data-view/table/activation/item-activation-options.d.ts +6 -0
- package/lib/components/data-view/table/activation/public_api.d.ts +7 -0
- package/lib/components/data-view/table/elder-table/elder-table.component.d.ts +1 -0
- package/lib/components/data-view/table/elder-table-row.directive.d.ts +5 -5
- package/lib/components/data-view/table/elder-table.module.d.ts +5 -7
- package/package.json +1 -1
- package/src/lib/components/data-view/common/data-context-state-indicator/data-context-state-indicator.component.scss +0 -3
- package/src/lib/components/data-view/table/elder-table/elder-table.component.scss +1 -1
- package/esm2020/lib/components/data-view/master-detail/master-detail.service.mjs +0 -70
- package/esm2020/lib/components/data-view/table/activation/elder-item-activator.mjs +0 -2
- package/lib/components/data-view/table/activation/elder-item-activator.d.ts +0 -3
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { OnDestroy, TemplateRef } from '@angular/core';
|
|
2
2
|
import { MatDialogRef } from '@angular/material/dialog';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
|
-
import {
|
|
4
|
+
import { ElderMasterDetailService } from '../elder-master-detail.service';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
6
|
export interface IElderDetailDialogOptions<T = any> {
|
|
7
7
|
entity: T;
|
|
@@ -23,7 +23,7 @@ export declare class ElderDetailDialogComponent<T = any> implements OnDestroy {
|
|
|
23
23
|
* Constructor *
|
|
24
24
|
* *
|
|
25
25
|
**************************************************************************/
|
|
26
|
-
constructor(dialogRef: MatDialogRef<ElderDetailDialogComponent>, data: IElderDetailDialogOptions, masterDetailService:
|
|
26
|
+
constructor(dialogRef: MatDialogRef<ElderDetailDialogComponent>, data: IElderDetailDialogOptions, masterDetailService: ElderMasterDetailService<T>);
|
|
27
27
|
/***************************************************************************
|
|
28
28
|
* *
|
|
29
29
|
* Life Cycle *
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ElderMasterDetailService } from './elder-master-detail.service';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ElderDetailDirective<T> {
|
|
5
5
|
private masterDetailService;
|
|
@@ -17,7 +17,7 @@ export declare class ElderDetailDirective<T> {
|
|
|
17
17
|
* Constructor *
|
|
18
18
|
* *
|
|
19
19
|
**************************************************************************/
|
|
20
|
-
constructor(masterDetailService:
|
|
20
|
+
constructor(masterDetailService: ElderMasterDetailService<T>, templateRef: TemplateRef<any>, viewContainer: ViewContainerRef);
|
|
21
21
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElderDetailDirective<any>, never>;
|
|
22
22
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderDetailDirective<any>, "[elderDataDetail]", never, {}, {}, never, never, false, never>;
|
|
23
23
|
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { OnInit } from '@angular/core';
|
|
2
|
-
import {
|
|
1
|
+
import { OnDestroy, OnInit } from '@angular/core';
|
|
2
|
+
import { ElderMasterDetailService } from './elder-master-detail.service';
|
|
3
3
|
import { ElderToastService } from '../../toasts/elder-toast.service';
|
|
4
4
|
import { ElderTableActivationDirective } from '../table/activation/elder-table-activation.directive';
|
|
5
5
|
import * as i0 from "@angular/core";
|
|
6
|
-
export declare class ElderMasterActivationDirective<T> implements OnInit {
|
|
6
|
+
export declare class ElderMasterActivationDirective<T> implements OnInit, OnDestroy {
|
|
7
7
|
private toastService;
|
|
8
8
|
private tableActivation;
|
|
9
9
|
private masterDetailService;
|
|
@@ -12,19 +12,26 @@ export declare class ElderMasterActivationDirective<T> implements OnInit {
|
|
|
12
12
|
* Fields *
|
|
13
13
|
* *
|
|
14
14
|
**************************************************************************/
|
|
15
|
+
private readonly destroy$;
|
|
15
16
|
private readonly log;
|
|
16
17
|
/***************************************************************************
|
|
17
18
|
* *
|
|
18
19
|
* Constructor *
|
|
19
20
|
* *
|
|
20
21
|
**************************************************************************/
|
|
21
|
-
constructor(toastService: ElderToastService, tableActivation: ElderTableActivationDirective<T>, masterDetailService:
|
|
22
|
+
constructor(toastService: ElderToastService, tableActivation: ElderTableActivationDirective<T>, masterDetailService: ElderMasterDetailService<T>);
|
|
22
23
|
/***************************************************************************
|
|
23
24
|
* *
|
|
24
25
|
* Life Cycle *
|
|
25
26
|
* *
|
|
26
27
|
**************************************************************************/
|
|
28
|
+
ngOnDestroy(): void;
|
|
27
29
|
ngOnInit(): void;
|
|
30
|
+
/***************************************************************************
|
|
31
|
+
* *
|
|
32
|
+
* Private Methods *
|
|
33
|
+
* *
|
|
34
|
+
**************************************************************************/
|
|
28
35
|
private onModeChange;
|
|
29
36
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElderMasterActivationDirective<any>, never>;
|
|
30
37
|
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderMasterActivationDirective<any>, "[elderMasterActivation]", never, {}, {}, never, never, false, never>;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActivationEventSource } from '../table/activation/activation-event-source';
|
|
2
|
+
export declare class ElderMasterDetailActivationEvent<T> {
|
|
3
|
+
item: T;
|
|
4
|
+
creating: boolean;
|
|
5
|
+
source: ActivationEventSource;
|
|
6
|
+
deactivate: boolean;
|
|
7
|
+
constructor(item: T, creating: boolean, source: ActivationEventSource);
|
|
8
|
+
}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Provider } from '@angular/core';
|
|
2
|
-
import {
|
|
3
|
-
export declare function existingOrNewMasterDetailService(serviceProvider:
|
|
4
|
-
export declare function newMasterDetailService():
|
|
2
|
+
import { ElderMasterDetailService } from './elder-master-detail.service';
|
|
3
|
+
export declare function existingOrNewMasterDetailService(serviceProvider: ElderMasterDetailService<any> | null): ElderMasterDetailService<any>;
|
|
4
|
+
export declare function newMasterDetailService(): ElderMasterDetailService<any>;
|
|
5
5
|
export declare class ElderMasterDetailProvider<T> {
|
|
6
6
|
/**
|
|
7
|
-
* Uses the existing
|
|
8
|
-
* Otherwise, creates a new
|
|
7
|
+
* Uses the existing ElderMasterDetailService from a parent if available.
|
|
8
|
+
* Otherwise, creates a new ElderMasterDetailService and provides it.
|
|
9
9
|
*/
|
|
10
10
|
static readonly ExistingOrNewMasterDetailService: Provider;
|
|
11
11
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OnDestroy, TemplateRef, ViewContainerRef } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ElderMasterDetailService } from './elder-master-detail.service';
|
|
3
3
|
import { BehaviorSubject } from 'rxjs';
|
|
4
4
|
import { MatDialog, MatDialogRef } from '@angular/material/dialog';
|
|
5
5
|
import { ElderDetailDialogComponent } from './elder-detail-dialog/elder-detail-dialog.component';
|
|
@@ -26,7 +26,7 @@ export declare class ElderMasterDetailComponent<T> implements OnDestroy {
|
|
|
26
26
|
* Constructor *
|
|
27
27
|
* *
|
|
28
28
|
**************************************************************************/
|
|
29
|
-
constructor(masterDetailService:
|
|
29
|
+
constructor(masterDetailService: ElderMasterDetailService<T>, dialog: MatDialog, viewContainerRef: ViewContainerRef);
|
|
30
30
|
/***************************************************************************
|
|
31
31
|
* *
|
|
32
32
|
* Life Cycle *
|
|
@@ -25,7 +25,8 @@ export * from './elder-master.directive';
|
|
|
25
25
|
export * from './elder-detail.directive';
|
|
26
26
|
export * from './elder-master-activation.directive';
|
|
27
27
|
export * from './elder-master-detail-mode';
|
|
28
|
-
export * from './master-detail.service';
|
|
28
|
+
export * from './elder-master-detail.service';
|
|
29
|
+
export * from './elder-master-detail-activation-event';
|
|
29
30
|
export * from './elder-detail-dialog/elder-detail-dialog.component';
|
|
30
31
|
export * from './elder-master-detail.component';
|
|
31
32
|
export declare class ElderMasterDetailModule {
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { OnDestroy } from '@angular/core';
|
|
2
2
|
import { BehaviorSubject, Observable, Subject } from 'rxjs';
|
|
3
3
|
import { ElderMasterDetailMode } from './elder-master-detail-mode';
|
|
4
|
+
import { ActiveItemEvent } from '../table/activation/active-item-event';
|
|
5
|
+
import { ElderMasterDetailActivationEvent } from './elder-master-detail-activation-event';
|
|
4
6
|
import * as i0 from "@angular/core";
|
|
5
|
-
export declare class
|
|
7
|
+
export declare class ElderMasterDetailService<T> implements OnDestroy {
|
|
6
8
|
/***************************************************************************
|
|
7
9
|
* *
|
|
8
10
|
* Fields *
|
|
@@ -14,7 +16,7 @@ export declare class MasterDetailService<T> implements OnDestroy {
|
|
|
14
16
|
private readonly _itemActivationRequest$;
|
|
15
17
|
private readonly _activeItem$;
|
|
16
18
|
private readonly _creatingItem$;
|
|
17
|
-
private readonly
|
|
19
|
+
private readonly _activationEvent$;
|
|
18
20
|
/***************************************************************************
|
|
19
21
|
* *
|
|
20
22
|
* Constructor *
|
|
@@ -32,12 +34,11 @@ export declare class MasterDetailService<T> implements OnDestroy {
|
|
|
32
34
|
* Properties *
|
|
33
35
|
* *
|
|
34
36
|
**************************************************************************/
|
|
37
|
+
get activationEvent$(): Observable<ElderMasterDetailActivationEvent<T>>;
|
|
35
38
|
get itemActivationRequested(): Observable<T>;
|
|
36
|
-
|
|
37
|
-
get activeItem$(): Observable<T>;
|
|
38
|
-
onItemActivated(item: T): void;
|
|
39
|
+
onItemActivated(event: ActiveItemEvent<T>): void;
|
|
39
40
|
requestItemActivation(item: T): void;
|
|
40
41
|
activateCreatingItem(item: T): void;
|
|
41
|
-
static ɵfac: i0.ɵɵFactoryDeclaration<
|
|
42
|
-
static ɵprov: i0.ɵɵInjectableDeclaration<
|
|
42
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ElderMasterDetailService<any>, never>;
|
|
43
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ElderMasterDetailService<any>>;
|
|
43
44
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ActivationEventSource } from './activation-event-source';
|
|
2
|
+
export declare class ActiveItemEvent<T> {
|
|
3
|
+
readonly item: T;
|
|
4
|
+
readonly source: ActivationEventSource;
|
|
5
|
+
readonly focus: boolean;
|
|
6
|
+
readonly creating: boolean;
|
|
7
|
+
constructor(item: T, source: ActivationEventSource, focus: boolean, creating: boolean);
|
|
8
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Observable } from 'rxjs';
|
|
2
|
+
import { ActiveItemEvent } from './active-item-event';
|
|
3
|
+
import { ItemActivationOptions } from './item-activation-options';
|
|
4
|
+
export interface ElderActivationContext<T> {
|
|
5
|
+
activate(item: T, options: ItemActivationOptions): void;
|
|
6
|
+
get activeItemEventChange(): Observable<ActiveItemEvent<T>>;
|
|
7
|
+
}
|
|
@@ -3,9 +3,11 @@ import { ElderTableRowDirective } from '../elder-table-row.directive';
|
|
|
3
3
|
import { BehaviorSubject, Observable } from 'rxjs';
|
|
4
4
|
import { ElderTableComponent } from '../elder-table/elder-table.component';
|
|
5
5
|
import { ElderTableActivationOptions } from './elder-table-activation-options';
|
|
6
|
-
import {
|
|
6
|
+
import { ItemActivationOptions } from './item-activation-options';
|
|
7
|
+
import { ActiveItemEvent } from './active-item-event';
|
|
8
|
+
import { ElderActivationContext } from './elder-activation-context';
|
|
7
9
|
import * as i0 from "@angular/core";
|
|
8
|
-
export declare class ElderTableActivationDirective<T> implements
|
|
10
|
+
export declare class ElderTableActivationDirective<T> implements ElderActivationContext<T>, AfterViewInit, OnDestroy {
|
|
9
11
|
private readonly elderTable;
|
|
10
12
|
/***************************************************************************
|
|
11
13
|
* *
|
|
@@ -15,6 +17,7 @@ export declare class ElderTableActivationDirective<T> implements ElderItemActiva
|
|
|
15
17
|
private readonly logger;
|
|
16
18
|
private readonly destroy$;
|
|
17
19
|
readonly activeItem$: BehaviorSubject<T>;
|
|
20
|
+
private readonly activeItemEvent$;
|
|
18
21
|
activationOptions: ElderTableActivationOptions;
|
|
19
22
|
private _data;
|
|
20
23
|
readonly rows$: BehaviorSubject<ElderTableRowDirective<T>[]>;
|
|
@@ -42,6 +45,7 @@ export declare class ElderTableActivationDirective<T> implements ElderItemActiva
|
|
|
42
45
|
* Properties *
|
|
43
46
|
* *
|
|
44
47
|
**************************************************************************/
|
|
48
|
+
get activeItemEventChange(): Observable<ActiveItemEvent<T>>;
|
|
45
49
|
get activeItemChange(): Observable<T>;
|
|
46
50
|
get activeItem(): T;
|
|
47
51
|
set activeItem(item: T);
|
|
@@ -50,8 +54,8 @@ export declare class ElderTableActivationDirective<T> implements ElderItemActiva
|
|
|
50
54
|
* Public API *
|
|
51
55
|
* *
|
|
52
56
|
**************************************************************************/
|
|
53
|
-
activate(item: T): void;
|
|
54
|
-
|
|
57
|
+
activate(item: T, options: ItemActivationOptions): void;
|
|
58
|
+
activateAndFocus(item: T): void;
|
|
55
59
|
isItemActive(item: T): boolean;
|
|
56
60
|
hasItemFocus(item: T): boolean;
|
|
57
61
|
nextCloseTo(active: T): T;
|
|
@@ -60,6 +64,7 @@ export declare class ElderTableActivationDirective<T> implements ElderItemActiva
|
|
|
60
64
|
* Private methods *
|
|
61
65
|
* *
|
|
62
66
|
**************************************************************************/
|
|
67
|
+
private updateActiveItem;
|
|
63
68
|
private updateRowsActivation;
|
|
64
69
|
private updateRowActivation;
|
|
65
70
|
private rowDataUpdated;
|
|
@@ -78,5 +83,5 @@ export declare class ElderTableActivationDirective<T> implements ElderItemActiva
|
|
|
78
83
|
private itemEqualsId;
|
|
79
84
|
private getId;
|
|
80
85
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElderTableActivationDirective<any>, never>;
|
|
81
|
-
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderTableActivationDirective<any>, "elder-table[elderTableActivation]", ["elderTableActivation"], { "activationOptions": "elderTableActivation"; "activeItem": "activeItem"; }, { "activeItemChange": "activeItemChange"; }, never, never, false, never>;
|
|
86
|
+
static ɵdir: i0.ɵɵDirectiveDeclaration<ElderTableActivationDirective<any>, "elder-table[elderTableActivation]", ["elderTableActivation"], { "activationOptions": "elderTableActivation"; "activeItem": "activeItem"; }, { "activeItemEventChange": "activeItemEventChange"; "activeItemChange": "activeItemChange"; }, never, never, false, never>;
|
|
82
87
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from './activation-event-source';
|
|
2
|
+
export * from './active-item-event';
|
|
3
|
+
export * from './elder-activation-context';
|
|
4
|
+
export * from './elder-delete-active.directive';
|
|
5
|
+
export * from './elder-table-activation.directive';
|
|
6
|
+
export * from './elder-table-activation-options';
|
|
7
|
+
export * from './item-activation-options';
|
|
@@ -118,6 +118,7 @@ export declare class ElderTableComponent extends ElderDataViewBaseComponent impl
|
|
|
118
118
|
**************************************************************************/
|
|
119
119
|
requestMoreDataZoned(event: any): void;
|
|
120
120
|
get trackByFn(): TrackByFunction<any>;
|
|
121
|
+
isDataValid(data: any): boolean;
|
|
121
122
|
/***************************************************************************
|
|
122
123
|
* *
|
|
123
124
|
* Private Methods *
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ElementRef, Renderer2 } from '@angular/core';
|
|
2
|
-
import {
|
|
2
|
+
import { ElderActivationContext } from './activation/elder-activation-context';
|
|
3
3
|
import * as i0 from "@angular/core";
|
|
4
4
|
export declare class ElderTableRowDirective<T> {
|
|
5
5
|
private readonly rowRef;
|
|
@@ -12,7 +12,7 @@ export declare class ElderTableRowDirective<T> {
|
|
|
12
12
|
private readonly logger;
|
|
13
13
|
private _activated;
|
|
14
14
|
private _model;
|
|
15
|
-
private
|
|
15
|
+
private readonly _activationDir$;
|
|
16
16
|
private readonly focused$;
|
|
17
17
|
/***************************************************************************
|
|
18
18
|
* *
|
|
@@ -27,6 +27,7 @@ export declare class ElderTableRowDirective<T> {
|
|
|
27
27
|
**************************************************************************/
|
|
28
28
|
onFocus(event: any): void;
|
|
29
29
|
onBlur(event: any): void;
|
|
30
|
+
onClick(): void;
|
|
30
31
|
/***************************************************************************
|
|
31
32
|
* *
|
|
32
33
|
* Host Bindings *
|
|
@@ -41,16 +42,15 @@ export declare class ElderTableRowDirective<T> {
|
|
|
41
42
|
**************************************************************************/
|
|
42
43
|
set model(model: T);
|
|
43
44
|
get model(): T;
|
|
44
|
-
get tableActivation(): ElderItemActivator<T>;
|
|
45
45
|
get hasFocus(): boolean;
|
|
46
46
|
/***************************************************************************
|
|
47
47
|
* *
|
|
48
48
|
* Public API *
|
|
49
49
|
* *
|
|
50
50
|
**************************************************************************/
|
|
51
|
-
bindTableActivation(
|
|
51
|
+
bindTableActivation(activationDir: ElderActivationContext<T>): void;
|
|
52
52
|
bringToView(): void;
|
|
53
|
-
|
|
53
|
+
focus(): void;
|
|
54
54
|
/***************************************************************************
|
|
55
55
|
* *
|
|
56
56
|
* Private methods *
|
|
@@ -30,19 +30,17 @@ import * as i28 from "../common/elder-data-common.module";
|
|
|
30
30
|
import * as i29 from "../../infinitescroll/elder-infinite-scroll.module";
|
|
31
31
|
import * as i30 from "../../forms/directives/elder-forms-directives.module";
|
|
32
32
|
import * as i31 from "@angular/material/card";
|
|
33
|
+
export * from './model/elder-table-model';
|
|
34
|
+
export * from './model/elder-table-model-provider';
|
|
35
|
+
export * from './model/elder-table-model-cdk-table-binding';
|
|
36
|
+
export * from './model/elder-table-model-query-group';
|
|
37
|
+
export * from './activation/public_api';
|
|
33
38
|
export * from './elder-number-cell.directive';
|
|
34
39
|
export * from './elder-table/elder-table.component';
|
|
35
40
|
export * from './elder-table-sort.directive';
|
|
36
41
|
export * from './elder-table/elder-table-toolbar.directive';
|
|
37
|
-
export * from './activation/elder-table-activation.directive';
|
|
38
|
-
export * from './activation/elder-delete-active.directive';
|
|
39
|
-
export * from './activation/elder-table-activation-options';
|
|
40
42
|
export * from './elder-table-extension.directive';
|
|
41
43
|
export * from './elder-table-root.directive';
|
|
42
|
-
export * from './model/elder-table-model';
|
|
43
|
-
export * from './model/elder-table-model-provider';
|
|
44
|
-
export * from './model/elder-table-model-cdk-table-binding';
|
|
45
|
-
export * from './model/elder-table-model-query-group';
|
|
46
44
|
export declare class ElderTableModule {
|
|
47
45
|
static ɵfac: i0.ɵɵFactoryDeclaration<ElderTableModule, never>;
|
|
48
46
|
static ɵmod: i0.ɵɵNgModuleDeclaration<ElderTableModule, [typeof i1.ElderTableComponent, typeof i2.ElderTableToolbarDirective, typeof i3.ElderTableSortDirective, typeof i4.ElderNumberCellDirective, typeof i5.ElderTableActivationDirective, typeof i6.ElderTableRowDirective, typeof i7.ElderTableExtensionDirective, typeof i8.ElderTableColumnDirective, typeof i9.ElderTableRootDirective, typeof i10.ElderDeleteActiveDirective], [typeof i11.CommonModule, typeof i12.RouterModule, typeof i13.FormsModule, typeof i14.MatDividerModule, typeof i15.MatCheckboxModule, typeof i16.MatButtonModule, typeof i17.MatIconModule, typeof i18.MatBadgeModule, typeof i19.MatProgressBarModule, typeof i20.CdkTableModule, typeof i21.MatTableModule, typeof i22.MatPaginatorModule, typeof i23.MatSortModule, typeof i24.MatDialogModule, typeof i25.MatTooltipModule, typeof i26.MatMenuModule, typeof i27.TranslateModule, typeof i28.ElderDataCommonModule, typeof i29.ElderInfiniteScrollModule, typeof i30.ElderFormsDirectivesModule, typeof i31.MatCardModule], [typeof i1.ElderTableComponent, typeof i2.ElderTableToolbarDirective, typeof i28.ElderDataCommonModule, typeof i3.ElderTableSortDirective, typeof i4.ElderNumberCellDirective, typeof i5.ElderTableActivationDirective, typeof i7.ElderTableExtensionDirective, typeof i9.ElderTableRootDirective, typeof i10.ElderDeleteActiveDirective]>;
|
package/package.json
CHANGED
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { Injectable } from '@angular/core';
|
|
2
|
-
import { BehaviorSubject, merge, Subject } from 'rxjs';
|
|
3
|
-
import { LoggerFactory } from '@elderbyte/ts-logger';
|
|
4
|
-
import { takeUntil } from 'rxjs/operators';
|
|
5
|
-
import * as i0 from "@angular/core";
|
|
6
|
-
export class MasterDetailService {
|
|
7
|
-
/***************************************************************************
|
|
8
|
-
* *
|
|
9
|
-
* Constructor *
|
|
10
|
-
* *
|
|
11
|
-
**************************************************************************/
|
|
12
|
-
constructor() {
|
|
13
|
-
/***************************************************************************
|
|
14
|
-
* *
|
|
15
|
-
* Fields *
|
|
16
|
-
* *
|
|
17
|
-
**************************************************************************/
|
|
18
|
-
this.destroy$ = new Subject();
|
|
19
|
-
this.mode$ = new BehaviorSubject(null);
|
|
20
|
-
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
21
|
-
this._itemActivationRequest$ = new Subject();
|
|
22
|
-
this._activeItem$ = new BehaviorSubject(null);
|
|
23
|
-
this._creatingItem$ = new BehaviorSubject(null);
|
|
24
|
-
this._activeOrCreating$ = new BehaviorSubject(null);
|
|
25
|
-
merge(this._creatingItem$, this._activeItem$)
|
|
26
|
-
.pipe(takeUntil(this.destroy$)).subscribe({
|
|
27
|
-
next: creatingOrActive => this._activeOrCreating$.next(creatingOrActive)
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
/***************************************************************************
|
|
31
|
-
* *
|
|
32
|
-
* Life Cycle *
|
|
33
|
-
* *
|
|
34
|
-
**************************************************************************/
|
|
35
|
-
ngOnDestroy() {
|
|
36
|
-
this.destroy$.next();
|
|
37
|
-
this.destroy$.complete();
|
|
38
|
-
}
|
|
39
|
-
/***************************************************************************
|
|
40
|
-
* *
|
|
41
|
-
* Properties *
|
|
42
|
-
* *
|
|
43
|
-
**************************************************************************/
|
|
44
|
-
get itemActivationRequested() {
|
|
45
|
-
return this._itemActivationRequest$.asObservable();
|
|
46
|
-
}
|
|
47
|
-
get activeOrCreatingItem$() {
|
|
48
|
-
return this._activeOrCreating$;
|
|
49
|
-
}
|
|
50
|
-
get activeItem$() {
|
|
51
|
-
return this._activeItem$;
|
|
52
|
-
}
|
|
53
|
-
onItemActivated(item) {
|
|
54
|
-
if (item !== this._activeItem$.getValue()) {
|
|
55
|
-
this._activeItem$.next(item);
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
requestItemActivation(item) {
|
|
59
|
-
this._itemActivationRequest$.next(item);
|
|
60
|
-
}
|
|
61
|
-
activateCreatingItem(item) {
|
|
62
|
-
this._creatingItem$.next(item);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
MasterDetailService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MasterDetailService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
66
|
-
MasterDetailService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MasterDetailService });
|
|
67
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.7", ngImport: i0, type: MasterDetailService, decorators: [{
|
|
68
|
-
type: Injectable
|
|
69
|
-
}], ctorParameters: function () { return []; } });
|
|
70
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWFzdGVyLWRldGFpbC5zZXJ2aWNlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvZWxkZXJieXRlL25neC1zdGFydGVyL3NyYy9saWIvY29tcG9uZW50cy9kYXRhLXZpZXcvbWFzdGVyLWRldGFpbC9tYXN0ZXItZGV0YWlsLnNlcnZpY2Uud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EZXN0cm95fSBmcm9tICdAYW5ndWxhci9jb3JlJztcbmltcG9ydCB7QmVoYXZpb3JTdWJqZWN0LCBtZXJnZSwgT2JzZXJ2YWJsZSwgU3ViamVjdH0gZnJvbSAncnhqcyc7XG5pbXBvcnQge0xvZ2dlckZhY3Rvcnl9IGZyb20gJ0BlbGRlcmJ5dGUvdHMtbG9nZ2VyJztcbmltcG9ydCB7dGFrZVVudGlsfSBmcm9tICdyeGpzL29wZXJhdG9ycyc7XG5pbXBvcnQge0VsZGVyTWFzdGVyRGV0YWlsTW9kZX0gZnJvbSAnLi9lbGRlci1tYXN0ZXItZGV0YWlsLW1vZGUnO1xuXG5ASW5qZWN0YWJsZSgpXG5leHBvcnQgY2xhc3MgTWFzdGVyRGV0YWlsU2VydmljZTxUPiBpbXBsZW1lbnRzIE9uRGVzdHJveSB7XG5cbiAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAqIEZpZWxkcyAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKiovXG5cbiAgcHJvdGVjdGVkIHJlYWRvbmx5IGRlc3Ryb3kkID0gbmV3IFN1YmplY3Q8dm9pZD4oKTtcblxuICBwdWJsaWMgcmVhZG9ubHkgbW9kZSQgPSBuZXcgQmVoYXZpb3JTdWJqZWN0PEVsZGVyTWFzdGVyRGV0YWlsTW9kZT4obnVsbCk7XG5cbiAgcHJpdmF0ZSByZWFkb25seSBsb2dnZXIgPSBMb2dnZXJGYWN0b3J5LmdldExvZ2dlcih0aGlzLmNvbnN0cnVjdG9yLm5hbWUpO1xuICBwcml2YXRlIHJlYWRvbmx5IF9pdGVtQWN0aXZhdGlvblJlcXVlc3QkID0gbmV3IFN1YmplY3Q8VD4oKTtcbiAgcHJpdmF0ZSByZWFkb25seSBfYWN0aXZlSXRlbSQgPSBuZXcgQmVoYXZpb3JTdWJqZWN0PFQ+KG51bGwpO1xuICBwcml2YXRlIHJlYWRvbmx5IF9jcmVhdGluZ0l0ZW0kID0gbmV3IEJlaGF2aW9yU3ViamVjdDxUPihudWxsKTtcbiAgcHJpdmF0ZSByZWFkb25seSBfYWN0aXZlT3JDcmVhdGluZyQgPSBuZXcgQmVoYXZpb3JTdWJqZWN0PFQ+KG51bGwpO1xuXG4gIC8qKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKipcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgKiBDb25zdHJ1Y3RvciAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAgICoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqL1xuXG4gIGNvbnN0cnVjdG9yKCkge1xuICAgIG1lcmdlKHRoaXMuX2NyZWF0aW5nSXRlbSQsIHRoaXMuX2FjdGl2ZUl0ZW0kKVxuICAgIC5waXBlKFxuICAgICAgdGFrZVVudGlsKHRoaXMuZGVzdHJveSQpXG4gICAgKS5zdWJzY3JpYmUoe1xuICAgICAgbmV4dDogY3JlYXRpbmdPckFjdGl2ZSA9PiB0aGlzLl9hY3RpdmVPckNyZWF0aW5nJC5uZXh0KGNyZWF0aW5nT3JBY3RpdmUpXG4gICAgfSk7XG4gIH1cblxuICAvKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqXG4gICAqICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAgICogTGlmZSBDeWNsZSAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKi9cblxuICBwdWJsaWMgbmdPbkRlc3Ryb3koKTogdm9pZCB7XG4gICAgdGhpcy5kZXN0cm95JC5uZXh0KCk7XG4gICAgdGhpcy5kZXN0cm95JC5jb21wbGV0ZSgpO1xuICB9XG5cbiAgLyoqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKioqKlxuICAgKiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAqXG4gICAqIFByb3BlcnRpZXMgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICpcbiAgICogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgKlxuICAgKioqKioqKioqKioqKioqKioqKioqKioqKioqKioq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