@datarailsshared/datarailsshared 1.4.80-dragons → 1.4.84
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/bundles/datarailsshared-datarailsshared.umd.js +295 -24
- package/bundles/datarailsshared-datarailsshared.umd.js.map +1 -1
- package/datarailsshared-datarailsshared-1.4.84.tgz +0 -0
- package/datarailsshared-datarailsshared.d.ts +2 -0
- package/datarailsshared-datarailsshared.metadata.json +1 -1
- package/esm2015/datarailsshared-datarailsshared.js +3 -1
- package/esm2015/lib/dr-dialog/components/dialog-modal-wrapper/dialog-modal-wrapper.component.js +70 -0
- package/esm2015/lib/dr-dialog/components/dialog-wrapper/dialog-wrapper.component.js +89 -0
- package/esm2015/lib/dr-dialog/dialog.module.js +32 -0
- package/esm2015/lib/dr-dialog/interfaces/dialog-data.js +21 -0
- package/esm2015/lib/dr-dialog/services/dialog.service.js +75 -0
- package/esm2015/lib/dr-inputs/dr-select/dr-select.component.js +3 -5
- package/esm2015/lib/stepper/stepper.module.js +3 -3
- package/esm2015/public-api.js +5 -2
- package/fesm2015/datarailsshared-datarailsshared.js +280 -20
- package/fesm2015/datarailsshared-datarailsshared.js.map +1 -1
- package/lib/dr-dialog/components/dialog-modal-wrapper/dialog-modal-wrapper.component.d.ts +23 -0
- package/lib/dr-dialog/components/dialog-wrapper/dialog-wrapper.component.d.ts +24 -0
- package/lib/dr-dialog/dialog.module.d.ts +2 -0
- package/lib/dr-dialog/interfaces/dialog-data.d.ts +109 -0
- package/lib/dr-dialog/services/dialog.service.d.ts +27 -0
- package/lib/dr-inputs/dr-select/dr-select.component.d.ts +0 -1
- package/lib/stepper/stepper.module.d.ts +1 -1
- package/package.json +1 -1
- package/public-api.d.ts +4 -1
- package/datarailsshared-datarailsshared-1.4.80-dragons.tgz +0 -0
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import * as i0 from '@angular/core';
|
|
2
2
|
import { EventEmitter, Component, ViewEncapsulation, Input, Output, ChangeDetectionStrategy, ChangeDetectorRef, forwardRef, ElementRef, Inject, PLATFORM_ID, ContentChildren, Renderer2, HostBinding, ContentChild, Pipe, TemplateRef, HostListener, Directive, ComponentFactoryResolver, ViewContainerRef, ViewChild, Injector, Injectable, Host, NgModule, Optional } from '@angular/core';
|
|
3
|
-
import { FormControl, NG_VALUE_ACCESSOR, NgModel, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
3
|
+
import { FormControl, NG_VALUE_ACCESSOR, FormGroup, NgModel, FormsModule, ReactiveFormsModule, NgControl } from '@angular/forms';
|
|
4
4
|
import { DateAdapter, MAT_DATE_LOCALE, MAT_DATE_FORMATS, MatNativeDateModule } from '@angular/material/core';
|
|
5
5
|
import { MomentDateAdapter, MAT_MOMENT_DATE_ADAPTER_OPTIONS, MatMomentDateModule } from '@angular/material-moment-adapter';
|
|
6
6
|
import * as momentImported from 'moment';
|
|
7
7
|
import { isPlatformBrowser, DOCUMENT, CommonModule } from '@angular/common';
|
|
8
8
|
import { Subject, from, merge, fromEvent, noop as noop$1, BehaviorSubject } from 'rxjs';
|
|
9
|
-
import { startWith, switchMap, takeUntil, filter, skip, first, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
9
|
+
import { startWith, switchMap, takeUntil, filter, skip, first, catchError, debounceTime, distinctUntilChanged } from 'rxjs/operators';
|
|
10
10
|
import { transition, style, animate, trigger, state } from '@angular/animations';
|
|
11
11
|
import * as i1 from '@angular/cdk/overlay';
|
|
12
12
|
import { Overlay, OverlayPositionBuilder, OverlayConfig } from '@angular/cdk/overlay';
|
|
13
13
|
import { ComponentPortal } from '@angular/cdk/portal';
|
|
14
|
+
import * as i1$1 from '@angular/material/dialog';
|
|
15
|
+
import { MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatDialogModule } from '@angular/material/dialog';
|
|
16
|
+
import * as _ from 'lodash';
|
|
14
17
|
import { MatDatepickerModule, MatCalendar } from '@angular/material/datepicker';
|
|
15
18
|
import { MatFormFieldModule } from '@angular/material/form-field';
|
|
16
19
|
import { MatInputModule } from '@angular/material/input';
|
|
@@ -243,7 +246,7 @@ const MONTH_FORMATS = {
|
|
|
243
246
|
monthYearA11yLabel: "MMMM YYYY"
|
|
244
247
|
},
|
|
245
248
|
};
|
|
246
|
-
const ɵ0$
|
|
249
|
+
const ɵ0$6 = MONTH_FORMATS;
|
|
247
250
|
class MonthTagComponent extends AnyTagComponent {
|
|
248
251
|
constructor() {
|
|
249
252
|
super();
|
|
@@ -302,7 +305,7 @@ MonthTagComponent.decorators = [
|
|
|
302
305
|
useClass: MomentDateAdapter,
|
|
303
306
|
deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],
|
|
304
307
|
},
|
|
305
|
-
{ provide: MAT_DATE_FORMATS, useValue: ɵ0$
|
|
308
|
+
{ provide: MAT_DATE_FORMATS, useValue: ɵ0$6 },
|
|
306
309
|
]
|
|
307
310
|
},] }
|
|
308
311
|
];
|
|
@@ -423,7 +426,7 @@ const WEEK_FORMATS = {
|
|
|
423
426
|
monthYearA11yLabel: "MMMM YYYY"
|
|
424
427
|
},
|
|
425
428
|
};
|
|
426
|
-
const ɵ0$
|
|
429
|
+
const ɵ0$5 = WEEK_FORMATS;
|
|
427
430
|
class WeekTagComponent extends AnyTagComponent {
|
|
428
431
|
constructor() {
|
|
429
432
|
super();
|
|
@@ -519,7 +522,7 @@ WeekTagComponent.decorators = [
|
|
|
519
522
|
useClass: MomentDateAdapter,
|
|
520
523
|
deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],
|
|
521
524
|
},
|
|
522
|
-
{ provide: MAT_DATE_FORMATS, useValue: ɵ0$
|
|
525
|
+
{ provide: MAT_DATE_FORMATS, useValue: ɵ0$5 },
|
|
523
526
|
]
|
|
524
527
|
},] }
|
|
525
528
|
];
|
|
@@ -541,7 +544,7 @@ const YEAR_FORMATS = {
|
|
|
541
544
|
monthYearA11yLabel: "MMMM YYYY"
|
|
542
545
|
},
|
|
543
546
|
};
|
|
544
|
-
const ɵ0$
|
|
547
|
+
const ɵ0$4 = YEAR_FORMATS;
|
|
545
548
|
class YearTagComponent extends AnyTagComponent {
|
|
546
549
|
constructor() {
|
|
547
550
|
super();
|
|
@@ -606,7 +609,7 @@ YearTagComponent.decorators = [
|
|
|
606
609
|
useClass: MomentDateAdapter,
|
|
607
610
|
deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],
|
|
608
611
|
},
|
|
609
|
-
{ provide: MAT_DATE_FORMATS, useValue: ɵ0$
|
|
612
|
+
{ provide: MAT_DATE_FORMATS, useValue: ɵ0$4 },
|
|
610
613
|
]
|
|
611
614
|
},] }
|
|
612
615
|
];
|
|
@@ -720,7 +723,7 @@ const DAY_FORMATS = {
|
|
|
720
723
|
monthYearA11yLabel: "MMMM YYYY"
|
|
721
724
|
},
|
|
722
725
|
};
|
|
723
|
-
const ɵ0$
|
|
726
|
+
const ɵ0$3 = DAY_FORMATS;
|
|
724
727
|
class DayTagComponent extends AnyTagComponent {
|
|
725
728
|
constructor() {
|
|
726
729
|
super();
|
|
@@ -773,7 +776,7 @@ DayTagComponent.decorators = [
|
|
|
773
776
|
useClass: MomentDateAdapter,
|
|
774
777
|
deps: [MAT_DATE_LOCALE, MAT_MOMENT_DATE_ADAPTER_OPTIONS],
|
|
775
778
|
},
|
|
776
|
-
{ provide: MAT_DATE_FORMATS, useValue: ɵ0$
|
|
779
|
+
{ provide: MAT_DATE_FORMATS, useValue: ɵ0$3 },
|
|
777
780
|
]
|
|
778
781
|
},] }
|
|
779
782
|
];
|
|
@@ -1263,7 +1266,6 @@ class DrSelectComponent {
|
|
|
1263
1266
|
this.items = [];
|
|
1264
1267
|
this.appendTo = 'body';
|
|
1265
1268
|
this.disabled = false;
|
|
1266
|
-
this.groupBy = null;
|
|
1267
1269
|
this.optionWithDescription = false;
|
|
1268
1270
|
this.keyDownFn = () => true;
|
|
1269
1271
|
this.change = new EventEmitter();
|
|
@@ -1306,13 +1308,13 @@ class DrSelectComponent {
|
|
|
1306
1308
|
DrSelectComponent.decorators = [
|
|
1307
1309
|
{ type: Component, args: [{
|
|
1308
1310
|
selector: 'dr-select',
|
|
1309
|
-
template: " <ng-select [(ngModel)]=\"selectedItem\"\n [items]=\"items\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [multiple]=\"multiple\"\n [addTag]=\"addTag\"\n [appendTo]=\"appendTo\"\n [clearable]=\"clearable\"\n [searchable]=\"searchable\"\n [hideSelected]=\"hideSelected\"\n [placeholder]=\"placeholder\"\n [loading]=\"loading\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [keyDownFn]=\"keyDownFn\"\n [searchFn]=\"searchFn\"\n [isOpen]=\"isOpen\"\n [
|
|
1311
|
+
template: " <ng-select [(ngModel)]=\"selectedItem\"\n [items]=\"items\"\n [bindLabel]=\"bindLabel\"\n [bindValue]=\"bindValue\"\n [multiple]=\"multiple\"\n [addTag]=\"addTag\"\n [appendTo]=\"appendTo\"\n [clearable]=\"clearable\"\n [searchable]=\"searchable\"\n [hideSelected]=\"hideSelected\"\n [placeholder]=\"placeholder\"\n [loading]=\"loading\"\n [readonly]=\"readonly\"\n [disabled]=\"disabled\"\n [id]=\"id\"\n [keyDownFn]=\"keyDownFn\"\n [searchFn]=\"searchFn\"\n [isOpen]=\"isOpen\"\n [attr.autofocus]=\"autofocus\"\n (change)=\"onChange(selectedItem); change.emit(selectedItem)\"\n (open)=\"open.emit($event)\"\n class=\"dr-select\">\n <ng-template *ngIf=\"optionHeaderTemplate\" ng-header-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionHeaderTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"labelTemplate\" ng-label-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"labelTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionTemplate\" ng-option-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n <ng-template *ngIf=\"optionWithDescription\" ng-option-tmp let-item=\"item\">\n <div class=\"dr-select__option-with-desc__wrapper\">\n <div>{{ item.name }}</div>\n <div class=\"dr-select__option-with-desc__description\"\n >{{ item?.description }}</div>\n </div>\n </ng-template>\n <ng-template *ngIf=\"optionFooterTemplate\" ng-footer-tmp let-item=\"item\">\n <ng-container [ngTemplateOutlet]=\"optionFooterTemplate\" [ngTemplateOutletContext]=\"{item: item}\"></ng-container>\n </ng-template>\n </ng-select>\n",
|
|
1310
1312
|
providers: [{
|
|
1311
1313
|
provide: NG_VALUE_ACCESSOR,
|
|
1312
1314
|
useExisting: DrSelectComponent,
|
|
1313
1315
|
multi: true
|
|
1314
1316
|
}],
|
|
1315
|
-
styles: [":host{width:100%;height:32px}:host.textView::ng-deep{width:auto}:host.textView::ng-deep ng-select.ng-select .ng-select-container{border:none!important;cursor:pointer}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{-webkit-text-decoration-line:underline;text-decoration-line:underline;color:#0b5af9}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow{border:none;width:auto;height:auto;display:flex;-webkit-text-decoration-line:none;text-decoration-line:none;top:0}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow:before{content:\"\\e959\";font-family:DataRails;font-size:24px;color:#000}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px!important;border:1px solid #C3C4CE;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#85889c}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#21b8f1}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{top:0!important;line-height:30px;padding:0 50px 0 8px!important;color:#151b3f;font-size:14px;font-weight:400}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 8px;height:100%;overflow:auto;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{max-height:58px;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{color:#151a41;height:24px;padding:2px 8px;font-size:12px;margin:2px 2px 2px 0;background:#E5E6EA;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{line-height:20px;padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0 0 0 9px!important;color:#51566f;font-size:16px;font-weight:bold}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#E5E6EA!important;border:1px solid #E5E6EA!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#bcbcbc!important}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#de2833}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{border:1px solid #DBDEE3;border-radius:6px!important;margin-top:8px!important;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:8px 12px;font-size:14px;line-height:22px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#F6F7F8}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#F3F7FF;color:#151b3f}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:normal!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked:hover{background:#F6F7F8}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .
|
|
1317
|
+
styles: [":host{width:100%;height:32px}:host.textView::ng-deep{width:auto}:host.textView::ng-deep ng-select.ng-select .ng-select-container{border:none!important;cursor:pointer}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{-webkit-text-decoration-line:underline;text-decoration-line:underline;color:#0b5af9}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow{border:none;width:auto;height:auto;display:flex;-webkit-text-decoration-line:none;text-decoration-line:none;top:0}:host.textView::ng-deep ng-select.ng-select .ng-select-container .ng-arrow:before{content:\"\\e959\";font-family:DataRails;font-size:24px;color:#000}:host.no-left-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-left-radius:0!important;border-top-left-radius:0!important}:host.no-right-border-radius ::ng-deep ng-select.ng-select .ng-select-container{border-bottom-right-radius:0!important;border-top-right-radius:0!important}:host.no-right-border ::ng-deep ng-select.ng-select .ng-select-container{border-right:none!important}:host.no-left-border ::ng-deep ng-select.ng-select .ng-select-container{border-left:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container{min-height:32px;height:32px;width:100%;border-radius:6px!important;border:1px solid #C3C4CE;box-shadow:none!important}:host ::ng-deep ng-select.ng-select .ng-select-container:hover{border-color:#85889c}:host ::ng-deep ng-select.ng-select .ng-select-container:focus-within{border-color:#21b8f1}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-input{top:0!important;line-height:30px;padding:0 50px 0 8px!important;color:#151b3f;font-size:14px;font-weight:400}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container{padding:0 0 0 8px;height:100%;overflow:auto;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select .ng-select-container .ng-value-container .ng-input{padding:0 0 0 3px!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container{max-height:58px;height:100%}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container{max-height:58px;font-size:14px;line-height:18px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{color:#151a41;height:24px;padding:2px 8px;font-size:12px;margin:2px 2px 2px 0;background:#E5E6EA;display:flex;flex-direction:row-reverse;align-items:center;border-radius:12px}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-label{line-height:20px;padding:0!important}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon{border:none!important;padding:0 0 0 9px!important;color:#51566f;font-size:16px;font-weight:bold}:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon,:host ::ng-deep ng-select.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value-icon:hover{background:transparent!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within{background:#E5E6EA!important;border:1px solid #E5E6EA!important}:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:hover .ng-value,:host ::ng-deep ng-select.ng-select.ng-select-disabled .ng-select-container:focus-within .ng-value{color:#bcbcbc!important}:host ::ng-deep ng-select.ng-select.ng-select-single.ng-invalid.ng-touched .ng-select-container,:host ::ng-deep ng-select.ng-select.ng-select-multiple.ng-invalid.ng-touched .ng-select-container{border-color:#de2833}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select{border:1px solid #DBDEE3;border-radius:6px!important;margin-top:8px!important;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:empty{display:none}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{display:flex;align-items:center;min-height:36px;padding:8px 12px;font-size:14px;line-height:22px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option>.ng-option-label{text-overflow:ellipsis;overflow:hidden}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option{background:#fff}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-marked{background:#F6F7F8}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked{background:#F3F7FF;color:#151b3f}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected span,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked span{font-weight:normal!important}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected:hover,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .ng-dropdown-panel-items .ng-option.ng-option-selected.ng-option-marked:hover{background:#F6F7F8}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{max-width:97%;word-break:break-word;color:#4e566c;font-weight:400;font-size:12px;line-height:20px}::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description,::ng-deep ng-dropdown-panel.ng-dropdown-panel.dr-select.ng-option-selected.ng-option-marked .dr-select__option-with-desc__wrapper .dr-select__option-with-desc__description{color:#0c142b}\n"]
|
|
1316
1318
|
},] }
|
|
1317
1319
|
];
|
|
1318
1320
|
DrSelectComponent.ctorParameters = () => [
|
|
@@ -1334,7 +1336,6 @@ DrSelectComponent.propDecorators = {
|
|
|
1334
1336
|
loading: [{ type: Input }],
|
|
1335
1337
|
readonly: [{ type: Input }],
|
|
1336
1338
|
disabled: [{ type: Input }],
|
|
1337
|
-
groupBy: [{ type: Input }],
|
|
1338
1339
|
optionWithDescription: [{ type: Input }],
|
|
1339
1340
|
id: [{ type: Input }],
|
|
1340
1341
|
keyDownFn: [{ type: Input }],
|
|
@@ -2995,6 +2996,222 @@ DrErrorComponent.propDecorators = {
|
|
|
2995
2996
|
label: [{ type: Input }]
|
|
2996
2997
|
};
|
|
2997
2998
|
|
|
2999
|
+
class DialogWrapperComponent {
|
|
3000
|
+
constructor(dialogRef, dialogService, cdr, componentFactoryResolver, dialogData) {
|
|
3001
|
+
var _a, _b, _c, _d;
|
|
3002
|
+
this.dialogRef = dialogRef;
|
|
3003
|
+
this.dialogService = dialogService;
|
|
3004
|
+
this.cdr = cdr;
|
|
3005
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
3006
|
+
this.dialogData = dialogData;
|
|
3007
|
+
this.class = ((_b = (_a = this.dialogData) === null || _a === void 0 ? void 0 : _a.theme) === null || _b === void 0 ? void 0 : _b.noThemeSizeClass) ? null : ((_d = (_c = this.dialogData) === null || _c === void 0 ? void 0 : _c.theme) === null || _d === void 0 ? void 0 : _d.themeSize) || 'medium-modal';
|
|
3008
|
+
this.saving$ = new BehaviorSubject(false);
|
|
3009
|
+
this.destroy$ = new Subject();
|
|
3010
|
+
}
|
|
3011
|
+
ngAfterViewInit() {
|
|
3012
|
+
if (!this.dialogData.child) {
|
|
3013
|
+
return new Error('Expected componentTypeChild');
|
|
3014
|
+
}
|
|
3015
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.dialogData.child);
|
|
3016
|
+
this.childComponent = this.content.createComponent(componentFactory).instance;
|
|
3017
|
+
this.childComponent.closeDialog = this.closeDialog.bind(this);
|
|
3018
|
+
this.childComponent.onAcceptDialog = this.onAcceptDialog.bind(this);
|
|
3019
|
+
// pass data to component child
|
|
3020
|
+
if (this.dialogData.childData) {
|
|
3021
|
+
_.assign(this.childComponent, this.dialogData.childData);
|
|
3022
|
+
}
|
|
3023
|
+
// call component child init func - looks like double init
|
|
3024
|
+
// if (this.childComponent.ngOnInit) {
|
|
3025
|
+
// this.childComponent.ngOnInit();
|
|
3026
|
+
// }
|
|
3027
|
+
this.cdr.detectChanges();
|
|
3028
|
+
}
|
|
3029
|
+
closeDialog(data) {
|
|
3030
|
+
this.dialogRef.close(data || false);
|
|
3031
|
+
}
|
|
3032
|
+
onDecline() {
|
|
3033
|
+
this.dialogRef.close(undefined);
|
|
3034
|
+
}
|
|
3035
|
+
onAcceptDialog(data) {
|
|
3036
|
+
if (!this.childComponent) {
|
|
3037
|
+
this.dialogRef.close(data || true);
|
|
3038
|
+
return;
|
|
3039
|
+
}
|
|
3040
|
+
const funcName = this.dialogData.acceptButton.functions;
|
|
3041
|
+
if (this.childComponent[funcName])
|
|
3042
|
+
this.childComponent[funcName]();
|
|
3043
|
+
const loadFuncName = this.dialogData.acceptButton.loading;
|
|
3044
|
+
if (this.childComponent[loadFuncName])
|
|
3045
|
+
this.isLoading = this.childComponent[loadFuncName]();
|
|
3046
|
+
if (this.dialogData.confirmFn) {
|
|
3047
|
+
this.saving$.next(true);
|
|
3048
|
+
this.dialogData.confirmFn().pipe(takeUntil(this.destroy$), catchError(error => this.dialogService.throwErr(error, this.saving$))).subscribe(() => {
|
|
3049
|
+
this.saving$.next(false);
|
|
3050
|
+
this.dialogRef.close(data || true);
|
|
3051
|
+
});
|
|
3052
|
+
}
|
|
3053
|
+
if (this.childComponent && !this.childComponent[funcName]) {
|
|
3054
|
+
this.dialogRef.close(data || true);
|
|
3055
|
+
return;
|
|
3056
|
+
}
|
|
3057
|
+
}
|
|
3058
|
+
ngOnDestroy() {
|
|
3059
|
+
this.destroy$.next(null);
|
|
3060
|
+
this.destroy$.complete();
|
|
3061
|
+
}
|
|
3062
|
+
}
|
|
3063
|
+
DialogWrapperComponent.decorators = [
|
|
3064
|
+
{ type: Component, args: [{
|
|
3065
|
+
selector: 'dr-dialog-wrapper',
|
|
3066
|
+
template: "<div class=\"dialog-wrapper\"\n [class.dialog-wrapper--confirmation-no-title]=\"dialogData.theme?.isConfirmation && !dialogData.title\">\n <i class=\"dr-icon-exit\" data-test=\"close_btn\" (click)=\"closeDialog()\" *ngIf=\"!dialogData?.hideCloseBtn\"></i>\n\n <div header class=\"dialog-wrapper__header\" *ngIf=\"dialogData.title\">\n <h1 class=\"dialog-wrapper__header__title\" data-test=\"dialogTitle\">{{dialogData.title}}</h1>\n <h1 class=\"dialog-wrapper__header__subtitle\" data-test=\"dialogSubtitle\"\n *ngIf=\"dialogData.subtitle\">{{dialogData.subtitle}}</h1>\n </div>\n <div class=\"dialog-wrapper__content\"\n [class.dialog-wrapper__content--no-padding]=\"dialogData.theme?.contentNoPadding\">\n <span *ngIf=\"dialogData.contentIcon?.class\" class=\"dialog-wrapper__content__icon\">\n <i [ngClass]=\"dialogData.contentIcon.class\" [style.color]=\"dialogData.contentIcon?.color || 'inherit'\"></i>\n </span>\n <span [innerHTML]=\"dialogData.content\"></span>\n <span #content class=\"dialog-wrapper__content__anchor\"> </span>\n </div>\n <div footer class=\"dialog-wrapper__footer\" *ngIf=\"dialogData.cancelButton || dialogData.acceptButton\">\n <div class=\"dialog-wrapper__footer__buttons\">\n <dr-button *ngIf=\"dialogData.customButton\"\n (click)=\"onDecline()\"\n [theme]=\"'secondary'\"\n [isLoading]=\"isLoading\"\n data-test=\"declineBtn\"\n [drTooltip]=\"dialogData.tooltips?.custom\">\n {{dialogData.customButton.label}}\n </dr-button>\n <dr-button *ngIf=\"dialogData.cancelButton\"\n (click)=\"closeDialog()\"\n [theme]=\"'secondary'\"\n data-test=\"closeBtn\"\n [drTooltip]=\"dialogData.tooltips?.cancel\">\n {{dialogData.cancelButton.label}}\n </dr-button>\n <dr-button *ngIf=\"dialogData.acceptButton\"\n (click)=\"onAcceptDialog()\"\n [theme]=\"dialogData.acceptButton?.theme || 'primary'\"\n [isLoading]=\"isLoading\"\n data-test=\"acceptBtn\"\n [drTooltip]=\"dialogData.tooltips?.accept\">\n {{dialogData.acceptButton.label}}\n </dr-button>\n </div>\n </div>\n</div>\n",
|
|
3067
|
+
styles: [":host.small-modal{min-height:188px;max-height:467px;min-width:400px;max-width:400px}:host.medium-modal{min-height:188px;max-height:467px;min-width:632px;max-width:632px}:host.large-modal{min-width:750px;max-width:750px}:host.medium-large-modal{min-width:669px;max-width:669px}:host.xl-modal{min-height:188px;max-height:800px;min-width:1100px;max-width:1100px}:host.xl-custom-modal{min-height:188px;max-height:800px;min-width:1100px;max-width:100%}::ng-deep .dialog-wrapper{display:flex;justify-content:space-between;flex-direction:column;position:relative}::ng-deep .dialog-wrapper>.dr-icon-exit{z-index:1;position:absolute;right:32px;top:20px;color:#51566f;cursor:pointer}::ng-deep .dialog-wrapper__header{display:flex;flex-direction:column;padding:8px 52px 8px 32px;border-bottom:1px solid #e5e6ea}::ng-deep .dialog-wrapper__header__title{color:#151b3f;position:static;font-weight:600;font-size:18px;line-height:24px}::ng-deep .dialog-wrapper__header__subtitle{font-size:14px;line-height:20px;margin:0}::ng-deep .dialog-wrapper--confirmation-no-title{padding-top:16px;height:100%}::ng-deep .dialog-wrapper__content{overflow-y:inherit;font-size:14px;font-weight:400;line-height:22px;padding:24px 32px 32px}::ng-deep .dialog-wrapper__content__anchor{display:none}::ng-deep .dialog-wrapper__content--no-padding{padding:0}::ng-deep .dialog-wrapper__content__icon{margin-right:10px;top:5px;position:relative}::ng-deep .dialog-wrapper__footer{border-top:1px solid #e5e6ea}::ng-deep .dialog-wrapper__footer__buttons{display:flex;justify-content:flex-end;padding-top:10px;padding-right:32px;padding-bottom:11px}::ng-deep .dialog-wrapper__footer__buttons dr-button:nth-child(n+2){margin-left:12px}\n"]
|
|
3068
|
+
},] }
|
|
3069
|
+
];
|
|
3070
|
+
DialogWrapperComponent.ctorParameters = () => [
|
|
3071
|
+
{ type: MatDialogRef },
|
|
3072
|
+
{ type: DialogService },
|
|
3073
|
+
{ type: ChangeDetectorRef },
|
|
3074
|
+
{ type: ComponentFactoryResolver },
|
|
3075
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
3076
|
+
];
|
|
3077
|
+
DialogWrapperComponent.propDecorators = {
|
|
3078
|
+
content: [{ type: ViewChild, args: ['content', { read: ViewContainerRef },] }],
|
|
3079
|
+
class: [{ type: HostBinding, args: ['class',] }]
|
|
3080
|
+
};
|
|
3081
|
+
|
|
3082
|
+
class DialogModalWrapperComponent {
|
|
3083
|
+
constructor(dialogRef, dialogService, dialogData) {
|
|
3084
|
+
var _a, _b;
|
|
3085
|
+
this.dialogRef = dialogRef;
|
|
3086
|
+
this.dialogService = dialogService;
|
|
3087
|
+
this.dialogData = dialogData;
|
|
3088
|
+
this.class = (_b = (_a = this === null || this === void 0 ? void 0 : this.dialogData) === null || _a === void 0 ? void 0 : _a.theme) === null || _b === void 0 ? void 0 : _b.themeSize;
|
|
3089
|
+
this.saving$ = new BehaviorSubject(false);
|
|
3090
|
+
this.isLoading = false;
|
|
3091
|
+
this.showServerErrorMessage = false;
|
|
3092
|
+
this.destroy$ = new Subject();
|
|
3093
|
+
}
|
|
3094
|
+
ngOnInit() {
|
|
3095
|
+
if (this.dialogData.fields) {
|
|
3096
|
+
this.form = new FormGroup(this.dialogData.fields.reduce((accumulator, currentValue) => {
|
|
3097
|
+
const currentFormControl = {};
|
|
3098
|
+
currentFormControl[currentValue.name] = new FormControl(currentValue.default || null, currentValue.validators || []);
|
|
3099
|
+
return Object.assign(accumulator, currentFormControl);
|
|
3100
|
+
}, {}));
|
|
3101
|
+
}
|
|
3102
|
+
}
|
|
3103
|
+
onAccept() {
|
|
3104
|
+
if (!this.dialogData.confirmFn)
|
|
3105
|
+
return this.dialogRef.close(this.form.value || true);
|
|
3106
|
+
this.isLoading = true;
|
|
3107
|
+
this.saving$.next(true);
|
|
3108
|
+
this.dialogData.confirmFn(this.form.value)
|
|
3109
|
+
.pipe(takeUntil(this.destroy$), catchError((err) => {
|
|
3110
|
+
this.showServerErrorMessage = true;
|
|
3111
|
+
this.isLoading = false;
|
|
3112
|
+
return this.dialogService.throwErr(err, this.saving$);
|
|
3113
|
+
}))
|
|
3114
|
+
.subscribe(() => {
|
|
3115
|
+
this.saving$.next(false);
|
|
3116
|
+
this.dialogRef.close(this.form.value || true);
|
|
3117
|
+
});
|
|
3118
|
+
}
|
|
3119
|
+
footerAction() {
|
|
3120
|
+
this.dialogData.footerTemplateData.action(this.form.value);
|
|
3121
|
+
}
|
|
3122
|
+
closeDialog() {
|
|
3123
|
+
this.dialogRef.close(false);
|
|
3124
|
+
}
|
|
3125
|
+
ngOnDestroy() {
|
|
3126
|
+
this.destroy$.next(null);
|
|
3127
|
+
this.destroy$.complete();
|
|
3128
|
+
}
|
|
3129
|
+
}
|
|
3130
|
+
DialogModalWrapperComponent.decorators = [
|
|
3131
|
+
{ type: Component, args: [{
|
|
3132
|
+
selector: 'dr-dialog-modal-wrapper',
|
|
3133
|
+
template: "<div header class=\"header-dialog\">\n <h1 class=\"title-dialog\" data-test=\"modalTitle\">{{dialogData.title}}</h1>\n <i mat-icon-button *ngIf=\"!dialogData.hideCloseBtn\" (click)=\"closeDialog()\" class=\"dr-icon-exit icon-close\"\n data-test=\"xBtn\"></i>\n</div>\n<div *ngIf=\"dialogData.content\" class=\"content-dialog\">\n <ng-container>{{dialogData.content}}</ng-container>\n <span #content class=\"content-anchor\"></span>\n</div>\n<form *ngIf=\"dialogData.fields\" [formGroup]=\"form\" class=\"dr-smart-from\">\n <div class=\"dr-smart-form_wrapper\">\n <div *ngFor=\"let field of dialogData.fields\" class=\"dr-smart-form_group\"\n [ngStyle]=\"{'display': field.isLabelFullWidth ? 'block' : 'flex'}\">\n <label *ngIf=\"field.label\" [ngClass]=\"field.isLabelFullWidth ? 'col-md-12 mb-2' : 'col-md-2'\"\n class=\"label p-0 d-flex align-items-center\">{{field.label}}</label>\n <div class=\"input-group p-0\"\n [ngClass]=\"{'col-md-10': field.label && !field.isLabelFullWidth, 'col-md-12': !field.label || field.isLabelFullWidth}\">\n <dr-select *ngIf=\"field.type === 'select'\"\n [searchable]=\"dialogData.searchable\"\n [clearable]=\"dialogData.clearable\"\n [formControlName]=\"field.name\"\n [bindLabel]=\"field.bindLabel || null\"\n [bindValue]=\"field.bindValue || null\"\n [selectedItem]=\"field.default\"\n [items]=\"field.items || (field.items$ | async)\"\n [required]=\"true\"\n [placeholder]=\"field.placeholder\">\n <ng-template *ngIf=\"dialogData?.footerTemplateData\" #optionFooterTemplate>\n <button (click)=\"footerAction()\" class=\"dr-select-footer__btn\">\n <i *ngIf=\"dialogData.footerTemplateData.icon\"\n class=\"{{dialogData.footerTemplateData.icon}}\"></i>\n {{dialogData.footerTemplateData.label}}</button>\n </ng-template>\n </dr-select>\n <dr-input *ngIf=\"field.type === 'input'\" data-test=\"modalInput\" class=\"form-control\"\n [formControlName]=\"field.name\" [placeholder]=\"field.placeholder\"></dr-input>\n <label class=\"form-error-alert\" *ngIf=\"dialogData.errorMessage && !form.pristine && form.invalid\">\n {{dialogData.errorMessage}}\n </label>\n <label class=\"form-error-alert\"\n *ngIf=\"form.valid && showServerErrorMessage && dialogData.serverErrorMessage\">\n {{dialogData.serverErrorMessage}}\n </label>\n </div>\n </div>\n </div>\n</form>\n\n<div footer class=\"footer-dialog\">\n <div class=\"buttons-wrapper\" *ngIf=\"dialogData.cancelButton || dialogData.acceptButton\">\n <dr-button *ngIf=\"dialogData.cancelButton\" data-test=\"modalCloseBtn\" (click)=\"closeDialog()\"\n [theme]=\"'secondary'\"> {{dialogData.cancelButton.label}}</dr-button>\n <dr-button *ngIf=\"dialogData.acceptButton\" data-test=\"modalAddBtn\" (click)=\"onAccept()\" [theme]=\"'primary'\"\n [isLoading]=\"isLoading\" [disabled]=\"form.invalid\"> {{dialogData.acceptButton.label}}</dr-button>\n </div>\n</div>\n",
|
|
3134
|
+
styles: [":host{display:flex;justify-content:space-between;flex-direction:column}:host.small-modal{min-height:188px;max-height:467px;min-width:400px;max-width:400px}:host.medium-modal{min-height:188px;max-height:467px;min-width:632px;max-width:632px}.header-dialog{display:flex;flex-direction:row;justify-content:space-between;align-items:center;padding:8px 39px 8px 32px;border-bottom:1px solid #e5e6ea}.title-dialog{color:#151b3f;position:static;font-weight:bold;font-size:18px;line-height:24px}.content-dialog{font-weight:400;font-size:14px;padding:16px 32px 5px}.icon-close{color:#51566f;cursor:pointer}.dr-smart-from{font-size:14px;font-weight:500;line-height:22px;padding:16px 32px 22px}.content-dialog{padding:16px 32px 0;font-weight:400;font-size:14px;line-height:22px}.content-anchor{display:none}.footer-dialog{border-top:1px solid #e5e6ea}.buttons-wrapper{display:flex;justify-content:flex-end;padding-top:10px;padding-right:32px;padding-bottom:11px}.buttons-wrapper dr-button:nth-of-type(2){margin-left:12px}.form-error-alert{position:absolute;margin-top:5px;font-size:12px;color:red}.dr-select-footer__btn{background-color:transparent;display:flex;align-items:center;justify-content:flex-start;cursor:pointer;min-width:15rem;font-style:normal;font-weight:400;font-size:14px;line-height:24px;clear:both;width:100%;white-space:nowrap;padding:0 12px;height:36px;flex-shrink:0}\n"]
|
|
3135
|
+
},] }
|
|
3136
|
+
];
|
|
3137
|
+
DialogModalWrapperComponent.ctorParameters = () => [
|
|
3138
|
+
{ type: MatDialogRef },
|
|
3139
|
+
{ type: DialogService },
|
|
3140
|
+
{ type: undefined, decorators: [{ type: Inject, args: [MAT_DIALOG_DATA,] }] }
|
|
3141
|
+
];
|
|
3142
|
+
DialogModalWrapperComponent.propDecorators = {
|
|
3143
|
+
class: [{ type: HostBinding, args: ['class',] }]
|
|
3144
|
+
};
|
|
3145
|
+
|
|
3146
|
+
const DEFAULT_PANE_CLASS_NAME = 'wrapper-dialog';
|
|
3147
|
+
const DEFAULT_CONFIRM_THEME = { themeSize: 'small-modal' };
|
|
3148
|
+
class DialogService {
|
|
3149
|
+
constructor(dialog) {
|
|
3150
|
+
this.dialog = dialog;
|
|
3151
|
+
}
|
|
3152
|
+
/**
|
|
3153
|
+
* Function to open modal with custom form
|
|
3154
|
+
*/
|
|
3155
|
+
openDialogWrapper(componentTypeChild, dialogData, componentTypeWrapper) {
|
|
3156
|
+
if (!componentTypeWrapper)
|
|
3157
|
+
componentTypeWrapper = DialogWrapperComponent;
|
|
3158
|
+
dialogData.data.child = componentTypeChild;
|
|
3159
|
+
if (dialogData.panelClass instanceof Array) {
|
|
3160
|
+
dialogData.panelClass.push(DEFAULT_PANE_CLASS_NAME);
|
|
3161
|
+
}
|
|
3162
|
+
else {
|
|
3163
|
+
dialogData.panelClass = [dialogData.panelClass || '', DEFAULT_PANE_CLASS_NAME];
|
|
3164
|
+
}
|
|
3165
|
+
this.wrapperComponent = this.openDialog(componentTypeWrapper, dialogData);
|
|
3166
|
+
return this.wrapperComponent;
|
|
3167
|
+
}
|
|
3168
|
+
/**
|
|
3169
|
+
* Function to open confirmation modal
|
|
3170
|
+
*/
|
|
3171
|
+
openConfirmDialog(confirmDialogData) {
|
|
3172
|
+
const dialogData = { panelClass: DEFAULT_PANE_CLASS_NAME, data: null };
|
|
3173
|
+
Object.assign(dialogData, { data: confirmDialogData });
|
|
3174
|
+
if (!dialogData.data.theme)
|
|
3175
|
+
dialogData.data.theme = DEFAULT_CONFIRM_THEME;
|
|
3176
|
+
dialogData.data.theme.isConfirmation = true;
|
|
3177
|
+
return this.openDialog(DialogWrapperComponent, dialogData);
|
|
3178
|
+
}
|
|
3179
|
+
/**
|
|
3180
|
+
* Function to open confirmation modal with inputs
|
|
3181
|
+
*/
|
|
3182
|
+
openConfirmDialogModal(confirmDialogData) {
|
|
3183
|
+
const dialogData = { panelClass: DEFAULT_PANE_CLASS_NAME, data: null };
|
|
3184
|
+
Object.assign(dialogData, { data: confirmDialogData });
|
|
3185
|
+
if (!dialogData.data.theme)
|
|
3186
|
+
dialogData.data.theme = DEFAULT_CONFIRM_THEME;
|
|
3187
|
+
return this.openDialog(DialogModalWrapperComponent, dialogData);
|
|
3188
|
+
}
|
|
3189
|
+
close(params) {
|
|
3190
|
+
this.wrapperComponent.close(params);
|
|
3191
|
+
}
|
|
3192
|
+
changeDialogThemeSize(theme) {
|
|
3193
|
+
this.wrapperComponent.componentInstance.class = theme;
|
|
3194
|
+
}
|
|
3195
|
+
openDialog(componentType, dialogData) {
|
|
3196
|
+
return this.dialog.open(componentType, dialogData);
|
|
3197
|
+
}
|
|
3198
|
+
throwErr(err, load) {
|
|
3199
|
+
if (load) {
|
|
3200
|
+
load.next(false);
|
|
3201
|
+
}
|
|
3202
|
+
throw err;
|
|
3203
|
+
}
|
|
3204
|
+
}
|
|
3205
|
+
DialogService.ɵprov = i0.ɵɵdefineInjectable({ factory: function DialogService_Factory() { return new DialogService(i0.ɵɵinject(i1$1.MatDialog)); }, token: DialogService, providedIn: "root" });
|
|
3206
|
+
DialogService.decorators = [
|
|
3207
|
+
{ type: Injectable, args: [{
|
|
3208
|
+
providedIn: 'root'
|
|
3209
|
+
},] }
|
|
3210
|
+
];
|
|
3211
|
+
DialogService.ctorParameters = () => [
|
|
3212
|
+
{ type: MatDialog }
|
|
3213
|
+
];
|
|
3214
|
+
|
|
2998
3215
|
var TooltipPosition;
|
|
2999
3216
|
(function (TooltipPosition) {
|
|
3000
3217
|
TooltipPosition["TOP"] = "top";
|
|
@@ -3011,6 +3228,27 @@ var TooltipPosition;
|
|
|
3011
3228
|
TooltipPosition["LEFT_BOTTOM"] = "left-bottom";
|
|
3012
3229
|
})(TooltipPosition || (TooltipPosition = {}));
|
|
3013
3230
|
|
|
3231
|
+
var DIALOG_SIZE;
|
|
3232
|
+
(function (DIALOG_SIZE) {
|
|
3233
|
+
DIALOG_SIZE["SMALL"] = "small-modal";
|
|
3234
|
+
DIALOG_SIZE["MEDIUM"] = "medium-modal";
|
|
3235
|
+
DIALOG_SIZE["MEDIUM_LARGE"] = "medium-large-modal";
|
|
3236
|
+
DIALOG_SIZE["LARGE"] = "large-modal";
|
|
3237
|
+
DIALOG_SIZE["X_LARGE"] = "xl-modal";
|
|
3238
|
+
DIALOG_SIZE["X_CUSTOM_LARGE"] = "xl-custom-modal";
|
|
3239
|
+
})(DIALOG_SIZE || (DIALOG_SIZE = {}));
|
|
3240
|
+
var DIALOG_BUTTON_LABEL;
|
|
3241
|
+
(function (DIALOG_BUTTON_LABEL) {
|
|
3242
|
+
DIALOG_BUTTON_LABEL["SAVE"] = "Save";
|
|
3243
|
+
DIALOG_BUTTON_LABEL["CANCEL"] = "Cancel";
|
|
3244
|
+
DIALOG_BUTTON_LABEL["CLOSE"] = "Close";
|
|
3245
|
+
})(DIALOG_BUTTON_LABEL || (DIALOG_BUTTON_LABEL = {}));
|
|
3246
|
+
var DIALOG_FIELD_TYPE;
|
|
3247
|
+
(function (DIALOG_FIELD_TYPE) {
|
|
3248
|
+
DIALOG_FIELD_TYPE["INPUT"] = "input";
|
|
3249
|
+
DIALOG_FIELD_TYPE["SELECT"] = "select";
|
|
3250
|
+
})(DIALOG_FIELD_TYPE || (DIALOG_FIELD_TYPE = {}));
|
|
3251
|
+
|
|
3014
3252
|
class DrModelDebounceChangeDirective {
|
|
3015
3253
|
constructor(ngModel) {
|
|
3016
3254
|
this.ngModel = ngModel;
|
|
@@ -3113,7 +3351,7 @@ const components$3 = [DateTagComponent,
|
|
|
3113
3351
|
AnyTagComponent,
|
|
3114
3352
|
YearTagComponent,
|
|
3115
3353
|
ForecastTagComponent];
|
|
3116
|
-
const ɵ0$
|
|
3354
|
+
const ɵ0$2 = { useUtc: true };
|
|
3117
3355
|
class DateTagModule {
|
|
3118
3356
|
}
|
|
3119
3357
|
DateTagModule.decorators = [
|
|
@@ -3131,7 +3369,7 @@ DateTagModule.decorators = [
|
|
|
3131
3369
|
],
|
|
3132
3370
|
exports: components$3,
|
|
3133
3371
|
providers: [
|
|
3134
|
-
{ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: ɵ0$
|
|
3372
|
+
{ provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: ɵ0$2 }
|
|
3135
3373
|
],
|
|
3136
3374
|
declarations: components$3,
|
|
3137
3375
|
},] }
|
|
@@ -3396,7 +3634,7 @@ DrDatePickerCustomHeaderComponent.ctorParameters = () => [
|
|
|
3396
3634
|
|
|
3397
3635
|
const moment = require('moment');
|
|
3398
3636
|
const noop = () => { };
|
|
3399
|
-
const ɵ0 = noop;
|
|
3637
|
+
const ɵ0$1 = noop;
|
|
3400
3638
|
class DrDatePickerComponent {
|
|
3401
3639
|
constructor(cdr, dateAdapter, datePickerService) {
|
|
3402
3640
|
this.cdr = cdr;
|
|
@@ -4036,9 +4274,9 @@ StepperComponent.propDecorators = {
|
|
|
4036
4274
|
stepper: [{ type: ViewChild, args: ['stepper', { read: ElementRef },] }]
|
|
4037
4275
|
};
|
|
4038
4276
|
|
|
4039
|
-
class
|
|
4277
|
+
class DrStepperModule {
|
|
4040
4278
|
}
|
|
4041
|
-
|
|
4279
|
+
DrStepperModule.decorators = [
|
|
4042
4280
|
{ type: NgModule, args: [{
|
|
4043
4281
|
declarations: [StepperComponent],
|
|
4044
4282
|
imports: [
|
|
@@ -4049,11 +4287,33 @@ StepperModule.decorators = [
|
|
|
4049
4287
|
},] }
|
|
4050
4288
|
];
|
|
4051
4289
|
|
|
4290
|
+
const ɵ0 = {}, ɵ1 = {};
|
|
4291
|
+
class DrDialogModule {
|
|
4292
|
+
}
|
|
4293
|
+
DrDialogModule.decorators = [
|
|
4294
|
+
{ type: NgModule, args: [{
|
|
4295
|
+
declarations: [DialogWrapperComponent, DialogModalWrapperComponent],
|
|
4296
|
+
imports: [
|
|
4297
|
+
CommonModule,
|
|
4298
|
+
MatDialogModule,
|
|
4299
|
+
DrInputsModule,
|
|
4300
|
+
ReactiveFormsModule,
|
|
4301
|
+
DrTooltipModule
|
|
4302
|
+
],
|
|
4303
|
+
exports: [DialogWrapperComponent, DialogModalWrapperComponent],
|
|
4304
|
+
providers: [
|
|
4305
|
+
{ provide: MatDialogRef, useValue: ɵ0 },
|
|
4306
|
+
{ provide: MAT_DIALOG_DATA, useValue: ɵ1 },
|
|
4307
|
+
DialogService
|
|
4308
|
+
]
|
|
4309
|
+
},] }
|
|
4310
|
+
];
|
|
4311
|
+
|
|
4052
4312
|
/* components */
|
|
4053
4313
|
|
|
4054
4314
|
/**
|
|
4055
4315
|
* Generated bundle index. Do not edit.
|
|
4056
4316
|
*/
|
|
4057
4317
|
|
|
4058
|
-
export { AnyTagComponent, CalendarView, CheckboxComponent, CustomDateFormat, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DayTagComponent, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrErrorComponent, DrErrorModule, DrInputComponent, DrInputsModule, DrLayoutBodyComponent, DrLayoutComponent, DrLayoutHeaderComponent, DrLayoutModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSharedUtils, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, SpinnerSize, SpinnerType,
|
|
4318
|
+
export { AnyTagComponent, CalendarView, CheckboxComponent, CustomDateFormat, DIALOG_BUTTON_LABEL, DIALOG_FIELD_TYPE, DIALOG_SIZE, DateFromats, DatePickerPeriodPosition, DateTagComponent, DateTagModule, DayTagComponent, DialogService, DrAccordionComponent, DrAccordionItemBodyComponent, DrAccordionItemComponent, DrAccordionItemHeaderComponent, DrAccordionModule, DrAvatarComponent, DrAvatarModule, DrAvatarPipe, DrButtonComponent, DrDialogModule, DrDropdownComponent, DrDropdownDirective, DrDropdownItemShowPipe, DrDropdownModule, DrDropdownPositionDirective, DrDropdownService, DrErrorComponent, DrErrorModule, DrInputComponent, DrInputsModule, DrLayoutBodyComponent, DrLayoutComponent, DrLayoutHeaderComponent, DrLayoutModule, DrModelDebounceChangeDirective, DrPopoverAlignmentDimension, DrPopoverComponent, DrPopoverDirective, DrPopoverModule, DrPopoverRef, DrPopoverService, DrSelectComponent, DrSharedUtils, DrSpinnerComponent, DrSpinnerDirective, DrSpinnerModule, DrStepperModule, DrTabComponent, DrTabsComponent, DrTabsModule, DrTagComponent, DrTagModule, DrToggleButtonComponent, DrToggleComponent, DrTooltipDirective, DrTooltipModule, ForecastTagComponent, ListTagComponent, ListTagModule, MonthTagComponent, QuarterTagComponent, RadioButtonComponent, RadioGroupComponent, SpinnerSize, SpinnerType, TimeframeOption, TooltipComponent, TooltipPosition, WeekTagComponent, YearTagComponent, components$3 as ɵa, POPUP_ANIMATION as ɵb, DrDatePickerComponent as ɵc, DrDatePickerService as ɵd, DrDatePickerWithTimeframeComponent as ɵe, DrDatePickerFormatDirective as ɵf, DrDatePickerCustomHeaderComponent as ɵg, DrShowTimeframePipe as ɵh, TooltipInfoComponent as ɵi, TooltipInfoSimpleComponent as ɵj, TooltipNoBodyComponent as ɵk, TooltipProcessDefaultComponent as ɵl, StepperComponent as ɵm, DialogWrapperComponent as ɵn, DialogModalWrapperComponent as ɵo };
|
|
4059
4319
|
//# sourceMappingURL=datarailsshared-datarailsshared.js.map
|