@datarailsshared/datarailsshared 1.4.81 → 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.
@@ -1,8 +1,8 @@
1
1
  (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('moment'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/button-toggle'), require('@ng-select/ng-select'), require('@angular/material/tooltip'), require('@angular/material/tabs')) :
3
- typeof define === 'function' && define.amd ? define('@datarailsshared/datarailsshared', ['exports', '@angular/core', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'moment', '@angular/common', 'rxjs', 'rxjs/operators', '@angular/animations', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/button-toggle', '@ng-select/ng-select', '@angular/material/tooltip', '@angular/material/tabs'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.datarailsshared = global.datarailsshared || {}, global.datarailsshared.datarailsshared = {}), global.ng.core, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.momentImported, global.ng.common, global.rxjs, global.rxjs.operators, global.ng.animations, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.buttonToggle, global.ngSelect, global.ng.material.tooltip, global.ng.material.tabs));
5
- })(this, (function (exports, i0, forms, core, materialMomentAdapter, momentImported, common, rxjs, operators, animations, i1, portal, datepicker, formField, input, select, buttonToggle, ngSelect, tooltip, tabs) { 'use strict';
2
+ typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/forms'), require('@angular/material/core'), require('@angular/material-moment-adapter'), require('moment'), require('@angular/common'), require('rxjs'), require('rxjs/operators'), require('@angular/animations'), require('@angular/cdk/overlay'), require('@angular/cdk/portal'), require('@angular/material/dialog'), require('lodash'), require('@angular/material/datepicker'), require('@angular/material/form-field'), require('@angular/material/input'), require('@angular/material/select'), require('@angular/material/button-toggle'), require('@ng-select/ng-select'), require('@angular/material/tooltip'), require('@angular/material/tabs')) :
3
+ typeof define === 'function' && define.amd ? define('@datarailsshared/datarailsshared', ['exports', '@angular/core', '@angular/forms', '@angular/material/core', '@angular/material-moment-adapter', 'moment', '@angular/common', 'rxjs', 'rxjs/operators', '@angular/animations', '@angular/cdk/overlay', '@angular/cdk/portal', '@angular/material/dialog', 'lodash', '@angular/material/datepicker', '@angular/material/form-field', '@angular/material/input', '@angular/material/select', '@angular/material/button-toggle', '@ng-select/ng-select', '@angular/material/tooltip', '@angular/material/tabs'], factory) :
4
+ (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.datarailsshared = global.datarailsshared || {}, global.datarailsshared.datarailsshared = {}), global.ng.core, global.ng.forms, global.ng.material.core, global.ng.materialMomentAdapter, global.momentImported, global.ng.common, global.rxjs, global.rxjs.operators, global.ng.animations, global.ng.cdk.overlay, global.ng.cdk.portal, global.ng.material.dialog, global._, global.ng.material.datepicker, global.ng.material.formField, global.ng.material.input, global.ng.material.select, global.ng.material.buttonToggle, global.ngSelect, global.ng.material.tooltip, global.ng.material.tabs));
5
+ })(this, (function (exports, i0, forms, core, materialMomentAdapter, momentImported, common, rxjs, operators, animations, i1, portal, i1$1, _, datepicker, formField, input, select, buttonToggle, ngSelect, tooltip, tabs) { 'use strict';
6
6
 
7
7
  function _interopNamespace(e) {
8
8
  if (e && e.__esModule) return e;
@@ -25,6 +25,8 @@
25
25
  var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
26
  var momentImported__namespace = /*#__PURE__*/_interopNamespace(momentImported);
27
27
  var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
28
+ var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
29
+ var ___namespace = /*#__PURE__*/_interopNamespace(_);
28
30
 
29
31
  // import {*} from ""
30
32
  var DateTagComponent = /** @class */ (function () {
@@ -598,7 +600,7 @@
598
600
  monthYearA11yLabel: "MMMM YYYY"
599
601
  },
600
602
  };
601
- var ɵ0$5 = MONTH_FORMATS;
603
+ var ɵ0$6 = MONTH_FORMATS;
602
604
  var MonthTagComponent = /** @class */ (function (_super) {
603
605
  __extends(MonthTagComponent, _super);
604
606
  function MonthTagComponent() {
@@ -660,7 +662,7 @@
660
662
  useClass: materialMomentAdapter.MomentDateAdapter,
661
663
  deps: [core.MAT_DATE_LOCALE, materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS],
662
664
  },
663
- { provide: core.MAT_DATE_FORMATS, useValue: ɵ0$5 },
665
+ { provide: core.MAT_DATE_FORMATS, useValue: ɵ0$6 },
664
666
  ]
665
667
  },] }
666
668
  ];
@@ -795,7 +797,7 @@
795
797
  monthYearA11yLabel: "MMMM YYYY"
796
798
  },
797
799
  };
798
- var ɵ0$4 = WEEK_FORMATS;
800
+ var ɵ0$5 = WEEK_FORMATS;
799
801
  var WeekTagComponent = /** @class */ (function (_super) {
800
802
  __extends(WeekTagComponent, _super);
801
803
  function WeekTagComponent() {
@@ -895,7 +897,7 @@
895
897
  useClass: materialMomentAdapter.MomentDateAdapter,
896
898
  deps: [core.MAT_DATE_LOCALE, materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS],
897
899
  },
898
- { provide: core.MAT_DATE_FORMATS, useValue: ɵ0$4 },
900
+ { provide: core.MAT_DATE_FORMATS, useValue: ɵ0$5 },
899
901
  ]
900
902
  },] }
901
903
  ];
@@ -917,7 +919,7 @@
917
919
  monthYearA11yLabel: "MMMM YYYY"
918
920
  },
919
921
  };
920
- var ɵ0$3 = YEAR_FORMATS;
922
+ var ɵ0$4 = YEAR_FORMATS;
921
923
  var YearTagComponent = /** @class */ (function (_super) {
922
924
  __extends(YearTagComponent, _super);
923
925
  function YearTagComponent() {
@@ -985,7 +987,7 @@
985
987
  useClass: materialMomentAdapter.MomentDateAdapter,
986
988
  deps: [core.MAT_DATE_LOCALE, materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS],
987
989
  },
988
- { provide: core.MAT_DATE_FORMATS, useValue: ɵ0$3 },
990
+ { provide: core.MAT_DATE_FORMATS, useValue: ɵ0$4 },
989
991
  ]
990
992
  },] }
991
993
  ];
@@ -1101,7 +1103,7 @@
1101
1103
  monthYearA11yLabel: "MMMM YYYY"
1102
1104
  },
1103
1105
  };
1104
- var ɵ0$2 = DAY_FORMATS;
1106
+ var ɵ0$3 = DAY_FORMATS;
1105
1107
  var DayTagComponent = /** @class */ (function (_super) {
1106
1108
  __extends(DayTagComponent, _super);
1107
1109
  function DayTagComponent() {
@@ -1157,7 +1159,7 @@
1157
1159
  useClass: materialMomentAdapter.MomentDateAdapter,
1158
1160
  deps: [core.MAT_DATE_LOCALE, materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS],
1159
1161
  },
1160
- { provide: core.MAT_DATE_FORMATS, useValue: ɵ0$2 },
1162
+ { provide: core.MAT_DATE_FORMATS, useValue: ɵ0$3 },
1161
1163
  ]
1162
1164
  },] }
1163
1165
  ];
@@ -3577,6 +3579,227 @@
3577
3579
  label: [{ type: i0.Input }]
3578
3580
  };
3579
3581
 
3582
+ var DialogWrapperComponent = /** @class */ (function () {
3583
+ function DialogWrapperComponent(dialogRef, dialogService, cdr, componentFactoryResolver, dialogData) {
3584
+ var _a, _b, _c, _d;
3585
+ this.dialogRef = dialogRef;
3586
+ this.dialogService = dialogService;
3587
+ this.cdr = cdr;
3588
+ this.componentFactoryResolver = componentFactoryResolver;
3589
+ this.dialogData = dialogData;
3590
+ 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';
3591
+ this.saving$ = new rxjs.BehaviorSubject(false);
3592
+ this.destroy$ = new rxjs.Subject();
3593
+ }
3594
+ DialogWrapperComponent.prototype.ngAfterViewInit = function () {
3595
+ if (!this.dialogData.child) {
3596
+ return new Error('Expected componentTypeChild');
3597
+ }
3598
+ var componentFactory = this.componentFactoryResolver.resolveComponentFactory(this.dialogData.child);
3599
+ this.childComponent = this.content.createComponent(componentFactory).instance;
3600
+ this.childComponent.closeDialog = this.closeDialog.bind(this);
3601
+ this.childComponent.onAcceptDialog = this.onAcceptDialog.bind(this);
3602
+ // pass data to component child
3603
+ if (this.dialogData.childData) {
3604
+ ___namespace.assign(this.childComponent, this.dialogData.childData);
3605
+ }
3606
+ // call component child init func - looks like double init
3607
+ // if (this.childComponent.ngOnInit) {
3608
+ // this.childComponent.ngOnInit();
3609
+ // }
3610
+ this.cdr.detectChanges();
3611
+ };
3612
+ DialogWrapperComponent.prototype.closeDialog = function (data) {
3613
+ this.dialogRef.close(data || false);
3614
+ };
3615
+ DialogWrapperComponent.prototype.onDecline = function () {
3616
+ this.dialogRef.close(undefined);
3617
+ };
3618
+ DialogWrapperComponent.prototype.onAcceptDialog = function (data) {
3619
+ var _this = this;
3620
+ if (!this.childComponent) {
3621
+ this.dialogRef.close(data || true);
3622
+ return;
3623
+ }
3624
+ var funcName = this.dialogData.acceptButton.functions;
3625
+ if (this.childComponent[funcName])
3626
+ this.childComponent[funcName]();
3627
+ var loadFuncName = this.dialogData.acceptButton.loading;
3628
+ if (this.childComponent[loadFuncName])
3629
+ this.isLoading = this.childComponent[loadFuncName]();
3630
+ if (this.dialogData.confirmFn) {
3631
+ this.saving$.next(true);
3632
+ this.dialogData.confirmFn().pipe(operators.takeUntil(this.destroy$), operators.catchError(function (error) { return _this.dialogService.throwErr(error, _this.saving$); })).subscribe(function () {
3633
+ _this.saving$.next(false);
3634
+ _this.dialogRef.close(data || true);
3635
+ });
3636
+ }
3637
+ if (this.childComponent && !this.childComponent[funcName]) {
3638
+ this.dialogRef.close(data || true);
3639
+ return;
3640
+ }
3641
+ };
3642
+ DialogWrapperComponent.prototype.ngOnDestroy = function () {
3643
+ this.destroy$.next(null);
3644
+ this.destroy$.complete();
3645
+ };
3646
+ return DialogWrapperComponent;
3647
+ }());
3648
+ DialogWrapperComponent.decorators = [
3649
+ { type: i0.Component, args: [{
3650
+ selector: 'dr-dialog-wrapper',
3651
+ 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",
3652
+ 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"]
3653
+ },] }
3654
+ ];
3655
+ DialogWrapperComponent.ctorParameters = function () { return [
3656
+ { type: i1$1.MatDialogRef },
3657
+ { type: DialogService },
3658
+ { type: i0.ChangeDetectorRef },
3659
+ { type: i0.ComponentFactoryResolver },
3660
+ { type: undefined, decorators: [{ type: i0.Inject, args: [i1$1.MAT_DIALOG_DATA,] }] }
3661
+ ]; };
3662
+ DialogWrapperComponent.propDecorators = {
3663
+ content: [{ type: i0.ViewChild, args: ['content', { read: i0.ViewContainerRef },] }],
3664
+ class: [{ type: i0.HostBinding, args: ['class',] }]
3665
+ };
3666
+
3667
+ var DialogModalWrapperComponent = /** @class */ (function () {
3668
+ function DialogModalWrapperComponent(dialogRef, dialogService, dialogData) {
3669
+ var _a, _b;
3670
+ this.dialogRef = dialogRef;
3671
+ this.dialogService = dialogService;
3672
+ this.dialogData = dialogData;
3673
+ 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;
3674
+ this.saving$ = new rxjs.BehaviorSubject(false);
3675
+ this.isLoading = false;
3676
+ this.showServerErrorMessage = false;
3677
+ this.destroy$ = new rxjs.Subject();
3678
+ }
3679
+ DialogModalWrapperComponent.prototype.ngOnInit = function () {
3680
+ if (this.dialogData.fields) {
3681
+ this.form = new forms.FormGroup(this.dialogData.fields.reduce(function (accumulator, currentValue) {
3682
+ var currentFormControl = {};
3683
+ currentFormControl[currentValue.name] = new forms.FormControl(currentValue.default || null, currentValue.validators || []);
3684
+ return Object.assign(accumulator, currentFormControl);
3685
+ }, {}));
3686
+ }
3687
+ };
3688
+ DialogModalWrapperComponent.prototype.onAccept = function () {
3689
+ var _this = this;
3690
+ if (!this.dialogData.confirmFn)
3691
+ return this.dialogRef.close(this.form.value || true);
3692
+ this.isLoading = true;
3693
+ this.saving$.next(true);
3694
+ this.dialogData.confirmFn(this.form.value)
3695
+ .pipe(operators.takeUntil(this.destroy$), operators.catchError(function (err) {
3696
+ _this.showServerErrorMessage = true;
3697
+ _this.isLoading = false;
3698
+ return _this.dialogService.throwErr(err, _this.saving$);
3699
+ }))
3700
+ .subscribe(function () {
3701
+ _this.saving$.next(false);
3702
+ _this.dialogRef.close(_this.form.value || true);
3703
+ });
3704
+ };
3705
+ DialogModalWrapperComponent.prototype.footerAction = function () {
3706
+ this.dialogData.footerTemplateData.action(this.form.value);
3707
+ };
3708
+ DialogModalWrapperComponent.prototype.closeDialog = function () {
3709
+ this.dialogRef.close(false);
3710
+ };
3711
+ DialogModalWrapperComponent.prototype.ngOnDestroy = function () {
3712
+ this.destroy$.next(null);
3713
+ this.destroy$.complete();
3714
+ };
3715
+ return DialogModalWrapperComponent;
3716
+ }());
3717
+ DialogModalWrapperComponent.decorators = [
3718
+ { type: i0.Component, args: [{
3719
+ selector: 'dr-dialog-modal-wrapper',
3720
+ 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",
3721
+ 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"]
3722
+ },] }
3723
+ ];
3724
+ DialogModalWrapperComponent.ctorParameters = function () { return [
3725
+ { type: i1$1.MatDialogRef },
3726
+ { type: DialogService },
3727
+ { type: undefined, decorators: [{ type: i0.Inject, args: [i1$1.MAT_DIALOG_DATA,] }] }
3728
+ ]; };
3729
+ DialogModalWrapperComponent.propDecorators = {
3730
+ class: [{ type: i0.HostBinding, args: ['class',] }]
3731
+ };
3732
+
3733
+ var DEFAULT_PANE_CLASS_NAME = 'wrapper-dialog';
3734
+ var DEFAULT_CONFIRM_THEME = { themeSize: 'small-modal' };
3735
+ var DialogService = /** @class */ (function () {
3736
+ function DialogService(dialog) {
3737
+ this.dialog = dialog;
3738
+ }
3739
+ /**
3740
+ * Function to open modal with custom form
3741
+ */
3742
+ DialogService.prototype.openDialogWrapper = function (componentTypeChild, dialogData, componentTypeWrapper) {
3743
+ if (!componentTypeWrapper)
3744
+ componentTypeWrapper = DialogWrapperComponent;
3745
+ dialogData.data.child = componentTypeChild;
3746
+ if (dialogData.panelClass instanceof Array) {
3747
+ dialogData.panelClass.push(DEFAULT_PANE_CLASS_NAME);
3748
+ }
3749
+ else {
3750
+ dialogData.panelClass = [dialogData.panelClass || '', DEFAULT_PANE_CLASS_NAME];
3751
+ }
3752
+ this.wrapperComponent = this.openDialog(componentTypeWrapper, dialogData);
3753
+ return this.wrapperComponent;
3754
+ };
3755
+ /**
3756
+ * Function to open confirmation modal
3757
+ */
3758
+ DialogService.prototype.openConfirmDialog = function (confirmDialogData) {
3759
+ var dialogData = { panelClass: DEFAULT_PANE_CLASS_NAME, data: null };
3760
+ Object.assign(dialogData, { data: confirmDialogData });
3761
+ if (!dialogData.data.theme)
3762
+ dialogData.data.theme = DEFAULT_CONFIRM_THEME;
3763
+ dialogData.data.theme.isConfirmation = true;
3764
+ return this.openDialog(DialogWrapperComponent, dialogData);
3765
+ };
3766
+ /**
3767
+ * Function to open confirmation modal with inputs
3768
+ */
3769
+ DialogService.prototype.openConfirmDialogModal = function (confirmDialogData) {
3770
+ var dialogData = { panelClass: DEFAULT_PANE_CLASS_NAME, data: null };
3771
+ Object.assign(dialogData, { data: confirmDialogData });
3772
+ if (!dialogData.data.theme)
3773
+ dialogData.data.theme = DEFAULT_CONFIRM_THEME;
3774
+ return this.openDialog(DialogModalWrapperComponent, dialogData);
3775
+ };
3776
+ DialogService.prototype.close = function (params) {
3777
+ this.wrapperComponent.close(params);
3778
+ };
3779
+ DialogService.prototype.changeDialogThemeSize = function (theme) {
3780
+ this.wrapperComponent.componentInstance.class = theme;
3781
+ };
3782
+ DialogService.prototype.openDialog = function (componentType, dialogData) {
3783
+ return this.dialog.open(componentType, dialogData);
3784
+ };
3785
+ DialogService.prototype.throwErr = function (err, load) {
3786
+ if (load) {
3787
+ load.next(false);
3788
+ }
3789
+ throw err;
3790
+ };
3791
+ return DialogService;
3792
+ }());
3793
+ DialogService.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function DialogService_Factory() { return new DialogService(i0__namespace.ɵɵinject(i1__namespace$1.MatDialog)); }, token: DialogService, providedIn: "root" });
3794
+ DialogService.decorators = [
3795
+ { type: i0.Injectable, args: [{
3796
+ providedIn: 'root'
3797
+ },] }
3798
+ ];
3799
+ DialogService.ctorParameters = function () { return [
3800
+ { type: i1$1.MatDialog }
3801
+ ]; };
3802
+
3580
3803
  exports.TooltipPosition = void 0;
3581
3804
  (function (TooltipPosition) {
3582
3805
  TooltipPosition["TOP"] = "top";
@@ -3593,6 +3816,27 @@
3593
3816
  TooltipPosition["LEFT_BOTTOM"] = "left-bottom";
3594
3817
  })(exports.TooltipPosition || (exports.TooltipPosition = {}));
3595
3818
 
3819
+ exports.DIALOG_SIZE = void 0;
3820
+ (function (DIALOG_SIZE) {
3821
+ DIALOG_SIZE["SMALL"] = "small-modal";
3822
+ DIALOG_SIZE["MEDIUM"] = "medium-modal";
3823
+ DIALOG_SIZE["MEDIUM_LARGE"] = "medium-large-modal";
3824
+ DIALOG_SIZE["LARGE"] = "large-modal";
3825
+ DIALOG_SIZE["X_LARGE"] = "xl-modal";
3826
+ DIALOG_SIZE["X_CUSTOM_LARGE"] = "xl-custom-modal";
3827
+ })(exports.DIALOG_SIZE || (exports.DIALOG_SIZE = {}));
3828
+ exports.DIALOG_BUTTON_LABEL = void 0;
3829
+ (function (DIALOG_BUTTON_LABEL) {
3830
+ DIALOG_BUTTON_LABEL["SAVE"] = "Save";
3831
+ DIALOG_BUTTON_LABEL["CANCEL"] = "Cancel";
3832
+ DIALOG_BUTTON_LABEL["CLOSE"] = "Close";
3833
+ })(exports.DIALOG_BUTTON_LABEL || (exports.DIALOG_BUTTON_LABEL = {}));
3834
+ exports.DIALOG_FIELD_TYPE = void 0;
3835
+ (function (DIALOG_FIELD_TYPE) {
3836
+ DIALOG_FIELD_TYPE["INPUT"] = "input";
3837
+ DIALOG_FIELD_TYPE["SELECT"] = "select";
3838
+ })(exports.DIALOG_FIELD_TYPE || (exports.DIALOG_FIELD_TYPE = {}));
3839
+
3596
3840
  var DrModelDebounceChangeDirective = /** @class */ (function () {
3597
3841
  function DrModelDebounceChangeDirective(ngModel) {
3598
3842
  this.ngModel = ngModel;
@@ -3706,7 +3950,7 @@
3706
3950
  AnyTagComponent,
3707
3951
  YearTagComponent,
3708
3952
  ForecastTagComponent];
3709
- var ɵ0$1 = { useUtc: true };
3953
+ var ɵ0$2 = { useUtc: true };
3710
3954
  var DateTagModule = /** @class */ (function () {
3711
3955
  function DateTagModule() {
3712
3956
  }
@@ -3727,7 +3971,7 @@
3727
3971
  ],
3728
3972
  exports: components$3,
3729
3973
  providers: [
3730
- { provide: materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: ɵ0$1 }
3974
+ { provide: materialMomentAdapter.MAT_MOMENT_DATE_ADAPTER_OPTIONS, useValue: ɵ0$2 }
3731
3975
  ],
3732
3976
  declarations: components$3,
3733
3977
  },] }
@@ -4011,7 +4255,7 @@
4011
4255
 
4012
4256
  var moment = require('moment');
4013
4257
  var noop = function () { };
4014
- var ɵ0 = noop;
4258
+ var ɵ0$1 = noop;
4015
4259
  var DrDatePickerComponent = /** @class */ (function () {
4016
4260
  function DrDatePickerComponent(cdr, dateAdapter, datePickerService) {
4017
4261
  var _this = this;
@@ -4714,12 +4958,12 @@
4714
4958
  stepper: [{ type: i0.ViewChild, args: ['stepper', { read: i0.ElementRef },] }]
4715
4959
  };
4716
4960
 
4717
- var StepperModule = /** @class */ (function () {
4718
- function StepperModule() {
4961
+ var DrStepperModule = /** @class */ (function () {
4962
+ function DrStepperModule() {
4719
4963
  }
4720
- return StepperModule;
4964
+ return DrStepperModule;
4721
4965
  }());
4722
- StepperModule.decorators = [
4966
+ DrStepperModule.decorators = [
4723
4967
  { type: i0.NgModule, args: [{
4724
4968
  declarations: [StepperComponent],
4725
4969
  imports: [
@@ -4730,6 +4974,31 @@
4730
4974
  },] }
4731
4975
  ];
4732
4976
 
4977
+ var ɵ0 = {}, ɵ1 = {};
4978
+ var DrDialogModule = /** @class */ (function () {
4979
+ function DrDialogModule() {
4980
+ }
4981
+ return DrDialogModule;
4982
+ }());
4983
+ DrDialogModule.decorators = [
4984
+ { type: i0.NgModule, args: [{
4985
+ declarations: [DialogWrapperComponent, DialogModalWrapperComponent],
4986
+ imports: [
4987
+ common.CommonModule,
4988
+ i1$1.MatDialogModule,
4989
+ DrInputsModule,
4990
+ forms.ReactiveFormsModule,
4991
+ DrTooltipModule
4992
+ ],
4993
+ exports: [DialogWrapperComponent, DialogModalWrapperComponent],
4994
+ providers: [
4995
+ { provide: i1$1.MatDialogRef, useValue: ɵ0 },
4996
+ { provide: i1$1.MAT_DIALOG_DATA, useValue: ɵ1 },
4997
+ DialogService
4998
+ ]
4999
+ },] }
5000
+ ];
5001
+
4733
5002
  /* components */
4734
5003
 
4735
5004
  /**
@@ -4742,6 +5011,7 @@
4742
5011
  exports.DateTagComponent = DateTagComponent;
4743
5012
  exports.DateTagModule = DateTagModule;
4744
5013
  exports.DayTagComponent = DayTagComponent;
5014
+ exports.DialogService = DialogService;
4745
5015
  exports.DrAccordionComponent = DrAccordionComponent;
4746
5016
  exports.DrAccordionItemBodyComponent = DrAccordionItemBodyComponent;
4747
5017
  exports.DrAccordionItemComponent = DrAccordionItemComponent;
@@ -4751,6 +5021,7 @@
4751
5021
  exports.DrAvatarModule = DrAvatarModule;
4752
5022
  exports.DrAvatarPipe = DrAvatarPipe;
4753
5023
  exports.DrButtonComponent = DrButtonComponent;
5024
+ exports.DrDialogModule = DrDialogModule;
4754
5025
  exports.DrDropdownComponent = DrDropdownComponent;
4755
5026
  exports.DrDropdownDirective = DrDropdownDirective;
4756
5027
  exports.DrDropdownItemShowPipe = DrDropdownItemShowPipe;
@@ -4776,6 +5047,7 @@
4776
5047
  exports.DrSpinnerComponent = DrSpinnerComponent;
4777
5048
  exports.DrSpinnerDirective = DrSpinnerDirective;
4778
5049
  exports.DrSpinnerModule = DrSpinnerModule;
5050
+ exports.DrStepperModule = DrStepperModule;
4779
5051
  exports.DrTabComponent = DrTabComponent;
4780
5052
  exports.DrTabsComponent = DrTabsComponent;
4781
5053
  exports.DrTabsModule = DrTabsModule;
@@ -4792,7 +5064,6 @@
4792
5064
  exports.QuarterTagComponent = QuarterTagComponent;
4793
5065
  exports.RadioButtonComponent = RadioButtonComponent;
4794
5066
  exports.RadioGroupComponent = RadioGroupComponent;
4795
- exports.StepperModule = StepperModule;
4796
5067
  exports.TooltipComponent = TooltipComponent;
4797
5068
  exports.WeekTagComponent = WeekTagComponent;
4798
5069
  exports.YearTagComponent = YearTagComponent;
@@ -4809,6 +5080,8 @@
4809
5080
  exports["ɵk"] = TooltipNoBodyComponent;
4810
5081
  exports["ɵl"] = TooltipProcessDefaultComponent;
4811
5082
  exports["ɵm"] = StepperComponent;
5083
+ exports["ɵn"] = DialogWrapperComponent;
5084
+ exports["ɵo"] = DialogModalWrapperComponent;
4812
5085
 
4813
5086
  Object.defineProperty(exports, '__esModule', { value: true });
4814
5087