@enigmatry/entry-components 15.2.1-preview.1 → 16.0.0

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 (170) hide show
  1. package/README.md +11 -10
  2. package/common/directives/auto-disable-button.directive.d.ts +1 -1
  3. package/dialog/dialogs/entry-dialog.component.d.ts +1 -1
  4. package/{esm2020 → esm2022}/button/entry-button.directive.mjs +4 -4
  5. package/{esm2020 → esm2022}/button/entry-button.module.mjs +7 -7
  6. package/{esm2020 → esm2022}/common/common.module.mjs +7 -7
  7. package/{esm2020 → esm2022}/common/date-time/entry-date-time-adapter.mjs +4 -4
  8. package/{esm2020 → esm2022}/common/directives/auto-disable-button.directive.mjs +4 -4
  9. package/{esm2020 → esm2022}/common/directives/scroll-to-invalid-control.directive.mjs +4 -4
  10. package/{esm2020 → esm2022}/common/event-plugins/debounce.plugin.mjs +4 -4
  11. package/{esm2020 → esm2022}/common/event-plugins/throttle.plugin.mjs +4 -4
  12. package/{esm2020 → esm2022}/common/interceptors/accept-language.interceptor.mjs +4 -4
  13. package/{esm2020 → esm2022}/dialog/dialogs/alert/entry-alert-dialog.component.mjs +4 -4
  14. package/{esm2020 → esm2022}/dialog/dialogs/confirm/entry-confirm-dialog.component.mjs +4 -4
  15. package/{esm2020 → esm2022}/dialog/dialogs/entry-dialog.component.mjs +4 -4
  16. package/{esm2020 → esm2022}/dialog/dialogs/error/entry-error-dialog.component.mjs +4 -4
  17. package/{esm2020 → esm2022}/dialog/entry-dialog.module.mjs +19 -19
  18. package/esm2022/dialog/entry-dialog.service.mjs +86 -0
  19. package/esm2022/file-input/entry-file-input.component.mjs +201 -0
  20. package/{esm2020 → esm2022}/file-input/entry-file-input.module.mjs +13 -13
  21. package/{esm2020 → esm2022}/modules/entry-components.module.mjs +21 -21
  22. package/{esm2020 → esm2022}/permissions/permission.directive.mjs +4 -4
  23. package/{esm2020 → esm2022}/permissions/permission.module.mjs +7 -7
  24. package/{esm2020 → esm2022}/permissions/permission.pipe.mjs +4 -4
  25. package/{esm2020 → esm2022}/search-filter/autocomplete/autocomplete-search-filter.component.mjs +4 -4
  26. package/esm2022/search-filter/date/date-search-filter.component.mjs +19 -0
  27. package/{esm2020 → esm2022}/search-filter/date-time/date-time-search-filter.component.mjs +7 -7
  28. package/{esm2020 → esm2022}/search-filter/entry-search-filter.component.mjs +4 -4
  29. package/{esm2020 → esm2022}/search-filter/entry-search-filter.module.mjs +28 -28
  30. package/{esm2020 → esm2022}/search-filter/select/select-search-filter.component.mjs +4 -4
  31. package/{esm2020 → esm2022}/search-filter/text/text-search-filter.component.mjs +4 -4
  32. package/{esm2020 → esm2022}/spinner/entry-spinner/spinner.component.mjs +10 -10
  33. package/{esm2020 → esm2022}/spinner/spinner-overlay-container.mjs +4 -4
  34. package/{esm2020 → esm2022}/spinner/spinner.module.mjs +9 -9
  35. package/{esm2020 → esm2022}/table/components/entry-cell/entry-cell.component.mjs +4 -4
  36. package/{esm2020 → esm2022}/table/components/entry-cell-context-menu/entry-cell-context-menu.component.mjs +4 -4
  37. package/{esm2020 → esm2022}/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.mjs +4 -4
  38. package/esm2022/table/components/entry-table/entry-table.component.mjs +248 -0
  39. package/{esm2020 → esm2022}/table/entry-table.module.mjs +33 -33
  40. package/{esm2020 → esm2022}/table/interfaces/entry-table-config.mjs +1 -2
  41. package/{esm2020 → esm2022}/validation/entry-display-control-validation.directive.mjs +4 -4
  42. package/{esm2020 → esm2022}/validation/entry-form-errors.component.mjs +6 -6
  43. package/{esm2020 → esm2022}/validation/entry-validation.module.mjs +13 -13
  44. package/{fesm2020 → fesm2022}/enigmatry-entry-components-button.mjs +9 -9
  45. package/{fesm2020 → fesm2022}/enigmatry-entry-components-button.mjs.map +1 -1
  46. package/{fesm2020 → fesm2022}/enigmatry-entry-components-common.mjs +24 -24
  47. package/{fesm2015 → fesm2022}/enigmatry-entry-components-common.mjs.map +1 -1
  48. package/{fesm2020 → fesm2022}/enigmatry-entry-components-dialog.mjs +33 -33
  49. package/{fesm2020 → fesm2022}/enigmatry-entry-components-dialog.mjs.map +1 -1
  50. package/{fesm2020 → fesm2022}/enigmatry-entry-components-file-input.mjs +21 -17
  51. package/fesm2022/enigmatry-entry-components-file-input.mjs.map +1 -0
  52. package/{fesm2020 → fesm2022}/enigmatry-entry-components-permissions.mjs +12 -12
  53. package/{fesm2020 → fesm2022}/enigmatry-entry-components-permissions.mjs.map +1 -1
  54. package/fesm2022/enigmatry-entry-components-search-filter.mjs +387 -0
  55. package/{fesm2020 → fesm2022}/enigmatry-entry-components-search-filter.mjs.map +1 -1
  56. package/{fesm2020 → fesm2022}/enigmatry-entry-components-spinner.mjs +20 -20
  57. package/{fesm2020 → fesm2022}/enigmatry-entry-components-spinner.mjs.map +1 -1
  58. package/{fesm2020 → fesm2022}/enigmatry-entry-components-table.mjs +44 -45
  59. package/fesm2022/enigmatry-entry-components-table.mjs.map +1 -0
  60. package/{fesm2020 → fesm2022}/enigmatry-entry-components-validation.mjs +20 -20
  61. package/{fesm2020 → fesm2022}/enigmatry-entry-components-validation.mjs.map +1 -1
  62. package/{fesm2020 → fesm2022}/enigmatry-entry-components.mjs +20 -20
  63. package/{fesm2020 → fesm2022}/enigmatry-entry-components.mjs.map +1 -1
  64. package/file-input/entry-file-input.component.d.ts +1 -1
  65. package/package.json +39 -63
  66. package/permissions/permission.directive.d.ts +1 -1
  67. package/search-filter/autocomplete/autocomplete-search-filter.component.d.ts +1 -1
  68. package/search-filter/date/date-search-filter.component.d.ts +1 -1
  69. package/search-filter/date-time/date-time-search-filter.component.d.ts +1 -1
  70. package/search-filter/entry-search-filter.component.d.ts +1 -1
  71. package/search-filter/select/select-search-filter.component.d.ts +1 -1
  72. package/search-filter/text/text-search-filter.component.d.ts +1 -1
  73. package/spinner/entry-spinner/spinner.component.d.ts +1 -1
  74. package/table/components/entry-cell/entry-cell.component.d.ts +1 -1
  75. package/table/components/entry-cell-context-menu/entry-cell-context-menu.component.d.ts +1 -1
  76. package/table/components/entry-cell-formatted-value/entry-cell-formatted-value.component.d.ts +1 -1
  77. package/table/components/entry-table/entry-table.component.d.ts +1 -1
  78. package/validation/entry-display-control-validation.directive.d.ts +1 -1
  79. package/validation/entry-form-errors.component.d.ts +1 -1
  80. package/esm2020/dialog/entry-dialog.service.mjs +0 -86
  81. package/esm2020/file-input/entry-file-input.component.mjs +0 -197
  82. package/esm2020/search-filter/date/date-search-filter.component.mjs +0 -19
  83. package/esm2020/table/components/entry-table/entry-table.component.mjs +0 -248
  84. package/fesm2015/enigmatry-entry-components-button.mjs +0 -114
  85. package/fesm2015/enigmatry-entry-components-button.mjs.map +0 -1
  86. package/fesm2015/enigmatry-entry-components-common.mjs +0 -405
  87. package/fesm2015/enigmatry-entry-components-dialog.mjs +0 -333
  88. package/fesm2015/enigmatry-entry-components-dialog.mjs.map +0 -1
  89. package/fesm2015/enigmatry-entry-components-file-input.mjs +0 -237
  90. package/fesm2015/enigmatry-entry-components-file-input.mjs.map +0 -1
  91. package/fesm2015/enigmatry-entry-components-permissions.mjs +0 -98
  92. package/fesm2015/enigmatry-entry-components-permissions.mjs.map +0 -1
  93. package/fesm2015/enigmatry-entry-components-search-filter.mjs +0 -394
  94. package/fesm2015/enigmatry-entry-components-search-filter.mjs.map +0 -1
  95. package/fesm2015/enigmatry-entry-components-spinner.mjs +0 -156
  96. package/fesm2015/enigmatry-entry-components-spinner.mjs.map +0 -1
  97. package/fesm2015/enigmatry-entry-components-table.mjs +0 -462
  98. package/fesm2015/enigmatry-entry-components-table.mjs.map +0 -1
  99. package/fesm2015/enigmatry-entry-components-validation.mjs +0 -219
  100. package/fesm2015/enigmatry-entry-components-validation.mjs.map +0 -1
  101. package/fesm2015/enigmatry-entry-components.mjs +0 -87
  102. package/fesm2015/enigmatry-entry-components.mjs.map +0 -1
  103. package/fesm2020/enigmatry-entry-components-common.mjs.map +0 -1
  104. package/fesm2020/enigmatry-entry-components-file-input.mjs.map +0 -1
  105. package/fesm2020/enigmatry-entry-components-search-filter.mjs +0 -387
  106. package/fesm2020/enigmatry-entry-components-table.mjs.map +0 -1
  107. /package/{esm2020 → esm2022}/button/enigmatry-entry-components-button.mjs +0 -0
  108. /package/{esm2020 → esm2022}/button/entry-button-config.mjs +0 -0
  109. /package/{esm2020 → esm2022}/button/public-api.mjs +0 -0
  110. /package/{esm2020 → esm2022}/common/constants.mjs +0 -0
  111. /package/{esm2020 → esm2022}/common/date-time/entry-date-time.mjs +0 -0
  112. /package/{esm2020 → esm2022}/common/date-time/index.mjs +0 -0
  113. /package/{esm2020 → esm2022}/common/directives/index.mjs +0 -0
  114. /package/{esm2020 → esm2022}/common/enigmatry-entry-components-common.mjs +0 -0
  115. /package/{esm2020 → esm2022}/common/event-plugins/abstract.plugin.mjs +0 -0
  116. /package/{esm2020 → esm2022}/common/event-plugins/index.mjs +0 -0
  117. /package/{esm2020 → esm2022}/common/interceptors/index.mjs +0 -0
  118. /package/{esm2020 → esm2022}/common/public-api.mjs +0 -0
  119. /package/{esm2020 → esm2022}/common/utils/index.mjs +0 -0
  120. /package/{esm2020 → esm2022}/common/utils/provide-config.mjs +0 -0
  121. /package/{esm2020 → esm2022}/dialog/dialogs/alert/entry-alert-dialog-data.interface.mjs +0 -0
  122. /package/{esm2020 → esm2022}/dialog/dialogs/confirm/entry-confirm-dialog-data.interface.mjs +0 -0
  123. /package/{esm2020 → esm2022}/dialog/dialogs/error/entry-error-dialog-data.interface.mjs +0 -0
  124. /package/{esm2020 → esm2022}/dialog/enigmatry-entry-components-dialog.mjs +0 -0
  125. /package/{esm2020 → esm2022}/dialog/entry-dialog-buttons-alignment.type.mjs +0 -0
  126. /package/{esm2020 → esm2022}/dialog/entry-dialog-config.model.mjs +0 -0
  127. /package/{esm2020 → esm2022}/dialog/public-api.mjs +0 -0
  128. /package/{esm2020 → esm2022}/enigmatry-entry-components.mjs +0 -0
  129. /package/{esm2020 → esm2022}/file-input/enigmatry-entry-components-file-input.mjs +0 -0
  130. /package/{esm2020 → esm2022}/file-input/public-api.mjs +0 -0
  131. /package/{esm2020 → esm2022}/permissions/enigmatry-entry-components-permissions.mjs +0 -0
  132. /package/{esm2020 → esm2022}/permissions/permission-type.mjs +0 -0
  133. /package/{esm2020 → esm2022}/permissions/permission.guard.mjs +0 -0
  134. /package/{esm2020 → esm2022}/permissions/permission.service.mjs +0 -0
  135. /package/{esm2020 → esm2022}/permissions/public-api.mjs +0 -0
  136. /package/{esm2020 → esm2022}/public-api.mjs +0 -0
  137. /package/{esm2020 → esm2022}/search-filter/autocomplete/autocomplete-search-filter.model.mjs +0 -0
  138. /package/{esm2020 → esm2022}/search-filter/control-type.mjs +0 -0
  139. /package/{esm2020 → esm2022}/search-filter/date/date-search-filter.model.mjs +0 -0
  140. /package/{esm2020 → esm2022}/search-filter/date-time/date-time-search-filter.model.mjs +0 -0
  141. /package/{esm2020 → esm2022}/search-filter/enigmatry-entry-components-search-filter.mjs +0 -0
  142. /package/{esm2020 → esm2022}/search-filter/public-api.mjs +0 -0
  143. /package/{esm2020 → esm2022}/search-filter/search-filter-base.model.mjs +0 -0
  144. /package/{esm2020 → esm2022}/search-filter/search-filter-config.model.mjs +0 -0
  145. /package/{esm2020 → esm2022}/search-filter/search-filter-params.type.mjs +0 -0
  146. /package/{esm2020 → esm2022}/search-filter/select/select-search-filter.model.mjs +0 -0
  147. /package/{esm2020 → esm2022}/search-filter/select-option.model.mjs +0 -0
  148. /package/{esm2020 → esm2022}/search-filter/text/text-search-filter.model.mjs +0 -0
  149. /package/{esm2020 → esm2022}/spinner/enigmatry-entry-components-spinner.mjs +0 -0
  150. /package/{esm2020 → esm2022}/spinner/public-api.mjs +0 -0
  151. /package/{esm2020 → esm2022}/table/components/index.mjs +0 -0
  152. /package/{esm2020 → esm2022}/table/enigmatry-entry-components-table.mjs +0 -0
  153. /package/{esm2020 → esm2022}/table/interfaces/cell-template.mjs +0 -0
  154. /package/{esm2020 → esm2022}/table/interfaces/column-def.mjs +0 -0
  155. /package/{esm2020 → esm2022}/table/interfaces/column-sort-prop.mjs +0 -0
  156. /package/{esm2020 → esm2022}/table/interfaces/column-type-parameter.mjs +0 -0
  157. /package/{esm2020 → esm2022}/table/interfaces/column-type.mjs +0 -0
  158. /package/{esm2020 → esm2022}/table/interfaces/context-menu-item.mjs +0 -0
  159. /package/{esm2020 → esm2022}/table/interfaces/index.mjs +0 -0
  160. /package/{esm2020 → esm2022}/table/interfaces/paged-query.mjs +0 -0
  161. /package/{esm2020 → esm2022}/table/interfaces/pagination.mjs +0 -0
  162. /package/{esm2020 → esm2022}/table/interfaces/row-class-formatter.mjs +0 -0
  163. /package/{esm2020 → esm2022}/table/interfaces/row-context-menu-formatter.mjs +0 -0
  164. /package/{esm2020 → esm2022}/table/interfaces/row-selection-formatter.mjs +0 -0
  165. /package/{esm2020 → esm2022}/table/public-api.mjs +0 -0
  166. /package/{esm2020 → esm2022}/validation/enigmatry-entry-components-validation.mjs +0 -0
  167. /package/{esm2020 → esm2022}/validation/entry-validation-config.model.mjs +0 -0
  168. /package/{esm2020 → esm2022}/validation/entry-validation.mjs +0 -0
  169. /package/{esm2020 → esm2022}/validation/public-api.mjs +0 -0
  170. /package/{esm2020 → esm2022}/validation/validation-problem-details.interface.mjs +0 -0
@@ -1,219 +0,0 @@
1
- import * as i0 from '@angular/core';
2
- import { Component, ChangeDetectionStrategy, Input, Directive, Inject, NgModule } from '@angular/core';
3
- import * as i1 from '@angular/common';
4
- import { CommonModule } from '@angular/common';
5
- import * as i2 from '@angular/material/form-field';
6
- import { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';
7
- import { FormGroup, FormArray, FormsModule, ReactiveFormsModule } from '@angular/forms';
8
- import { MatInputModule } from '@angular/material/input';
9
-
10
- /**
11
- * A component used to display generic (form level) server side validation messages.
12
- * The messages are displayed as a list, each message in a new row.
13
- *
14
- * @example
15
- * ```html
16
- * <entry-form-errors [form]="myForm">
17
- * </entry-form-errors>
18
- * ```
19
- */
20
- class EntryFormErrorsComponent {
21
- }
22
- EntryFormErrorsComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryFormErrorsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
23
- EntryFormErrorsComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.2.10", type: EntryFormErrorsComponent, selector: "entry-form-errors", inputs: { form: "form" }, ngImport: i0, template: `
24
- <div *ngIf="form.errors">
25
- <mat-error *ngFor="let error of form.errors.general">
26
- <span class="mat-body-2">{{error}}</span>
27
- </mat-error>
28
- </div>
29
- `, isInline: true, dependencies: [{ kind: "directive", type: i1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }], changeDetection: i0.ChangeDetectionStrategy.Default });
30
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryFormErrorsComponent, decorators: [{
31
- type: Component,
32
- args: [{
33
- selector: 'entry-form-errors',
34
- template: `
35
- <div *ngIf="form.errors">
36
- <mat-error *ngFor="let error of form.errors.general">
37
- <span class="mat-body-2">{{error}}</span>
38
- </mat-error>
39
- </div>
40
- `,
41
- changeDetection: ChangeDetectionStrategy.Default
42
- }]
43
- }], propDecorators: { form: [{
44
- type: Input
45
- }] } });
46
-
47
- /**
48
- * Used to provide default configurations on module level.
49
- */
50
- class EntryValidationConfig {
51
- constructor(config = {}) {
52
- var _a;
53
- this.validationMessages = (_a = config.validationMessages) !== null && _a !== void 0 ? _a : [];
54
- }
55
- }
56
- /**
57
- * Entry validation injection token of EntryValidationConfig type containing validation default configurations.
58
- * Can be updated with custom configuration.
59
- *
60
- * Defaults:
61
- * - validationMessages: []
62
- */
63
- const ENTRY_VALIDATION_CONFIG = createInjectionToken(new EntryValidationConfig());
64
- /**
65
- * Can be used to provide entry validation configuration.
66
- */
67
- function provideEntryValidationConfig(config) {
68
- return provideConfig(ENTRY_VALIDATION_CONFIG, () => new EntryValidationConfig(config));
69
- }
70
-
71
- /** A key used to map server side validation errors on form level */
72
- const FORM_ERROR_KEY = 'general';
73
- /** A key used to map server side validation errors on form field level */
74
- const FORM_FIELD_ERROR_KEY = 'fromServer';
75
- const getFormControl = (formControl, keys) => {
76
- if (keys.length === 0) {
77
- return formControl;
78
- }
79
- if (formControl instanceof FormGroup) {
80
- return getFormControl(formControl.controls[keys[0].charAt(0).toLowerCase() + keys[0].slice(1)], keys.slice(1));
81
- }
82
- if (formControl instanceof FormArray && +keys[0] >= 0) {
83
- return getFormControl(formControl.controls[+keys[0]], keys.slice(1));
84
- }
85
- return null;
86
- };
87
- /**
88
- * Applies validation errors received from server side to the form.
89
- * The errors are applied to multiple levels: form, form group, form array, and form field.
90
- *
91
- * @param error Server side validation errors response.
92
- * @param form Form to apply validation errors to.
93
- */
94
- const setServerSideValidationErrors = (error, form) => {
95
- var _a;
96
- form.setErrors(null);
97
- const validationErrors = error === null || error === void 0 ? void 0 : error.errors;
98
- const formErrors = {};
99
- if (validationErrors) {
100
- // eslint-disable-next-line guard-for-in
101
- for (const key in validationErrors) {
102
- const control = getFormControl(form, key.split(/[.[\]]+/gu));
103
- if (control) {
104
- const fieldErrors = {};
105
- fieldErrors[FORM_FIELD_ERROR_KEY] = validationErrors[key];
106
- control.setErrors(fieldErrors);
107
- control.markAsTouched();
108
- }
109
- else {
110
- formErrors[FORM_ERROR_KEY] =
111
- ((_a = formErrors[FORM_ERROR_KEY]) === null || _a === void 0 ? void 0 : _a.concat(validationErrors[key])) || validationErrors[key];
112
- }
113
- }
114
- }
115
- else {
116
- formErrors[FORM_ERROR_KEY] = [`An error occurred on the server.`];
117
- }
118
- form.setErrors(formErrors);
119
- };
120
-
121
- /**
122
- * A directive that displays configured validation messages or server side validations for given form control.
123
- * The messages are separated with coma(,) and displayed as _innerHTML_ value of host component.
124
- *
125
- * @example
126
- * ```html
127
- * <div entryDisplayControlValidation [control]="myForm.controls.firstName">
128
- * </div
129
- * ```
130
- */
131
- class EntryDisplayControlValidationDirective {
132
- constructor(_config, _element) {
133
- this._config = _config;
134
- this._element = _element;
135
- }
136
- ngOnInit() {
137
- this._controlSubscription = this.control.statusChanges
138
- .subscribe((controlStatus) => {
139
- if (controlStatus === 'INVALID') {
140
- this._element.nativeElement.innerText = this.extractValidationMessages();
141
- }
142
- });
143
- }
144
- ngOnDestroy() {
145
- if (this._controlSubscription) {
146
- this._controlSubscription.unsubscribe();
147
- }
148
- }
149
- extractValidationMessages() {
150
- if (!this.control.errors) {
151
- return '';
152
- }
153
- const errorsString = this._config.validationMessages
154
- .map(validationMessage => this.control.errors[validationMessage.name]
155
- ? typeof (validationMessage.message) === 'string'
156
- ? validationMessage.message : validationMessage.message(this.control)
157
- : '')
158
- .filter(message => message !== '')
159
- .join(', ');
160
- const serverErrors = this.control.errors[FORM_FIELD_ERROR_KEY];
161
- const serverErrorsString = serverErrors instanceof Array ? serverErrors.join(', ') : '';
162
- return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');
163
- }
164
- }
165
- EntryDisplayControlValidationDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryDisplayControlValidationDirective, deps: [{ token: ENTRY_VALIDATION_CONFIG }, { token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive });
166
- EntryDisplayControlValidationDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.2.10", type: EntryDisplayControlValidationDirective, selector: "[entryDisplayControlValidation]", inputs: { control: "control" }, ngImport: i0 });
167
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryDisplayControlValidationDirective, decorators: [{
168
- type: Directive,
169
- args: [{
170
- selector: '[entryDisplayControlValidation]'
171
- }]
172
- }], ctorParameters: function () {
173
- return [{ type: EntryValidationConfig, decorators: [{
174
- type: Inject,
175
- args: [ENTRY_VALIDATION_CONFIG]
176
- }] }, { type: i0.ElementRef }];
177
- }, propDecorators: { control: [{
178
- type: Input
179
- }] } });
180
-
181
- class EntryValidationModule {
182
- }
183
- EntryValidationModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryValidationModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
184
- EntryValidationModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: EntryValidationModule, declarations: [EntryFormErrorsComponent,
185
- EntryDisplayControlValidationDirective], imports: [CommonModule,
186
- FormsModule,
187
- ReactiveFormsModule,
188
- MatInputModule], exports: [EntryFormErrorsComponent,
189
- EntryDisplayControlValidationDirective] });
190
- EntryValidationModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryValidationModule, imports: [CommonModule,
191
- FormsModule,
192
- ReactiveFormsModule,
193
- MatInputModule] });
194
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryValidationModule, decorators: [{
195
- type: NgModule,
196
- args: [{
197
- declarations: [
198
- EntryFormErrorsComponent,
199
- EntryDisplayControlValidationDirective
200
- ],
201
- imports: [
202
- CommonModule,
203
- FormsModule,
204
- ReactiveFormsModule,
205
- MatInputModule
206
- ],
207
- exports: [
208
- EntryFormErrorsComponent,
209
- EntryDisplayControlValidationDirective
210
- ]
211
- }]
212
- }] });
213
-
214
- /**
215
- * Generated bundle index. Do not edit.
216
- */
217
-
218
- export { ENTRY_VALIDATION_CONFIG, EntryDisplayControlValidationDirective, EntryFormErrorsComponent, EntryValidationConfig, EntryValidationModule, FORM_FIELD_ERROR_KEY, provideEntryValidationConfig, setServerSideValidationErrors };
219
- //# sourceMappingURL=enigmatry-entry-components-validation.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enigmatry-entry-components-validation.mjs","sources":["../../../../libs/entry-components/validation/entry-form-errors.component.ts","../../../../libs/entry-components/validation/entry-validation-config.model.ts","../../../../libs/entry-components/validation/entry-validation.ts","../../../../libs/entry-components/validation/entry-display-control-validation.directive.ts","../../../../libs/entry-components/validation/entry-validation.module.ts","../../../../libs/entry-components/validation/enigmatry-entry-components-validation.ts"],"sourcesContent":["import { ChangeDetectionStrategy, Component, Input } from '@angular/core';\nimport { UntypedFormGroup } from '@angular/forms';\n\n/**\n * A component used to display generic (form level) server side validation messages.\n * The messages are displayed as a list, each message in a new row.\n *\n * @example\n * ```html\n * <entry-form-errors [form]=\"myForm\">\n * </entry-form-errors>\n * ```\n */\n@Component({\n selector: 'entry-form-errors',\n template: `\n <div *ngIf=\"form.errors\">\n <mat-error *ngFor=\"let error of form.errors.general\">\n <span class=\"mat-body-2\">{{error}}</span>\n </mat-error>\n </div>\n `,\n changeDetection: ChangeDetectionStrategy.Default\n})\nexport class EntryFormErrorsComponent {\n /** A form group for which the validation errors are being displayed. */\n @Input() form: UntypedFormGroup;\n}\n","import { Provider } from '@angular/core';\nimport { AbstractControl } from '@angular/forms';\nimport { createInjectionToken, provideConfig } from '@enigmatry/entry-components/common';\n\n/** Used to configure mapping between validation keys and messages */\nexport interface IEntryValidationMessage {\n /** Validation key (e.g. '_required_', '_minlength_', '_email_', etc.) */\n name: string;\n /**\n * Validation message. Can be static string or expression returning string\n * (when messages need to be resolved dynamically: parametrization, localization, etc.).\n */\n message: string | ((control: AbstractControl) => string);\n}\n\n/**\n * Used to provide default configurations on module level.\n */\nexport class EntryValidationConfig {\n /**\n * Validation key to message configuration on module level. Used to configure client side validation messages\n * for standard validators (_required_, _minLength_, _email_, etc.).\n *\n * **NOTE:** If using _Formly_ package to render forms, this configuration should not be used.\n * Instead, use `FormlyModule` to configure validation messages.\n *\n * @example\n * ```ts\n * new EntryValidationConfig() {\n * validationMessages: [\n * { name: 'required': message: 'This field is mandatory' },\n * { name: 'minlength', message: (control: AbstractControl) => `Minimal length is ${control.errors.minlength.requiredLength}`}\n * ]\n * }\n * ```\n */\n validationMessages: IEntryValidationMessage[];\n\n constructor(config: Partial<EntryValidationConfig> = {}) {\n this.validationMessages = config.validationMessages ?? [];\n }\n}\n\n/**\n * Entry validation injection token of EntryValidationConfig type containing validation default configurations.\n * Can be updated with custom configuration.\n *\n * Defaults:\n * - validationMessages: []\n */\nexport const ENTRY_VALIDATION_CONFIG = createInjectionToken(new EntryValidationConfig());\n\n/**\n * Can be used to provide entry validation configuration.\n */\nexport function provideEntryValidationConfig(config: Partial<EntryValidationConfig>): Provider {\n return provideConfig(ENTRY_VALIDATION_CONFIG, () => new EntryValidationConfig(config));\n}\n","import { AbstractControl, FormArray, FormGroup, UntypedFormGroup, ValidationErrors } from '@angular/forms';\nimport { IValidationProblemDetails } from './validation-problem-details.interface';\n\n/** A key used to map server side validation errors on form level */\nconst FORM_ERROR_KEY = 'general';\n/** A key used to map server side validation errors on form field level */\nconst FORM_FIELD_ERROR_KEY = 'fromServer';\n\nconst getFormControl = (formControl: AbstractControl | null | undefined, keys: string[]): AbstractControl | null | undefined => {\n if (keys.length === 0) {\n return formControl;\n }\n if (formControl instanceof FormGroup) {\n return getFormControl(formControl.controls[keys[0].charAt(0).toLowerCase() + keys[0].slice(1)], keys.slice(1));\n }\n if (formControl instanceof FormArray && +keys[0] >= 0) {\n return getFormControl(formControl.controls[+keys[0]], keys.slice(1));\n }\n return null;\n};\n\n/**\n * Applies validation errors received from server side to the form.\n * The errors are applied to multiple levels: form, form group, form array, and form field.\n *\n * @param error Server side validation errors response.\n * @param form Form to apply validation errors to.\n */\nconst setServerSideValidationErrors = (error: IValidationProblemDetails, form: UntypedFormGroup) => {\n form.setErrors(null);\n const validationErrors = error?.errors;\n const formErrors: ValidationErrors = {};\n\n if (validationErrors) {\n // eslint-disable-next-line guard-for-in\n for (const key in validationErrors) {\n const control = getFormControl(form, key.split(/[.[\\]]+/gu));\n\n if (control) {\n const fieldErrors = {} as ValidationErrors;\n fieldErrors[FORM_FIELD_ERROR_KEY] = validationErrors[key];\n control.setErrors(fieldErrors);\n control.markAsTouched();\n } else {\n formErrors[FORM_ERROR_KEY] =\n formErrors[FORM_ERROR_KEY]?.concat(validationErrors[key]) || validationErrors[key];\n }\n }\n } else {\n formErrors[FORM_ERROR_KEY] = [`An error occurred on the server.`];\n }\n\n form.setErrors(formErrors);\n};\n\nexport {\n FORM_FIELD_ERROR_KEY,\n setServerSideValidationErrors\n};\n","import { Directive, ElementRef, Inject, Input, OnDestroy, OnInit } from '@angular/core';\nimport { ENTRY_VALIDATION_CONFIG, EntryValidationConfig } from './entry-validation-config.model';\nimport { AbstractControl, FormControlStatus } from '@angular/forms';\nimport { Subscription } from 'rxjs';\nimport { FORM_FIELD_ERROR_KEY } from './entry-validation';\n\n/**\n * A directive that displays configured validation messages or server side validations for given form control.\n * The messages are separated with coma(,) and displayed as _innerHTML_ value of host component.\n *\n * @example\n * ```html\n * <div entryDisplayControlValidation [control]=\"myForm.controls.firstName\">\n * </div\n * ```\n */\n@Directive({\n selector: '[entryDisplayControlValidation]'\n})\nexport class EntryDisplayControlValidationDirective implements OnInit, OnDestroy {\n /** Form control for which the validation messages are displayed for. */\n @Input() control: AbstractControl;\n\n private _controlSubscription: Subscription | undefined;\n\n constructor(\n @Inject(ENTRY_VALIDATION_CONFIG) private readonly _config: EntryValidationConfig,\n private readonly _element: ElementRef) {}\n\n ngOnInit(): void {\n this._controlSubscription = this.control.statusChanges\n .subscribe((controlStatus: FormControlStatus) => {\n if (controlStatus === 'INVALID') {\n this._element.nativeElement.innerText = this.extractValidationMessages();\n }\n });\n }\n\n ngOnDestroy(): void {\n if (this._controlSubscription) {\n this._controlSubscription.unsubscribe();\n }\n }\n\n private extractValidationMessages(): string {\n if (!this.control.errors) {\n return '';\n }\n const errorsString = this._config.validationMessages\n .map(validationMessage => this.control.errors[validationMessage.name]\n ? typeof(validationMessage.message) === 'string'\n ? validationMessage.message : validationMessage.message(this.control)\n : ''\n )\n .filter(message => message !== '')\n .join(', ');\n\n const serverErrors = this.control.errors[FORM_FIELD_ERROR_KEY];\n const serverErrorsString = serverErrors instanceof Array ? serverErrors.join(', ') : '';\n\n return [errorsString, serverErrorsString].filter(x => x !== '').join(', ');\n }\n}\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntryFormErrorsComponent } from './entry-form-errors.component';\nimport { MatInputModule } from '@angular/material/input';\nimport { EntryDisplayControlValidationDirective } from './entry-display-control-validation.directive';\nimport { FormsModule, ReactiveFormsModule } from '@angular/forms';\n\n@NgModule({\n declarations: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ],\n imports: [\n CommonModule,\n FormsModule,\n ReactiveFormsModule,\n MatInputModule\n ],\n exports: [\n EntryFormErrorsComponent,\n EntryDisplayControlValidationDirective\n ]\n})\nexport class EntryValidationModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;AAGA;;;;;;;;;AASG;MAYU,wBAAwB,CAAA;;sHAAxB,wBAAwB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,SAAA,EAAA,CAAA,CAAA;AAAxB,wBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,oBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,IAAA,EAAA,wBAAwB,EATzB,QAAA,EAAA,mBAAA,EAAA,MAAA,EAAA,EAAA,IAAA,EAAA,MAAA,EAAA,EAAA,QAAA,EAAA,EAAA,EAAA,QAAA,EAAA,CAAA;;;;;;AAMT,EAAA,CAAA,EAAA,QAAA,EAAA,IAAA,EAAA,YAAA,EAAA,CAAA,EAAA,IAAA,EAAA,WAAA,EAAA,IAAA,EAAA,EAAA,CAAA,OAAA,EAA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AAO,EAAE;wBACP,YAAY;wBACZ,WAAW;wBACX,mBAAmB;wBACnB,cAAc;AACf,qBAAA;AACD,oBAAA,OAAO,EAAE;wBACP,wBAAwB;wBACxB,sCAAsC;AACvC,qBAAA;iBACF,CAAA;;;ACtBD;;AAEG;;;;"}
@@ -1,87 +0,0 @@
1
- import { EntryButtonModule } from '@enigmatry/entry-components/button';
2
- export * from '@enigmatry/entry-components/button';
3
- import { NG_EVENT_PLUGINS, EntryCommonModule } from '@enigmatry/entry-components/common';
4
- export * from '@enigmatry/entry-components/common';
5
- import { EntryDialogModule } from '@enigmatry/entry-components/dialog';
6
- export * from '@enigmatry/entry-components/dialog';
7
- import { EntryFileInputModule } from '@enigmatry/entry-components/file-input';
8
- export * from '@enigmatry/entry-components/file-input';
9
- import { EntryPermissionService, EntryPermissionModule } from '@enigmatry/entry-components/permissions';
10
- export * from '@enigmatry/entry-components/permissions';
11
- import { EntrySearchFilterModule } from '@enigmatry/entry-components/search-filter';
12
- export * from '@enigmatry/entry-components/search-filter';
13
- import { EntrySpinnerModule } from '@enigmatry/entry-components/spinner';
14
- export * from '@enigmatry/entry-components/spinner';
15
- import { EntryValidationModule } from '@enigmatry/entry-components/validation';
16
- export * from '@enigmatry/entry-components/validation';
17
- import { EntryTableModule } from '@enigmatry/entry-components/table';
18
- export * from '@enigmatry/entry-components/table';
19
- import * as i0 from '@angular/core';
20
- import { NgModule } from '@angular/core';
21
-
22
- /**
23
- * Exports all entry components.
24
- *
25
- * Usage
26
- * import EntryComponentsModule in shared.module.ts to have access to all components, directives, pipes.
27
- * import EntryComponentsModule.forRoot() in app.module.ts to register root module providers.
28
- */
29
- class EntryComponentsModule {
30
- static forRoot(options = {}) {
31
- const permissionServiceProvider = options.permissionService
32
- ? [{ provide: EntryPermissionService, useClass: options.permissionService }]
33
- : [];
34
- const providers = [...permissionServiceProvider, ...NG_EVENT_PLUGINS];
35
- return {
36
- ngModule: EntryComponentsModule,
37
- providers
38
- };
39
- }
40
- }
41
- EntryComponentsModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryComponentsModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
42
- EntryComponentsModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.2.10", ngImport: i0, type: EntryComponentsModule, exports: [EntryButtonModule,
43
- EntryCommonModule,
44
- EntryDialogModule,
45
- EntryFileInputModule,
46
- EntryValidationModule,
47
- EntryPermissionModule,
48
- EntrySearchFilterModule,
49
- EntrySpinnerModule,
50
- EntryTableModule] });
51
- EntryComponentsModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryComponentsModule, imports: [EntryButtonModule,
52
- EntryCommonModule,
53
- EntryDialogModule,
54
- EntryFileInputModule,
55
- EntryValidationModule,
56
- EntryPermissionModule,
57
- EntrySearchFilterModule,
58
- EntrySpinnerModule,
59
- EntryTableModule] });
60
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: EntryComponentsModule, decorators: [{
61
- type: NgModule,
62
- args: [{
63
- declarations: [],
64
- exports: [
65
- EntryButtonModule,
66
- EntryCommonModule,
67
- EntryDialogModule,
68
- EntryFileInputModule,
69
- EntryValidationModule,
70
- EntryPermissionModule,
71
- EntrySearchFilterModule,
72
- EntrySpinnerModule,
73
- EntryTableModule
74
- ]
75
- }]
76
- }] });
77
-
78
- /*
79
- * Public API Surface of entry-components
80
- */
81
-
82
- /**
83
- * Generated bundle index. Do not edit.
84
- */
85
-
86
- export { EntryComponentsModule };
87
- //# sourceMappingURL=enigmatry-entry-components.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"enigmatry-entry-components.mjs","sources":["../../../../libs/entry-components/modules/entry-components.module.ts","../../../../libs/entry-components/public-api.ts","../../../../libs/entry-components/enigmatry-entry-components.ts"],"sourcesContent":["import { ModuleWithProviders, NgModule, Provider, Type } from '@angular/core';\r\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\r\nimport { EntryDialogModule } from '@enigmatry/entry-components/dialog';\r\nimport { EntryPermissionModule, EntryPermissionService } from '@enigmatry/entry-components/permissions';\r\nimport { EntrySearchFilterModule } from '@enigmatry/entry-components/search-filter';\r\nimport { EntryValidationModule } from '@enigmatry/entry-components/validation';\r\nimport { EntryFileInputModule } from '@enigmatry/entry-components/file-input';\r\nimport { EntryTableModule } from '@enigmatry/entry-components/table';\r\nimport { EntryCommonModule, NG_EVENT_PLUGINS } from '@enigmatry/entry-components/common';\r\nimport { EntrySpinnerModule } from '@enigmatry/entry-components/spinner';\r\n\r\ninterface EntryComponentsModuleOptions {\r\n permissionService?: Type<any>;\r\n}\r\n\r\n/**\r\n * Exports all entry components.\r\n *\r\n * Usage\r\n * import EntryComponentsModule in shared.module.ts to have access to all components, directives, pipes.\r\n * import EntryComponentsModule.forRoot() in app.module.ts to register root module providers.\r\n */\r\n@NgModule({\r\n declarations: [],\r\n exports: [\r\n EntryButtonModule,\r\n EntryCommonModule,\r\n EntryDialogModule,\r\n EntryFileInputModule,\r\n EntryValidationModule,\r\n EntryPermissionModule,\r\n EntrySearchFilterModule,\r\n EntrySpinnerModule,\r\n EntryTableModule\r\n ]\r\n})\r\nexport class EntryComponentsModule {\r\n static forRoot(options: EntryComponentsModuleOptions = {}): ModuleWithProviders<EntryComponentsModule> {\r\n\r\n const permissionServiceProvider: Provider[] = options.permissionService\r\n ? [{ provide: EntryPermissionService, useClass: options.permissionService }]\r\n : [];\r\n\r\n const providers: Provider[] = [...permissionServiceProvider, ...NG_EVENT_PLUGINS];\r\n return {\r\n ngModule: EntryComponentsModule,\r\n providers\r\n };\r\n }\r\n}\r\n","\n/*\n * Public API Surface of entry-components\n */\nexport * from '@enigmatry/entry-components/button';\nexport * from '@enigmatry/entry-components/common';\nexport * from '@enigmatry/entry-components/dialog';\nexport * from '@enigmatry/entry-components/file-input';\nexport * from '@enigmatry/entry-components/permissions';\nexport * from '@enigmatry/entry-components/search-filter';\nexport * from '@enigmatry/entry-components/spinner';\nexport * from '@enigmatry/entry-components/validation';\nexport * from '@enigmatry/entry-components/table';\n\nexport { EntryComponentsModule } from './modules/entry-components.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;AAeA;;;;;;AAMG;MAeU,qBAAqB,CAAA;AAChC,IAAA,OAAO,OAAO,CAAC,OAAA,GAAwC,EAAE,EAAA;AAEvD,QAAA,MAAM,yBAAyB,GAAe,OAAO,CAAC,iBAAiB;AACrE,cAAE,CAAC,EAAE,OAAO,EAAE,sBAAsB,EAAE,QAAQ,EAAE,OAAO,CAAC,iBAAiB,EAAE,CAAC;cAC1E,EAAE,CAAC;QAEP,MAAM,SAAS,GAAe,CAAC,GAAG,yBAAyB,EAAE,GAAG,gBAAgB,CAAC,CAAC;QAClF,OAAO;AACL,YAAA,QAAQ,EAAE,qBAAqB;YAC/B,SAAS;SACV,CAAC;KACH;;mHAZU,qBAAqB,EAAA,IAAA,EAAA,EAAA,EAAA,MAAA,EAAA,EAAA,CAAA,eAAA,CAAA,QAAA,EAAA,CAAA,CAAA;AAArB,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAX9B,iBAAiB;QACjB,iBAAiB;QACjB,iBAAiB;QACjB,oBAAoB;QACpB,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,kBAAkB;QAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA;AAGP,qBAAA,CAAA,IAAA,GAAA,EAAA,CAAA,mBAAA,CAAA,EAAA,UAAA,EAAA,QAAA,EAAA,OAAA,EAAA,SAAA,EAAA,QAAA,EAAA,EAAA,EAAA,IAAA,EAAA,qBAAqB,YAX9B,iBAAiB;QACjB,iBAAiB;QACjB,iBAAiB;QACjB,oBAAoB;QACpB,qBAAqB;QACrB,qBAAqB;QACrB,uBAAuB;QACvB,kBAAkB;QAClB,gBAAgB,CAAA,EAAA,CAAA,CAAA;4FAGP,qBAAqB,EAAA,UAAA,EAAA,CAAA;kBAdjC,QAAQ;AAAC,YAAA,IAAA,EAAA,CAAA;AACR,oBAAA,YAAY,EAAE,EAAE;AAChB,oBAAA,OAAO,EAAE;wBACP,iBAAiB;wBACjB,iBAAiB;wBACjB,iBAAiB;wBACjB,oBAAoB;wBACpB,qBAAqB;wBACrB,qBAAqB;wBACrB,uBAAuB;wBACvB,kBAAkB;wBAClB,gBAAgB;AACjB,qBAAA;iBACF,CAAA;;;AClCD;;AAEG;;ACHH;;AAEG;;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"enigmatry-entry-components-common.mjs","sources":["../../../../libs/entry-components/common/constants.ts","../../../../libs/entry-components/common/directives/auto-disable-button.directive.ts","../../../../libs/entry-components/common/directives/scroll-to-invalid-control.directive.ts","../../../../libs/entry-components/common/event-plugins/abstract.plugin.ts","../../../../libs/entry-components/common/event-plugins/debounce.plugin.ts","../../../../libs/entry-components/common/event-plugins/throttle.plugin.ts","../../../../libs/entry-components/common/common.module.ts","../../../../libs/entry-components/common/utils/provide-config.ts","../../../../libs/entry-components/common/interceptors/accept-language.interceptor.ts","../../../../libs/entry-components/common/date-time/entry-date-time.ts","../../../../libs/entry-components/common/date-time/entry-date-time-adapter.ts","../../../../libs/entry-components/common/enigmatry-entry-components-common.ts"],"sourcesContent":["export const NG_VALID_CLASS = '.ng-valid';\r\nexport const NG_INVALID_CLASS = '.ng-invalid';\r\n","import { Directive, ElementRef, Input, OnDestroy, OnInit } from '@angular/core';\nimport { Subject, fromEvent, timer } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\nimport { NG_VALID_CLASS } from '../constants';\nimport { NumberInput, coerceNumberProperty } from '@angular/cdk/coercion';\n\n/**\n * Auto disable button after click or submit with entry-auto-disable directive.\n * Directive is applied to 'button[entry-auto-disable]:not([disabled])'\n * Default auto disable interval is 2000ms (2sec)\n *\n * Usage\n * <button mat-button entry-submit-button entry-auto-disable type=\"submit\">Submit</button>\n * or with auto disabled interval in milliseconds\n * <button mat-button entry-submit-button entry-auto-disable=\"5000\" type=\"submit\">Submit</button>\n */\n@Directive({\n standalone: true,\n // eslint-disable-next-line @angular-eslint/directive-selector\n selector: 'button[entry-auto-disable]:not([disabled])'\n})\nexport class AutoDisableButtonDirective implements OnInit, OnDestroy {\n\n private _destroy$ = new Subject<void>();\n private _disableIntervalInMs = 2000;\n\n constructor(private elementRef: ElementRef<HTMLButtonElement>) { }\n\n @Input('entry-auto-disable')\n get disableIntervalInMs() {\n return this._disableIntervalInMs;\n }\n set disableIntervalInMs(value: NumberInput) {\n this._disableIntervalInMs = coerceNumberProperty(value, 2000);\n }\n\n ngOnInit(): void {\n const button = this.elementRef.nativeElement;\n const isTypeSubmit = button.getAttribute('type') === 'submit';\n const form: HTMLFormElement = button.closest('form');\n\n if (isTypeSubmit && form) {\n // listen to form submit event\n fromEvent(form, 'submit')\n .pipe(takeUntil(this._destroy$))\n .subscribe(_ => {\n if (form.matches(NG_VALID_CLASS)) {\n this.disableButton(this._disableIntervalInMs);\n }\n });\n } else {\n // otherwise listen to click event\n fromEvent(button, 'click')\n .pipe(takeUntil(this._destroy$))\n .subscribe(_ => this.disableButton(this._disableIntervalInMs));\n }\n }\n\n ngOnDestroy(): void {\n this._destroy$.next();\n this._destroy$.complete();\n }\n\n private disableButton(disablePeriodInMs: number): void {\n const button = this.elementRef.nativeElement;\n\n button.disabled = true;\n\n timer(disablePeriodInMs)\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => button.disabled = false);\n }\n}\n","import { Directive, ElementRef, OnDestroy, OnInit, Self } from '@angular/core';\r\nimport { ControlContainer } from '@angular/forms';\r\nimport { Subject, fromEvent } from 'rxjs';\r\nimport { takeUntil } from 'rxjs/operators';\r\nimport { NG_INVALID_CLASS } from '../constants';\r\n\r\n/**\r\n * Scroll to first invalid control when form is submitted.\r\n * Directive is applied to 'form[formGroup],form[ngForm]' (reactive or template driven forms)\r\n */\r\n@Directive({\r\n standalone: true,\r\n selector: 'form[formGroup],form[ngForm]'\r\n})\r\nexport class ScrollToInvalidControlDirective implements OnInit, OnDestroy {\r\n\r\n private destroy$ = new Subject<void>();\r\n\r\n constructor(\r\n @Self() private form: ControlContainer,\r\n private elementRef: ElementRef<HTMLFormElement>) { }\r\n\r\n ngOnInit(): void {\r\n fromEvent(this.elementRef.nativeElement, 'submit')\r\n .pipe(takeUntil(this.destroy$))\r\n .subscribe(_ => {\r\n if (this.form.invalid) {\r\n this.scrollToInvalidControl();\r\n }\r\n });\r\n }\r\n\r\n ngOnDestroy(): void {\r\n this.destroy$.next();\r\n this.destroy$.complete();\r\n }\r\n\r\n private scrollToInvalidControl() {\r\n const firstInvalidControl: HTMLElement =\r\n this.elementRef.nativeElement.querySelector(NG_INVALID_CLASS);\r\n\r\n if (firstInvalidControl) {\r\n firstInvalidControl.scrollIntoView({\r\n behavior: 'smooth',\r\n block: 'center' // vertical alignment\r\n });\r\n }\r\n }\r\n}\r\n","import { EventManager } from '@angular/platform-browser';\r\n\r\n/**\r\n * abstract class EventManagerPlugin will be exposed in the public api\r\n * https://github.com/angular/angular/pull/49969\r\n *\r\n * Until then creating it from reference\r\n * https://github.com/angular/angular/blob/main/packages/platform-browser/src/dom/events/event_manager.ts#L93\r\n *\r\n * How to create custom event modifiers\r\n * https://github.com/Tinkoff/ng-event-plugins,\r\n * https://github.com/angular/angular/blob/main/packages/platform-browser/src/dom/events/key_events.ts\r\n * https://netbasal.com/lifting-the-veil-insights-into-angulars-eventmanagerplugin-ed9d14cbb31a\r\n */\r\nexport abstract class EventManagerPlugin {\r\n\r\n // Using non-null assertion because it's set by EventManager's constructor\r\n manager!: EventManager;\r\n\r\n /** Should return `true` for every event name that should be supported by this plugin */\r\n abstract supports(eventName: string): boolean;\r\n\r\n /**\r\n * Registers a handler for a specific element and event.\r\n *\r\n * @param element The HTML element to receive event notifications.\r\n * @param eventName The name of the event to listen for.\r\n * @param handler A function to call when the notification occurs. Receives the\r\n * event object as an argument.\r\n * @returns A callback function that can be used to remove the handler.\r\n */\r\n // eslint-disable-next-line @typescript-eslint/ban-types\r\n abstract addEventListener(element: HTMLElement, eventName: string, handler: Function): Function;\r\n}\r\n\r\n/**\r\n * Entry event plugin base class\r\n */\r\nexport abstract class EntryEventManagerPlugin extends EventManagerPlugin {\r\n abstract modifier: string;\r\n\r\n /** return `true` for every event name that has specified modifier */\r\n supports(eventName: string): boolean {\r\n return eventName.includes(this.modifier);\r\n }\r\n\r\n /** unwrap params e.g. (click.debounce.500) => ['debounce', 500] */\r\n unwrapParams(eventName: string): string[] {\r\n return eventName\r\n .substring(eventName.indexOf(this.modifier))\r\n .split('.')\r\n .filter(x => !!x);\r\n }\r\n\r\n /** get event name e.g. (click.debounce.500) => click */\r\n unwrapEventName(eventName: string): string {\r\n return eventName.substring(0, eventName.indexOf(this.modifier));\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { Injectable } from '@angular/core';\r\nimport { EntryEventManagerPlugin } from './abstract.plugin';\r\nimport { debounce } from 'lodash-es';\r\n\r\n/**\r\n * Provides event plugin for debouncing events.\r\n *\r\n * How to use:\r\n * <button (click.debounce)=\"doSomething($event)\">\r\n * <input (keyup.debounce.500)=\"doSomething($event)\">\r\n */\r\n@Injectable()\r\nexport class DebounceEventPlugin extends EntryEventManagerPlugin {\r\n\r\n modifier = '.debounce';\r\n\r\n addEventListener(element: HTMLElement, eventName: string, originalHandler: Function): Function {\r\n // e.g. (click.debounce.500)\r\n const [_modifier, milliseconds = 500, option = 'leading'] = this.unwrapParams(eventName);\r\n\r\n // run original handler inside ngZone in which the event occurred\r\n const innerHandler = (event: any) => this.manager.getZone().runGuarded(() => originalHandler(event));\r\n\r\n // create debounced handler\r\n const debouncedHandler = debounce(innerHandler, milliseconds,\r\n { leading: option === 'leading', trailing: option === 'trailing' });\r\n\r\n // register event with debounced handler\r\n return this.manager.addEventListener(element, this.unwrapEventName(eventName), debouncedHandler);\r\n }\r\n}\r\n","/* eslint-disable @typescript-eslint/ban-types */\r\nimport { Injectable } from '@angular/core';\r\nimport { EntryEventManagerPlugin } from './abstract.plugin';\r\nimport { throttle } from 'lodash-es';\r\n\r\n/**\r\n * Provides event plugin for throttling events.\r\n *\r\n * How to use:\r\n * <button (click.throttle)=\"doSomething($event)\">\r\n * <input (keyup.throttle.500)=\"doSomething($event)\">\r\n */\r\n@Injectable()\r\nexport class ThrottleEventPlugin extends EntryEventManagerPlugin {\r\n\r\n modifier = '.throttle';\r\n\r\n addEventListener(element: HTMLElement, eventName: string, originalHandler: Function): Function {\r\n // e.g. (keyup.throttle.500)\r\n const [_modifier, milliseconds = 500] = this.unwrapParams(eventName);\r\n\r\n // run original handler inside ngZone in which the event occurred\r\n const innerHandler = (event: any) => this.manager.getZone().runGuarded(() => originalHandler(event));\r\n\r\n // create throttled handler\r\n const throttledHandler = throttle(innerHandler, milliseconds);\r\n\r\n // register event with throttled handler\r\n return this.manager.addEventListener(element, this.unwrapEventName(eventName), throttledHandler);\r\n }\r\n}\r\n","import { ModuleWithProviders, NgModule, Provider } from '@angular/core';\nimport { CommonModule } from '@angular/common';\r\n\r\n/** Directives */\r\n\r\nimport { AutoDisableButtonDirective } from './directives/auto-disable-button.directive';\r\nimport { ScrollToInvalidControlDirective } from './directives/scroll-to-invalid-control.directive';\r\n\r\nconst DIRECTIVES = [\r\n AutoDisableButtonDirective,\r\n ScrollToInvalidControlDirective,\r\n];\r\n\r\n/** Event plugins */\n\nimport { DebounceEventPlugin } from './event-plugins/debounce.plugin';\nimport { ThrottleEventPlugin } from './event-plugins/throttle.plugin';\nimport { EVENT_MANAGER_PLUGINS } from '@angular/platform-browser';\n\nconst EVENT_PLUGINS = [\n DebounceEventPlugin,\n ThrottleEventPlugin\n];\n\nexport const NG_EVENT_PLUGINS: Provider[] = EVENT_PLUGINS.map(useClass => ({\n provide: EVENT_MANAGER_PLUGINS,\n multi: true,\n useClass\n}));\n\n\n@NgModule({\r\n declarations: [\r\n ],\r\n imports: [\r\n CommonModule,\r\n DIRECTIVES\r\n ],\r\n exports: [\r\n DIRECTIVES\r\n ]\r\n})\r\nexport class EntryCommonModule {\r\n static forRoot(): ModuleWithProviders<EntryCommonModule> {\n return {\n ngModule: EntryCommonModule,\n providers: NG_EVENT_PLUGINS\n };\n }\n}\r\n","import { InjectionToken, Provider } from '@angular/core';\r\n\r\nexport function createInjectionToken<T>(defaultValue: T): InjectionToken<T> {\r\n return new InjectionToken<T>(defaultValue.constructor.name,\r\n {\r\n providedIn: 'root',\r\n factory: () => defaultValue\r\n }\r\n );\r\n}\r\n\r\nexport function provideConfig<T>(token: InjectionToken<T>, factory: () => T): Provider {\r\n return {\r\n provide: token,\r\n useFactory: factory\r\n };\r\n}\r\n","import { Injectable, LOCALE_ID, inject } from '@angular/core';\nimport {\n HttpRequest,\n HttpHandler,\n HttpEvent,\n HttpInterceptor\n} from '@angular/common/http';\nimport { Observable } from 'rxjs';\n\n/**\n * Sets the Accept-Language HTTP request header using the value from LOCALE_ID.\n */\n@Injectable()\nexport class AcceptLanguageInterceptor implements HttpInterceptor {\n private localeId = inject(LOCALE_ID);\n\n intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {\n const newRequest = request.clone({\n headers: request.headers.set('Accept-Language', this.localeId)\n });\n return next.handle(newRequest);\n }\n}\n","import { InjectionToken } from '@angular/core';\nimport { MatDateFormats } from '@angular/material/core';\n\nexport declare type EntryMatDateTime<D> = {\n matDateFormats: MatDateFormats;\n compareDate(first: D, second: D): number;\n};\n\nexport const ENTRY_MAT_DATE_TIME = new InjectionToken<EntryMatDateTime<any>>('');\n","import { Inject, Injectable, Optional, SkipSelf, inject } from '@angular/core';\nimport { DateAdapter, MAT_DATE_LOCALE } from '@angular/material/core';\nimport { ENTRY_MAT_DATE_TIME, EntryMatDateTime } from './entry-date-time';\n\n/**\n * Extends provided DateAdapter with date time support\n */\n@Injectable()\nexport class EntryDateTimeAdapter<D, L> extends DateAdapter<D, L> {\n private compareFunction: (first: D, second: D) => number;\n\n constructor(@Optional() @Inject(MAT_DATE_LOCALE) matDateLocale: L,\n @Inject(ENTRY_MAT_DATE_TIME) entryMatDateTime: EntryMatDateTime<D>,\n @SkipSelf() private dateAdapter: DateAdapter<D, L>) {\n super();\n this.compareFunction = entryMatDateTime.compareDate;\n this.dateAdapter.setLocale(matDateLocale);\n }\n\n getYear(date: D): number {\n return this.dateAdapter.getYear(date);\n }\n\n getMonth(date: D): number {\n return this.dateAdapter.getMonth(date);\n }\n\n getDate(date: D): number {\n return this.dateAdapter.getDate(date);\n }\n\n getDayOfWeek(date: D): number {\n return this.dateAdapter.getDayOfWeek(date);\n }\n\n getMonthNames(style: 'long' | 'short' | 'narrow'): string[] {\n return this.dateAdapter.getMonthNames(style);\n }\n\n getDateNames(): string[] {\n return this.dateAdapter.getDateNames();\n }\n\n getDayOfWeekNames(style: 'long' | 'short' | 'narrow'): string[] {\n return this.dateAdapter.getDayOfWeekNames(style);\n }\n\n getYearName(date: D): string {\n return this.dateAdapter.getYearName(date);\n }\n\n getFirstDayOfWeek(): number {\n return this.dateAdapter.getFirstDayOfWeek();\n }\n\n getNumDaysInMonth(date: D): number {\n return this.dateAdapter.getNumDaysInMonth(date);\n }\n\n clone(date: D): D {\n return this.dateAdapter.clone(date);\n }\n\n createDate(year: number, month: number, date: number): D {\n return this.dateAdapter.createDate(year, month, date);\n }\n\n today(): D {\n return this.dateAdapter.today();\n }\n\n parse(value: any, parseFormat: any): D {\n return this.dateAdapter.parse(value, parseFormat);\n }\n\n format(date: D, displayFormat: any): string {\n return this.dateAdapter.format(date, displayFormat);\n }\n\n addCalendarYears(date: D, years: number): D {\n return this.dateAdapter.addCalendarYears(date, years);\n }\n\n addCalendarMonths(date: D, months: number): D {\n return this.dateAdapter.addCalendarMonths(date, months);\n }\n\n addCalendarDays(date: D, days: number): D {\n return this.dateAdapter.addCalendarDays(date, days);\n }\n\n toIso8601(date: D): string {\n return this.dateAdapter.toIso8601(date);\n }\n\n isDateInstance(obj: any): boolean {\n return this.dateAdapter.isDateInstance(obj);\n }\n\n isValid(date: D): boolean {\n return this.dateAdapter.isValid(date);\n }\n\n invalid(): D {\n return this.dateAdapter.invalid();\n }\n\n override compareDate(first: D, second: D): number {\n return this.compareFunction(first, second);\n }\n}\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["i1"],"mappings":";;;;;;;;;;;;AAAO,MAAM,cAAc,GAAG,WAAW,CAAC;AACnC,MAAM,gBAAgB,GAAG,aAAa;;ACK7C;;;;;;;;;AASG;MAMU,0BAA0B,CAAA;AAKrC,IAAA,WAAA,CAAoB,UAAyC,EAAA;QAAzC,IAAU,CAAA,UAAA,GAAV,UAAU,CAA+B;AAHrD,QAAA,IAAA,CAAA,SAAS,GAAG,IAAI,OAAO,EAAQ,CAAC;QAChC,IAAoB,CAAA,oBAAA,GAAG,IAAI,CAAC;KAE8B;AAElE,IAAA,IACI,mBAAmB,GAAA;QACrB,OAAO,IAAI,CAAC,oBAAoB,CAAC;KAClC;IACD,IAAI,mBAAmB,CAAC,KAAkB,EAAA;QACxC,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;KAC/D;IAED,QAAQ,GAAA;AACN,QAAA,MAAM,MAAM,GAAG,IAAI,CAAC,UAAU,CAAC,aAAa,CAAC;QAC7C,MAAM,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,CAAC,KAAK,QAAQ,CAAC;QAC9D,MAAM,IAAI,GAAoB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC;QAErD,IAAI,YAAY,IAAI,IAAI,EAAE;;AAExB,YAAA,SAAS,CAAC,IAAI,EAAE,QAAQ,CAAC;AACtB,iBAAA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;;;"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"enigmatry-entry-components-file-input.mjs","sources":["../../../../libs/entry-components/file-input/entry-file-input.component.ts","../../../../libs/entry-components/file-input/entry-file-input.component.html","../../../../libs/entry-components/file-input/entry-file-input.module.ts","../../../../libs/entry-components/file-input/enigmatry-entry-components-file-input.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/member-ordering */\nimport { BooleanInput, coerceBooleanProperty } from '@angular/cdk/coercion';\nimport {\n ChangeDetectionStrategy,\n Component, ElementRef, EventEmitter, Input, NgZone,\n OnDestroy, OnInit, Output, Renderer2, ViewChild, forwardRef\n} from '@angular/core';\nimport {\n AbstractControl, ControlValueAccessor, NG_VALIDATORS,\n NG_VALUE_ACCESSOR, ValidationErrors, Validator\n} from '@angular/forms';\nimport { Subject, fromEvent } from 'rxjs';\nimport { takeUntil } from 'rxjs/operators';\n\nconst providers = [\n {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => EntryFileInputComponent),\n multi: true\n },\n {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => EntryFileInputComponent),\n multi: true\n }\n];\n\n@Component({\n selector: 'entry-file-input',\n templateUrl: './entry-file-input.component.html',\n styleUrls: ['./entry-file-input.component.scss'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n providers\n})\nexport class EntryFileInputComponent implements OnInit, OnDestroy, ControlValueAccessor, Validator {\n\n /**\n * Label for the select file button. Defaults to 'Choose file...'\n */\n @Input() label = 'Choose file...';\n\n /**\n * MatIcon for the select file button. Defaults to 'insert_drive_file' (optional)\n */\n @Input() matIcon?= 'insert_drive_file';\n\n /**\n * Same as 'accept' attribute in <input/> element.\n */\n @Input() accept?: string;\n\n /**\n * Same as 'multiple' attribute in <input/> element.\n */\n @Input()\n set multiple(multiple: BooleanInput) {\n this._multiple = coerceBooleanProperty(multiple);\n }\n get multiple(): boolean {\n return this._multiple;\n }\n private _multiple = false;\n\n /**\n * Same as 'disabled' attribute in <input/> element.\n */\n @Input()\n set disabled(disabled: BooleanInput) {\n this._disabled = coerceBooleanProperty(disabled);\n }\n get disabled(): boolean {\n return this._disabled;\n }\n private _disabled = false;\n\n /**\n * Same as 'readonly' attribute in <input/> element.\n */\n @Input()\n set readonly(readonly: BooleanInput) {\n this._readonly = coerceBooleanProperty(readonly);\n }\n get readonly(): boolean {\n return this._readonly;\n }\n private _readonly = false;\n\n /**\n * Size limit per file in KB (kilobytes)\n */\n @Input() maxFileSizeInKb?: number = undefined;\n\n /**\n * Number of files allowed when multiple=true\n */\n @Input() maxFileCount?: number = undefined;\n\n /**\n * Current selected [File | FileList] object.\n */\n value: File | FileList | undefined;\n\n /**\n * Event emitted when a file is selected. Emits a [File | FileList] object.\n */\n @Output() selectedFile = new EventEmitter<File | FileList>();\n\n\n @ViewChild('fileButton', { static: true, read: ElementRef })\n _fileButton!: ElementRef<HTMLElement>;\n\n @ViewChild('fileInput', { static: true })\n _fileInput!: ElementRef<HTMLInputElement>;\n\n private _destroy$ = new Subject<void>();\n\n constructor(\n private readonly _ngZone: NgZone,\n private readonly _renderer: Renderer2) {\n }\n\n get fileNames(): string {\n if (this.value instanceof File) {\n return this.value.name;\n }\n if (this.value instanceof FileList) {\n return `${this.value.length} files`;\n }\n return '';\n }\n\n ngOnInit(): void {\n // Handle click event on custom file button and trigger click on native file input\n this._ngZone.runOutsideAngular(() => {\n fromEvent(this._fileButton.nativeElement, 'click')\n .pipe(takeUntil(this._destroy$))\n .subscribe(() => {\n this._fileInput.nativeElement.click();\n });\n });\n }\n\n ngOnDestroy(): void {\n this._destroy$.next();\n }\n\n onFileSelect(event: Event): void {\n const fileInputEl = event.target as HTMLInputElement;\n const files: FileList = fileInputEl.files;\n\n const value = this._multiple\n ? files?.length > 1 ? files : files[0]\n : files[0];\n\n this.value = value;\n this.onChange(value);\n this.onTouched();\n\n if (value) {\n this.selectedFile.emit(value);\n }\n }\n\n clear(): void {\n this.value = undefined;\n this.onChange(undefined);\n this._renderer.setProperty(this._fileInput.nativeElement, 'value', '');\n }\n\n // implements ControlValueAccessor interface\n\n onChange = (_: any) => { };\n\n onTouched = () => { };\n\n writeValue(value: any): void {\n this.value = value;\n }\n\n registerOnChange(fn: any): void {\n this.onChange = fn;\n }\n\n registerOnTouched(fn: any): void {\n this.onTouched = fn;\n }\n\n setDisabledState?(isDisabled: boolean): void {\n this._disabled = isDisabled;\n }\n\n // implements Validator interface\n\n validate(control: AbstractControl<File | FileList | undefined>): ValidationErrors {\n const isSizeLimitExceeded = this.isFileSizeLimitExceeded(control.value);\n const isCountLimitExceeded = this.isFileCountLimitExceeded(control.value);\n\n if (!isSizeLimitExceeded && !isCountLimitExceeded) {\n return null;\n }\n return {\n ...(isSizeLimitExceeded ? { maxFileSize: true } : {}),\n ...(isCountLimitExceeded ? { maxFileCount: true } : {})\n };\n }\n\n private isFileCountLimitExceeded(files: File | FileList): boolean {\n const isMultiple = this.multiple && files instanceof FileList;\n const maxFileCount = this.maxFileCount;\n const actualFileCount = (files as FileList)?.length;\n\n return isMultiple && maxFileCount && actualFileCount > maxFileCount;\n }\n\n private isFileSizeLimitExceeded(files: File | FileList): boolean {\n if (!this.maxFileSizeInKb) {\n return false;\n }\n const maxFileSizeInBytes = this.maxFileSizeInKb * 1024;\n\n if (files instanceof File) {\n return files.size > maxFileSizeInBytes;\n }\n if (files instanceof FileList) {\n return Array.from(files).some(file => file.size > maxFileSizeInBytes);\n }\n return false;\n }\n}\n","<button \r\n #fileButton \r\n mat-button \r\n entry-submit-button \r\n type=\"button\" \r\n [disabled]=\"disabled || readonly\">\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/>","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { EntryFileInputComponent } from './entry-file-input.component';\nimport { MatIconModule } from '@angular/material/icon';\nimport { MatButtonModule } from '@angular/material/button';\nimport { FormsModule } from '@angular/forms';\nimport { EntryButtonModule } from '@enigmatry/entry-components/button';\n\n@NgModule({\n declarations: [\n EntryFileInputComponent\n ],\n imports: [\n CommonModule,\n FormsModule,\n MatIconModule,\n MatButtonModule,\n EntryButtonModule\n ],\n exports: [\n EntryFileInputComponent\n ]\n})\nexport class EntryFileInputModule { }\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;AAcA,MAAM,SAAS,GAAG;AAChB,IAAA;AACE,QAAA,OAAO,EAAE,iBAAiB;AAC1B,QAAA,WAAW,EAAE,UAAU,CAAC,MAAM,uBAAuB,CAAC;AACtD,QAAA,KAAK,EAAE,IAAI;AACZ,KAAA;AACD,IAAA;AACE,QAAA,OAAO,EAAE,aAAa;AACtB,QAAA,WAAW,EAAE,UAAU,CAAC,MAAM,uBAAuB,CAAC;AACtD,QAAA,KAAK,EAAE,IAAI;AACZ,KAAA;CACF,CAAC;MASW,uBAAuB,CAAA;AAiBlC;;AAEG;IACH,IACI,QAAQ,CAAC,QAAsB,EAAA;AACjC,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;KAClD;AACD,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;AAGD;;AAEG;IACH,IACI,QAAQ,CAAC,QAAsB,EAAA;AACjC,QAAA,IAAI,CAAC,SAAS,GAAG,qBAAqB,CAAC,QAAQ,CAAC,CAAC;KAClD;AACD,IAAA,IAAI,QAAQ,GAAA;QACV,OAAO,IAAI,CAAC,SAAS,CAAC;KACvB;AAGD;;AAEG;IACH,IACI,QAAQ,CAAC,QAAsB,EAAA;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