@ferhaps/easy-ui-lib 0.0.7 → 1.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 (58) hide show
  1. package/README.md +41 -22
  2. package/ng-package.json +7 -0
  3. package/package.json +26 -44
  4. package/src/lib/components/default-dialog/default-dialog.component.html +19 -0
  5. package/src/lib/components/default-dialog/default-dialog.component.scss +41 -0
  6. package/src/lib/components/default-dialog/default-dialog.component.ts +23 -0
  7. package/src/lib/components/error-dispaly.component.ts +48 -0
  8. package/src/lib/components/error-handler/error-handler.component.html +0 -0
  9. package/src/lib/components/error-handler/error-handler.component.scss +0 -0
  10. package/src/lib/components/error-handler/error-handler.component.ts +44 -0
  11. package/src/lib/components/error-handler/error-popup/error-popup.component.html +13 -0
  12. package/src/lib/components/error-handler/error-popup/error-popup.component.scss +19 -0
  13. package/src/lib/components/error-handler/error-popup/error-popup.component.ts +21 -0
  14. package/src/lib/components/global-loader/global-loader.component.html +5 -0
  15. package/src/lib/components/global-loader/global-loader.component.scss +12 -0
  16. package/src/lib/components/global-loader/global-loader.component.ts +17 -0
  17. package/src/lib/components/search-bar.component.ts +70 -0
  18. package/src/lib/components/table/table.component.html +121 -0
  19. package/src/lib/components/table/table.component.scss +116 -0
  20. package/src/lib/components/table/table.component.ts +105 -0
  21. package/src/lib/components/table-sort-header/table-sort-header.component.html +7 -0
  22. package/src/lib/components/table-sort-header/table-sort-header.component.scss +17 -0
  23. package/src/lib/components/table-sort-header/table-sort-header.component.ts +31 -0
  24. package/src/lib/directives/fields-match-validator.directive.ts +35 -0
  25. package/src/lib/directives/password-validator.directive.ts +26 -0
  26. package/src/lib/directives/phone-validation.directive.ts +24 -0
  27. package/src/lib/pipes/blank-filler.pipe.ts +13 -0
  28. package/src/lib/pipes/snake-case-parser.pipe.ts +17 -0
  29. package/src/lib/services/error.service.ts +15 -0
  30. package/src/lib/services/loader.service.ts +14 -0
  31. package/src/lib/utils/animations.ts +29 -0
  32. package/{lib/utils/types.d.ts → src/lib/utils/types.ts} +3 -2
  33. package/src/lib/utils/utils.ts +65 -0
  34. package/{public-api.d.ts → src/public-api.ts} +20 -17
  35. package/tsconfig.lib.json +14 -0
  36. package/tsconfig.lib.prod.json +10 -0
  37. package/tsconfig.spec.json +14 -0
  38. package/fesm2022/ferhaps-easy-ui-lib.mjs +0 -862
  39. package/fesm2022/ferhaps-easy-ui-lib.mjs.map +0 -1
  40. package/index.d.ts +0 -5
  41. package/lib/components/chip/chip.component.d.ts +0 -16
  42. package/lib/components/default-dialog/default-dialog.component.d.ts +0 -19
  43. package/lib/components/error-dispaly.component.d.ts +0 -17
  44. package/lib/components/error-handler/error-handler.component.d.ts +0 -18
  45. package/lib/components/error-handler/error-popup/error-popup.component.d.ts +0 -17
  46. package/lib/components/global-loader/global-loader.component.d.ts +0 -14
  47. package/lib/components/search-bar.component.d.ts +0 -18
  48. package/lib/components/table/table.component.d.ts +0 -58
  49. package/lib/components/table-sort-header/table-sort-header.component.d.ts +0 -17
  50. package/lib/directives/fields-match-validator.directive.d.ts +0 -16
  51. package/lib/directives/password-validator.directive.d.ts +0 -13
  52. package/lib/directives/phone-validation.directive.d.ts +0 -13
  53. package/lib/pipes/blank-filler.pipe.d.ts +0 -13
  54. package/lib/pipes/snake-case-parser.pipe.d.ts +0 -13
  55. package/lib/services/error.service.d.ts +0 -9
  56. package/lib/services/loader.service.d.ts +0 -8
  57. package/lib/utils/animations.d.ts +0 -3
  58. package/lib/utils/utils.d.ts +0 -1
@@ -1,862 +0,0 @@
1
- import * as i1 from '@angular/common';
2
- import { CommonModule } from '@angular/common';
3
- import * as i0 from '@angular/core';
4
- import { Pipe, NgModule, input, Directive, HostListener, output, Component, Input, viewChild, Injectable, inject, Inject } from '@angular/core';
5
- import * as i2 from '@angular/forms';
6
- import { NG_VALIDATORS, FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
7
- import * as i1$1 from '@angular/material/icon';
8
- import { MatIconModule } from '@angular/material/icon';
9
- import * as i3 from '@angular/material/dialog';
10
- import { MatDialogModule, MAT_DIALOG_DATA, MatDialog } from '@angular/material/dialog';
11
- import * as i3$2 from '@angular/common/http';
12
- import { HttpErrorResponse } from '@angular/common/http';
13
- import { debounceTime, distinctUntilChanged, BehaviorSubject, Subject, Subscription } from 'rxjs';
14
- import { trigger, transition, style, animate, state } from '@angular/animations';
15
- import * as i1$2 from '@angular/material/menu';
16
- import { MatMenuModule } from '@angular/material/menu';
17
- import * as i3$1 from '@angular/material/button';
18
- import { MatButtonModule } from '@angular/material/button';
19
- import * as i5 from '@angular/cdk/drag-drop';
20
- import { moveItemInArray, DragDropModule } from '@angular/cdk/drag-drop';
21
- import * as i1$3 from '@angular/material/progress-spinner';
22
- import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
23
- import { NoopScrollStrategy } from '@angular/cdk/overlay';
24
-
25
- class WhiteSpaceFillerPipe {
26
- transform(value, fillWith = '-') {
27
- if (value === 0) {
28
- return '0';
29
- }
30
- return value ? value : fillWith;
31
- }
32
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WhiteSpaceFillerPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
33
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: WhiteSpaceFillerPipe, isStandalone: false, name: "blankFiller" }); }
34
- }
35
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WhiteSpaceFillerPipe, decorators: [{
36
- type: Pipe,
37
- args: [{
38
- standalone: false,
39
- name: 'blankFiller',
40
- }]
41
- }] });
42
- class WhiteSpaceFillerModule {
43
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WhiteSpaceFillerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
44
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: WhiteSpaceFillerModule, declarations: [WhiteSpaceFillerPipe], imports: [CommonModule], exports: [WhiteSpaceFillerPipe] }); }
45
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WhiteSpaceFillerModule, imports: [CommonModule] }); }
46
- }
47
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: WhiteSpaceFillerModule, decorators: [{
48
- type: NgModule,
49
- args: [{
50
- declarations: [
51
- WhiteSpaceFillerPipe
52
- ],
53
- imports: [
54
- CommonModule,
55
- ],
56
- exports: [
57
- WhiteSpaceFillerPipe
58
- ]
59
- }]
60
- }] });
61
-
62
- class SnakeCaseParserPipe {
63
- transform(str) {
64
- if (str) {
65
- let temp = str.split('_').map(word => {
66
- return word.toLowerCase();
67
- }).join(' ');
68
- return temp.charAt(0).toUpperCase() + temp.slice(1);
69
- }
70
- return '';
71
- }
72
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SnakeCaseParserPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
73
- static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: SnakeCaseParserPipe, isStandalone: false, name: "snakeCaseParser" }); }
74
- }
75
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SnakeCaseParserPipe, decorators: [{
76
- type: Pipe,
77
- args: [{
78
- standalone: false,
79
- name: 'snakeCaseParser',
80
- }]
81
- }] });
82
- class SnakeCaseParserModule {
83
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SnakeCaseParserModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
84
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: SnakeCaseParserModule, declarations: [SnakeCaseParserPipe], imports: [CommonModule], exports: [SnakeCaseParserPipe] }); }
85
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SnakeCaseParserModule, imports: [CommonModule] }); }
86
- }
87
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SnakeCaseParserModule, decorators: [{
88
- type: NgModule,
89
- args: [{
90
- declarations: [
91
- SnakeCaseParserPipe
92
- ],
93
- imports: [
94
- CommonModule,
95
- ],
96
- exports: [
97
- SnakeCaseParserPipe
98
- ]
99
- }]
100
- }] });
101
-
102
- class FieldsMatchValidatorDirective {
103
- constructor() {
104
- this.fieldToMatch = input.required();
105
- }
106
- validate(control) {
107
- const value = control.value;
108
- if (!value) {
109
- return null;
110
- }
111
- const matchingControl = control.root.get(this.fieldToMatch());
112
- if (!matchingControl) {
113
- return null;
114
- }
115
- if (value !== matchingControl.value) {
116
- return { mismatch: true };
117
- }
118
- return null;
119
- }
120
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: FieldsMatchValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
121
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "19.0.6", type: FieldsMatchValidatorDirective, isStandalone: false, selector: "[libFieldsMatchValidator]", inputs: { fieldToMatch: { classPropertyName: "fieldToMatch", publicName: "fieldToMatch", isSignal: true, isRequired: true, transformFunction: null } }, providers: [
122
- {
123
- provide: NG_VALIDATORS,
124
- useExisting: FieldsMatchValidatorDirective,
125
- multi: true,
126
- },
127
- ], ngImport: i0 }); }
128
- }
129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: FieldsMatchValidatorDirective, decorators: [{
130
- type: Directive,
131
- args: [{
132
- standalone: false,
133
- selector: '[libFieldsMatchValidator]',
134
- providers: [
135
- {
136
- provide: NG_VALIDATORS,
137
- useExisting: FieldsMatchValidatorDirective,
138
- multi: true,
139
- },
140
- ],
141
- }]
142
- }] });
143
- class FieldsMatchModule {
144
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: FieldsMatchModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
145
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: FieldsMatchModule, declarations: [FieldsMatchValidatorDirective], imports: [CommonModule], exports: [FieldsMatchValidatorDirective] }); }
146
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: FieldsMatchModule, imports: [CommonModule] }); }
147
- }
148
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: FieldsMatchModule, decorators: [{
149
- type: NgModule,
150
- args: [{
151
- declarations: [
152
- FieldsMatchValidatorDirective
153
- ],
154
- imports: [
155
- CommonModule,
156
- ],
157
- exports: [
158
- FieldsMatchValidatorDirective
159
- ]
160
- }]
161
- }] });
162
-
163
- class PhoneValidatorDirective {
164
- onInput(event) {
165
- const input = event.target;
166
- if (!input.value.includes('+')) {
167
- input.value = `+${input.value}`;
168
- }
169
- const regex = /^[0-9+]*$/;
170
- if (!regex.test(input.value)) {
171
- input.value = input.value.replace(/[^0-9+]/g, '');
172
- }
173
- }
174
- onKeyDown(event) {
175
- const inputValue = event.target.value;
176
- if (event.key === 'Backspace' && inputValue === '+') {
177
- event.preventDefault();
178
- }
179
- }
180
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PhoneValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
181
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: PhoneValidatorDirective, isStandalone: false, selector: "[libPhoneValidation]", host: { listeners: { "input": "onInput($event)", "keydown": "onKeyDown($event)" } }, ngImport: i0 }); }
182
- }
183
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PhoneValidatorDirective, decorators: [{
184
- type: Directive,
185
- args: [{
186
- standalone: false,
187
- selector: '[libPhoneValidation]',
188
- }]
189
- }], propDecorators: { onInput: [{
190
- type: HostListener,
191
- args: ['input', ['$event']]
192
- }], onKeyDown: [{
193
- type: HostListener,
194
- args: ['keydown', ['$event']]
195
- }] } });
196
- class PhoneValidationDirective {
197
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PhoneValidationDirective, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
198
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: PhoneValidationDirective, declarations: [PhoneValidatorDirective], imports: [CommonModule], exports: [PhoneValidatorDirective] }); }
199
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PhoneValidationDirective, imports: [CommonModule] }); }
200
- }
201
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PhoneValidationDirective, decorators: [{
202
- type: NgModule,
203
- args: [{
204
- declarations: [
205
- PhoneValidatorDirective
206
- ],
207
- imports: [
208
- CommonModule,
209
- ],
210
- exports: [
211
- PhoneValidatorDirective
212
- ]
213
- }]
214
- }] });
215
-
216
- class PasswordValidatorDirective {
217
- validate(control) {
218
- const password = control.value;
219
- const pattern = /^(?=.*[A-Z])(?=.*[!@#\$%\^&\*])(?=.*\d)/;
220
- if (password && !pattern.test(password)) {
221
- return { passwordInvalid: true };
222
- }
223
- return null;
224
- }
225
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PasswordValidatorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
226
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.6", type: PasswordValidatorDirective, isStandalone: false, selector: "[libPasswordValidator]", providers: [
227
- {
228
- provide: NG_VALIDATORS,
229
- useExisting: PasswordValidatorDirective,
230
- multi: true
231
- }
232
- ], ngImport: i0 }); }
233
- }
234
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PasswordValidatorDirective, decorators: [{
235
- type: Directive,
236
- args: [{
237
- standalone: false,
238
- selector: '[libPasswordValidator]',
239
- providers: [
240
- {
241
- provide: NG_VALIDATORS,
242
- useExisting: PasswordValidatorDirective,
243
- multi: true
244
- }
245
- ]
246
- }]
247
- }] });
248
- class PasswordValidatorModule {
249
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PasswordValidatorModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
250
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: PasswordValidatorModule, declarations: [PasswordValidatorDirective], imports: [CommonModule], exports: [PasswordValidatorDirective] }); }
251
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PasswordValidatorModule, imports: [CommonModule] }); }
252
- }
253
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: PasswordValidatorModule, decorators: [{
254
- type: NgModule,
255
- args: [{
256
- declarations: [
257
- PasswordValidatorDirective
258
- ],
259
- imports: [
260
- CommonModule,
261
- ],
262
- exports: [
263
- PasswordValidatorDirective
264
- ]
265
- }]
266
- }] });
267
-
268
- class DefaultDialogComponent {
269
- constructor() {
270
- this.height = input();
271
- this.dialogTitle = input();
272
- this.withBack = input();
273
- this.back = output();
274
- }
275
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: DefaultDialogComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
276
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: DefaultDialogComponent, isStandalone: false, selector: "lib-default-dialog", inputs: { temRef: { classPropertyName: "temRef", publicName: "temRef", isSignal: false, isRequired: false, transformFunction: null }, height: { classPropertyName: "height", publicName: "height", isSignal: true, isRequired: false, transformFunction: null }, dialogTitle: { classPropertyName: "dialogTitle", publicName: "dialogTitle", isSignal: true, isRequired: false, transformFunction: null }, withBack: { classPropertyName: "withBack", publicName: "withBack", isSignal: true, isRequired: false, transformFunction: null } }, outputs: { back: "back" }, ngImport: i0, template: "<div class=\"modal\" [style]=\"{'height': height()}\">\r\n <div class=\"dialog-title\">\r\n @if (withBack()) {\r\n <div class=\"back-arrow\" (click)=\"back.emit()\">\r\n <mat-icon>keyboard_arrow_left</mat-icon>\r\n </div>\r\n }\r\n <h4 class=\"title\">{{ dialogTitle() }}</h4>\r\n <div class=\"closer\" mat-dialog-close>\r\n <mat-icon>close</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <ng-content select=\".dialog-content\"></ng-content>\r\n <ng-template #tempBody></ng-template>\r\n <ng-container *ngTemplateOutlet=\"temRef ? temRef: tempBody\" />\r\n </div>\r\n</div>", styles: [".modal{display:flex;flex-direction:column}.dialog-title{padding-inline:2rem;padding-top:1rem;margin-bottom:1rem;position:relative;display:flex;font-size:20px;justify-content:center}.dialog-title .back-arrow{cursor:pointer;margin-right:.5rem}.dialog-title .title{font-weight:700;font-size:24px;margin:0!important}.dialog-title .closer{right:3%;position:absolute;cursor:pointer}.dialog-content{flex:1;min-height:0;overflow:hidden;padding-bottom:1rem;display:flex;flex-direction:column;align-items:center}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }] }); }
277
- }
278
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: DefaultDialogComponent, decorators: [{
279
- type: Component,
280
- args: [{ standalone: false, selector: 'lib-default-dialog', template: "<div class=\"modal\" [style]=\"{'height': height()}\">\r\n <div class=\"dialog-title\">\r\n @if (withBack()) {\r\n <div class=\"back-arrow\" (click)=\"back.emit()\">\r\n <mat-icon>keyboard_arrow_left</mat-icon>\r\n </div>\r\n }\r\n <h4 class=\"title\">{{ dialogTitle() }}</h4>\r\n <div class=\"closer\" mat-dialog-close>\r\n <mat-icon>close</mat-icon>\r\n </div>\r\n </div>\r\n\r\n <div class=\"dialog-content\">\r\n <ng-content select=\".dialog-content\"></ng-content>\r\n <ng-template #tempBody></ng-template>\r\n <ng-container *ngTemplateOutlet=\"temRef ? temRef: tempBody\" />\r\n </div>\r\n</div>", styles: [".modal{display:flex;flex-direction:column}.dialog-title{padding-inline:2rem;padding-top:1rem;margin-bottom:1rem;position:relative;display:flex;font-size:20px;justify-content:center}.dialog-title .back-arrow{cursor:pointer;margin-right:.5rem}.dialog-title .title{font-weight:700;font-size:24px;margin:0!important}.dialog-title .closer{right:3%;position:absolute;cursor:pointer}.dialog-content{flex:1;min-height:0;overflow:hidden;padding-bottom:1rem;display:flex;flex-direction:column;align-items:center}\n"] }]
281
- }], propDecorators: { temRef: [{
282
- type: Input
283
- }] } });
284
- class DefaultDialogModule {
285
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: DefaultDialogModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
286
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: DefaultDialogModule, declarations: [DefaultDialogComponent], imports: [CommonModule,
287
- MatIconModule,
288
- MatDialogModule], exports: [DefaultDialogComponent] }); }
289
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: DefaultDialogModule, imports: [CommonModule,
290
- MatIconModule,
291
- MatDialogModule] }); }
292
- }
293
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: DefaultDialogModule, decorators: [{
294
- type: NgModule,
295
- args: [{
296
- declarations: [
297
- DefaultDialogComponent
298
- ],
299
- imports: [
300
- CommonModule,
301
- MatIconModule,
302
- MatDialogModule
303
- ],
304
- exports: [
305
- DefaultDialogComponent
306
- ]
307
- }]
308
- }] });
309
-
310
- class ErrorDispalyComponent {
311
- constructor() {
312
- this.error = input.required();
313
- this.displayError = '';
314
- }
315
- ngOnInit() {
316
- if (this.error() instanceof HttpErrorResponse) {
317
- if (typeof this.error().error === 'string') {
318
- this.displayError = this.error().error;
319
- }
320
- else if (this.error && this.error()?.error?.message) {
321
- this.displayError = this.error().error.message;
322
- }
323
- else {
324
- this.displayError = 'Unknown error';
325
- }
326
- }
327
- else if (typeof this.error() === 'string') {
328
- this.displayError = this.error();
329
- }
330
- else {
331
- this.displayError = 'Unknown error';
332
- }
333
- }
334
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorDispalyComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
335
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.6", type: ErrorDispalyComponent, isStandalone: false, selector: "lib-error-dispaly", inputs: { error: { classPropertyName: "error", publicName: "error", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `<strong class="err-container">{{ displayError | snakeCaseParser }}</strong>`, isInline: true, styles: [".err-container{display:block;max-width:300px;font-size:20px;text-align:center;border:1px solid red;border-radius:5px;padding:.5rem 1.5rem;background-color:#ffe6e6;color:red;overflow-wrap:break-word}\n"], dependencies: [{ kind: "pipe", type: SnakeCaseParserPipe, name: "snakeCaseParser" }] }); }
336
- }
337
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorDispalyComponent, decorators: [{
338
- type: Component,
339
- args: [{ standalone: false, selector: 'lib-error-dispaly', template: `<strong class="err-container">{{ displayError | snakeCaseParser }}</strong>`, styles: [".err-container{display:block;max-width:300px;font-size:20px;text-align:center;border:1px solid red;border-radius:5px;padding:.5rem 1.5rem;background-color:#ffe6e6;color:red;overflow-wrap:break-word}\n"] }]
340
- }] });
341
- class ErrorDispalyModule {
342
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorDispalyModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
343
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: ErrorDispalyModule, declarations: [ErrorDispalyComponent], imports: [CommonModule,
344
- SnakeCaseParserModule], exports: [ErrorDispalyComponent] }); }
345
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorDispalyModule, imports: [CommonModule,
346
- SnakeCaseParserModule] }); }
347
- }
348
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorDispalyModule, decorators: [{
349
- type: NgModule,
350
- args: [{
351
- declarations: [
352
- ErrorDispalyComponent
353
- ],
354
- imports: [
355
- CommonModule,
356
- SnakeCaseParserModule,
357
- ],
358
- exports: [
359
- ErrorDispalyComponent
360
- ]
361
- }]
362
- }] });
363
-
364
- class SearchBarComponent {
365
- constructor() {
366
- this.for = input.required();
367
- this.search = output();
368
- this.searchForm = new FormGroup({
369
- search: new FormControl('')
370
- });
371
- this.searchForm.get('search')?.valueChanges.
372
- pipe(debounceTime(1000), distinctUntilChanged()).subscribe((searchTerm) => {
373
- if (searchTerm.trim() !== '') {
374
- this.search.emit(searchTerm);
375
- }
376
- });
377
- }
378
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SearchBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
379
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.6", type: SearchBarComponent, isStandalone: false, selector: "lib-search-bar", inputs: { for: { classPropertyName: "for", publicName: "for", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { search: "search" }, ngImport: i0, template: `
380
- <form class="search-bar" [formGroup]="searchForm">
381
- <mat-icon>search</mat-icon>
382
- <input class="search-input" type="search" name="field"
383
- [placeholder]="'Search ' + for()" autocomplete="off" formControlName="search" />
384
- </form>
385
- `, isInline: true, styles: [".search-bar{width:270px;border:1px solid #A4A4A4;display:flex;align-items:center}.search-input{border:none;padding:7px 11px;height:100%;width:100%;background-color:transparent}mat-icon{margin-inline:8px}.search-input:focus{border:none;outline:none}@media (max-width: 1086px){.search-bar{width:170px}}\n"], dependencies: [{ kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i2.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i2.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] }); }
386
- }
387
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SearchBarComponent, decorators: [{
388
- type: Component,
389
- args: [{ standalone: false, selector: 'lib-search-bar', template: `
390
- <form class="search-bar" [formGroup]="searchForm">
391
- <mat-icon>search</mat-icon>
392
- <input class="search-input" type="search" name="field"
393
- [placeholder]="'Search ' + for()" autocomplete="off" formControlName="search" />
394
- </form>
395
- `, styles: [".search-bar{width:270px;border:1px solid #A4A4A4;display:flex;align-items:center}.search-input{border:none;padding:7px 11px;height:100%;width:100%;background-color:transparent}mat-icon{margin-inline:8px}.search-input:focus{border:none;outline:none}@media (max-width: 1086px){.search-bar{width:170px}}\n"] }]
396
- }], ctorParameters: () => [] });
397
- class SearchBarModule {
398
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SearchBarModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
399
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: SearchBarModule, declarations: [SearchBarComponent], imports: [CommonModule,
400
- MatIconModule,
401
- ReactiveFormsModule], exports: [SearchBarComponent] }); }
402
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SearchBarModule, imports: [CommonModule,
403
- MatIconModule,
404
- ReactiveFormsModule] }); }
405
- }
406
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: SearchBarModule, decorators: [{
407
- type: NgModule,
408
- args: [{
409
- declarations: [
410
- SearchBarComponent
411
- ],
412
- imports: [
413
- CommonModule,
414
- MatIconModule,
415
- ReactiveFormsModule
416
- ],
417
- exports: [
418
- SearchBarComponent
419
- ]
420
- }]
421
- }] });
422
-
423
- const fader = trigger('fadeInOut', [
424
- transition(':enter', [
425
- style({ opacity: 0 }),
426
- animate('200ms', style({ opacity: 1 })),
427
- ]),
428
- transition(':leave', [
429
- animate('200ms', style({ opacity: 0 })),
430
- ]),
431
- ]);
432
- const openDropdown = trigger('open-close-dropdown', [
433
- transition(':enter', [
434
- style({ height: 0, overflow: 'hidden' }),
435
- animate('200ms ease', style({ height: '*' }))
436
- ]),
437
- transition(':leave', [
438
- style({ height: '*', overflow: 'hidden' }),
439
- animate('200ms ease', style({ height: 0 }))
440
- ])
441
- ]);
442
- const textFader = trigger('textFader', [
443
- state('void', style({ opacity: 0 })),
444
- state('*', style({ opacity: 1 })),
445
- transition('void => *', [animate('0.3s 0.3s ease-in')]),
446
- transition('* => void', [animate('0.3s ease-in')])
447
- ]);
448
-
449
- class TableSortHeaderComponent {
450
- constructor() {
451
- this.selected = input.required();
452
- this.sort = output();
453
- this.sortState = 'none';
454
- }
455
- onSortClick() {
456
- if (this.sortState === 'none') {
457
- this.sortState = 'desc';
458
- }
459
- else if (this.sortState === 'desc') {
460
- this.sortState = 'asc';
461
- }
462
- else {
463
- this.sortState = 'none';
464
- }
465
- this.sort.emit(this.sortState);
466
- }
467
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableSortHeaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
468
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.6", type: TableSortHeaderComponent, isStandalone: false, selector: "lib-table-sort-header", inputs: { selected: { classPropertyName: "selected", publicName: "selected", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { sort: "sort" }, ngImport: i0, template: "<div class=\"sorting-container\" (click)=\"onSortClick()\">\r\n <mat-icon\r\n [class.selected]=\"selected() && sortState != 'none'\"\r\n [class.rotated]=\"sortState == 'asc'\">\r\n sort\r\n </mat-icon>\r\n</div>", styles: [".sorting-container{display:flex;align-items:center}.sorting-container *{cursor:pointer}.sorting-container .selected{color:#31adff;background-color:#ebf7fc}.sorting-container .rotated{transform:rotate(180deg) scaleX(-1)}\n"], dependencies: [{ kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }] }); }
469
- }
470
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableSortHeaderComponent, decorators: [{
471
- type: Component,
472
- args: [{ standalone: false, selector: 'lib-table-sort-header', template: "<div class=\"sorting-container\" (click)=\"onSortClick()\">\r\n <mat-icon\r\n [class.selected]=\"selected() && sortState != 'none'\"\r\n [class.rotated]=\"sortState == 'asc'\">\r\n sort\r\n </mat-icon>\r\n</div>", styles: [".sorting-container{display:flex;align-items:center}.sorting-container *{cursor:pointer}.sorting-container .selected{color:#31adff;background-color:#ebf7fc}.sorting-container .rotated{transform:rotate(180deg) scaleX(-1)}\n"] }]
473
- }] });
474
- class TableSortHeaderModule {
475
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableSortHeaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
476
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: TableSortHeaderModule, declarations: [TableSortHeaderComponent], imports: [CommonModule,
477
- MatIconModule], exports: [TableSortHeaderComponent] }); }
478
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableSortHeaderModule, imports: [CommonModule,
479
- MatIconModule] }); }
480
- }
481
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableSortHeaderModule, decorators: [{
482
- type: NgModule,
483
- args: [{
484
- declarations: [
485
- TableSortHeaderComponent
486
- ],
487
- imports: [
488
- CommonModule,
489
- MatIconModule
490
- ],
491
- exports: [
492
- TableSortHeaderComponent
493
- ]
494
- }]
495
- }] });
496
-
497
- class TableComponent {
498
- constructor() {
499
- this.config = input.required();
500
- this.action = output();
501
- this.scrollContainer = viewChild.required('scrollContainer');
502
- this.selectedRowIndex = -1;
503
- this.hoverRowIndex = -1;
504
- this.currentSortColumn = -1;
505
- }
506
- getClass(obj, prop) {
507
- if (!this.config().classRules)
508
- return '';
509
- const classes = [];
510
- for (let rule of this.config().classRules) {
511
- if (rule.condition(obj, prop)) {
512
- classes.push(rule.className);
513
- }
514
- }
515
- return classes.join(' ');
516
- }
517
- drop(event) {
518
- if (this.config().draggable) {
519
- moveItemInArray(this.config().data, event.previousIndex, event.currentIndex);
520
- this.action.emit({ action: 'drag', obj: this.config().data[event.currentIndex], index: event.currentIndex });
521
- }
522
- }
523
- onScroll() {
524
- const container = this.scrollContainer().nativeElement;
525
- // console.log(Math.ceil(container.scrollTop), container.offsetHeight, container.scrollHeight)
526
- if ((Math.ceil(container.scrollTop) + container.offsetHeight) >= container.scrollHeight) {
527
- this.action.emit({ action: 'scrolled' });
528
- }
529
- }
530
- onRowClick(event, obj, index) {
531
- this.selectedRowIndex = index === this.selectedRowIndex ? -1 : index;
532
- this.action.emit({ action: 'rowClick', obj, index, selected: this.selectedRowIndex === index, event });
533
- }
534
- selectOption(оption, obj, index) {
535
- this.action.emit({ action: оption.toLowerCase(), obj, index, selected: this.selectedRowIndex === index });
536
- }
537
- sortByProp(prop, sortState) {
538
- this.action.emit({ action: 'sort', prop, sortState });
539
- }
540
- trackById(index, obj) {
541
- return obj.id || index;
542
- }
543
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
544
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: TableComponent, isStandalone: false, selector: "lib-table", inputs: { config: { classPropertyName: "config", publicName: "config", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { action: "action" }, viewQueries: [{ propertyName: "scrollContainer", first: true, predicate: ["scrollContainer"], descendants: true, isSignal: true }], ngImport: i0, template: "<div class=\"flexer\">\r\n @if (config().title) {\r\n <div class=\"row-heading-labels mb05\">{{config().title}}</div>\r\n }\r\n <ng-content select=\".upper-part\"></ng-content>\r\n @if (config().withAdd) {\r\n <div class=\"flexer action pointer gap05 mb05\" (click)=\"action.emit({action: 'add'})\">\r\n <mat-icon>add_circle_outline</mat-icon>\r\n <div>add</div>\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"scroll\" #scrollContainer (scroll)=\"onScroll()\">\r\n <table [class.with-options]=\"config().options?.length\">\r\n <thead>\r\n <tr>\r\n @for (heading of config().tableHeadings; track heading; let i = $index) {\r\n <th>\r\n <div class=\"flexer gap05\">\r\n {{heading}}\r\n @if (config().sortable && !config().draggable) {\r\n <lib-table-sort-header\r\n [selected]=\"currentSortColumn === i\"\r\n (click)=\"currentSortColumn = i\"\r\n (sort)=\"sortByProp(config().dataProps[i], $event)\"\r\n />\r\n }\r\n </div>\r\n </th>\r\n }\r\n @if (config().options?.length) {\r\n <th></th>\r\n }\r\n </tr>\r\n </thead>\r\n @if (config().draggable) {\r\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n @for (obj of config().data; track trackById(i, obj); let i = $index) {\r\n <tr\r\n (mouseover)=\"hoverRowIndex = i\"\r\n (mouseleave)=\"hoverRowIndex = -1\"\r\n cdkDrag cdkDragLockAxis=\"y\"\r\n [class.pointer]=\"config().selectableRows\"\r\n [class.hover-row]=\"hoverRowIndex == i\"\r\n [class.selected-row]=\"config().selectableRows && selectedRowIndex == i\"\r\n (click)=\"onRowClick($event, obj, i)\"\r\n @fadeInOut>\r\n @for (prop of config().dataProps; track prop; let cellIndex = $index) {\r\n <td\r\n [class.dragCol]=\"cellIndex === 0\">\r\n <div class=\"data\" [classList]=\"getClass(obj, prop)\"\r\n [class.flexer]=\"cellIndex === 0\">\r\n @if (cellIndex === 0) {\r\n <mat-icon class=\"draggable\" cdkDragHandle>\r\n drag_indicator\r\n </mat-icon>\r\n }\r\n {{obj[prop] | blankFiller}}\r\n </div>\r\n </td>\r\n }\r\n @if (config().options?.length) {\r\n <td class=\"right-align\" (click)=\"$event.stopPropagation()\">\r\n <button mat-icon-button class=\"pointer dots right\" [matMenuTriggerFor]=\"optionsMenu\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #optionsMenu=\"matMenu\">\r\n @for (option of config().options; track option) {\r\n <div\r\n mat-menu-item (click)=\"selectOption(option, obj, i)\"\r\n [class.red]=\"option == 'Remove' || option == 'Delete'\">\r\n {{option}}\r\n </div>\r\n }\r\n </mat-menu>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n } @else {\r\n <tbody>\r\n @for (obj of config().data; track trackById(i, obj); let i = $index) {\r\n <tr\r\n (mouseover)=\"hoverRowIndex = i\"\r\n (mouseleave)=\"hoverRowIndex = -1\"\r\n [class.pointer]=\"config().selectableRows\"\r\n [class.hover-row]=\"hoverRowIndex == i\"\r\n [class.selected-row]=\"config().selectableRows && selectedRowIndex == i\"\r\n (click)=\"onRowClick($event, obj, i)\"\r\n @fadeInOut>\r\n @for (prop of config().dataProps; track prop; let cellIndex = $index) {\r\n <td>\r\n <div class=\"data\" [classList]=\"getClass(obj, prop)\">\r\n {{obj[prop] | blankFiller}}\r\n </div>\r\n </td>\r\n }\r\n @if (config().options?.length) {\r\n <td class=\"right-align\" (click)=\"$event.stopPropagation()\">\r\n <button mat-icon-button class=\"pointer dots right\" [matMenuTriggerFor]=\"optionsMenu\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #optionsMenu=\"matMenu\">\r\n @for (option of config().options; track option) {\r\n <div\r\n mat-menu-item (click)=\"selectOption(option, obj, i)\"\r\n [class.red]=\"option == 'Remove' || option == 'Delete'\">\r\n {{option}}\r\n </div>\r\n }\r\n </mat-menu>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n }\r\n </table>\r\n</div>", styles: [".scroll{overflow-y:auto;max-height:94%}table{width:100%;border-collapse:collapse;border-spacing:0px}table.with-options td{padding-block:3px!important}.flexer{display:flex;align-items:center}.action{color:#009ddc;font-weight:500;text-align:right;margin-left:auto}.pointer{cursor:pointer}.gap05{gap:.5rem}.mb05{margin-bottom:.5}.data{white-space:pre-wrap}.row-heading-labels{font-weight:700;font-size:20px}.selected-row td{background-color:#d3edf8}.hover-row{background-color:#ebf7fc}.red{color:red}@media (max-width: 1086px){table td,table th{padding:3px!important;width:auto!important}}td,th{padding:.5rem 1rem;font-size:14px}th{background-color:#f6f6f6;text-align:left;position:sticky;top:0;z-index:2;border-top:2px solid #E5E4E7}td{border-bottom:2px solid #E5E4E7;border-top:2px solid #E5E4E7}.dots{width:fit-content}.draggable{cursor:grabbing}.dragCol{padding-left:0!important}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;font-size:1.5em;text-align:center;opacity:.8;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.dragdrop-placeholder{background:#ccc;border:dotted 3px #999;min-height:30px;transition:transform .1s cubic-bezier(0,0,.2,1)}\n"], dependencies: [{ kind: "component", type: i1$2.MatMenu, selector: "mat-menu", inputs: ["backdropClass", "aria-label", "aria-labelledby", "aria-describedby", "xPosition", "yPosition", "overlapTrigger", "hasBackdrop", "class", "classList"], outputs: ["closed", "close"], exportAs: ["matMenu"] }, { kind: "component", type: i1$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["role", "disabled", "disableRipple"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i1$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", inputs: ["mat-menu-trigger-for", "matMenuTriggerFor", "matMenuTriggerData", "matMenuTriggerRestoreFocus"], outputs: ["menuOpened", "onMenuOpen", "menuClosed", "onMenuClose"], exportAs: ["matMenuTrigger"] }, { kind: "component", type: i1$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "component", type: i3$1.MatIconButton, selector: "button[mat-icon-button]", exportAs: ["matButton"] }, { kind: "component", type: TableSortHeaderComponent, selector: "lib-table-sort-header", inputs: ["selected"], outputs: ["sort"] }, { kind: "directive", type: i5.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep", "cdkDropListElementContainer"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i5.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer", "cdkDragScale"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "directive", type: i5.CdkDragHandle, selector: "[cdkDragHandle]", inputs: ["cdkDragHandleDisabled"] }, { kind: "pipe", type: WhiteSpaceFillerPipe, name: "blankFiller" }], animations: [fader] }); }
545
- }
546
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableComponent, decorators: [{
547
- type: Component,
548
- args: [{ standalone: false, selector: 'lib-table', animations: [fader], template: "<div class=\"flexer\">\r\n @if (config().title) {\r\n <div class=\"row-heading-labels mb05\">{{config().title}}</div>\r\n }\r\n <ng-content select=\".upper-part\"></ng-content>\r\n @if (config().withAdd) {\r\n <div class=\"flexer action pointer gap05 mb05\" (click)=\"action.emit({action: 'add'})\">\r\n <mat-icon>add_circle_outline</mat-icon>\r\n <div>add</div>\r\n </div>\r\n }\r\n</div>\r\n\r\n<div class=\"scroll\" #scrollContainer (scroll)=\"onScroll()\">\r\n <table [class.with-options]=\"config().options?.length\">\r\n <thead>\r\n <tr>\r\n @for (heading of config().tableHeadings; track heading; let i = $index) {\r\n <th>\r\n <div class=\"flexer gap05\">\r\n {{heading}}\r\n @if (config().sortable && !config().draggable) {\r\n <lib-table-sort-header\r\n [selected]=\"currentSortColumn === i\"\r\n (click)=\"currentSortColumn = i\"\r\n (sort)=\"sortByProp(config().dataProps[i], $event)\"\r\n />\r\n }\r\n </div>\r\n </th>\r\n }\r\n @if (config().options?.length) {\r\n <th></th>\r\n }\r\n </tr>\r\n </thead>\r\n @if (config().draggable) {\r\n <tbody cdkDropList (cdkDropListDropped)=\"drop($event)\">\r\n @for (obj of config().data; track trackById(i, obj); let i = $index) {\r\n <tr\r\n (mouseover)=\"hoverRowIndex = i\"\r\n (mouseleave)=\"hoverRowIndex = -1\"\r\n cdkDrag cdkDragLockAxis=\"y\"\r\n [class.pointer]=\"config().selectableRows\"\r\n [class.hover-row]=\"hoverRowIndex == i\"\r\n [class.selected-row]=\"config().selectableRows && selectedRowIndex == i\"\r\n (click)=\"onRowClick($event, obj, i)\"\r\n @fadeInOut>\r\n @for (prop of config().dataProps; track prop; let cellIndex = $index) {\r\n <td\r\n [class.dragCol]=\"cellIndex === 0\">\r\n <div class=\"data\" [classList]=\"getClass(obj, prop)\"\r\n [class.flexer]=\"cellIndex === 0\">\r\n @if (cellIndex === 0) {\r\n <mat-icon class=\"draggable\" cdkDragHandle>\r\n drag_indicator\r\n </mat-icon>\r\n }\r\n {{obj[prop] | blankFiller}}\r\n </div>\r\n </td>\r\n }\r\n @if (config().options?.length) {\r\n <td class=\"right-align\" (click)=\"$event.stopPropagation()\">\r\n <button mat-icon-button class=\"pointer dots right\" [matMenuTriggerFor]=\"optionsMenu\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #optionsMenu=\"matMenu\">\r\n @for (option of config().options; track option) {\r\n <div\r\n mat-menu-item (click)=\"selectOption(option, obj, i)\"\r\n [class.red]=\"option == 'Remove' || option == 'Delete'\">\r\n {{option}}\r\n </div>\r\n }\r\n </mat-menu>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n } @else {\r\n <tbody>\r\n @for (obj of config().data; track trackById(i, obj); let i = $index) {\r\n <tr\r\n (mouseover)=\"hoverRowIndex = i\"\r\n (mouseleave)=\"hoverRowIndex = -1\"\r\n [class.pointer]=\"config().selectableRows\"\r\n [class.hover-row]=\"hoverRowIndex == i\"\r\n [class.selected-row]=\"config().selectableRows && selectedRowIndex == i\"\r\n (click)=\"onRowClick($event, obj, i)\"\r\n @fadeInOut>\r\n @for (prop of config().dataProps; track prop; let cellIndex = $index) {\r\n <td>\r\n <div class=\"data\" [classList]=\"getClass(obj, prop)\">\r\n {{obj[prop] | blankFiller}}\r\n </div>\r\n </td>\r\n }\r\n @if (config().options?.length) {\r\n <td class=\"right-align\" (click)=\"$event.stopPropagation()\">\r\n <button mat-icon-button class=\"pointer dots right\" [matMenuTriggerFor]=\"optionsMenu\">\r\n <mat-icon>more_vert</mat-icon>\r\n </button>\r\n <mat-menu #optionsMenu=\"matMenu\">\r\n @for (option of config().options; track option) {\r\n <div\r\n mat-menu-item (click)=\"selectOption(option, obj, i)\"\r\n [class.red]=\"option == 'Remove' || option == 'Delete'\">\r\n {{option}}\r\n </div>\r\n }\r\n </mat-menu>\r\n </td>\r\n }\r\n </tr>\r\n }\r\n </tbody>\r\n }\r\n </table>\r\n</div>", styles: [".scroll{overflow-y:auto;max-height:94%}table{width:100%;border-collapse:collapse;border-spacing:0px}table.with-options td{padding-block:3px!important}.flexer{display:flex;align-items:center}.action{color:#009ddc;font-weight:500;text-align:right;margin-left:auto}.pointer{cursor:pointer}.gap05{gap:.5rem}.mb05{margin-bottom:.5}.data{white-space:pre-wrap}.row-heading-labels{font-weight:700;font-size:20px}.selected-row td{background-color:#d3edf8}.hover-row{background-color:#ebf7fc}.red{color:red}@media (max-width: 1086px){table td,table th{padding:3px!important;width:auto!important}}td,th{padding:.5rem 1rem;font-size:14px}th{background-color:#f6f6f6;text-align:left;position:sticky;top:0;z-index:2;border-top:2px solid #E5E4E7}td{border-bottom:2px solid #E5E4E7;border-top:2px solid #E5E4E7}.dots{width:fit-content}.draggable{cursor:grabbing}.dragCol{padding-left:0!important}.cdk-drag-preview{box-sizing:border-box;border-radius:4px;font-size:1.5em;text-align:center;opacity:.8;box-shadow:0 5px 5px -3px #0003,0 8px 10px 1px #00000024,0 3px 14px 2px #0000001f}.dragdrop-placeholder{background:#ccc;border:dotted 3px #999;min-height:30px;transition:transform .1s cubic-bezier(0,0,.2,1)}\n"] }]
549
- }] });
550
- class TableModule {
551
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
552
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: TableModule, declarations: [TableComponent], imports: [CommonModule,
553
- WhiteSpaceFillerModule,
554
- MatMenuModule,
555
- MatIconModule,
556
- MatButtonModule,
557
- TableSortHeaderModule,
558
- DragDropModule], exports: [TableComponent] }); }
559
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableModule, imports: [CommonModule,
560
- WhiteSpaceFillerModule,
561
- MatMenuModule,
562
- MatIconModule,
563
- MatButtonModule,
564
- TableSortHeaderModule,
565
- DragDropModule] }); }
566
- }
567
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: TableModule, decorators: [{
568
- type: NgModule,
569
- args: [{
570
- declarations: [
571
- TableComponent
572
- ],
573
- imports: [
574
- CommonModule,
575
- WhiteSpaceFillerModule,
576
- MatMenuModule,
577
- MatIconModule,
578
- MatButtonModule,
579
- TableSortHeaderModule,
580
- DragDropModule
581
- ],
582
- exports: [
583
- TableComponent
584
- ]
585
- }]
586
- }] });
587
-
588
- class LoaderService {
589
- constructor() {
590
- this.loadingSubject = new BehaviorSubject(false);
591
- this.loading$ = this.loadingSubject.asObservable();
592
- }
593
- setLoading(loadingState) {
594
- this.loadingSubject.next(loadingState);
595
- }
596
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: LoaderService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
597
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: LoaderService, providedIn: 'root' }); }
598
- }
599
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: LoaderService, decorators: [{
600
- type: Injectable,
601
- args: [{
602
- providedIn: 'root'
603
- }]
604
- }] });
605
-
606
- class GlobalLoaderComponent {
607
- constructor() {
608
- this.loaderService = inject(LoaderService);
609
- }
610
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: GlobalLoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
611
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: GlobalLoaderComponent, isStandalone: false, selector: "lib-global-loader", ngImport: i0, template: "@if (loaderService.loading$ | async) {\r\n <div class=\"loader\">\r\n <mat-spinner />\r\n </div>\r\n}", styles: [".loader{display:flex;justify-content:center;align-items:center;height:100%;width:100%;position:fixed;top:0;left:0;background-color:#0003;z-index:9999}\n"], dependencies: [{ kind: "component", type: i1$3.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
612
- }
613
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: GlobalLoaderComponent, decorators: [{
614
- type: Component,
615
- args: [{ standalone: false, selector: 'lib-global-loader', template: "@if (loaderService.loading$ | async) {\r\n <div class=\"loader\">\r\n <mat-spinner />\r\n </div>\r\n}", styles: [".loader{display:flex;justify-content:center;align-items:center;height:100%;width:100%;position:fixed;top:0;left:0;background-color:#0003;z-index:9999}\n"] }]
616
- }] });
617
- class GlobalLoaderModule {
618
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: GlobalLoaderModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
619
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: GlobalLoaderModule, declarations: [GlobalLoaderComponent], imports: [CommonModule,
620
- MatProgressSpinnerModule], exports: [GlobalLoaderComponent] }); }
621
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: GlobalLoaderModule, imports: [CommonModule,
622
- MatProgressSpinnerModule] }); }
623
- }
624
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: GlobalLoaderModule, decorators: [{
625
- type: NgModule,
626
- args: [{
627
- declarations: [
628
- GlobalLoaderComponent
629
- ],
630
- imports: [
631
- CommonModule,
632
- MatProgressSpinnerModule,
633
- ],
634
- exports: [
635
- GlobalLoaderComponent
636
- ]
637
- }]
638
- }] });
639
-
640
- class ErrorService {
641
- constructor() {
642
- this.errorSubject = new Subject();
643
- this.error$ = this.errorSubject.asObservable();
644
- }
645
- sendError(error) {
646
- this.errorSubject.next(error);
647
- }
648
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
649
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorService, providedIn: 'root' }); }
650
- }
651
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorService, decorators: [{
652
- type: Injectable,
653
- args: [{
654
- providedIn: 'root'
655
- }]
656
- }] });
657
-
658
- const HTTP_STATUS_CODES = {
659
- 100: 'Continue',
660
- 101: 'Switching Protocols',
661
- 102: 'Processing',
662
- 103: 'Early Hints',
663
- 200: 'OK',
664
- 201: 'Created',
665
- 202: 'Accepted',
666
- 203: 'Non-Authoritative Information',
667
- 204: 'No Content',
668
- 205: 'Reset Content',
669
- 206: 'Partial Content',
670
- 207: 'Multi-Status',
671
- 208: 'Already Reported',
672
- 226: 'IM Used',
673
- 300: 'Multiple Choices',
674
- 301: 'Moved Permanently',
675
- 302: 'Found',
676
- 303: 'See Other',
677
- 304: 'Not Modified',
678
- 305: 'Use Proxy',
679
- 306: '(Unused)',
680
- 307: 'Temporary Redirect',
681
- 308: 'Permanent Redirect',
682
- 400: 'Bad Request',
683
- 401: 'Unauthorized',
684
- 402: 'Payment Required',
685
- 403: 'Forbidden',
686
- 404: 'Not Found',
687
- 405: 'Method Not Allowed',
688
- 406: 'Not Acceptable',
689
- 407: 'Proxy Authentication Required',
690
- 408: 'Request Timeout',
691
- 409: 'Conflict',
692
- 410: 'Gone',
693
- 411: 'Length Required',
694
- 412: 'Precondition Failed',
695
- 413: 'Payload Too Large',
696
- 414: 'URI Too Long',
697
- 415: 'Unsupported Media Type',
698
- 416: 'Range Not Satisfiable',
699
- 417: 'Expectation Failed',
700
- 418: "I'm a teapot",
701
- 421: 'Misdirected Request',
702
- 422: 'Unprocessable Entity',
703
- 423: 'Locked',
704
- 424: 'Failed Dependency',
705
- 425: 'Too Early',
706
- 426: 'Upgrade Required',
707
- 428: 'Precondition Required',
708
- 429: 'Too Many Requests',
709
- 431: 'Request Header Fields Too Large',
710
- 451: 'Unavailable For Legal Reasons',
711
- 500: 'Internal Server Error',
712
- 501: 'Not Implemented',
713
- 502: 'Bad Gateway',
714
- 503: 'Service Unavailable',
715
- 504: 'Gateway Timeout',
716
- 505: 'HTTP Version Not Supported',
717
- 506: 'Variant Also Negotiates',
718
- 507: 'Insufficient Storage',
719
- 508: 'Loop Detected',
720
- 510: 'Not Extended',
721
- 511: 'Network Authentication Required'
722
- };
723
-
724
- class ErrorPopupComponent {
725
- constructor(error) {
726
- this.error = error;
727
- this.httpStatusCodes = HTTP_STATUS_CODES;
728
- }
729
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorPopupComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component }); }
730
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.6", type: ErrorPopupComponent, isStandalone: false, selector: "lib-error-popup", ngImport: i0, template: "<lib-default-dialog [dialogTitle]=\"'\u0410n error has occurred'\">\r\n <div class=\"dialog-content\">\r\n <div class=\"status-info\">\r\n <div>{{ error.status }}</div>\r\n @if (error.status) {\r\n <div>{{ httpStatusCodes[error.status] }}</div>\r\n }\r\n </div>\r\n <div class=\"error-info\">\r\n <lib-error-dispaly [error]=\"error\" />\r\n </div>\r\n </div>\r\n</lib-default-dialog>", styles: [".dialog-content{display:flex;flex-direction:column;align-items:center;padding-inline:1rem}.dialog-content .status-info{display:flex;margin-bottom:.5rem;font-weight:600;font-size:18px;gap:.5rem}.dialog-content .error-info{display:grid;place-items:center}\n"], dependencies: [{ kind: "component", type: ErrorDispalyComponent, selector: "lib-error-dispaly", inputs: ["error"] }, { kind: "component", type: DefaultDialogComponent, selector: "lib-default-dialog", inputs: ["temRef", "height", "dialogTitle", "withBack"], outputs: ["back"] }] }); }
731
- }
732
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorPopupComponent, decorators: [{
733
- type: Component,
734
- args: [{ standalone: false, selector: 'lib-error-popup', template: "<lib-default-dialog [dialogTitle]=\"'\u0410n error has occurred'\">\r\n <div class=\"dialog-content\">\r\n <div class=\"status-info\">\r\n <div>{{ error.status }}</div>\r\n @if (error.status) {\r\n <div>{{ httpStatusCodes[error.status] }}</div>\r\n }\r\n </div>\r\n <div class=\"error-info\">\r\n <lib-error-dispaly [error]=\"error\" />\r\n </div>\r\n </div>\r\n</lib-default-dialog>", styles: [".dialog-content{display:flex;flex-direction:column;align-items:center;padding-inline:1rem}.dialog-content .status-info{display:flex;margin-bottom:.5rem;font-weight:600;font-size:18px;gap:.5rem}.dialog-content .error-info{display:grid;place-items:center}\n"] }]
735
- }], ctorParameters: () => [{ type: i3$2.HttpErrorResponse, decorators: [{
736
- type: Inject,
737
- args: [MAT_DIALOG_DATA]
738
- }] }] });
739
- class ErrorPopupModule {
740
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorPopupModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
741
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: ErrorPopupModule, declarations: [ErrorPopupComponent], imports: [CommonModule,
742
- ErrorDispalyModule,
743
- DefaultDialogModule], exports: [ErrorPopupComponent] }); }
744
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorPopupModule, imports: [CommonModule,
745
- ErrorDispalyModule,
746
- DefaultDialogModule] }); }
747
- }
748
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorPopupModule, decorators: [{
749
- type: NgModule,
750
- args: [{
751
- declarations: [
752
- ErrorPopupComponent
753
- ],
754
- imports: [
755
- CommonModule,
756
- ErrorDispalyModule,
757
- DefaultDialogModule
758
- ],
759
- exports: [
760
- ErrorPopupComponent
761
- ]
762
- }]
763
- }] });
764
-
765
- class ErrorHandlerComponent {
766
- constructor() {
767
- this.errSubscriptions = new Subscription();
768
- this.errorService = inject(ErrorService);
769
- this.dialog = inject(MatDialog);
770
- this.errSubscriptions.add(this.errorService.error$.subscribe((err) => {
771
- console.log(err);
772
- this.showPopup(err);
773
- }));
774
- }
775
- showPopup(error) {
776
- this.dialog.closeAll();
777
- this.dialog.open(ErrorPopupComponent, {
778
- data: error,
779
- width: '400px',
780
- scrollStrategy: new NoopScrollStrategy(),
781
- });
782
- }
783
- ngOnDestroy() {
784
- this.errSubscriptions.unsubscribe();
785
- }
786
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorHandlerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
787
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "19.0.6", type: ErrorHandlerComponent, isStandalone: false, selector: "lib-error-handler", ngImport: i0, template: "", styles: [""] }); }
788
- }
789
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorHandlerComponent, decorators: [{
790
- type: Component,
791
- args: [{ standalone: false, selector: 'lib-error-handler', template: "" }]
792
- }], ctorParameters: () => [] });
793
- class ErrorHandlerModule {
794
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorHandlerModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
795
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: ErrorHandlerModule, declarations: [ErrorHandlerComponent], imports: [CommonModule], exports: [ErrorHandlerComponent] }); }
796
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorHandlerModule, imports: [CommonModule] }); }
797
- }
798
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ErrorHandlerModule, decorators: [{
799
- type: NgModule,
800
- args: [{
801
- declarations: [
802
- ErrorHandlerComponent
803
- ],
804
- imports: [
805
- CommonModule,
806
- ],
807
- exports: [
808
- ErrorHandlerComponent
809
- ]
810
- }]
811
- }] });
812
-
813
- class ChipComponent {
814
- constructor() {
815
- this.value = input.required();
816
- this.isSelected = input.required();
817
- this.text = input.required();
818
- this.selected = output();
819
- }
820
- onClick() {
821
- if (this.isSelected()) {
822
- return;
823
- }
824
- this.selected.emit(this.value());
825
- }
826
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ChipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
827
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "19.0.6", type: ChipComponent, isStandalone: false, selector: "lib-chip", inputs: { value: { classPropertyName: "value", publicName: "value", isSignal: true, isRequired: true, transformFunction: null }, isSelected: { classPropertyName: "isSelected", publicName: "isSelected", isSignal: true, isRequired: true, transformFunction: null }, text: { classPropertyName: "text", publicName: "text", isSignal: true, isRequired: true, transformFunction: null } }, outputs: { selected: "selected" }, ngImport: i0, template: "<div class=\"chip\" [class.selected]=\"isSelected()\" (click)=\"onClick()\">\r\n {{text()}}\r\n</div>\r\n", styles: [".chip{display:inline-block;padding:.5rem 1rem;border-radius:1rem;background-color:#e6e6e6;color:#333;font-size:1rem;cursor:pointer;transition:all .2s}.chip:hover{background-color:#ccc}.chip.selected{background-color:var(--primary-color);color:#fff}\n"] }); }
828
- }
829
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ChipComponent, decorators: [{
830
- type: Component,
831
- args: [{ standalone: false, selector: 'lib-chip', template: "<div class=\"chip\" [class.selected]=\"isSelected()\" (click)=\"onClick()\">\r\n {{text()}}\r\n</div>\r\n", styles: [".chip{display:inline-block;padding:.5rem 1rem;border-radius:1rem;background-color:#e6e6e6;color:#333;font-size:1rem;cursor:pointer;transition:all .2s}.chip:hover{background-color:#ccc}.chip.selected{background-color:var(--primary-color);color:#fff}\n"] }]
832
- }] });
833
- class ChipModule {
834
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ChipModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
835
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "19.0.6", ngImport: i0, type: ChipModule, declarations: [ChipComponent], imports: [CommonModule], exports: [ChipComponent] }); }
836
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ChipModule, imports: [CommonModule] }); }
837
- }
838
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.6", ngImport: i0, type: ChipModule, decorators: [{
839
- type: NgModule,
840
- args: [{
841
- declarations: [
842
- ChipComponent
843
- ],
844
- imports: [
845
- CommonModule
846
- ],
847
- exports: [
848
- ChipComponent
849
- ]
850
- }]
851
- }] });
852
-
853
- /*
854
- * Public API Surface of ui-lib
855
- */
856
-
857
- /**
858
- * Generated bundle index. Do not edit.
859
- */
860
-
861
- export { ChipComponent, ChipModule, DefaultDialogComponent, DefaultDialogModule, ErrorDispalyComponent, ErrorDispalyModule, ErrorHandlerComponent, ErrorHandlerModule, ErrorService, FieldsMatchModule, FieldsMatchValidatorDirective, GlobalLoaderComponent, GlobalLoaderModule, LoaderService, PasswordValidatorDirective, PasswordValidatorModule, PhoneValidationDirective, PhoneValidatorDirective, SearchBarComponent, SearchBarModule, SnakeCaseParserModule, SnakeCaseParserPipe, TableComponent, TableModule, TableSortHeaderComponent, TableSortHeaderModule, WhiteSpaceFillerModule, WhiteSpaceFillerPipe, fader, openDropdown, textFader };
862
- //# sourceMappingURL=ferhaps-easy-ui-lib.mjs.map