@elderbyte/ngx-starter 14.4.0-beta.18 → 14.4.0-beta.19
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/base/data-view-options-provider-binding.mjs +63 -0
- package/esm2020/lib/components/data-view/base/elder-data-view-base.mjs +53 -10
- package/esm2020/lib/components/data-view/base/elder-data-view-options-provider.mjs +44 -0
- package/esm2020/lib/components/data-view/base/elder-data-view-options.mjs +42 -0
- package/esm2020/lib/components/data-view/base/public_api.mjs +5 -0
- package/esm2020/lib/components/data-view/grid/elder-grid/elder-grid.component.mjs +8 -22
- package/esm2020/lib/components/data-view/public_api.mjs +2 -2
- package/esm2020/lib/components/data-view/table/elder-table/elder-table.component.mjs +9 -43
- package/esm2020/lib/components/i18n/entities/elder-localized-input-table/elder-localized-input-table.component.mjs +1 -1
- package/esm2020/lib/components/iframes/data-view/data-view-iframe/data-view-iframe.component.mjs +119 -0
- package/esm2020/lib/components/iframes/data-view/data-view-iframe-adapter.directive.mjs +137 -0
- package/esm2020/lib/components/iframes/elder-iframe.module.mjs +18 -6
- package/esm2020/lib/components/iframes/iframe-dialog/iframe-dialog.component.mjs +1 -1
- package/esm2020/lib/components/iframes/iframe-host/iframe-host.component.mjs +56 -30
- package/esm2020/lib/components/iframes/iframe-side-content/iframe-side-content.component.mjs +1 -1
- package/esm2020/lib/components/iframes/iframe.service.mjs +2 -2
- package/esm2020/lib/components/iframes/typed-event-message.mjs +42 -0
- package/esm2020/lib/components/select/elder-select.module.mjs +2 -2
- package/esm2020/lib/components/select/popup/selection-model-popup.directive.mjs +21 -39
- package/fesm2015/elderbyte-ngx-starter.mjs +1764 -1346
- package/fesm2015/elderbyte-ngx-starter.mjs.map +1 -1
- package/fesm2020/elderbyte-ngx-starter.mjs +1784 -1368
- package/fesm2020/elderbyte-ngx-starter.mjs.map +1 -1
- package/lib/components/data-view/base/data-view-options-provider-binding.d.ts +39 -0
- package/lib/components/data-view/base/elder-data-view-base.d.ts +29 -6
- package/lib/components/data-view/base/elder-data-view-options-provider.d.ts +38 -0
- package/lib/components/data-view/base/elder-data-view-options.d.ts +33 -0
- package/lib/components/data-view/base/public_api.d.ts +4 -0
- package/lib/components/data-view/grid/elder-grid/elder-grid.component.d.ts +4 -6
- package/lib/components/data-view/public_api.d.ts +1 -1
- package/lib/components/data-view/table/elder-table/elder-table.component.d.ts +5 -19
- package/lib/components/iframes/data-view/data-view-iframe/data-view-iframe.component.d.ts +66 -0
- package/lib/components/iframes/data-view/data-view-iframe-adapter.directive.d.ts +62 -0
- package/lib/components/iframes/elder-iframe.module.d.ts +14 -10
- package/lib/components/iframes/iframe-host/iframe-host.component.d.ts +28 -10
- package/lib/components/iframes/iframe.service.d.ts +3 -3
- package/lib/components/iframes/typed-event-message.d.ts +26 -0
- package/lib/components/select/elder-select.module.d.ts +1 -1
- package/lib/components/select/popup/selection-model-popup.directive.d.ts +7 -27
- package/package.json +1 -1
- package/src/lib/components/iframes/data-view/data-view-iframe/data-view-iframe.component.scss +0 -0
- package/esm2020/lib/components/data-view/base/elder-data-view-base.module.mjs +0 -18
- package/esm2020/lib/components/iframes/iframe-message.mjs +0 -2
- package/lib/components/data-view/base/elder-data-view-base.module.d.ts +0 -9
- package/lib/components/iframes/iframe-message.d.ts +0 -5
|
@@ -10970,387 +10970,200 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
10970
10970
|
|
|
10971
10971
|
const ELDER_DATA_VIEW = new InjectionToken('Elder Data View');
|
|
10972
10972
|
|
|
10973
|
-
class
|
|
10974
|
-
}
|
|
10975
|
-
|
|
10976
|
-
class ConfirmDialogConfig extends ElderDialogConfig {
|
|
10977
|
-
}
|
|
10978
|
-
class ElderConfirmDialogComponent {
|
|
10979
|
-
constructor(dialogRef) {
|
|
10980
|
-
this.dialogRef = dialogRef;
|
|
10981
|
-
this.yesNo = false;
|
|
10982
|
-
}
|
|
10983
|
-
}
|
|
10984
|
-
ElderConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderConfirmDialogComponent, deps: [{ token: i1$7.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
10985
|
-
ElderConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderConfirmDialogComponent, selector: "elder-confirm-dialog", ngImport: i0, template: "\n<h2 matDialogTitle translate>{{ title }}</h2>\n\n\n<mat-dialog-content>\n <p translate>{{ message }}</p>\n</mat-dialog-content>\n\n\n<mat-dialog-actions fxLayoutAlign=\"end center\" cdkTrapFocus>\n\n <button type=\"button\" mat-button\n (click)=\"dialogRef.close(false)\">\n {{ (yesNo ? \"actions.no\" : \"actions.cancel\") | translate}}\n </button>\n\n <button type=\"submit\" mat-raised-button cdkFocusInitial\n (click)=\"dialogRef.close(true)\">\n {{ (yesNo ? \"actions.yes\" : \"actions.ok\") | translate}}\n </button>\n\n</mat-dialog-actions>\n\n", styles: [""], dependencies: [{ kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$7.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$7.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$7.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
10986
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderConfirmDialogComponent, decorators: [{
|
|
10987
|
-
type: Component,
|
|
10988
|
-
args: [{ selector: 'elder-confirm-dialog', template: "\n<h2 matDialogTitle translate>{{ title }}</h2>\n\n\n<mat-dialog-content>\n <p translate>{{ message }}</p>\n</mat-dialog-content>\n\n\n<mat-dialog-actions fxLayoutAlign=\"end center\" cdkTrapFocus>\n\n <button type=\"button\" mat-button\n (click)=\"dialogRef.close(false)\">\n {{ (yesNo ? \"actions.no\" : \"actions.cancel\") | translate}}\n </button>\n\n <button type=\"submit\" mat-raised-button cdkFocusInitial\n (click)=\"dialogRef.close(true)\">\n {{ (yesNo ? \"actions.yes\" : \"actions.ok\") | translate}}\n </button>\n\n</mat-dialog-actions>\n\n" }]
|
|
10989
|
-
}], ctorParameters: function () { return [{ type: i1$7.MatDialogRef }]; } });
|
|
10990
|
-
|
|
10991
|
-
class QuestionDialogConfig extends ElderDialogConfig {
|
|
10992
|
-
}
|
|
10993
|
-
class ElderQuestionDialogComponent {
|
|
10994
|
-
constructor(dialogRef, data) {
|
|
10995
|
-
this.dialogRef = dialogRef;
|
|
10996
|
-
this.data = data;
|
|
10997
|
-
}
|
|
10998
|
-
ngOnInit() {
|
|
10999
|
-
}
|
|
11000
|
-
confirm(event) {
|
|
11001
|
-
this.dialogRef.close(this.answer);
|
|
11002
|
-
}
|
|
11003
|
-
cancel(event) {
|
|
11004
|
-
this.dialogRef.close();
|
|
11005
|
-
}
|
|
11006
|
-
get isValid() {
|
|
11007
|
-
return !!this.answer;
|
|
11008
|
-
}
|
|
11009
|
-
}
|
|
11010
|
-
ElderQuestionDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderQuestionDialogComponent, deps: [{ token: i1$7.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
11011
|
-
ElderQuestionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderQuestionDialogComponent, selector: "elder-question-dialog", ngImport: i0, template: "<h2 matDialogTitle translate>{{ data.title }}</h2>\n\n<form #f=\"ngForm\" fxLayout=\"column\" (ngSubmit)=\"confirm($event)\" cdkTrapFocus>\n\n <mat-dialog-content>\n <p>{{data.question}}</p>\n\n <mat-form-field class=\"full-width\">\n <input matInput type=\"text\" name=\"name\" [(ngModel)]=\"answer\" cdkFocusInitial\n placeholder=\"{{'context.name' | translate}}\" required>\n </mat-form-field>\n </mat-dialog-content>\n\n <mat-dialog-actions fxLayoutAlign=\"end center\" >\n\n <button mat-button type=\"button\"\n (click)=\"cancel($event)\">\n {{'actions.cancel' | translate}}\n </button>\n\n <button mat-button type=\"submit\" color=\"primary\"\n [disabled]=\"!isValid\">\n {{'actions.ok' | translate}}\n </button>\n\n </mat-dialog-actions>\n\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$7.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$7.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$7.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
11012
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderQuestionDialogComponent, decorators: [{
|
|
11013
|
-
type: Component,
|
|
11014
|
-
args: [{ selector: 'elder-question-dialog', template: "<h2 matDialogTitle translate>{{ data.title }}</h2>\n\n<form #f=\"ngForm\" fxLayout=\"column\" (ngSubmit)=\"confirm($event)\" cdkTrapFocus>\n\n <mat-dialog-content>\n <p>{{data.question}}</p>\n\n <mat-form-field class=\"full-width\">\n <input matInput type=\"text\" name=\"name\" [(ngModel)]=\"answer\" cdkFocusInitial\n placeholder=\"{{'context.name' | translate}}\" required>\n </mat-form-field>\n </mat-dialog-content>\n\n <mat-dialog-actions fxLayoutAlign=\"end center\" >\n\n <button mat-button type=\"button\"\n (click)=\"cancel($event)\">\n {{'actions.cancel' | translate}}\n </button>\n\n <button mat-button type=\"submit\" color=\"primary\"\n [disabled]=\"!isValid\">\n {{'actions.ok' | translate}}\n </button>\n\n </mat-dialog-actions>\n\n</form>\n" }]
|
|
11015
|
-
}], ctorParameters: function () {
|
|
11016
|
-
return [{ type: i1$7.MatDialogRef }, { type: undefined, decorators: [{
|
|
11017
|
-
type: Inject,
|
|
11018
|
-
args: [MAT_DIALOG_DATA]
|
|
11019
|
-
}] }];
|
|
11020
|
-
} });
|
|
11021
|
-
|
|
11022
|
-
class ElderDialogService {
|
|
10973
|
+
class DataViewOptionsProviderBinding {
|
|
11023
10974
|
/***************************************************************************
|
|
11024
10975
|
* *
|
|
11025
10976
|
* Constructor *
|
|
11026
10977
|
* *
|
|
11027
10978
|
**************************************************************************/
|
|
11028
|
-
constructor(
|
|
11029
|
-
this.
|
|
11030
|
-
this.translateService = translateService;
|
|
10979
|
+
constructor(_dataViewBaseComponent) {
|
|
10980
|
+
this._dataViewBaseComponent = _dataViewBaseComponent;
|
|
11031
10981
|
/***************************************************************************
|
|
11032
10982
|
* *
|
|
11033
10983
|
* Fields *
|
|
11034
10984
|
* *
|
|
11035
10985
|
**************************************************************************/
|
|
11036
|
-
this.
|
|
11037
|
-
|
|
11038
|
-
|
|
11039
|
-
|
|
11040
|
-
restoreFocus: true,
|
|
11041
|
-
closeOnNavigation: false
|
|
11042
|
-
};
|
|
10986
|
+
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
10987
|
+
if (_dataViewBaseComponent == null) {
|
|
10988
|
+
throw new Error('dataViewBaseComponent must not be null!');
|
|
10989
|
+
}
|
|
11043
10990
|
}
|
|
11044
10991
|
/***************************************************************************
|
|
11045
10992
|
* *
|
|
11046
|
-
*
|
|
10993
|
+
* Static Builder *
|
|
11047
10994
|
* *
|
|
11048
10995
|
**************************************************************************/
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
*
|
|
11052
|
-
* @param title
|
|
11053
|
-
* @param message
|
|
11054
|
-
* @param config
|
|
11055
|
-
*/
|
|
11056
|
-
confirm(title, message, config) {
|
|
11057
|
-
return this.showConfirm({
|
|
11058
|
-
title: title,
|
|
11059
|
-
message: message,
|
|
11060
|
-
config: config || this.defaultDialogConfig
|
|
11061
|
-
});
|
|
10996
|
+
static of(dataViewBaseComponent) {
|
|
10997
|
+
return new DataViewOptionsProviderBinding(dataViewBaseComponent);
|
|
11062
10998
|
}
|
|
11063
|
-
|
|
11064
|
-
*
|
|
11065
|
-
*
|
|
11066
|
-
*
|
|
11067
|
-
|
|
11068
|
-
|
|
11069
|
-
if (!
|
|
11070
|
-
throw new Error('
|
|
10999
|
+
/***************************************************************************
|
|
11000
|
+
* *
|
|
11001
|
+
* Public API *
|
|
11002
|
+
* *
|
|
11003
|
+
**************************************************************************/
|
|
11004
|
+
dataViewOptionsProvider(optionsProvider) {
|
|
11005
|
+
if (!optionsProvider) {
|
|
11006
|
+
throw new Error('dataViewSelection must not be null!');
|
|
11071
11007
|
}
|
|
11072
|
-
|
|
11073
|
-
|
|
11074
|
-
rawMessages.set('message', config.message);
|
|
11075
|
-
return this.resolveTranslatedMap(rawMessages, config.interpolateParams).pipe(switchMap(messages => {
|
|
11076
|
-
const title = messages.get('title');
|
|
11077
|
-
const message = messages.get('message');
|
|
11078
|
-
let dialogRef;
|
|
11079
|
-
dialogRef = this.dialog.open(ElderConfirmDialogComponent, config.config);
|
|
11080
|
-
dialogRef.componentInstance.title = title;
|
|
11081
|
-
dialogRef.componentInstance.message = message;
|
|
11082
|
-
dialogRef.componentInstance.yesNo = config.yesNo;
|
|
11083
|
-
return dialogRef.afterClosed();
|
|
11084
|
-
}));
|
|
11085
|
-
}
|
|
11086
|
-
/**
|
|
11087
|
-
* @deprecated Use showQuestion({...}) instead
|
|
11088
|
-
*
|
|
11089
|
-
* Creates a modal question dialog.
|
|
11090
|
-
*
|
|
11091
|
-
* @param title
|
|
11092
|
-
* @param question
|
|
11093
|
-
* @param config
|
|
11094
|
-
*/
|
|
11095
|
-
question(title, question, config) {
|
|
11096
|
-
return this.showQuestion({
|
|
11097
|
-
title: title,
|
|
11098
|
-
question: question,
|
|
11099
|
-
config: config || this.defaultDialogConfig
|
|
11100
|
-
});
|
|
11008
|
+
this._optionsProvider = optionsProvider;
|
|
11009
|
+
return this;
|
|
11101
11010
|
}
|
|
11102
|
-
|
|
11103
|
-
|
|
11104
|
-
|
|
11105
|
-
* @param config
|
|
11106
|
-
*/
|
|
11107
|
-
showQuestion(config) {
|
|
11108
|
-
if (!config) {
|
|
11109
|
-
throw new Error('Argument must not be null: config');
|
|
11011
|
+
bindUntil(unsubscribe$) {
|
|
11012
|
+
if (!this._optionsProvider) {
|
|
11013
|
+
throw new Error('DataView must be defined to start binding. Use .dataView(dataView)!');
|
|
11110
11014
|
}
|
|
11111
|
-
|
|
11112
|
-
|
|
11113
|
-
rawMessages.set('question', config.question);
|
|
11114
|
-
return this.resolveTranslatedMap(rawMessages, config.interpolateParams).pipe(switchMap(messages => {
|
|
11115
|
-
const title = messages.get('title');
|
|
11116
|
-
const question = messages.get('question');
|
|
11117
|
-
const dlgConf = config.config || new MatDialogConfig();
|
|
11118
|
-
dlgConf.data = {
|
|
11119
|
-
title: title,
|
|
11120
|
-
question: question
|
|
11121
|
-
};
|
|
11122
|
-
const dialogRef = this.dialog.open(ElderQuestionDialogComponent, dlgConf);
|
|
11123
|
-
return dialogRef.afterClosed()
|
|
11124
|
-
.pipe(filter(response => !!response));
|
|
11125
|
-
}));
|
|
11015
|
+
this._optionsProvider.options$.pipe(takeUntil(unsubscribe$)).subscribe(options => this.applyOptions(options));
|
|
11016
|
+
return this;
|
|
11126
11017
|
}
|
|
11127
11018
|
/***************************************************************************
|
|
11128
11019
|
* *
|
|
11129
|
-
* Private
|
|
11020
|
+
* Private Methods *
|
|
11130
11021
|
* *
|
|
11131
11022
|
**************************************************************************/
|
|
11132
|
-
|
|
11133
|
-
const
|
|
11134
|
-
|
|
11135
|
-
|
|
11136
|
-
|
|
11137
|
-
translated.set(key, translatedValues[rawValue] || rawValue);
|
|
11138
|
-
});
|
|
11139
|
-
return translated;
|
|
11140
|
-
}));
|
|
11141
|
-
}
|
|
11142
|
-
/**
|
|
11143
|
-
* Translates a list of params
|
|
11144
|
-
*
|
|
11145
|
-
* @param interpolateParams
|
|
11146
|
-
*/
|
|
11147
|
-
translateInterpolatedParams(interpolateParams) {
|
|
11148
|
-
if (!interpolateParams) {
|
|
11149
|
-
return of({});
|
|
11023
|
+
applyOptions(options) {
|
|
11024
|
+
const dataCtx = this._dataViewBaseComponent.dataContext;
|
|
11025
|
+
if (dataCtx) {
|
|
11026
|
+
dataCtx.filter.updateFilters(options.filters);
|
|
11027
|
+
dataCtx.sort.updateSorts(options.sorts);
|
|
11150
11028
|
}
|
|
11151
|
-
|
|
11152
|
-
|
|
11153
|
-
.filter(value => !!value)
|
|
11154
|
-
.map(value => value + '');
|
|
11155
|
-
return this.translateService.get(values).pipe(map(translated => {
|
|
11156
|
-
Object.getOwnPropertyNames(interpolateParams)
|
|
11157
|
-
.forEach(key => {
|
|
11158
|
-
const value = interpolateParams[key];
|
|
11159
|
-
interpolateParams[key] = translated[value];
|
|
11160
|
-
});
|
|
11161
|
-
return interpolateParams;
|
|
11162
|
-
}));
|
|
11029
|
+
this._dataViewBaseComponent.interactionMode = options.interactionMode;
|
|
11030
|
+
this._dataViewBaseComponent.selectionMultiEnabled = options.selectionMultiEnabled;
|
|
11163
11031
|
}
|
|
11164
11032
|
}
|
|
11165
|
-
ElderDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogService, deps: [{ token: i1$7.MatDialog }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11166
|
-
ElderDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogService, providedIn: 'root' });
|
|
11167
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogService, decorators: [{
|
|
11168
|
-
type: Injectable,
|
|
11169
|
-
args: [{
|
|
11170
|
-
providedIn: 'root'
|
|
11171
|
-
}]
|
|
11172
|
-
}], ctorParameters: function () { return [{ type: i1$7.MatDialog }, { type: i2.TranslateService }]; } });
|
|
11173
11033
|
|
|
11174
|
-
|
|
11034
|
+
/**
|
|
11035
|
+
* Options for supporting data view components.
|
|
11036
|
+
*/
|
|
11037
|
+
class ElderDataViewOptions {
|
|
11038
|
+
/***************************************************************************
|
|
11039
|
+
* *
|
|
11040
|
+
* Fields *
|
|
11041
|
+
* *
|
|
11042
|
+
**************************************************************************/
|
|
11175
11043
|
/***************************************************************************
|
|
11176
11044
|
* *
|
|
11177
11045
|
* Constructor *
|
|
11178
11046
|
* *
|
|
11179
11047
|
**************************************************************************/
|
|
11180
|
-
constructor(
|
|
11181
|
-
this.
|
|
11182
|
-
this.
|
|
11048
|
+
constructor(sorts, filters, selectionMultiEnabled, interactionMode) {
|
|
11049
|
+
this.sorts = sorts;
|
|
11050
|
+
this.filters = filters;
|
|
11051
|
+
this.selectionMultiEnabled = selectionMultiEnabled;
|
|
11052
|
+
this.interactionMode = interactionMode;
|
|
11183
11053
|
}
|
|
11184
|
-
|
|
11054
|
+
static defaultOptions() {
|
|
11055
|
+
return new ElderDataViewOptions([], [], false, 'open');
|
|
11185
11056
|
}
|
|
11186
11057
|
/***************************************************************************
|
|
11187
11058
|
* *
|
|
11188
|
-
*
|
|
11059
|
+
* Properties *
|
|
11189
11060
|
* *
|
|
11190
11061
|
**************************************************************************/
|
|
11191
|
-
|
|
11192
|
-
this.
|
|
11062
|
+
withSorts(sorts) {
|
|
11063
|
+
return new ElderDataViewOptions(sorts, this.filters, this.selectionMultiEnabled, this.interactionMode);
|
|
11193
11064
|
}
|
|
11194
|
-
|
|
11195
|
-
|
|
11065
|
+
withFilters(filters) {
|
|
11066
|
+
return new ElderDataViewOptions(this.sorts, filters, this.selectionMultiEnabled, this.interactionMode);
|
|
11067
|
+
}
|
|
11068
|
+
withSelectionMultiEnabled(selectionMultiEnabled) {
|
|
11069
|
+
return new ElderDataViewOptions(this.sorts, this.filters, selectionMultiEnabled, this.interactionMode);
|
|
11070
|
+
}
|
|
11071
|
+
withInteractionMode(interactionMode) {
|
|
11072
|
+
return new ElderDataViewOptions(this.sorts, this.filters, this.selectionMultiEnabled, interactionMode);
|
|
11196
11073
|
}
|
|
11197
11074
|
}
|
|
11198
|
-
ElderSelectionDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionDialogComponent, deps: [{ token: i1$7.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
11199
|
-
ElderSelectionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderSelectionDialogComponent, selector: "elder-selection-dialog", inputs: { title: "title" }, ngImport: i0, template: "\n\n<div fxLayout=\"column\" fxFill>\n\n <div fxLayout=\"column\">\n <h2 *ngIf=\"title\">{{title | translate}}</h2>\n </div>\n\n <div fxLayout=\"column\" fxFlex>\n\n <ng-template [ngTemplateOutlet]=\"data.template\"></ng-template>\n\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n\n <button mat-button type=\"button\" mat-dialog-close>\n {{'actions.cancel' | translate}}\n </button>\n\n <button mat-raised-button type=\"button\"\n [disabled]=\"data.selectionModel.isEmpty()\"\n (click)=\"confirmSelection()\">\n {{'actions.select' | translate}}\n </button>\n\n </div>\n\n\n</div>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$7.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
11200
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionDialogComponent, decorators: [{
|
|
11201
|
-
type: Component,
|
|
11202
|
-
args: [{ selector: 'elder-selection-dialog', template: "\n\n<div fxLayout=\"column\" fxFill>\n\n <div fxLayout=\"column\">\n <h2 *ngIf=\"title\">{{title | translate}}</h2>\n </div>\n\n <div fxLayout=\"column\" fxFlex>\n\n <ng-template [ngTemplateOutlet]=\"data.template\"></ng-template>\n\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n\n <button mat-button type=\"button\" mat-dialog-close>\n {{'actions.cancel' | translate}}\n </button>\n\n <button mat-raised-button type=\"button\"\n [disabled]=\"data.selectionModel.isEmpty()\"\n (click)=\"confirmSelection()\">\n {{'actions.select' | translate}}\n </button>\n\n </div>\n\n\n</div>\n\n" }]
|
|
11203
|
-
}], ctorParameters: function () {
|
|
11204
|
-
return [{ type: i1$7.MatDialogRef }, { type: undefined, decorators: [{
|
|
11205
|
-
type: Inject,
|
|
11206
|
-
args: [MAT_DIALOG_DATA]
|
|
11207
|
-
}] }];
|
|
11208
|
-
}, propDecorators: { title: [{
|
|
11209
|
-
type: Input
|
|
11210
|
-
}] } });
|
|
11211
11075
|
|
|
11212
|
-
class
|
|
11076
|
+
class ElderDataViewOptionsProvider {
|
|
11213
11077
|
/***************************************************************************
|
|
11214
11078
|
* *
|
|
11215
11079
|
* Constructor *
|
|
11216
11080
|
* *
|
|
11217
11081
|
**************************************************************************/
|
|
11218
|
-
constructor(
|
|
11219
|
-
|
|
11220
|
-
|
|
11221
|
-
|
|
11082
|
+
constructor() {
|
|
11083
|
+
/***************************************************************************
|
|
11084
|
+
* *
|
|
11085
|
+
* Fields *
|
|
11086
|
+
* *
|
|
11087
|
+
**************************************************************************/
|
|
11088
|
+
this.options$ = new BehaviorSubject(ElderDataViewOptions.defaultOptions());
|
|
11089
|
+
}
|
|
11090
|
+
/***************************************************************************
|
|
11091
|
+
* *
|
|
11092
|
+
* Properties *
|
|
11093
|
+
* *
|
|
11094
|
+
**************************************************************************/
|
|
11095
|
+
get options() {
|
|
11096
|
+
return this.options$.getValue();
|
|
11222
11097
|
}
|
|
11223
11098
|
/***************************************************************************
|
|
11224
11099
|
* *
|
|
11225
11100
|
* Public API *
|
|
11226
11101
|
* *
|
|
11227
11102
|
**************************************************************************/
|
|
11228
|
-
|
|
11229
|
-
|
|
11230
|
-
|
|
11231
|
-
|
|
11232
|
-
|
|
11233
|
-
|
|
11234
|
-
|
|
11235
|
-
|
|
11236
|
-
|
|
11237
|
-
|
|
11103
|
+
/**
|
|
11104
|
+
* Example usage:
|
|
11105
|
+
*
|
|
11106
|
+
* this.updateOptions(
|
|
11107
|
+
* options => options.withInteractionMode('open')
|
|
11108
|
+
* .withFilters([])
|
|
11109
|
+
* )
|
|
11110
|
+
*
|
|
11111
|
+
* @param optionsFn function modifying the options
|
|
11112
|
+
*/
|
|
11113
|
+
updateOptions(optionsFn) {
|
|
11114
|
+
this.options$.next(optionsFn(this.options$.getValue()));
|
|
11238
11115
|
}
|
|
11239
11116
|
}
|
|
11240
|
-
ElderSelectionDialogDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionDialogDirective, deps: [{ token: i0.TemplateRef }, { token: i1$7.MatDialog }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11241
|
-
ElderSelectionDialogDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: ElderSelectionDialogDirective, selector: "[elderDialog]", inputs: { selectionModel: "selectionModel" }, outputs: { close: "close" }, exportAs: ["elderSelection"], ngImport: i0 });
|
|
11242
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionDialogDirective, decorators: [{
|
|
11243
|
-
type: Directive,
|
|
11244
|
-
args: [{
|
|
11245
|
-
selector: '[elderDialog]',
|
|
11246
|
-
exportAs: 'elderSelection'
|
|
11247
|
-
}]
|
|
11248
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i1$7.MatDialog }]; }, propDecorators: { selectionModel: [{
|
|
11249
|
-
type: Input
|
|
11250
|
-
}], close: [{
|
|
11251
|
-
type: Output
|
|
11252
|
-
}] } });
|
|
11253
|
-
|
|
11254
|
-
/**
|
|
11255
|
-
* @deprecated Please switch to ElderDialogService
|
|
11256
|
-
*/
|
|
11257
|
-
class EbsCommonDialogService extends ElderDialogService {
|
|
11258
|
-
}
|
|
11259
|
-
EbsCommonDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: EbsCommonDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
11260
|
-
EbsCommonDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: EbsCommonDialogService });
|
|
11261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: EbsCommonDialogService, decorators: [{
|
|
11262
|
-
type: Injectable
|
|
11263
|
-
}] });
|
|
11264
|
-
class ElderDialogModule {
|
|
11265
|
-
static forRoot() {
|
|
11266
|
-
return {
|
|
11267
|
-
ngModule: ElderDialogModule,
|
|
11268
|
-
providers: [
|
|
11269
|
-
// ElderDialogService,
|
|
11270
|
-
EbsCommonDialogService
|
|
11271
|
-
]
|
|
11272
|
-
};
|
|
11273
|
-
}
|
|
11274
|
-
}
|
|
11275
|
-
ElderDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11276
|
-
ElderDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogModule, declarations: [ElderConfirmDialogComponent,
|
|
11277
|
-
ElderQuestionDialogComponent,
|
|
11278
|
-
ElderSelectionDialogComponent,
|
|
11279
|
-
ElderSelectionDialogDirective], imports: [CommonModule, FormsModule,
|
|
11280
|
-
MatIconModule, MatButtonModule, MatDialogModule, MatToolbarModule, MatInputModule,
|
|
11281
|
-
A11yModule,
|
|
11282
|
-
FlexLayoutModule, TranslateModule], exports: [ElderConfirmDialogComponent,
|
|
11283
|
-
ElderQuestionDialogComponent,
|
|
11284
|
-
ElderSelectionDialogComponent,
|
|
11285
|
-
ElderSelectionDialogDirective] });
|
|
11286
|
-
ElderDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogModule, imports: [CommonModule, FormsModule,
|
|
11287
|
-
MatIconModule, MatButtonModule, MatDialogModule, MatToolbarModule, MatInputModule,
|
|
11288
|
-
A11yModule,
|
|
11289
|
-
FlexLayoutModule, TranslateModule] });
|
|
11290
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogModule, decorators: [{
|
|
11291
|
-
type: NgModule,
|
|
11292
|
-
args: [{
|
|
11293
|
-
imports: [
|
|
11294
|
-
CommonModule, FormsModule,
|
|
11295
|
-
MatIconModule, MatButtonModule, MatDialogModule, MatToolbarModule, MatInputModule,
|
|
11296
|
-
A11yModule,
|
|
11297
|
-
FlexLayoutModule, TranslateModule
|
|
11298
|
-
],
|
|
11299
|
-
declarations: [
|
|
11300
|
-
ElderConfirmDialogComponent,
|
|
11301
|
-
ElderQuestionDialogComponent,
|
|
11302
|
-
ElderSelectionDialogComponent,
|
|
11303
|
-
ElderSelectionDialogDirective
|
|
11304
|
-
],
|
|
11305
|
-
exports: [
|
|
11306
|
-
ElderConfirmDialogComponent,
|
|
11307
|
-
ElderQuestionDialogComponent,
|
|
11308
|
-
ElderSelectionDialogComponent,
|
|
11309
|
-
ElderSelectionDialogDirective
|
|
11310
|
-
]
|
|
11311
|
-
}]
|
|
11312
|
-
}] });
|
|
11313
11117
|
|
|
11314
|
-
|
|
11315
|
-
* This directive projects content identified by a placeholder id
|
|
11316
|
-
* into the toolbar at the corresponding place.
|
|
11317
|
-
*/
|
|
11318
|
-
class ElderToolbarContentDirective {
|
|
11319
|
-
constructor(templateRef) {
|
|
11320
|
-
this.templateRef = templateRef;
|
|
11321
|
-
}
|
|
11322
|
-
}
|
|
11323
|
-
ElderToolbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderToolbarContentDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11324
|
-
ElderToolbarContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: ElderToolbarContentDirective, selector: "[elderToolbarContent]", inputs: { placeholderId: ["elderToolbarContent", "placeholderId"] }, ngImport: i0 });
|
|
11325
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderToolbarContentDirective, decorators: [{
|
|
11326
|
-
type: Directive,
|
|
11327
|
-
args: [{ selector: '[elderToolbarContent]' }]
|
|
11328
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { placeholderId: [{
|
|
11329
|
-
type: Input,
|
|
11330
|
-
args: ['elderToolbarContent']
|
|
11331
|
-
}] } });
|
|
11332
|
-
class ElderDataToolbarComponent {
|
|
11118
|
+
class ElderDataViewBaseComponent {
|
|
11333
11119
|
/***************************************************************************
|
|
11334
11120
|
* *
|
|
11335
11121
|
* Constructor *
|
|
11336
11122
|
* *
|
|
11337
11123
|
**************************************************************************/
|
|
11338
|
-
constructor(selectionModel,
|
|
11339
|
-
this.
|
|
11340
|
-
|
|
11341
|
-
|
|
11342
|
-
|
|
11343
|
-
|
|
11344
|
-
|
|
11345
|
-
|
|
11346
|
-
|
|
11347
|
-
|
|
11348
|
-
this.
|
|
11349
|
-
|
|
11350
|
-
|
|
11124
|
+
constructor(selectionModel, dataViewOptionsProvider) {
|
|
11125
|
+
this.dataViewOptionsProvider = dataViewOptionsProvider;
|
|
11126
|
+
/***************************************************************************
|
|
11127
|
+
* *
|
|
11128
|
+
* Fields *
|
|
11129
|
+
* *
|
|
11130
|
+
**************************************************************************/
|
|
11131
|
+
/**
|
|
11132
|
+
* Underlying data context.
|
|
11133
|
+
*/
|
|
11134
|
+
this.dataContext$ = new BehaviorSubject(null);
|
|
11135
|
+
this.interactionMode = 'open';
|
|
11136
|
+
/**
|
|
11137
|
+
* Define if elder-table should clean up the
|
|
11138
|
+
* data-context resources for you.
|
|
11139
|
+
*
|
|
11140
|
+
* In more advanced scenarios where you plan to reuse the same data-context
|
|
11141
|
+
* set this to false and release the resources yourself. (dataContext.close)
|
|
11142
|
+
*/
|
|
11143
|
+
this.cleanUp = true;
|
|
11144
|
+
/**
|
|
11145
|
+
* If true, this table is in dense mode.
|
|
11146
|
+
* Heights are generally reduced.
|
|
11147
|
+
*/
|
|
11148
|
+
this._dense = false;
|
|
11149
|
+
/**
|
|
11150
|
+
* If true, this table is in a floating card mode.
|
|
11151
|
+
* Otherwise, it is flat on the current panel.
|
|
11152
|
+
*/
|
|
11153
|
+
this._float = false;
|
|
11154
|
+
/**
|
|
11155
|
+
* If true, this table is in embedded mode.
|
|
11156
|
+
* No borders / floating visible so that the table can be embedded into another container
|
|
11157
|
+
*/
|
|
11158
|
+
this._embedded = false;
|
|
11159
|
+
this._itemClickSubject = new Subject();
|
|
11160
|
+
this.EntityIdKeyFn = (entity) => entity ? this.getId(entity) : 0;
|
|
11161
|
+
this.destroy$ = new Subject();
|
|
11162
|
+
if (!selectionModel) {
|
|
11163
|
+
this.selectionModel = new SelectionModel(false, [], this.EntityIdKeyFn);
|
|
11351
11164
|
}
|
|
11352
|
-
|
|
11353
|
-
this.selectionModel =
|
|
11165
|
+
else {
|
|
11166
|
+
this.selectionModel = selectionModel;
|
|
11354
11167
|
}
|
|
11355
11168
|
}
|
|
11356
11169
|
/***************************************************************************
|
|
@@ -11358,1242 +11171,1433 @@ class ElderDataToolbarComponent {
|
|
|
11358
11171
|
* Life Cycle *
|
|
11359
11172
|
* *
|
|
11360
11173
|
**************************************************************************/
|
|
11361
|
-
ngOnInit() {
|
|
11174
|
+
ngOnInit() {
|
|
11175
|
+
if (this.dataViewOptionsProvider) {
|
|
11176
|
+
if (this.dataViewOptionsProvider.options.interactionMode === 'selection') {
|
|
11177
|
+
this.selectionVisible = true;
|
|
11178
|
+
this.float = false;
|
|
11179
|
+
}
|
|
11180
|
+
if (this.dataContext) {
|
|
11181
|
+
DataViewOptionsProviderBinding.of(this)
|
|
11182
|
+
.dataViewOptionsProvider(this.dataViewOptionsProvider)
|
|
11183
|
+
.bindUntil(this.destroy$);
|
|
11184
|
+
}
|
|
11185
|
+
}
|
|
11186
|
+
}
|
|
11187
|
+
ngOnDestroy() {
|
|
11188
|
+
this.destroy$.next();
|
|
11189
|
+
this.destroy$.complete();
|
|
11190
|
+
this.autoCleanUp();
|
|
11191
|
+
}
|
|
11362
11192
|
/***************************************************************************
|
|
11363
11193
|
* *
|
|
11364
11194
|
* Properties *
|
|
11365
11195
|
* *
|
|
11366
11196
|
**************************************************************************/
|
|
11367
|
-
|
|
11368
|
-
this.
|
|
11369
|
-
|
|
11370
|
-
|
|
11371
|
-
|
|
11372
|
-
|
|
11373
|
-
|
|
11197
|
+
get dataContext() {
|
|
11198
|
+
return this.dataContext$.getValue();
|
|
11199
|
+
}
|
|
11200
|
+
set dataContext(data) {
|
|
11201
|
+
this.dataContext$.next(data);
|
|
11202
|
+
this.onDataContextSet(data);
|
|
11203
|
+
}
|
|
11204
|
+
get dataActivePaged() {
|
|
11205
|
+
return this.dataContext;
|
|
11206
|
+
}
|
|
11207
|
+
get dataContinuable() {
|
|
11208
|
+
return this.dataContext;
|
|
11209
|
+
}
|
|
11210
|
+
get isContinuable() {
|
|
11211
|
+
if (!this.dataContext) {
|
|
11212
|
+
return false;
|
|
11374
11213
|
}
|
|
11214
|
+
return isContinuableDataContext(this.dataContext);
|
|
11375
11215
|
}
|
|
11376
|
-
get
|
|
11377
|
-
|
|
11216
|
+
get isActivePaged() {
|
|
11217
|
+
if (!this.dataContext) {
|
|
11218
|
+
return false;
|
|
11219
|
+
}
|
|
11220
|
+
return isActivePagedDataContext(this.dataContext);
|
|
11378
11221
|
}
|
|
11379
11222
|
/***************************************************************************
|
|
11380
11223
|
* *
|
|
11381
|
-
*
|
|
11224
|
+
* Selection Properties *
|
|
11382
11225
|
* *
|
|
11383
11226
|
**************************************************************************/
|
|
11384
|
-
|
|
11385
|
-
|
|
11386
|
-
return null;
|
|
11387
|
-
}
|
|
11388
|
-
const template = this.templates.find((item) => item.placeholderId === placeholderId);
|
|
11389
|
-
return template ? template.templateRef : null;
|
|
11227
|
+
set selectableEvaluatorFn(selectableEvaluatorFn) {
|
|
11228
|
+
this.selectionModel.selectableEvaluatorFn = selectableEvaluatorFn;
|
|
11390
11229
|
}
|
|
11391
|
-
|
|
11392
|
-
|
|
11393
|
-
this.dialogService
|
|
11394
|
-
.showConfirm({
|
|
11395
|
-
title: 'dialogs.confirm-deletion.title',
|
|
11396
|
-
message: 'dialogs.confirm-deletion.message',
|
|
11397
|
-
yesNo: true,
|
|
11398
|
-
interpolateParams: { numOfItems: items.length },
|
|
11399
|
-
})
|
|
11400
|
-
.subscribe((confirmed) => {
|
|
11401
|
-
if (confirmed) {
|
|
11402
|
-
this.emitRemove(items);
|
|
11403
|
-
}
|
|
11404
|
-
});
|
|
11405
|
-
}
|
|
11406
|
-
else {
|
|
11407
|
-
this.emitRemove(items);
|
|
11408
|
-
}
|
|
11230
|
+
set selection(selection) {
|
|
11231
|
+
this.selectionModel.replaceSelection(selection);
|
|
11409
11232
|
}
|
|
11410
|
-
|
|
11411
|
-
this.
|
|
11412
|
-
|
|
11413
|
-
|
|
11414
|
-
|
|
11415
|
-
|
|
11233
|
+
get selectionChange() {
|
|
11234
|
+
return this.selectionModel.changed;
|
|
11235
|
+
}
|
|
11236
|
+
get selectionSingleChange() {
|
|
11237
|
+
return this.selectionModel.changed.pipe(map((selection) => {
|
|
11238
|
+
if (selection.length > 0) {
|
|
11239
|
+
return selection[0];
|
|
11416
11240
|
}
|
|
11241
|
+
else {
|
|
11242
|
+
return null;
|
|
11243
|
+
}
|
|
11244
|
+
}));
|
|
11245
|
+
}
|
|
11246
|
+
set selectionMultiEnabled(enableMultiSelection) {
|
|
11247
|
+
if (this.selectionModel) {
|
|
11248
|
+
this.selectionModel.isMultipleSelection = enableMultiSelection;
|
|
11417
11249
|
}
|
|
11418
11250
|
}
|
|
11419
|
-
}
|
|
11420
|
-
ElderDataToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataToolbarComponent, deps: [{ token: SelectionModel, optional: true }, { token: ELDER_DATA_VIEW, optional: true }, { token: ElderDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11421
|
-
ElderDataToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderDataToolbarComponent, selector: "elder-data-toolbar", inputs: { canAdd: "canAdd", canRemove: "canRemove", canMore: "canMore", confirmRemoval: "confirmRemoval", keepSelectionAfterRemoval: "keepSelectionAfterRemoval", selectionModel: "selectionModel" }, outputs: { requestNew: "requestNew", requestRemove: "requestRemove" }, queries: [{ propertyName: "templates", predicate: ElderToolbarContentDirective }], ngImport: i0, template: "<!-- Table Toolbar -->\n<div\n fxLayout=\"row\"\n fxLayoutAlign=\"space-between center\"\n fxLayoutGap=\"10px\"\n style=\"padding: 4px 8px 0 8px\"\n *ngIf=\"selection$ | async as selection\"\n>\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('main') || defaultContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n</div>\n\n<!-- Default Templates -->\n\n<!-- Default Main Content -->\n<ng-template #defaultContent let-selection>\n <!-- Left column -->\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('left') || defaultLeftContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" fxFlex>\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('center') || defaultCenterContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n\n <!-- Right column -->\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right') || defaultRightContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n</ng-template>\n\n<!-- Default Left Content -->\n<ng-template #defaultLeftContent let-selection>\n <!-- Add Action -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n *ngIf=\"canAdd\"\n (click)=\"requestNew.next($event)\"\n >\n <mat-icon>add</mat-icon>\n </button>\n\n <!-- Placeholder for additional actions -->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('left.actions');\n context: { $implicit: selection }\n \"\n ></ng-container>\n</ng-template>\n\n<!-- Default Center Content -->\n<ng-template #defaultCenterContent let-selection> </ng-template>\n\n<!-- Default Right Content -->\n<ng-template #defaultRightContent let-selection>\n <!-- Placeholder for additional actions -->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right.actions');\n context: { $implicit: selection }\n \"\n ></ng-container>\n\n <!-- Delete Action -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n *ngIf=\"canRemove\"\n [disabled]=\"!selection?.length\"\n (click)=\"requestRemoveItems(selection)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n\n <!-- More Menu -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n [matMenuTriggerFor]=\"elderTableMenu\"\n [disabled]=\"!canMore\"\n >\n <mat-icon>more_vert</mat-icon>\n <mat-menu #elderTableMenu=\"matMenu\">\n <ng-content select=\"[mat-menu-item]\"></ng-content>\n <!-- Placeholder for mat menu items-->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right.menu');\n context: { $implicit: selection }\n \"\n ></ng-container>\n </mat-menu>\n </button>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11422
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataToolbarComponent, decorators: [{
|
|
11423
|
-
type: Component,
|
|
11424
|
-
args: [{ selector: 'elder-data-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Table Toolbar -->\n<div\n fxLayout=\"row\"\n fxLayoutAlign=\"space-between center\"\n fxLayoutGap=\"10px\"\n style=\"padding: 4px 8px 0 8px\"\n *ngIf=\"selection$ | async as selection\"\n>\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('main') || defaultContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n</div>\n\n<!-- Default Templates -->\n\n<!-- Default Main Content -->\n<ng-template #defaultContent let-selection>\n <!-- Left column -->\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('left') || defaultLeftContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" fxFlex>\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('center') || defaultCenterContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n\n <!-- Right column -->\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right') || defaultRightContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n</ng-template>\n\n<!-- Default Left Content -->\n<ng-template #defaultLeftContent let-selection>\n <!-- Add Action -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n *ngIf=\"canAdd\"\n (click)=\"requestNew.next($event)\"\n >\n <mat-icon>add</mat-icon>\n </button>\n\n <!-- Placeholder for additional actions -->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('left.actions');\n context: { $implicit: selection }\n \"\n ></ng-container>\n</ng-template>\n\n<!-- Default Center Content -->\n<ng-template #defaultCenterContent let-selection> </ng-template>\n\n<!-- Default Right Content -->\n<ng-template #defaultRightContent let-selection>\n <!-- Placeholder for additional actions -->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right.actions');\n context: { $implicit: selection }\n \"\n ></ng-container>\n\n <!-- Delete Action -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n *ngIf=\"canRemove\"\n [disabled]=\"!selection?.length\"\n (click)=\"requestRemoveItems(selection)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n\n <!-- More Menu -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n [matMenuTriggerFor]=\"elderTableMenu\"\n [disabled]=\"!canMore\"\n >\n <mat-icon>more_vert</mat-icon>\n <mat-menu #elderTableMenu=\"matMenu\">\n <ng-content select=\"[mat-menu-item]\"></ng-content>\n <!-- Placeholder for mat menu items-->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right.menu');\n context: { $implicit: selection }\n \"\n ></ng-container>\n </mat-menu>\n </button>\n</ng-template>\n" }]
|
|
11425
|
-
}], ctorParameters: function () {
|
|
11426
|
-
return [{ type: SelectionModel, decorators: [{
|
|
11427
|
-
type: Optional
|
|
11428
|
-
}] }, { type: undefined, decorators: [{
|
|
11429
|
-
type: Optional
|
|
11430
|
-
}, {
|
|
11431
|
-
type: Inject,
|
|
11432
|
-
args: [ELDER_DATA_VIEW]
|
|
11433
|
-
}] }, { type: ElderDialogService }];
|
|
11434
|
-
}, propDecorators: { canAdd: [{
|
|
11435
|
-
type: Input
|
|
11436
|
-
}], canRemove: [{
|
|
11437
|
-
type: Input
|
|
11438
|
-
}], canMore: [{
|
|
11439
|
-
type: Input
|
|
11440
|
-
}], confirmRemoval: [{
|
|
11441
|
-
type: Input
|
|
11442
|
-
}], keepSelectionAfterRemoval: [{
|
|
11443
|
-
type: Input
|
|
11444
|
-
}], requestNew: [{
|
|
11445
|
-
type: Output
|
|
11446
|
-
}], requestRemove: [{
|
|
11447
|
-
type: Output
|
|
11448
|
-
}], templates: [{
|
|
11449
|
-
type: ContentChildren,
|
|
11450
|
-
args: [ElderToolbarContentDirective]
|
|
11451
|
-
}], selectionModel: [{
|
|
11452
|
-
type: Input
|
|
11453
|
-
}] } });
|
|
11454
|
-
|
|
11455
|
-
class ElderSingleSortComponent {
|
|
11456
11251
|
/***************************************************************************
|
|
11457
11252
|
* *
|
|
11458
|
-
*
|
|
11253
|
+
* On click properties *
|
|
11459
11254
|
* *
|
|
11460
11255
|
**************************************************************************/
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
* *
|
|
11464
|
-
* Fields *
|
|
11465
|
-
* *
|
|
11466
|
-
**************************************************************************/
|
|
11467
|
-
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
11468
|
-
this.sort$ = new BehaviorSubject(Sort.NONE);
|
|
11469
|
-
this.availableSorts = [];
|
|
11470
|
-
this.sortChange = new EventEmitter();
|
|
11471
|
-
this.translationPrefix = 'documents.sorts.';
|
|
11256
|
+
get itemClick() {
|
|
11257
|
+
return this._itemClickSubject;
|
|
11472
11258
|
}
|
|
11473
11259
|
/***************************************************************************
|
|
11474
11260
|
* *
|
|
11475
|
-
*
|
|
11261
|
+
* Style Properties *
|
|
11476
11262
|
* *
|
|
11477
11263
|
**************************************************************************/
|
|
11478
|
-
|
|
11264
|
+
set dense(value) {
|
|
11265
|
+
this._dense = coerceBooleanProperty(value);
|
|
11266
|
+
}
|
|
11267
|
+
get dense() {
|
|
11268
|
+
return this._dense;
|
|
11269
|
+
}
|
|
11270
|
+
set float(value) {
|
|
11271
|
+
this._float = coerceBooleanProperty(value);
|
|
11272
|
+
}
|
|
11273
|
+
get float() {
|
|
11274
|
+
return this._float;
|
|
11275
|
+
}
|
|
11276
|
+
set embedded(value) {
|
|
11277
|
+
this._embedded = coerceBooleanProperty(value);
|
|
11278
|
+
}
|
|
11279
|
+
get embedded() {
|
|
11280
|
+
return this._embedded;
|
|
11479
11281
|
}
|
|
11480
11282
|
/***************************************************************************
|
|
11481
11283
|
* *
|
|
11482
|
-
*
|
|
11284
|
+
* Event Entry Points *
|
|
11483
11285
|
* *
|
|
11484
11286
|
**************************************************************************/
|
|
11485
|
-
|
|
11486
|
-
|
|
11487
|
-
|
|
11287
|
+
/**
|
|
11288
|
+
* Called after a new DataContext has been set.
|
|
11289
|
+
* Subclasses may add additional behaviour at this stage.
|
|
11290
|
+
* @param data
|
|
11291
|
+
* @protected
|
|
11292
|
+
*/
|
|
11293
|
+
onDataContextSet(data) {
|
|
11294
|
+
}
|
|
11295
|
+
onItemClick(entity) {
|
|
11296
|
+
if (entity) {
|
|
11297
|
+
switch (this.interactionMode) {
|
|
11298
|
+
case 'open':
|
|
11299
|
+
if (this.selectionModel.hasValue) {
|
|
11300
|
+
this.selectionModel.toggle(entity);
|
|
11301
|
+
}
|
|
11302
|
+
else {
|
|
11303
|
+
this._itemClickSubject.next(entity);
|
|
11304
|
+
}
|
|
11305
|
+
break;
|
|
11306
|
+
case 'selection':
|
|
11307
|
+
this.selectionModel.toggle(entity);
|
|
11308
|
+
break;
|
|
11309
|
+
}
|
|
11488
11310
|
}
|
|
11489
|
-
this.sort$.next(sort);
|
|
11490
11311
|
}
|
|
11491
|
-
|
|
11492
|
-
|
|
11312
|
+
onItemDoubleClick(entity) {
|
|
11313
|
+
if (entity) {
|
|
11314
|
+
switch (this.interactionMode) {
|
|
11315
|
+
// double click in open mode not supported
|
|
11316
|
+
case 'open':
|
|
11317
|
+
break;
|
|
11318
|
+
// double click in selection mode triggers normal item click
|
|
11319
|
+
case 'selection':
|
|
11320
|
+
this._itemClickSubject.next(entity);
|
|
11321
|
+
break;
|
|
11322
|
+
}
|
|
11323
|
+
}
|
|
11493
11324
|
}
|
|
11494
11325
|
/***************************************************************************
|
|
11495
11326
|
* *
|
|
11496
|
-
*
|
|
11327
|
+
* Private Methods *
|
|
11497
11328
|
* *
|
|
11498
11329
|
**************************************************************************/
|
|
11499
|
-
|
|
11500
|
-
|
|
11501
|
-
this.
|
|
11330
|
+
getId(entity) {
|
|
11331
|
+
var _a, _b;
|
|
11332
|
+
return ((_b = (_a = this.dataContext) === null || _a === void 0 ? void 0 : _a.dataSource) === null || _b === void 0 ? void 0 : _b.getId(entity)) || entity;
|
|
11502
11333
|
}
|
|
11503
|
-
|
|
11504
|
-
|
|
11505
|
-
|
|
11506
|
-
|
|
11507
|
-
|
|
11508
|
-
|
|
11509
|
-
|
|
11510
|
-
dir = 'asc';
|
|
11334
|
+
/**
|
|
11335
|
+
* Performs clean up of the current data context if auto clean up is enabled.
|
|
11336
|
+
*/
|
|
11337
|
+
autoCleanUp() {
|
|
11338
|
+
if (this.cleanUp && this.dataContext) {
|
|
11339
|
+
//this.logger.debug('Releasing DataContext resources to prevent memory leak. [cleanUp]="true"');
|
|
11340
|
+
this.dataContext.close();
|
|
11511
11341
|
}
|
|
11512
|
-
this.setSort(new Sort(this.sort.prop, dir));
|
|
11513
|
-
}
|
|
11514
|
-
setSort(sort) {
|
|
11515
|
-
this.sort = sort;
|
|
11516
|
-
this.sortChange.emit(sort);
|
|
11517
11342
|
}
|
|
11518
11343
|
}
|
|
11519
|
-
|
|
11520
|
-
|
|
11521
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type:
|
|
11522
|
-
type:
|
|
11523
|
-
|
|
11524
|
-
}], ctorParameters: function () { return []; }, propDecorators: { availableSorts: [{
|
|
11344
|
+
ElderDataViewBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataViewBaseComponent, deps: [{ token: SelectionModel }, { token: ElderDataViewOptionsProvider }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11345
|
+
ElderDataViewBaseComponent.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: ElderDataViewBaseComponent, inputs: { interactionMode: "interactionMode", cleanUp: "cleanUp", selectableEvaluatorFn: "selectableEvaluatorFn", selection: "selection", selectionMultiEnabled: "selectionMultiEnabled", dense: "dense", float: "float", embedded: "embedded" }, outputs: { selectionChange: "selectionChange", selectionSingleChange: "selectionSingleChange", itemClick: "itemClick" }, ngImport: i0 });
|
|
11346
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataViewBaseComponent, decorators: [{
|
|
11347
|
+
type: Directive
|
|
11348
|
+
}], ctorParameters: function () { return [{ type: SelectionModel }, { type: ElderDataViewOptionsProvider }]; }, propDecorators: { interactionMode: [{
|
|
11525
11349
|
type: Input
|
|
11526
|
-
}],
|
|
11350
|
+
}], cleanUp: [{
|
|
11351
|
+
type: Input
|
|
11352
|
+
}], selectableEvaluatorFn: [{
|
|
11353
|
+
type: Input
|
|
11354
|
+
}], selection: [{
|
|
11355
|
+
type: Input
|
|
11356
|
+
}], selectionChange: [{
|
|
11527
11357
|
type: Output
|
|
11528
|
-
}],
|
|
11358
|
+
}], selectionSingleChange: [{
|
|
11359
|
+
type: Output
|
|
11360
|
+
}], selectionMultiEnabled: [{
|
|
11529
11361
|
type: Input
|
|
11530
|
-
}],
|
|
11362
|
+
}], itemClick: [{
|
|
11363
|
+
type: Output
|
|
11364
|
+
}], dense: [{
|
|
11365
|
+
type: Input
|
|
11366
|
+
}], float: [{
|
|
11367
|
+
type: Input
|
|
11368
|
+
}], embedded: [{
|
|
11531
11369
|
type: Input
|
|
11532
11370
|
}] } });
|
|
11533
11371
|
|
|
11534
|
-
class
|
|
11535
|
-
|
|
11536
|
-
|
|
11537
|
-
|
|
11538
|
-
|
|
11539
|
-
|
|
11372
|
+
class ElderDialogConfig {
|
|
11373
|
+
}
|
|
11374
|
+
|
|
11375
|
+
class ConfirmDialogConfig extends ElderDialogConfig {
|
|
11376
|
+
}
|
|
11377
|
+
class ElderConfirmDialogComponent {
|
|
11378
|
+
constructor(dialogRef) {
|
|
11379
|
+
this.dialogRef = dialogRef;
|
|
11380
|
+
this.yesNo = false;
|
|
11540
11381
|
}
|
|
11541
11382
|
}
|
|
11383
|
+
ElderConfirmDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderConfirmDialogComponent, deps: [{ token: i1$7.MatDialogRef }], target: i0.ɵɵFactoryTarget.Component });
|
|
11384
|
+
ElderConfirmDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderConfirmDialogComponent, selector: "elder-confirm-dialog", ngImport: i0, template: "\n<h2 matDialogTitle translate>{{ title }}</h2>\n\n\n<mat-dialog-content>\n <p translate>{{ message }}</p>\n</mat-dialog-content>\n\n\n<mat-dialog-actions fxLayoutAlign=\"end center\" cdkTrapFocus>\n\n <button type=\"button\" mat-button\n (click)=\"dialogRef.close(false)\">\n {{ (yesNo ? \"actions.no\" : \"actions.cancel\") | translate}}\n </button>\n\n <button type=\"submit\" mat-raised-button cdkFocusInitial\n (click)=\"dialogRef.close(true)\">\n {{ (yesNo ? \"actions.yes\" : \"actions.ok\") | translate}}\n </button>\n\n</mat-dialog-actions>\n\n", styles: [""], dependencies: [{ kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$7.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$7.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$7.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
11385
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderConfirmDialogComponent, decorators: [{
|
|
11386
|
+
type: Component,
|
|
11387
|
+
args: [{ selector: 'elder-confirm-dialog', template: "\n<h2 matDialogTitle translate>{{ title }}</h2>\n\n\n<mat-dialog-content>\n <p translate>{{ message }}</p>\n</mat-dialog-content>\n\n\n<mat-dialog-actions fxLayoutAlign=\"end center\" cdkTrapFocus>\n\n <button type=\"button\" mat-button\n (click)=\"dialogRef.close(false)\">\n {{ (yesNo ? \"actions.no\" : \"actions.cancel\") | translate}}\n </button>\n\n <button type=\"submit\" mat-raised-button cdkFocusInitial\n (click)=\"dialogRef.close(true)\">\n {{ (yesNo ? \"actions.yes\" : \"actions.ok\") | translate}}\n </button>\n\n</mat-dialog-actions>\n\n" }]
|
|
11388
|
+
}], ctorParameters: function () { return [{ type: i1$7.MatDialogRef }]; } });
|
|
11542
11389
|
|
|
11543
|
-
class
|
|
11390
|
+
class QuestionDialogConfig extends ElderDialogConfig {
|
|
11391
|
+
}
|
|
11392
|
+
class ElderQuestionDialogComponent {
|
|
11393
|
+
constructor(dialogRef, data) {
|
|
11394
|
+
this.dialogRef = dialogRef;
|
|
11395
|
+
this.data = data;
|
|
11396
|
+
}
|
|
11397
|
+
ngOnInit() {
|
|
11398
|
+
}
|
|
11399
|
+
confirm(event) {
|
|
11400
|
+
this.dialogRef.close(this.answer);
|
|
11401
|
+
}
|
|
11402
|
+
cancel(event) {
|
|
11403
|
+
this.dialogRef.close();
|
|
11404
|
+
}
|
|
11405
|
+
get isValid() {
|
|
11406
|
+
return !!this.answer;
|
|
11407
|
+
}
|
|
11408
|
+
}
|
|
11409
|
+
ElderQuestionDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderQuestionDialogComponent, deps: [{ token: i1$7.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
11410
|
+
ElderQuestionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderQuestionDialogComponent, selector: "elder-question-dialog", ngImport: i0, template: "<h2 matDialogTitle translate>{{ data.title }}</h2>\n\n<form #f=\"ngForm\" fxLayout=\"column\" (ngSubmit)=\"confirm($event)\" cdkTrapFocus>\n\n <mat-dialog-content>\n <p>{{data.question}}</p>\n\n <mat-form-field class=\"full-width\">\n <input matInput type=\"text\" name=\"name\" [(ngModel)]=\"answer\" cdkFocusInitial\n placeholder=\"{{'context.name' | translate}}\" required>\n </mat-form-field>\n </mat-dialog-content>\n\n <mat-dialog-actions fxLayoutAlign=\"end center\" >\n\n <button mat-button type=\"button\"\n (click)=\"cancel($event)\">\n {{'actions.cancel' | translate}}\n </button>\n\n <button mat-button type=\"submit\" color=\"primary\"\n [disabled]=\"!isValid\">\n {{'actions.ok' | translate}}\n </button>\n\n </mat-dialog-actions>\n\n</form>\n", styles: [""], dependencies: [{ kind: "directive", type: i3.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "directive", type: i3.NgForm, selector: "form:not([ngNoForm]):not([formGroup]),ng-form,[ngForm]", inputs: ["ngFormOptions"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$7.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1$7.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i1$7.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i1$1.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2.TranslateDirective, selector: "[translate],[ngx-translate]", inputs: ["translate", "translateParams"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
11411
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderQuestionDialogComponent, decorators: [{
|
|
11412
|
+
type: Component,
|
|
11413
|
+
args: [{ selector: 'elder-question-dialog', template: "<h2 matDialogTitle translate>{{ data.title }}</h2>\n\n<form #f=\"ngForm\" fxLayout=\"column\" (ngSubmit)=\"confirm($event)\" cdkTrapFocus>\n\n <mat-dialog-content>\n <p>{{data.question}}</p>\n\n <mat-form-field class=\"full-width\">\n <input matInput type=\"text\" name=\"name\" [(ngModel)]=\"answer\" cdkFocusInitial\n placeholder=\"{{'context.name' | translate}}\" required>\n </mat-form-field>\n </mat-dialog-content>\n\n <mat-dialog-actions fxLayoutAlign=\"end center\" >\n\n <button mat-button type=\"button\"\n (click)=\"cancel($event)\">\n {{'actions.cancel' | translate}}\n </button>\n\n <button mat-button type=\"submit\" color=\"primary\"\n [disabled]=\"!isValid\">\n {{'actions.ok' | translate}}\n </button>\n\n </mat-dialog-actions>\n\n</form>\n" }]
|
|
11414
|
+
}], ctorParameters: function () {
|
|
11415
|
+
return [{ type: i1$7.MatDialogRef }, { type: undefined, decorators: [{
|
|
11416
|
+
type: Inject,
|
|
11417
|
+
args: [MAT_DIALOG_DATA]
|
|
11418
|
+
}] }];
|
|
11419
|
+
} });
|
|
11420
|
+
|
|
11421
|
+
class ElderDialogService {
|
|
11544
11422
|
/***************************************************************************
|
|
11545
11423
|
* *
|
|
11546
11424
|
* Constructor *
|
|
11547
11425
|
* *
|
|
11548
11426
|
**************************************************************************/
|
|
11549
|
-
constructor(
|
|
11427
|
+
constructor(dialog, translateService) {
|
|
11428
|
+
this.dialog = dialog;
|
|
11429
|
+
this.translateService = translateService;
|
|
11550
11430
|
/***************************************************************************
|
|
11551
11431
|
* *
|
|
11552
11432
|
* Fields *
|
|
11553
11433
|
* *
|
|
11554
11434
|
**************************************************************************/
|
|
11555
|
-
this.
|
|
11556
|
-
|
|
11557
|
-
|
|
11558
|
-
|
|
11559
|
-
|
|
11560
|
-
|
|
11561
|
-
|
|
11562
|
-
* *
|
|
11563
|
-
* Properties *
|
|
11564
|
-
* *
|
|
11565
|
-
**************************************************************************/
|
|
11566
|
-
set selectionModel(model) {
|
|
11567
|
-
this.selectionModel$.next(model);
|
|
11568
|
-
}
|
|
11569
|
-
get selectionModel() {
|
|
11570
|
-
return this.selectionModel$.getValue();
|
|
11571
|
-
}
|
|
11572
|
-
set dataContext(dataContext) {
|
|
11573
|
-
this.dataContext$.next(dataContext);
|
|
11574
|
-
}
|
|
11575
|
-
/** Whether the number of selected elements matches the totalSnapshot number of selectable rows. */
|
|
11576
|
-
get isAllSelectedSnapshot() {
|
|
11577
|
-
const numSelected = this.selectionModel.selectionSnapshot.length;
|
|
11578
|
-
const context = this.dataContext$.getValue();
|
|
11579
|
-
const numRows = context ? context.snapshot.data.length : 0;
|
|
11580
|
-
const numUnselectable = context ? context.snapshot.data.filter(i => !this.selectionModel.isSelectable(i)).length : 0;
|
|
11581
|
-
return numSelected >= numRows - numUnselectable; // True if all selectable items are selected
|
|
11435
|
+
this.defaultDialogConfig = {
|
|
11436
|
+
role: 'dialog',
|
|
11437
|
+
disableClose: false,
|
|
11438
|
+
autoFocus: true,
|
|
11439
|
+
restoreFocus: true,
|
|
11440
|
+
closeOnNavigation: false
|
|
11441
|
+
};
|
|
11582
11442
|
}
|
|
11583
11443
|
/***************************************************************************
|
|
11584
11444
|
* *
|
|
11585
11445
|
* Public API *
|
|
11586
11446
|
* *
|
|
11587
11447
|
**************************************************************************/
|
|
11588
|
-
/**
|
|
11589
|
-
|
|
11590
|
-
|
|
11591
|
-
|
|
11592
|
-
|
|
11593
|
-
|
|
11594
|
-
|
|
11595
|
-
|
|
11596
|
-
|
|
11597
|
-
|
|
11598
|
-
|
|
11599
|
-
|
|
11600
|
-
|
|
11601
|
-
|
|
11448
|
+
/**
|
|
11449
|
+
* @deprecated Use showConfirm({...}) instead
|
|
11450
|
+
*
|
|
11451
|
+
* @param title
|
|
11452
|
+
* @param message
|
|
11453
|
+
* @param config
|
|
11454
|
+
*/
|
|
11455
|
+
confirm(title, message, config) {
|
|
11456
|
+
return this.showConfirm({
|
|
11457
|
+
title: title,
|
|
11458
|
+
message: message,
|
|
11459
|
+
config: config || this.defaultDialogConfig
|
|
11460
|
+
});
|
|
11461
|
+
}
|
|
11462
|
+
/**
|
|
11463
|
+
* Creates a modal confirmation dialog.
|
|
11464
|
+
*
|
|
11465
|
+
* @param config object for conform dialog
|
|
11466
|
+
*/
|
|
11467
|
+
showConfirm(config) {
|
|
11468
|
+
if (!config) {
|
|
11469
|
+
throw new Error('Argument must not be null: config');
|
|
11470
|
+
}
|
|
11471
|
+
const rawMessages = new Map();
|
|
11472
|
+
rawMessages.set('title', config.title);
|
|
11473
|
+
rawMessages.set('message', config.message);
|
|
11474
|
+
return this.resolveTranslatedMap(rawMessages, config.interpolateParams).pipe(switchMap(messages => {
|
|
11475
|
+
const title = messages.get('title');
|
|
11476
|
+
const message = messages.get('message');
|
|
11477
|
+
let dialogRef;
|
|
11478
|
+
dialogRef = this.dialog.open(ElderConfirmDialogComponent, config.config);
|
|
11479
|
+
dialogRef.componentInstance.title = title;
|
|
11480
|
+
dialogRef.componentInstance.message = message;
|
|
11481
|
+
dialogRef.componentInstance.yesNo = config.yesNo;
|
|
11482
|
+
return dialogRef.afterClosed();
|
|
11483
|
+
}));
|
|
11484
|
+
}
|
|
11485
|
+
/**
|
|
11486
|
+
* @deprecated Use showQuestion({...}) instead
|
|
11487
|
+
*
|
|
11488
|
+
* Creates a modal question dialog.
|
|
11489
|
+
*
|
|
11490
|
+
* @param title
|
|
11491
|
+
* @param question
|
|
11492
|
+
* @param config
|
|
11493
|
+
*/
|
|
11494
|
+
question(title, question, config) {
|
|
11495
|
+
return this.showQuestion({
|
|
11496
|
+
title: title,
|
|
11497
|
+
question: question,
|
|
11498
|
+
config: config || this.defaultDialogConfig
|
|
11499
|
+
});
|
|
11500
|
+
}
|
|
11501
|
+
/**
|
|
11502
|
+
* Creates a modal question dialog.
|
|
11503
|
+
*
|
|
11504
|
+
* @param config
|
|
11505
|
+
*/
|
|
11506
|
+
showQuestion(config) {
|
|
11507
|
+
if (!config) {
|
|
11508
|
+
throw new Error('Argument must not be null: config');
|
|
11509
|
+
}
|
|
11510
|
+
const rawMessages = new Map();
|
|
11511
|
+
rawMessages.set('title', config.title);
|
|
11512
|
+
rawMessages.set('question', config.question);
|
|
11513
|
+
return this.resolveTranslatedMap(rawMessages, config.interpolateParams).pipe(switchMap(messages => {
|
|
11514
|
+
const title = messages.get('title');
|
|
11515
|
+
const question = messages.get('question');
|
|
11516
|
+
const dlgConf = config.config || new MatDialogConfig();
|
|
11517
|
+
dlgConf.data = {
|
|
11518
|
+
title: title,
|
|
11519
|
+
question: question
|
|
11520
|
+
};
|
|
11521
|
+
const dialogRef = this.dialog.open(ElderQuestionDialogComponent, dlgConf);
|
|
11522
|
+
return dialogRef.afterClosed()
|
|
11523
|
+
.pipe(filter(response => !!response));
|
|
11524
|
+
}));
|
|
11525
|
+
}
|
|
11526
|
+
/***************************************************************************
|
|
11602
11527
|
* *
|
|
11603
11528
|
* Private methods *
|
|
11604
11529
|
* *
|
|
11605
11530
|
**************************************************************************/
|
|
11606
|
-
|
|
11607
|
-
|
|
11531
|
+
resolveTranslatedMap(messages, interpolateParams) {
|
|
11532
|
+
const rawMessages = Array.from(messages.values());
|
|
11533
|
+
return this.translateInterpolatedParams(interpolateParams).pipe(switchMap(translatedParams => this.translateService.get(rawMessages, translatedParams)), map(translatedValues => {
|
|
11534
|
+
const translated = new Map();
|
|
11535
|
+
messages.forEach((rawValue, key) => {
|
|
11536
|
+
translated.set(key, translatedValues[rawValue] || rawValue);
|
|
11537
|
+
});
|
|
11538
|
+
return translated;
|
|
11539
|
+
}));
|
|
11608
11540
|
}
|
|
11609
|
-
|
|
11610
|
-
|
|
11611
|
-
|
|
11612
|
-
|
|
11541
|
+
/**
|
|
11542
|
+
* Translates a list of params
|
|
11543
|
+
*
|
|
11544
|
+
* @param interpolateParams
|
|
11545
|
+
*/
|
|
11546
|
+
translateInterpolatedParams(interpolateParams) {
|
|
11547
|
+
if (!interpolateParams) {
|
|
11548
|
+
return of({});
|
|
11549
|
+
}
|
|
11550
|
+
const values = Object.getOwnPropertyNames(interpolateParams)
|
|
11551
|
+
.map(key => interpolateParams[key])
|
|
11552
|
+
.filter(value => !!value)
|
|
11553
|
+
.map(value => value + '');
|
|
11554
|
+
return this.translateService.get(values).pipe(map(translated => {
|
|
11555
|
+
Object.getOwnPropertyNames(interpolateParams)
|
|
11556
|
+
.forEach(key => {
|
|
11557
|
+
const value = interpolateParams[key];
|
|
11558
|
+
interpolateParams[key] = translated[value];
|
|
11559
|
+
});
|
|
11560
|
+
return interpolateParams;
|
|
11613
11561
|
}));
|
|
11614
11562
|
}
|
|
11615
11563
|
}
|
|
11616
|
-
|
|
11617
|
-
|
|
11618
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type:
|
|
11619
|
-
type:
|
|
11564
|
+
ElderDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogService, deps: [{ token: i1$7.MatDialog }, { token: i2.TranslateService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
11565
|
+
ElderDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogService, providedIn: 'root' });
|
|
11566
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogService, decorators: [{
|
|
11567
|
+
type: Injectable,
|
|
11620
11568
|
args: [{
|
|
11621
|
-
|
|
11622
|
-
exportAs: 'elderDataContextSelection'
|
|
11569
|
+
providedIn: 'root'
|
|
11623
11570
|
}]
|
|
11624
|
-
}], ctorParameters: function () {
|
|
11625
|
-
return [{ type: SelectionModel, decorators: [{
|
|
11626
|
-
type: Optional
|
|
11627
|
-
}] }];
|
|
11628
|
-
}, propDecorators: { selectionModel: [{
|
|
11629
|
-
type: Input,
|
|
11630
|
-
args: ['elderDataContextSelectionModel']
|
|
11631
|
-
}], dataContext: [{
|
|
11632
|
-
type: Input,
|
|
11633
|
-
args: ['elderDataContextSelection']
|
|
11634
|
-
}] } });
|
|
11571
|
+
}], ctorParameters: function () { return [{ type: i1$7.MatDialog }, { type: i2.TranslateService }]; } });
|
|
11635
11572
|
|
|
11636
|
-
class
|
|
11573
|
+
class ElderSelectionDialogComponent {
|
|
11637
11574
|
/***************************************************************************
|
|
11638
11575
|
* *
|
|
11639
11576
|
* Constructor *
|
|
11640
11577
|
* *
|
|
11641
11578
|
**************************************************************************/
|
|
11642
|
-
constructor(
|
|
11643
|
-
this.
|
|
11644
|
-
|
|
11645
|
-
|
|
11646
|
-
|
|
11647
|
-
* *
|
|
11648
|
-
**************************************************************************/
|
|
11649
|
-
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
11579
|
+
constructor(dialogRef, data) {
|
|
11580
|
+
this.dialogRef = dialogRef;
|
|
11581
|
+
this.data = data;
|
|
11582
|
+
}
|
|
11583
|
+
ngOnInit() {
|
|
11650
11584
|
}
|
|
11651
11585
|
/***************************************************************************
|
|
11652
11586
|
* *
|
|
11653
|
-
*
|
|
11587
|
+
* Public API *
|
|
11654
11588
|
* *
|
|
11655
11589
|
**************************************************************************/
|
|
11656
|
-
|
|
11590
|
+
confirmSelection() {
|
|
11591
|
+
this.dialogRef.close();
|
|
11592
|
+
}
|
|
11593
|
+
ngAfterViewInit() {
|
|
11594
|
+
// this.dialogRef.updateSize('20vw', '20vh');
|
|
11657
11595
|
}
|
|
11658
11596
|
}
|
|
11659
|
-
|
|
11660
|
-
|
|
11661
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type:
|
|
11597
|
+
ElderSelectionDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionDialogComponent, deps: [{ token: i1$7.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
11598
|
+
ElderSelectionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderSelectionDialogComponent, selector: "elder-selection-dialog", inputs: { title: "title" }, ngImport: i0, template: "\n\n<div fxLayout=\"column\" fxFill>\n\n <div fxLayout=\"column\">\n <h2 *ngIf=\"title\">{{title | translate}}</h2>\n </div>\n\n <div fxLayout=\"column\" fxFlex>\n\n <ng-template [ngTemplateOutlet]=\"data.template\"></ng-template>\n\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n\n <button mat-button type=\"button\" mat-dialog-close>\n {{'actions.cancel' | translate}}\n </button>\n\n <button mat-raised-button type=\"button\"\n [disabled]=\"data.selectionModel.isEmpty()\"\n (click)=\"confirmSelection()\">\n {{'actions.select' | translate}}\n </button>\n\n </div>\n\n\n</div>\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i1$7.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }] });
|
|
11599
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionDialogComponent, decorators: [{
|
|
11662
11600
|
type: Component,
|
|
11663
|
-
args: [{ selector: 'elder-selection-
|
|
11664
|
-
}], ctorParameters: function () {
|
|
11601
|
+
args: [{ selector: 'elder-selection-dialog', template: "\n\n<div fxLayout=\"column\" fxFill>\n\n <div fxLayout=\"column\">\n <h2 *ngIf=\"title\">{{title | translate}}</h2>\n </div>\n\n <div fxLayout=\"column\" fxFlex>\n\n <ng-template [ngTemplateOutlet]=\"data.template\"></ng-template>\n\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n\n <button mat-button type=\"button\" mat-dialog-close>\n {{'actions.cancel' | translate}}\n </button>\n\n <button mat-raised-button type=\"button\"\n [disabled]=\"data.selectionModel.isEmpty()\"\n (click)=\"confirmSelection()\">\n {{'actions.select' | translate}}\n </button>\n\n </div>\n\n\n</div>\n\n" }]
|
|
11602
|
+
}], ctorParameters: function () {
|
|
11603
|
+
return [{ type: i1$7.MatDialogRef }, { type: undefined, decorators: [{
|
|
11604
|
+
type: Inject,
|
|
11605
|
+
args: [MAT_DIALOG_DATA]
|
|
11606
|
+
}] }];
|
|
11607
|
+
}, propDecorators: { title: [{
|
|
11608
|
+
type: Input
|
|
11609
|
+
}] } });
|
|
11665
11610
|
|
|
11666
|
-
class
|
|
11611
|
+
class ElderSelectionDialogDirective {
|
|
11667
11612
|
/***************************************************************************
|
|
11668
11613
|
* *
|
|
11669
11614
|
* Constructor *
|
|
11670
11615
|
* *
|
|
11671
11616
|
**************************************************************************/
|
|
11672
|
-
constructor() {
|
|
11673
|
-
|
|
11674
|
-
|
|
11675
|
-
|
|
11676
|
-
* *
|
|
11677
|
-
**************************************************************************/
|
|
11678
|
-
this.dataContext$ = new BehaviorSubject(null);
|
|
11679
|
-
}
|
|
11680
|
-
/***************************************************************************
|
|
11681
|
-
* *
|
|
11682
|
-
* Life Cycle *
|
|
11683
|
-
* *
|
|
11684
|
-
**************************************************************************/
|
|
11685
|
-
ngOnInit() {
|
|
11617
|
+
constructor(templateRef, dialog) {
|
|
11618
|
+
this.templateRef = templateRef;
|
|
11619
|
+
this.dialog = dialog;
|
|
11620
|
+
this.close = new EventEmitter();
|
|
11686
11621
|
}
|
|
11687
11622
|
/***************************************************************************
|
|
11688
11623
|
* *
|
|
11689
|
-
*
|
|
11624
|
+
* Public API *
|
|
11690
11625
|
* *
|
|
11691
11626
|
**************************************************************************/
|
|
11692
|
-
|
|
11693
|
-
this.
|
|
11627
|
+
open() {
|
|
11628
|
+
const dialogRef = this.dialog.open(ElderSelectionDialogComponent, {
|
|
11629
|
+
data: {
|
|
11630
|
+
template: this.templateRef,
|
|
11631
|
+
selectionModel: this.selectionModel
|
|
11632
|
+
},
|
|
11633
|
+
width: '80vw',
|
|
11634
|
+
height: '80vh'
|
|
11635
|
+
});
|
|
11636
|
+
dialogRef.afterClosed().subscribe(result => this.close.emit(result));
|
|
11694
11637
|
}
|
|
11695
11638
|
}
|
|
11696
|
-
|
|
11697
|
-
|
|
11698
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type:
|
|
11699
|
-
type:
|
|
11700
|
-
args: [{
|
|
11701
|
-
|
|
11639
|
+
ElderSelectionDialogDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionDialogDirective, deps: [{ token: i0.TemplateRef }, { token: i1$7.MatDialog }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11640
|
+
ElderSelectionDialogDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: ElderSelectionDialogDirective, selector: "[elderDialog]", inputs: { selectionModel: "selectionModel" }, outputs: { close: "close" }, exportAs: ["elderSelection"], ngImport: i0 });
|
|
11641
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionDialogDirective, decorators: [{
|
|
11642
|
+
type: Directive,
|
|
11643
|
+
args: [{
|
|
11644
|
+
selector: '[elderDialog]',
|
|
11645
|
+
exportAs: 'elderSelection'
|
|
11646
|
+
}]
|
|
11647
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i1$7.MatDialog }]; }, propDecorators: { selectionModel: [{
|
|
11702
11648
|
type: Input
|
|
11649
|
+
}], close: [{
|
|
11650
|
+
type: Output
|
|
11703
11651
|
}] } });
|
|
11704
11652
|
|
|
11705
|
-
|
|
11653
|
+
/**
|
|
11654
|
+
* @deprecated Please switch to ElderDialogService
|
|
11655
|
+
*/
|
|
11656
|
+
class EbsCommonDialogService extends ElderDialogService {
|
|
11706
11657
|
}
|
|
11707
|
-
|
|
11708
|
-
|
|
11709
|
-
|
|
11710
|
-
|
|
11711
|
-
|
|
11712
|
-
|
|
11713
|
-
|
|
11714
|
-
|
|
11715
|
-
|
|
11716
|
-
|
|
11717
|
-
|
|
11718
|
-
|
|
11719
|
-
|
|
11720
|
-
|
|
11721
|
-
|
|
11722
|
-
|
|
11723
|
-
|
|
11724
|
-
|
|
11725
|
-
|
|
11726
|
-
|
|
11727
|
-
|
|
11728
|
-
|
|
11729
|
-
|
|
11730
|
-
|
|
11731
|
-
|
|
11732
|
-
|
|
11733
|
-
|
|
11734
|
-
|
|
11735
|
-
|
|
11736
|
-
|
|
11658
|
+
EbsCommonDialogService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: EbsCommonDialogService, deps: null, target: i0.ɵɵFactoryTarget.Injectable });
|
|
11659
|
+
EbsCommonDialogService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: EbsCommonDialogService });
|
|
11660
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: EbsCommonDialogService, decorators: [{
|
|
11661
|
+
type: Injectable
|
|
11662
|
+
}] });
|
|
11663
|
+
class ElderDialogModule {
|
|
11664
|
+
static forRoot() {
|
|
11665
|
+
return {
|
|
11666
|
+
ngModule: ElderDialogModule,
|
|
11667
|
+
providers: [
|
|
11668
|
+
// ElderDialogService,
|
|
11669
|
+
EbsCommonDialogService
|
|
11670
|
+
]
|
|
11671
|
+
};
|
|
11672
|
+
}
|
|
11673
|
+
}
|
|
11674
|
+
ElderDialogModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
11675
|
+
ElderDialogModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogModule, declarations: [ElderConfirmDialogComponent,
|
|
11676
|
+
ElderQuestionDialogComponent,
|
|
11677
|
+
ElderSelectionDialogComponent,
|
|
11678
|
+
ElderSelectionDialogDirective], imports: [CommonModule, FormsModule,
|
|
11679
|
+
MatIconModule, MatButtonModule, MatDialogModule, MatToolbarModule, MatInputModule,
|
|
11680
|
+
A11yModule,
|
|
11681
|
+
FlexLayoutModule, TranslateModule], exports: [ElderConfirmDialogComponent,
|
|
11682
|
+
ElderQuestionDialogComponent,
|
|
11683
|
+
ElderSelectionDialogComponent,
|
|
11684
|
+
ElderSelectionDialogDirective] });
|
|
11685
|
+
ElderDialogModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogModule, imports: [CommonModule, FormsModule,
|
|
11686
|
+
MatIconModule, MatButtonModule, MatDialogModule, MatToolbarModule, MatInputModule,
|
|
11687
|
+
A11yModule,
|
|
11688
|
+
FlexLayoutModule, TranslateModule] });
|
|
11689
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDialogModule, decorators: [{
|
|
11737
11690
|
type: NgModule,
|
|
11738
11691
|
args: [{
|
|
11739
11692
|
imports: [
|
|
11740
|
-
CommonModule,
|
|
11741
|
-
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
MatButtonModule, MatIconModule, MatBadgeModule,
|
|
11745
|
-
MatProgressBarModule,
|
|
11746
|
-
MatDialogModule, MatTooltipModule,
|
|
11747
|
-
// translations
|
|
11748
|
-
TranslateModule, FlexLayoutModule,
|
|
11693
|
+
CommonModule, FormsModule,
|
|
11694
|
+
MatIconModule, MatButtonModule, MatDialogModule, MatToolbarModule, MatInputModule,
|
|
11695
|
+
A11yModule,
|
|
11696
|
+
FlexLayoutModule, TranslateModule
|
|
11749
11697
|
],
|
|
11750
11698
|
declarations: [
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11754
|
-
|
|
11755
|
-
DataContextSelectionDirective,
|
|
11756
|
-
DataContextStateIndicatorComponent
|
|
11699
|
+
ElderConfirmDialogComponent,
|
|
11700
|
+
ElderQuestionDialogComponent,
|
|
11701
|
+
ElderSelectionDialogComponent,
|
|
11702
|
+
ElderSelectionDialogDirective
|
|
11757
11703
|
],
|
|
11758
11704
|
exports: [
|
|
11759
|
-
|
|
11760
|
-
|
|
11761
|
-
|
|
11762
|
-
|
|
11763
|
-
|
|
11764
|
-
DataContextStateIndicatorComponent
|
|
11765
|
-
],
|
|
11705
|
+
ElderConfirmDialogComponent,
|
|
11706
|
+
ElderQuestionDialogComponent,
|
|
11707
|
+
ElderSelectionDialogComponent,
|
|
11708
|
+
ElderSelectionDialogDirective
|
|
11709
|
+
]
|
|
11766
11710
|
}]
|
|
11767
11711
|
}] });
|
|
11768
11712
|
|
|
11769
|
-
|
|
11713
|
+
/**
|
|
11714
|
+
* This directive projects content identified by a placeholder id
|
|
11715
|
+
* into the toolbar at the corresponding place.
|
|
11716
|
+
*/
|
|
11717
|
+
class ElderToolbarContentDirective {
|
|
11718
|
+
constructor(templateRef) {
|
|
11719
|
+
this.templateRef = templateRef;
|
|
11720
|
+
}
|
|
11721
|
+
}
|
|
11722
|
+
ElderToolbarContentDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderToolbarContentDirective, deps: [{ token: i0.TemplateRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
11723
|
+
ElderToolbarContentDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: ElderToolbarContentDirective, selector: "[elderToolbarContent]", inputs: { placeholderId: ["elderToolbarContent", "placeholderId"] }, ngImport: i0 });
|
|
11724
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderToolbarContentDirective, decorators: [{
|
|
11725
|
+
type: Directive,
|
|
11726
|
+
args: [{ selector: '[elderToolbarContent]' }]
|
|
11727
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }]; }, propDecorators: { placeholderId: [{
|
|
11728
|
+
type: Input,
|
|
11729
|
+
args: ['elderToolbarContent']
|
|
11730
|
+
}] } });
|
|
11731
|
+
class ElderDataToolbarComponent {
|
|
11732
|
+
/***************************************************************************
|
|
11733
|
+
* *
|
|
11734
|
+
* Constructor *
|
|
11735
|
+
* *
|
|
11736
|
+
**************************************************************************/
|
|
11737
|
+
constructor(selectionModel, dataView, dialogService) {
|
|
11738
|
+
this.dialogService = dialogService;
|
|
11739
|
+
this.canAdd = true;
|
|
11740
|
+
this.canRemove = true;
|
|
11741
|
+
this.canMore = true;
|
|
11742
|
+
this.confirmRemoval = true;
|
|
11743
|
+
this.keepSelectionAfterRemoval = false;
|
|
11744
|
+
this.requestNew = new Subject();
|
|
11745
|
+
this.requestRemove = new Subject();
|
|
11746
|
+
this.selectionFallback = new BehaviorSubject([]);
|
|
11747
|
+
this.selection$ = this.selectionFallback.asObservable();
|
|
11748
|
+
if (selectionModel) {
|
|
11749
|
+
this.selectionModel = selectionModel;
|
|
11750
|
+
}
|
|
11751
|
+
if (dataView) {
|
|
11752
|
+
this.selectionModel = dataView.selectionModel;
|
|
11753
|
+
}
|
|
11754
|
+
}
|
|
11755
|
+
/***************************************************************************
|
|
11756
|
+
* *
|
|
11757
|
+
* Life Cycle *
|
|
11758
|
+
* *
|
|
11759
|
+
**************************************************************************/
|
|
11760
|
+
ngOnInit() { }
|
|
11761
|
+
/***************************************************************************
|
|
11762
|
+
* *
|
|
11763
|
+
* Properties *
|
|
11764
|
+
* *
|
|
11765
|
+
**************************************************************************/
|
|
11766
|
+
set selectionModel(model) {
|
|
11767
|
+
this._selectionModel = model;
|
|
11768
|
+
if (model) {
|
|
11769
|
+
this.selection$ = model.selection;
|
|
11770
|
+
}
|
|
11771
|
+
else {
|
|
11772
|
+
this.selection$ = this.selectionFallback.asObservable();
|
|
11773
|
+
}
|
|
11774
|
+
}
|
|
11775
|
+
get selectionModel() {
|
|
11776
|
+
return this._selectionModel;
|
|
11777
|
+
}
|
|
11778
|
+
/***************************************************************************
|
|
11779
|
+
* *
|
|
11780
|
+
* Public API *
|
|
11781
|
+
* *
|
|
11782
|
+
**************************************************************************/
|
|
11783
|
+
getTemplate(placeholderId) {
|
|
11784
|
+
if (!this.templates) {
|
|
11785
|
+
return null;
|
|
11786
|
+
}
|
|
11787
|
+
const template = this.templates.find((item) => item.placeholderId === placeholderId);
|
|
11788
|
+
return template ? template.templateRef : null;
|
|
11789
|
+
}
|
|
11790
|
+
requestRemoveItems(items) {
|
|
11791
|
+
if (this.confirmRemoval) {
|
|
11792
|
+
this.dialogService
|
|
11793
|
+
.showConfirm({
|
|
11794
|
+
title: 'dialogs.confirm-deletion.title',
|
|
11795
|
+
message: 'dialogs.confirm-deletion.message',
|
|
11796
|
+
yesNo: true,
|
|
11797
|
+
interpolateParams: { numOfItems: items.length },
|
|
11798
|
+
})
|
|
11799
|
+
.subscribe((confirmed) => {
|
|
11800
|
+
if (confirmed) {
|
|
11801
|
+
this.emitRemove(items);
|
|
11802
|
+
}
|
|
11803
|
+
});
|
|
11804
|
+
}
|
|
11805
|
+
else {
|
|
11806
|
+
this.emitRemove(items);
|
|
11807
|
+
}
|
|
11808
|
+
}
|
|
11809
|
+
emitRemove(items) {
|
|
11810
|
+
this.requestRemove.next(items);
|
|
11811
|
+
if (!this.keepSelectionAfterRemoval) {
|
|
11812
|
+
// Clear the selection after deleting items
|
|
11813
|
+
if (this._selectionModel) {
|
|
11814
|
+
this._selectionModel.deselect(items);
|
|
11815
|
+
}
|
|
11816
|
+
}
|
|
11817
|
+
}
|
|
11818
|
+
}
|
|
11819
|
+
ElderDataToolbarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataToolbarComponent, deps: [{ token: SelectionModel, optional: true }, { token: ELDER_DATA_VIEW, optional: true }, { token: ElderDialogService }], target: i0.ɵɵFactoryTarget.Component });
|
|
11820
|
+
ElderDataToolbarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderDataToolbarComponent, selector: "elder-data-toolbar", inputs: { canAdd: "canAdd", canRemove: "canRemove", canMore: "canMore", confirmRemoval: "confirmRemoval", keepSelectionAfterRemoval: "keepSelectionAfterRemoval", selectionModel: "selectionModel" }, outputs: { requestNew: "requestNew", requestRemove: "requestRemove" }, queries: [{ propertyName: "templates", predicate: ElderToolbarContentDirective }], ngImport: i0, template: "<!-- Table Toolbar -->\n<div\n fxLayout=\"row\"\n fxLayoutAlign=\"space-between center\"\n fxLayoutGap=\"10px\"\n style=\"padding: 4px 8px 0 8px\"\n *ngIf=\"selection$ | async as selection\"\n>\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('main') || defaultContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n</div>\n\n<!-- Default Templates -->\n\n<!-- Default Main Content -->\n<ng-template #defaultContent let-selection>\n <!-- Left column -->\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('left') || defaultLeftContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" fxFlex>\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('center') || defaultCenterContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n\n <!-- Right column -->\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right') || defaultRightContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n</ng-template>\n\n<!-- Default Left Content -->\n<ng-template #defaultLeftContent let-selection>\n <!-- Add Action -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n *ngIf=\"canAdd\"\n (click)=\"requestNew.next($event)\"\n >\n <mat-icon>add</mat-icon>\n </button>\n\n <!-- Placeholder for additional actions -->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('left.actions');\n context: { $implicit: selection }\n \"\n ></ng-container>\n</ng-template>\n\n<!-- Default Center Content -->\n<ng-template #defaultCenterContent let-selection> </ng-template>\n\n<!-- Default Right Content -->\n<ng-template #defaultRightContent let-selection>\n <!-- Placeholder for additional actions -->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right.actions');\n context: { $implicit: selection }\n \"\n ></ng-container>\n\n <!-- Delete Action -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n *ngIf=\"canRemove\"\n [disabled]=\"!selection?.length\"\n (click)=\"requestRemoveItems(selection)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n\n <!-- More Menu -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n [matMenuTriggerFor]=\"elderTableMenu\"\n [disabled]=\"!canMore\"\n >\n <mat-icon>more_vert</mat-icon>\n <mat-menu #elderTableMenu=\"matMenu\">\n <ng-content select=\"[mat-menu-item]\"></ng-content>\n <!-- Placeholder for mat menu items-->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right.menu');\n context: { $implicit: selection }\n \"\n ></ng-container>\n </mat-menu>\n </button>\n</ng-template>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11821
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataToolbarComponent, decorators: [{
|
|
11822
|
+
type: Component,
|
|
11823
|
+
args: [{ selector: 'elder-data-toolbar', changeDetection: ChangeDetectionStrategy.OnPush, template: "<!-- Table Toolbar -->\n<div\n fxLayout=\"row\"\n fxLayoutAlign=\"space-between center\"\n fxLayoutGap=\"10px\"\n style=\"padding: 4px 8px 0 8px\"\n *ngIf=\"selection$ | async as selection\"\n>\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('main') || defaultContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n</div>\n\n<!-- Default Templates -->\n\n<!-- Default Main Content -->\n<ng-template #defaultContent let-selection>\n <!-- Left column -->\n <div fxLayout=\"row\" fxLayoutAlign=\"start center\">\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('left') || defaultLeftContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" fxFlex>\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('center') || defaultCenterContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n\n <!-- Right column -->\n <div fxLayout=\"row\" fxLayoutAlign=\"end center\">\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right') || defaultRightContent;\n context: { $implicit: selection }\n \"\n ></ng-container>\n </div>\n</ng-template>\n\n<!-- Default Left Content -->\n<ng-template #defaultLeftContent let-selection>\n <!-- Add Action -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n *ngIf=\"canAdd\"\n (click)=\"requestNew.next($event)\"\n >\n <mat-icon>add</mat-icon>\n </button>\n\n <!-- Placeholder for additional actions -->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('left.actions');\n context: { $implicit: selection }\n \"\n ></ng-container>\n</ng-template>\n\n<!-- Default Center Content -->\n<ng-template #defaultCenterContent let-selection> </ng-template>\n\n<!-- Default Right Content -->\n<ng-template #defaultRightContent let-selection>\n <!-- Placeholder for additional actions -->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right.actions');\n context: { $implicit: selection }\n \"\n ></ng-container>\n\n <!-- Delete Action -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n *ngIf=\"canRemove\"\n [disabled]=\"!selection?.length\"\n (click)=\"requestRemoveItems(selection)\"\n >\n <mat-icon>delete</mat-icon>\n </button>\n\n <!-- More Menu -->\n <button\n mat-icon-button type=\"button\"\n color=\"primary\"\n [matMenuTriggerFor]=\"elderTableMenu\"\n [disabled]=\"!canMore\"\n >\n <mat-icon>more_vert</mat-icon>\n <mat-menu #elderTableMenu=\"matMenu\">\n <ng-content select=\"[mat-menu-item]\"></ng-content>\n <!-- Placeholder for mat menu items-->\n <ng-container\n *ngTemplateOutlet=\"\n getTemplate('right.menu');\n context: { $implicit: selection }\n \"\n ></ng-container>\n </mat-menu>\n </button>\n</ng-template>\n" }]
|
|
11824
|
+
}], ctorParameters: function () {
|
|
11825
|
+
return [{ type: SelectionModel, decorators: [{
|
|
11826
|
+
type: Optional
|
|
11827
|
+
}] }, { type: undefined, decorators: [{
|
|
11828
|
+
type: Optional
|
|
11829
|
+
}, {
|
|
11830
|
+
type: Inject,
|
|
11831
|
+
args: [ELDER_DATA_VIEW]
|
|
11832
|
+
}] }, { type: ElderDialogService }];
|
|
11833
|
+
}, propDecorators: { canAdd: [{
|
|
11834
|
+
type: Input
|
|
11835
|
+
}], canRemove: [{
|
|
11836
|
+
type: Input
|
|
11837
|
+
}], canMore: [{
|
|
11838
|
+
type: Input
|
|
11839
|
+
}], confirmRemoval: [{
|
|
11840
|
+
type: Input
|
|
11841
|
+
}], keepSelectionAfterRemoval: [{
|
|
11842
|
+
type: Input
|
|
11843
|
+
}], requestNew: [{
|
|
11844
|
+
type: Output
|
|
11845
|
+
}], requestRemove: [{
|
|
11846
|
+
type: Output
|
|
11847
|
+
}], templates: [{
|
|
11848
|
+
type: ContentChildren,
|
|
11849
|
+
args: [ElderToolbarContentDirective]
|
|
11850
|
+
}], selectionModel: [{
|
|
11851
|
+
type: Input
|
|
11852
|
+
}] } });
|
|
11853
|
+
|
|
11854
|
+
class ElderSingleSortComponent {
|
|
11770
11855
|
/***************************************************************************
|
|
11771
11856
|
* *
|
|
11772
11857
|
* Constructor *
|
|
11773
11858
|
* *
|
|
11774
11859
|
**************************************************************************/
|
|
11775
|
-
constructor(
|
|
11776
|
-
this.dialogRef = dialogRef;
|
|
11777
|
-
this.data = data;
|
|
11778
|
-
this.selectionModel = selectionModel;
|
|
11860
|
+
constructor() {
|
|
11779
11861
|
/***************************************************************************
|
|
11780
11862
|
* *
|
|
11781
11863
|
* Fields *
|
|
11782
11864
|
* *
|
|
11783
11865
|
**************************************************************************/
|
|
11784
11866
|
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
11867
|
+
this.sort$ = new BehaviorSubject(Sort.NONE);
|
|
11868
|
+
this.availableSorts = [];
|
|
11869
|
+
this.sortChange = new EventEmitter();
|
|
11870
|
+
this.translationPrefix = 'documents.sorts.';
|
|
11785
11871
|
}
|
|
11786
11872
|
/***************************************************************************
|
|
11787
11873
|
* *
|
|
11788
|
-
*
|
|
11874
|
+
* Life Cycle *
|
|
11789
11875
|
* *
|
|
11790
11876
|
**************************************************************************/
|
|
11791
11877
|
ngOnInit() {
|
|
11792
11878
|
}
|
|
11793
|
-
|
|
11794
|
-
|
|
11795
|
-
|
|
11796
|
-
|
|
11797
|
-
|
|
11798
|
-
|
|
11799
|
-
|
|
11800
|
-
|
|
11801
|
-
|
|
11802
|
-
|
|
11803
|
-
}] }, { type: SelectionModel }];
|
|
11804
|
-
} });
|
|
11805
|
-
|
|
11806
|
-
class ColumnPositionSpec {
|
|
11807
|
-
constructor(position, relativeTo) {
|
|
11808
|
-
this.position = position;
|
|
11809
|
-
this.relativeTo = relativeTo;
|
|
11879
|
+
/***************************************************************************
|
|
11880
|
+
* *
|
|
11881
|
+
* Properties *
|
|
11882
|
+
* *
|
|
11883
|
+
**************************************************************************/
|
|
11884
|
+
set sort(sort) {
|
|
11885
|
+
if (!sort) {
|
|
11886
|
+
sort = Sort.NONE;
|
|
11887
|
+
}
|
|
11888
|
+
this.sort$.next(sort);
|
|
11810
11889
|
}
|
|
11811
|
-
|
|
11812
|
-
return
|
|
11890
|
+
get sort() {
|
|
11891
|
+
return this.sort$.getValue();
|
|
11813
11892
|
}
|
|
11814
|
-
|
|
11815
|
-
|
|
11893
|
+
/***************************************************************************
|
|
11894
|
+
* *
|
|
11895
|
+
* API *
|
|
11896
|
+
* *
|
|
11897
|
+
**************************************************************************/
|
|
11898
|
+
setSortProp(sortProp) {
|
|
11899
|
+
const sort = new Sort(sortProp, this.sort.dir);
|
|
11900
|
+
this.setSort(sort);
|
|
11901
|
+
}
|
|
11902
|
+
toggleSortDirection(event) {
|
|
11903
|
+
event.stopPropagation();
|
|
11904
|
+
let dir;
|
|
11905
|
+
if (this.sort.dir === 'asc') {
|
|
11906
|
+
dir = 'desc';
|
|
11907
|
+
}
|
|
11908
|
+
else {
|
|
11909
|
+
dir = 'asc';
|
|
11910
|
+
}
|
|
11911
|
+
this.setSort(new Sort(this.sort.prop, dir));
|
|
11912
|
+
}
|
|
11913
|
+
setSort(sort) {
|
|
11914
|
+
this.sort = sort;
|
|
11915
|
+
this.sortChange.emit(sort);
|
|
11816
11916
|
}
|
|
11817
11917
|
}
|
|
11818
|
-
|
|
11819
|
-
|
|
11820
|
-
|
|
11821
|
-
|
|
11822
|
-
|
|
11918
|
+
ElderSingleSortComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSingleSortComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
11919
|
+
ElderSingleSortComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderSingleSortComponent, selector: "elder-single-sort", inputs: { availableSorts: "availableSorts", translationPrefix: "translationPrefix", sort: "sort" }, outputs: { sortChange: "sortChange" }, ngImport: i0, template: "<div *ngIf=\"(sort$ | async) as sort\" fxLayout=\"row\" fxFlex=\"none\">\n\n <button mat-button type=\"button\" [matMenuTriggerFor]=\"menu\">\n\n {{ translationPrefix + sort.prop | translate}}\n\n <mat-icon style=\"font-size: 22px\">sort</mat-icon>\n\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item type=\"button\"\n *ngFor=\"let mysort of availableSorts\"\n (click)=\"setSortProp(mysort)\"\n >\n <mat-icon>sort</mat-icon>\n <span [class.mat-body-strong]=\"sort.prop == mysort\">{{translationPrefix + mysort | translate}}</span>\n </button>\n </mat-menu>\n\n </button>\n\n <button mat-icon-button type=\"button\" (click)=\"toggleSortDirection($event)\">\n <mat-icon style=\"font-size: 22px\">{{sort.dir === 'asc' ? 'arrow_downward' : 'arrow_upward'}}</mat-icon>\n </button>\n\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i8.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i8.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i8.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
11920
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSingleSortComponent, decorators: [{
|
|
11921
|
+
type: Component,
|
|
11922
|
+
args: [{ selector: 'elder-single-sort', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"(sort$ | async) as sort\" fxLayout=\"row\" fxFlex=\"none\">\n\n <button mat-button type=\"button\" [matMenuTriggerFor]=\"menu\">\n\n {{ translationPrefix + sort.prop | translate}}\n\n <mat-icon style=\"font-size: 22px\">sort</mat-icon>\n\n <mat-menu #menu=\"matMenu\">\n <button mat-menu-item type=\"button\"\n *ngFor=\"let mysort of availableSorts\"\n (click)=\"setSortProp(mysort)\"\n >\n <mat-icon>sort</mat-icon>\n <span [class.mat-body-strong]=\"sort.prop == mysort\">{{translationPrefix + mysort | translate}}</span>\n </button>\n </mat-menu>\n\n </button>\n\n <button mat-icon-button type=\"button\" (click)=\"toggleSortDirection($event)\">\n <mat-icon style=\"font-size: 22px\">{{sort.dir === 'asc' ? 'arrow_downward' : 'arrow_upward'}}</mat-icon>\n </button>\n\n</div>\n" }]
|
|
11923
|
+
}], ctorParameters: function () { return []; }, propDecorators: { availableSorts: [{
|
|
11924
|
+
type: Input
|
|
11925
|
+
}], sortChange: [{
|
|
11926
|
+
type: Output
|
|
11927
|
+
}], translationPrefix: [{
|
|
11928
|
+
type: Input
|
|
11929
|
+
}], sort: [{
|
|
11930
|
+
type: Input
|
|
11931
|
+
}] } });
|
|
11932
|
+
|
|
11933
|
+
class MasterSelectionState {
|
|
11934
|
+
constructor(count, allSelected, someSelected, anySelected) {
|
|
11935
|
+
this.count = count;
|
|
11936
|
+
this.allSelected = allSelected;
|
|
11937
|
+
this.someSelected = someSelected;
|
|
11938
|
+
this.anySelected = anySelected;
|
|
11823
11939
|
}
|
|
11824
11940
|
}
|
|
11825
|
-
|
|
11826
|
-
|
|
11941
|
+
|
|
11942
|
+
class DataContextSelectionDirective {
|
|
11943
|
+
/***************************************************************************
|
|
11944
|
+
* *
|
|
11945
|
+
* Constructor *
|
|
11946
|
+
* *
|
|
11947
|
+
**************************************************************************/
|
|
11948
|
+
constructor(selectionModel) {
|
|
11827
11949
|
/***************************************************************************
|
|
11828
11950
|
* *
|
|
11829
11951
|
* Fields *
|
|
11830
11952
|
* *
|
|
11831
11953
|
**************************************************************************/
|
|
11832
11954
|
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
11955
|
+
this.selectionModel$ = new BehaviorSubject(null);
|
|
11956
|
+
this.dataContext$ = new BehaviorSubject(null);
|
|
11957
|
+
this.selectionModel$.next(selectionModel);
|
|
11958
|
+
this.selectionState$ = this.buildSelectionState$(this.selectionModel$, this.dataContext$);
|
|
11833
11959
|
}
|
|
11834
11960
|
/***************************************************************************
|
|
11835
11961
|
* *
|
|
11836
|
-
*
|
|
11962
|
+
* Properties *
|
|
11837
11963
|
* *
|
|
11838
11964
|
**************************************************************************/
|
|
11839
|
-
|
|
11840
|
-
|
|
11841
|
-
|
|
11842
|
-
|
|
11843
|
-
return
|
|
11965
|
+
set selectionModel(model) {
|
|
11966
|
+
this.selectionModel$.next(model);
|
|
11967
|
+
}
|
|
11968
|
+
get selectionModel() {
|
|
11969
|
+
return this.selectionModel$.getValue();
|
|
11970
|
+
}
|
|
11971
|
+
set dataContext(dataContext) {
|
|
11972
|
+
this.dataContext$.next(dataContext);
|
|
11973
|
+
}
|
|
11974
|
+
/** Whether the number of selected elements matches the totalSnapshot number of selectable rows. */
|
|
11975
|
+
get isAllSelectedSnapshot() {
|
|
11976
|
+
const numSelected = this.selectionModel.selectionSnapshot.length;
|
|
11977
|
+
const context = this.dataContext$.getValue();
|
|
11978
|
+
const numRows = context ? context.snapshot.data.length : 0;
|
|
11979
|
+
const numUnselectable = context ? context.snapshot.data.filter(i => !this.selectionModel.isSelectable(i)).length : 0;
|
|
11980
|
+
return numSelected >= numRows - numUnselectable; // True if all selectable items are selected
|
|
11844
11981
|
}
|
|
11845
11982
|
/***************************************************************************
|
|
11846
11983
|
* *
|
|
11847
|
-
*
|
|
11984
|
+
* Public API *
|
|
11848
11985
|
* *
|
|
11849
11986
|
**************************************************************************/
|
|
11850
|
-
|
|
11851
|
-
|
|
11852
|
-
|
|
11853
|
-
|
|
11854
|
-
|
|
11855
|
-
startIndex: 0,
|
|
11856
|
-
endIndex: 0
|
|
11857
|
-
};
|
|
11858
|
-
for (const grp of groupHierarchy) {
|
|
11859
|
-
// grp defined position relative to prev group
|
|
11860
|
-
previousIndex = this.insertColumnsAt(sorted, grp.columns, grp.columnsPosition, previousIndex);
|
|
11861
|
-
}
|
|
11862
|
-
return sorted;
|
|
11863
|
-
}
|
|
11864
|
-
insertColumnsAt(existingColumns, groupItems, positionSpec, previousGroup) {
|
|
11865
|
-
let insertIndex;
|
|
11866
|
-
if (positionSpec.relativeTo) {
|
|
11867
|
-
insertIndex = this.calcInsertIndexRelativeToColumn(positionSpec.position, positionSpec.relativeTo, existingColumns);
|
|
11987
|
+
/** Selects all rows if they are not all selected; otherwise clear selection. */
|
|
11988
|
+
masterToggle() {
|
|
11989
|
+
this.log.debug('masterToggle triggered, toggling all!');
|
|
11990
|
+
if (this.isAllSelectedSnapshot) {
|
|
11991
|
+
this.selectionModel.clear();
|
|
11868
11992
|
}
|
|
11869
11993
|
else {
|
|
11870
|
-
|
|
11871
|
-
|
|
11872
|
-
|
|
11873
|
-
|
|
11874
|
-
startIndex: insertIndex,
|
|
11875
|
-
endIndex: insertIndex + groupItems.length
|
|
11876
|
-
};
|
|
11877
|
-
}
|
|
11878
|
-
calcInsertIndexRelativeToColumn(position, relativeToCol, existingColumns) {
|
|
11879
|
-
const relativeIndex = existingColumns
|
|
11880
|
-
.findIndex(c => c.cdkColumn.name === relativeToCol);
|
|
11881
|
-
switch (position) {
|
|
11882
|
-
case 'start':
|
|
11883
|
-
case 'after':
|
|
11884
|
-
// after relative
|
|
11885
|
-
return relativeIndex + 1;
|
|
11886
|
-
case 'before':
|
|
11887
|
-
case 'end':
|
|
11888
|
-
// before relative
|
|
11889
|
-
return relativeIndex;
|
|
11994
|
+
const context = this.dataContext$.getValue();
|
|
11995
|
+
if (context) {
|
|
11996
|
+
this.selectionModel.select(context.snapshot.data);
|
|
11997
|
+
}
|
|
11890
11998
|
}
|
|
11891
11999
|
}
|
|
11892
|
-
|
|
11893
|
-
|
|
11894
|
-
|
|
11895
|
-
|
|
11896
|
-
|
|
11897
|
-
|
|
11898
|
-
|
|
11899
|
-
// after relative to previous group
|
|
11900
|
-
return previousGroup.endIndex;
|
|
11901
|
-
case 'before':
|
|
11902
|
-
// before relative to previous group
|
|
11903
|
-
return previousGroup.startIndex;
|
|
11904
|
-
}
|
|
12000
|
+
/***************************************************************************
|
|
12001
|
+
* *
|
|
12002
|
+
* Private methods *
|
|
12003
|
+
* *
|
|
12004
|
+
**************************************************************************/
|
|
12005
|
+
buildSelectionState$(selectionModel$, dataContext$) {
|
|
12006
|
+
return combineLatest([selectionModel$, dataContext$]).pipe(filter(([model, dc]) => !!model && !!dc), switchMap(([model, dc]) => this.buildSelectionStateInner$(model, dc)));
|
|
11905
12007
|
}
|
|
11906
|
-
|
|
11907
|
-
return
|
|
11908
|
-
.
|
|
11909
|
-
return
|
|
11910
|
-
})
|
|
12008
|
+
buildSelectionStateInner$(model, dc) {
|
|
12009
|
+
return combineLatest([model.selection, dc.data]).pipe(map(([selection, currentData]) => {
|
|
12010
|
+
const unselectable = currentData.filter(i => !model.isSelectable(i));
|
|
12011
|
+
return new MasterSelectionState(selection.length, selection.length >= currentData.length - unselectable.length, selection.length > 0 && selection.length < currentData.length - unselectable.length, selection.length > 0);
|
|
12012
|
+
}));
|
|
11911
12013
|
}
|
|
11912
12014
|
}
|
|
12015
|
+
DataContextSelectionDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DataContextSelectionDirective, deps: [{ token: SelectionModel, optional: true }], target: i0.ɵɵFactoryTarget.Directive });
|
|
12016
|
+
DataContextSelectionDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: DataContextSelectionDirective, selector: "[elderDataContextSelection]", inputs: { selectionModel: ["elderDataContextSelectionModel", "selectionModel"], dataContext: ["elderDataContextSelection", "dataContext"] }, exportAs: ["elderDataContextSelection"], ngImport: i0 });
|
|
12017
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DataContextSelectionDirective, decorators: [{
|
|
12018
|
+
type: Directive,
|
|
12019
|
+
args: [{
|
|
12020
|
+
selector: '[elderDataContextSelection]',
|
|
12021
|
+
exportAs: 'elderDataContextSelection'
|
|
12022
|
+
}]
|
|
12023
|
+
}], ctorParameters: function () {
|
|
12024
|
+
return [{ type: SelectionModel, decorators: [{
|
|
12025
|
+
type: Optional
|
|
12026
|
+
}] }];
|
|
12027
|
+
}, propDecorators: { selectionModel: [{
|
|
12028
|
+
type: Input,
|
|
12029
|
+
args: ['elderDataContextSelectionModel']
|
|
12030
|
+
}], dataContext: [{
|
|
12031
|
+
type: Input,
|
|
12032
|
+
args: ['elderDataContextSelection']
|
|
12033
|
+
}] } });
|
|
11913
12034
|
|
|
11914
|
-
class
|
|
11915
|
-
constructor(id, index) {
|
|
11916
|
-
this.id = id;
|
|
11917
|
-
this.index = index;
|
|
11918
|
-
}
|
|
11919
|
-
static create(groupIndex) {
|
|
11920
|
-
return ElderTableGroup.of(UuidUtil.weakUuid4(), groupIndex);
|
|
11921
|
-
}
|
|
11922
|
-
static of(id, groupIndex) {
|
|
11923
|
-
return new ElderTableGroup(id, groupIndex);
|
|
11924
|
-
}
|
|
11925
|
-
}
|
|
11926
|
-
class ElderTableModel {
|
|
12035
|
+
class ElderSelectionMasterCheckboxComponent {
|
|
11927
12036
|
/***************************************************************************
|
|
11928
12037
|
* *
|
|
11929
12038
|
* Constructor *
|
|
11930
12039
|
* *
|
|
11931
12040
|
**************************************************************************/
|
|
11932
|
-
constructor() {
|
|
12041
|
+
constructor(dataContextSelection) {
|
|
12042
|
+
this.dataContextSelection = dataContextSelection;
|
|
11933
12043
|
/***************************************************************************
|
|
11934
12044
|
* *
|
|
11935
12045
|
* Fields *
|
|
11936
12046
|
* *
|
|
11937
12047
|
**************************************************************************/
|
|
11938
12048
|
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
11939
|
-
this.elderColumnLayout = new ElderColumnLayout();
|
|
11940
|
-
this._groups = new Map();
|
|
11941
|
-
this._columnGroups = new ReactiveMap();
|
|
11942
|
-
this._rowDefGroups = new ReactiveMap();
|
|
11943
|
-
this._sortGroups = new ReactiveMap();
|
|
11944
|
-
this.selectionVisible$ = new BehaviorSubject(false);
|
|
11945
|
-
/**
|
|
11946
|
-
* The columns to display explicitly set by the user.
|
|
11947
|
-
* We need to support inserting display columns by index or anchored to existing ones.
|
|
11948
|
-
* before([columns])
|
|
11949
|
-
* after()
|
|
11950
|
-
* start()
|
|
11951
|
-
* end([])
|
|
11952
|
-
* @private
|
|
11953
|
-
*/
|
|
11954
|
-
this.displayedColumns$ = new BehaviorSubject(undefined);
|
|
11955
|
-
this.displayedColumnsInner$ = this.renderDisplayedColumns(this.displayedColumns$, this.columnDefs$, this.selectionVisible$);
|
|
11956
12049
|
}
|
|
11957
12050
|
/***************************************************************************
|
|
11958
12051
|
* *
|
|
11959
|
-
*
|
|
12052
|
+
* Life Cycle *
|
|
11960
12053
|
* *
|
|
11961
12054
|
**************************************************************************/
|
|
11962
|
-
|
|
11963
|
-
this.selectionVisible$.next(visible);
|
|
11964
|
-
}
|
|
11965
|
-
get selectionVisible() {
|
|
11966
|
-
return this.selectionVisible$.getValue();
|
|
11967
|
-
}
|
|
11968
|
-
set displayedColumns(columns) {
|
|
11969
|
-
this.displayedColumns$.next(columns);
|
|
11970
|
-
}
|
|
11971
|
-
get displayedColumns() {
|
|
11972
|
-
return this.displayedColumns$.getValue();
|
|
12055
|
+
ngOnInit() {
|
|
11973
12056
|
}
|
|
12057
|
+
}
|
|
12058
|
+
ElderSelectionMasterCheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionMasterCheckboxComponent, deps: [{ token: DataContextSelectionDirective }], target: i0.ɵɵFactoryTarget.Component });
|
|
12059
|
+
ElderSelectionMasterCheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderSelectionMasterCheckboxComponent, selector: "elder-selection-master-checkbox", ngImport: i0, template: "<div\n *ngIf=\"\n dataContextSelection.selectionModel.isMultipleSelection\n && dataContextSelection?.selectionState$ | async as selectionState\"\n\n fxLayout=\"column\" fxFlex=\"none\"\n\n [matBadgeHidden]=\"selectionState.count === 0\"\n [matBadge]=\"selectionState.count + ''\"\n [matBadgePosition]=\"'above before'\"\n [matBadgeOverlap]=\"false\"\n [matBadgeSize]=\"'small'\"\n>\n <mat-checkbox fxFlex=\"none\"\n (change)=\"$event ? dataContextSelection.masterToggle() : null\"\n [checked]=\"selectionState.allSelected\"\n [indeterminate]=\"selectionState.someSelected\"\n >\n </mat-checkbox>\n</div>\n\n<!-- -->\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i1$8.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4$3.MatBadge, selector: "[matBadge]", inputs: ["matBadgeDisabled", "matBadgeColor", "matBadgeOverlap", "matBadgePosition", "matBadge", "matBadgeDescription", "matBadgeSize", "matBadgeHidden"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12060
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectionMasterCheckboxComponent, decorators: [{
|
|
12061
|
+
type: Component,
|
|
12062
|
+
args: [{ selector: 'elder-selection-master-checkbox', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div\n *ngIf=\"\n dataContextSelection.selectionModel.isMultipleSelection\n && dataContextSelection?.selectionState$ | async as selectionState\"\n\n fxLayout=\"column\" fxFlex=\"none\"\n\n [matBadgeHidden]=\"selectionState.count === 0\"\n [matBadge]=\"selectionState.count + ''\"\n [matBadgePosition]=\"'above before'\"\n [matBadgeOverlap]=\"false\"\n [matBadgeSize]=\"'small'\"\n>\n <mat-checkbox fxFlex=\"none\"\n (change)=\"$event ? dataContextSelection.masterToggle() : null\"\n [checked]=\"selectionState.allSelected\"\n [indeterminate]=\"selectionState.someSelected\"\n >\n </mat-checkbox>\n</div>\n\n<!-- -->\n" }]
|
|
12063
|
+
}], ctorParameters: function () { return [{ type: DataContextSelectionDirective }]; } });
|
|
12064
|
+
|
|
12065
|
+
class DataContextStateIndicatorComponent {
|
|
11974
12066
|
/***************************************************************************
|
|
11975
12067
|
* *
|
|
11976
|
-
*
|
|
12068
|
+
* Constructor *
|
|
11977
12069
|
* *
|
|
11978
12070
|
**************************************************************************/
|
|
11979
|
-
|
|
11980
|
-
|
|
11981
|
-
|
|
11982
|
-
|
|
11983
|
-
|
|
11984
|
-
|
|
11985
|
-
|
|
11986
|
-
return this._sortGroups.values$;
|
|
11987
|
-
}
|
|
11988
|
-
// ---
|
|
11989
|
-
valuesSortedByGroupIndex(myMap, groups) {
|
|
11990
|
-
return Array.from(myMap.entries())
|
|
11991
|
-
.sort(([a_key], [b_key]) => {
|
|
11992
|
-
var _a, _b, _c, _d;
|
|
11993
|
-
const grpAIndex = (_b = (_a = groups.get(a_key)) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : 0;
|
|
11994
|
-
const grpBIndex = (_d = (_c = groups.get(b_key)) === null || _c === void 0 ? void 0 : _c.index) !== null && _d !== void 0 ? _d : 0;
|
|
11995
|
-
return naturalValueComparator(grpAIndex, grpBIndex);
|
|
11996
|
-
}).map(([a_key, a_value]) => a_value);
|
|
11997
|
-
}
|
|
11998
|
-
sortAndFlatten(reactMap) {
|
|
11999
|
-
return reactMap.map$.pipe(map(myMap => this.valuesSortedByGroupIndex(myMap, this._groups)), map(columns => CollectionUtil.flatten(columns)));
|
|
12071
|
+
constructor() {
|
|
12072
|
+
/***************************************************************************
|
|
12073
|
+
* *
|
|
12074
|
+
* Fields *
|
|
12075
|
+
* *
|
|
12076
|
+
**************************************************************************/
|
|
12077
|
+
this.dataContext$ = new BehaviorSubject(null);
|
|
12000
12078
|
}
|
|
12001
|
-
/*
|
|
12002
|
-
public get sortHeaders$(): Observable<MatSortHeader[]> {
|
|
12003
|
-
return this._sortGroups.values$.pipe(
|
|
12004
|
-
map(groups => this.flattenDefs(groups))
|
|
12005
|
-
);
|
|
12006
|
-
}*/
|
|
12007
12079
|
/***************************************************************************
|
|
12008
12080
|
* *
|
|
12009
|
-
*
|
|
12081
|
+
* Life Cycle *
|
|
12010
12082
|
* *
|
|
12011
12083
|
**************************************************************************/
|
|
12012
|
-
|
|
12013
|
-
this._groups.set(group.id, group);
|
|
12014
|
-
}
|
|
12015
|
-
updateColumnGroup(group, columnGroup) {
|
|
12016
|
-
this._columnGroups.set(group.id, columnGroup);
|
|
12017
|
-
}
|
|
12018
|
-
updateRowDefs(group, rows) {
|
|
12019
|
-
this._rowDefGroups.set(group.id, rows);
|
|
12020
|
-
}
|
|
12021
|
-
updateSortGroup(group, sort) {
|
|
12022
|
-
this._sortGroups.set(group.id, sort);
|
|
12023
|
-
}
|
|
12024
|
-
clearColumnDefGroup(group) {
|
|
12025
|
-
this._columnGroups.delete(group.id);
|
|
12026
|
-
}
|
|
12027
|
-
clearRowDefGroup(group) {
|
|
12028
|
-
this._rowDefGroups.delete(group.id);
|
|
12029
|
-
}
|
|
12030
|
-
clearSortGroup(group) {
|
|
12031
|
-
this._sortGroups.delete(group.id);
|
|
12032
|
-
}
|
|
12033
|
-
deRegisterGroup(group) {
|
|
12034
|
-
this.clearColumnDefGroup(group);
|
|
12035
|
-
this.clearRowDefGroup(group);
|
|
12036
|
-
this.clearSortGroup(group);
|
|
12037
|
-
this._groups.delete(group.id);
|
|
12084
|
+
ngOnInit() {
|
|
12038
12085
|
}
|
|
12039
12086
|
/***************************************************************************
|
|
12040
12087
|
* *
|
|
12041
|
-
*
|
|
12088
|
+
* Properties *
|
|
12042
12089
|
* *
|
|
12043
12090
|
**************************************************************************/
|
|
12044
|
-
|
|
12045
|
-
|
|
12046
|
-
let columns = displayedColumns;
|
|
12047
|
-
if (!columns) {
|
|
12048
|
-
columns = [];
|
|
12049
|
-
// If the user did not define columns to display
|
|
12050
|
-
// Assume he wants all his own columns in given order
|
|
12051
|
-
if (columnDefs) {
|
|
12052
|
-
columnDefs.forEach(col => {
|
|
12053
|
-
columns.push(col.name);
|
|
12054
|
-
});
|
|
12055
|
-
}
|
|
12056
|
-
}
|
|
12057
|
-
if (this.selectionVisible) {
|
|
12058
|
-
columns = ['select', ...columns];
|
|
12059
|
-
}
|
|
12060
|
-
return columns;
|
|
12061
|
-
}));
|
|
12091
|
+
set dataContext(dataContext) {
|
|
12092
|
+
this.dataContext$.next(dataContext);
|
|
12062
12093
|
}
|
|
12063
12094
|
}
|
|
12064
|
-
|
|
12065
|
-
|
|
12066
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type:
|
|
12067
|
-
type:
|
|
12068
|
-
|
|
12095
|
+
DataContextStateIndicatorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DataContextStateIndicatorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
12096
|
+
DataContextStateIndicatorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: DataContextStateIndicatorComponent, selector: "elder-data-context-state-indicator", inputs: { dataContext: "dataContext" }, ngImport: i0, template: "<ng-container *ngIf=\"dataContext$ | async as dataContext\">\n\n <ng-container *ngIf=\"dataContext else noDataContext\">\n\n <ng-container *ngIf=\"(dataContext.isStarted$ | async) else dataContextNotStarted\">\n\n <ng-container *ngIf=\"!(dataContext?.status | async)?.hasError else dataContextHasError\">\n\n <ng-container *ngIf=\"(dataContext?.data | async)?.length === 0\">\n <ng-template [ngTemplateOutlet]=\"dataContextNoData\"></ng-template>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n</ng-container>\n\n<ng-template #noDataContext>\n <ng-container *ngTemplateOutlet=\"indicator; context:{icon: 'warning', text: 'No data context'}\">\n </ng-container>\n</ng-template>\n\n<ng-template #dataContextNotStarted>\n <ng-container *ngTemplateOutlet=\"indicator; context:{icon: 'warning', text: 'Data context not started'}\">\n </ng-container>\n</ng-template>\n\n<ng-template #dataContextHasError>\n <ng-container *ngTemplateOutlet=\"indicator; context:{icon: 'warning', iconColor: 'warn', text: 'Error while loading data'}\">\n </ng-container>\n</ng-template>\n\n<ng-template #dataContextNoData>\n <ng-container *ngTemplateOutlet=\"indicator; context:{icon: 'info', text: 'No data available'}\">\n </ng-container>\n</ng-template>\n\n<ng-template #indicator let-icon=\"icon\" let-iconColor=\"iconColor\" let-text=\"text\">\n\n <div fxFill\n fxLayout=\"column\"\n fxLayoutAlign=\"center center\"\n class=\"elder-dc-indicator-container mat-body-1\"\n >\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" fxLayoutGap=\"16px\">\n <mat-icon [color]=\"iconColor\">{{icon}}</mat-icon>\n <span class=\"hint mat-body-1\">{{text | translate}}</span>\n </div>\n\n </div>\n\n</ng-template>\n", styles: [".elder-dc-indicator-container{color:gray;padding-top:96px;padding-bottom:96px}\n"], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
12097
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DataContextStateIndicatorComponent, decorators: [{
|
|
12098
|
+
type: Component,
|
|
12099
|
+
args: [{ selector: 'elder-data-context-state-indicator', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"dataContext$ | async as dataContext\">\n\n <ng-container *ngIf=\"dataContext else noDataContext\">\n\n <ng-container *ngIf=\"(dataContext.isStarted$ | async) else dataContextNotStarted\">\n\n <ng-container *ngIf=\"!(dataContext?.status | async)?.hasError else dataContextHasError\">\n\n <ng-container *ngIf=\"(dataContext?.data | async)?.length === 0\">\n <ng-template [ngTemplateOutlet]=\"dataContextNoData\"></ng-template>\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n </ng-container>\n\n</ng-container>\n\n<ng-template #noDataContext>\n <ng-container *ngTemplateOutlet=\"indicator; context:{icon: 'warning', text: 'No data context'}\">\n </ng-container>\n</ng-template>\n\n<ng-template #dataContextNotStarted>\n <ng-container *ngTemplateOutlet=\"indicator; context:{icon: 'warning', text: 'Data context not started'}\">\n </ng-container>\n</ng-template>\n\n<ng-template #dataContextHasError>\n <ng-container *ngTemplateOutlet=\"indicator; context:{icon: 'warning', iconColor: 'warn', text: 'Error while loading data'}\">\n </ng-container>\n</ng-template>\n\n<ng-template #dataContextNoData>\n <ng-container *ngTemplateOutlet=\"indicator; context:{icon: 'info', text: 'No data available'}\">\n </ng-container>\n</ng-template>\n\n<ng-template #indicator let-icon=\"icon\" let-iconColor=\"iconColor\" let-text=\"text\">\n\n <div fxFill\n fxLayout=\"column\"\n fxLayoutAlign=\"center center\"\n class=\"elder-dc-indicator-container mat-body-1\"\n >\n\n <div fxLayout=\"row\" fxLayoutAlign=\"center center\" fxLayoutGap=\"16px\">\n <mat-icon [color]=\"iconColor\">{{icon}}</mat-icon>\n <span class=\"hint mat-body-1\">{{text | translate}}</span>\n </div>\n\n </div>\n\n</ng-template>\n", styles: [".elder-dc-indicator-container{color:gray;padding-top:96px;padding-bottom:96px}\n"] }]
|
|
12100
|
+
}], ctorParameters: function () { return []; }, propDecorators: { dataContext: [{
|
|
12101
|
+
type: Input
|
|
12102
|
+
}] } });
|
|
12069
12103
|
|
|
12070
|
-
|
|
12071
|
-
return modelProvider !== null && modelProvider !== void 0 ? modelProvider : newElderTableModel();
|
|
12072
|
-
}
|
|
12073
|
-
function newElderTableModel() {
|
|
12074
|
-
return new ElderTableModel();
|
|
12075
|
-
}
|
|
12076
|
-
class ElderTableProviders {
|
|
12104
|
+
class ElderDataCommonModule {
|
|
12077
12105
|
}
|
|
12078
|
-
|
|
12079
|
-
|
|
12080
|
-
|
|
12081
|
-
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
|
|
12086
|
-
|
|
12087
|
-
|
|
12088
|
-
|
|
12089
|
-
|
|
12090
|
-
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12094
|
-
|
|
12095
|
-
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12106
|
-
};
|
|
12106
|
+
ElderDataCommonModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataCommonModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
12107
|
+
ElderDataCommonModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.6", ngImport: i0, type: ElderDataCommonModule, declarations: [ElderDataToolbarComponent,
|
|
12108
|
+
ElderToolbarContentDirective,
|
|
12109
|
+
ElderSingleSortComponent,
|
|
12110
|
+
ElderSelectionMasterCheckboxComponent,
|
|
12111
|
+
DataContextSelectionDirective,
|
|
12112
|
+
DataContextStateIndicatorComponent], imports: [CommonModule, RouterModule,
|
|
12113
|
+
// Material
|
|
12114
|
+
MatDividerModule,
|
|
12115
|
+
MatCheckboxModule, MatMenuModule,
|
|
12116
|
+
MatButtonModule, MatIconModule, MatBadgeModule,
|
|
12117
|
+
MatProgressBarModule,
|
|
12118
|
+
MatDialogModule, MatTooltipModule,
|
|
12119
|
+
// translations
|
|
12120
|
+
TranslateModule, FlexLayoutModule], exports: [ElderDataToolbarComponent,
|
|
12121
|
+
ElderToolbarContentDirective,
|
|
12122
|
+
ElderSingleSortComponent,
|
|
12123
|
+
ElderSelectionMasterCheckboxComponent,
|
|
12124
|
+
DataContextSelectionDirective,
|
|
12125
|
+
DataContextStateIndicatorComponent] });
|
|
12126
|
+
ElderDataCommonModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataCommonModule, imports: [CommonModule, RouterModule,
|
|
12127
|
+
// Material
|
|
12128
|
+
MatDividerModule,
|
|
12129
|
+
MatCheckboxModule, MatMenuModule,
|
|
12130
|
+
MatButtonModule, MatIconModule, MatBadgeModule,
|
|
12131
|
+
MatProgressBarModule,
|
|
12132
|
+
MatDialogModule, MatTooltipModule,
|
|
12133
|
+
// translations
|
|
12134
|
+
TranslateModule, FlexLayoutModule] });
|
|
12135
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataCommonModule, decorators: [{
|
|
12136
|
+
type: NgModule,
|
|
12137
|
+
args: [{
|
|
12138
|
+
imports: [
|
|
12139
|
+
CommonModule, RouterModule,
|
|
12140
|
+
// Material
|
|
12141
|
+
MatDividerModule,
|
|
12142
|
+
MatCheckboxModule, MatMenuModule,
|
|
12143
|
+
MatButtonModule, MatIconModule, MatBadgeModule,
|
|
12144
|
+
MatProgressBarModule,
|
|
12145
|
+
MatDialogModule, MatTooltipModule,
|
|
12146
|
+
// translations
|
|
12147
|
+
TranslateModule, FlexLayoutModule,
|
|
12148
|
+
],
|
|
12149
|
+
declarations: [
|
|
12150
|
+
ElderDataToolbarComponent,
|
|
12151
|
+
ElderToolbarContentDirective,
|
|
12152
|
+
ElderSingleSortComponent,
|
|
12153
|
+
ElderSelectionMasterCheckboxComponent,
|
|
12154
|
+
DataContextSelectionDirective,
|
|
12155
|
+
DataContextStateIndicatorComponent
|
|
12156
|
+
],
|
|
12157
|
+
exports: [
|
|
12158
|
+
ElderDataToolbarComponent,
|
|
12159
|
+
ElderToolbarContentDirective,
|
|
12160
|
+
ElderSingleSortComponent,
|
|
12161
|
+
ElderSelectionMasterCheckboxComponent,
|
|
12162
|
+
DataContextSelectionDirective,
|
|
12163
|
+
DataContextStateIndicatorComponent
|
|
12164
|
+
],
|
|
12165
|
+
}]
|
|
12166
|
+
}] });
|
|
12107
12167
|
|
|
12108
|
-
|
|
12109
|
-
* Configures the selection mode on supporting components.
|
|
12110
|
-
*/
|
|
12111
|
-
class ElderDataViewSelectionMode {
|
|
12112
|
-
constructor() {
|
|
12113
|
-
this.sorts = [];
|
|
12114
|
-
this.filters = [];
|
|
12115
|
-
this.multi = false;
|
|
12116
|
-
}
|
|
12117
|
-
}
|
|
12118
|
-
function createSelectionModel() {
|
|
12119
|
-
return new SelectionModel();
|
|
12120
|
-
}
|
|
12121
|
-
function createDataViewSelection() {
|
|
12122
|
-
return new ElderDataViewSelectionMode();
|
|
12123
|
-
}
|
|
12124
|
-
class SelectionModelPopupDirective {
|
|
12168
|
+
class ElderTableRowDirective {
|
|
12125
12169
|
/***************************************************************************
|
|
12126
12170
|
* *
|
|
12127
12171
|
* Constructor *
|
|
12128
12172
|
* *
|
|
12129
12173
|
**************************************************************************/
|
|
12130
|
-
constructor(
|
|
12131
|
-
this.
|
|
12132
|
-
this.
|
|
12133
|
-
this.dialog = dialog;
|
|
12134
|
-
this.dataViewSelectionMode = dataViewSelectionMode;
|
|
12135
|
-
this.selectionModel = selectionModel;
|
|
12136
|
-
this.changeDetectorRef = changeDetectorRef;
|
|
12174
|
+
constructor(rowRef, renderer) {
|
|
12175
|
+
this.rowRef = rowRef;
|
|
12176
|
+
this.renderer = renderer;
|
|
12137
12177
|
/***************************************************************************
|
|
12138
12178
|
* *
|
|
12139
12179
|
* Fields *
|
|
12140
12180
|
* *
|
|
12141
12181
|
**************************************************************************/
|
|
12142
|
-
this.
|
|
12143
|
-
|
|
12144
|
-
|
|
12145
|
-
this._transformerFn = fn;
|
|
12182
|
+
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
12183
|
+
this._activated = false;
|
|
12184
|
+
this.focused$ = new BehaviorSubject(false);
|
|
12146
12185
|
}
|
|
12147
12186
|
/***************************************************************************
|
|
12148
12187
|
* *
|
|
12149
|
-
* Host
|
|
12188
|
+
* Host Listener *
|
|
12150
12189
|
* *
|
|
12151
12190
|
**************************************************************************/
|
|
12191
|
+
onFocus(event) {
|
|
12192
|
+
this.focused$.next(true);
|
|
12193
|
+
if (this.tableActivation) {
|
|
12194
|
+
this.tableActivation.activate(this._model);
|
|
12195
|
+
}
|
|
12196
|
+
}
|
|
12197
|
+
onBlur(event) {
|
|
12198
|
+
this.focused$.next(false);
|
|
12199
|
+
}
|
|
12152
12200
|
/***************************************************************************
|
|
12153
12201
|
* *
|
|
12154
|
-
*
|
|
12202
|
+
* Host Bindings *
|
|
12155
12203
|
* *
|
|
12156
12204
|
**************************************************************************/
|
|
12157
|
-
|
|
12158
|
-
|
|
12205
|
+
get activated() {
|
|
12206
|
+
return this._activated;
|
|
12207
|
+
}
|
|
12208
|
+
set activated(value) {
|
|
12209
|
+
if (this._activated !== value) {
|
|
12210
|
+
this._activated = value;
|
|
12211
|
+
this.activatedClassEnabled(value);
|
|
12212
|
+
}
|
|
12213
|
+
}
|
|
12159
12214
|
/***************************************************************************
|
|
12160
12215
|
* *
|
|
12161
|
-
*
|
|
12216
|
+
* Properties *
|
|
12162
12217
|
* *
|
|
12163
12218
|
**************************************************************************/
|
|
12164
|
-
|
|
12165
|
-
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
this.
|
|
12169
|
-
|
|
12170
|
-
|
|
12171
|
-
this.
|
|
12172
|
-
|
|
12173
|
-
|
|
12174
|
-
this.
|
|
12175
|
-
const dialogRef = this.openSelectDialog();
|
|
12176
|
-
// This fixes dialog rendering when the browser template
|
|
12177
|
-
// view container is outside the invoking control, which
|
|
12178
|
-
// happens when use ng-content projection.
|
|
12179
|
-
this.changeDetectorRef.markForCheck();
|
|
12180
|
-
return dialogRef.afterClosed().pipe(switchMap((chosenEntities) => {
|
|
12181
|
-
if (chosenEntities) {
|
|
12182
|
-
return this._transformerFn
|
|
12183
|
-
? of(chosenEntities.map(value => this._transformerFn(value)))
|
|
12184
|
-
: of(chosenEntities);
|
|
12185
|
-
}
|
|
12186
|
-
else {
|
|
12187
|
-
return EMPTY;
|
|
12188
|
-
}
|
|
12189
|
-
}));
|
|
12219
|
+
set model(model) {
|
|
12220
|
+
this._model = model;
|
|
12221
|
+
}
|
|
12222
|
+
get model() {
|
|
12223
|
+
return this._model;
|
|
12224
|
+
}
|
|
12225
|
+
get tableActivation() {
|
|
12226
|
+
return this._tableActivation;
|
|
12227
|
+
}
|
|
12228
|
+
get hasFocus() {
|
|
12229
|
+
return this.focused$.getValue();
|
|
12190
12230
|
}
|
|
12191
12231
|
/***************************************************************************
|
|
12192
12232
|
* *
|
|
12193
|
-
*
|
|
12233
|
+
* Public API *
|
|
12194
12234
|
* *
|
|
12195
12235
|
**************************************************************************/
|
|
12196
|
-
|
|
12197
|
-
|
|
12198
|
-
|
|
12199
|
-
|
|
12200
|
-
|
|
12201
|
-
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12236
|
+
bindTableActivation(activation) {
|
|
12237
|
+
if (this._tableActivation !== activation) {
|
|
12238
|
+
this._tableActivation = activation;
|
|
12239
|
+
this.enableRowFocus(!!this._tableActivation);
|
|
12240
|
+
if (!activation) {
|
|
12241
|
+
this.activated = false;
|
|
12242
|
+
}
|
|
12243
|
+
}
|
|
12244
|
+
}
|
|
12245
|
+
bringToView() {
|
|
12246
|
+
const row = this.rowRef.nativeElement;
|
|
12247
|
+
// scroll-snap-align: start;
|
|
12248
|
+
row.scrollIntoView({
|
|
12249
|
+
block: 'nearest',
|
|
12250
|
+
inline: 'nearest' // horizontal alignment
|
|
12205
12251
|
});
|
|
12206
12252
|
}
|
|
12207
|
-
|
|
12208
|
-
|
|
12209
|
-
|
|
12210
|
-
|
|
12211
|
-
provide: SelectionModel,
|
|
12212
|
-
useFactory: createSelectionModel
|
|
12213
|
-
},
|
|
12214
|
-
{
|
|
12215
|
-
provide: ElderDataViewSelectionMode,
|
|
12216
|
-
useFactory: createDataViewSelection
|
|
12217
|
-
},
|
|
12218
|
-
ElderTableProviders.ClearTableModel // Since this popup is frequently used inside an elder-table search box
|
|
12219
|
-
], ngImport: i0 });
|
|
12220
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: SelectionModelPopupDirective, decorators: [{
|
|
12221
|
-
type: Directive,
|
|
12222
|
-
args: [{
|
|
12223
|
-
selector: '[elderSelectionModelPopup]',
|
|
12224
|
-
providers: [
|
|
12225
|
-
{
|
|
12226
|
-
provide: SelectionModel,
|
|
12227
|
-
useFactory: createSelectionModel
|
|
12228
|
-
},
|
|
12229
|
-
{
|
|
12230
|
-
provide: ElderDataViewSelectionMode,
|
|
12231
|
-
useFactory: createDataViewSelection
|
|
12232
|
-
},
|
|
12233
|
-
ElderTableProviders.ClearTableModel // Since this popup is frequently used inside an elder-table search box
|
|
12234
|
-
]
|
|
12235
|
-
}]
|
|
12236
|
-
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i1$7.MatDialog }, { type: ElderDataViewSelectionMode }, { type: SelectionModel }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { elderSelectionModelPopupTransform: [{
|
|
12237
|
-
type: Input,
|
|
12238
|
-
args: ['elderSelectionModelPopupTransform']
|
|
12239
|
-
}] } });
|
|
12240
|
-
|
|
12241
|
-
class ElderDataViewBaseComponent {
|
|
12253
|
+
foucs() {
|
|
12254
|
+
const row = this.rowRef.nativeElement;
|
|
12255
|
+
row.focus();
|
|
12256
|
+
}
|
|
12242
12257
|
/***************************************************************************
|
|
12243
12258
|
* *
|
|
12244
|
-
*
|
|
12259
|
+
* Private methods *
|
|
12245
12260
|
* *
|
|
12246
12261
|
**************************************************************************/
|
|
12247
|
-
|
|
12248
|
-
|
|
12249
|
-
|
|
12250
|
-
|
|
12251
|
-
* Fields *
|
|
12252
|
-
* *
|
|
12253
|
-
**************************************************************************/
|
|
12254
|
-
/**
|
|
12255
|
-
* Underlying data context.
|
|
12256
|
-
*/
|
|
12257
|
-
this.dataContext$ = new BehaviorSubject(null);
|
|
12258
|
-
this.interactionMode = 'open';
|
|
12259
|
-
/**
|
|
12260
|
-
* If true, this table is in dense mode.
|
|
12261
|
-
* Heights are generally reduced.
|
|
12262
|
-
*/
|
|
12263
|
-
this._dense = false;
|
|
12264
|
-
/**
|
|
12265
|
-
* If true, this table is in a floating card mode.
|
|
12266
|
-
* Otherwise, it is flat on the current panel.
|
|
12267
|
-
*/
|
|
12268
|
-
this._float = false;
|
|
12269
|
-
/**
|
|
12270
|
-
* If true, this table is in embedded mode.
|
|
12271
|
-
* No borders / floating visible so that the table can be embedded into another container
|
|
12272
|
-
*/
|
|
12273
|
-
this._embedded = false;
|
|
12274
|
-
this._itemClickSubject = new Subject();
|
|
12275
|
-
this.EntityIdKeyFn = (entity) => entity ? this.getId(entity) : 0;
|
|
12276
|
-
if (!selectionModel) {
|
|
12277
|
-
this.selectionModel = new SelectionModel(false, [], this.EntityIdKeyFn);
|
|
12262
|
+
enableRowFocus(enable) {
|
|
12263
|
+
// Make the rows focusable on click (but not on tabs)
|
|
12264
|
+
if (enable) {
|
|
12265
|
+
this.renderer.setAttribute(this.rowRef.nativeElement, 'tabIndex', '-1');
|
|
12278
12266
|
}
|
|
12279
12267
|
else {
|
|
12280
|
-
this.
|
|
12268
|
+
this.renderer.removeAttribute(this.rowRef.nativeElement, 'tabIndex');
|
|
12281
12269
|
}
|
|
12282
12270
|
}
|
|
12283
|
-
|
|
12284
|
-
|
|
12285
|
-
|
|
12286
|
-
|
|
12287
|
-
**************************************************************************/
|
|
12288
|
-
get dataContext() {
|
|
12289
|
-
return this.dataContext$.getValue();
|
|
12290
|
-
}
|
|
12291
|
-
set dataContext(data) {
|
|
12292
|
-
this.dataContext$.next(data);
|
|
12293
|
-
this.onDataContextSet(data);
|
|
12294
|
-
}
|
|
12295
|
-
get dataActivePaged() {
|
|
12296
|
-
return this.dataContext;
|
|
12297
|
-
}
|
|
12298
|
-
get dataContinuable() {
|
|
12299
|
-
return this.dataContext;
|
|
12300
|
-
}
|
|
12301
|
-
get isContinuable() {
|
|
12302
|
-
if (!this.dataContext) {
|
|
12303
|
-
return false;
|
|
12271
|
+
activatedClassEnabled(enabled) {
|
|
12272
|
+
const activatedClass = 'elder-table-row-activated';
|
|
12273
|
+
if (enabled) {
|
|
12274
|
+
this.renderer.addClass(this.rowRef.nativeElement, activatedClass);
|
|
12304
12275
|
}
|
|
12305
|
-
|
|
12306
|
-
|
|
12307
|
-
get isActivePaged() {
|
|
12308
|
-
if (!this.dataContext) {
|
|
12309
|
-
return false;
|
|
12276
|
+
else {
|
|
12277
|
+
this.renderer.removeClass(this.rowRef.nativeElement, activatedClass);
|
|
12310
12278
|
}
|
|
12311
|
-
return isActivePagedDataContext(this.dataContext);
|
|
12312
|
-
}
|
|
12313
|
-
/***************************************************************************
|
|
12314
|
-
* *
|
|
12315
|
-
* Selection Properties *
|
|
12316
|
-
* *
|
|
12317
|
-
**************************************************************************/
|
|
12318
|
-
set selectableEvaluatorFn(selectableEvaluatorFn) {
|
|
12319
|
-
this.selectionModel.selectableEvaluatorFn = selectableEvaluatorFn;
|
|
12320
12279
|
}
|
|
12321
|
-
|
|
12322
|
-
|
|
12280
|
+
}
|
|
12281
|
+
ElderTableRowDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderTableRowDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Directive });
|
|
12282
|
+
ElderTableRowDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: ElderTableRowDirective, selector: "tr[elderTableRow]", inputs: { model: ["elderTableRow", "model"] }, host: { listeners: { "focus": "onFocus($event)", "blur": "onBlur($event)" } }, exportAs: ["elderTableRow"], ngImport: i0 });
|
|
12283
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderTableRowDirective, decorators: [{
|
|
12284
|
+
type: Directive,
|
|
12285
|
+
args: [{
|
|
12286
|
+
selector: 'tr[elderTableRow]',
|
|
12287
|
+
exportAs: 'elderTableRow'
|
|
12288
|
+
}]
|
|
12289
|
+
}], ctorParameters: function () { return [{ type: i0.ElementRef }, { type: i0.Renderer2 }]; }, propDecorators: { onFocus: [{
|
|
12290
|
+
type: HostListener,
|
|
12291
|
+
args: ['focus', ['$event']]
|
|
12292
|
+
}], onBlur: [{
|
|
12293
|
+
type: HostListener,
|
|
12294
|
+
args: ['blur', ['$event']]
|
|
12295
|
+
}], model: [{
|
|
12296
|
+
type: Input,
|
|
12297
|
+
args: ['elderTableRow']
|
|
12298
|
+
}] } });
|
|
12299
|
+
|
|
12300
|
+
class ColumnPositionSpec {
|
|
12301
|
+
constructor(position, relativeTo) {
|
|
12302
|
+
this.position = position;
|
|
12303
|
+
this.relativeTo = relativeTo;
|
|
12323
12304
|
}
|
|
12324
|
-
|
|
12325
|
-
return
|
|
12305
|
+
static relativeToColumn(col, position) {
|
|
12306
|
+
return new ColumnPositionSpec(position, col);
|
|
12326
12307
|
}
|
|
12327
|
-
|
|
12328
|
-
return
|
|
12329
|
-
if (selection.length > 0) {
|
|
12330
|
-
return selection[0];
|
|
12331
|
-
}
|
|
12332
|
-
else {
|
|
12333
|
-
return null;
|
|
12334
|
-
}
|
|
12335
|
-
}));
|
|
12308
|
+
static relativeToPrevGroup(position) {
|
|
12309
|
+
return new ColumnPositionSpec(position, null);
|
|
12336
12310
|
}
|
|
12337
|
-
|
|
12338
|
-
|
|
12339
|
-
|
|
12340
|
-
|
|
12311
|
+
}
|
|
12312
|
+
class ElderColumnGroup {
|
|
12313
|
+
constructor(groupIndex, columnsPosition, columns) {
|
|
12314
|
+
this.groupIndex = groupIndex;
|
|
12315
|
+
this.columnsPosition = columnsPosition;
|
|
12316
|
+
this.columns = columns;
|
|
12341
12317
|
}
|
|
12342
|
-
|
|
12343
|
-
|
|
12344
|
-
|
|
12345
|
-
|
|
12346
|
-
|
|
12347
|
-
|
|
12348
|
-
|
|
12318
|
+
}
|
|
12319
|
+
class ElderColumnLayout {
|
|
12320
|
+
constructor() {
|
|
12321
|
+
/***************************************************************************
|
|
12322
|
+
* *
|
|
12323
|
+
* Fields *
|
|
12324
|
+
* *
|
|
12325
|
+
**************************************************************************/
|
|
12326
|
+
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
12349
12327
|
}
|
|
12350
12328
|
/***************************************************************************
|
|
12351
12329
|
* *
|
|
12352
|
-
*
|
|
12330
|
+
* Public API *
|
|
12353
12331
|
* *
|
|
12354
12332
|
**************************************************************************/
|
|
12355
|
-
|
|
12356
|
-
|
|
12357
|
-
|
|
12358
|
-
|
|
12359
|
-
return
|
|
12360
|
-
}
|
|
12361
|
-
set float(value) {
|
|
12362
|
-
this._float = coerceBooleanProperty(value);
|
|
12363
|
-
}
|
|
12364
|
-
get float() {
|
|
12365
|
-
return this._float;
|
|
12366
|
-
}
|
|
12367
|
-
set embedded(value) {
|
|
12368
|
-
this._embedded = coerceBooleanProperty(value);
|
|
12369
|
-
}
|
|
12370
|
-
get embedded() {
|
|
12371
|
-
return this._embedded;
|
|
12333
|
+
layoutColumns(colGroups) {
|
|
12334
|
+
const sortedCols = this.renderColumns(colGroups);
|
|
12335
|
+
// Support absolute column positioning
|
|
12336
|
+
const cdkCols = sortedCols.map(col => col.cdkColumn);
|
|
12337
|
+
return cdkCols;
|
|
12372
12338
|
}
|
|
12373
12339
|
/***************************************************************************
|
|
12374
12340
|
* *
|
|
12375
|
-
*
|
|
12341
|
+
* Private methods *
|
|
12376
12342
|
* *
|
|
12377
12343
|
**************************************************************************/
|
|
12378
|
-
|
|
12379
|
-
|
|
12380
|
-
|
|
12381
|
-
|
|
12382
|
-
|
|
12383
|
-
|
|
12384
|
-
|
|
12344
|
+
renderColumns(colGroups) {
|
|
12345
|
+
const groupHierarchy = this.sortGroupsByIndex(colGroups);
|
|
12346
|
+
const sorted = [];
|
|
12347
|
+
// Now we can insert groups in defined order
|
|
12348
|
+
let previousIndex = {
|
|
12349
|
+
startIndex: 0,
|
|
12350
|
+
endIndex: 0
|
|
12351
|
+
};
|
|
12352
|
+
for (const grp of groupHierarchy) {
|
|
12353
|
+
// grp defined position relative to prev group
|
|
12354
|
+
previousIndex = this.insertColumnsAt(sorted, grp.columns, grp.columnsPosition, previousIndex);
|
|
12355
|
+
}
|
|
12356
|
+
return sorted;
|
|
12385
12357
|
}
|
|
12386
|
-
|
|
12387
|
-
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
else {
|
|
12394
|
-
this._itemClickSubject.next(entity);
|
|
12395
|
-
}
|
|
12396
|
-
break;
|
|
12397
|
-
case 'selection':
|
|
12398
|
-
this.selectionModel.toggle(entity);
|
|
12399
|
-
break;
|
|
12400
|
-
}
|
|
12358
|
+
insertColumnsAt(existingColumns, groupItems, positionSpec, previousGroup) {
|
|
12359
|
+
let insertIndex;
|
|
12360
|
+
if (positionSpec.relativeTo) {
|
|
12361
|
+
insertIndex = this.calcInsertIndexRelativeToColumn(positionSpec.position, positionSpec.relativeTo, existingColumns);
|
|
12362
|
+
}
|
|
12363
|
+
else {
|
|
12364
|
+
insertIndex = this.calcInsertIndexRelativeToPreviousGroup(positionSpec.position, existingColumns, previousGroup);
|
|
12401
12365
|
}
|
|
12366
|
+
existingColumns.splice(insertIndex, 0, ...groupItems);
|
|
12367
|
+
return {
|
|
12368
|
+
startIndex: insertIndex,
|
|
12369
|
+
endIndex: insertIndex + groupItems.length
|
|
12370
|
+
};
|
|
12402
12371
|
}
|
|
12403
|
-
|
|
12404
|
-
|
|
12405
|
-
|
|
12406
|
-
|
|
12407
|
-
|
|
12408
|
-
|
|
12409
|
-
//
|
|
12410
|
-
|
|
12411
|
-
|
|
12412
|
-
|
|
12413
|
-
|
|
12372
|
+
calcInsertIndexRelativeToColumn(position, relativeToCol, existingColumns) {
|
|
12373
|
+
const relativeIndex = existingColumns
|
|
12374
|
+
.findIndex(c => c.cdkColumn.name === relativeToCol);
|
|
12375
|
+
switch (position) {
|
|
12376
|
+
case 'start':
|
|
12377
|
+
case 'after':
|
|
12378
|
+
// after relative
|
|
12379
|
+
return relativeIndex + 1;
|
|
12380
|
+
case 'before':
|
|
12381
|
+
case 'end':
|
|
12382
|
+
// before relative
|
|
12383
|
+
return relativeIndex;
|
|
12414
12384
|
}
|
|
12415
12385
|
}
|
|
12416
|
-
|
|
12417
|
-
|
|
12418
|
-
|
|
12419
|
-
|
|
12420
|
-
|
|
12421
|
-
|
|
12422
|
-
|
|
12423
|
-
|
|
12386
|
+
calcInsertIndexRelativeToPreviousGroup(position, existingColumns, previousGroup) {
|
|
12387
|
+
switch (position) {
|
|
12388
|
+
case 'start':
|
|
12389
|
+
return 0;
|
|
12390
|
+
case 'end':
|
|
12391
|
+
return existingColumns.length;
|
|
12392
|
+
case 'after':
|
|
12393
|
+
// after relative to previous group
|
|
12394
|
+
return previousGroup.endIndex;
|
|
12395
|
+
case 'before':
|
|
12396
|
+
// before relative to previous group
|
|
12397
|
+
return previousGroup.startIndex;
|
|
12398
|
+
}
|
|
12399
|
+
}
|
|
12400
|
+
sortGroupsByIndex(colGroups) {
|
|
12401
|
+
return colGroups
|
|
12402
|
+
.sort((a, b) => {
|
|
12403
|
+
return naturalValueComparator(a.groupIndex, b.groupIndex);
|
|
12404
|
+
}).reverse();
|
|
12424
12405
|
}
|
|
12425
12406
|
}
|
|
12426
|
-
ElderDataViewBaseComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataViewBaseComponent, deps: [{ token: SelectionModel }, { token: ElderDataViewSelectionMode }], target: i0.ɵɵFactoryTarget.Component });
|
|
12427
|
-
ElderDataViewBaseComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderDataViewBaseComponent, selector: "elder-data-view-base", inputs: { interactionMode: "interactionMode", selectableEvaluatorFn: "selectableEvaluatorFn", selection: "selection", selectionMultiEnabled: "selectionMultiEnabled", dense: "dense", float: "float", embedded: "embedded" }, outputs: { selectionChange: "selectionChange", selectionSingleChange: "selectionSingleChange", itemClick: "itemClick" }, ngImport: i0, template: '', isInline: true });
|
|
12428
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataViewBaseComponent, decorators: [{
|
|
12429
|
-
type: Component,
|
|
12430
|
-
args: [{ selector: 'elder-data-view-base', template: '' }]
|
|
12431
|
-
}], ctorParameters: function () { return [{ type: SelectionModel }, { type: ElderDataViewSelectionMode }]; }, propDecorators: { interactionMode: [{
|
|
12432
|
-
type: Input
|
|
12433
|
-
}], selectableEvaluatorFn: [{
|
|
12434
|
-
type: Input
|
|
12435
|
-
}], selection: [{
|
|
12436
|
-
type: Input
|
|
12437
|
-
}], selectionChange: [{
|
|
12438
|
-
type: Output
|
|
12439
|
-
}], selectionSingleChange: [{
|
|
12440
|
-
type: Output
|
|
12441
|
-
}], selectionMultiEnabled: [{
|
|
12442
|
-
type: Input
|
|
12443
|
-
}], itemClick: [{
|
|
12444
|
-
type: Output
|
|
12445
|
-
}], dense: [{
|
|
12446
|
-
type: Input
|
|
12447
|
-
}], float: [{
|
|
12448
|
-
type: Input
|
|
12449
|
-
}], embedded: [{
|
|
12450
|
-
type: Input
|
|
12451
|
-
}] } });
|
|
12452
12407
|
|
|
12453
|
-
class
|
|
12408
|
+
class ElderTableGroup {
|
|
12409
|
+
constructor(id, index) {
|
|
12410
|
+
this.id = id;
|
|
12411
|
+
this.index = index;
|
|
12412
|
+
}
|
|
12413
|
+
static create(groupIndex) {
|
|
12414
|
+
return ElderTableGroup.of(UuidUtil.weakUuid4(), groupIndex);
|
|
12415
|
+
}
|
|
12416
|
+
static of(id, groupIndex) {
|
|
12417
|
+
return new ElderTableGroup(id, groupIndex);
|
|
12418
|
+
}
|
|
12454
12419
|
}
|
|
12455
|
-
|
|
12456
|
-
ElderDataViewBaseModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.6", ngImport: i0, type: ElderDataViewBaseModule, declarations: [ElderDataViewBaseComponent], imports: [CommonModule] });
|
|
12457
|
-
ElderDataViewBaseModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataViewBaseModule, imports: [CommonModule] });
|
|
12458
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderDataViewBaseModule, decorators: [{
|
|
12459
|
-
type: NgModule,
|
|
12460
|
-
args: [{
|
|
12461
|
-
declarations: [ElderDataViewBaseComponent],
|
|
12462
|
-
imports: [CommonModule],
|
|
12463
|
-
}]
|
|
12464
|
-
}] });
|
|
12465
|
-
|
|
12466
|
-
class ElderTableRowDirective {
|
|
12420
|
+
class ElderTableModel {
|
|
12467
12421
|
/***************************************************************************
|
|
12468
12422
|
* *
|
|
12469
12423
|
* Constructor *
|
|
12470
12424
|
* *
|
|
12471
12425
|
**************************************************************************/
|
|
12472
|
-
constructor(
|
|
12473
|
-
this.rowRef = rowRef;
|
|
12474
|
-
this.renderer = renderer;
|
|
12426
|
+
constructor() {
|
|
12475
12427
|
/***************************************************************************
|
|
12476
12428
|
* *
|
|
12477
12429
|
* Fields *
|
|
12478
12430
|
* *
|
|
12479
12431
|
**************************************************************************/
|
|
12480
12432
|
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
12481
|
-
this.
|
|
12482
|
-
this.
|
|
12433
|
+
this.elderColumnLayout = new ElderColumnLayout();
|
|
12434
|
+
this._groups = new Map();
|
|
12435
|
+
this._columnGroups = new ReactiveMap();
|
|
12436
|
+
this._rowDefGroups = new ReactiveMap();
|
|
12437
|
+
this._sortGroups = new ReactiveMap();
|
|
12438
|
+
this.selectionVisible$ = new BehaviorSubject(false);
|
|
12439
|
+
/**
|
|
12440
|
+
* The columns to display explicitly set by the user.
|
|
12441
|
+
* We need to support inserting display columns by index or anchored to existing ones.
|
|
12442
|
+
* before([columns])
|
|
12443
|
+
* after()
|
|
12444
|
+
* start()
|
|
12445
|
+
* end([])
|
|
12446
|
+
* @private
|
|
12447
|
+
*/
|
|
12448
|
+
this.displayedColumns$ = new BehaviorSubject(undefined);
|
|
12449
|
+
this.displayedColumnsInner$ = this.renderDisplayedColumns(this.displayedColumns$, this.columnDefs$, this.selectionVisible$);
|
|
12483
12450
|
}
|
|
12484
12451
|
/***************************************************************************
|
|
12485
12452
|
* *
|
|
12486
|
-
*
|
|
12453
|
+
* Properties *
|
|
12487
12454
|
* *
|
|
12488
12455
|
**************************************************************************/
|
|
12489
|
-
|
|
12490
|
-
this.
|
|
12491
|
-
if (this.tableActivation) {
|
|
12492
|
-
this.tableActivation.activate(this._model);
|
|
12493
|
-
}
|
|
12456
|
+
set selectionVisible(visible) {
|
|
12457
|
+
this.selectionVisible$.next(visible);
|
|
12494
12458
|
}
|
|
12495
|
-
|
|
12496
|
-
this.
|
|
12459
|
+
get selectionVisible() {
|
|
12460
|
+
return this.selectionVisible$.getValue();
|
|
12497
12461
|
}
|
|
12498
|
-
|
|
12499
|
-
|
|
12500
|
-
* Host Bindings *
|
|
12501
|
-
* *
|
|
12502
|
-
**************************************************************************/
|
|
12503
|
-
get activated() {
|
|
12504
|
-
return this._activated;
|
|
12462
|
+
set displayedColumns(columns) {
|
|
12463
|
+
this.displayedColumns$.next(columns);
|
|
12505
12464
|
}
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
this._activated = value;
|
|
12509
|
-
this.activatedClassEnabled(value);
|
|
12510
|
-
}
|
|
12465
|
+
get displayedColumns() {
|
|
12466
|
+
return this.displayedColumns$.getValue();
|
|
12511
12467
|
}
|
|
12512
12468
|
/***************************************************************************
|
|
12513
12469
|
* *
|
|
12514
|
-
* Properties
|
|
12470
|
+
* Rendered Properties *
|
|
12515
12471
|
* *
|
|
12516
12472
|
**************************************************************************/
|
|
12517
|
-
|
|
12518
|
-
this.
|
|
12473
|
+
get columnDefs$() {
|
|
12474
|
+
return this._columnGroups.values$.pipe(map(groups => this.elderColumnLayout.layoutColumns(groups)));
|
|
12519
12475
|
}
|
|
12520
|
-
get
|
|
12521
|
-
return this.
|
|
12476
|
+
get rowDefs$() {
|
|
12477
|
+
return this.sortAndFlatten(this._rowDefGroups);
|
|
12522
12478
|
}
|
|
12523
|
-
get
|
|
12524
|
-
return this.
|
|
12479
|
+
get sorts$() {
|
|
12480
|
+
return this._sortGroups.values$;
|
|
12481
|
+
}
|
|
12482
|
+
// ---
|
|
12483
|
+
valuesSortedByGroupIndex(myMap, groups) {
|
|
12484
|
+
return Array.from(myMap.entries())
|
|
12485
|
+
.sort(([a_key], [b_key]) => {
|
|
12486
|
+
var _a, _b, _c, _d;
|
|
12487
|
+
const grpAIndex = (_b = (_a = groups.get(a_key)) === null || _a === void 0 ? void 0 : _a.index) !== null && _b !== void 0 ? _b : 0;
|
|
12488
|
+
const grpBIndex = (_d = (_c = groups.get(b_key)) === null || _c === void 0 ? void 0 : _c.index) !== null && _d !== void 0 ? _d : 0;
|
|
12489
|
+
return naturalValueComparator(grpAIndex, grpBIndex);
|
|
12490
|
+
}).map(([a_key, a_value]) => a_value);
|
|
12525
12491
|
}
|
|
12526
|
-
|
|
12527
|
-
return
|
|
12492
|
+
sortAndFlatten(reactMap) {
|
|
12493
|
+
return reactMap.map$.pipe(map(myMap => this.valuesSortedByGroupIndex(myMap, this._groups)), map(columns => CollectionUtil.flatten(columns)));
|
|
12528
12494
|
}
|
|
12495
|
+
/*
|
|
12496
|
+
public get sortHeaders$(): Observable<MatSortHeader[]> {
|
|
12497
|
+
return this._sortGroups.values$.pipe(
|
|
12498
|
+
map(groups => this.flattenDefs(groups))
|
|
12499
|
+
);
|
|
12500
|
+
}*/
|
|
12529
12501
|
/***************************************************************************
|
|
12530
12502
|
* *
|
|
12531
12503
|
* Public API *
|
|
12532
12504
|
* *
|
|
12533
12505
|
**************************************************************************/
|
|
12534
|
-
|
|
12535
|
-
|
|
12536
|
-
this._tableActivation = activation;
|
|
12537
|
-
this.enableRowFocus(!!this._tableActivation);
|
|
12538
|
-
if (!activation) {
|
|
12539
|
-
this.activated = false;
|
|
12540
|
-
}
|
|
12541
|
-
}
|
|
12506
|
+
registerGroup(group) {
|
|
12507
|
+
this._groups.set(group.id, group);
|
|
12542
12508
|
}
|
|
12543
|
-
|
|
12544
|
-
|
|
12545
|
-
// scroll-snap-align: start;
|
|
12546
|
-
row.scrollIntoView({
|
|
12547
|
-
block: 'nearest',
|
|
12548
|
-
inline: 'nearest' // horizontal alignment
|
|
12549
|
-
});
|
|
12509
|
+
updateColumnGroup(group, columnGroup) {
|
|
12510
|
+
this._columnGroups.set(group.id, columnGroup);
|
|
12550
12511
|
}
|
|
12551
|
-
|
|
12552
|
-
|
|
12553
|
-
|
|
12512
|
+
updateRowDefs(group, rows) {
|
|
12513
|
+
this._rowDefGroups.set(group.id, rows);
|
|
12514
|
+
}
|
|
12515
|
+
updateSortGroup(group, sort) {
|
|
12516
|
+
this._sortGroups.set(group.id, sort);
|
|
12517
|
+
}
|
|
12518
|
+
clearColumnDefGroup(group) {
|
|
12519
|
+
this._columnGroups.delete(group.id);
|
|
12520
|
+
}
|
|
12521
|
+
clearRowDefGroup(group) {
|
|
12522
|
+
this._rowDefGroups.delete(group.id);
|
|
12523
|
+
}
|
|
12524
|
+
clearSortGroup(group) {
|
|
12525
|
+
this._sortGroups.delete(group.id);
|
|
12526
|
+
}
|
|
12527
|
+
deRegisterGroup(group) {
|
|
12528
|
+
this.clearColumnDefGroup(group);
|
|
12529
|
+
this.clearRowDefGroup(group);
|
|
12530
|
+
this.clearSortGroup(group);
|
|
12531
|
+
this._groups.delete(group.id);
|
|
12554
12532
|
}
|
|
12555
12533
|
/***************************************************************************
|
|
12556
12534
|
* *
|
|
12557
12535
|
* Private methods *
|
|
12558
12536
|
* *
|
|
12559
12537
|
**************************************************************************/
|
|
12560
|
-
|
|
12561
|
-
|
|
12562
|
-
|
|
12563
|
-
|
|
12564
|
-
|
|
12565
|
-
|
|
12566
|
-
|
|
12567
|
-
|
|
12568
|
-
|
|
12569
|
-
|
|
12570
|
-
|
|
12571
|
-
|
|
12572
|
-
|
|
12573
|
-
|
|
12574
|
-
|
|
12575
|
-
|
|
12576
|
-
|
|
12538
|
+
renderDisplayedColumns(userDefinedColumns$, columnDefs$, selectionVisible$) {
|
|
12539
|
+
return combineLatest([userDefinedColumns$, columnDefs$, selectionVisible$]).pipe(map(([displayedColumns, columnDefs, selectionVisible]) => {
|
|
12540
|
+
let columns = displayedColumns;
|
|
12541
|
+
if (!columns) {
|
|
12542
|
+
columns = [];
|
|
12543
|
+
// If the user did not define columns to display
|
|
12544
|
+
// Assume he wants all his own columns in given order
|
|
12545
|
+
if (columnDefs) {
|
|
12546
|
+
columnDefs.forEach(col => {
|
|
12547
|
+
columns.push(col.name);
|
|
12548
|
+
});
|
|
12549
|
+
}
|
|
12550
|
+
}
|
|
12551
|
+
if (this.selectionVisible) {
|
|
12552
|
+
columns = ['select', ...columns];
|
|
12553
|
+
}
|
|
12554
|
+
return columns;
|
|
12555
|
+
}));
|
|
12577
12556
|
}
|
|
12578
12557
|
}
|
|
12579
|
-
|
|
12580
|
-
|
|
12581
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type:
|
|
12582
|
-
type:
|
|
12583
|
-
|
|
12584
|
-
|
|
12585
|
-
|
|
12586
|
-
|
|
12587
|
-
|
|
12588
|
-
|
|
12589
|
-
|
|
12590
|
-
|
|
12591
|
-
|
|
12592
|
-
|
|
12593
|
-
|
|
12594
|
-
|
|
12595
|
-
|
|
12596
|
-
|
|
12558
|
+
ElderTableModel.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderTableModel, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
12559
|
+
ElderTableModel.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderTableModel });
|
|
12560
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderTableModel, decorators: [{
|
|
12561
|
+
type: Injectable
|
|
12562
|
+
}], ctorParameters: function () { return []; } });
|
|
12563
|
+
|
|
12564
|
+
function existingOrNewElderTableModel(modelProvider) {
|
|
12565
|
+
return modelProvider !== null && modelProvider !== void 0 ? modelProvider : newElderTableModel();
|
|
12566
|
+
}
|
|
12567
|
+
function newElderTableModel() {
|
|
12568
|
+
return new ElderTableModel();
|
|
12569
|
+
}
|
|
12570
|
+
class ElderTableProviders {
|
|
12571
|
+
}
|
|
12572
|
+
/**
|
|
12573
|
+
* Uses the existing ElderTableModel from a parent if available.
|
|
12574
|
+
* Otherwise, creates a new ElderTableModel and provides it.
|
|
12575
|
+
*/
|
|
12576
|
+
ElderTableProviders.ExistingOrNewTableModel = {
|
|
12577
|
+
provide: ElderTableModel,
|
|
12578
|
+
useFactory: existingOrNewElderTableModel,
|
|
12579
|
+
deps: [[new Optional(), new SkipSelf(), ElderTableModel]]
|
|
12580
|
+
};
|
|
12581
|
+
/**
|
|
12582
|
+
* Creates a new ElderTableModel root and provides it,
|
|
12583
|
+
* even if there is an existing parent table model.
|
|
12584
|
+
*/
|
|
12585
|
+
ElderTableProviders.NewTableModelRoot = {
|
|
12586
|
+
provide: ElderTableModel,
|
|
12587
|
+
useFactory: newElderTableModel
|
|
12588
|
+
};
|
|
12589
|
+
/**
|
|
12590
|
+
* If there is an existing ElderTableModel service provided, clears it.
|
|
12591
|
+
*
|
|
12592
|
+
* Child components will therefore be blocked from accessing any parent TableModel service
|
|
12593
|
+
* and are instead forced to create their own.
|
|
12594
|
+
*
|
|
12595
|
+
* This supports nesting ElderTable without sharing the table model / columns.
|
|
12596
|
+
*/
|
|
12597
|
+
ElderTableProviders.ClearTableModel = {
|
|
12598
|
+
provide: ElderTableModel,
|
|
12599
|
+
useValue: null
|
|
12600
|
+
};
|
|
12597
12601
|
|
|
12598
12602
|
/**
|
|
12599
12603
|
* Binds the elder table model to the CDK table.
|
|
@@ -13120,9 +13124,9 @@ class ElderTableComponent extends ElderDataViewBaseComponent {
|
|
|
13120
13124
|
* Constructor *
|
|
13121
13125
|
* *
|
|
13122
13126
|
**************************************************************************/
|
|
13123
|
-
constructor(tableModel, selectionModel,
|
|
13127
|
+
constructor(tableModel, selectionModel, dataViewOptionsProvider, matSort, parentExtension, cdr, zone) {
|
|
13124
13128
|
var _a;
|
|
13125
|
-
super(selectionModel,
|
|
13129
|
+
super(selectionModel, dataViewOptionsProvider);
|
|
13126
13130
|
this.tableModel = tableModel;
|
|
13127
13131
|
this.parentExtension = parentExtension;
|
|
13128
13132
|
this.cdr = cdr;
|
|
@@ -13133,7 +13137,6 @@ class ElderTableComponent extends ElderDataViewBaseComponent {
|
|
|
13133
13137
|
* *
|
|
13134
13138
|
**************************************************************************/
|
|
13135
13139
|
this.logger = LoggerFactory.getLogger(this.constructor.name);
|
|
13136
|
-
this.destroy$ = new Subject();
|
|
13137
13140
|
/**
|
|
13138
13141
|
* Load next chunk after current is done
|
|
13139
13142
|
*/
|
|
@@ -13154,14 +13157,6 @@ class ElderTableComponent extends ElderDataViewBaseComponent {
|
|
|
13154
13157
|
*/
|
|
13155
13158
|
this.hiddenField = null;
|
|
13156
13159
|
this.pageSizeOptions = [30, 50, 100, 150, 200];
|
|
13157
|
-
/**
|
|
13158
|
-
* Define if elder-table should clean up the
|
|
13159
|
-
* data-context resources for you.
|
|
13160
|
-
*
|
|
13161
|
-
* In more advanced scenarios where you plan to reuse the same data-context
|
|
13162
|
-
* set this to false and release the resources yourself. (dataContext.close)
|
|
13163
|
-
*/
|
|
13164
|
-
this.cleanUp = true;
|
|
13165
13160
|
this.keepSelection = true;
|
|
13166
13161
|
this.showFooter = false;
|
|
13167
13162
|
this.toolbarRowTemplates$ = new BehaviorSubject([]);
|
|
@@ -13181,16 +13176,7 @@ class ElderTableComponent extends ElderDataViewBaseComponent {
|
|
|
13181
13176
|
* *
|
|
13182
13177
|
**************************************************************************/
|
|
13183
13178
|
ngOnInit() {
|
|
13184
|
-
|
|
13185
|
-
this.selectionVisible = true;
|
|
13186
|
-
this.selectionMultiEnabled = this.dataViewSelection.multi;
|
|
13187
|
-
this.interactionMode = 'selection';
|
|
13188
|
-
this.float = false;
|
|
13189
|
-
if (this.dataContext) {
|
|
13190
|
-
this.dataContext.filter.updateFilters(this.dataViewSelection.filters);
|
|
13191
|
-
this.dataContext.sort.updateSorts(this.dataViewSelection.sorts);
|
|
13192
|
-
}
|
|
13193
|
-
}
|
|
13179
|
+
super.ngOnInit();
|
|
13194
13180
|
ElderTableModelCdkTableBinding
|
|
13195
13181
|
.of(this.tableModel)
|
|
13196
13182
|
.table(this.matTable)
|
|
@@ -13220,11 +13206,6 @@ class ElderTableComponent extends ElderDataViewBaseComponent {
|
|
|
13220
13206
|
.updated(rows => this.rows$.next(rows))
|
|
13221
13207
|
.bindUntil(this.destroy$);
|
|
13222
13208
|
}
|
|
13223
|
-
ngOnDestroy() {
|
|
13224
|
-
this.destroy$.next();
|
|
13225
|
-
this.destroy$.complete();
|
|
13226
|
-
this.autoCleanUp();
|
|
13227
|
-
}
|
|
13228
13209
|
/***************************************************************************
|
|
13229
13210
|
* *
|
|
13230
13211
|
* Properties *
|
|
@@ -13348,18 +13329,9 @@ class ElderTableComponent extends ElderDataViewBaseComponent {
|
|
|
13348
13329
|
}
|
|
13349
13330
|
});
|
|
13350
13331
|
}
|
|
13351
|
-
/**
|
|
13352
|
-
* Performs clean up of the current data context if auto clean up is enabled.
|
|
13353
|
-
*/
|
|
13354
|
-
autoCleanUp() {
|
|
13355
|
-
if (this.cleanUp && this.dataContext) {
|
|
13356
|
-
this.logger.debug('Releasing DataContext resources to prevent memory leak. [cleanUp]="true"');
|
|
13357
|
-
this.dataContext.close();
|
|
13358
|
-
}
|
|
13359
|
-
}
|
|
13360
13332
|
}
|
|
13361
|
-
ElderTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderTableComponent, deps: [{ token: ElderTableModel }, { token: SelectionModel, optional: true }, { token:
|
|
13362
|
-
ElderTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderTableComponent, selector: "elder-table, ebs-table", inputs: { idField: "idField", removingField: "removingField", hiddenField: "hiddenField", pageSizeOptions: "pageSizeOptions",
|
|
13333
|
+
ElderTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderTableComponent, deps: [{ token: ElderTableModel }, { token: SelectionModel, optional: true }, { token: ElderDataViewOptionsProvider, optional: true, skipSelf: true }, { token: i2$4.MatSort, optional: true }, { token: ElderTableExtensionDirective, optional: true, skipSelf: true }, { token: i0.ChangeDetectorRef }, { token: i0.NgZone }], target: i0.ɵɵFactoryTarget.Component });
|
|
13334
|
+
ElderTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderTableComponent, selector: "elder-table, ebs-table", inputs: { idField: "idField", removingField: "removingField", hiddenField: "hiddenField", pageSizeOptions: "pageSizeOptions", keepSelection: "keepSelection", showFooter: "showFooter", toolbarTemplate: "toolbarTemplate", data: "data", displayedColumns: "displayedColumns", selectionVisible: "selectionVisible" }, providers: [
|
|
13363
13335
|
ElderTableProviders.ExistingOrNewTableModel,
|
|
13364
13336
|
{
|
|
13365
13337
|
provide: ELDER_DATA_VIEW,
|
|
@@ -13378,7 +13350,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
13378
13350
|
}], ctorParameters: function () {
|
|
13379
13351
|
return [{ type: ElderTableModel }, { type: SelectionModel, decorators: [{
|
|
13380
13352
|
type: Optional
|
|
13381
|
-
}] }, { type:
|
|
13353
|
+
}] }, { type: ElderDataViewOptionsProvider, decorators: [{
|
|
13382
13354
|
type: Optional
|
|
13383
13355
|
}, {
|
|
13384
13356
|
type: SkipSelf
|
|
@@ -13412,8 +13384,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
13412
13384
|
type: Input
|
|
13413
13385
|
}], pageSizeOptions: [{
|
|
13414
13386
|
type: Input
|
|
13415
|
-
}], cleanUp: [{
|
|
13416
|
-
type: Input
|
|
13417
13387
|
}], keepSelection: [{
|
|
13418
13388
|
type: Input
|
|
13419
13389
|
}], showFooter: [{
|
|
@@ -15278,8 +15248,8 @@ class ElderGridComponent extends ElderDataViewBaseComponent {
|
|
|
15278
15248
|
* Constructor *
|
|
15279
15249
|
* *
|
|
15280
15250
|
**************************************************************************/
|
|
15281
|
-
constructor(selectionModel,
|
|
15282
|
-
super(selectionModel,
|
|
15251
|
+
constructor(selectionModel, dataViewOptionsProvider, mediaObserver) {
|
|
15252
|
+
super(selectionModel, dataViewOptionsProvider);
|
|
15283
15253
|
this.mediaObserver = mediaObserver;
|
|
15284
15254
|
/***************************************************************************
|
|
15285
15255
|
* *
|
|
@@ -15312,7 +15282,6 @@ class ElderGridComponent extends ElderDataViewBaseComponent {
|
|
|
15312
15282
|
this.idField = 'id';
|
|
15313
15283
|
this.selectionVisible = true;
|
|
15314
15284
|
this.pageSizeOptions = [30, 50, 100, 150, 200];
|
|
15315
|
-
this.destroy$ = new Subject();
|
|
15316
15285
|
}
|
|
15317
15286
|
/***************************************************************************
|
|
15318
15287
|
* *
|
|
@@ -15320,6 +15289,7 @@ class ElderGridComponent extends ElderDataViewBaseComponent {
|
|
|
15320
15289
|
* *
|
|
15321
15290
|
**************************************************************************/
|
|
15322
15291
|
ngOnInit() {
|
|
15292
|
+
super.ngOnInit();
|
|
15323
15293
|
const columnCount$ = (this.responsiveColumnCount
|
|
15324
15294
|
? this.responsiveColumn()
|
|
15325
15295
|
: this._columnCount);
|
|
@@ -15327,16 +15297,6 @@ class ElderGridComponent extends ElderDataViewBaseComponent {
|
|
|
15327
15297
|
this.dataContext$.pipe(filter(dc => !!dc), switchMap(dc => dc.data)),
|
|
15328
15298
|
columnCount$
|
|
15329
15299
|
]).pipe(debounceTime(50), map(([data, columns]) => this.groupForColumns(data, columns)));
|
|
15330
|
-
if (this.dataViewSelection) {
|
|
15331
|
-
this.selectionVisible = true;
|
|
15332
|
-
this.selectionMultiEnabled = this.dataViewSelection.multi;
|
|
15333
|
-
this.float = false;
|
|
15334
|
-
const dataContext = this.dataContext$.getValue();
|
|
15335
|
-
if (dataContext) {
|
|
15336
|
-
dataContext.filter.updateFilters(this.dataViewSelection.filters);
|
|
15337
|
-
dataContext.sort.updateSorts(this.dataViewSelection.sorts);
|
|
15338
|
-
}
|
|
15339
|
-
}
|
|
15340
15300
|
}
|
|
15341
15301
|
ngAfterViewInit() {
|
|
15342
15302
|
MatTableDataContextBindingBuilder
|
|
@@ -15344,10 +15304,6 @@ class ElderGridComponent extends ElderDataViewBaseComponent {
|
|
|
15344
15304
|
.withPaginator(of(this.matPaginator))
|
|
15345
15305
|
.bindUntil(this.destroy$);
|
|
15346
15306
|
}
|
|
15347
|
-
ngOnDestroy() {
|
|
15348
|
-
this.destroy$.next();
|
|
15349
|
-
this.destroy$.complete();
|
|
15350
|
-
}
|
|
15351
15307
|
/***************************************************************************
|
|
15352
15308
|
* *
|
|
15353
15309
|
* Properties *
|
|
@@ -15462,7 +15418,7 @@ class ElderGridComponent extends ElderDataViewBaseComponent {
|
|
|
15462
15418
|
return this.mediaObserver.asObservable().pipe(filter(changes => changes.length > 0), map(changes => this.sizeToColumns.get(changes[0].mqAlias)), debounceTime(150), startWith(start));
|
|
15463
15419
|
}
|
|
15464
15420
|
}
|
|
15465
|
-
ElderGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderGridComponent, deps: [{ token: SelectionModel, optional: true }, { token:
|
|
15421
|
+
ElderGridComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderGridComponent, deps: [{ token: SelectionModel, optional: true }, { token: ElderDataViewOptionsProvider, optional: true, skipSelf: true }, { token: i3$5.MediaObserver }], target: i0.ɵɵFactoryTarget.Component });
|
|
15466
15422
|
ElderGridComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderGridComponent, selector: "elder-grid", inputs: { toolbarVisible: "toolbarVisible", footerVisible: "footerVisible", itemHeight: "itemHeight", responsiveColumnCount: "responsiveColumnCount", availableSorts: "availableSorts", sortTranslationPrefix: "sortTranslationPrefix", hiddenField: "hiddenField", idField: "idField", selectionVisible: "selectionVisible", pageSizeOptions: "pageSizeOptions", tileTemplate: "tileTemplate", toolbarTemplate: "toolbarTemplate", data: "data", columnCount: "columnCount" }, providers: [
|
|
15467
15423
|
{
|
|
15468
15424
|
provide: ELDER_DATA_VIEW,
|
|
@@ -15480,7 +15436,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
15480
15436
|
}], ctorParameters: function () {
|
|
15481
15437
|
return [{ type: SelectionModel, decorators: [{
|
|
15482
15438
|
type: Optional
|
|
15483
|
-
}] }, { type:
|
|
15439
|
+
}] }, { type: ElderDataViewOptionsProvider, decorators: [{
|
|
15484
15440
|
type: Optional
|
|
15485
15441
|
}, {
|
|
15486
15442
|
type: SkipSelf
|
|
@@ -18806,7 +18762,7 @@ class ElderLocalizedInputTableComponent extends FormFieldBaseComponent {
|
|
|
18806
18762
|
}
|
|
18807
18763
|
}
|
|
18808
18764
|
ElderLocalizedInputTableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderLocalizedInputTableComponent, deps: [{ token: ElderToastService }, { token: ElderLanguageService }], target: i0.ɵɵFactoryTarget.Component });
|
|
18809
|
-
ElderLocalizedInputTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderLocalizedInputTableComponent, selector: "elder-localized-input-table", inputs: { dense: "dense", float: "float", embedded: "embedded", textColumns: "textColumns", defaultLanguageTags: "defaultLanguageTags" }, providers: buildFormIntegrationProviders(ElderLocalizedInputTableComponent), queries: [{ propertyName: "textColumnsQuery", predicate: ElderLocalizedTextColumnDirective }], usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxFill>\n <elder-table matSort fxFlex\n [data]=\"data\"\n [selectionVisible]=\"true\"\n [selectionMultiEnabled]=\"true\"\n [dense]=\"dense\"\n [float]=\"float\"\n [embedded]=\"embedded\"\n >\n\n <elder-data-toolbar\n *elderTableToolbar\n [canAdd]=\"!isLocked\"\n [canRemove]=\"!isLocked\"\n [canMore]=\"false\"\n (requestNew)=\"onNewRequested()\"\n (requestRemove)=\"onRemoveRequested($event)\"\n >\n\n <ng-template elderToolbarContent=\"left.actions\">\n <div fxLayout=\"column\" fxLayoutAlign=\"start center\">\n <h4 elderCardSubtitle style=\"margin: 0\">{{label ?? placeholder}}</h4>\n </div>\n </ng-template>\n\n </elder-data-toolbar>\n\n <ng-container matColumnDef=\"locale\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 100px\" mat-sort-header>Locale</th>\n <td mat-cell *matCellDef=\"let localized\">\n <mat-chip-list><mat-chip>{{localized.locale}}</mat-chip></mat-chip-list>\n </td>\n </ng-container>\n\n <ng-container *ngFor=\"let textColumn of textColumns$ | async\" matColumnDef=\"{{textColumn.name}}\">\n <th mat-header-cell *matHeaderCellDef>{{textColumn.title | translate}}</th>\n <td mat-cell *matCellDef=\"let localized\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n type=\"text\"\n name=\"i18n-{{localized.locale}}-{{textColumn.name}}\"\n [ngModel]=\"localized[textColumn.name]\" [ngModelOptions]=\"{updateOn: 'blur'}\"\n (ngModelChange)=\"onColumnTextUpdated(localized, textColumn, $event)\"\n [required]=\"required && textColumn.required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n />\n <mat-hint>{{textColumn.title | translate}} ({{localized.locale}})</mat-hint>\n <mat-error>Required</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n </elder-table>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2$4.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i2$4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ElderTableComponent, selector: "elder-table, ebs-table", inputs: ["idField", "removingField", "hiddenField", "pageSizeOptions", "
|
|
18765
|
+
ElderLocalizedInputTableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: ElderLocalizedInputTableComponent, selector: "elder-localized-input-table", inputs: { dense: "dense", float: "float", embedded: "embedded", textColumns: "textColumns", defaultLanguageTags: "defaultLanguageTags" }, providers: buildFormIntegrationProviders(ElderLocalizedInputTableComponent), queries: [{ propertyName: "textColumnsQuery", predicate: ElderLocalizedTextColumnDirective }], usesInheritance: true, ngImport: i0, template: "<div fxLayout=\"column\" fxFill>\n <elder-table matSort fxFlex\n [data]=\"data\"\n [selectionVisible]=\"true\"\n [selectionMultiEnabled]=\"true\"\n [dense]=\"dense\"\n [float]=\"float\"\n [embedded]=\"embedded\"\n >\n\n <elder-data-toolbar\n *elderTableToolbar\n [canAdd]=\"!isLocked\"\n [canRemove]=\"!isLocked\"\n [canMore]=\"false\"\n (requestNew)=\"onNewRequested()\"\n (requestRemove)=\"onRemoveRequested($event)\"\n >\n\n <ng-template elderToolbarContent=\"left.actions\">\n <div fxLayout=\"column\" fxLayoutAlign=\"start center\">\n <h4 elderCardSubtitle style=\"margin: 0\">{{label ?? placeholder}}</h4>\n </div>\n </ng-template>\n\n </elder-data-toolbar>\n\n <ng-container matColumnDef=\"locale\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 100px\" mat-sort-header>Locale</th>\n <td mat-cell *matCellDef=\"let localized\">\n <mat-chip-list><mat-chip>{{localized.locale}}</mat-chip></mat-chip-list>\n </td>\n </ng-container>\n\n <ng-container *ngFor=\"let textColumn of textColumns$ | async\" matColumnDef=\"{{textColumn.name}}\">\n <th mat-header-cell *matHeaderCellDef>{{textColumn.title | translate}}</th>\n <td mat-cell *matCellDef=\"let localized\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n type=\"text\"\n name=\"i18n-{{localized.locale}}-{{textColumn.name}}\"\n [ngModel]=\"localized[textColumn.name]\" [ngModelOptions]=\"{updateOn: 'blur'}\"\n (ngModelChange)=\"onColumnTextUpdated(localized, textColumn, $event)\"\n [required]=\"required && textColumn.required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n />\n <mat-hint>{{textColumn.title | translate}} ({{localized.locale}})</mat-hint>\n <mat-error>Required</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n </elder-table>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: i11.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i11.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i11.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i11.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i11.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "directive", type: i2$4.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i2$4.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "directive", type: i4$1.MatError, selector: "mat-error", inputs: ["id"] }, { kind: "component", type: i4$1.MatFormField, selector: "mat-form-field", inputs: ["color", "appearance", "hideRequiredMarker", "hintLabel", "floatLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i4$1.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i5$1.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "directive", type: i3.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i3.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i3.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i3.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: ElderTableComponent, selector: "elder-table, ebs-table", inputs: ["idField", "removingField", "hiddenField", "pageSizeOptions", "keepSelection", "showFooter", "toolbarTemplate", "data", "displayedColumns", "selectionVisible"] }, { kind: "directive", type: ElderTableToolbarDirective, selector: "[elderTableToolbar]" }, { kind: "component", type: ElderDataToolbarComponent, selector: "elder-data-toolbar", inputs: ["canAdd", "canRemove", "canMore", "confirmRemoval", "keepSelectionAfterRemoval", "selectionModel"], outputs: ["requestNew", "requestRemove"] }, { kind: "directive", type: ElderToolbarContentDirective, selector: "[elderToolbarContent]", inputs: ["elderToolbarContent"] }, { kind: "component", type: i6$1.MatChipList, selector: "mat-chip-list", inputs: ["role", "aria-describedby", "errorStateMatcher", "multiple", "compareWith", "value", "required", "placeholder", "disabled", "aria-orientation", "selectable", "tabIndex"], outputs: ["change", "valueChange"], exportAs: ["matChipList"] }, { kind: "directive", type: i6$1.MatChip, selector: "mat-basic-chip, [mat-basic-chip], mat-chip, [mat-chip]", inputs: ["color", "disableRipple", "tabIndex", "role", "selected", "value", "selectable", "disabled", "removable"], outputs: ["selectionChange", "destroyed", "removed"], exportAs: ["matChip"] }, { kind: "directive", type: ElderCardSubtitleDirective, selector: "elder-card-subtitle, [elder-card-subtitle], [elderCardSubtitle]" }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
18810
18766
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderLocalizedInputTableComponent, decorators: [{
|
|
18811
18767
|
type: Component,
|
|
18812
18768
|
args: [{ selector: 'elder-localized-input-table', changeDetection: ChangeDetectionStrategy.OnPush, providers: buildFormIntegrationProviders(ElderLocalizedInputTableComponent), template: "<div fxLayout=\"column\" fxFill>\n <elder-table matSort fxFlex\n [data]=\"data\"\n [selectionVisible]=\"true\"\n [selectionMultiEnabled]=\"true\"\n [dense]=\"dense\"\n [float]=\"float\"\n [embedded]=\"embedded\"\n >\n\n <elder-data-toolbar\n *elderTableToolbar\n [canAdd]=\"!isLocked\"\n [canRemove]=\"!isLocked\"\n [canMore]=\"false\"\n (requestNew)=\"onNewRequested()\"\n (requestRemove)=\"onRemoveRequested($event)\"\n >\n\n <ng-template elderToolbarContent=\"left.actions\">\n <div fxLayout=\"column\" fxLayoutAlign=\"start center\">\n <h4 elderCardSubtitle style=\"margin: 0\">{{label ?? placeholder}}</h4>\n </div>\n </ng-template>\n\n </elder-data-toolbar>\n\n <ng-container matColumnDef=\"locale\">\n <th mat-header-cell *matHeaderCellDef style=\"width: 100px\" mat-sort-header>Locale</th>\n <td mat-cell *matCellDef=\"let localized\">\n <mat-chip-list><mat-chip>{{localized.locale}}</mat-chip></mat-chip-list>\n </td>\n </ng-container>\n\n <ng-container *ngFor=\"let textColumn of textColumns$ | async\" matColumnDef=\"{{textColumn.name}}\">\n <th mat-header-cell *matHeaderCellDef>{{textColumn.title | translate}}</th>\n <td mat-cell *matCellDef=\"let localized\">\n <mat-form-field class=\"full-width\">\n <input\n matInput\n type=\"text\"\n name=\"i18n-{{localized.locale}}-{{textColumn.name}}\"\n [ngModel]=\"localized[textColumn.name]\" [ngModelOptions]=\"{updateOn: 'blur'}\"\n (ngModelChange)=\"onColumnTextUpdated(localized, textColumn, $event)\"\n [required]=\"required && textColumn.required\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n />\n <mat-hint>{{textColumn.title | translate}} ({{localized.locale}})</mat-hint>\n <mat-error>Required</mat-error>\n </mat-form-field>\n </td>\n </ng-container>\n\n </elder-table>\n</div>\n" }]
|
|
@@ -21272,12 +21228,162 @@ class ElderSelectValueDirective {
|
|
|
21272
21228
|
this.viewContainer = viewContainer;
|
|
21273
21229
|
}
|
|
21274
21230
|
}
|
|
21275
|
-
ElderSelectValueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectValueDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
21276
|
-
ElderSelectValueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: ElderSelectValueDirective, selector: "[elderSelectValue]", ngImport: i0 });
|
|
21277
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectValueDirective, decorators: [{
|
|
21231
|
+
ElderSelectValueDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectValueDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
21232
|
+
ElderSelectValueDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: ElderSelectValueDirective, selector: "[elderSelectValue]", ngImport: i0 });
|
|
21233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderSelectValueDirective, decorators: [{
|
|
21234
|
+
type: Directive,
|
|
21235
|
+
args: [{ selector: '[elderSelectValue]' }]
|
|
21236
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }]; } });
|
|
21237
|
+
|
|
21238
|
+
class TemplatedSelectionDialogComponent {
|
|
21239
|
+
/***************************************************************************
|
|
21240
|
+
* *
|
|
21241
|
+
* Constructor *
|
|
21242
|
+
* *
|
|
21243
|
+
**************************************************************************/
|
|
21244
|
+
constructor(dialogRef, data, selectionModel) {
|
|
21245
|
+
this.dialogRef = dialogRef;
|
|
21246
|
+
this.data = data;
|
|
21247
|
+
this.selectionModel = selectionModel;
|
|
21248
|
+
/***************************************************************************
|
|
21249
|
+
* *
|
|
21250
|
+
* Fields *
|
|
21251
|
+
* *
|
|
21252
|
+
**************************************************************************/
|
|
21253
|
+
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
21254
|
+
}
|
|
21255
|
+
/***************************************************************************
|
|
21256
|
+
* *
|
|
21257
|
+
* Component Events *
|
|
21258
|
+
* *
|
|
21259
|
+
**************************************************************************/
|
|
21260
|
+
ngOnInit() {
|
|
21261
|
+
}
|
|
21262
|
+
}
|
|
21263
|
+
TemplatedSelectionDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: TemplatedSelectionDialogComponent, deps: [{ token: i1$7.MatDialogRef }, { token: MAT_DIALOG_DATA }, { token: SelectionModel }], target: i0.ɵɵFactoryTarget.Component });
|
|
21264
|
+
TemplatedSelectionDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: TemplatedSelectionDialogComponent, selector: "elder-templated-selection-dialog", ngImport: i0, template: "<div fxLayout=\"column\" fxFill>\n <mat-toolbar elderTheme fxFlex=\"none\">\n <button mat-icon-button type=\"button\" matDialogClose=\"\">\n <mat-icon>close</mat-icon>\n </button>\n <span fxFlex></span>\n <button mat-stroked-button type=\"submit\" color=\"accent\"\n *ngIf=\"selectionModel.selection | async as selection\"\n [disabled]=\"!selection || selection.length === 0\"\n [mat-dialog-close]=\"selection\"\n >\n {{'actions.select' | translate}}\n </button>\n </mat-toolbar>\n <div fxLayout=\"column\" fxFlex style=\"overflow: hidden\">\n <ng-container *ngTemplateOutlet=\"data.selectionComponentTemplate\"></ng-container>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1$4.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i1$7.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "component", type: i5.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i7.MatToolbar, selector: "mat-toolbar", inputs: ["color"], exportAs: ["matToolbar"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "directive", type: ElderThemeDirective, selector: "[elderTheme]" }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "pipe", type: i2.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
21265
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: TemplatedSelectionDialogComponent, decorators: [{
|
|
21266
|
+
type: Component,
|
|
21267
|
+
args: [{ selector: 'elder-templated-selection-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div fxLayout=\"column\" fxFill>\n <mat-toolbar elderTheme fxFlex=\"none\">\n <button mat-icon-button type=\"button\" matDialogClose=\"\">\n <mat-icon>close</mat-icon>\n </button>\n <span fxFlex></span>\n <button mat-stroked-button type=\"submit\" color=\"accent\"\n *ngIf=\"selectionModel.selection | async as selection\"\n [disabled]=\"!selection || selection.length === 0\"\n [mat-dialog-close]=\"selection\"\n >\n {{'actions.select' | translate}}\n </button>\n </mat-toolbar>\n <div fxLayout=\"column\" fxFlex style=\"overflow: hidden\">\n <ng-container *ngTemplateOutlet=\"data.selectionComponentTemplate\"></ng-container>\n </div>\n</div>\n" }]
|
|
21268
|
+
}], ctorParameters: function () {
|
|
21269
|
+
return [{ type: i1$7.MatDialogRef }, { type: undefined, decorators: [{
|
|
21270
|
+
type: Inject,
|
|
21271
|
+
args: [MAT_DIALOG_DATA]
|
|
21272
|
+
}] }, { type: SelectionModel }];
|
|
21273
|
+
} });
|
|
21274
|
+
|
|
21275
|
+
function createSelectionModel$1() {
|
|
21276
|
+
return new SelectionModel();
|
|
21277
|
+
}
|
|
21278
|
+
function createDataViewOptionsProvider() {
|
|
21279
|
+
return new ElderDataViewOptionsProvider();
|
|
21280
|
+
}
|
|
21281
|
+
class SelectionModelPopupDirective {
|
|
21282
|
+
/***************************************************************************
|
|
21283
|
+
* *
|
|
21284
|
+
* Constructor *
|
|
21285
|
+
* *
|
|
21286
|
+
**************************************************************************/
|
|
21287
|
+
constructor(templateRef, viewContainer, dialog, dataViewOptionsProvider, selectionModel, changeDetectorRef) {
|
|
21288
|
+
this.templateRef = templateRef;
|
|
21289
|
+
this.viewContainer = viewContainer;
|
|
21290
|
+
this.dialog = dialog;
|
|
21291
|
+
this.dataViewOptionsProvider = dataViewOptionsProvider;
|
|
21292
|
+
this.selectionModel = selectionModel;
|
|
21293
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
21294
|
+
/***************************************************************************
|
|
21295
|
+
* *
|
|
21296
|
+
* Fields *
|
|
21297
|
+
* *
|
|
21298
|
+
**************************************************************************/
|
|
21299
|
+
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
21300
|
+
}
|
|
21301
|
+
set elderSelectionModelPopupTransform(fn) {
|
|
21302
|
+
this._transformerFn = fn;
|
|
21303
|
+
}
|
|
21304
|
+
/***************************************************************************
|
|
21305
|
+
* *
|
|
21306
|
+
* Public API *
|
|
21307
|
+
* *
|
|
21308
|
+
**************************************************************************/
|
|
21309
|
+
/**
|
|
21310
|
+
* Let the user choose some entities and return the selection.
|
|
21311
|
+
*/
|
|
21312
|
+
choose(keyGetter, currentSelection, filters, sorts, multi = false) {
|
|
21313
|
+
this.dataViewOptionsProvider.updateOptions(options => options
|
|
21314
|
+
.withFilters(filters || [])
|
|
21315
|
+
.withSorts(sorts || [])
|
|
21316
|
+
.withSelectionMultiEnabled(multi));
|
|
21317
|
+
this.selectionModel.isMultipleSelection = multi;
|
|
21318
|
+
this.selectionModel.keyGetterFn = keyGetter;
|
|
21319
|
+
this.selectionModel.replaceSelection(currentSelection);
|
|
21320
|
+
this.log.info('Replaced selection popup with current ' + currentSelection.length + ' entities:', currentSelection);
|
|
21321
|
+
const dialogRef = this.openSelectDialog();
|
|
21322
|
+
// This fixes dialog rendering when the browser template
|
|
21323
|
+
// view container is outside the invoking control, which
|
|
21324
|
+
// happens when using ng-content projection.
|
|
21325
|
+
this.changeDetectorRef.markForCheck();
|
|
21326
|
+
return dialogRef.afterClosed().pipe(switchMap((chosenEntities) => {
|
|
21327
|
+
if (chosenEntities) {
|
|
21328
|
+
return this._transformerFn
|
|
21329
|
+
? of(chosenEntities.map(value => this._transformerFn(value)))
|
|
21330
|
+
: of(chosenEntities);
|
|
21331
|
+
}
|
|
21332
|
+
else {
|
|
21333
|
+
return EMPTY;
|
|
21334
|
+
}
|
|
21335
|
+
}));
|
|
21336
|
+
}
|
|
21337
|
+
/***************************************************************************
|
|
21338
|
+
* *
|
|
21339
|
+
* Private methods *
|
|
21340
|
+
* *
|
|
21341
|
+
**************************************************************************/
|
|
21342
|
+
openSelectDialog() {
|
|
21343
|
+
return this.dialog.open(TemplatedSelectionDialogComponent, {
|
|
21344
|
+
width: '90vw',
|
|
21345
|
+
height: '90vh',
|
|
21346
|
+
panelClass: 'custom-dialog-container',
|
|
21347
|
+
data: {
|
|
21348
|
+
selectionComponentTemplate: this.templateRef
|
|
21349
|
+
},
|
|
21350
|
+
viewContainerRef: this.viewContainer
|
|
21351
|
+
});
|
|
21352
|
+
}
|
|
21353
|
+
}
|
|
21354
|
+
SelectionModelPopupDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: SelectionModelPopupDirective, deps: [{ token: i0.TemplateRef }, { token: i0.ViewContainerRef }, { token: i1$7.MatDialog }, { token: ElderDataViewOptionsProvider }, { token: SelectionModel }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
21355
|
+
SelectionModelPopupDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: SelectionModelPopupDirective, selector: "[elderSelectionModelPopup]", inputs: { elderSelectionModelPopupTransform: "elderSelectionModelPopupTransform" }, providers: [
|
|
21356
|
+
{
|
|
21357
|
+
provide: SelectionModel,
|
|
21358
|
+
useFactory: createSelectionModel$1
|
|
21359
|
+
},
|
|
21360
|
+
{
|
|
21361
|
+
provide: ElderDataViewOptionsProvider,
|
|
21362
|
+
useFactory: createDataViewOptionsProvider
|
|
21363
|
+
},
|
|
21364
|
+
ElderTableProviders.ClearTableModel // Since this popup is frequently used inside an elder-table search box
|
|
21365
|
+
], exportAs: ["elderSelectionModelPopup"], ngImport: i0 });
|
|
21366
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: SelectionModelPopupDirective, decorators: [{
|
|
21278
21367
|
type: Directive,
|
|
21279
|
-
args: [{
|
|
21280
|
-
|
|
21368
|
+
args: [{
|
|
21369
|
+
selector: '[elderSelectionModelPopup]',
|
|
21370
|
+
exportAs: 'elderSelectionModelPopup',
|
|
21371
|
+
providers: [
|
|
21372
|
+
{
|
|
21373
|
+
provide: SelectionModel,
|
|
21374
|
+
useFactory: createSelectionModel$1
|
|
21375
|
+
},
|
|
21376
|
+
{
|
|
21377
|
+
provide: ElderDataViewOptionsProvider,
|
|
21378
|
+
useFactory: createDataViewOptionsProvider
|
|
21379
|
+
},
|
|
21380
|
+
ElderTableProviders.ClearTableModel // Since this popup is frequently used inside an elder-table search box
|
|
21381
|
+
]
|
|
21382
|
+
}]
|
|
21383
|
+
}], ctorParameters: function () { return [{ type: i0.TemplateRef }, { type: i0.ViewContainerRef }, { type: i1$7.MatDialog }, { type: ElderDataViewOptionsProvider }, { type: SelectionModel }, { type: i0.ChangeDetectorRef }]; }, propDecorators: { elderSelectionModelPopupTransform: [{
|
|
21384
|
+
type: Input,
|
|
21385
|
+
args: ['elderSelectionModelPopupTransform']
|
|
21386
|
+
}] } });
|
|
21281
21387
|
|
|
21282
21388
|
class ElderSelectComponentState {
|
|
21283
21389
|
constructor(idle, loading, error) {
|
|
@@ -25188,13 +25294,61 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
25188
25294
|
}]
|
|
25189
25295
|
}] });
|
|
25190
25296
|
|
|
25297
|
+
class TypedEventMessage {
|
|
25298
|
+
constructor(type, data) {
|
|
25299
|
+
this.type = type;
|
|
25300
|
+
this.data = data;
|
|
25301
|
+
}
|
|
25302
|
+
// type predicate to check weather an object is a DataViewMessage type
|
|
25303
|
+
static isOfType(obj) {
|
|
25304
|
+
return obj.type !== undefined
|
|
25305
|
+
&& obj.data !== undefined;
|
|
25306
|
+
}
|
|
25307
|
+
}
|
|
25308
|
+
class DataViewSelectionInit {
|
|
25309
|
+
constructor(options, initialSelection = [], idField = 'id') {
|
|
25310
|
+
this.options = options;
|
|
25311
|
+
this.initialSelection = initialSelection;
|
|
25312
|
+
this.idField = idField;
|
|
25313
|
+
}
|
|
25314
|
+
}
|
|
25315
|
+
class DataViewSelection {
|
|
25316
|
+
constructor(selection) {
|
|
25317
|
+
this.selection = selection;
|
|
25318
|
+
}
|
|
25319
|
+
}
|
|
25320
|
+
class DataViewMessage extends TypedEventMessage {
|
|
25321
|
+
constructor(type, data) {
|
|
25322
|
+
super(type, data);
|
|
25323
|
+
this.type = type;
|
|
25324
|
+
this.data = data;
|
|
25325
|
+
}
|
|
25326
|
+
static initialSelection(init) {
|
|
25327
|
+
return new DataViewMessage('SELECTION_INIT', init);
|
|
25328
|
+
}
|
|
25329
|
+
static selection(selection) {
|
|
25330
|
+
return new DataViewMessage('SELECTION_SELECTED', selection);
|
|
25331
|
+
}
|
|
25332
|
+
// type predicate to check weather an object is a DataViewMessage type
|
|
25333
|
+
static isOfType(obj) {
|
|
25334
|
+
return obj.type !== undefined
|
|
25335
|
+
&& obj.data !== undefined;
|
|
25336
|
+
}
|
|
25337
|
+
}
|
|
25338
|
+
|
|
25191
25339
|
class IFrameState {
|
|
25192
|
-
constructor(
|
|
25193
|
-
this.
|
|
25340
|
+
constructor(type, message = null) {
|
|
25341
|
+
this.type = type;
|
|
25194
25342
|
this.message = message;
|
|
25195
25343
|
}
|
|
25344
|
+
get isLoading() {
|
|
25345
|
+
return this.type === 'LOADING';
|
|
25346
|
+
}
|
|
25347
|
+
get hasLoaded() {
|
|
25348
|
+
return this.type == 'LOADED';
|
|
25349
|
+
}
|
|
25196
25350
|
get hasError() {
|
|
25197
|
-
return this.
|
|
25351
|
+
return this.type === 'ERROR';
|
|
25198
25352
|
}
|
|
25199
25353
|
}
|
|
25200
25354
|
class IframeHostComponent {
|
|
@@ -25209,24 +25363,37 @@ class IframeHostComponent {
|
|
|
25209
25363
|
* Fields *
|
|
25210
25364
|
* *
|
|
25211
25365
|
**************************************************************************/
|
|
25212
|
-
this.
|
|
25366
|
+
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
25213
25367
|
this.iframeParams$ = new BehaviorSubject(null);
|
|
25214
|
-
this.iframeState$ = new BehaviorSubject(new IFrameState('
|
|
25215
|
-
this.
|
|
25368
|
+
this.iframeState$ = new BehaviorSubject(new IFrameState('LOADING'));
|
|
25369
|
+
this.message = new EventEmitter();
|
|
25216
25370
|
this.close = new EventEmitter();
|
|
25217
25371
|
}
|
|
25218
25372
|
/***************************************************************************
|
|
25219
25373
|
* *
|
|
25220
|
-
*
|
|
25374
|
+
* Listeners *
|
|
25221
25375
|
* *
|
|
25222
25376
|
**************************************************************************/
|
|
25223
|
-
|
|
25224
|
-
|
|
25225
|
-
|
|
25226
|
-
|
|
25227
|
-
|
|
25377
|
+
/**
|
|
25378
|
+
* Listens for messages from window.
|
|
25379
|
+
* Makes it possible to react upon messages from iframe child window.
|
|
25380
|
+
*
|
|
25381
|
+
* @param event message from child window
|
|
25382
|
+
*/
|
|
25383
|
+
onWindowMessage(event) {
|
|
25384
|
+
this.log.debug('Received message from child:', event);
|
|
25385
|
+
if (event) {
|
|
25386
|
+
if (TypedEventMessage.isOfType(event.data))
|
|
25387
|
+
this.handleMessageFromChild(event.data);
|
|
25388
|
+
}
|
|
25228
25389
|
return true;
|
|
25229
25390
|
}
|
|
25391
|
+
/***************************************************************************
|
|
25392
|
+
* *
|
|
25393
|
+
* Lifecycle *
|
|
25394
|
+
* *
|
|
25395
|
+
**************************************************************************/
|
|
25396
|
+
ngOnInit() { }
|
|
25230
25397
|
/***************************************************************************
|
|
25231
25398
|
* *
|
|
25232
25399
|
* Properties *
|
|
@@ -25240,9 +25407,17 @@ class IframeHostComponent {
|
|
|
25240
25407
|
* Public API *
|
|
25241
25408
|
* *
|
|
25242
25409
|
**************************************************************************/
|
|
25243
|
-
|
|
25244
|
-
this.
|
|
25245
|
-
this.iframeState$.next(new IFrameState('
|
|
25410
|
+
onIframeLoadEvent(event) {
|
|
25411
|
+
this.log.debug('Finished loading iframe', event);
|
|
25412
|
+
this.iframeState$.next(new IFrameState('LOADED'));
|
|
25413
|
+
}
|
|
25414
|
+
onIframeErrorEvent(err) {
|
|
25415
|
+
this.log.warn('Failed to load iframe', err);
|
|
25416
|
+
this.iframeState$.next(new IFrameState('ERROR', err + ''));
|
|
25417
|
+
}
|
|
25418
|
+
sendMessageToChild(msg) {
|
|
25419
|
+
this.log.debug('Sending message to iframe child:', msg);
|
|
25420
|
+
this.iframe.nativeElement.contentWindow.postMessage(msg, "*");
|
|
25246
25421
|
}
|
|
25247
25422
|
doClose(event) {
|
|
25248
25423
|
this.close.emit();
|
|
@@ -25252,28 +25427,26 @@ class IframeHostComponent {
|
|
|
25252
25427
|
* Private methods *
|
|
25253
25428
|
* *
|
|
25254
25429
|
**************************************************************************/
|
|
25255
|
-
|
|
25256
|
-
this.
|
|
25257
|
-
|
|
25258
|
-
|
|
25259
|
-
this.post.emit(message.data);
|
|
25260
|
-
break;
|
|
25261
|
-
case 'CLOSE':
|
|
25262
|
-
this.close.emit(message.data);
|
|
25263
|
-
break;
|
|
25430
|
+
handleMessageFromChild(message) {
|
|
25431
|
+
this.message.next(message);
|
|
25432
|
+
if (message.type === 'CLOSE') {
|
|
25433
|
+
this.close.emit(message.data);
|
|
25264
25434
|
}
|
|
25265
25435
|
}
|
|
25266
25436
|
}
|
|
25267
25437
|
IframeHostComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: IframeHostComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
25268
|
-
IframeHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: IframeHostComponent, selector: "elder-i-frame-host", inputs: { iframeParams: "iframeParams" }, outputs: {
|
|
25438
|
+
IframeHostComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: IframeHostComponent, selector: "elder-i-frame-host", inputs: { iframeParams: "iframeParams" }, outputs: { message: "message", close: "close" }, host: { listeners: { "window:message": "onWindowMessage($event)" } }, viewQueries: [{ propertyName: "iframe", first: true, predicate: ["iframe"], descendants: true }], ngImport: i0, template: "<ng-container *ngIf=\"{state: iframeState$ | async, params: iframeParams$ | async} as ctx\">\n\n <div fxLayout=\"column\" fxFill>\n\n <!-- In Case of Error -->\n <div *ngIf=\"ctx.state.hasError\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n fxFlex\n >\n <span>Failed to load Iframe: {{ctx.state.message}}</span>\n </div>\n\n <!-- IFrame -->\n <iframe fxFlex #iframe\n *ngIf=\"!ctx.state.hasError\"\n (load)=\"onIframeLoadEvent($event)\"\n (error)=\"onIframeErrorEvent($event)\"\n [src]=\"ctx.params.srcUrl | elderSafeUrl\"\n class=\"iframe\"\n allow=\"clipboard *;clipboard-read *;clipboard-write *;\"\n ></iframe>\n\n <!-- Bottom Toolbar -->\n <div *ngIf=\"!ctx.params.hideActionBar\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxFlex=\"none\" class=\"toolbar\">\n\n <a mat-icon-button (click)=\"doClose($event)\" class=\"dense-button\">\n <mat-icon class=\"small-icon\">close</mat-icon>\n </a>\n\n <a mat-icon-button class=\"dense-button\"\n [href]=\"ctx.params.srcUrl | elderSafeUrl\" target=\"_blank\">\n <mat-icon class=\"small-icon\">open_in_new</mat-icon>\n </a>\n\n </div>\n\n </div>\n\n</ng-container>\n\n\n\n", styles: [".iframe{margin:0;border:0;height:100%;background-color:#fff}\n"], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: i3$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i5.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-icon-button], a[mat-fab], a[mat-mini-fab], a[mat-stroked-button], a[mat-flat-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }, { kind: "pipe", type: ElderSafeUrlPipe, name: "elderSafeUrl" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25269
25439
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: IframeHostComponent, decorators: [{
|
|
25270
25440
|
type: Component,
|
|
25271
|
-
args: [{ selector: 'elder-i-frame-host', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{state: iframeState$ | async, params: iframeParams$ | async} as ctx\">\n\n <div fxLayout=\"column\" fxFill>\n\n <!-- In Case of Error -->\n <div *ngIf=\"ctx.state.hasError\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n fxFlex\n >\n <span>Failed to load Iframe: {{ctx.state.message}}</span>\n </div>\n\n <!-- IFrame -->\n <iframe fxFlex\n *ngIf=\"!ctx.state.hasError\"\n (error)=\"
|
|
25272
|
-
}], ctorParameters: function () { return []; }, propDecorators: {
|
|
25441
|
+
args: [{ selector: 'elder-i-frame-host', changeDetection: ChangeDetectionStrategy.OnPush, template: "<ng-container *ngIf=\"{state: iframeState$ | async, params: iframeParams$ | async} as ctx\">\n\n <div fxLayout=\"column\" fxFill>\n\n <!-- In Case of Error -->\n <div *ngIf=\"ctx.state.hasError\"\n fxLayout=\"row\"\n fxLayoutAlign=\"center center\"\n fxFlex\n >\n <span>Failed to load Iframe: {{ctx.state.message}}</span>\n </div>\n\n <!-- IFrame -->\n <iframe fxFlex #iframe\n *ngIf=\"!ctx.state.hasError\"\n (load)=\"onIframeLoadEvent($event)\"\n (error)=\"onIframeErrorEvent($event)\"\n [src]=\"ctx.params.srcUrl | elderSafeUrl\"\n class=\"iframe\"\n allow=\"clipboard *;clipboard-read *;clipboard-write *;\"\n ></iframe>\n\n <!-- Bottom Toolbar -->\n <div *ngIf=\"!ctx.params.hideActionBar\" fxLayout=\"row\" fxLayoutAlign=\"space-between center\" fxFlex=\"none\" class=\"toolbar\">\n\n <a mat-icon-button (click)=\"doClose($event)\" class=\"dense-button\">\n <mat-icon class=\"small-icon\">close</mat-icon>\n </a>\n\n <a mat-icon-button class=\"dense-button\"\n [href]=\"ctx.params.srcUrl | elderSafeUrl\" target=\"_blank\">\n <mat-icon class=\"small-icon\">open_in_new</mat-icon>\n </a>\n\n </div>\n\n </div>\n\n</ng-container>\n\n\n\n", styles: [".iframe{margin:0;border:0;height:100%;background-color:#fff}\n"] }]
|
|
25442
|
+
}], ctorParameters: function () { return []; }, propDecorators: { iframe: [{
|
|
25443
|
+
type: ViewChild,
|
|
25444
|
+
args: ['iframe']
|
|
25445
|
+
}], message: [{
|
|
25273
25446
|
type: Output
|
|
25274
25447
|
}], close: [{
|
|
25275
25448
|
type: Output
|
|
25276
|
-
}],
|
|
25449
|
+
}], onWindowMessage: [{
|
|
25277
25450
|
type: HostListener,
|
|
25278
25451
|
args: ['window:message', ['$event']]
|
|
25279
25452
|
}], iframeParams: [{
|
|
@@ -25314,7 +25487,7 @@ class IframeDialogComponent {
|
|
|
25314
25487
|
}
|
|
25315
25488
|
}
|
|
25316
25489
|
IframeDialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: IframeDialogComponent, deps: [{ token: i1$7.MatDialogRef }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
25317
|
-
IframeDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: IframeDialogComponent, selector: "elder-i-frame-dialog", ngImport: i0, template: "<div *ngIf=\"iframeParams$ | async as iFrameParams\" fxFill>\n\n <elder-i-frame-host fxFlex\n [iframeParams]=\"iFrameParams\"\n (close)=\"close($event)\">\n </elder-i-frame-host>\n\n</div>\n\n\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: IframeHostComponent, selector: "elder-i-frame-host", inputs: ["iframeParams"], outputs: ["
|
|
25490
|
+
IframeDialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: IframeDialogComponent, selector: "elder-i-frame-dialog", ngImport: i0, template: "<div *ngIf=\"iframeParams$ | async as iFrameParams\" fxFill>\n\n <elder-i-frame-host fxFlex\n [iframeParams]=\"iFrameParams\"\n (close)=\"close($event)\">\n </elder-i-frame-host>\n\n</div>\n\n\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: IframeHostComponent, selector: "elder-i-frame-host", inputs: ["iframeParams"], outputs: ["message", "close"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25318
25491
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: IframeDialogComponent, decorators: [{
|
|
25319
25492
|
type: Component,
|
|
25320
25493
|
args: [{ selector: 'elder-i-frame-dialog', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div *ngIf=\"iframeParams$ | async as iFrameParams\" fxFill>\n\n <elder-i-frame-host fxFlex\n [iframeParams]=\"iFrameParams\"\n (close)=\"close($event)\">\n </elder-i-frame-host>\n\n</div>\n\n\n\n" }]
|
|
@@ -25388,7 +25561,7 @@ class IframeSideContentComponent {
|
|
|
25388
25561
|
IframeSideContentComponent.QUERY_PARAM_SRC_URL = 'srcUrl';
|
|
25389
25562
|
IframeSideContentComponent.QUERY_PARAM_WIDTH = 'width';
|
|
25390
25563
|
IframeSideContentComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: IframeSideContentComponent, deps: [{ token: i1$3.Router }, { token: i1$3.ActivatedRoute }, { token: ElderShellService }], target: i0.ɵɵFactoryTarget.Component });
|
|
25391
|
-
IframeSideContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: IframeSideContentComponent, selector: "elder-i-frame-side-host", ngImport: i0, template: "\n<div *ngIf=\"iframeParams$ | async as iFrameParams\"\n [style.width]=\"iFrameParams.width\" fxFill\n>\n\n <elder-i-frame-host fxFlex\n [iframeParams]=\"iFrameParams\"\n (close)=\"close($event)\">\n </elder-i-frame-host>\n\n</div>\n\n\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: IframeHostComponent, selector: "elder-i-frame-host", inputs: ["iframeParams"], outputs: ["
|
|
25564
|
+
IframeSideContentComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: IframeSideContentComponent, selector: "elder-i-frame-side-host", ngImport: i0, template: "\n<div *ngIf=\"iframeParams$ | async as iFrameParams\"\n [style.width]=\"iFrameParams.width\" fxFill\n>\n\n <elder-i-frame-host fxFlex\n [iframeParams]=\"iFrameParams\"\n (close)=\"close($event)\">\n </elder-i-frame-host>\n\n</div>\n\n\n\n", styles: [""], dependencies: [{ kind: "directive", type: i1$4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: IframeHostComponent, selector: "elder-i-frame-host", inputs: ["iframeParams"], outputs: ["message", "close"] }, { kind: "pipe", type: i1$4.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25392
25565
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: IframeSideContentComponent, decorators: [{
|
|
25393
25566
|
type: Component,
|
|
25394
25567
|
args: [{ selector: 'elder-i-frame-side-host', changeDetection: ChangeDetectionStrategy.OnPush, template: "\n<div *ngIf=\"iframeParams$ | async as iFrameParams\"\n [style.width]=\"iFrameParams.width\" fxFill\n>\n\n <elder-i-frame-host fxFlex\n [iframeParams]=\"iFrameParams\"\n (close)=\"close($event)\">\n </elder-i-frame-host>\n\n</div>\n\n\n\n" }]
|
|
@@ -25423,7 +25596,7 @@ class IframeService {
|
|
|
25423
25596
|
}
|
|
25424
25597
|
postCloseMessage(data) {
|
|
25425
25598
|
IframeService.postToParent({
|
|
25426
|
-
|
|
25599
|
+
type: 'CLOSE',
|
|
25427
25600
|
data: data
|
|
25428
25601
|
});
|
|
25429
25602
|
}
|
|
@@ -25477,13 +25650,252 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
25477
25650
|
['$event']]
|
|
25478
25651
|
}] } });
|
|
25479
25652
|
|
|
25653
|
+
/**
|
|
25654
|
+
* Container for displaying a remote data view in an iframe.
|
|
25655
|
+
* Provides capabilities to communicate between remote data view (child)
|
|
25656
|
+
* and iframe parent.
|
|
25657
|
+
*/
|
|
25658
|
+
class DataViewIframeComponent {
|
|
25659
|
+
/***************************************************************************
|
|
25660
|
+
* *
|
|
25661
|
+
* Constructor *
|
|
25662
|
+
* *
|
|
25663
|
+
**************************************************************************/
|
|
25664
|
+
constructor(selectionModel) {
|
|
25665
|
+
this.selectionModel = selectionModel;
|
|
25666
|
+
/***************************************************************************
|
|
25667
|
+
* *
|
|
25668
|
+
* Fields *
|
|
25669
|
+
* *
|
|
25670
|
+
**************************************************************************/
|
|
25671
|
+
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
25672
|
+
this._dataViewOptions$ = new BehaviorSubject(null);
|
|
25673
|
+
this._destroy$ = new Subject();
|
|
25674
|
+
}
|
|
25675
|
+
/***************************************************************************
|
|
25676
|
+
* *
|
|
25677
|
+
* Life Cycle *
|
|
25678
|
+
* *
|
|
25679
|
+
**************************************************************************/
|
|
25680
|
+
ngOnInit() {
|
|
25681
|
+
}
|
|
25682
|
+
ngAfterViewInit() {
|
|
25683
|
+
// iframe is only available after view init
|
|
25684
|
+
this.setupDataViewOptionsBridge(this.iframeHost);
|
|
25685
|
+
}
|
|
25686
|
+
ngOnDestroy() {
|
|
25687
|
+
this._destroy$.next();
|
|
25688
|
+
this._destroy$.complete();
|
|
25689
|
+
}
|
|
25690
|
+
/***************************************************************************
|
|
25691
|
+
* *
|
|
25692
|
+
* Properties *
|
|
25693
|
+
* *
|
|
25694
|
+
**************************************************************************/
|
|
25695
|
+
get dataViewOptions() {
|
|
25696
|
+
return this._dataViewOptions$.getValue();
|
|
25697
|
+
}
|
|
25698
|
+
set dataViewOptions(options) {
|
|
25699
|
+
this._dataViewOptions$.next(options);
|
|
25700
|
+
}
|
|
25701
|
+
get dataViewOptions$() {
|
|
25702
|
+
return this._dataViewOptions$.asObservable();
|
|
25703
|
+
}
|
|
25704
|
+
/***************************************************************************
|
|
25705
|
+
* *
|
|
25706
|
+
* Public API *
|
|
25707
|
+
* *
|
|
25708
|
+
**************************************************************************/
|
|
25709
|
+
onMessageFromChild(message) {
|
|
25710
|
+
if (DataViewMessage.isOfType(message)) {
|
|
25711
|
+
switch (message.type) {
|
|
25712
|
+
case 'SELECTION_SELECTED':
|
|
25713
|
+
this.handleSelectionMessage(message.data);
|
|
25714
|
+
break;
|
|
25715
|
+
}
|
|
25716
|
+
}
|
|
25717
|
+
}
|
|
25718
|
+
sendMessageToChild(message) {
|
|
25719
|
+
this.log.debug("Sending message to iframe child:", message);
|
|
25720
|
+
this.iframeHost.sendMessageToChild(message);
|
|
25721
|
+
}
|
|
25722
|
+
/***************************************************************************
|
|
25723
|
+
* *
|
|
25724
|
+
* Private Methods *
|
|
25725
|
+
* *
|
|
25726
|
+
**************************************************************************/
|
|
25727
|
+
handleSelectionMessage(dataViewSelection) {
|
|
25728
|
+
if (this.selectionModel) {
|
|
25729
|
+
this.selectionModel.replaceSelection(dataViewSelection.selection);
|
|
25730
|
+
}
|
|
25731
|
+
}
|
|
25732
|
+
setupDataViewOptionsBridge(iframeHost) {
|
|
25733
|
+
combineLatest([
|
|
25734
|
+
this._dataViewOptions$,
|
|
25735
|
+
iframeHost.iframeState$
|
|
25736
|
+
]).pipe(takeUntil(this._destroy$), filter(([options, state]) => !!options && state.hasLoaded)).subscribe(([options, state]) => this.sendMessageToChild(this.buildDataViewInitMessage(options, this.initialSelection)));
|
|
25737
|
+
}
|
|
25738
|
+
buildDataViewInitMessage(options, initialSelection) {
|
|
25739
|
+
return DataViewMessage.initialSelection(new DataViewSelectionInit(options, initialSelection, this.idField));
|
|
25740
|
+
}
|
|
25741
|
+
}
|
|
25742
|
+
DataViewIframeComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DataViewIframeComponent, deps: [{ token: SelectionModel, optional: true }], target: i0.ɵɵFactoryTarget.Component });
|
|
25743
|
+
DataViewIframeComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.0.6", type: DataViewIframeComponent, selector: "elder-data-view-iframe", inputs: { srcUrl: "srcUrl", idField: "idField", initialSelection: "initialSelection", dataViewOptions: "dataViewOptions" }, viewQueries: [{ propertyName: "iframeHost", first: true, predicate: IframeHostComponent, descendants: true }], ngImport: i0, template: "<div fxLayout=\"column\" fxFill>\n\n <elder-i-frame-host fxFlex\n [iframeParams]=\"{srcUrl: srcUrl, hideActionBar: true}\"\n (message)=\"onMessageFromChild($event)\">\n </elder-i-frame-host>\n\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: i2$3.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { kind: "directive", type: i2$3.FlexFillDirective, selector: "[fxFill], [fxFlexFill]" }, { kind: "directive", type: i2$3.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { kind: "component", type: IframeHostComponent, selector: "elder-i-frame-host", inputs: ["iframeParams"], outputs: ["message", "close"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
25744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DataViewIframeComponent, decorators: [{
|
|
25745
|
+
type: Component,
|
|
25746
|
+
args: [{ selector: 'elder-data-view-iframe', changeDetection: ChangeDetectionStrategy.OnPush, template: "<div fxLayout=\"column\" fxFill>\n\n <elder-i-frame-host fxFlex\n [iframeParams]=\"{srcUrl: srcUrl, hideActionBar: true}\"\n (message)=\"onMessageFromChild($event)\">\n </elder-i-frame-host>\n\n</div>\n" }]
|
|
25747
|
+
}], ctorParameters: function () {
|
|
25748
|
+
return [{ type: SelectionModel, decorators: [{
|
|
25749
|
+
type: Optional
|
|
25750
|
+
}] }];
|
|
25751
|
+
}, propDecorators: { srcUrl: [{
|
|
25752
|
+
type: Input
|
|
25753
|
+
}], idField: [{
|
|
25754
|
+
type: Input
|
|
25755
|
+
}], initialSelection: [{
|
|
25756
|
+
type: Input
|
|
25757
|
+
}], iframeHost: [{
|
|
25758
|
+
type: ViewChild,
|
|
25759
|
+
args: [IframeHostComponent]
|
|
25760
|
+
}], dataViewOptions: [{
|
|
25761
|
+
type: Input
|
|
25762
|
+
}] } });
|
|
25763
|
+
|
|
25764
|
+
function createSelectionModel() {
|
|
25765
|
+
return new SelectionModel();
|
|
25766
|
+
}
|
|
25767
|
+
function createDataOptionsProvider() {
|
|
25768
|
+
return new ElderDataViewOptionsProvider();
|
|
25769
|
+
}
|
|
25770
|
+
/**
|
|
25771
|
+
* An adapter bridging communication between
|
|
25772
|
+
* a data view displayed in an iframe and its parent.
|
|
25773
|
+
*
|
|
25774
|
+
* For example propagates selection model changes
|
|
25775
|
+
* to the iframe parent.
|
|
25776
|
+
*/
|
|
25777
|
+
class DataViewIframeAdapterDirective {
|
|
25778
|
+
/***************************************************************************
|
|
25779
|
+
* *
|
|
25780
|
+
* Constructor *
|
|
25781
|
+
* *
|
|
25782
|
+
**************************************************************************/
|
|
25783
|
+
constructor(iframeService, selectionModel, dataViewOptionsProvider) {
|
|
25784
|
+
this.iframeService = iframeService;
|
|
25785
|
+
this.selectionModel = selectionModel;
|
|
25786
|
+
this.dataViewOptionsProvider = dataViewOptionsProvider;
|
|
25787
|
+
/***************************************************************************
|
|
25788
|
+
* *
|
|
25789
|
+
* Fields *
|
|
25790
|
+
* *
|
|
25791
|
+
**************************************************************************/
|
|
25792
|
+
this.log = LoggerFactory.getLogger(this.constructor.name);
|
|
25793
|
+
this._destroy$ = new Subject();
|
|
25794
|
+
selectionModel.selection.pipe(takeUntil(this._destroy$)).subscribe(selection => this.propagateSelectionToParent(selection));
|
|
25795
|
+
}
|
|
25796
|
+
/***************************************************************************
|
|
25797
|
+
* *
|
|
25798
|
+
* Listeners *
|
|
25799
|
+
* *
|
|
25800
|
+
**************************************************************************/
|
|
25801
|
+
/**
|
|
25802
|
+
* Listens for messages from parent window.
|
|
25803
|
+
* Makes it possible to react upon messages from iframe parent.
|
|
25804
|
+
*
|
|
25805
|
+
* @param event message from parent window
|
|
25806
|
+
*/
|
|
25807
|
+
onWindowsMessage(event) {
|
|
25808
|
+
this.log.debug('Received message event from parent:', event);
|
|
25809
|
+
if (event) {
|
|
25810
|
+
if (DataViewMessage.isOfType(event.data)) {
|
|
25811
|
+
this.log.debug('Received data view message from parent:', event);
|
|
25812
|
+
this.handleMessageFromParent(event.data);
|
|
25813
|
+
}
|
|
25814
|
+
}
|
|
25815
|
+
return true;
|
|
25816
|
+
}
|
|
25817
|
+
/***************************************************************************
|
|
25818
|
+
* *
|
|
25819
|
+
* Life Cycle *
|
|
25820
|
+
* *
|
|
25821
|
+
**************************************************************************/
|
|
25822
|
+
ngOnInit() {
|
|
25823
|
+
}
|
|
25824
|
+
ngOnDestroy() {
|
|
25825
|
+
this._destroy$.next();
|
|
25826
|
+
this._destroy$.complete();
|
|
25827
|
+
}
|
|
25828
|
+
/***************************************************************************
|
|
25829
|
+
* *
|
|
25830
|
+
* Private Methods *
|
|
25831
|
+
* *
|
|
25832
|
+
**************************************************************************/
|
|
25833
|
+
handleMessageFromParent(message) {
|
|
25834
|
+
switch (message.type) {
|
|
25835
|
+
case 'SELECTION_INIT':
|
|
25836
|
+
this.initializeDataView(message.data);
|
|
25837
|
+
break;
|
|
25838
|
+
}
|
|
25839
|
+
}
|
|
25840
|
+
initializeDataView(init) {
|
|
25841
|
+
this.dataViewOptionsProvider.updateOptions(options => options
|
|
25842
|
+
.withSorts(init.options.sorts)
|
|
25843
|
+
.withFilters(init.options.filters));
|
|
25844
|
+
this.selectionModel.keyGetterFn = (entity) => entity[init.idField];
|
|
25845
|
+
this.selectionModel.isMultipleSelection = init.options.selectionMultiEnabled;
|
|
25846
|
+
if (init.initialSelection) {
|
|
25847
|
+
this.selectionModel.replaceSelection(init.initialSelection);
|
|
25848
|
+
}
|
|
25849
|
+
}
|
|
25850
|
+
propagateSelectionToParent(selection) {
|
|
25851
|
+
this.log.debug('Propagating selection to iframe parent:', selection);
|
|
25852
|
+
const message = this.buildSelectionMessage(selection);
|
|
25853
|
+
this.iframeService.postDataMessage(message);
|
|
25854
|
+
}
|
|
25855
|
+
buildSelectionMessage(selection) {
|
|
25856
|
+
return DataViewMessage.selection(new DataViewSelection(selection));
|
|
25857
|
+
}
|
|
25858
|
+
}
|
|
25859
|
+
DataViewIframeAdapterDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DataViewIframeAdapterDirective, deps: [{ token: IframeService }, { token: SelectionModel }, { token: ElderDataViewOptionsProvider }], target: i0.ɵɵFactoryTarget.Directive });
|
|
25860
|
+
DataViewIframeAdapterDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "14.0.6", type: DataViewIframeAdapterDirective, selector: "[elderDataViewIframeAdapter]", host: { listeners: { "window:message": "onWindowsMessage($event)" } }, providers: [
|
|
25861
|
+
{
|
|
25862
|
+
provide: SelectionModel,
|
|
25863
|
+
useFactory: createSelectionModel
|
|
25864
|
+
},
|
|
25865
|
+
{
|
|
25866
|
+
provide: ElderDataViewOptionsProvider,
|
|
25867
|
+
useFactory: createDataOptionsProvider
|
|
25868
|
+
}
|
|
25869
|
+
], ngImport: i0 });
|
|
25870
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: DataViewIframeAdapterDirective, decorators: [{
|
|
25871
|
+
type: Directive,
|
|
25872
|
+
args: [{
|
|
25873
|
+
selector: '[elderDataViewIframeAdapter]',
|
|
25874
|
+
providers: [
|
|
25875
|
+
{
|
|
25876
|
+
provide: SelectionModel,
|
|
25877
|
+
useFactory: createSelectionModel
|
|
25878
|
+
},
|
|
25879
|
+
{
|
|
25880
|
+
provide: ElderDataViewOptionsProvider,
|
|
25881
|
+
useFactory: createDataOptionsProvider
|
|
25882
|
+
}
|
|
25883
|
+
]
|
|
25884
|
+
}]
|
|
25885
|
+
}], ctorParameters: function () { return [{ type: IframeService }, { type: SelectionModel }, { type: ElderDataViewOptionsProvider }]; }, propDecorators: { onWindowsMessage: [{
|
|
25886
|
+
type: HostListener,
|
|
25887
|
+
args: ['window:message', ['$event']]
|
|
25888
|
+
}] } });
|
|
25889
|
+
|
|
25480
25890
|
class ElderIFrameModule {
|
|
25481
25891
|
}
|
|
25482
25892
|
ElderIFrameModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderIFrameModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
25483
25893
|
ElderIFrameModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "14.0.6", ngImport: i0, type: ElderIFrameModule, declarations: [IframeHostComponent,
|
|
25484
25894
|
IframeDialogComponent,
|
|
25485
25895
|
IframeSideContentComponent,
|
|
25486
|
-
IframeCloseDirective
|
|
25896
|
+
IframeCloseDirective,
|
|
25897
|
+
DataViewIframeComponent,
|
|
25898
|
+
DataViewIframeAdapterDirective], imports: [
|
|
25487
25899
|
// Angular
|
|
25488
25900
|
CommonModule,
|
|
25489
25901
|
RouterModule,
|
|
@@ -25499,7 +25911,9 @@ ElderIFrameModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", versi
|
|
|
25499
25911
|
], exports: [IframeHostComponent,
|
|
25500
25912
|
IframeDialogComponent,
|
|
25501
25913
|
IframeSideContentComponent,
|
|
25502
|
-
IframeCloseDirective
|
|
25914
|
+
IframeCloseDirective,
|
|
25915
|
+
DataViewIframeComponent,
|
|
25916
|
+
DataViewIframeAdapterDirective] });
|
|
25503
25917
|
ElderIFrameModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "14.0.6", ngImport: i0, type: ElderIFrameModule, imports: [
|
|
25504
25918
|
// Angular
|
|
25505
25919
|
CommonModule,
|
|
@@ -25535,13 +25949,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
25535
25949
|
IframeHostComponent,
|
|
25536
25950
|
IframeDialogComponent,
|
|
25537
25951
|
IframeSideContentComponent,
|
|
25538
|
-
IframeCloseDirective
|
|
25952
|
+
IframeCloseDirective,
|
|
25953
|
+
DataViewIframeComponent,
|
|
25954
|
+
DataViewIframeAdapterDirective
|
|
25539
25955
|
],
|
|
25540
25956
|
exports: [
|
|
25541
25957
|
IframeHostComponent,
|
|
25542
25958
|
IframeDialogComponent,
|
|
25543
25959
|
IframeSideContentComponent,
|
|
25544
|
-
IframeCloseDirective
|
|
25960
|
+
IframeCloseDirective,
|
|
25961
|
+
DataViewIframeComponent,
|
|
25962
|
+
DataViewIframeAdapterDirective
|
|
25545
25963
|
]
|
|
25546
25964
|
}]
|
|
25547
25965
|
}] });
|
|
@@ -26680,5 +27098,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.0.6", ngImpor
|
|
|
26680
27098
|
* Generated bundle index. Do not edit.
|
|
26681
27099
|
*/
|
|
26682
27100
|
|
|
26683
|
-
export { AuditedEntity, AutoStartSpec, BlobUrl, BytesFormat, BytesPerSecondFormat, BytesPipe, CardDropEvent, CardOrganizerData, CardStack, CollectionUtil, ComparatorBuilder, ConfirmDialogConfig, ContinuableListing, CsvColumnSpec, CsvSerializer, CsvSpec, CsvStreamExporter, CsvStreamExporterBuilder, CsvStreamExporterBuilderService, Currency, CurrencyCode, CurrencyUnit, CurrencyUnitRegistry, CustomDateAdapter, DataContextActivePage, DataContextAutoStarter, DataContextBase, DataContextBuilder, DataContextContinuableBase, DataContextContinuablePaged, DataContextContinuableToken, DataContextLifeCycleBinding, DataContextSelectionDirective, DataContextSimple, DataContextSnapshot, DataContextSourceAutoReloader, DataContextStateIndicatorComponent, DataContextStatus, DataSourceAdapter, DataSourceProcessor, DataTransferFactory, DataTransferProgress, DataTransferProgressAggregate, DataTransferState, DataTransferStatus, DateUtil, DelegateContinuableDataSource, DelegateDataSource, DelegateListDataSource, DelegatePagedDataSource, Dimensions, DrawerOutletBinding, DurationBucket, DurationFormat, ELDER_SELECT_BASE, EbsCommonDialogService, EbsToastService, ElderAccessDeniedComponent, ElderAccessDeniedModule, ElderAppHeaderComponent, ElderAuditModule, ElderAuditedEntityComponent, ElderAutoSelectFirstDirective, ElderAutocompleteComponent, ElderAutocompleteDirective, ElderAutocompleteModule, ElderBlobViewerComponent, ElderBreadCrumbsComponent, ElderBreadCrumbsModule, ElderButtonGroupComponent, ElderButtonGroupModule, ElderCardComponent, ElderCardContentDirective, ElderCardHeaderActionsDirective, ElderCardHeaderComponent, ElderCardModule, ElderCardOrganizerComponent, ElderCardOrganizerModule, ElderCardPanelComponent, ElderCardStackComponent, ElderCardSubtitleDirective, ElderCardTitleDirective, ElderCheckboxState, ElderChipListSelectComponent, ElderChipListSelectModule, ElderClearSelectDirective, ElderClipboardPutDirective, ElderClipboardService, ElderConfirmDialogComponent, ElderConnectivityModule, ElderConnectivityService, ElderContainersModule, ElderCsvExportBtnComponent, ElderCsvModule, ElderCurrencyModule, ElderCurrencyPipe, ElderDataCommonModule, ElderDataToolbarComponent, ElderDataTransferModule, ElderDataTransferService, ElderDataViewBaseComponent,
|
|
27101
|
+
export { AuditedEntity, AutoStartSpec, BlobUrl, BytesFormat, BytesPerSecondFormat, BytesPipe, CardDropEvent, CardOrganizerData, CardStack, CollectionUtil, ComparatorBuilder, ConfirmDialogConfig, ContinuableListing, CsvColumnSpec, CsvSerializer, CsvSpec, CsvStreamExporter, CsvStreamExporterBuilder, CsvStreamExporterBuilderService, Currency, CurrencyCode, CurrencyUnit, CurrencyUnitRegistry, CustomDateAdapter, DataContextActivePage, DataContextAutoStarter, DataContextBase, DataContextBuilder, DataContextContinuableBase, DataContextContinuablePaged, DataContextContinuableToken, DataContextLifeCycleBinding, DataContextSelectionDirective, DataContextSimple, DataContextSnapshot, DataContextSourceAutoReloader, DataContextStateIndicatorComponent, DataContextStatus, DataSourceAdapter, DataSourceProcessor, DataTransferFactory, DataTransferProgress, DataTransferProgressAggregate, DataTransferState, DataTransferStatus, DataViewIframeAdapterDirective, DataViewIframeComponent, DataViewMessage, DataViewOptionsProviderBinding, DataViewSelection, DataViewSelectionInit, DateUtil, DelegateContinuableDataSource, DelegateDataSource, DelegateListDataSource, DelegatePagedDataSource, Dimensions, DrawerOutletBinding, DurationBucket, DurationFormat, ELDER_DATA_VIEW, ELDER_SELECT_BASE, EbsCommonDialogService, EbsToastService, ElderAccessDeniedComponent, ElderAccessDeniedModule, ElderAppHeaderComponent, ElderAuditModule, ElderAuditedEntityComponent, ElderAutoSelectFirstDirective, ElderAutocompleteComponent, ElderAutocompleteDirective, ElderAutocompleteModule, ElderBlobViewerComponent, ElderBreadCrumbsComponent, ElderBreadCrumbsModule, ElderButtonGroupComponent, ElderButtonGroupModule, ElderCardComponent, ElderCardContentDirective, ElderCardHeaderActionsDirective, ElderCardHeaderComponent, ElderCardModule, ElderCardOrganizerComponent, ElderCardOrganizerModule, ElderCardPanelComponent, ElderCardStackComponent, ElderCardSubtitleDirective, ElderCardTitleDirective, ElderCheckboxState, ElderChipListSelectComponent, ElderChipListSelectModule, ElderClearSelectDirective, ElderClipboardPutDirective, ElderClipboardService, ElderConfirmDialogComponent, ElderConnectivityModule, ElderConnectivityService, ElderContainersModule, ElderCsvExportBtnComponent, ElderCsvModule, ElderCurrencyModule, ElderCurrencyPipe, ElderDataCommonModule, ElderDataToolbarComponent, ElderDataTransferModule, ElderDataTransferService, ElderDataViewBaseComponent, ElderDataViewOptionsProvider, ElderDateSwitcherComponent, ElderDateTimeInputComponent, ElderDatesModule, ElderDelayedFocusDirective, ElderDialogConfig, ElderDialogModule, ElderDialogService, ElderDimensionsInputComponent, ElderDurationInputComponent, ElderEntityValueAccessorUtil, ElderEnumTranslationService, ElderErrorModule, ElderEventSourceService, ElderExceptionDetailComponent, ElderExpandToggleButtonComponent, ElderExpandToggleButtonModule, ElderFileDropZoneDirective, ElderFileModule, ElderFileSelectComponent, ElderFileSelectDirective, ElderFileUploadComponent, ElderFormFieldControlBase, ElderFormFieldDenseDirective, ElderFormFieldLabelDirective, ElderFormFieldNoHintDirective, ElderFormFieldNoSpinnerDirective, ElderFormsDirectivesModule, ElderFormsModule, ElderFromFieldBase, ElderFromFieldEntityBase, ElderFromFieldMultiEntityBase, ElderGlobalSearchComponent, ElderGlobalSearchModule, ElderGlobalSearchService, ElderGridComponent, ElderGridModule, ElderGridTileDirective, ElderGridToolbarDirective, ElderHeaderComponent, ElderHeaderModule, ElderHttpClient, ElderI18nEntitiesModule, ElderIFrameModule, ElderInfiniteAutocompleteDirective, ElderInfiniteScrollDirective, ElderInfiniteScrollLegacyDirective, ElderInfiniteScrollModule, ElderInputPatternDirective, ElderIntervalInputComponent, ElderKeyEventDirective, ElderLabelInputComponent, ElderLabelsModule, ElderLanguageConfig, ElderLanguageInterceptor, ElderLanguageModule, ElderLanguageService, ElderLanguageSwitcherComponent, ElderLocalDateInputComponent, ElderLocalTimeInputComponent, ElderLocalesDeChModule, ElderLocalizedInputComponent, ElderLocalizedInputDialogComponent, ElderLocalizedInputDialogService, ElderLocalizedInputTableComponent, ElderLocalizedTextColumnDirective, ElderLocalizedTextsDirective, ElderMaxDirective, ElderMeasuresModule, ElderMinDirective, ElderMultiAutoCompleteModule, ElderMultiAutocompleteComponent, ElderMultiEntityValueAccessorUtil, ElderMultiSelectBase, ElderMultiSelectChipsComponent, ElderMultiSelectFormField, ElderMultipleOfValidator, ElderNavGroupComponent, ElderNavLinkComponent, ElderNavListComponent, ElderNavModule, ElderNextFocusableDirective, ElderNumberCellDirective, ElderOfflineIndicatorComponent, ElderOverlayComponent, ElderOverlayModule, ElderOverlayOriginDirective, ElderOverlayTriggerDirective, ElderPaddingDirective, ElderPanelComponent, ElderPanelModule, ElderPeriodInputComponent, ElderPipesModule, ElderPlugParentFormDirective, ElderPlugParentFormDirectiveLegacy, ElderProgressBarComponent, ElderProgressBarModule, ElderQuantityInputComponent, ElderQuantityModule, ElderQuantityPipe, ElderQuantityService, ElderQuantityTransformPipe, ElderQuestionDialogComponent, ElderRepeatPipe, ElderRepeatPipeLegacy, ElderRequiredIgnoreZeroValidator, ElderRoundPipe, ElderRouteOutletDrawerService, ElderRouterOutletService, ElderSafeUrlPipe, ElderScrollContainerComponent, ElderSearchBoxComponent, ElderSearchContextDirective, ElderSearchInputDirective, ElderSearchModule, ElderSearchPanelComponent, ElderSelectBase, ElderSelectChipAvatarDirective, ElderSelectChipDirective, ElderSelectComponent, ElderSelectComponentState, ElderSelectCustomInputDirective, ElderSelectFormField, ElderSelectListComponent, ElderSelectListItemComponent, ElderSelectListModule, ElderSelectModule, ElderSelectOnTabDirective, ElderSelectValueDirective, ElderSelectionDialogComponent, ElderSelectionDialogDirective, ElderSelectionMasterCheckboxComponent, ElderShellCenterDirective, ElderShellComponent, ElderShellModule, ElderShellNavigationToggleComponent, ElderShellService, ElderShellSideLeftDirective, ElderShellSideRightDirective, ElderShellSlotDirective, ElderSimpleSelectionViewComponent, ElderSimpleSelectionViewModule, ElderSingleSortComponent, ElderStackCardDirective, ElderStopEventPropagationDirective, ElderStopEventPropagationDirectiveLegacy, ElderSvgViewerComponent, ElderTabDirective, ElderTabFocusTrapDirective, ElderTabGroupRoutingDirective, ElderTabModule, ElderTableActivationDirective, ElderTableComponent, ElderTableExtensionDirective, ElderTableGroup, ElderTableModel, ElderTableModelCdkTableBinding, ElderTableModelQueryGroup, ElderTableModule, ElderTableProviders, ElderTableRootDirective, ElderTableSortDirective, ElderTableToolbarDirective, ElderThemeApplierDirective, ElderThemeDirective, ElderThemeModule, ElderThemePreferenceService, ElderThemeService, ElderThemeToggleComponent, ElderTimeModule, ElderToastModule, ElderToastService, ElderToolbarColumnDirective, ElderToolbarComponent, ElderToolbarContentDirective, ElderToolbarModule, ElderToolbarService, ElderToolbarTitleComponent, ElderToolbarTitleService, ElderTouchedDirective, ElderTouchedDirectiveLegacy, ElderTrimPipe, ElderTripleStateCheckboxDirective, ElderTruncatePipe, ElderUnitSelectDirective, ElderUnitService, ElderUrlFragment, ElderUrlFragmentModule, ElderUrlFragmentParamsService, ElderUrlFragmentSwitcherComponent, ElderViewersModule, EntitySetPatch, ErrorUtil, ExceptionDetailCtx, FileUploadClient, Filter, FilterContext, FilterUtil, FormFieldBaseComponent, HttpClientBuilder, HttpClientPristine, HttpDataTransfer, HttpDataTransferAggregateComponent, HttpDataTransferComponent, HttpDataTransferIndicatorComponent, HttpDataTransferOverviewComponent, HttpParamsBuilder, I18nBase, I18nPickAsyncPipe, I18nPickPipe, I18nText, IFrameState, IframeCloseDirective, IframeDialogComponent, IframeHostComponent, IframeService, IframeSideContentComponent, InternalRestClientConfig, Interval, IsoDurationPipe, IsoIntervalParsePipe, IsoIntervalPipe, JsonMapUtil, KafentConfig, KafentEvent, KafentEventService, KafentEventStream, KafentEventStreamDisabled, KafentEventStreamSse, KafentEventTransport, KafentModule, KafentSseEventChannel, KafentTokenProvider, KafentTokenProviderSessionStorage, KafentTopicSse, KnownElderThemes, KnownLocaleType, LocalListDataSource, LocalPagedDataSource, LocalisationPickerService, MasterSelectionState, MatTableDataContextBinding, MatTableDataContextBindingBuilder, MultiModelBaseComponent, NextNumberUtil, Objects, OnlineStatus, Page, PageRequest, Pageable, ParseUtil, Path, PathNode, PeriodBucket, PeriodDuration, PeriodFormat, ProcessIterationContext, ProcessState, PropertyPathUtil, Quantity, QueryListBinding, QuestionDialogConfig, ReactiveEventSource, ReactiveMap, RefreshingEntity, ReplacementResult, RestClient, RestClientConfig, RestClientContinuable, RestClientList, RestClientPaged, SearchQuery, SelectionModel, SelectionModelPopupDirective, Sets, SimpleLocalisationPicker, Sort, SortOption, SortUtil, SubBar, SuggestionProvider, TemplateCompositeControl, TemplatedSelectionDialogComponent, TextRange, ThemeSpec, TimeAgoPipe, TimeDurationPipe, TimeUtil, ToastService, ToastType, TokenChunkRequest, ToolbarHeader, TranslatedEnumValue, TypedEventMessage, Unit, UnitDimension, UnitDimensionInfo, UnitInfo, UnitRegistry, UrlBuilder, UrlQueryParams, UuidUtil, ValueAccessorBase, ValueWrapper, ViewProviders, WeightPipe, WordPositionFinder, alphaNumStringComparator, buildFormIntegrationProviders, createDataOptionsProvider, createSelectionModel, existingOrNewElderTableModel, isActivePagedDataContext, isContinuableDataContext, isContinuableDataSource, isDataContext, isDataSource, isElderEntityValueAccessor, isElderMultiEntityValueAccessor, isListDataSource, isPagedDataSource, naturalValueComparator, newElderTableModel, proxyControlContainer, registerLocale, runInZone, themeInit };
|
|
26684
27102
|
//# sourceMappingURL=elderbyte-ngx-starter.mjs.map
|