@enigmatry/entry-components 19.0.1-preview.5 → 20.0.1-preview.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (139) hide show
  1. package/README.md +1 -0
  2. package/button/index.d.ts +54 -3
  3. package/common/index.d.ts +243 -3
  4. package/date-time-picker/index.d.ts +100 -3
  5. package/dialog/index.d.ts +197 -3
  6. package/fesm2022/enigmatry-entry-components-button.mjs +19 -30
  7. package/fesm2022/enigmatry-entry-components-button.mjs.map +1 -1
  8. package/fesm2022/enigmatry-entry-components-common.mjs +129 -133
  9. package/fesm2022/enigmatry-entry-components-common.mjs.map +1 -1
  10. package/fesm2022/enigmatry-entry-components-date-time-picker.mjs +53 -50
  11. package/fesm2022/enigmatry-entry-components-date-time-picker.mjs.map +1 -1
  12. package/fesm2022/enigmatry-entry-components-dialog.mjs +53 -78
  13. package/fesm2022/enigmatry-entry-components-dialog.mjs.map +1 -1
  14. package/fesm2022/enigmatry-entry-components-file-input.mjs +55 -51
  15. package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -1
  16. package/fesm2022/enigmatry-entry-components-permissions.mjs +28 -23
  17. package/fesm2022/enigmatry-entry-components-permissions.mjs.map +1 -1
  18. package/fesm2022/enigmatry-entry-components-search-filter.mjs +55 -59
  19. package/fesm2022/enigmatry-entry-components-search-filter.mjs.map +1 -1
  20. package/fesm2022/enigmatry-entry-components-spinner.mjs +21 -21
  21. package/fesm2022/enigmatry-entry-components-spinner.mjs.map +1 -1
  22. package/fesm2022/enigmatry-entry-components-table.mjs +77 -86
  23. package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -1
  24. package/fesm2022/enigmatry-entry-components-validation.mjs +43 -47
  25. package/fesm2022/enigmatry-entry-components-validation.mjs.map +1 -1
  26. package/fesm2022/enigmatry-entry-components.mjs +6 -6
  27. package/fesm2022/enigmatry-entry-components.mjs.map +1 -1
  28. package/file-input/index.d.ts +87 -5
  29. package/index.d.ts +37 -3
  30. package/package.json +10 -8
  31. package/permissions/index.d.ts +40 -5
  32. package/search-filter/index.d.ts +228 -3
  33. package/spinner/index.d.ts +34 -5
  34. package/table/README.md +6 -3
  35. package/table/index.d.ts +260 -4
  36. package/validation/index.d.ts +123 -3
  37. package/button/entry-button-config.d.ts +0 -30
  38. package/button/entry-button.directive.d.ts +0 -18
  39. package/button/entry-button.module.d.ts +0 -9
  40. package/button/public-api.d.ts +0 -3
  41. package/common/common.module.d.ts +0 -14
  42. package/common/constants.d.ts +0 -2
  43. package/common/date-time/entry-date-time-adapter.d.ts +0 -41
  44. package/common/date-time/entry-date-time-formats.d.ts +0 -25
  45. package/common/date-time/entry-time-adapter.d.ts +0 -9
  46. package/common/date-time/index.d.ts +0 -4
  47. package/common/date-time/native-time-adapter.d.ts +0 -13
  48. package/common/directives/auto-disable-button.directive.d.ts +0 -26
  49. package/common/directives/index.d.ts +0 -4
  50. package/common/directives/ng-control-accessor.directive.d.ts +0 -12
  51. package/common/directives/noop-control-value-accessor.d.ts +0 -10
  52. package/common/directives/scroll-to-invalid-control.directive.d.ts +0 -18
  53. package/common/event-plugins/abstract.plugin.d.ts +0 -40
  54. package/common/event-plugins/debounce.plugin.d.ts +0 -15
  55. package/common/event-plugins/index.d.ts +0 -2
  56. package/common/event-plugins/throttle.plugin.d.ts +0 -15
  57. package/common/interceptors/accept-language.interceptor.d.ts +0 -16
  58. package/common/interceptors/index.d.ts +0 -1
  59. package/common/public-api.d.ts +0 -6
  60. package/common/utils/index.d.ts +0 -1
  61. package/common/utils/provide-config.d.ts +0 -3
  62. package/date-time-picker/date-time-picker-config.model.d.ts +0 -20
  63. package/date-time-picker/date-time-picker.component.d.ts +0 -38
  64. package/date-time-picker/date-time-picker.module.d.ts +0 -17
  65. package/date-time-picker/public-api.d.ts +0 -3
  66. package/date-time-picker/time-picker.component.d.ts +0 -26
  67. package/dialog/dialogs/alert/entry-alert-dialog-data.interface.d.ts +0 -18
  68. package/dialog/dialogs/alert/entry-alert-dialog.component.d.ts +0 -13
  69. package/dialog/dialogs/confirm/entry-confirm-dialog-data.interface.d.ts +0 -8
  70. package/dialog/dialogs/confirm/entry-confirm-dialog.component.d.ts +0 -13
  71. package/dialog/dialogs/entry-dialog.component.d.ts +0 -43
  72. package/dialog/dialogs/error/entry-error-dialog-data.interface.d.ts +0 -9
  73. package/dialog/dialogs/error/entry-error-dialog.component.d.ts +0 -15
  74. package/dialog/entry-dialog-buttons-alignment.type.d.ts +0 -2
  75. package/dialog/entry-dialog-config.model.d.ts +0 -33
  76. package/dialog/entry-dialog.module.d.ts +0 -15
  77. package/dialog/entry-dialog.service.d.ts +0 -55
  78. package/dialog/public-api.d.ts +0 -11
  79. package/file-input/entry-file-input.component.d.ts +0 -74
  80. package/file-input/entry-file-input.module.d.ts +0 -12
  81. package/file-input/public-api.d.ts +0 -2
  82. package/modules/entry-components.module.d.ts +0 -28
  83. package/permissions/permission-type.d.ts +0 -3
  84. package/permissions/permission.directive.d.ts +0 -11
  85. package/permissions/permission.guard.d.ts +0 -2
  86. package/permissions/permission.module.d.ts +0 -9
  87. package/permissions/permission.pipe.d.ts +0 -11
  88. package/permissions/permission.service.d.ts +0 -4
  89. package/permissions/public-api.d.ts +0 -5
  90. package/public-api.d.ts +0 -10
  91. package/search-filter/autocomplete/autocomplete-search-filter.component.d.ts +0 -22
  92. package/search-filter/autocomplete/autocomplete-search-filter.model.d.ts +0 -19
  93. package/search-filter/control-type.d.ts +0 -7
  94. package/search-filter/date/date-search-filter.component.d.ts +0 -10
  95. package/search-filter/date/date-search-filter.model.d.ts +0 -8
  96. package/search-filter/date-time/date-time-search-filter.component.d.ts +0 -10
  97. package/search-filter/date-time/date-time-search-filter.model.d.ts +0 -8
  98. package/search-filter/entry-search-filter.component.d.ts +0 -38
  99. package/search-filter/entry-search-filter.module.d.ts +0 -22
  100. package/search-filter/public-api.d.ts +0 -11
  101. package/search-filter/search-filter-base.model.d.ts +0 -29
  102. package/search-filter/search-filter-config.model.d.ts +0 -16
  103. package/search-filter/search-filter-params.type.d.ts +0 -7
  104. package/search-filter/select/select-search-filter.component.d.ts +0 -14
  105. package/search-filter/select/select-search-filter.model.d.ts +0 -22
  106. package/search-filter/select-option.model.d.ts +0 -12
  107. package/search-filter/text/text-search-filter.component.d.ts +0 -10
  108. package/search-filter/text/text-search-filter.model.d.ts +0 -8
  109. package/spinner/entry-spinner/spinner.component.d.ts +0 -24
  110. package/spinner/public-api.d.ts +0 -2
  111. package/spinner/spinner-overlay-container.d.ts +0 -17
  112. package/spinner/spinner.module.d.ts +0 -10
  113. package/table/components/entry-cell/entry-cell.component.d.ts +0 -10
  114. package/table/components/entry-cell-context-menu/entry-cell-context-menu.component.d.ts +0 -18
  115. package/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.d.ts +0 -10
  116. package/table/components/entry-table/entry-table.component.d.ts +0 -82
  117. package/table/components/index.d.ts +0 -4
  118. package/table/entry-table.module.d.ts +0 -20
  119. package/table/interfaces/cell-template.d.ts +0 -4
  120. package/table/interfaces/column-def.d.ts +0 -20
  121. package/table/interfaces/column-sort-prop.d.ts +0 -5
  122. package/table/interfaces/column-type-parameter.d.ts +0 -9
  123. package/table/interfaces/column-type.d.ts +0 -1
  124. package/table/interfaces/context-menu-item.d.ts +0 -7
  125. package/table/interfaces/entry-table-config.d.ts +0 -33
  126. package/table/interfaces/index.d.ts +0 -12
  127. package/table/interfaces/paged-query.d.ts +0 -15
  128. package/table/interfaces/pagination.d.ts +0 -19
  129. package/table/interfaces/row-class-formatter.d.ts +0 -3
  130. package/table/interfaces/row-context-menu-formatter.d.ts +0 -4
  131. package/table/interfaces/row-selection-formatter.d.ts +0 -4
  132. package/table/public-api.d.ts +0 -3
  133. package/validation/entry-display-control-validation.directive.d.ts +0 -27
  134. package/validation/entry-form-errors.component.d.ts +0 -18
  135. package/validation/entry-validation-config.model.d.ts +0 -48
  136. package/validation/entry-validation.d.ts +0 -15
  137. package/validation/entry-validation.module.d.ts +0 -11
  138. package/validation/public-api.d.ts +0 -6
  139. package/validation/validation-problem-details.interface.d.ts +0 -9
@@ -1,10 +1,10 @@
1
1
  import * as i0 from '@angular/core';
2
- import { Component, Inject, Input, ChangeDetectionStrategy, Injectable, NgModule } from '@angular/core';
3
- import { of } from 'rxjs';
2
+ import { inject, Input, Component, ChangeDetectionStrategy, Injectable, NgModule } from '@angular/core';
3
+ import * as i2 from '@angular/material/dialog';
4
+ import { MatDialogRef, MAT_DIALOG_DATA, MatDialog, MatDialogConfig, MatDialogModule } from '@angular/material/dialog';
4
5
  import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';
5
- import * as i1 from '@angular/material/dialog';
6
- import { MAT_DIALOG_DATA, MatDialogConfig, MatDialogModule } from '@angular/material/dialog';
7
- import * as i2 from '@angular/common';
6
+ import { of } from 'rxjs';
7
+ import * as i1 from '@angular/common';
8
8
  import { CommonModule } from '@angular/common';
9
9
  import * as i3 from '@angular/material/icon';
10
10
  import { MatIconModule } from '@angular/material/icon';
@@ -40,10 +40,9 @@ const ENTRY_DIALOG_CONFIG = createInjectionToken(new EntryDialogConfig());
40
40
  /**
41
41
  * Can be used to provide entry dialog configuration.
42
42
  */
43
- function provideEntryDialogConfig(config) {
44
- return provideConfig(ENTRY_DIALOG_CONFIG, () => new EntryDialogConfig(config));
45
- }
43
+ const provideEntryDialogConfig = (config) => provideConfig(ENTRY_DIALOG_CONFIG, () => new EntryDialogConfig(config));
46
44
 
45
+ /* eslint-disable no-secrets/no-secrets */
47
46
  /**
48
47
  * Base Entry dialog component. Must be extended when building custom dialogs.
49
48
  *
@@ -53,9 +52,9 @@ function provideEntryDialogConfig(config) {
53
52
  * ```
54
53
  */
55
54
  class EntryDialogComponent {
56
- constructor(mdDialogRef, config) {
57
- this.mdDialogRef = mdDialogRef;
58
- this.config = config;
55
+ constructor() {
56
+ this.mdDialogRef = inject((MatDialogRef));
57
+ this.config = inject(ENTRY_DIALOG_CONFIG);
59
58
  /** Dialog buttons horizontal alignment */
60
59
  this.buttonsAlignment = this.config.buttonsAlignment;
61
60
  /** Confirm button label */
@@ -75,16 +74,13 @@ class EntryDialogComponent {
75
74
  });
76
75
  this.close = (value = true) => this.mdDialogRef.close(value);
77
76
  }
78
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }], target: i0.ɵɵFactoryTarget.Component }); }
79
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: EntryDialogComponent, isStandalone: false, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"entry-dialog\" role=\"dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [class.without-close-icon]=\"hideClose\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\"\n aria-label=\"Close dialog\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n <ng-container *ngIf=\"buttonsTemplate; then buttonsTemplate; else defaultButtonsTemplate\">\n </ng-container>\n </mat-dialog-actions>\n\n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i1.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i1.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "directive", type: i5.EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]" }] }); }
77
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
78
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.1.2", type: EntryDialogComponent, isStandalone: false, selector: "entry-dialog", inputs: { title: "title", buttonsAlignment: "buttonsAlignment", confirmButtonText: "confirmButtonText", cancelButtonText: "cancelButtonText", hideButtons: "hideButtons", hideCancel: "hideCancel", hideClose: "hideClose", disableConfirm: "disableConfirm", buttonsTemplate: "buttonsTemplate", confirm: "confirm", cancel: "cancel" }, ngImport: i0, template: "<div class=\"entry-dialog\" role=\"dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [class.without-close-icon]=\"hideClose\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\"\n aria-label=\"Close dialog\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n @if(buttonsTemplate) {\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\"></ng-container>\n }\n\n @else {\n <ng-container *ngTemplateOutlet=\"defaultButtonsTemplate\"></ng-container>\n }\n </mat-dialog-actions>\n\n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "directive", type: i2.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "directive", type: i2.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "component", type: i3.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i4.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i4.MatIconButton, selector: "button[mat-icon-button], a[mat-icon-button], button[matIconButton], a[matIconButton]", exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i5.EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]" }] }); }
80
79
  }
81
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogComponent, decorators: [{
80
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogComponent, decorators: [{
82
81
  type: Component,
83
- args: [{ selector: 'entry-dialog', standalone: false, template: "<div class=\"entry-dialog\" role=\"dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [class.without-close-icon]=\"hideClose\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\"\n aria-label=\"Close dialog\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n <ng-container *ngIf=\"buttonsTemplate; then buttonsTemplate; else defaultButtonsTemplate\">\n </ng-container>\n </mat-dialog-actions>\n\n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>" }]
84
- }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
85
- type: Inject,
86
- args: [ENTRY_DIALOG_CONFIG]
87
- }] }], propDecorators: { title: [{
82
+ args: [{ selector: 'entry-dialog', standalone: false, template: "<div class=\"entry-dialog\" role=\"dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [class.without-close-icon]=\"hideClose\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\"\n aria-label=\"Close dialog\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n @if(buttonsTemplate) {\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\"></ng-container>\n }\n\n @else {\n <ng-container *ngTemplateOutlet=\"defaultButtonsTemplate\"></ng-container>\n }\n </mat-dialog-actions>\n\n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>" }]
83
+ }], propDecorators: { title: [{
88
84
  type: Input
89
85
  }], buttonsAlignment: [{
90
86
  type: Input
@@ -109,54 +105,42 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
109
105
  }] } });
110
106
 
111
107
  class EntryAlertDialogComponent extends EntryDialogComponent {
112
- constructor(mdDialogRef, config, data) {
113
- super(mdDialogRef, config);
114
- this.mdDialogRef = mdDialogRef;
115
- this.config = config;
116
- this.data = data;
108
+ constructor() {
109
+ super(...arguments);
110
+ this.mdDialogRef = inject((MatDialogRef));
111
+ this.config = inject(ENTRY_DIALOG_CONFIG);
112
+ this.data = inject(MAT_DIALOG_DATA);
117
113
  }
118
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryAlertDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
119
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: EntryAlertDialogComponent, isStandalone: false, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
114
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryAlertDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
115
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: EntryAlertDialogComponent, isStandalone: false, selector: "entry-alert-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
120
116
  }
121
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryAlertDialogComponent, decorators: [{
117
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryAlertDialogComponent, decorators: [{
122
118
  type: Component,
123
119
  args: [{ selector: 'entry-alert-dialog', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
124
- }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
125
- type: Inject,
126
- args: [ENTRY_DIALOG_CONFIG]
127
- }] }, { type: undefined, decorators: [{
128
- type: Inject,
129
- args: [MAT_DIALOG_DATA]
130
- }] }] });
120
+ }] });
131
121
 
132
122
  class EntryConfirmDialogComponent extends EntryDialogComponent {
133
- constructor(mdDialogRef, config, data) {
134
- super(mdDialogRef, config);
135
- this.mdDialogRef = mdDialogRef;
136
- this.config = config;
137
- this.data = data;
123
+ constructor() {
124
+ super(...arguments);
125
+ this.mdDialogRef = inject((MatDialogRef));
126
+ this.config = inject(ENTRY_DIALOG_CONFIG);
127
+ this.data = inject(MAT_DIALOG_DATA);
138
128
  }
139
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryConfirmDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
140
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: EntryConfirmDialogComponent, isStandalone: false, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
129
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryConfirmDialogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
130
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: EntryConfirmDialogComponent, isStandalone: false, selector: "entry-confirm-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>", dependencies: [{ kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
141
131
  }
142
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryConfirmDialogComponent, decorators: [{
132
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryConfirmDialogComponent, decorators: [{
143
133
  type: Component,
144
134
  args: [{ selector: 'entry-confirm-dialog', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>" }]
145
- }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
146
- type: Inject,
147
- args: [ENTRY_DIALOG_CONFIG]
148
- }] }, { type: undefined, decorators: [{
149
- type: Inject,
150
- args: [MAT_DIALOG_DATA]
151
- }] }] });
135
+ }] });
152
136
 
153
137
  class EntryErrorDialogComponent extends EntryDialogComponent {
154
- constructor(mdDialogRef, config, data) {
155
- super(mdDialogRef, config);
156
- this.mdDialogRef = mdDialogRef;
157
- this.config = config;
158
- this.data = data;
138
+ constructor() {
139
+ super();
159
140
  this.errors = [];
141
+ this.mdDialogRef = inject((MatDialogRef));
142
+ this.config = inject(ENTRY_DIALOG_CONFIG);
143
+ this.data = inject(MAT_DIALOG_DATA);
160
144
  this.extractValidationErrors();
161
145
  }
162
146
  extractValidationErrors() {
@@ -173,27 +157,21 @@ class EntryErrorDialogComponent extends EntryDialogComponent {
173
157
  this.errors = [this.data.message];
174
158
  }
175
159
  }
176
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryErrorDialogComponent, deps: [{ token: i1.MatDialogRef }, { token: ENTRY_DIALOG_CONFIG }, { token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
177
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: EntryErrorDialogComponent, isStandalone: false, selector: "entry-error-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>", dependencies: [{ kind: "directive", type: i2.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
160
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryErrorDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
161
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: EntryErrorDialogComponent, isStandalone: false, selector: "entry-error-dialog", usesInheritance: true, ngImport: i0, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>", dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "component", type: EntryDialogComponent, selector: "entry-dialog", inputs: ["title", "buttonsAlignment", "confirmButtonText", "cancelButtonText", "hideButtons", "hideCancel", "hideClose", "disableConfirm", "buttonsTemplate", "confirm", "cancel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
178
162
  }
179
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryErrorDialogComponent, decorators: [{
163
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryErrorDialogComponent, decorators: [{
180
164
  type: Component,
181
165
  args: [{ selector: 'entry-error-dialog', changeDetection: ChangeDetectionStrategy.OnPush, standalone: false, template: "<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>" }]
182
- }], ctorParameters: () => [{ type: i1.MatDialogRef }, { type: EntryDialogConfig, decorators: [{
183
- type: Inject,
184
- args: [ENTRY_DIALOG_CONFIG]
185
- }] }, { type: undefined, decorators: [{
186
- type: Inject,
187
- args: [MAT_DIALOG_DATA]
188
- }] }] });
166
+ }], ctorParameters: () => [] });
189
167
 
190
168
  /**
191
169
  * Used to open built-in and custom entry dialogs.
192
170
  */
193
171
  class EntryDialogService {
194
- constructor(config, matDialog) {
195
- this.config = config;
196
- this.matDialog = matDialog;
172
+ constructor() {
173
+ this.config = inject(ENTRY_DIALOG_CONFIG);
174
+ this.matDialog = inject(MatDialog);
197
175
  /**
198
176
  * Opens alert dialog.
199
177
  *
@@ -253,19 +231,16 @@ class EntryDialogService {
253
231
  configuration.panelClass = ['dialog-container', cssClass];
254
232
  };
255
233
  }
256
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogService, deps: [{ token: ENTRY_DIALOG_CONFIG }, { token: i1.MatDialog }], target: i0.ɵɵFactoryTarget.Injectable }); }
257
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogService }); }
234
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
235
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogService }); }
258
236
  }
259
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogService, decorators: [{
237
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogService, decorators: [{
260
238
  type: Injectable
261
- }], ctorParameters: () => [{ type: EntryDialogConfig, decorators: [{
262
- type: Inject,
263
- args: [ENTRY_DIALOG_CONFIG]
264
- }] }, { type: i1.MatDialog }] });
239
+ }] });
265
240
 
266
241
  class EntryDialogModule {
267
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
268
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogModule, declarations: [EntryDialogComponent,
242
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
243
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogModule, declarations: [EntryDialogComponent,
269
244
  EntryAlertDialogComponent,
270
245
  EntryConfirmDialogComponent,
271
246
  EntryErrorDialogComponent], imports: [CommonModule,
@@ -276,13 +251,13 @@ class EntryDialogModule {
276
251
  EntryAlertDialogComponent,
277
252
  EntryConfirmDialogComponent,
278
253
  EntryErrorDialogComponent] }); }
279
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogModule, providers: [EntryDialogService], imports: [CommonModule,
254
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogModule, providers: [EntryDialogService], imports: [CommonModule,
280
255
  MatDialogModule,
281
256
  MatIconModule,
282
257
  MatButtonModule,
283
258
  EntryButtonModule] }); }
284
259
  }
285
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryDialogModule, decorators: [{
260
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryDialogModule, decorators: [{
286
261
  type: NgModule,
287
262
  args: [{
288
263
  declarations: [
@@ -1 +1 @@
1
- {"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../libs/entry-components/dialog/entry-dialog-config.model.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/error/entry-error-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/error/entry-error-dialog.component.html","../../../../libs/entry-components/dialog/entry-dialog.service.ts","../../../../libs/entry-components/dialog/entry-dialog.module.ts","../../../../libs/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\nimport { Provider } from '@angular/core';\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryDialogConfig {\n /** Confirm button label (default 'Ok') */\n confirmButtonText: string;\n /** Cancel button label (default 'Cancel') */\n cancelButtonText: string;\n /** Dialog buttons horizontal alignment (default 'align-right') */\n buttonsAlignment: EntryDialogButtonsAlignment;\n /** Determines if close button is visible (default is true) */\n hideClose: boolean;\n /** Disable closing dialog when pressing escape or clicking on backdrop (default false) */\n disableClose: boolean;\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'end';\n this.hideClose = config.hideClose ?? true;\n this.disableClose = config.disableClose ?? false;\n }\n}\n\n/**\n * Entry dialog injection token of EntryDialogConfig type containing dialog default configurations.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'end'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = createInjectionToken(new EntryDialogConfig());\n\n/**\n * Can be used to provide entry dialog configuration.\n */\nexport function provideEntryDialogConfig(config: Partial<EntryDialogConfig>): Provider {\n return provideConfig(ENTRY_DIALOG_CONFIG, () => new EntryDialogConfig(config));\n}\n","import { Component, Inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\nimport { EntryDialogButtonsAlignment } from '../entry-dialog-buttons-alignment.type';\n\n/**\n * Base Entry dialog component. Must be extended when building custom dialogs.\n *\n * @example\n * ```html\n * <entry-dialog title=\"TITLE\"><p>Dialog content</p></entry-dialog>\n * ```\n */\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss'],\n standalone: false\n})\nexport class EntryDialogComponent {\n /** Dialog header title */\n @Input() title: string;\n /** Dialog buttons horizontal alignment */\n @Input() buttonsAlignment: EntryDialogButtonsAlignment = this.config.buttonsAlignment;\n /** Confirm button label */\n @Input() confirmButtonText = this.config.confirmButtonText;\n /** Cancel button label */\n @Input() cancelButtonText = this.config.cancelButtonText;\n /** Show or hide dialog buttons */\n @Input() hideButtons: boolean;\n /** Show or hide dialog cancel button */\n @Input() hideCancel: boolean;\n /** Show or hide dialog close button */\n @Input() hideClose: boolean = this.config.hideClose;\n /** Enable or disable dialog confirm button */\n @Input() disableConfirm: boolean;\n /** Provide custom buttons template */\n @Input() buttonsTemplate: TemplateRef<any> | null | undefined;\n\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig) { }\n\n @Input() confirm: () => Observable<unknown> = () => of(true);\n @Input() cancel = () => this.close(false);\n\n onSubmit = () =>\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n\n close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"entry-dialog\" role=\"dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [class.without-close-icon]=\"hideClose\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\"\n aria-label=\"Close dialog\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n <ng-container *ngIf=\"buttonsTemplate; then buttonsTemplate; else defaultButtonsTemplate\">\n </ng-container>\n </mat-dialog-actions>\n\n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { IEntryAlertDialogData } from './entry-alert-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-alert-dialog',\n templateUrl: './entry-alert-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class EntryAlertDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryAlertDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { IEntryConfirmDialogData } from './entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-confirm-dialog',\n templateUrl: './entry-confirm-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class EntryConfirmDialogComponent extends EntryDialogComponent {\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) readonly data: IEntryConfirmDialogData) {\n super(mdDialogRef, config);\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, Inject } from '@angular/core';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { IEntryErrorDialogData } from './entry-error-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\n\n@Component({\n selector: 'entry-error-dialog',\n templateUrl: './entry-error-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class EntryErrorDialogComponent extends EntryDialogComponent {\n errors: string[] = [];\n constructor(\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent>,\n @Inject(ENTRY_DIALOG_CONFIG) public readonly config: EntryDialogConfig,\n @Inject(MAT_DIALOG_DATA) public data: IEntryErrorDialogData) {\n super(mdDialogRef, config);\n this.extractValidationErrors();\n }\n\n private extractValidationErrors(): void {\n if (Array.isArray(this.data.errors)) {\n this.errors = this.data.errors as string[];\n } else if (this.data.errors.errors) {\n const validationErrors = this.data.errors.errors;\n this.errors = Object.entries(validationErrors)\n .map(values => values[1])\n .reduce((a, b) => a.concat(b), []);\n } else if (this.data.message) {\n this.errors = [this.data.message];\n }\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>","import { Inject, Injectable, Type } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { take } from 'rxjs/operators';\nimport { IEntryAlertDialogData } from './dialogs/alert/entry-alert-dialog-data.interface';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { Observable } from 'rxjs';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { IEntryConfirmDialogData } from './dialogs/confirm/entry-confirm-dialog-data.interface';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from './entry-dialog-config.model';\nimport { IEntryErrorDialogData } from './dialogs/error/entry-error-dialog-data.interface';\nimport { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';\n\n/**\n * Used to open built-in and custom entry dialogs.\n */\n@Injectable()\nexport class EntryDialogService {\n constructor(\n @Inject(ENTRY_DIALOG_CONFIG) protected readonly config: EntryDialogConfig,\n private readonly matDialog: MatDialog) { }\n\n /**\n * Opens alert dialog.\n *\n * @param data - Contains title, message and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openAlert = (data: Partial<IEntryAlertDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryAlertDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens confirm dialog.\n *\n * @param data - Contains title, message and optional confirm/cancel buttons text\n * @returns `true` if confirmed, `false` if canceled or closed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openConfirm = (data: Partial<IEntryConfirmDialogData>): Observable<boolean | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryConfirmDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens error dialog.\n *\n * @param data - Contains title, errors and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openError = (data: Partial<IEntryErrorDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryErrorDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens dialog with custom component.\n *\n * @param component - Dialog custom component implementation\n * @param data - Optional parameter used to supply component with input parameters\n * @param disableClose - Optional parameter that disable closing dialog when pressing escape or clicking on backdrop\n * @param cssClass - Optional parameter used to set custom class to Material overlay pane\n * @returns Any result custom implementation provides\n */\n open = (\n component: Type<EntryDialogComponent>,\n data: unknown = undefined,\n disableClose: boolean | undefined = undefined,\n cssClass = ''): Observable<any> => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n configuration.disableClose = disableClose === undefined\n ? this.config.disableClose\n : disableClose;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n /**\n * Closes all opened dialogs.\n */\n closeAll = (): void => this.matDialog.closeAll();\n\n private setPanelClassFor = <T>(configuration: MatDialogConfig<T>, cssClass: string) => {\n configuration.panelClass = ['dialog-container', cssClass];\n };\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\nimport { EntryDialogService } from './entry-dialog.service';\nimport { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent,\n EntryErrorDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatIconModule,\n MatButtonModule,\n EntryButtonModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent,\n EntryErrorDialogComponent\n ],\n providers: [EntryDialogService]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i2.EntryDialogComponent","i3.EntryDialogComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,iBAAiB,CAAA;AAY1B,IAAA,WAAA,CAAY,SAAqC,EAAE,EAAA;QAC/C,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,IAAI;QACzD,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,QAAQ;QAC3D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,KAAK;QACxD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,IAAI;QACzC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,KAAK;;AAEvD;AAED;;;;;;;;;AASG;AACU,MAAA,mBAAmB,GAAG,oBAAoB,CAAC,IAAI,iBAAiB,EAAE;AAE/E;;AAEG;AACG,SAAU,wBAAwB,CAAC,MAAkC,EAAA;AACvE,IAAA,OAAO,aAAa,CAAC,mBAAmB,EAAE,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC,CAAC;AAClF;;ACvCA;;;;;;;A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yBAAyB;wBACzB,2BAA2B;wBAC3B;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,eAAe;wBACf;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;wBAC3B;AACD,qBAAA;oBACD,SAAS,EAAE,CAAC,kBAAkB;AAC/B,iBAAA;;;ACjCD;;AAEG;;;;"}
1
+ {"version":3,"file":"enigmatry-entry-components-dialog.mjs","sources":["../../../../libs/entry-components/dialog/entry-dialog-config.model.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/entry-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/alert/entry-alert-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/confirm/entry-confirm-dialog.component.html","../../../../libs/entry-components/dialog/dialogs/error/entry-error-dialog.component.ts","../../../../libs/entry-components/dialog/dialogs/error/entry-error-dialog.component.html","../../../../libs/entry-components/dialog/entry-dialog.service.ts","../../../../libs/entry-components/dialog/entry-dialog.module.ts","../../../../libs/entry-components/dialog/enigmatry-entry-components-dialog.ts"],"sourcesContent":["import { Provider } from '@angular/core';\nimport { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\nimport { EntryDialogButtonsAlignment } from './entry-dialog-buttons-alignment.type';\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryDialogConfig {\n /** Confirm button label (default 'Ok') */\n confirmButtonText: string;\n /** Cancel button label (default 'Cancel') */\n cancelButtonText: string;\n /** Dialog buttons horizontal alignment (default 'align-right') */\n buttonsAlignment: EntryDialogButtonsAlignment;\n /** Determines if close button is visible (default is true) */\n hideClose: boolean;\n /** Disable closing dialog when pressing escape or clicking on backdrop (default false) */\n disableClose: boolean;\n\n constructor(config: Partial<EntryDialogConfig> = {}) {\n this.confirmButtonText = config.confirmButtonText ?? 'Ok';\n this.cancelButtonText = config.cancelButtonText ?? 'Cancel';\n this.buttonsAlignment = config.buttonsAlignment ?? 'end';\n this.hideClose = config.hideClose ?? true;\n this.disableClose = config.disableClose ?? false;\n }\n}\n\n/**\n * Entry dialog injection token of EntryDialogConfig type containing dialog default configurations.\n *\n * Defaults:\n * - confirmButtonText: 'Ok'\n * - cancelButtonText: 'Cancel'\n * - buttonsAlignment: 'end'\n * - hideClose: true\n * - disableClose: false\n */\nexport const ENTRY_DIALOG_CONFIG = createInjectionToken(new EntryDialogConfig());\n\n/**\n * Can be used to provide entry dialog configuration.\n */\nexport const provideEntryDialogConfig = (config: Partial<EntryDialogConfig>): Provider =>\n provideConfig(ENTRY_DIALOG_CONFIG, () => new EntryDialogConfig(config));\n","/* eslint-disable no-secrets/no-secrets */\nimport { Component, inject, Input, TemplateRef } from '@angular/core';\nimport { MatDialogRef } from '@angular/material/dialog';\nimport { Observable, of } from 'rxjs';\nimport { EntryDialogButtonsAlignment } from '../entry-dialog-buttons-alignment.type';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../entry-dialog-config.model';\n\n/**\n * Base Entry dialog component. Must be extended when building custom dialogs.\n *\n * @example\n * ```html\n * <entry-dialog title=\"TITLE\"><p>Dialog content</p></entry-dialog>\n * ```\n */\n@Component({\n selector: 'entry-dialog',\n templateUrl: './entry-dialog.component.html',\n styleUrls: ['./entry-dialog.component.scss'],\n standalone: false\n})\nexport class EntryDialogComponent {\n protected readonly mdDialogRef: MatDialogRef<EntryDialogComponent> = inject(MatDialogRef<EntryDialogComponent>);\n protected readonly config: EntryDialogConfig = inject(ENTRY_DIALOG_CONFIG);\n\n /** Dialog header title */\n @Input() title: string;\n /** Dialog buttons horizontal alignment */\n @Input() buttonsAlignment: EntryDialogButtonsAlignment = this.config.buttonsAlignment;\n /** Confirm button label */\n @Input() confirmButtonText = this.config.confirmButtonText;\n /** Cancel button label */\n @Input() cancelButtonText = this.config.cancelButtonText;\n /** Show or hide dialog buttons */\n @Input() hideButtons: boolean;\n /** Show or hide dialog cancel button */\n @Input() hideCancel: boolean;\n /** Show or hide dialog close button */\n @Input() hideClose: boolean = this.config.hideClose;\n /** Enable or disable dialog confirm button */\n @Input() disableConfirm: boolean;\n /** Provide custom buttons template */\n @Input() buttonsTemplate: TemplateRef<any> | null | undefined;\n\n @Input() confirm: () => Observable<unknown> = () => of(true);\n @Input() cancel = () => this.close(false);\n\n onSubmit = () =>\n this.confirm().subscribe({\n next: closeDialog => {\n if (closeDialog) {\n this.close(closeDialog);\n }\n }\n });\n\n close = (value: unknown = true) => this.mdDialogRef.close(value);\n}\n","<div class=\"entry-dialog\" role=\"dialog\">\n <div class=\"dialog-header\">\n <h1 class=\"title\" [class.without-close-icon]=\"hideClose\" mat-dialog-title>{{ title }}</h1>\n <button mat-icon-button *ngIf=\"!hideClose\" type=\"button\" class=\"close-button\" (click)=\"cancel()\"\n aria-label=\"Close dialog\">\n <mat-icon aria-hidden=\"true\">close</mat-icon>\n </button>\n </div>\n\n <mat-dialog-content class=\"dialog-content\" [ngClass]=\"{'with-actions': !hideButtons}\">\n <ng-content></ng-content>\n </mat-dialog-content>\n\n <mat-dialog-actions class=\"dialog-actions\" [align]=\"buttonsAlignment\" *ngIf=\"!hideButtons\">\n @if(buttonsTemplate) {\n <ng-container *ngTemplateOutlet=\"buttonsTemplate\"></ng-container>\n }\n\n @else {\n <ng-container *ngTemplateOutlet=\"defaultButtonsTemplate\"></ng-container>\n }\n </mat-dialog-actions>\n\n <ng-template #defaultButtonsTemplate>\n <button cdkFocusInitial mat-button entry-submit-button (click)=\"onSubmit()\">\n <span>{{confirmButtonText}}</span>\n </button>\n <button *ngIf=\"!hideCancel\" mat-button entry-cancel-button (click)=\"cancel()\">\n <span>{{cancelButtonText}}</span>\n </button>\n </ng-template>\n</div>","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { IEntryAlertDialogData } from './entry-alert-dialog-data.interface';\n\n@Component({\n selector: 'entry-alert-dialog',\n templateUrl: './entry-alert-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class EntryAlertDialogComponent extends EntryDialogComponent {\n protected override readonly mdDialogRef: MatDialogRef<EntryDialogComponent> = inject(MatDialogRef<EntryDialogComponent>);\n override readonly config: EntryDialogConfig = inject(ENTRY_DIALOG_CONFIG);\n readonly data: IEntryAlertDialogData = inject(MAT_DIALOG_DATA);\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { IEntryConfirmDialogData } from './entry-confirm-dialog-data.interface';\n\n@Component({\n selector: 'entry-confirm-dialog',\n templateUrl: './entry-confirm-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class EntryConfirmDialogComponent extends EntryDialogComponent {\n protected override readonly mdDialogRef: MatDialogRef<EntryDialogComponent> = inject(MatDialogRef<EntryDialogComponent>);\n override readonly config: EntryDialogConfig = inject(ENTRY_DIALOG_CONFIG);\n readonly data: IEntryConfirmDialogData = inject(MAT_DIALOG_DATA);\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [cancelButtonText]=\"data.cancelText ?? config.cancelButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\">\n <p>{{data.message}}</p>\n</entry-dialog>","import { ChangeDetectionStrategy, Component, inject } from '@angular/core';\nimport { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from '../../entry-dialog-config.model';\nimport { EntryDialogComponent } from '../entry-dialog.component';\nimport { IEntryErrorDialogData } from './entry-error-dialog-data.interface';\n\n@Component({\n selector: 'entry-error-dialog',\n templateUrl: './entry-error-dialog.component.html',\n changeDetection: ChangeDetectionStrategy.OnPush,\n standalone: false\n})\nexport class EntryErrorDialogComponent extends EntryDialogComponent {\n errors: string[] = [];\n protected override readonly mdDialogRef: MatDialogRef<EntryDialogComponent> = inject(MatDialogRef<EntryDialogComponent>);\n override readonly config: EntryDialogConfig = inject(ENTRY_DIALOG_CONFIG);\n readonly data: IEntryErrorDialogData = inject(MAT_DIALOG_DATA);\n\n constructor() {\n super();\n this.extractValidationErrors();\n }\n\n private extractValidationErrors(): void {\n if (Array.isArray(this.data.errors)) {\n this.errors = this.data.errors as string[];\n } else if (this.data.errors.errors) {\n const validationErrors = this.data.errors.errors;\n this.errors = Object.entries(validationErrors)\n .map(values => values[1])\n .reduce((a, b) => a.concat(b), []);\n } else if (this.data.message) {\n this.errors = [this.data.message];\n }\n }\n}\n","<entry-dialog\n [title]=\"data.title\"\n [confirmButtonText]=\"data.confirmText ?? config.confirmButtonText\"\n [buttonsAlignment]=\"data.buttonsAlignment ?? config.buttonsAlignment\"\n [hideClose]=\"data.hideClose ?? config.hideClose\"\n [hideCancel]=\"true\">\n <p *ngFor=\"let error of errors\">{{error}}</p>\n</entry-dialog>","import { inject, Injectable, Type } from '@angular/core';\nimport { MatDialog, MatDialogConfig } from '@angular/material/dialog';\nimport { Observable } from 'rxjs';\nimport { take } from 'rxjs/operators';\nimport { IEntryAlertDialogData } from './dialogs/alert/entry-alert-dialog-data.interface';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { IEntryConfirmDialogData } from './dialogs/confirm/entry-confirm-dialog-data.interface';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { IEntryErrorDialogData } from './dialogs/error/entry-error-dialog-data.interface';\nimport { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';\nimport { ENTRY_DIALOG_CONFIG, EntryDialogConfig } from './entry-dialog-config.model';\n\n/**\n * Used to open built-in and custom entry dialogs.\n */\n@Injectable()\nexport class EntryDialogService {\n protected readonly config: EntryDialogConfig = inject(ENTRY_DIALOG_CONFIG);\n private readonly matDialog: MatDialog = inject(MatDialog);\n\n /**\n * Opens alert dialog.\n *\n * @param data - Contains title, message and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openAlert = (data: Partial<IEntryAlertDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryAlertDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens confirm dialog.\n *\n * @param data - Contains title, message and optional confirm/cancel buttons text\n * @returns `true` if confirmed, `false` if canceled or closed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openConfirm = (data: Partial<IEntryConfirmDialogData>): Observable<boolean | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryConfirmDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens error dialog.\n *\n * @param data - Contains title, errors and optional confirm button text\n * @returns `true` if confirmed, `undefined` if closed by clicking on backdrop or pressing escape\n */\n openError = (data: Partial<IEntryErrorDialogData>): Observable<true | undefined> => {\n data.disableClose = data.disableClose === undefined ? this.config.disableClose : data.disableClose;\n return this.open(EntryErrorDialogComponent, data, data.disableClose);\n };\n\n /**\n * Opens dialog with custom component.\n *\n * @param component - Dialog custom component implementation\n * @param data - Optional parameter used to supply component with input parameters\n * @param disableClose - Optional parameter that disable closing dialog when pressing escape or clicking on backdrop\n * @param cssClass - Optional parameter used to set custom class to Material overlay pane\n * @returns Any result custom implementation provides\n */\n open = (\n component: Type<EntryDialogComponent>,\n data: unknown = undefined,\n disableClose: boolean | undefined = undefined,\n cssClass = ''): Observable<any> => {\n const configuration = new MatDialogConfig<unknown>();\n configuration.data = data;\n configuration.disableClose = disableClose === undefined\n ? this.config.disableClose\n : disableClose;\n this.setPanelClassFor(configuration, cssClass);\n\n return this.matDialog\n .open(component, configuration)\n .afterClosed()\n .pipe(take(1));\n };\n\n /**\n * Closes all opened dialogs.\n */\n closeAll = (): void => this.matDialog.closeAll();\n\n private setPanelClassFor = <T>(configuration: MatDialogConfig<T>, cssClass: string) => {\n configuration.panelClass = ['dialog-container', cssClass];\n };\n}\n","import { CommonModule } from '@angular/common';\nimport { NgModule } from '@angular/core';\nimport { MatButtonModule } from '@angular/material/button';\nimport { MatDialogModule } from '@angular/material/dialog';\nimport { MatIconModule } from '@angular/material/icon';\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\nimport { EntryAlertDialogComponent } from './dialogs/alert/entry-alert-dialog.component';\nimport { EntryConfirmDialogComponent } from './dialogs/confirm/entry-confirm-dialog.component';\nimport { EntryDialogComponent } from './dialogs/entry-dialog.component';\nimport { EntryErrorDialogComponent } from './dialogs/error/entry-error-dialog.component';\nimport { EntryDialogService } from './entry-dialog.service';\n\n@NgModule({\n declarations: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent,\n EntryErrorDialogComponent\n ],\n imports: [\n CommonModule,\n MatDialogModule,\n MatIconModule,\n MatButtonModule,\n EntryButtonModule\n ],\n exports: [\n EntryDialogComponent,\n EntryAlertDialogComponent,\n EntryConfirmDialogComponent,\n EntryErrorDialogComponent\n ],\n providers: [EntryDialogService]\n})\nexport class EntryDialogModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1.EntryDialogComponent","i2.EntryDialogComponent"],"mappings":";;;;;;;;;;;;;;;;AAIA;;AAEG;MACU,iBAAiB,CAAA;AAY1B,IAAA,WAAA,CAAY,SAAqC,EAAE,EAAA;QAC/C,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,iBAAiB,IAAI,IAAI;QACzD,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,QAAQ;QAC3D,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,IAAI,KAAK;QACxD,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,IAAI,IAAI;QACzC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,IAAI,KAAK;;AAEvD;AAED;;;;;;;;;AASG;AACI,MAAM,mBAAmB,GAAG,oBAAoB,CAAC,IAAI,iBAAiB,EAAE;AAE/E;;AAEG;MACU,wBAAwB,GAAG,CAAC,MAAkC,KACvE,aAAa,CAAC,mBAAmB,EAAE,MAAM,IAAI,iBAAiB,CAAC,MAAM,CAAC;;AC5C1E;AAOA;;;;;;;AAOG;MAOU,oBAAoB,CAAA;AANjC,IAAA,WAAA,GAAA;AAOuB,QAAA,IAAA,CAAA,WAAW,GAAuC,MAAM,EAAC,YAAkC,EAAC;AAC5F,QAAA,IAAA,CAAA,MAAM,GAAsB,MAAM,CAAC,mBAAmB,CAAC;;AAKjE,QAAA,IAAA,CAAA,gBAAgB,GAAgC,IAAI,CAAC,MAAM,CAAC,gBAAgB;;AAE5E,QAAA,IAAA,CAAA,iBAAiB,GAAG,IAAI,CAAC,MAAM,CAAC,iBAAiB;;AAEjD,QAAA,IAAA,CAAA,gBAAgB,GAAG,IAAI,CAAC,MAAM,CAAC,gBAAgB;;AAM/C,QAAA,IAAA,CAAA,SAAS,GAAY,IA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UAAA,EAAA,CAAA;kBAtB7B,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE;wBACZ,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;wBAC3B;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,YAAY;wBACZ,eAAe;wBACf,aAAa;wBACb,eAAe;wBACf;AACD,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,oBAAoB;wBACpB,yBAAyB;wBACzB,2BAA2B;wBAC3B;AACD,qBAAA;oBACD,SAAS,EAAE,CAAC,kBAAkB;AAC/B,iBAAA;;;ACjCD;;AAEG;;;;"}
@@ -1,62 +1,37 @@
1
- import * as i0 from '@angular/core';
2
- import { forwardRef, EventEmitter, ElementRef, Component, ChangeDetectionStrategy, Input, Output, ViewChild, NgModule } from '@angular/core';
3
1
  import * as i1 from '@angular/common';
4
2
  import { CommonModule } from '@angular/common';
5
- import { coerceBooleanProperty } from '@angular/cdk/coercion';
3
+ import * as i0 from '@angular/core';
4
+ import { forwardRef, inject, NgZone, Renderer2, EventEmitter, ElementRef, ViewChild, Output, Input, ChangeDetectionStrategy, Component, NgModule } from '@angular/core';
6
5
  import { NG_VALUE_ACCESSOR, NG_VALIDATORS, FormsModule } from '@angular/forms';
7
- import { Subject, fromEvent } from 'rxjs';
8
- import { takeUntil } from 'rxjs/operators';
9
- import * as i2 from '@angular/material/icon';
10
- import { MatIconModule } from '@angular/material/icon';
11
6
  import * as i3 from '@angular/material/button';
12
7
  import { MatButtonModule } from '@angular/material/button';
8
+ import * as i2 from '@angular/material/icon';
9
+ import { MatIconModule } from '@angular/material/icon';
13
10
  import * as i4 from '@enigmatry/entry-components/button';
14
11
  import { EntryButtonModule } from '@enigmatry/entry-components/button';
12
+ import { coerceBooleanProperty } from '@angular/cdk/coercion';
13
+ import { Subject, fromEvent } from 'rxjs';
14
+ import { takeUntil } from 'rxjs/operators';
15
15
 
16
- /* eslint-disable @typescript-eslint/member-ordering */
16
+ /* eslint-disable max-lines */
17
17
  const providers = [
18
18
  {
19
19
  provide: NG_VALUE_ACCESSOR,
20
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
20
21
  useExisting: forwardRef(() => EntryFileInputComponent),
21
22
  multi: true
22
23
  },
23
24
  {
24
25
  provide: NG_VALIDATORS,
26
+ // eslint-disable-next-line @typescript-eslint/no-use-before-define
25
27
  useExisting: forwardRef(() => EntryFileInputComponent),
26
28
  multi: true
27
29
  }
28
30
  ];
29
31
  class EntryFileInputComponent {
30
- /**
31
- * Same as 'multiple' attribute in <input/> element.
32
- */
33
- set multiple(multiple) {
34
- this._multiple = coerceBooleanProperty(multiple);
35
- }
36
- get multiple() {
37
- return this._multiple;
38
- }
39
- /**
40
- * Same as 'disabled' attribute in <input/> element.
41
- */
42
- set disabled(disabled) {
43
- this._disabled = coerceBooleanProperty(disabled);
44
- }
45
- get disabled() {
46
- return this._disabled;
47
- }
48
- /**
49
- * Same as 'readonly' attribute in <input/> element.
50
- */
51
- set readonly(readonly) {
52
- this._readonly = coerceBooleanProperty(readonly);
53
- }
54
- get readonly() {
55
- return this._readonly;
56
- }
57
- constructor(_ngZone, _renderer) {
58
- this._ngZone = _ngZone;
59
- this._renderer = _renderer;
32
+ constructor() {
33
+ this._ngZone = inject(NgZone);
34
+ this._renderer = inject(Renderer2);
60
35
  /**
61
36
  * Label for the select file button. Defaults to 'Choose file...'
62
37
  */
@@ -89,6 +64,33 @@ class EntryFileInputComponent {
89
64
  // set by registerOnTouched
90
65
  };
91
66
  }
67
+ /**
68
+ * Same as 'multiple' attribute in <input/> element.
69
+ */
70
+ set multiple(multiple) {
71
+ this._multiple = coerceBooleanProperty(multiple);
72
+ }
73
+ get multiple() {
74
+ return this._multiple;
75
+ }
76
+ /**
77
+ * Same as 'disabled' attribute in <input/> element.
78
+ */
79
+ set disabled(disabled) {
80
+ this._disabled = coerceBooleanProperty(disabled);
81
+ }
82
+ get disabled() {
83
+ return this._disabled;
84
+ }
85
+ /**
86
+ * Same as 'readonly' attribute in <input/> element.
87
+ */
88
+ set readonly(readonly) {
89
+ this._readonly = coerceBooleanProperty(readonly);
90
+ }
91
+ get readonly() {
92
+ return this._readonly;
93
+ }
92
94
  get fileNames() {
93
95
  if (this.value instanceof File) {
94
96
  return this.value.name;
@@ -113,9 +115,10 @@ class EntryFileInputComponent {
113
115
  }
114
116
  onFileSelect(event) {
115
117
  const fileInputEl = event.target;
118
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
116
119
  const files = fileInputEl.files;
117
120
  const value = this._multiple
118
- ? files?.length > 1 ? files : files[0]
121
+ ? files.length > 1 ? files : files[0]
119
122
  : files[0];
120
123
  this.value = value;
121
124
  this.onChange(value);
@@ -149,21 +152,22 @@ class EntryFileInputComponent {
149
152
  return null;
150
153
  }
151
154
  return {
152
- ...(isSizeLimitExceeded ? { maxFileSize: true } : {}),
153
- ...(isCountLimitExceeded ? { maxFileCount: true } : {})
155
+ ...isSizeLimitExceeded ? { maxFileSize: true } : {},
156
+ ...isCountLimitExceeded ? { maxFileCount: true } : {}
154
157
  };
155
158
  }
156
159
  isFileCountLimitExceeded(files) {
157
160
  const isMultiple = this.multiple && files instanceof FileList;
158
161
  const maxFileCount = this.maxFileCount;
159
162
  const actualFileCount = files?.length;
160
- return isMultiple && maxFileCount && actualFileCount > maxFileCount;
163
+ return isMultiple && !!maxFileCount && actualFileCount > maxFileCount;
161
164
  }
162
165
  isFileSizeLimitExceeded(files) {
163
166
  if (!this.maxFileSizeInKb) {
164
167
  return false;
165
168
  }
166
- const maxFileSizeInBytes = this.maxFileSizeInKb * 1024;
169
+ const kilobyte = 1024;
170
+ const maxFileSizeInBytes = this.maxFileSizeInKb * kilobyte;
167
171
  if (files instanceof File) {
168
172
  return files.size > maxFileSizeInBytes;
169
173
  }
@@ -172,13 +176,13 @@ class EntryFileInputComponent {
172
176
  }
173
177
  return false;
174
178
  }
175
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryFileInputComponent, deps: [{ token: i0.NgZone }, { token: i0.Renderer2 }], target: i0.ɵɵFactoryTarget.Component }); }
176
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.1.3", type: EntryFileInputComponent, isStandalone: false, selector: "entry-file-input", inputs: { label: "label", matIcon: "matIcon", accept: "accept", multiple: "multiple", disabled: "disabled", readonly: "readonly", maxFileSizeInKb: "maxFileSizeInKb", maxFileCount: "maxFileCount" }, outputs: { selectedFile: "selectedFile" }, providers: providers, viewQueries: [{ propertyName: "_fileButton", first: true, predicate: ["fileButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<button\r\n #fileButton\r\n mat-button\r\n entry-submit-button\r\n type=\"button\"\r\n [disabled]=\"disabled || readonly\"\r\n aria-controls=\"fileInput\"\r\n aria-label=\"Upload Files\">\r\n <mat-icon *ngIf=\"matIcon\">{{matIcon}}</mat-icon>\r\n <span>{{label}}</span>\r\n</button>\r\n<ng-container *ngIf=\"value\">\r\n {{fileNames}}\r\n</ng-container>\r\n<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"file-input-hidden\"\r\n [accept]=\"accept\"\r\n [multiple]=\"multiple\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n (change)=\"onFileSelect($event)\"\r\n aria-label=\"File Upload\"\r\n id=\"fileInput\"\r\n/>", styles: [".file-input-hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", exportAs: ["matButton"] }, { kind: "directive", type: i4.EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
179
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryFileInputComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
180
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.1.2", type: EntryFileInputComponent, isStandalone: false, selector: "entry-file-input", inputs: { label: "label", matIcon: "matIcon", accept: "accept", multiple: "multiple", disabled: "disabled", readonly: "readonly", maxFileSizeInKb: "maxFileSizeInKb", maxFileCount: "maxFileCount" }, outputs: { selectedFile: "selectedFile" }, providers: providers, viewQueries: [{ propertyName: "_fileButton", first: true, predicate: ["fileButton"], descendants: true, read: ElementRef, static: true }, { propertyName: "_fileInput", first: true, predicate: ["fileInput"], descendants: true, static: true }], ngImport: i0, template: "<button\r\n #fileButton\r\n mat-button\r\n entry-submit-button\r\n type=\"button\"\r\n [disabled]=\"disabled || readonly\"\r\n aria-controls=\"fileInput\"\r\n aria-label=\"Upload Files\">\r\n <mat-icon *ngIf=\"matIcon\">{{matIcon}}</mat-icon>\r\n <span>{{label}}</span>\r\n</button>\r\n<ng-container *ngIf=\"value\">\r\n {{fileNames}}\r\n</ng-container>\r\n<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"file-input-hidden\"\r\n [accept]=\"accept\"\r\n [multiple]=\"multiple\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n (change)=\"onFileSelect($event)\"\r\n aria-label=\"File Upload\"\r\n id=\"fileInput\"\r\n/>", styles: [".file-input-hidden{display:none}\n"], dependencies: [{ kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "component", type: i2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3.MatButton, selector: " button[matButton], a[matButton], button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button], a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button] ", inputs: ["matButton"], exportAs: ["matButton", "matAnchor"] }, { kind: "directive", type: i4.EntryButtonDirective, selector: "[mat-button][entry-submit-button],[mat-button][entry-cancel-button]" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
177
181
  }
178
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryFileInputComponent, decorators: [{
182
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryFileInputComponent, decorators: [{
179
183
  type: Component,
180
184
  args: [{ standalone: false, selector: 'entry-file-input', changeDetection: ChangeDetectionStrategy.OnPush, providers: providers, template: "<button\r\n #fileButton\r\n mat-button\r\n entry-submit-button\r\n type=\"button\"\r\n [disabled]=\"disabled || readonly\"\r\n aria-controls=\"fileInput\"\r\n aria-label=\"Upload Files\">\r\n <mat-icon *ngIf=\"matIcon\">{{matIcon}}</mat-icon>\r\n <span>{{label}}</span>\r\n</button>\r\n<ng-container *ngIf=\"value\">\r\n {{fileNames}}\r\n</ng-container>\r\n<input\r\n #fileInput\r\n type=\"file\"\r\n class=\"file-input-hidden\"\r\n [accept]=\"accept\"\r\n [multiple]=\"multiple\"\r\n [disabled]=\"disabled\"\r\n [readonly]=\"readonly\"\r\n (change)=\"onFileSelect($event)\"\r\n aria-label=\"File Upload\"\r\n id=\"fileInput\"\r\n/>", styles: [".file-input-hidden{display:none}\n"] }]
181
- }], ctorParameters: () => [{ type: i0.NgZone }, { type: i0.Renderer2 }], propDecorators: { label: [{
185
+ }], propDecorators: { label: [{
182
186
  type: Input
183
187
  }], matIcon: [{
184
188
  type: Input
@@ -205,19 +209,19 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImpor
205
209
  }] } });
206
210
 
207
211
  class EntryFileInputModule {
208
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryFileInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
209
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.1.3", ngImport: i0, type: EntryFileInputModule, declarations: [EntryFileInputComponent], imports: [CommonModule,
212
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryFileInputModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
213
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.1.2", ngImport: i0, type: EntryFileInputModule, declarations: [EntryFileInputComponent], imports: [CommonModule,
210
214
  FormsModule,
211
215
  MatIconModule,
212
216
  MatButtonModule,
213
217
  EntryButtonModule], exports: [EntryFileInputComponent] }); }
214
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryFileInputModule, imports: [CommonModule,
218
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryFileInputModule, imports: [CommonModule,
215
219
  FormsModule,
216
220
  MatIconModule,
217
221
  MatButtonModule,
218
222
  EntryButtonModule] }); }
219
223
  }
220
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.1.3", ngImport: i0, type: EntryFileInputModule, decorators: [{
224
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.1.2", ngImport: i0, type: EntryFileInputModule, decorators: [{
221
225
  type: NgModule,
222
226
  args: [{
223
227
  declarations: [