@elderbyte/ngx-starter 19.2.0 → 19.2.1
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/fesm2022/elderbyte-ngx-starter.mjs +55 -68
- package/fesm2022/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/common/selection/selection-model.d.ts +0 -3
- package/lib/components/data-view/grid/elder-tile/elder-tile.component.d.ts +1 -0
- package/lib/components/data-view/master-detail/elder-master-activation.directive.d.ts +9 -7
- package/lib/components/data-view/master-detail/elder-master-detail.module.d.ts +2 -2
- package/lib/components/data-view/master-detail/{elder-master-detail.component.d.ts → master-detail/elder-master-detail.component.d.ts} +8 -15
- package/package.json +1 -1
- /package/src/lib/components/data-view/master-detail/{elder-master-detail.component.scss → master-detail/elder-master-detail.component.scss} +0 -0
|
@@ -7893,7 +7893,6 @@ class SelectionModel {
|
|
|
7893
7893
|
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
7894
7894
|
this._selectionMap = new Map();
|
|
7895
7895
|
this._selection = new BehaviorSubject([]);
|
|
7896
|
-
this._selectionSig = toSignal(this._selection);
|
|
7897
7896
|
this._multiple = multiple;
|
|
7898
7897
|
this._keyGetterFn = keyGetter;
|
|
7899
7898
|
this._selectableEvaluatorFn = selectableEvaluatorFn;
|
|
@@ -7913,9 +7912,6 @@ class SelectionModel {
|
|
|
7913
7912
|
get selection() {
|
|
7914
7913
|
return this._selection.asObservable();
|
|
7915
7914
|
}
|
|
7916
|
-
get selectionSig() {
|
|
7917
|
-
return this._selectionSig;
|
|
7918
|
-
}
|
|
7919
7915
|
get selectionSnapshot() {
|
|
7920
7916
|
return this._selection.getValue();
|
|
7921
7917
|
}
|
|
@@ -18893,6 +18889,7 @@ class ElderTileComponent {
|
|
|
18893
18889
|
this.value = input.required();
|
|
18894
18890
|
this.selectionEnabled = input(false, { transform: booleanTransformFn });
|
|
18895
18891
|
this.selectionModel = input(undefined);
|
|
18892
|
+
this.selection = toSignal(toObservable(this.selectionModel).pipe(switchMap((model) => model.selection)));
|
|
18896
18893
|
this.interactionMode = input('open');
|
|
18897
18894
|
this.outlined = input(false, { transform: booleanTransformFn });
|
|
18898
18895
|
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
@@ -19007,11 +19004,11 @@ class ElderTileComponent {
|
|
|
19007
19004
|
}
|
|
19008
19005
|
}
|
|
19009
19006
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ElderTileComponent, deps: [{ token: ActivationModel, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
19010
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: ElderTileComponent, isStandalone: true, selector: "elder-tile", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, selectionEnabled: { classPropertyName: "selectionEnabled", publicName: "selectionEnabled", isSignal: true, isRequired: false, transformFunction: null }, selectionModel: { classPropertyName: "selectionModel", publicName: "selectionModel", isSignal: true, isRequired: false, transformFunction: null }, interactionMode: { classPropertyName: "interactionMode", publicName: "interactionMode", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "click": "onClick($event)" } }, viewQueries: [{ propertyName: "elderTileRef", first: true, predicate: ["elderTile"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #elderTile\n class=\"elder-tile full\"\n [class.outlined]=\"outlined()\"\n [class.activated]=\"activated()\"\n [tabindex]=\"focusable ? -1 : undefined\"\n>\n <div class=\"elder-tile-content\">\n <ng-content></ng-content>\n <!-- Overlay (Selection) -->\n\n <div class=\"elder-tile-overlay elder-click-through\"></div>\n\n @if (selectionEnabled()) {\n @if (
|
|
19007
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: ElderTileComponent, isStandalone: true, selector: "elder-tile", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, selectionEnabled: { classPropertyName: "selectionEnabled", publicName: "selectionEnabled", isSignal: true, isRequired: false, transformFunction: null }, selectionModel: { classPropertyName: "selectionModel", publicName: "selectionModel", isSignal: true, isRequired: false, transformFunction: null }, interactionMode: { classPropertyName: "interactionMode", publicName: "interactionMode", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null } }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)", "click": "onClick($event)" } }, viewQueries: [{ propertyName: "elderTileRef", first: true, predicate: ["elderTile"], descendants: true, isSignal: true }], ngImport: i0, template: "<div\n #elderTile\n class=\"elder-tile full\"\n [class.outlined]=\"outlined()\"\n [class.activated]=\"activated()\"\n [tabindex]=\"focusable ? -1 : undefined\"\n>\n <div class=\"elder-tile-content\">\n <ng-content></ng-content>\n <!-- Overlay (Selection) -->\n\n <div class=\"elder-tile-overlay elder-click-through\"></div>\n\n @if (selectionEnabled()) {\n @if (selection(); as selection) {\n <div\n class=\"elder-selection-overlay elder-click-through\"\n [class.elder-selection-overlay-hidden]=\"!inSelectionMode(selection)\"\n [class.elder-selection-overlay-visible]=\"inSelectionMode(selection)\"\n >\n <button\n mat-icon-button\n type=\"button\"\n (click)=\"selectionModel().toggle(value())\"\n elderStopEventPropagation\n class=\"elder-tile-check\"\n >\n @let isSelected = selectionModel().isSelected(value());\n <mat-icon [class.elder-selected]=\"isSelected\">\n {{ isSelected ? 'check_circle' : 'radio_button_unchecked' }}\n </mat-icon>\n </button>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".elder-tile{border-radius:var(--elder-pane-border-radius);background-color:var(--md-sys-color-surface-container-low);text-align:left;overflow:hidden;transition:box-shadow .2s cubic-bezier(0,0,.2,1),border .25s linear}.elder-tile:hover{border-color:var(--md-sys-color-primary)}.elder-tile-content{position:relative;width:100%;height:100%;border-radius:var(--elder-pane-border-radius)}.elder-tile-content:hover .elder-tile-overlay{opacity:1;background-color:#ffffff14}.elder-tile:active{z-index:100;box-shadow:var(--elder-box-shadow-default)}.elder-selection-overlay{position:absolute;inset:0;transition:background-color .1s ease-in,opacity .1s ease-in}.elder-tile-overlay{position:absolute;inset:0}.elder-selection-overlay-visible{opacity:1;tab-index:0}.elder-selection-overlay-hidden{opacity:0;tab-index:-1}.elder-click-through{pointer-events:none}.elder-tile-check{pointer-events:auto}.elder-tile-check mat-icon{color:var(--md-sys-color-outline-variant);background-color:var(--md-sys-color-surface);border-radius:12px}.elder-tile-check mat-icon.elder-selected{color:var(--md-sys-color-tertiary)}.elder-tile-check:hover mat-icon{color:var(--md-sys-color-primary)}.elder-tile:focus{outline:2px solid var(--elder-color-highlight-focus)}.elder-tile.activated:focus{outline:2px solid var(--elder-color-highlight-focus)}.elder-tile.activated{outline:2px dashed var(--elder-color-highlight-focus)}\n"], dependencies: [{ kind: "directive", type: ElderStopEventPropagationDirective, selector: "[elderStopEventPropagation]" }, { kind: "component", type: MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
19011
19008
|
}
|
|
19012
19009
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ElderTileComponent, decorators: [{
|
|
19013
19010
|
type: Component,
|
|
19014
|
-
args: [{ selector: 'elder-tile', imports: [ElderStopEventPropagationDirective, MatIcon, MatIconButton], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div\n #elderTile\n class=\"elder-tile full\"\n [class.outlined]=\"outlined()\"\n [class.activated]=\"activated()\"\n [tabindex]=\"focusable ? -1 : undefined\"\n>\n <div class=\"elder-tile-content\">\n <ng-content></ng-content>\n <!-- Overlay (Selection) -->\n\n <div class=\"elder-tile-overlay elder-click-through\"></div>\n\n @if (selectionEnabled()) {\n @if (
|
|
19011
|
+
args: [{ selector: 'elder-tile', imports: [ElderStopEventPropagationDirective, MatIcon, MatIconButton], changeDetection: ChangeDetectionStrategy.OnPush, standalone: true, template: "<div\n #elderTile\n class=\"elder-tile full\"\n [class.outlined]=\"outlined()\"\n [class.activated]=\"activated()\"\n [tabindex]=\"focusable ? -1 : undefined\"\n>\n <div class=\"elder-tile-content\">\n <ng-content></ng-content>\n <!-- Overlay (Selection) -->\n\n <div class=\"elder-tile-overlay elder-click-through\"></div>\n\n @if (selectionEnabled()) {\n @if (selection(); as selection) {\n <div\n class=\"elder-selection-overlay elder-click-through\"\n [class.elder-selection-overlay-hidden]=\"!inSelectionMode(selection)\"\n [class.elder-selection-overlay-visible]=\"inSelectionMode(selection)\"\n >\n <button\n mat-icon-button\n type=\"button\"\n (click)=\"selectionModel().toggle(value())\"\n elderStopEventPropagation\n class=\"elder-tile-check\"\n >\n @let isSelected = selectionModel().isSelected(value());\n <mat-icon [class.elder-selected]=\"isSelected\">\n {{ isSelected ? 'check_circle' : 'radio_button_unchecked' }}\n </mat-icon>\n </button>\n </div>\n }\n }\n </div>\n</div>\n", styles: [".elder-tile{border-radius:var(--elder-pane-border-radius);background-color:var(--md-sys-color-surface-container-low);text-align:left;overflow:hidden;transition:box-shadow .2s cubic-bezier(0,0,.2,1),border .25s linear}.elder-tile:hover{border-color:var(--md-sys-color-primary)}.elder-tile-content{position:relative;width:100%;height:100%;border-radius:var(--elder-pane-border-radius)}.elder-tile-content:hover .elder-tile-overlay{opacity:1;background-color:#ffffff14}.elder-tile:active{z-index:100;box-shadow:var(--elder-box-shadow-default)}.elder-selection-overlay{position:absolute;inset:0;transition:background-color .1s ease-in,opacity .1s ease-in}.elder-tile-overlay{position:absolute;inset:0}.elder-selection-overlay-visible{opacity:1;tab-index:0}.elder-selection-overlay-hidden{opacity:0;tab-index:-1}.elder-click-through{pointer-events:none}.elder-tile-check{pointer-events:auto}.elder-tile-check mat-icon{color:var(--md-sys-color-outline-variant);background-color:var(--md-sys-color-surface);border-radius:12px}.elder-tile-check mat-icon.elder-selected{color:var(--md-sys-color-tertiary)}.elder-tile-check:hover mat-icon{color:var(--md-sys-color-primary)}.elder-tile:focus{outline:2px solid var(--elder-color-highlight-focus)}.elder-tile.activated:focus{outline:2px solid var(--elder-color-highlight-focus)}.elder-tile.activated{outline:2px dashed var(--elder-color-highlight-focus)}\n"] }]
|
|
19015
19012
|
}], ctorParameters: () => [{ type: ActivationModel, decorators: [{
|
|
19016
19013
|
type: Optional
|
|
19017
19014
|
}] }], propDecorators: { onFocus: [{
|
|
@@ -19515,7 +19512,7 @@ class MasterDetailActivationEvent {
|
|
|
19515
19512
|
this.creating = creating;
|
|
19516
19513
|
this.source = source;
|
|
19517
19514
|
this.deactivate = false;
|
|
19518
|
-
if (item
|
|
19515
|
+
if (item === null || item === undefined) {
|
|
19519
19516
|
this.deactivate = true;
|
|
19520
19517
|
}
|
|
19521
19518
|
}
|
|
@@ -19534,7 +19531,7 @@ class ElderMasterDetailService {
|
|
|
19534
19531
|
* *
|
|
19535
19532
|
**************************************************************************/
|
|
19536
19533
|
this.destroy$ = new Subject();
|
|
19537
|
-
this.mode$ = new BehaviorSubject(
|
|
19534
|
+
this.mode$ = new BehaviorSubject('DIALOG');
|
|
19538
19535
|
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
19539
19536
|
this._itemActivationRequest$ = new Subject();
|
|
19540
19537
|
this._activeItem$ = new BehaviorSubject(null);
|
|
@@ -20532,55 +20529,27 @@ class ElderMasterDetailComponent {
|
|
|
20532
20529
|
* *
|
|
20533
20530
|
**************************************************************************/
|
|
20534
20531
|
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
20535
|
-
this.
|
|
20536
|
-
this.
|
|
20537
|
-
|
|
20538
|
-
|
|
20539
|
-
|
|
20540
|
-
|
|
20541
|
-
},
|
|
20542
|
-
});
|
|
20543
|
-
this.masterDetailService.currentItem$.pipe(takeUntil(this.destroy$)).subscribe({
|
|
20544
|
-
next: (item) => {
|
|
20545
|
-
this.currentActive$.next(item);
|
|
20546
|
-
},
|
|
20532
|
+
this.modeSig = toSignal(this.masterDetailService.mode$);
|
|
20533
|
+
this.currentActive = toSignal(this.masterDetailService.currentItem$);
|
|
20534
|
+
effect(() => {
|
|
20535
|
+
if (this.modeSig() === 'EMBEDDED') {
|
|
20536
|
+
this.closeDialog();
|
|
20537
|
+
}
|
|
20547
20538
|
});
|
|
20548
|
-
this.masterDetailService.currentItemChange.pipe(
|
|
20549
|
-
next: (active) =>
|
|
20550
|
-
if (this.mode$.getValue() == 'DIALOG') {
|
|
20551
|
-
if (active.item) {
|
|
20552
|
-
this.closeDialog();
|
|
20553
|
-
this.openDetailDialog(active?.item);
|
|
20554
|
-
}
|
|
20555
|
-
else {
|
|
20556
|
-
this.closeDialog();
|
|
20557
|
-
}
|
|
20558
|
-
}
|
|
20559
|
-
},
|
|
20539
|
+
this.masterDetailService.currentItemChange.pipe(takeUntilDestroyed()).subscribe({
|
|
20540
|
+
next: (active) => this.onCurrentItemChange(active),
|
|
20560
20541
|
});
|
|
20561
20542
|
}
|
|
20562
|
-
/***************************************************************************
|
|
20563
|
-
* *
|
|
20564
|
-
* Life Cycle *
|
|
20565
|
-
* *
|
|
20566
|
-
**************************************************************************/
|
|
20567
|
-
ngOnDestroy() {
|
|
20568
|
-
this.destroy$.next();
|
|
20569
|
-
this.destroy$.complete();
|
|
20570
|
-
}
|
|
20571
20543
|
/***************************************************************************
|
|
20572
20544
|
* *
|
|
20573
20545
|
* Properties *
|
|
20574
20546
|
* *
|
|
20575
20547
|
**************************************************************************/
|
|
20576
20548
|
set mode(mode) {
|
|
20577
|
-
this.mode$.next(mode);
|
|
20578
|
-
if (this.mode == 'EMBEDDED' && this.dialogRef) {
|
|
20579
|
-
this.dialogRef.close();
|
|
20580
|
-
}
|
|
20549
|
+
this.masterDetailService.mode$.next(mode);
|
|
20581
20550
|
}
|
|
20582
20551
|
get mode() {
|
|
20583
|
-
return this.mode$.
|
|
20552
|
+
return this.masterDetailService.mode$.value;
|
|
20584
20553
|
}
|
|
20585
20554
|
/***************************************************************************
|
|
20586
20555
|
* *
|
|
@@ -20602,19 +20571,30 @@ class ElderMasterDetailComponent {
|
|
|
20602
20571
|
console.log('The dialog was closed');
|
|
20603
20572
|
});
|
|
20604
20573
|
}
|
|
20574
|
+
onCurrentItemChange(active) {
|
|
20575
|
+
if (untracked(this.modeSig) === 'DIALOG') {
|
|
20576
|
+
if (active.item) {
|
|
20577
|
+
this.closeDialog();
|
|
20578
|
+
this.openDetailDialog(active?.item);
|
|
20579
|
+
}
|
|
20580
|
+
else {
|
|
20581
|
+
this.closeDialog();
|
|
20582
|
+
}
|
|
20583
|
+
}
|
|
20584
|
+
}
|
|
20605
20585
|
closeDialog() {
|
|
20606
|
-
if (this.dialogRef
|
|
20586
|
+
if (this.dialogRef) {
|
|
20607
20587
|
this.dialogRef.close();
|
|
20608
20588
|
}
|
|
20609
20589
|
}
|
|
20610
20590
|
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ElderMasterDetailComponent, deps: [{ token: ElderMasterDetailService }, { token: i1$7.MatDialog }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
20611
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: ElderMasterDetailComponent, isStandalone: true, selector: "elder-master-detail", inputs: { mode: "mode" }, host: { classAttribute: "layout-col flex p-pane" }, providers: [ElderMasterDetailProvider.ExistingOrNewMasterDetailService], queries: [{ propertyName: "master", first: true, predicate: ElderMasterDirective, descendants: true, read: TemplateRef }, { propertyName: "detail", first: true, predicate: ElderDetailDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<elder-basic-pane-layout class=\"flex p-0\"
|
|
20591
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.2.0", type: ElderMasterDetailComponent, isStandalone: true, selector: "elder-master-detail", inputs: { mode: "mode" }, host: { classAttribute: "layout-col flex p-pane" }, providers: [ElderMasterDetailProvider.ExistingOrNewMasterDetailService], queries: [{ propertyName: "master", first: true, predicate: ElderMasterDirective, descendants: true, read: TemplateRef }, { propertyName: "detail", first: true, predicate: ElderDetailDirective, descendants: true, read: TemplateRef }], ngImport: i0, template: "<elder-basic-pane-layout class=\"flex p-0\">\n <ng-container *ngTemplateOutlet=\"master\"></ng-container>\n\n @if (modeSig() === 'EMBEDDED') {\n @if (currentActive(); as currentActive) {\n <ng-container\n *ngTemplateOutlet=\"detail; context: { $implicit: currentActive }\"\n ></ng-container>\n }\n }\n</elder-basic-pane-layout>\n", styles: [""], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ElderBasicPaneLayoutComponent, selector: "elder-basic-pane-layout" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
20612
20592
|
}
|
|
20613
20593
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ElderMasterDetailComponent, decorators: [{
|
|
20614
20594
|
type: Component,
|
|
20615
|
-
args: [{ selector: 'elder-master-detail', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ElderMasterDetailProvider.ExistingOrNewMasterDetailService], imports: [
|
|
20595
|
+
args: [{ selector: 'elder-master-detail', changeDetection: ChangeDetectionStrategy.OnPush, providers: [ElderMasterDetailProvider.ExistingOrNewMasterDetailService], imports: [NgTemplateOutlet, ElderBasicPaneLayoutComponent], host: {
|
|
20616
20596
|
class: 'layout-col flex p-pane',
|
|
20617
|
-
}, template: "<elder-basic-pane-layout class=\"flex p-0\"
|
|
20597
|
+
}, template: "<elder-basic-pane-layout class=\"flex p-0\">\n <ng-container *ngTemplateOutlet=\"master\"></ng-container>\n\n @if (modeSig() === 'EMBEDDED') {\n @if (currentActive(); as currentActive) {\n <ng-container\n *ngTemplateOutlet=\"detail; context: { $implicit: currentActive }\"\n ></ng-container>\n }\n }\n</elder-basic-pane-layout>\n" }]
|
|
20618
20598
|
}], ctorParameters: () => [{ type: ElderMasterDetailService }, { type: i1$7.MatDialog }, { type: i0.ViewContainerRef }], propDecorators: { master: [{
|
|
20619
20599
|
type: ContentChild,
|
|
20620
20600
|
args: [ElderMasterDirective, { read: TemplateRef, static: false }]
|
|
@@ -20631,16 +20611,17 @@ class ElderMasterActivationDirective {
|
|
|
20631
20611
|
* Constructor *
|
|
20632
20612
|
* *
|
|
20633
20613
|
**************************************************************************/
|
|
20634
|
-
constructor(toastService,
|
|
20614
|
+
constructor(destroyRef, toastService, activationModel, activationController, masterDetailService) {
|
|
20615
|
+
this.destroyRef = destroyRef;
|
|
20635
20616
|
this.toastService = toastService;
|
|
20636
|
-
this.
|
|
20617
|
+
this.activationModel = activationModel;
|
|
20618
|
+
this.activationController = activationController;
|
|
20637
20619
|
this.masterDetailService = masterDetailService;
|
|
20638
20620
|
/***************************************************************************
|
|
20639
20621
|
* *
|
|
20640
20622
|
* Fields *
|
|
20641
20623
|
* *
|
|
20642
20624
|
**************************************************************************/
|
|
20643
|
-
this.destroy$ = new Subject();
|
|
20644
20625
|
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
20645
20626
|
}
|
|
20646
20627
|
/***************************************************************************
|
|
@@ -20648,26 +20629,24 @@ class ElderMasterActivationDirective {
|
|
|
20648
20629
|
* Life Cycle *
|
|
20649
20630
|
* *
|
|
20650
20631
|
**************************************************************************/
|
|
20651
|
-
ngOnDestroy() {
|
|
20652
|
-
this.destroy$.next();
|
|
20653
|
-
this.destroy$.complete();
|
|
20654
|
-
}
|
|
20655
20632
|
ngOnInit() {
|
|
20656
|
-
this.
|
|
20633
|
+
this.activationModel.itemActivationEvents.pipe(takeUntilDestroyed(this.destroyRef)).subscribe({
|
|
20657
20634
|
next: (event) => {
|
|
20658
20635
|
this.log.debug('Table-Activation changed, notifying master-detail', event);
|
|
20659
20636
|
this.masterDetailService.onItemActivated(event.item, { source: event.source });
|
|
20660
20637
|
},
|
|
20661
20638
|
error: (err) => this.toastService.error('Failed to set active item', err),
|
|
20662
20639
|
});
|
|
20663
|
-
this.masterDetailService.itemActivationRequested
|
|
20640
|
+
this.masterDetailService.itemActivationRequested
|
|
20641
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
20642
|
+
.subscribe({
|
|
20664
20643
|
next: (item) => {
|
|
20665
|
-
this.
|
|
20644
|
+
this.activationModel.activate(item, new ItemActivationOptions(ActivationEventSource.SYSTEM, true) // TODO keyboard, arrow?
|
|
20666
20645
|
); // Maybe support activationRequest.source and map
|
|
20667
20646
|
},
|
|
20668
20647
|
});
|
|
20669
20648
|
this.masterDetailService.mode$
|
|
20670
|
-
.pipe(
|
|
20649
|
+
.pipe(takeUntilDestroyed(this.destroyRef))
|
|
20671
20650
|
.subscribe({ next: (mode) => this.onModeChange(mode) });
|
|
20672
20651
|
}
|
|
20673
20652
|
/***************************************************************************
|
|
@@ -20676,14 +20655,22 @@ class ElderMasterActivationDirective {
|
|
|
20676
20655
|
* *
|
|
20677
20656
|
**************************************************************************/
|
|
20678
20657
|
onModeChange(mode) {
|
|
20679
|
-
|
|
20680
|
-
|
|
20681
|
-
|
|
20682
|
-
|
|
20683
|
-
|
|
20658
|
+
this.activationController.activationOptions(this.activationOptions(mode));
|
|
20659
|
+
}
|
|
20660
|
+
activationOptions(mode) {
|
|
20661
|
+
switch (mode) {
|
|
20662
|
+
case 'EMBEDDED':
|
|
20663
|
+
return {
|
|
20664
|
+
autoActivation: 'once',
|
|
20665
|
+
autoActivateItem: 'first',
|
|
20666
|
+
};
|
|
20667
|
+
case 'DIALOG':
|
|
20668
|
+
return { autoActivation: 'never' };
|
|
20669
|
+
default:
|
|
20670
|
+
throw new UnreachableCaseError(mode);
|
|
20684
20671
|
}
|
|
20685
20672
|
}
|
|
20686
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ElderMasterActivationDirective, deps: [{ token: ElderToastService }, { token:
|
|
20673
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ElderMasterActivationDirective, deps: [{ token: i0.DestroyRef }, { token: ElderToastService }, { token: ActivationModel }, { token: DataViewActivationController }, { token: ElderMasterDetailService }], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
20687
20674
|
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.2.0", type: ElderMasterActivationDirective, isStandalone: true, selector: "[elderMasterActivation]", ngImport: i0 }); }
|
|
20688
20675
|
}
|
|
20689
20676
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImport: i0, type: ElderMasterActivationDirective, decorators: [{
|
|
@@ -20692,7 +20679,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.2.0", ngImpor
|
|
|
20692
20679
|
selector: '[elderMasterActivation]',
|
|
20693
20680
|
standalone: true,
|
|
20694
20681
|
}]
|
|
20695
|
-
}], ctorParameters: () => [{ type: ElderToastService }, { type:
|
|
20682
|
+
}], ctorParameters: () => [{ type: i0.DestroyRef }, { type: ElderToastService }, { type: ActivationModel }, { type: DataViewActivationController }, { type: ElderMasterDetailService }] });
|
|
20696
20683
|
|
|
20697
20684
|
class ElderFromFieldCustomizableBase extends ElderFromFieldBase {
|
|
20698
20685
|
constructor() {
|