@falcon-ng/tailwind 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm2022/lib/component/auto-complete/auto-complete.component.mjs +34 -0
- package/esm2022/lib/component/bottom-sheet/bottom-sheet.component.mjs +30 -0
- package/esm2022/lib/component/button/button.component.mjs +28 -0
- package/esm2022/lib/component/button-toggle/button-toggle.component.mjs +33 -0
- package/{esm2020 → esm2022}/lib/component/checkbox/checkbox.component.mjs +6 -5
- package/esm2022/lib/component/chips/chip.component.mjs +110 -0
- package/esm2022/lib/component/date-picker/date-picker.component.mjs +18 -0
- package/esm2022/lib/component/dialog/dialog.component.mjs +22 -0
- package/esm2022/lib/component/pagination/pagination.component.mjs +96 -0
- package/esm2022/lib/component/progress-bar/progress-bar.component.mjs +21 -0
- package/esm2022/lib/component/progress-spinner/progress-spinner.component.mjs +27 -0
- package/esm2022/lib/component/radio/radio.component.mjs +32 -0
- package/esm2022/lib/component/rich-text-editor/rich-text-editor.component.mjs +16 -0
- package/esm2022/lib/component/select/select.component.mjs +36 -0
- package/esm2022/lib/component/slide-toggle/slide-toggle.component.mjs +15 -0
- package/esm2022/lib/component/slider/slider.component.mjs +16 -0
- package/esm2022/lib/component/snack-bar/snack-bar.component.mjs +12 -0
- package/esm2022/lib/component/table/table.component.mjs +75 -0
- package/esm2022/lib/component/textarea/textarea.component.mjs +17 -0
- package/esm2022/lib/component/textbox/textbox.component.mjs +18 -0
- package/esm2022/lib/control-builder/control-builder.component.mjs +19 -0
- package/esm2022/lib/falcon-core.module.mjs +231 -0
- package/esm2022/lib/model/constant.mjs +33 -0
- package/esm2022/lib/module/angularmaterial.module.mjs +190 -0
- package/esm2022/lib/reactive-field.directive.mjs +29 -0
- package/esm2022/lib/service/appsetting.service.mjs +56 -0
- package/esm2022/lib/service/http/generic-http-client.mjs +198 -0
- package/esm2022/lib/service/http/igeneric-http-client.mjs +11 -0
- package/esm2022/lib/service/logger.service.mjs +79 -0
- package/esm2022/lib/service/open-id/TokenHelperService.mjs +72 -0
- package/esm2022/lib/service/open-id/auth-guard.service.mjs +31 -0
- package/esm2022/lib/service/open-id/auth.service.mjs +155 -0
- package/{fesm2020 → fesm2022}/falcon-ng-tailwind.mjs +287 -287
- package/fesm2022/falcon-ng-tailwind.mjs.map +1 -0
- package/lib/component/button/button.component.d.ts +1 -1
- package/lib/component/chips/chip.component.d.ts +1 -1
- package/lib/component/pagination/pagination.component.d.ts +1 -1
- package/lib/component/progress-bar/progress-bar.component.d.ts +1 -1
- package/lib/component/progress-spinner/progress-spinner.component.d.ts +1 -1
- package/lib/component/table/table.component.d.ts +1 -1
- package/lib/control-builder/control-builder.component.d.ts +1 -1
- package/lib/reactive-field.directive.d.ts +1 -1
- package/lib/service/open-id/auth-guard.service.d.ts +2 -2
- package/package.json +7 -13
- package/esm2020/lib/component/auto-complete/auto-complete.component.mjs +0 -33
- package/esm2020/lib/component/bottom-sheet/bottom-sheet.component.mjs +0 -29
- package/esm2020/lib/component/button/button.component.mjs +0 -27
- package/esm2020/lib/component/button-toggle/button-toggle.component.mjs +0 -32
- package/esm2020/lib/component/chips/chip.component.mjs +0 -109
- package/esm2020/lib/component/date-picker/date-picker.component.mjs +0 -17
- package/esm2020/lib/component/dialog/dialog.component.mjs +0 -21
- package/esm2020/lib/component/pagination/pagination.component.mjs +0 -95
- package/esm2020/lib/component/progress-bar/progress-bar.component.mjs +0 -20
- package/esm2020/lib/component/progress-spinner/progress-spinner.component.mjs +0 -26
- package/esm2020/lib/component/radio/radio.component.mjs +0 -31
- package/esm2020/lib/component/rich-text-editor/rich-text-editor.component.mjs +0 -15
- package/esm2020/lib/component/select/select.component.mjs +0 -35
- package/esm2020/lib/component/slide-toggle/slide-toggle.component.mjs +0 -14
- package/esm2020/lib/component/slider/slider.component.mjs +0 -15
- package/esm2020/lib/component/snack-bar/snack-bar.component.mjs +0 -11
- package/esm2020/lib/component/table/table.component.mjs +0 -74
- package/esm2020/lib/component/textarea/textarea.component.mjs +0 -16
- package/esm2020/lib/component/textbox/textbox.component.mjs +0 -17
- package/esm2020/lib/control-builder/control-builder.component.mjs +0 -18
- package/esm2020/lib/falcon-core.module.mjs +0 -230
- package/esm2020/lib/model/constant.mjs +0 -32
- package/esm2020/lib/module/angularmaterial.module.mjs +0 -189
- package/esm2020/lib/reactive-field.directive.mjs +0 -28
- package/esm2020/lib/service/appsetting.service.mjs +0 -55
- package/esm2020/lib/service/http/generic-http-client.mjs +0 -197
- package/esm2020/lib/service/http/igeneric-http-client.mjs +0 -10
- package/esm2020/lib/service/logger.service.mjs +0 -78
- package/esm2020/lib/service/open-id/TokenHelperService.mjs +0 -71
- package/esm2020/lib/service/open-id/auth-guard.service.mjs +0 -30
- package/esm2020/lib/service/open-id/auth.service.mjs +0 -154
- package/fesm2015/falcon-ng-tailwind.mjs +0 -1988
- package/fesm2015/falcon-ng-tailwind.mjs.map +0 -1
- package/fesm2020/falcon-ng-tailwind.mjs.map +0 -1
- /package/{esm2020 → esm2022}/falcon-ng-tailwind.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/base-control.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/base-form-component.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/AutoComplete.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/Button.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/ButtonToggle.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/CheckBox.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/Chip.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/DatePicker.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/Divider.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/Editor.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/Radio.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/RichTextEditor.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/SlideToggle.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/Slider.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/Textarea.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/Textbox.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/control-type/select.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/model/enum.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/model/environments.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/model/interface.mjs +0 -0
- /package/{esm2020 → esm2022}/lib/model/ivalidator.mjs +0 -0
- /package/{esm2020 → esm2022}/public-api.mjs +0 -0
|
@@ -1,1988 +0,0 @@
|
|
|
1
|
-
import * as i0 from '@angular/core';
|
|
2
|
-
import { NgModule, Component, EventEmitter, Output, Input, ViewChild, Directive, Injectable, Inject, inject, APP_INITIALIZER } from '@angular/core';
|
|
3
|
-
import { ScrollingModule } from '@angular/cdk/scrolling';
|
|
4
|
-
import { PortalModule } from '@angular/cdk/portal';
|
|
5
|
-
import { OverlayModule } from '@angular/cdk/overlay';
|
|
6
|
-
import { MatTreeModule } from '@angular/material/tree';
|
|
7
|
-
import * as i3$1 from '@angular/material/tooltip';
|
|
8
|
-
import { MatTooltipModule } from '@angular/material/tooltip';
|
|
9
|
-
import { MatToolbarModule } from '@angular/material/toolbar';
|
|
10
|
-
import { MatTabsModule } from '@angular/material/tabs';
|
|
11
|
-
import * as i8 from '@angular/material/table';
|
|
12
|
-
import { MatTableModule, MatTableDataSource } from '@angular/material/table';
|
|
13
|
-
import * as i7 from '@angular/material/sort';
|
|
14
|
-
import { MatSortModule, MatSort } from '@angular/material/sort';
|
|
15
|
-
import * as i3$4 from '@angular/material/snack-bar';
|
|
16
|
-
import { MatSnackBarModule, MAT_SNACK_BAR_DEFAULT_OPTIONS } from '@angular/material/snack-bar';
|
|
17
|
-
import * as i1$3 from '@angular/material/slide-toggle';
|
|
18
|
-
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
|
|
19
|
-
import * as i2$3 from '@angular/material/slider';
|
|
20
|
-
import { MatSliderModule } from '@angular/material/slider';
|
|
21
|
-
import { MatSidenavModule } from '@angular/material/sidenav';
|
|
22
|
-
import * as i3$3 from '@angular/material/select';
|
|
23
|
-
import { MatSelectModule } from '@angular/material/select';
|
|
24
|
-
import * as i2$1 from '@angular/material/core';
|
|
25
|
-
import { MatNativeDateModule, MatRippleModule } from '@angular/material/core';
|
|
26
|
-
import * as i1$1 from '@angular/material/radio';
|
|
27
|
-
import { MatRadioModule } from '@angular/material/radio';
|
|
28
|
-
import * as i1$a from '@angular/material/progress-spinner';
|
|
29
|
-
import { MatProgressSpinnerModule } from '@angular/material/progress-spinner';
|
|
30
|
-
import * as i1$9 from '@angular/material/progress-bar';
|
|
31
|
-
import { MatProgressBarModule } from '@angular/material/progress-bar';
|
|
32
|
-
import * as i6$1 from '@angular/material/paginator';
|
|
33
|
-
import { MatPaginatorModule, MatPaginator } from '@angular/material/paginator';
|
|
34
|
-
import * as i5$2 from '@angular/material/menu';
|
|
35
|
-
import { MatMenuModule } from '@angular/material/menu';
|
|
36
|
-
import * as i3$6 from '@angular/material/list';
|
|
37
|
-
import { MatListModule } from '@angular/material/list';
|
|
38
|
-
import * as i3 from '@angular/material/input';
|
|
39
|
-
import { MatInputModule } from '@angular/material/input';
|
|
40
|
-
import * as i2$2 from '@angular/material/icon';
|
|
41
|
-
import { MatIconModule } from '@angular/material/icon';
|
|
42
|
-
import { MatGridListModule } from '@angular/material/grid-list';
|
|
43
|
-
import { MatExpansionModule } from '@angular/material/expansion';
|
|
44
|
-
import * as i3$5 from '@angular/material/divider';
|
|
45
|
-
import { MatDividerModule } from '@angular/material/divider';
|
|
46
|
-
import * as i2$5 from '@angular/material/dialog';
|
|
47
|
-
import { MatDialogModule, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
48
|
-
import * as i1 from '@angular/material/datepicker';
|
|
49
|
-
import { MatDatepickerModule } from '@angular/material/datepicker';
|
|
50
|
-
import { MatStepperModule } from '@angular/material/stepper';
|
|
51
|
-
import * as i5$1 from '@angular/material/chips';
|
|
52
|
-
import { MatChipsModule } from '@angular/material/chips';
|
|
53
|
-
import * as i1$2 from '@angular/material/checkbox';
|
|
54
|
-
import { MatCheckboxModule } from '@angular/material/checkbox';
|
|
55
|
-
import { MatCardModule } from '@angular/material/card';
|
|
56
|
-
import * as i1$4 from '@angular/material/button-toggle';
|
|
57
|
-
import { MatButtonToggleModule } from '@angular/material/button-toggle';
|
|
58
|
-
import * as i1$6 from '@angular/material/button';
|
|
59
|
-
import { MatButtonModule } from '@angular/material/button';
|
|
60
|
-
import * as i1$8 from '@angular/material/bottom-sheet';
|
|
61
|
-
import { MatBottomSheetModule, MAT_BOTTOM_SHEET_DATA } from '@angular/material/bottom-sheet';
|
|
62
|
-
import { MatBadgeModule } from '@angular/material/badge';
|
|
63
|
-
import * as i1$5 from '@angular/material/autocomplete';
|
|
64
|
-
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
|
65
|
-
import * as i2$4 from '@angular/cdk/drag-drop';
|
|
66
|
-
import { DragDropModule, moveItemInArray } from '@angular/cdk/drag-drop';
|
|
67
|
-
import { CdkTreeModule } from '@angular/cdk/tree';
|
|
68
|
-
import { CdkTableModule } from '@angular/cdk/table';
|
|
69
|
-
import { CdkStepperModule } from '@angular/cdk/stepper';
|
|
70
|
-
import { ClipboardModule } from '@angular/cdk/clipboard';
|
|
71
|
-
import { A11yModule } from '@angular/cdk/a11y';
|
|
72
|
-
import * as i2 from '@angular/material/form-field';
|
|
73
|
-
import * as i4 from '@angular/common';
|
|
74
|
-
import { CommonModule } from '@angular/common';
|
|
75
|
-
import * as i5 from '@angular/forms';
|
|
76
|
-
import { FormGroup, FormControl, FormsModule, ReactiveFormsModule, FormBuilder, Validators } from '@angular/forms';
|
|
77
|
-
import * as i6 from '@angular/router';
|
|
78
|
-
import { RouterModule } from '@angular/router';
|
|
79
|
-
import * as i3$2 from '@angular/cdk/text-field';
|
|
80
|
-
import { startWith, map } from 'rxjs/operators';
|
|
81
|
-
import { ENTER, COMMA } from '@angular/cdk/keycodes';
|
|
82
|
-
import * as i4$1 from '@kolkov/angular-editor';
|
|
83
|
-
import { AngularEditorModule } from '@kolkov/angular-editor';
|
|
84
|
-
import * as i1$7 from '@angular/common/http';
|
|
85
|
-
import { HttpRequest, HttpEventType, provideHttpClient, withInterceptors } from '@angular/common/http';
|
|
86
|
-
import { Observable, Subject, from } from 'rxjs';
|
|
87
|
-
import { __awaiter } from 'tslib';
|
|
88
|
-
import { UserManager } from 'oidc-client';
|
|
89
|
-
|
|
90
|
-
class AngularmaterialModule {
|
|
91
|
-
}
|
|
92
|
-
AngularmaterialModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AngularmaterialModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
93
|
-
AngularmaterialModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: AngularmaterialModule, exports: [A11yModule,
|
|
94
|
-
ClipboardModule,
|
|
95
|
-
CdkStepperModule,
|
|
96
|
-
CdkTableModule,
|
|
97
|
-
CdkTreeModule,
|
|
98
|
-
DragDropModule,
|
|
99
|
-
MatAutocompleteModule,
|
|
100
|
-
MatBadgeModule,
|
|
101
|
-
MatBottomSheetModule,
|
|
102
|
-
MatButtonModule,
|
|
103
|
-
MatButtonToggleModule,
|
|
104
|
-
MatCardModule,
|
|
105
|
-
MatCheckboxModule,
|
|
106
|
-
MatChipsModule,
|
|
107
|
-
MatStepperModule,
|
|
108
|
-
MatDatepickerModule,
|
|
109
|
-
MatDialogModule,
|
|
110
|
-
MatDividerModule,
|
|
111
|
-
MatExpansionModule,
|
|
112
|
-
MatGridListModule,
|
|
113
|
-
MatIconModule,
|
|
114
|
-
MatInputModule,
|
|
115
|
-
MatListModule,
|
|
116
|
-
MatMenuModule,
|
|
117
|
-
MatNativeDateModule,
|
|
118
|
-
MatPaginatorModule,
|
|
119
|
-
MatProgressBarModule,
|
|
120
|
-
MatProgressSpinnerModule,
|
|
121
|
-
MatRadioModule,
|
|
122
|
-
MatRippleModule,
|
|
123
|
-
MatSelectModule,
|
|
124
|
-
MatSidenavModule,
|
|
125
|
-
MatSliderModule,
|
|
126
|
-
MatSlideToggleModule,
|
|
127
|
-
MatSnackBarModule,
|
|
128
|
-
MatSortModule,
|
|
129
|
-
MatTableModule,
|
|
130
|
-
MatTabsModule,
|
|
131
|
-
MatToolbarModule,
|
|
132
|
-
MatTooltipModule,
|
|
133
|
-
MatTreeModule,
|
|
134
|
-
OverlayModule,
|
|
135
|
-
PortalModule,
|
|
136
|
-
ScrollingModule] });
|
|
137
|
-
AngularmaterialModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AngularmaterialModule, imports: [A11yModule,
|
|
138
|
-
ClipboardModule,
|
|
139
|
-
CdkStepperModule,
|
|
140
|
-
CdkTableModule,
|
|
141
|
-
CdkTreeModule,
|
|
142
|
-
DragDropModule,
|
|
143
|
-
MatAutocompleteModule,
|
|
144
|
-
MatBadgeModule,
|
|
145
|
-
MatBottomSheetModule,
|
|
146
|
-
MatButtonModule,
|
|
147
|
-
MatButtonToggleModule,
|
|
148
|
-
MatCardModule,
|
|
149
|
-
MatCheckboxModule,
|
|
150
|
-
MatChipsModule,
|
|
151
|
-
MatStepperModule,
|
|
152
|
-
MatDatepickerModule,
|
|
153
|
-
MatDialogModule,
|
|
154
|
-
MatDividerModule,
|
|
155
|
-
MatExpansionModule,
|
|
156
|
-
MatGridListModule,
|
|
157
|
-
MatIconModule,
|
|
158
|
-
MatInputModule,
|
|
159
|
-
MatListModule,
|
|
160
|
-
MatMenuModule,
|
|
161
|
-
MatNativeDateModule,
|
|
162
|
-
MatPaginatorModule,
|
|
163
|
-
MatProgressBarModule,
|
|
164
|
-
MatProgressSpinnerModule,
|
|
165
|
-
MatRadioModule,
|
|
166
|
-
MatRippleModule,
|
|
167
|
-
MatSelectModule,
|
|
168
|
-
MatSidenavModule,
|
|
169
|
-
MatSliderModule,
|
|
170
|
-
MatSlideToggleModule,
|
|
171
|
-
MatSnackBarModule,
|
|
172
|
-
MatSortModule,
|
|
173
|
-
MatTableModule,
|
|
174
|
-
MatTabsModule,
|
|
175
|
-
MatToolbarModule,
|
|
176
|
-
MatTooltipModule,
|
|
177
|
-
MatTreeModule,
|
|
178
|
-
OverlayModule,
|
|
179
|
-
PortalModule,
|
|
180
|
-
ScrollingModule] });
|
|
181
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AngularmaterialModule, decorators: [{
|
|
182
|
-
type: NgModule,
|
|
183
|
-
args: [{
|
|
184
|
-
declarations: [],
|
|
185
|
-
exports: [
|
|
186
|
-
A11yModule,
|
|
187
|
-
ClipboardModule,
|
|
188
|
-
CdkStepperModule,
|
|
189
|
-
CdkTableModule,
|
|
190
|
-
CdkTreeModule,
|
|
191
|
-
DragDropModule,
|
|
192
|
-
MatAutocompleteModule,
|
|
193
|
-
MatBadgeModule,
|
|
194
|
-
MatBottomSheetModule,
|
|
195
|
-
MatButtonModule,
|
|
196
|
-
MatButtonToggleModule,
|
|
197
|
-
MatCardModule,
|
|
198
|
-
MatCheckboxModule,
|
|
199
|
-
MatChipsModule,
|
|
200
|
-
MatStepperModule,
|
|
201
|
-
MatDatepickerModule,
|
|
202
|
-
MatDialogModule,
|
|
203
|
-
MatDividerModule,
|
|
204
|
-
MatExpansionModule,
|
|
205
|
-
MatGridListModule,
|
|
206
|
-
MatIconModule,
|
|
207
|
-
MatInputModule,
|
|
208
|
-
MatListModule,
|
|
209
|
-
MatMenuModule,
|
|
210
|
-
MatNativeDateModule,
|
|
211
|
-
MatPaginatorModule,
|
|
212
|
-
MatProgressBarModule,
|
|
213
|
-
MatProgressSpinnerModule,
|
|
214
|
-
MatRadioModule,
|
|
215
|
-
MatRippleModule,
|
|
216
|
-
MatSelectModule,
|
|
217
|
-
MatSidenavModule,
|
|
218
|
-
MatSliderModule,
|
|
219
|
-
MatSlideToggleModule,
|
|
220
|
-
MatSnackBarModule,
|
|
221
|
-
MatSortModule,
|
|
222
|
-
MatTableModule,
|
|
223
|
-
MatTabsModule,
|
|
224
|
-
MatToolbarModule,
|
|
225
|
-
MatTooltipModule,
|
|
226
|
-
MatTreeModule,
|
|
227
|
-
OverlayModule,
|
|
228
|
-
PortalModule,
|
|
229
|
-
ScrollingModule
|
|
230
|
-
]
|
|
231
|
-
}]
|
|
232
|
-
}] });
|
|
233
|
-
|
|
234
|
-
class TextboxComponent {
|
|
235
|
-
}
|
|
236
|
-
TextboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TextboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
237
|
-
TextboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: TextboxComponent, selector: "falcon-textbox", ngImport: i0, template: "<mat-form-field [formGroup]=\"formGroup\" [appearance]=\"control.appearance\" class=\"textbox-form\">\n <mat-label>{{control.label}}</mat-label>\n <input matInput [type]=\"control.type\" [formControlName]=\"control.formControlName\" [class]=\"control.class\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\">\n\n <span matPrefix [matTooltip]=\"control.prefix.toolTipText!\"\n [ngClass]=\"{'material-icons': control.prefix.isIcon}\">{{control.prefix.text}} </span>\n <span matSuffix [matTooltip]=\"control.suffix.toolTipText!\"\n [ngClass]=\"{'material-icons': control.suffix.isIcon}\">{{control.suffix.text}} </span>\n <mat-hint *ngIf=\"control.hint.link?.isLink; else elseBlock\">\n <ng-container *ngIf=\"control.hint.link?.queryParams !== undefined; else withoutQueryBlock\">\n <a [routerLink]=\"[control.hint.link?.routerLink]\" [queryParams]=\"{ query: control.hint.link?.queryParams }\"\n routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-container>\n </mat-hint>\n <ng-template #elseBlock>\n <mat-hint>{{control.hint.text}}</mat-hint>\n </ng-template>\n <ng-template #withoutQueryBlock>\n <a [routerLink]=\"[control.hint.link?.routerLink]\" routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-template>\n\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</mat-form-field>", styles: [".textbox-form{width:100%}\n"], dependencies: [{ kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]" }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]" }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
238
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TextboxComponent, decorators: [{
|
|
239
|
-
type: Component,
|
|
240
|
-
args: [{ selector: 'falcon-textbox', template: "<mat-form-field [formGroup]=\"formGroup\" [appearance]=\"control.appearance\" class=\"textbox-form\">\n <mat-label>{{control.label}}</mat-label>\n <input matInput [type]=\"control.type\" [formControlName]=\"control.formControlName\" [class]=\"control.class\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\">\n\n <span matPrefix [matTooltip]=\"control.prefix.toolTipText!\"\n [ngClass]=\"{'material-icons': control.prefix.isIcon}\">{{control.prefix.text}} </span>\n <span matSuffix [matTooltip]=\"control.suffix.toolTipText!\"\n [ngClass]=\"{'material-icons': control.suffix.isIcon}\">{{control.suffix.text}} </span>\n <mat-hint *ngIf=\"control.hint.link?.isLink; else elseBlock\">\n <ng-container *ngIf=\"control.hint.link?.queryParams !== undefined; else withoutQueryBlock\">\n <a [routerLink]=\"[control.hint.link?.routerLink]\" [queryParams]=\"{ query: control.hint.link?.queryParams }\"\n routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-container>\n </mat-hint>\n <ng-template #elseBlock>\n <mat-hint>{{control.hint.text}}</mat-hint>\n </ng-template>\n <ng-template #withoutQueryBlock>\n <a [routerLink]=\"[control.hint.link?.routerLink]\" routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-template>\n\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</mat-form-field>", styles: [".textbox-form{width:100%}\n"] }]
|
|
241
|
-
}] });
|
|
242
|
-
|
|
243
|
-
class TextareaComponent {
|
|
244
|
-
}
|
|
245
|
-
TextareaComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TextareaComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
246
|
-
TextareaComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: TextareaComponent, selector: "falcon-textarea", ngImport: i0, template: "<mat-form-field [appearance]=\"control.appearance\" [formGroup]=\"formGroup\" [floatLabel]=\"control.floatLabel\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\" class=\"textarea-form\">\n <mat-label>{{control.label}}</mat-label>\n\n <textarea matInput [formControlName]=\"control.formControlName\" [placeholder]=\"control.placeHolder\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [cdkTextareaAutosize]=\"control.textAreaProperty.cdkTextareaAutosize\"\n [cdkAutosizeMinRows]=\"control.textAreaProperty.cdkAutosizeMinRows\"\n [cdkAutosizeMaxRows]=\"control.textAreaProperty.cdkAutosizeMaxRows\" [rows]=\"control.textAreaProperty.rows\"\n [cols]=\"control.textAreaProperty.cols\"></textarea>\n\n <span matPrefix [ngClass]=\"{'material-icons': control.prefix.isIcon}\">{{control.prefix.text}}</span>\n <span matSuffix [ngClass]=\"{'material-icons': control.suffix.isIcon}\">{{control.suffix.text}}</span>\n\n\n <mat-hint>{{control.hint.text}}</mat-hint>\n\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</mat-form-field>", styles: [".textarea-form{width:100%}\n"], dependencies: [{ kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]" }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]" }, { kind: "directive", type: i3$2.CdkTextareaAutosize, selector: "textarea[cdkTextareaAutosize]", inputs: ["cdkAutosizeMinRows", "cdkAutosizeMaxRows", "cdkTextareaAutosize", "placeholder"], exportAs: ["cdkTextareaAutosize"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
247
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
248
|
-
type: Component,
|
|
249
|
-
args: [{ selector: 'falcon-textarea', template: "<mat-form-field [appearance]=\"control.appearance\" [formGroup]=\"formGroup\" [floatLabel]=\"control.floatLabel\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\" class=\"textarea-form\">\n <mat-label>{{control.label}}</mat-label>\n\n <textarea matInput [formControlName]=\"control.formControlName\" [placeholder]=\"control.placeHolder\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [cdkTextareaAutosize]=\"control.textAreaProperty.cdkTextareaAutosize\"\n [cdkAutosizeMinRows]=\"control.textAreaProperty.cdkAutosizeMinRows\"\n [cdkAutosizeMaxRows]=\"control.textAreaProperty.cdkAutosizeMaxRows\" [rows]=\"control.textAreaProperty.rows\"\n [cols]=\"control.textAreaProperty.cols\"></textarea>\n\n <span matPrefix [ngClass]=\"{'material-icons': control.prefix.isIcon}\">{{control.prefix.text}}</span>\n <span matSuffix [ngClass]=\"{'material-icons': control.suffix.isIcon}\">{{control.suffix.text}}</span>\n\n\n <mat-hint>{{control.hint.text}}</mat-hint>\n\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</mat-form-field>", styles: [".textarea-form{width:100%}\n"] }]
|
|
250
|
-
}] });
|
|
251
|
-
|
|
252
|
-
class SelectComponent {
|
|
253
|
-
constructor() {
|
|
254
|
-
this.selectionChange = new EventEmitter();
|
|
255
|
-
}
|
|
256
|
-
ngOnInit() {
|
|
257
|
-
if (this.formGroup === undefined) {
|
|
258
|
-
this.formGroup = new FormGroup({
|
|
259
|
-
default: new FormControl(),
|
|
260
|
-
});
|
|
261
|
-
}
|
|
262
|
-
}
|
|
263
|
-
selectChange($event) {
|
|
264
|
-
var _a;
|
|
265
|
-
this.selectionChange.emit($event.value);
|
|
266
|
-
if (this.control.event !== undefined)
|
|
267
|
-
(_a = this.control.event.change) === null || _a === void 0 ? void 0 : _a.emit($event);
|
|
268
|
-
}
|
|
269
|
-
}
|
|
270
|
-
SelectComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
271
|
-
SelectComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: SelectComponent, selector: "falcon-select", outputs: { selectionChange: "selectionChange" }, ngImport: i0, template: "<mat-form-field [appearance]=\"control.appearance\" [formGroup]=\"formGroup\" [floatLabel]=\"control.floatLabel\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <mat-select [multiple]=\"control.selectProperty.multiple\" (selectionChange)=\"selectChange($event)\"\n [formControlName]=\"control.formControlName != undefined ? control.formControlName : 'default'\"\n [placeholder]=\"control.placeHolder\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\" [(value)]=\"control.value\">\n <mat-option *ngFor=\"let item of control.options\" [value]=\"item.key\" [disabled]=\"item.disabled\">\n {{item.value}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"control.hint?.show\">\n <ng-container *ngIf=\"control.hint?.link?.isLink; else elseBlock\">\n <ng-container *ngIf=\"control.hint?.link?.queryParams !== undefined; else withoutQueryBlock\">\n <a [routerLink]=\"[control.hint.link?.routerLink]\" [queryParams]=\"{ query: control.hint.link?.queryParams }\"\n routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-container>\n </ng-container>\n <ng-template #elseBlock>\n <span>{{control.hint.text}}</span>\n </ng-template>\n <ng-template #withoutQueryBlock>\n <a [routerLink]=\"[control.hint.link?.routerLink]\" routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-template>\n </mat-hint>\n</mat-form-field>", styles: [""], dependencies: [{ kind: "component", type: i2$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "component", type: i3$3.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }] });
|
|
272
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SelectComponent, decorators: [{
|
|
273
|
-
type: Component,
|
|
274
|
-
args: [{ selector: 'falcon-select', template: "<mat-form-field [appearance]=\"control.appearance\" [formGroup]=\"formGroup\" [floatLabel]=\"control.floatLabel\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <mat-select [multiple]=\"control.selectProperty.multiple\" (selectionChange)=\"selectChange($event)\"\n [formControlName]=\"control.formControlName != undefined ? control.formControlName : 'default'\"\n [placeholder]=\"control.placeHolder\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\" [(value)]=\"control.value\">\n <mat-option *ngFor=\"let item of control.options\" [value]=\"item.key\" [disabled]=\"item.disabled\">\n {{item.value}}\n </mat-option>\n </mat-select>\n <mat-hint *ngIf=\"control.hint?.show\">\n <ng-container *ngIf=\"control.hint?.link?.isLink; else elseBlock\">\n <ng-container *ngIf=\"control.hint?.link?.queryParams !== undefined; else withoutQueryBlock\">\n <a [routerLink]=\"[control.hint.link?.routerLink]\" [queryParams]=\"{ query: control.hint.link?.queryParams }\"\n routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-container>\n </ng-container>\n <ng-template #elseBlock>\n <span>{{control.hint.text}}</span>\n </ng-template>\n <ng-template #withoutQueryBlock>\n <a [routerLink]=\"[control.hint.link?.routerLink]\" routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-template>\n </mat-hint>\n</mat-form-field>" }]
|
|
275
|
-
}], ctorParameters: function () { return []; }, propDecorators: { selectionChange: [{
|
|
276
|
-
type: Output
|
|
277
|
-
}] } });
|
|
278
|
-
|
|
279
|
-
class DatePickerComponent {
|
|
280
|
-
}
|
|
281
|
-
DatePickerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DatePickerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
282
|
-
DatePickerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: DatePickerComponent, selector: "falcon-date-picker", ngImport: i0, template: "<mat-form-field [appearance]=\"control.appearance\" [formGroup]=\"formGroup\"\n [floatLabel]=\"control.floatLabel\" [ngStyle]=\"control.style\"\n [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <input matInput [matDatepicker]=\"picker\" [formControlName]=\"control.formControlName\"\n [placeholder]=\"control.placeHolder\" [type]=\"control.type\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon *ngIf=\"control.suffix.isIcon\">keyboard_arrow_down</mat-icon>\n </mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-hint>{{control.hint.text}}</mat-hint>\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</mat-form-field>", styles: [""], dependencies: [{ kind: "component", type: i1.MatDatepicker, selector: "mat-datepicker", exportAs: ["matDatepicker"] }, { kind: "directive", type: i1.MatDatepickerInput, selector: "input[matDatepicker]", inputs: ["matDatepicker", "min", "max", "matDatepickerFilter"], exportAs: ["matDatepickerInput"] }, { kind: "component", type: i1.MatDatepickerToggle, selector: "mat-datepicker-toggle", inputs: ["for", "tabIndex", "aria-label", "disabled", "disableRipple"], exportAs: ["matDatepickerToggle"] }, { kind: "directive", type: i1.MatDatepickerToggleIcon, selector: "[matDatepickerToggleIcon]" }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
283
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DatePickerComponent, decorators: [{
|
|
284
|
-
type: Component,
|
|
285
|
-
args: [{ selector: 'falcon-date-picker', template: "<mat-form-field [appearance]=\"control.appearance\" [formGroup]=\"formGroup\"\n [floatLabel]=\"control.floatLabel\" [ngStyle]=\"control.style\"\n [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <input matInput [matDatepicker]=\"picker\" [formControlName]=\"control.formControlName\"\n [placeholder]=\"control.placeHolder\" [type]=\"control.type\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\">\n <mat-datepicker-toggle matSuffix [for]=\"picker\">\n <mat-icon matDatepickerToggleIcon *ngIf=\"control.suffix.isIcon\">keyboard_arrow_down</mat-icon>\n </mat-datepicker-toggle>\n <mat-datepicker #picker></mat-datepicker>\n <mat-hint>{{control.hint.text}}</mat-hint>\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</mat-form-field>" }]
|
|
286
|
-
}] });
|
|
287
|
-
|
|
288
|
-
class RadioComponent {
|
|
289
|
-
constructor() {
|
|
290
|
-
this.radioGroupChange = new EventEmitter();
|
|
291
|
-
}
|
|
292
|
-
ngOnInit() {
|
|
293
|
-
console.log(this.control.options);
|
|
294
|
-
if (this.formGroup === undefined) {
|
|
295
|
-
this.formGroup = new FormGroup({
|
|
296
|
-
default: new FormControl(),
|
|
297
|
-
});
|
|
298
|
-
}
|
|
299
|
-
}
|
|
300
|
-
radioGroupChangeEvent($event) {
|
|
301
|
-
this.radioGroupChange.emit($event.value);
|
|
302
|
-
}
|
|
303
|
-
}
|
|
304
|
-
RadioComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RadioComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
305
|
-
RadioComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: RadioComponent, selector: "falcon-radio", outputs: { radioGroupChange: "radioGroupChange" }, ngImport: i0, template: "<div [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [formGroup]=\"formGroup\">\n <label class=\"radio-label-padding\">{{control.label | titlecase}}</label>\n <mat-radio-group [attr.aria-label]=\"control.label\"\n [labelPosition]=\"control.appearance\"\n [formControlName]=\"control.formControlName != undefined ? control.formControlName : 'default'\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n (change)=\"radioGroupChangeEvent($event)\">\n <mat-radio-button [ngClass]=\"control.class\"\n *ngFor=\"let item of control.options\" [value]=\"item.value\">{{item.viewValue | titlecase}}\n </mat-radio-button>\n </mat-radio-group>\n</div>", styles: [".radio-group-column{display:flex;flex-direction:column;margin:15px 0}.radio-group-row{display:flex;flex-direction:row;margin:15px 0}.radio-button{margin:5px}\n"], dependencies: [{ kind: "directive", type: i1$1.MatRadioGroup, selector: "mat-radio-group", exportAs: ["matRadioGroup"] }, { kind: "component", type: i1$1.MatRadioButton, selector: "mat-radio-button", inputs: ["disableRipple", "tabIndex"], exportAs: ["matRadioButton"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i4.TitleCasePipe, name: "titlecase" }] });
|
|
306
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RadioComponent, decorators: [{
|
|
307
|
-
type: Component,
|
|
308
|
-
args: [{ selector: 'falcon-radio', template: "<div [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [formGroup]=\"formGroup\">\n <label class=\"radio-label-padding\">{{control.label | titlecase}}</label>\n <mat-radio-group [attr.aria-label]=\"control.label\"\n [labelPosition]=\"control.appearance\"\n [formControlName]=\"control.formControlName != undefined ? control.formControlName : 'default'\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n (change)=\"radioGroupChangeEvent($event)\">\n <mat-radio-button [ngClass]=\"control.class\"\n *ngFor=\"let item of control.options\" [value]=\"item.value\">{{item.viewValue | titlecase}}\n </mat-radio-button>\n </mat-radio-group>\n</div>", styles: [".radio-group-column{display:flex;flex-direction:column;margin:15px 0}.radio-group-row{display:flex;flex-direction:row;margin:15px 0}.radio-button{margin:5px}\n"] }]
|
|
309
|
-
}], propDecorators: { radioGroupChange: [{
|
|
310
|
-
type: Output
|
|
311
|
-
}] } });
|
|
312
|
-
|
|
313
|
-
class CheckboxComponent {
|
|
314
|
-
change($event) {
|
|
315
|
-
var _a, _b, _c;
|
|
316
|
-
if (this.control.event !== undefined)
|
|
317
|
-
(_c = (_b = (_a = this.control) === null || _a === void 0 ? void 0 : _a.event) === null || _b === void 0 ? void 0 : _b.change) === null || _c === void 0 ? void 0 : _c.emit($event);
|
|
318
|
-
}
|
|
319
|
-
}
|
|
320
|
-
CheckboxComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: CheckboxComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
321
|
-
CheckboxComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: CheckboxComponent, selector: "falcon-checkbox", ngImport: i0, template: "<div [formGroup]=\"formGroup\">\n <mat-checkbox [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [color]=\"control.color != null ? control.color : 'accent'\" [labelPosition]=\"control.labelPosition\"\n [formControlName]=\"control.formControlName\" (change)=\"change($event)\">\n {{control.label}}</mat-checkbox>\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1$2.MatCheckbox, selector: "mat-checkbox", inputs: ["disableRipple", "color", "tabIndex"], exportAs: ["matCheckbox"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
322
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
323
|
-
type: Component,
|
|
324
|
-
args: [{ selector: 'falcon-checkbox', template: "<div [formGroup]=\"formGroup\">\n <mat-checkbox [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [color]=\"control.color != null ? control.color : 'accent'\" [labelPosition]=\"control.labelPosition\"\n [formControlName]=\"control.formControlName\" (change)=\"change($event)\">\n {{control.label}}</mat-checkbox>\n</div>" }]
|
|
325
|
-
}] });
|
|
326
|
-
|
|
327
|
-
class SlideToggleComponent {
|
|
328
|
-
}
|
|
329
|
-
SlideToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SlideToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
330
|
-
SlideToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: SlideToggleComponent, selector: "falcon-slide-toggle", ngImport: i0, template: "<div [formGroup]=\"formGroup\">\n <mat-slide-toggle [labelPosition]=\"control.appearance\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [formControlName]=\"control.formControlName\" [color]=\"control.color\">\n {{control.label}}\n </mat-slide-toggle>\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1$3.MatSlideToggle, selector: "mat-slide-toggle", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matSlideToggle"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
331
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SlideToggleComponent, decorators: [{
|
|
332
|
-
type: Component,
|
|
333
|
-
args: [{ selector: 'falcon-slide-toggle', template: "<div [formGroup]=\"formGroup\">\n <mat-slide-toggle [labelPosition]=\"control.appearance\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [formControlName]=\"control.formControlName\" [color]=\"control.color\">\n {{control.label}}\n </mat-slide-toggle>\n</div>" }]
|
|
334
|
-
}] });
|
|
335
|
-
|
|
336
|
-
class SliderComponent {
|
|
337
|
-
}
|
|
338
|
-
SliderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SliderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
339
|
-
SliderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: SliderComponent, selector: "falcon-slider", ngImport: i0, template: "<div [ngStyle]=\"control.style\" [ngClass]=\"control.class\" [formGroup]=\"formGroup\">\n<mat-label>{{control.label}}</mat-label> \n <mat-slider\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [color]=\"control.color\"\n [max]=\"control.sliderProperty.max\"\n [min]=\"control.sliderProperty.min\"\n [step]=\"control.sliderProperty.step\">\n <input matSliderThumb [formControlName]=\"control.formControlName\">\n </mat-slider>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "component", type: i2$3.MatSlider, selector: "mat-slider", inputs: ["color", "disableRipple", "disabled", "discrete", "showTickMarks", "min", "max", "step", "displayWith"], exportAs: ["matSlider"] }, { kind: "directive", type: i2$3.MatSliderThumb, selector: "input[matSliderThumb]", inputs: ["value"], outputs: ["valueChange", "dragStart", "dragEnd"], exportAs: ["matSliderThumb"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }] });
|
|
340
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SliderComponent, decorators: [{
|
|
341
|
-
type: Component,
|
|
342
|
-
args: [{ selector: 'falcon-slider', template: "<div [ngStyle]=\"control.style\" [ngClass]=\"control.class\" [formGroup]=\"formGroup\">\n<mat-label>{{control.label}}</mat-label> \n <mat-slider\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [color]=\"control.color\"\n [max]=\"control.sliderProperty.max\"\n [min]=\"control.sliderProperty.min\"\n [step]=\"control.sliderProperty.step\">\n <input matSliderThumb [formControlName]=\"control.formControlName\">\n </mat-slider>\n</div>" }]
|
|
343
|
-
}] });
|
|
344
|
-
|
|
345
|
-
class ButtonToggleComponent {
|
|
346
|
-
constructor() {
|
|
347
|
-
this.toggleGroupChange = new EventEmitter();
|
|
348
|
-
}
|
|
349
|
-
ngOnInit() {
|
|
350
|
-
if (this.formGroup === undefined) {
|
|
351
|
-
this.formGroup = new FormGroup({
|
|
352
|
-
default: new FormControl()
|
|
353
|
-
});
|
|
354
|
-
}
|
|
355
|
-
}
|
|
356
|
-
toggleChange($event) {
|
|
357
|
-
this.toggleGroupChange.emit($event.value);
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
ButtonToggleComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ButtonToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
361
|
-
ButtonToggleComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ButtonToggleComponent, selector: "falcon-button-toggle", outputs: { toggleGroupChange: "toggleGroupChange" }, ngImport: i0, template: "<div [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [formGroup]=\"formGroup\">\n <mat-label [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n *ngIf=\"control.label != undefined\">\n {{control.label | titlecase}}\n </mat-label>\n <mat-button-toggle-group\n [formControlName]=\"control.formControlName != undefined ? control.formControlName : 'default'\"\n [appearance]=\"control.appearance\" [ngStyle]=\"control.style\"\n [ngClass]=\"control.class\" [attr.aria-label]=\"control.label\"\n class=\"botton-toggle\" (change)=\"toggleChange($event)\">\n <mat-button-toggle *ngFor=\"let item of control.options\" [value]=\"item?.value\"\n [ngStyle]=\"control.style\"\n [ngClass]=\"control.class\">\n <mat-icon [ngClass]=\"item?.class\" aria-hidden=\"false\" aria-label=\"item icon\" *ngIf=\"item?.icon != undefined\">\n {{item?.icon}}\n </mat-icon>\n {{item.viewValue | titlecase}}\n </mat-button-toggle>\n </mat-button-toggle-group>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$4.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$4.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i4.TitleCasePipe, name: "titlecase" }] });
|
|
362
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ButtonToggleComponent, decorators: [{
|
|
363
|
-
type: Component,
|
|
364
|
-
args: [{ selector: 'falcon-button-toggle', template: "<div [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [formGroup]=\"formGroup\">\n <mat-label [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n *ngIf=\"control.label != undefined\">\n {{control.label | titlecase}}\n </mat-label>\n <mat-button-toggle-group\n [formControlName]=\"control.formControlName != undefined ? control.formControlName : 'default'\"\n [appearance]=\"control.appearance\" [ngStyle]=\"control.style\"\n [ngClass]=\"control.class\" [attr.aria-label]=\"control.label\"\n class=\"botton-toggle\" (change)=\"toggleChange($event)\">\n <mat-button-toggle *ngFor=\"let item of control.options\" [value]=\"item?.value\"\n [ngStyle]=\"control.style\"\n [ngClass]=\"control.class\">\n <mat-icon [ngClass]=\"item?.class\" aria-hidden=\"false\" aria-label=\"item icon\" *ngIf=\"item?.icon != undefined\">\n {{item?.icon}}\n </mat-icon>\n {{item.viewValue | titlecase}}\n </mat-button-toggle>\n </mat-button-toggle-group>\n</div>" }]
|
|
365
|
-
}], propDecorators: { toggleGroupChange: [{
|
|
366
|
-
type: Output
|
|
367
|
-
}] } });
|
|
368
|
-
|
|
369
|
-
class AutoCompleteComponent {
|
|
370
|
-
constructor() {
|
|
371
|
-
this.autoCompleteControl = new FormControl();
|
|
372
|
-
}
|
|
373
|
-
ngOnInit() {
|
|
374
|
-
this.filteredOptions = this.autoCompleteControl.valueChanges.pipe(startWith(''), map(value => this._filter(value)));
|
|
375
|
-
}
|
|
376
|
-
_filter(value) {
|
|
377
|
-
const filterValue = value.toLowerCase();
|
|
378
|
-
return this.control.options.filter((option) => { var _a; return (_a = option === null || option === void 0 ? void 0 : option.key) === null || _a === void 0 ? void 0 : _a.toLowerCase().includes(filterValue); });
|
|
379
|
-
}
|
|
380
|
-
optionSelected(value) {
|
|
381
|
-
var _a, _b, _c;
|
|
382
|
-
(_c = (_a = this.formGroup) === null || _a === void 0 ? void 0 : _a.get((_b = this.control) === null || _b === void 0 ? void 0 : _b.formControlName)) === null || _c === void 0 ? void 0 : _c.setValue(value);
|
|
383
|
-
}
|
|
384
|
-
}
|
|
385
|
-
AutoCompleteComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AutoCompleteComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
386
|
-
AutoCompleteComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: AutoCompleteComponent, selector: "falcon-auto-complete", ngImport: i0, template: "<mat-form-field *ngIf=\"control.appearance != 'plain'; else plainInput\" [appearance]=\"control.appearance\"\n [formGroup]=\"formGroup\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <input matInput [formControl]=\"autoCompleteControl\" [formControlName]=\"control.formControlName\"\n [placeholder]=\"control.placeHolder\" [type]=\"control.type\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [matAutocomplete]=\"auto\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\">\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)='optionSelected($event.option.viewValue)'>\n <mat-option *ngFor=\"let item of filteredOptions | async\" [value]=\"item.key\">\n {{item.value}}\n </mat-option>\n </mat-autocomplete>\n\n <span matPrefix [matTooltip]=\"control.prefix.toolTipText!\"\n [ngClass]=\"{'material-icons': control.prefix.isIcon}\">{{control.prefix.text}} </span>\n <span matSuffix [matTooltip]=\"control.suffix.toolTipText!\"\n [ngClass]=\"{'material-icons': control.suffix.isIcon}\">{{control.suffix.text}} </span>\n\n <mat-hint>{{control.hint.text}}</mat-hint>\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</mat-form-field>\n\n<ng-template #plainInput>\n <div [formGroup]=\"formGroup\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <input type=\"text\" [formControl]=\"autoCompleteControl\" [formControlName]=\"control.formControlName\"\n [placeholder]=\"control.placeHolder\" [type]=\"control.type\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [matAutocomplete]=\"auto\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\"\n class=\"bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-purple-500\">\n </div>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)='optionSelected($event.option.viewValue)'>\n <mat-option *ngFor=\"let item of filteredOptions | async\" [value]=\"item.key\">\n {{item.value}}\n </mat-option>\n </mat-autocomplete>\n</ng-template>", styles: [""], dependencies: [{ kind: "component", type: i1$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i1$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i2.MatPrefix, selector: "[matPrefix], [matIconPrefix], [matTextPrefix]" }, { kind: "directive", type: i2.MatSuffix, selector: "[matSuffix], [matIconSuffix], [matTextSuffix]" }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
387
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AutoCompleteComponent, decorators: [{
|
|
388
|
-
type: Component,
|
|
389
|
-
args: [{ selector: 'falcon-auto-complete', template: "<mat-form-field *ngIf=\"control.appearance != 'plain'; else plainInput\" [appearance]=\"control.appearance\"\n [formGroup]=\"formGroup\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <input matInput [formControl]=\"autoCompleteControl\" [formControlName]=\"control.formControlName\"\n [placeholder]=\"control.placeHolder\" [type]=\"control.type\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [matAutocomplete]=\"auto\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\">\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)='optionSelected($event.option.viewValue)'>\n <mat-option *ngFor=\"let item of filteredOptions | async\" [value]=\"item.key\">\n {{item.value}}\n </mat-option>\n </mat-autocomplete>\n\n <span matPrefix [matTooltip]=\"control.prefix.toolTipText!\"\n [ngClass]=\"{'material-icons': control.prefix.isIcon}\">{{control.prefix.text}} </span>\n <span matSuffix [matTooltip]=\"control.suffix.toolTipText!\"\n [ngClass]=\"{'material-icons': control.suffix.isIcon}\">{{control.suffix.text}} </span>\n\n <mat-hint>{{control.hint.text}}</mat-hint>\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</mat-form-field>\n\n<ng-template #plainInput>\n <div [formGroup]=\"formGroup\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <input type=\"text\" [formControl]=\"autoCompleteControl\" [formControlName]=\"control.formControlName\"\n [placeholder]=\"control.placeHolder\" [type]=\"control.type\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [matAutocomplete]=\"auto\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\"\n class=\"bg-gray-200 appearance-none border-2 border-gray-200 rounded w-full py-2 px-4 text-gray-700 leading-tight focus:outline-none focus:bg-white focus:border-purple-500\">\n </div>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)='optionSelected($event.option.viewValue)'>\n <mat-option *ngFor=\"let item of filteredOptions | async\" [value]=\"item.key\">\n {{item.value}}\n </mat-option>\n </mat-autocomplete>\n</ng-template>" }]
|
|
390
|
-
}], ctorParameters: function () { return []; } });
|
|
391
|
-
|
|
392
|
-
class ChipComponent {
|
|
393
|
-
constructor(fb) {
|
|
394
|
-
this.fb = fb;
|
|
395
|
-
this.separatorKeysCodes = [ENTER, COMMA];
|
|
396
|
-
this.selectable = true;
|
|
397
|
-
this.removable = true;
|
|
398
|
-
this.addOnBlur = true;
|
|
399
|
-
this.autoCompleteControl = new FormControl('');
|
|
400
|
-
this.filteredOptions = this.autoCompleteControl.valueChanges.pipe(startWith(null), map((value) => { var _a; return value ? this._filter(value) : (_a = this.control) === null || _a === void 0 ? void 0 : _a.options.slice(); }));
|
|
401
|
-
}
|
|
402
|
-
ngOnInit() {
|
|
403
|
-
setTimeout(() => {
|
|
404
|
-
if (this.control.chipSelectedOptions.length > 0) {
|
|
405
|
-
this.items = this.formGroup.controls[this.control.formControlName];
|
|
406
|
-
this.control.chipSelectedOptions.forEach((value) => {
|
|
407
|
-
this.items.controls.push(this.createItem(value.value));
|
|
408
|
-
});
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
}
|
|
412
|
-
add(event) {
|
|
413
|
-
const input = event.input;
|
|
414
|
-
const value = event.value;
|
|
415
|
-
if ((value || '').trim()) {
|
|
416
|
-
this.control.chipSelectedOptions.push({
|
|
417
|
-
key: value.trim(),
|
|
418
|
-
value: value.trim(),
|
|
419
|
-
});
|
|
420
|
-
this.items = this.formGroup.get(this.control.formControlName);
|
|
421
|
-
this.items.push(this.createItem(value));
|
|
422
|
-
}
|
|
423
|
-
if (input) {
|
|
424
|
-
input.value = '';
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
createItem(value) {
|
|
428
|
-
return this.fb.group({
|
|
429
|
-
key: value,
|
|
430
|
-
value: value,
|
|
431
|
-
});
|
|
432
|
-
}
|
|
433
|
-
remove(option) {
|
|
434
|
-
const index = this.control.chipSelectedOptions.indexOf(option);
|
|
435
|
-
if (index >= 0) {
|
|
436
|
-
this.control.chipSelectedOptions.splice(index, 1);
|
|
437
|
-
this.items.removeAt(index);
|
|
438
|
-
}
|
|
439
|
-
}
|
|
440
|
-
optionSelected(event) {
|
|
441
|
-
var _a;
|
|
442
|
-
this.control.chipSelectedOptions.push({
|
|
443
|
-
key: event.option.value,
|
|
444
|
-
value: event.option.value,
|
|
445
|
-
});
|
|
446
|
-
this.items = this.formGroup.get(this.control.formControlName);
|
|
447
|
-
this.items.push(this.createItem(event.option.value));
|
|
448
|
-
this.chipAutoCompleteInput.nativeElement.value = '';
|
|
449
|
-
(_a = this.formGroup.get(this.control.formControlName)) === null || _a === void 0 ? void 0 : _a.setValue(null);
|
|
450
|
-
}
|
|
451
|
-
_filter(value) {
|
|
452
|
-
var _a, _b;
|
|
453
|
-
if (value !== null) {
|
|
454
|
-
const filterValue = value.toLowerCase();
|
|
455
|
-
return (_b = (_a = this.control) === null || _a === void 0 ? void 0 : _a.options) === null || _b === void 0 ? void 0 : _b.filter((option) => option.value.toLowerCase().includes(filterValue));
|
|
456
|
-
}
|
|
457
|
-
}
|
|
458
|
-
drop(event) {
|
|
459
|
-
moveItemInArray(this.control.options, event.previousIndex, event.currentIndex);
|
|
460
|
-
}
|
|
461
|
-
keyboardEnterEvent(event) {
|
|
462
|
-
var _a;
|
|
463
|
-
if (this.control.event !== undefined)
|
|
464
|
-
(_a = this.control.event.keyboardEnter) === null || _a === void 0 ? void 0 : _a.emit(event);
|
|
465
|
-
this.chipTextInput.nativeElement.value = '';
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
ChipComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChipComponent, deps: [{ token: i5.FormBuilder }], target: i0.ɵɵFactoryTarget.Component });
|
|
469
|
-
ChipComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ChipComponent, selector: "falcon-chip", inputs: { control: "control", formGroup: "formGroup" }, viewQueries: [{ propertyName: "chipAutoCompleteInput", first: true, predicate: ["chipAutoCompleteInput"], descendants: true }, { propertyName: "chipTextInput", first: true, predicate: ["chipTextInput"], descendants: true }, { propertyName: "matAutocomplete", first: true, predicate: ["auto"], descendants: true }], ngImport: i0, template: "<ng-container [ngSwitch]=\"control.type\">\n <mat-form-field class=\"chip-list\" *ngSwitchCase=\"'search'\" [appearance]=\"control.appearance\" [formGroup]=\"formGroup\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <mat-chip-grid #chipGrid aria-label=\"item selection\">\n <mat-chip-row *ngFor=\"let option of control.chipSelectedOptions\" [removable]=\"removable\"\n (removed)=\"remove(option)\">\n {{option.value}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip-row>\n\n <input matInput #chipAutoCompleteInput [formControl]=\"autoCompleteControl\"\n [formArrayName]=\"control.formControlName\" [placeholder]=\"control.placeHolder\" [ngStyle]=\"control.style\"\n [ngClass]=\"control.class\" [matAutocomplete]=\"auto\" [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"add($event)\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\"\n (keyup.enter)=\"keyboardEnterEvent($event)\">\n\n </mat-chip-grid>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"optionSelected($event)\">\n <mat-option *ngFor=\"let item of filteredOptions | async\" [value]=\"item.key\">\n {{item.value}}\n </mat-option>\n </mat-autocomplete>\n <mat-hint>\n <ng-container *ngIf=\"control.hint.link?.isLink; else elseBlock\">\n <ng-container *ngIf=\"control.hint.link?.queryParams !== undefined; else withoutQueryBlock\">\n <a [routerLink]=\"[control.hint.link?.routerLink]\" [queryParams]=\"{ query: control.hint.link?.queryParams }\"\n routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-container>\n </ng-container>\n <ng-template #elseBlock>\n <span>{{control.hint.text}}</span>\n </ng-template>\n <ng-template #withoutQueryBlock>\n <a [routerLink]=\"[control.hint.link?.routerLink]\"\n routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-template>\n </mat-hint>\n </mat-form-field>\n\n <mat-form-field class=\"chip-list\" *ngSwitchCase=\"'text'\" [appearance]=\"control.appearance\" [formGroup]=\"formGroup\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <mat-chip-grid #chipGrid aria-label=\"item selection\">\n <mat-chip-row *ngFor=\"let option of control.chipSelectedOptions\" [value]=\"selectable\" [removable]=\"removable\"\n (removed)=\"remove(option)\">\n {{option?.value}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip-row>\n\n <input matInput #chipTextInput [formArrayName]=\"control.formControlName\" multiple\n [placeholder]=\"control.placeHolder\"\n [matChipInputFor]=\"chipGrid\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"add($event)\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\"\n (keyup.enter)=\"keyboardEnterEvent($event)\">\n\n </mat-chip-grid>\n </mat-form-field>\n\n <mat-chip-listbox aria-label=\"Chips selection\" *ngSwitchDefault>\n <mat-chip color=\"{{control.color}}\" selected>{{control.label}}</mat-chip>\n </mat-chip-listbox>\n\n\n <mat-chip-set class=\"chip-list\" cdkDropList cdkDropListOrientation=\"horizontal\" (cdkDropListDropped)=\"drop($event)\"\n *ngSwitchCase=\"'dragDrop'\" class=\"example-chip\">\n <mat-chip class=\"example-box\" cdkDrag *ngFor=\"let option of control?.options\">\n {{option?.value}}\n </mat-chip>\n </mat-chip-set>\n\n</ng-container>", styles: [".chip-list{width:100%}\n"], dependencies: [{ kind: "directive", type: i2$4.CdkDropList, selector: "[cdkDropList], cdk-drop-list", inputs: ["cdkDropListConnectedTo", "cdkDropListData", "cdkDropListOrientation", "id", "cdkDropListLockAxis", "cdkDropListDisabled", "cdkDropListSortingDisabled", "cdkDropListEnterPredicate", "cdkDropListSortPredicate", "cdkDropListAutoScrollDisabled", "cdkDropListAutoScrollStep"], outputs: ["cdkDropListDropped", "cdkDropListEntered", "cdkDropListExited", "cdkDropListSorted"], exportAs: ["cdkDropList"] }, { kind: "directive", type: i2$4.CdkDrag, selector: "[cdkDrag]", inputs: ["cdkDragData", "cdkDragLockAxis", "cdkDragRootElement", "cdkDragBoundary", "cdkDragStartDelay", "cdkDragFreeDragPosition", "cdkDragDisabled", "cdkDragConstrainPosition", "cdkDragPreviewClass", "cdkDragPreviewContainer"], outputs: ["cdkDragStarted", "cdkDragReleased", "cdkDragEnded", "cdkDragEntered", "cdkDragExited", "cdkDragDropped", "cdkDragMoved"], exportAs: ["cdkDrag"] }, { kind: "component", type: i1$5.MatAutocomplete, selector: "mat-autocomplete", inputs: ["disableRipple"], exportAs: ["matAutocomplete"] }, { kind: "component", type: i2$1.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { kind: "directive", type: i1$5.MatAutocompleteTrigger, selector: "input[matAutocomplete], textarea[matAutocomplete]", exportAs: ["matAutocompleteTrigger"] }, { kind: "component", type: i5$1.MatChip, selector: "mat-basic-chip, mat-chip", inputs: ["color", "disabled", "disableRipple", "tabIndex", "role", "id", "aria-label", "value", "removable", "highlighted"], outputs: ["removed", "destroyed"], exportAs: ["matChip"] }, { kind: "component", type: i5$1.MatChipGrid, selector: "mat-chip-grid", inputs: ["tabIndex", "disabled", "placeholder", "required", "value", "errorStateMatcher"], outputs: ["change", "valueChange"] }, { kind: "directive", type: i5$1.MatChipInput, selector: "input[matChipInputFor]", inputs: ["matChipInputFor", "matChipInputAddOnBlur", "matChipInputSeparatorKeyCodes", "placeholder", "id", "disabled"], outputs: ["matChipInputTokenEnd"], exportAs: ["matChipInput", "matChipInputFor"] }, { kind: "component", type: i5$1.MatChipListbox, selector: "mat-chip-listbox", inputs: ["tabIndex", "multiple", "aria-orientation", "selectable", "compareWith", "required", "value"], outputs: ["change"] }, { kind: "directive", type: i5$1.MatChipRemove, selector: "[matChipRemove]" }, { kind: "component", type: i5$1.MatChipRow, selector: "mat-chip-row, mat-basic-chip-row", inputs: ["color", "disabled", "disableRipple", "tabIndex", "editable"], outputs: ["edited"] }, { kind: "component", type: i5$1.MatChipSet, selector: "mat-chip-set", inputs: ["disabled", "role"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i4.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { kind: "directive", type: i5.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: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i5.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "directive", type: i6.RouterLinkActive, selector: "[routerLinkActive]", inputs: ["routerLinkActiveOptions", "ariaCurrentWhenActive", "routerLinkActive"], outputs: ["isActiveChange"], exportAs: ["routerLinkActive"] }, { kind: "pipe", type: i4.AsyncPipe, name: "async" }] });
|
|
470
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ChipComponent, decorators: [{
|
|
471
|
-
type: Component,
|
|
472
|
-
args: [{ selector: 'falcon-chip', template: "<ng-container [ngSwitch]=\"control.type\">\n <mat-form-field class=\"chip-list\" *ngSwitchCase=\"'search'\" [appearance]=\"control.appearance\" [formGroup]=\"formGroup\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <mat-chip-grid #chipGrid aria-label=\"item selection\">\n <mat-chip-row *ngFor=\"let option of control.chipSelectedOptions\" [removable]=\"removable\"\n (removed)=\"remove(option)\">\n {{option.value}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip-row>\n\n <input matInput #chipAutoCompleteInput [formControl]=\"autoCompleteControl\"\n [formArrayName]=\"control.formControlName\" [placeholder]=\"control.placeHolder\" [ngStyle]=\"control.style\"\n [ngClass]=\"control.class\" [matAutocomplete]=\"auto\" [matChipInputFor]=\"chipGrid\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" (matChipInputTokenEnd)=\"add($event)\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\"\n (keyup.enter)=\"keyboardEnterEvent($event)\">\n\n </mat-chip-grid>\n <mat-autocomplete #auto=\"matAutocomplete\" (optionSelected)=\"optionSelected($event)\">\n <mat-option *ngFor=\"let item of filteredOptions | async\" [value]=\"item.key\">\n {{item.value}}\n </mat-option>\n </mat-autocomplete>\n <mat-hint>\n <ng-container *ngIf=\"control.hint.link?.isLink; else elseBlock\">\n <ng-container *ngIf=\"control.hint.link?.queryParams !== undefined; else withoutQueryBlock\">\n <a [routerLink]=\"[control.hint.link?.routerLink]\" [queryParams]=\"{ query: control.hint.link?.queryParams }\"\n routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-container>\n </ng-container>\n <ng-template #elseBlock>\n <span>{{control.hint.text}}</span>\n </ng-template>\n <ng-template #withoutQueryBlock>\n <a [routerLink]=\"[control.hint.link?.routerLink]\"\n routerLinkActive=\"router-link-active\">{{control.hint.text}}</a>\n </ng-template>\n </mat-hint>\n </mat-form-field>\n\n <mat-form-field class=\"chip-list\" *ngSwitchCase=\"'text'\" [appearance]=\"control.appearance\" [formGroup]=\"formGroup\"\n [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <mat-label>{{control.label}}</mat-label>\n <mat-chip-grid #chipGrid aria-label=\"item selection\">\n <mat-chip-row *ngFor=\"let option of control.chipSelectedOptions\" [value]=\"selectable\" [removable]=\"removable\"\n (removed)=\"remove(option)\">\n {{option?.value}}\n <mat-icon matChipRemove *ngIf=\"removable\">cancel</mat-icon>\n </mat-chip-row>\n\n <input matInput #chipTextInput [formArrayName]=\"control.formControlName\" multiple\n [placeholder]=\"control.placeHolder\"\n [matChipInputFor]=\"chipGrid\" [ngStyle]=\"control.style\" [ngClass]=\"control.class\"\n [matChipInputSeparatorKeyCodes]=\"separatorKeysCodes\" [matChipInputAddOnBlur]=\"addOnBlur\"\n (matChipInputTokenEnd)=\"add($event)\"\n [required]=\"formGroup.get(control.formControlName)?.errors !== null && formGroup.get(control.formControlName)?.errors?.['required']\"\n (keyup.enter)=\"keyboardEnterEvent($event)\">\n\n </mat-chip-grid>\n </mat-form-field>\n\n <mat-chip-listbox aria-label=\"Chips selection\" *ngSwitchDefault>\n <mat-chip color=\"{{control.color}}\" selected>{{control.label}}</mat-chip>\n </mat-chip-listbox>\n\n\n <mat-chip-set class=\"chip-list\" cdkDropList cdkDropListOrientation=\"horizontal\" (cdkDropListDropped)=\"drop($event)\"\n *ngSwitchCase=\"'dragDrop'\" class=\"example-chip\">\n <mat-chip class=\"example-box\" cdkDrag *ngFor=\"let option of control?.options\">\n {{option?.value}}\n </mat-chip>\n </mat-chip-set>\n\n</ng-container>", styles: [".chip-list{width:100%}\n"] }]
|
|
473
|
-
}], ctorParameters: function () { return [{ type: i5.FormBuilder }]; }, propDecorators: { control: [{
|
|
474
|
-
type: Input
|
|
475
|
-
}], formGroup: [{
|
|
476
|
-
type: Input
|
|
477
|
-
}], chipAutoCompleteInput: [{
|
|
478
|
-
type: ViewChild,
|
|
479
|
-
args: ['chipAutoCompleteInput']
|
|
480
|
-
}], chipTextInput: [{
|
|
481
|
-
type: ViewChild,
|
|
482
|
-
args: ['chipTextInput']
|
|
483
|
-
}], matAutocomplete: [{
|
|
484
|
-
type: ViewChild,
|
|
485
|
-
args: ['auto']
|
|
486
|
-
}] } });
|
|
487
|
-
|
|
488
|
-
class ButtonComponent {
|
|
489
|
-
constructor() {
|
|
490
|
-
this.btnClick = new EventEmitter();
|
|
491
|
-
}
|
|
492
|
-
childBtnClick() {
|
|
493
|
-
this.btnClick.emit("Button Click Event");
|
|
494
|
-
}
|
|
495
|
-
}
|
|
496
|
-
ButtonComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
497
|
-
ButtonComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ButtonComponent, selector: "falcon-button", inputs: { control: "control", formGroup: "formGroup" }, outputs: { btnClick: "btnClick" }, ngImport: i0, template: "<div [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <ng-container [ngSwitch]=\"control.appearance\">\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [color]=\"control.color\" [ngClass]=\"control.class\"\n [ngStyle]=\"control.style\" mat-button *ngSwitchCase=\"0\">\n <mat-icon *ngIf=\"control?.suffix?.isIcon\" style=\"margin-bottom: 1px;\">\n {{control.suffix.text}}</mat-icon> {{control.label}}\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\"\n mat-raised-button *ngSwitchCase=\"1\">\n <mat-icon *ngIf=\"control.suffix?.isIcon\" style=\"margin-bottom: 1px;\">\n {{control.suffix.text}}</mat-icon> {{control.label}}\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\"\n mat-stroked-button *ngSwitchCase=\"2\">\n <mat-icon *ngIf=\"control.suffix?.isIcon\" style=\"margin-bottom: 1px;\">\n {{control.suffix.text}}</mat-icon> {{control.label}}\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\"\n mat-flat-button *ngSwitchCase=\"3\">\n <mat-icon *ngIf=\"control.suffix.isIcon\" style=\"margin-bottom: 1px;\">\n {{control.suffix.text}}</mat-icon> {{control.label}}\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\"\n mat-icon-button [attr.aria-label]=\"control.label\" *ngSwitchCase=\"4\">\n <mat-icon>{{control.label}}</mat-icon>\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\" mat-fab\n [attr.aria-label]=\"control.label\" *ngSwitchCase=\"5\">\n <mat-icon>{{control.label}}</mat-icon>\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\" mat-mini-fab\n [attr.aria-label]=\"control.label\" *ngSwitchCase=\"6\">\n <mat-icon>{{control.label}}</mat-icon>\n </button>\n <a mat-stroked-button *ngSwitchCase=\"7\" [ngClass]=\"control.class\"\n [ngStyle]=\"control.style\" routerLink=\"[]\">{{control.label}}</a>\n <a mat-stroked-button *ngSwitchCase=\"8\" [ngClass]=\"control.class\"\n [ngStyle]=\"control.style\"\n href=\"{{control.value}}\">{{control.label}}</a>\n </ng-container>\n</div>", styles: [""], dependencies: [{ kind: "component", type: i1$6.MatAnchor, selector: "a[mat-button], a[mat-raised-button], a[mat-flat-button], a[mat-stroked-button]", inputs: ["disabled", "disableRipple", "color", "tabIndex"], exportAs: ["matButton", "matAnchor"] }, { kind: "component", type: i1$6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1$6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1$6.MatMiniFabButton, selector: "button[mat-mini-fab]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i1$6.MatFabButton, selector: "button[mat-fab]", inputs: ["disabled", "disableRipple", "color", "tabIndex", "extended"], exportAs: ["matButton"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i4.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i4.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "directive", type: i4.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { kind: "directive", type: i4.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }] });
|
|
498
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
499
|
-
type: Component,
|
|
500
|
-
args: [{ selector: 'falcon-button', template: "<div [ngStyle]=\"control.style\" [ngClass]=\"control.class\">\n <ng-container [ngSwitch]=\"control.appearance\">\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [color]=\"control.color\" [ngClass]=\"control.class\"\n [ngStyle]=\"control.style\" mat-button *ngSwitchCase=\"0\">\n <mat-icon *ngIf=\"control?.suffix?.isIcon\" style=\"margin-bottom: 1px;\">\n {{control.suffix.text}}</mat-icon> {{control.label}}\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\"\n mat-raised-button *ngSwitchCase=\"1\">\n <mat-icon *ngIf=\"control.suffix?.isIcon\" style=\"margin-bottom: 1px;\">\n {{control.suffix.text}}</mat-icon> {{control.label}}\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\"\n mat-stroked-button *ngSwitchCase=\"2\">\n <mat-icon *ngIf=\"control.suffix?.isIcon\" style=\"margin-bottom: 1px;\">\n {{control.suffix.text}}</mat-icon> {{control.label}}\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\"\n mat-flat-button *ngSwitchCase=\"3\">\n <mat-icon *ngIf=\"control.suffix.isIcon\" style=\"margin-bottom: 1px;\">\n {{control.suffix.text}}</mat-icon> {{control.label}}\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\"\n mat-icon-button [attr.aria-label]=\"control.label\" *ngSwitchCase=\"4\">\n <mat-icon>{{control.label}}</mat-icon>\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\" mat-fab\n [attr.aria-label]=\"control.label\" *ngSwitchCase=\"5\">\n <mat-icon>{{control.label}}</mat-icon>\n </button>\n <button [disabled]=\"control.disabled\" (click)=\"childBtnClick()\"\n [type]=\"control.type\" [ngClass]=\"control.class\"\n [color]=\"control.color\" [ngStyle]=\"control.style\" mat-mini-fab\n [attr.aria-label]=\"control.label\" *ngSwitchCase=\"6\">\n <mat-icon>{{control.label}}</mat-icon>\n </button>\n <a mat-stroked-button *ngSwitchCase=\"7\" [ngClass]=\"control.class\"\n [ngStyle]=\"control.style\" routerLink=\"[]\">{{control.label}}</a>\n <a mat-stroked-button *ngSwitchCase=\"8\" [ngClass]=\"control.class\"\n [ngStyle]=\"control.style\"\n href=\"{{control.value}}\">{{control.label}}</a>\n </ng-container>\n</div>" }]
|
|
501
|
-
}], propDecorators: { control: [{
|
|
502
|
-
type: Input
|
|
503
|
-
}], formGroup: [{
|
|
504
|
-
type: Input
|
|
505
|
-
}], btnClick: [{
|
|
506
|
-
type: Output
|
|
507
|
-
}] } });
|
|
508
|
-
|
|
509
|
-
class RichTextEditorComponent {
|
|
510
|
-
}
|
|
511
|
-
RichTextEditorComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RichTextEditorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
512
|
-
RichTextEditorComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: RichTextEditorComponent, selector: "lib-rich-text-editor", ngImport: i0, template: "<ng-container [formGroup]=\"formGroup\">\n <mat-label>{{control.label}}</mat-label>\n <angular-editor [formControlName]=\"control.formControlName\" [config]=\"control.editorProperty\">\n </angular-editor>\n <mat-hint>{{control.hint.text}}</mat-hint>\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</ng-container>", styles: [""], dependencies: [{ kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "directive", type: i2.MatHint, selector: "mat-hint", inputs: ["align", "id"] }, { kind: "directive", type: i2.MatError, selector: "mat-error, [matError]", inputs: ["id"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i5.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i5.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: i4$1.AngularEditorComponent, selector: "angular-editor", inputs: ["id", "config", "placeholder", "tabIndex"], outputs: ["html", "viewMode", "blur", "focus"] }] });
|
|
513
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: RichTextEditorComponent, decorators: [{
|
|
514
|
-
type: Component,
|
|
515
|
-
args: [{ selector: 'lib-rich-text-editor', template: "<ng-container [formGroup]=\"formGroup\">\n <mat-label>{{control.label}}</mat-label>\n <angular-editor [formControlName]=\"control.formControlName\" [config]=\"control.editorProperty\">\n </angular-editor>\n <mat-hint>{{control.hint.text}}</mat-hint>\n <ng-container *ngFor=\"let validation of control.validations;\" ngProjectAs=\"mat-error\">\n <mat-error *ngIf=\"formGroup.get(control.formControlName)?.hasError(validation.name)\">{{validation.message}}\n </mat-error>\n </ng-container>\n</ng-container>" }]
|
|
516
|
-
}] });
|
|
517
|
-
|
|
518
|
-
class Constant {
|
|
519
|
-
}
|
|
520
|
-
Constant.ComponentMapper = [
|
|
521
|
-
TextboxComponent,
|
|
522
|
-
TextareaComponent,
|
|
523
|
-
SelectComponent,
|
|
524
|
-
DatePickerComponent,
|
|
525
|
-
RadioComponent,
|
|
526
|
-
CheckboxComponent,
|
|
527
|
-
ButtonComponent,
|
|
528
|
-
SlideToggleComponent,
|
|
529
|
-
SliderComponent,
|
|
530
|
-
ButtonToggleComponent,
|
|
531
|
-
AutoCompleteComponent,
|
|
532
|
-
ChipComponent,
|
|
533
|
-
RichTextEditorComponent,
|
|
534
|
-
//DividerComponent,
|
|
535
|
-
];
|
|
536
|
-
|
|
537
|
-
class ReactiveFieldDirective {
|
|
538
|
-
constructor(viewContainerRef) {
|
|
539
|
-
this.viewContainerRef = viewContainerRef;
|
|
540
|
-
}
|
|
541
|
-
ngOnInit() {
|
|
542
|
-
if (this.control !== undefined) {
|
|
543
|
-
this.componentRef = this.viewContainerRef.createComponent(Constant.ComponentMapper[this.control.controlType]);
|
|
544
|
-
this.componentRef.instance.control = this.control;
|
|
545
|
-
this.componentRef.instance.formGroup = this.formGroup;
|
|
546
|
-
}
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
|
-
ReactiveFieldDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ReactiveFieldDirective, deps: [{ token: i0.ViewContainerRef }], target: i0.ɵɵFactoryTarget.Directive });
|
|
550
|
-
ReactiveFieldDirective.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "15.0.1", type: ReactiveFieldDirective, selector: "[reactiveField]", inputs: { control: "control", formGroup: "formGroup" }, ngImport: i0 });
|
|
551
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ReactiveFieldDirective, decorators: [{
|
|
552
|
-
type: Directive,
|
|
553
|
-
args: [{
|
|
554
|
-
selector: '[reactiveField]'
|
|
555
|
-
}]
|
|
556
|
-
}], ctorParameters: function () { return [{ type: i0.ViewContainerRef }]; }, propDecorators: { control: [{
|
|
557
|
-
type: Input
|
|
558
|
-
}], formGroup: [{
|
|
559
|
-
type: Input
|
|
560
|
-
}] } });
|
|
561
|
-
|
|
562
|
-
class ControlBuilderComponent {
|
|
563
|
-
}
|
|
564
|
-
ControlBuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ControlBuilderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
565
|
-
ControlBuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ControlBuilderComponent, selector: "control-builder", inputs: { layout: "layout", formGroup: "formGroup" }, ngImport: i0, template: "<div [class]=\"layout.class\">\n <ng-container *ngFor=\"let control of layout.baseControls\">\n <ng-container reactiveField [control]=\"control\" [formGroup]=\"formGroup\"></ng-container>\n </ng-container>\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i5.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i5.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: ReactiveFieldDirective, selector: "[reactiveField]", inputs: ["control", "formGroup"] }] });
|
|
566
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ControlBuilderComponent, decorators: [{
|
|
567
|
-
type: Component,
|
|
568
|
-
args: [{ selector: 'control-builder', template: "<div [class]=\"layout.class\">\n <ng-container *ngFor=\"let control of layout.baseControls\">\n <ng-container reactiveField [control]=\"control\" [formGroup]=\"formGroup\"></ng-container>\n </ng-container>\n</div>" }]
|
|
569
|
-
}], propDecorators: { layout: [{
|
|
570
|
-
type: Input
|
|
571
|
-
}], formGroup: [{
|
|
572
|
-
type: Input
|
|
573
|
-
}] } });
|
|
574
|
-
|
|
575
|
-
class EnvironmentViewModel {
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
class IGenericHttpClient {
|
|
579
|
-
}
|
|
580
|
-
IGenericHttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: IGenericHttpClient, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
581
|
-
IGenericHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: IGenericHttpClient });
|
|
582
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: IGenericHttpClient, decorators: [{
|
|
583
|
-
type: Injectable
|
|
584
|
-
}] });
|
|
585
|
-
|
|
586
|
-
class LoggerService {
|
|
587
|
-
constructor() {
|
|
588
|
-
this.initialized = false;
|
|
589
|
-
this._level = "Warnings" /* LoggingLevel.Warnings */;
|
|
590
|
-
}
|
|
591
|
-
initialize(appSettings) {
|
|
592
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
593
|
-
if (this.initialized)
|
|
594
|
-
return;
|
|
595
|
-
this._level = appSettings.loggingLevel;
|
|
596
|
-
this.initialized = true;
|
|
597
|
-
});
|
|
598
|
-
}
|
|
599
|
-
log(message, level = "Warnings" /* LoggingLevel.Warnings */, ...optionalParams) {
|
|
600
|
-
if (this.shouldLog(level)) {
|
|
601
|
-
switch (level) {
|
|
602
|
-
case "Errors" /* LoggingLevel.Errors */:
|
|
603
|
-
console.error(message, optionalParams);
|
|
604
|
-
break;
|
|
605
|
-
case "Warnings" /* LoggingLevel.Warnings */:
|
|
606
|
-
console.warn(message, optionalParams);
|
|
607
|
-
break;
|
|
608
|
-
case "Info" /* LoggingLevel.Info */:
|
|
609
|
-
console.info(message, optionalParams);
|
|
610
|
-
break;
|
|
611
|
-
default:
|
|
612
|
-
console.debug(message, optionalParams);
|
|
613
|
-
}
|
|
614
|
-
}
|
|
615
|
-
}
|
|
616
|
-
shouldLog(level) {
|
|
617
|
-
if (this._level === "None" /* LoggingLevel.None */) {
|
|
618
|
-
return false;
|
|
619
|
-
}
|
|
620
|
-
else if (this._level === "Errors" /* LoggingLevel.Errors */) {
|
|
621
|
-
return level === "Errors" /* LoggingLevel.Errors */;
|
|
622
|
-
}
|
|
623
|
-
else if (this._level === "Warnings" /* LoggingLevel.Warnings */) {
|
|
624
|
-
return level === "Errors" /* LoggingLevel.Errors */ || level === "Warnings" /* LoggingLevel.Warnings */;
|
|
625
|
-
}
|
|
626
|
-
else if (this._level === "Info" /* LoggingLevel.Info */) {
|
|
627
|
-
return level === "Errors" /* LoggingLevel.Errors */ || level === "Warnings" /* LoggingLevel.Warnings */ || level === "Info" /* LoggingLevel.Info */;
|
|
628
|
-
}
|
|
629
|
-
else {
|
|
630
|
-
return true;
|
|
631
|
-
}
|
|
632
|
-
}
|
|
633
|
-
error(message, ...optionalParams) {
|
|
634
|
-
this.log(message, "Errors" /* LoggingLevel.Errors */, optionalParams);
|
|
635
|
-
}
|
|
636
|
-
warning(message, ...optionalParams) {
|
|
637
|
-
this.log(message, "Warnings" /* LoggingLevel.Warnings */, optionalParams);
|
|
638
|
-
}
|
|
639
|
-
info(message, ...optionalParams) {
|
|
640
|
-
this.log(message, "Info" /* LoggingLevel.Info */, optionalParams);
|
|
641
|
-
}
|
|
642
|
-
verbose(message, ...optionalParams) {
|
|
643
|
-
this.log(message, "Verbose" /* LoggingLevel.Verbose */, optionalParams);
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
LoggerService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: LoggerService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
647
|
-
LoggerService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: LoggerService, providedIn: 'root' });
|
|
648
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: LoggerService, decorators: [{
|
|
649
|
-
type: Injectable,
|
|
650
|
-
args: [{
|
|
651
|
-
providedIn: 'root'
|
|
652
|
-
}]
|
|
653
|
-
}], ctorParameters: function () { return []; } });
|
|
654
|
-
function loggerServiceFactory(loggerService, appSettings) {
|
|
655
|
-
return () => __awaiter(this, void 0, void 0, function* () {
|
|
656
|
-
appSettings.isServiceReady.subscribe(item => {
|
|
657
|
-
if (item)
|
|
658
|
-
loggerService.initialize(appSettings.getAppsettingValue());
|
|
659
|
-
});
|
|
660
|
-
});
|
|
661
|
-
}
|
|
662
|
-
;
|
|
663
|
-
|
|
664
|
-
class GenericHttpClient {
|
|
665
|
-
constructor(httpClient, environment, _snackBar, logger) {
|
|
666
|
-
this.httpClient = httpClient;
|
|
667
|
-
this.environment = environment;
|
|
668
|
-
this._snackBar = _snackBar;
|
|
669
|
-
this.logger = logger;
|
|
670
|
-
this.snackBarViewModel = {};
|
|
671
|
-
this.isHttpError = false;
|
|
672
|
-
}
|
|
673
|
-
/**
|
|
674
|
-
* @description
|
|
675
|
-
* Generic Http GET method to Get the response and bind to the view model
|
|
676
|
-
* @param {string} destinationUrl endPoint it doesn't need / in front of the end point.
|
|
677
|
-
* @param {IRequestOptions} options options of the request like headers, body, etc.
|
|
678
|
-
* @returns {Observable<T>}
|
|
679
|
-
* @usageNotes
|
|
680
|
-
* The following snippet shows how to use this method
|
|
681
|
-
* ```ts
|
|
682
|
-
* this.genericHttpService.Get("get_url").subscribe(data => {
|
|
683
|
-
* console.log('success');
|
|
684
|
-
* }, error => {
|
|
685
|
-
* console.log(error);
|
|
686
|
-
* });
|
|
687
|
-
* ```
|
|
688
|
-
*/
|
|
689
|
-
get(destinationUrl, options) {
|
|
690
|
-
return this.request("GET" /* HttpMethod.Get */, destinationUrl, options);
|
|
691
|
-
}
|
|
692
|
-
/**
|
|
693
|
-
* @description
|
|
694
|
-
* Generic Http post method to post the view model and bind the return view model
|
|
695
|
-
* @param {string} destinationUrl endPoint it doesn't need / in front of the end point.
|
|
696
|
-
* @param {IRequestOptions} options options of the request like headers, body, etc.
|
|
697
|
-
* @returns {Observable<T>}
|
|
698
|
-
* @usageNotes
|
|
699
|
-
* The following snippet shows how to use this method
|
|
700
|
-
* ```ts
|
|
701
|
-
* this.genericHttpClientService.Post(post-url,post-view-model).subscribe(item => {
|
|
702
|
-
* console.log(item);
|
|
703
|
-
* },
|
|
704
|
-
* err => {
|
|
705
|
-
* console.log(err);
|
|
706
|
-
* });
|
|
707
|
-
* ```
|
|
708
|
-
*/
|
|
709
|
-
post(destinationUrl, options) {
|
|
710
|
-
return this.request("POST" /* HttpMethod.Post */, destinationUrl, options);
|
|
711
|
-
}
|
|
712
|
-
/**
|
|
713
|
-
* @description
|
|
714
|
-
* Generic Http Put method to post the view model and bind the return view model
|
|
715
|
-
* @param {string} destinationUrl endPoint it doesn't need / in front of the end point.
|
|
716
|
-
* @param {IRequestOptions} options options of the request like headers, body, etc.
|
|
717
|
-
* @returns {Observable<T>}
|
|
718
|
-
* @usageNotes
|
|
719
|
-
* The following snippet shows how to use this method
|
|
720
|
-
* ```ts
|
|
721
|
-
* this.genericHttpClientService.Put(post-url, post-view-model).subscribe(item => {
|
|
722
|
-
* console.log(item);
|
|
723
|
-
* },
|
|
724
|
-
* err => {
|
|
725
|
-
* console.log(err);
|
|
726
|
-
* });
|
|
727
|
-
* ```
|
|
728
|
-
*/
|
|
729
|
-
put(destinationUrl, options) {
|
|
730
|
-
return this.request("PUT" /* HttpMethod.Put */, destinationUrl, options);
|
|
731
|
-
}
|
|
732
|
-
/**
|
|
733
|
-
* @description
|
|
734
|
-
* Generic Http post method to post the view model and bind the return view model
|
|
735
|
-
* @param {string} destinationUrl endPoint it doesn't need / in front of the end point.
|
|
736
|
-
* @param {IRequestOptions} options options of the request like headers, body, etc.
|
|
737
|
-
* @returns {Observable<T>}
|
|
738
|
-
* @usageNotes
|
|
739
|
-
* The following snippet shows how to use this method
|
|
740
|
-
* ```ts
|
|
741
|
-
* this.genericHttpClientService.Post(post-url,post-view-model).subscribe(item => {
|
|
742
|
-
* console.log(item);
|
|
743
|
-
* },
|
|
744
|
-
* err => {
|
|
745
|
-
* console.log(err);
|
|
746
|
-
* });
|
|
747
|
-
* ```
|
|
748
|
-
*/
|
|
749
|
-
patch(destinationUrl, options) {
|
|
750
|
-
return this.request("PATCH" /* HttpMethod.Patch */, destinationUrl, options);
|
|
751
|
-
}
|
|
752
|
-
/**
|
|
753
|
-
* @description
|
|
754
|
-
* Generic Http Delete method to Delete the item and bind the return view model
|
|
755
|
-
* @param {string} destinationUrl endPoint it doesn't need / in front of the end point.
|
|
756
|
-
* @param {IRequestOptions} options options of the request like headers, body, etc.
|
|
757
|
-
* @returns {Observable<T>}
|
|
758
|
-
* @usageNotes
|
|
759
|
-
* The following snippet shows how to use this method
|
|
760
|
-
* ```ts
|
|
761
|
-
* this.genericHttpClientService.Delete(this.deleteUserUrl).subscribe(item => {
|
|
762
|
-
* console.log('success');
|
|
763
|
-
* }, error => {
|
|
764
|
-
* console.log(error);
|
|
765
|
-
* });
|
|
766
|
-
* ```
|
|
767
|
-
*/
|
|
768
|
-
delete(destinationUrl, options) {
|
|
769
|
-
return this.request("DELETE" /* HttpMethod.Delete */, destinationUrl, options);
|
|
770
|
-
}
|
|
771
|
-
/**
|
|
772
|
-
* @description
|
|
773
|
-
* Http request method to accept different method type and params
|
|
774
|
-
* @param {string} method Http methods - GET, POST, PUT, DELETE.
|
|
775
|
-
* @param {string} destinationUrl endPoint it doesn't need / in front of the end point.
|
|
776
|
-
* @param {IRequestOptions} options options of the request like headers, body, etc.
|
|
777
|
-
* @returns {Observable<T>}
|
|
778
|
-
* @usageNotes
|
|
779
|
-
* The following snippet shows how to use this method
|
|
780
|
-
* ```ts
|
|
781
|
-
* this.request<T>(HttpMethod.Delete, destinationUrl, options);
|
|
782
|
-
* ```
|
|
783
|
-
*/
|
|
784
|
-
request(method, url, options) {
|
|
785
|
-
return Observable.create((observer) => {
|
|
786
|
-
let destinationUrl = '';
|
|
787
|
-
if (this.environment.baseUrl != undefined)
|
|
788
|
-
destinationUrl = (this.environment.baseUrl) + url;
|
|
789
|
-
else
|
|
790
|
-
destinationUrl = url;
|
|
791
|
-
this.httpClient.request(new HttpRequest(method, destinationUrl, options)).subscribe((response) => {
|
|
792
|
-
const responsTye = response;
|
|
793
|
-
switch (responsTye.type) {
|
|
794
|
-
case HttpEventType.Sent:
|
|
795
|
-
this.logger.info('Http Client : Sent ->', 'Request sent!');
|
|
796
|
-
break;
|
|
797
|
-
case HttpEventType.ResponseHeader:
|
|
798
|
-
this.logger.info('Http Client : ResponseHeader ->', 'Response header received!');
|
|
799
|
-
break;
|
|
800
|
-
case HttpEventType.DownloadProgress:
|
|
801
|
-
const kbLoaded = Math.round(responsTye.loaded / 1024);
|
|
802
|
-
this.logger.info('Http Client : DownloadProgress ->', `Download in progress! ${kbLoaded}Kb loaded`);
|
|
803
|
-
break;
|
|
804
|
-
case HttpEventType.Response:
|
|
805
|
-
observer.next(response.body);
|
|
806
|
-
this.logger.info('Http Client : Response -> 😺 Done!', responsTye.body);
|
|
807
|
-
}
|
|
808
|
-
}, (error) => {
|
|
809
|
-
switch (error.status) {
|
|
810
|
-
case 403 /* HttpStatusCode.Forbidden */:
|
|
811
|
-
// observer.complete();
|
|
812
|
-
this.snackBarViewModel.messageText = 'Access to the requested resource is forbidden.';
|
|
813
|
-
this.snackBarViewModel.actionText = 'Forbidden';
|
|
814
|
-
this.isHttpError = true;
|
|
815
|
-
break;
|
|
816
|
-
case 400 /* HttpStatusCode.BadRequest */:
|
|
817
|
-
this.snackBarViewModel.messageText = 'Server cannot or will not process the request.';
|
|
818
|
-
this.snackBarViewModel.actionText = 'Bad Request';
|
|
819
|
-
this.isHttpError = true;
|
|
820
|
-
break;
|
|
821
|
-
case 401 /* HttpStatusCode.Unauthorized */:
|
|
822
|
-
this.snackBarViewModel.messageText = 'Request has not been applied because it lacks valid authentication credentials.';
|
|
823
|
-
this.snackBarViewModel.actionText = 'Unauthorized';
|
|
824
|
-
this.isHttpError = true;
|
|
825
|
-
break;
|
|
826
|
-
case 500 /* HttpStatusCode.InternalServerError */:
|
|
827
|
-
this.snackBarViewModel.messageText = 'Server encountered an unexpected condition.';
|
|
828
|
-
this.snackBarViewModel.actionText = 'Internal server error';
|
|
829
|
-
this.isHttpError = true;
|
|
830
|
-
break;
|
|
831
|
-
case 0:
|
|
832
|
-
this.snackBarViewModel.messageText = 'Not connected to the service.';
|
|
833
|
-
this.snackBarViewModel.actionText = 'Service not available';
|
|
834
|
-
this.isHttpError = true;
|
|
835
|
-
break;
|
|
836
|
-
}
|
|
837
|
-
observer.error(error);
|
|
838
|
-
if ((this.environment.snackBarEnable != undefined && this.environment.snackBarEnable) && this.isHttpError)
|
|
839
|
-
this._snackBar.open(this.snackBarViewModel.messageText, this.snackBarViewModel.actionText);
|
|
840
|
-
});
|
|
841
|
-
});
|
|
842
|
-
}
|
|
843
|
-
}
|
|
844
|
-
GenericHttpClient.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: GenericHttpClient, deps: [{ token: i1$7.HttpClient }, { token: EnvironmentViewModel }, { token: i3$4.MatSnackBar }, { token: LoggerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
845
|
-
GenericHttpClient.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: GenericHttpClient, providedIn: 'root' });
|
|
846
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: GenericHttpClient, decorators: [{
|
|
847
|
-
type: Injectable,
|
|
848
|
-
args: [{
|
|
849
|
-
providedIn: 'root'
|
|
850
|
-
}]
|
|
851
|
-
}], ctorParameters: function () { return [{ type: i1$7.HttpClient }, { type: EnvironmentViewModel }, { type: i3$4.MatSnackBar }, { type: LoggerService }]; } });
|
|
852
|
-
|
|
853
|
-
class AppSettingService {
|
|
854
|
-
constructor(http, logger) {
|
|
855
|
-
this.http = http;
|
|
856
|
-
this.logger = logger;
|
|
857
|
-
this.initialized = false;
|
|
858
|
-
this.isServiceReady = new Subject();
|
|
859
|
-
this.listeners = {};
|
|
860
|
-
this.eventsSubject = new Subject();
|
|
861
|
-
this.events = from(this.eventsSubject);
|
|
862
|
-
this.events.subscribe(({ name, args }) => {
|
|
863
|
-
if (this.listeners[name]) {
|
|
864
|
-
for (let listener of this.listeners[name]) {
|
|
865
|
-
listener(...args);
|
|
866
|
-
}
|
|
867
|
-
}
|
|
868
|
-
});
|
|
869
|
-
}
|
|
870
|
-
load() {
|
|
871
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
872
|
-
if (this.initialized)
|
|
873
|
-
return;
|
|
874
|
-
let data = yield this.http.get('assets/appsetting.json').toPromise();
|
|
875
|
-
this.appSettings = data;
|
|
876
|
-
this.initialized = true;
|
|
877
|
-
this.isServiceReady.next(this.initialized);
|
|
878
|
-
this.logger.info("[AppSettingService] load --> isServiceReady", this.initialized);
|
|
879
|
-
});
|
|
880
|
-
}
|
|
881
|
-
on(name, listener) {
|
|
882
|
-
if (!this.listeners[name]) {
|
|
883
|
-
this.listeners[name] = [];
|
|
884
|
-
}
|
|
885
|
-
this.listeners[name].push(listener);
|
|
886
|
-
}
|
|
887
|
-
getAppsettingValue() {
|
|
888
|
-
return this.appSettings ? this.appSettings : null;
|
|
889
|
-
}
|
|
890
|
-
}
|
|
891
|
-
AppSettingService.APP_SETTINGS_LOADED = "APP_SETTINGS_LOADED";
|
|
892
|
-
AppSettingService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AppSettingService, deps: [{ token: i1$7.HttpClient }, { token: LoggerService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
893
|
-
AppSettingService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AppSettingService, providedIn: 'root' });
|
|
894
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AppSettingService, decorators: [{
|
|
895
|
-
type: Injectable,
|
|
896
|
-
args: [{
|
|
897
|
-
providedIn: 'root'
|
|
898
|
-
}]
|
|
899
|
-
}], ctorParameters: function () { return [{ type: i1$7.HttpClient }, { type: LoggerService }]; } });
|
|
900
|
-
function appSettingsFactory(appSettings) {
|
|
901
|
-
return () => __awaiter(this, void 0, void 0, function* () { return yield appSettings.load(); });
|
|
902
|
-
}
|
|
903
|
-
;
|
|
904
|
-
|
|
905
|
-
class TokenHelperService {
|
|
906
|
-
constructor() { }
|
|
907
|
-
getTokenExpirationDate(dataIdToken) {
|
|
908
|
-
if (!dataIdToken.hasOwnProperty('exp')) {
|
|
909
|
-
return new Date();
|
|
910
|
-
}
|
|
911
|
-
const date = new Date(0); // The 0 here is the key, which sets the date to the epoch
|
|
912
|
-
date.setUTCSeconds(dataIdToken.exp);
|
|
913
|
-
return date;
|
|
914
|
-
}
|
|
915
|
-
getPayloadFromToken(token, encode) {
|
|
916
|
-
let data = {};
|
|
917
|
-
if (typeof token !== 'undefined') {
|
|
918
|
-
const encoded = token.split('.')[1];
|
|
919
|
-
if (encode) {
|
|
920
|
-
return encoded;
|
|
921
|
-
}
|
|
922
|
-
data = JSON.parse(this.urlBase64Decode(encoded));
|
|
923
|
-
}
|
|
924
|
-
return data;
|
|
925
|
-
}
|
|
926
|
-
getHeaderFromToken(token, encode) {
|
|
927
|
-
let data = {};
|
|
928
|
-
if (typeof token !== 'undefined') {
|
|
929
|
-
const encoded = token.split('.')[0];
|
|
930
|
-
if (encode) {
|
|
931
|
-
return encoded;
|
|
932
|
-
}
|
|
933
|
-
data = JSON.parse(this.urlBase64Decode(encoded));
|
|
934
|
-
}
|
|
935
|
-
return data;
|
|
936
|
-
}
|
|
937
|
-
getSignatureFromToken(token, encode) {
|
|
938
|
-
let data = {};
|
|
939
|
-
if (typeof token !== 'undefined') {
|
|
940
|
-
const encoded = token.split('.')[2];
|
|
941
|
-
if (encode) {
|
|
942
|
-
return encoded;
|
|
943
|
-
}
|
|
944
|
-
data = JSON.parse(this.urlBase64Decode(encoded));
|
|
945
|
-
}
|
|
946
|
-
return data;
|
|
947
|
-
}
|
|
948
|
-
urlBase64Decode(str) {
|
|
949
|
-
let output = str.replace('-', '+').replace('_', '/');
|
|
950
|
-
switch (output.length % 4) {
|
|
951
|
-
case 0:
|
|
952
|
-
break;
|
|
953
|
-
case 2:
|
|
954
|
-
output += '==';
|
|
955
|
-
break;
|
|
956
|
-
case 3:
|
|
957
|
-
output += '=';
|
|
958
|
-
break;
|
|
959
|
-
default:
|
|
960
|
-
throw Error('Illegal base64url string!');
|
|
961
|
-
}
|
|
962
|
-
return window.atob(output);
|
|
963
|
-
}
|
|
964
|
-
}
|
|
965
|
-
TokenHelperService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TokenHelperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable });
|
|
966
|
-
TokenHelperService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TokenHelperService, providedIn: 'root' });
|
|
967
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TokenHelperService, decorators: [{
|
|
968
|
-
type: Injectable,
|
|
969
|
-
args: [{
|
|
970
|
-
providedIn: 'root'
|
|
971
|
-
}]
|
|
972
|
-
}], ctorParameters: function () { return []; } });
|
|
973
|
-
|
|
974
|
-
class AuthService {
|
|
975
|
-
constructor(logger, tokenHelperService) {
|
|
976
|
-
this.logger = logger;
|
|
977
|
-
this.tokenHelperService = tokenHelperService;
|
|
978
|
-
this.initialized = false;
|
|
979
|
-
this.signingOut = false;
|
|
980
|
-
}
|
|
981
|
-
initialize(environment) {
|
|
982
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
983
|
-
if (this.initialized)
|
|
984
|
-
return;
|
|
985
|
-
this.settings = this.getClientSettings(environment);
|
|
986
|
-
this.userManager = new UserManager(this.settings);
|
|
987
|
-
this.userManager.events.addUserLoaded(user => {
|
|
988
|
-
this.user = user;
|
|
989
|
-
});
|
|
990
|
-
this.userManager.events.addAccessTokenExpiring(() => {
|
|
991
|
-
this.logger.info("IdSvr token expiring " + new Date().toLocaleString());
|
|
992
|
-
});
|
|
993
|
-
this.userManager.events.addAccessTokenExpired(() => {
|
|
994
|
-
this.logger.info("IdSvr token expired " + new Date().toLocaleString());
|
|
995
|
-
this.logout(false);
|
|
996
|
-
});
|
|
997
|
-
this.userManager.events.addSilentRenewError(e => {
|
|
998
|
-
this.logger.error("IdSvr silent renew error " + e.message + new Date().toLocaleString());
|
|
999
|
-
this.logout(false);
|
|
1000
|
-
});
|
|
1001
|
-
this.userManager.events.addUserLoaded(user => {
|
|
1002
|
-
this.logger.info("IdSvr user session is ready " + new Date().toLocaleString());
|
|
1003
|
-
this.accessToken = this.tokenHelperService.getPayloadFromToken(user.access_token, false);
|
|
1004
|
-
this.user = user;
|
|
1005
|
-
});
|
|
1006
|
-
this.userManager.events.addUserUnloaded(() => {
|
|
1007
|
-
this.logger.info("IdSvr user session has ended " + new Date().toLocaleString());
|
|
1008
|
-
if (!this.signingOut) {
|
|
1009
|
-
this.startAuthentication(window.location.pathname + window.location.search);
|
|
1010
|
-
}
|
|
1011
|
-
});
|
|
1012
|
-
this.userManager.events.addUserSignedOut(() => {
|
|
1013
|
-
this.logger.info("IdSvr user signed out " + new Date().toLocaleString());
|
|
1014
|
-
this.logout(false);
|
|
1015
|
-
});
|
|
1016
|
-
this.user = yield this.userManager.getUser();
|
|
1017
|
-
this.initialized = true;
|
|
1018
|
-
});
|
|
1019
|
-
}
|
|
1020
|
-
isLoggedIn() {
|
|
1021
|
-
return this.user != null && !this.user.expired;
|
|
1022
|
-
}
|
|
1023
|
-
getUser() {
|
|
1024
|
-
return this.userManager.getUser();
|
|
1025
|
-
}
|
|
1026
|
-
getProfile() {
|
|
1027
|
-
return this.user.profile;
|
|
1028
|
-
}
|
|
1029
|
-
getClaims() {
|
|
1030
|
-
return this.user.profile;
|
|
1031
|
-
}
|
|
1032
|
-
getAuthorizationHeaderValue() {
|
|
1033
|
-
if (this.user != null)
|
|
1034
|
-
return `${this.user.token_type} ${this.user.access_token}`;
|
|
1035
|
-
return '';
|
|
1036
|
-
}
|
|
1037
|
-
getAccessToken() {
|
|
1038
|
-
return this.accessToken || this.tokenHelperService.getPayloadFromToken(this.user.access_token, false);
|
|
1039
|
-
;
|
|
1040
|
-
}
|
|
1041
|
-
startAuthentication(returnUrl) {
|
|
1042
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1043
|
-
this.logger.info("[AuthService] startAuthentication", returnUrl);
|
|
1044
|
-
yield this.userManager.clearStaleState();
|
|
1045
|
-
yield this.userManager.signinRedirect({ data: { returnUrl: returnUrl } }).catch(err => {
|
|
1046
|
-
//this.$log.debug("IdSvr sign in failed", err);
|
|
1047
|
-
return err;
|
|
1048
|
-
});
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
|
-
completeAuthentication() {
|
|
1052
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1053
|
-
this.logger.info("[AuthService] completeAuthentication");
|
|
1054
|
-
let user = yield new Promise((resolve, reject) => {
|
|
1055
|
-
this.userManager.signinRedirectCallback().then(user => {
|
|
1056
|
-
resolve(user);
|
|
1057
|
-
}).catch(error => {
|
|
1058
|
-
reject(error);
|
|
1059
|
-
});
|
|
1060
|
-
});
|
|
1061
|
-
this.user = user;
|
|
1062
|
-
return this.user;
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
login() {
|
|
1066
|
-
return this.userManager.signinRedirect();
|
|
1067
|
-
}
|
|
1068
|
-
renewToken() {
|
|
1069
|
-
return this.userManager.signinSilent();
|
|
1070
|
-
}
|
|
1071
|
-
logout(signoutRedirect) {
|
|
1072
|
-
if (signoutRedirect === undefined || signoutRedirect !== false) {
|
|
1073
|
-
this.signingOut = true;
|
|
1074
|
-
signoutRedirect = true;
|
|
1075
|
-
}
|
|
1076
|
-
return this.userManager.signoutRedirect();
|
|
1077
|
-
}
|
|
1078
|
-
getClientSettings(environment) {
|
|
1079
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
1080
|
-
return {
|
|
1081
|
-
authority: (_a = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _a === void 0 ? void 0 : _a.authority,
|
|
1082
|
-
client_id: (_b = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _b === void 0 ? void 0 : _b.client_id,
|
|
1083
|
-
redirect_uri: (_c = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _c === void 0 ? void 0 : _c.redirect_uri,
|
|
1084
|
-
post_logout_redirect_uri: (_d = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _d === void 0 ? void 0 : _d.post_logout_redirect_uri,
|
|
1085
|
-
response_type: (_e = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _e === void 0 ? void 0 : _e.response_type,
|
|
1086
|
-
scope: (_f = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _f === void 0 ? void 0 : _f.scope,
|
|
1087
|
-
filterProtocolClaims: (_g = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _g === void 0 ? void 0 : _g.filterProtocolClaims,
|
|
1088
|
-
loadUserInfo: true,
|
|
1089
|
-
monitorSession: true,
|
|
1090
|
-
silent_redirect_uri: (_h = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _h === void 0 ? void 0 : _h.silent_redirect_uri,
|
|
1091
|
-
automaticSilentRenew: (_j = environment === null || environment === void 0 ? void 0 : environment.openID) === null || _j === void 0 ? void 0 : _j.automaticSilentRenew,
|
|
1092
|
-
accessTokenExpiringNotificationTime: 20,
|
|
1093
|
-
checkSessionInterval: 2000,
|
|
1094
|
-
silentRequestTimeout: 20000,
|
|
1095
|
-
};
|
|
1096
|
-
}
|
|
1097
|
-
isServiceReady() {
|
|
1098
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
1099
|
-
return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
|
|
1100
|
-
if (this.initialized) {
|
|
1101
|
-
this.logger.info("[AuthService] isServiceReady", true);
|
|
1102
|
-
resolve(true);
|
|
1103
|
-
}
|
|
1104
|
-
else {
|
|
1105
|
-
this.logger.info("[AuthService] isServiceReady", false);
|
|
1106
|
-
reject(false);
|
|
1107
|
-
}
|
|
1108
|
-
}));
|
|
1109
|
-
});
|
|
1110
|
-
}
|
|
1111
|
-
}
|
|
1112
|
-
AuthService.USER_LOADED_EVENT = "USER_LOADED";
|
|
1113
|
-
AuthService.USER_UNLOADED_EVENT = "USER_UNLOADED";
|
|
1114
|
-
AuthService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AuthService, deps: [{ token: LoggerService }, { token: TokenHelperService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1115
|
-
AuthService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AuthService, providedIn: 'root' });
|
|
1116
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AuthService, decorators: [{
|
|
1117
|
-
type: Injectable,
|
|
1118
|
-
args: [{
|
|
1119
|
-
providedIn: 'root'
|
|
1120
|
-
}]
|
|
1121
|
-
}], ctorParameters: function () { return [{ type: LoggerService }, { type: TokenHelperService }]; } });
|
|
1122
|
-
function authServiceFactory(authService, appSettings, environment) {
|
|
1123
|
-
return () => __awaiter(this, void 0, void 0, function* () {
|
|
1124
|
-
appSettings.isServiceReady.subscribe(item => {
|
|
1125
|
-
if (item)
|
|
1126
|
-
authService.initialize(environment);
|
|
1127
|
-
});
|
|
1128
|
-
});
|
|
1129
|
-
}
|
|
1130
|
-
;
|
|
1131
|
-
|
|
1132
|
-
class DialogComponent {
|
|
1133
|
-
constructor(data) {
|
|
1134
|
-
this.data = data;
|
|
1135
|
-
}
|
|
1136
|
-
}
|
|
1137
|
-
DialogComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DialogComponent, deps: [{ token: MAT_DIALOG_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1138
|
-
DialogComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: DialogComponent, selector: "lib-dialog", ngImport: i0, template: "<span mat-dialog-title>{{data.title}}</span>\n<mat-divider></mat-divider>\n<div mat-dialog-content>\n <span class=\"mat-h3\">{{data.bodyMessage}}</span>\n</div>\n<mat-divider></mat-divider>\n<div mat-dialog-actions>\n <button mat-raised-button [mat-dialog-close]=\"\" cdkFocusInitial>{{data.cancelBtnText}}</button>\n <button mat-raised-button [color]=\"'warn'\" [mat-dialog-close]=\"data\">\n {{data.mainbtnText}}\n </button>\n </div>\n", styles: [".mat-mdc-dialog-actions{justify-content:end!important}\n"], dependencies: [{ kind: "component", type: i1$6.MatButton, selector: " button[mat-button], button[mat-raised-button], button[mat-flat-button], button[mat-stroked-button] ", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "directive", type: i2$5.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["aria-label", "type", "mat-dialog-close", "matDialogClose"], exportAs: ["matDialogClose"] }, { kind: "directive", type: i2$5.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { kind: "directive", type: i2$5.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { kind: "directive", type: i2$5.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]", inputs: ["align"] }, { kind: "component", type: i3$5.MatDivider, selector: "mat-divider", inputs: ["vertical", "inset"] }] });
|
|
1139
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: DialogComponent, decorators: [{
|
|
1140
|
-
type: Component,
|
|
1141
|
-
args: [{ selector: 'lib-dialog', template: "<span mat-dialog-title>{{data.title}}</span>\n<mat-divider></mat-divider>\n<div mat-dialog-content>\n <span class=\"mat-h3\">{{data.bodyMessage}}</span>\n</div>\n<mat-divider></mat-divider>\n<div mat-dialog-actions>\n <button mat-raised-button [mat-dialog-close]=\"\" cdkFocusInitial>{{data.cancelBtnText}}</button>\n <button mat-raised-button [color]=\"'warn'\" [mat-dialog-close]=\"data\">\n {{data.mainbtnText}}\n </button>\n </div>\n", styles: [".mat-mdc-dialog-actions{justify-content:end!important}\n"] }]
|
|
1142
|
-
}], ctorParameters: function () {
|
|
1143
|
-
return [{ type: undefined, decorators: [{
|
|
1144
|
-
type: Inject,
|
|
1145
|
-
args: [MAT_DIALOG_DATA]
|
|
1146
|
-
}] }];
|
|
1147
|
-
} });
|
|
1148
|
-
|
|
1149
|
-
class SnackBarComponent {
|
|
1150
|
-
}
|
|
1151
|
-
SnackBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SnackBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1152
|
-
SnackBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: SnackBarComponent, selector: "lib-snack-bar", ngImport: i0, template: "<span>Pizza party!!! \uD83C\uDF55</span>", styles: [""] });
|
|
1153
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: SnackBarComponent, decorators: [{
|
|
1154
|
-
type: Component,
|
|
1155
|
-
args: [{ selector: 'lib-snack-bar', template: "<span>Pizza party!!! \uD83C\uDF55</span>" }]
|
|
1156
|
-
}] });
|
|
1157
|
-
|
|
1158
|
-
class BottomSheetComponent {
|
|
1159
|
-
constructor(_bottomSheetRef, data) {
|
|
1160
|
-
this._bottomSheetRef = _bottomSheetRef;
|
|
1161
|
-
this.data = data;
|
|
1162
|
-
}
|
|
1163
|
-
ngOnInit() {
|
|
1164
|
-
}
|
|
1165
|
-
click(event, item) {
|
|
1166
|
-
this._bottomSheetRef.dismiss(item);
|
|
1167
|
-
event.preventDefault();
|
|
1168
|
-
}
|
|
1169
|
-
}
|
|
1170
|
-
BottomSheetComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: BottomSheetComponent, deps: [{ token: i1$8.MatBottomSheetRef }, { token: MAT_BOTTOM_SHEET_DATA }], target: i0.ɵɵFactoryTarget.Component });
|
|
1171
|
-
BottomSheetComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: BottomSheetComponent, selector: "lib-bottom-sheet", ngImport: i0, template: "<mat-nav-list>\n <ng-container *ngFor=\"let item of data\">\n <a [href]=\"item.link\" mat-list-item (click)=\"click($event,item)\">\n <span matListItemTitle>{{item.levelOneText}}</span>\n <span matLine>{{item.levelTwoText}}</span>\n </a>\n </ng-container>\n\n</mat-nav-list>\n", styles: [""], dependencies: [{ kind: "directive", type: i2$1.MatLine, selector: "[mat-line], [matLine]" }, { kind: "component", type: i3$6.MatNavList, selector: "mat-nav-list", exportAs: ["matNavList"] }, { kind: "component", type: i3$6.MatListItem, selector: "mat-list-item, a[mat-list-item], button[mat-list-item]", inputs: ["activated"], exportAs: ["matListItem"] }, { kind: "directive", type: i3$6.MatListItemTitle, selector: "[matListItemTitle]" }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1172
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: BottomSheetComponent, decorators: [{
|
|
1173
|
-
type: Component,
|
|
1174
|
-
args: [{ selector: 'lib-bottom-sheet', template: "<mat-nav-list>\n <ng-container *ngFor=\"let item of data\">\n <a [href]=\"item.link\" mat-list-item (click)=\"click($event,item)\">\n <span matListItemTitle>{{item.levelOneText}}</span>\n <span matLine>{{item.levelTwoText}}</span>\n </a>\n </ng-container>\n\n</mat-nav-list>\n" }]
|
|
1175
|
-
}], ctorParameters: function () {
|
|
1176
|
-
return [{ type: i1$8.MatBottomSheetRef }, { type: undefined, decorators: [{
|
|
1177
|
-
type: Inject,
|
|
1178
|
-
args: [MAT_BOTTOM_SHEET_DATA]
|
|
1179
|
-
}] }];
|
|
1180
|
-
} });
|
|
1181
|
-
|
|
1182
|
-
class ProgressBarComponent {
|
|
1183
|
-
}
|
|
1184
|
-
ProgressBarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ProgressBarComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1185
|
-
ProgressBarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ProgressBarComponent, selector: "falcon-progress-bar", inputs: { bufferValue: "bufferValue", color: "color", mode: "mode", value: "value" }, ngImport: i0, template: "<mat-progress-bar [mode]=\"mode\" [bufferValue]=\"bufferValue\" [color]=\"color\" [value]=\"value\"></mat-progress-bar>", styles: [""], dependencies: [{ kind: "component", type: i1$9.MatProgressBar, selector: "mat-progress-bar", inputs: ["color", "value", "bufferValue", "mode"], outputs: ["animationEnd"], exportAs: ["matProgressBar"] }] });
|
|
1186
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ProgressBarComponent, decorators: [{
|
|
1187
|
-
type: Component,
|
|
1188
|
-
args: [{ selector: 'falcon-progress-bar', template: "<mat-progress-bar [mode]=\"mode\" [bufferValue]=\"bufferValue\" [color]=\"color\" [value]=\"value\"></mat-progress-bar>" }]
|
|
1189
|
-
}], propDecorators: { bufferValue: [{
|
|
1190
|
-
type: Input
|
|
1191
|
-
}], color: [{
|
|
1192
|
-
type: Input
|
|
1193
|
-
}], mode: [{
|
|
1194
|
-
type: Input
|
|
1195
|
-
}], value: [{
|
|
1196
|
-
type: Input
|
|
1197
|
-
}] } });
|
|
1198
|
-
|
|
1199
|
-
class ProgressSpinnerComponent {
|
|
1200
|
-
constructor() {
|
|
1201
|
-
this.diameter = 100;
|
|
1202
|
-
this.strokeWidth = 5;
|
|
1203
|
-
}
|
|
1204
|
-
}
|
|
1205
|
-
ProgressSpinnerComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ProgressSpinnerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1206
|
-
ProgressSpinnerComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: ProgressSpinnerComponent, selector: "falcon-progress-spinner", inputs: { diameter: "diameter", color: "color", mode: "mode", value: "value", strokeWidth: "strokeWidth" }, ngImport: i0, template: "<mat-progress-spinner\n [color]=\"color\"\n [mode]=\"mode\"\n [diameter]=\"diameter\"\n[strokeWidth]=\"strokeWidth\"\n [value]=\"value\">\n</mat-progress-spinner>", styles: [""], dependencies: [{ kind: "component", type: i1$a.MatProgressSpinner, selector: "mat-progress-spinner, mat-spinner", inputs: ["color", "mode", "value", "diameter", "strokeWidth"], exportAs: ["matProgressSpinner"] }] });
|
|
1207
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: ProgressSpinnerComponent, decorators: [{
|
|
1208
|
-
type: Component,
|
|
1209
|
-
args: [{ selector: 'falcon-progress-spinner', template: "<mat-progress-spinner\n [color]=\"color\"\n [mode]=\"mode\"\n [diameter]=\"diameter\"\n[strokeWidth]=\"strokeWidth\"\n [value]=\"value\">\n</mat-progress-spinner>" }]
|
|
1210
|
-
}], propDecorators: { diameter: [{
|
|
1211
|
-
type: Input
|
|
1212
|
-
}], color: [{
|
|
1213
|
-
type: Input
|
|
1214
|
-
}], mode: [{
|
|
1215
|
-
type: Input
|
|
1216
|
-
}], value: [{
|
|
1217
|
-
type: Input
|
|
1218
|
-
}], strokeWidth: [{
|
|
1219
|
-
type: Input
|
|
1220
|
-
}] } });
|
|
1221
|
-
|
|
1222
|
-
class TableComponent {
|
|
1223
|
-
constructor() {
|
|
1224
|
-
this.pageEvent = new EventEmitter();
|
|
1225
|
-
this.tableActionRowEvent = new EventEmitter();
|
|
1226
|
-
}
|
|
1227
|
-
ngOnInit() {
|
|
1228
|
-
var _a;
|
|
1229
|
-
const cols = (_a = this.matTableConfig.columns) === null || _a === void 0 ? void 0 : _a.map((c) => c.columnDef);
|
|
1230
|
-
if (this.displayedColumns !== undefined)
|
|
1231
|
-
this.displayedColumns.unshift(...cols);
|
|
1232
|
-
else
|
|
1233
|
-
this.displayedColumns = cols;
|
|
1234
|
-
}
|
|
1235
|
-
ngAfterViewInit() {
|
|
1236
|
-
setTimeout(() => {
|
|
1237
|
-
this.matTableConfig.dataSource = new MatTableDataSource(this.matTableConfig.dataSource);
|
|
1238
|
-
this.matTableConfig.dataSource.paginator = this.paginator;
|
|
1239
|
-
this.matTableConfig.dataSource.sort = this.sort;
|
|
1240
|
-
});
|
|
1241
|
-
}
|
|
1242
|
-
applyFilter(event) {
|
|
1243
|
-
const filterValue = event.target.value;
|
|
1244
|
-
this.matTableConfig.dataSource.filter = filterValue
|
|
1245
|
-
.trim()
|
|
1246
|
-
.toLowerCase();
|
|
1247
|
-
if (this.matTableConfig.dataSource.paginator) {
|
|
1248
|
-
this.matTableConfig.dataSource.paginator.firstPage();
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
page(e) {
|
|
1252
|
-
this.pageEvent.emit(e);
|
|
1253
|
-
}
|
|
1254
|
-
tableAction($item, action) {
|
|
1255
|
-
const item = Object.assign($item, { action: action });
|
|
1256
|
-
this.tableActionRowEvent.next(item);
|
|
1257
|
-
}
|
|
1258
|
-
}
|
|
1259
|
-
TableComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1260
|
-
TableComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: TableComponent, selector: "falcon-table", inputs: { matTableConfig: "matTableConfig", displayedColumns: "displayedColumns" }, outputs: { pageEvent: "pageEvent", tableActionRowEvent: "tableActionRowEvent" }, viewQueries: [{ propertyName: "paginator", first: true, predicate: MatPaginator, descendants: true }, { propertyName: "sort", first: true, predicate: MatSort, descendants: true }], ngImport: i0, template: "<div class=\"flex justify-end\">\n <mat-form-field *ngIf=\"matTableConfig?.filter\">\n <mat-label>Filter</mat-label>\n <input matInput (keyup)=\"applyFilter($event)\" #input>\n </mat-form-field>\n</div>\n<falcon-progress-bar *ngIf=\"matTableConfig?.progressBar\" [mode]=\"'indeterminate'\"></falcon-progress-bar>\n<div class=\"mat-elevation-z8\">\n <table mat-table [dataSource]=\"matTableConfig.dataSource\" matSort>\n <ng-container *ngFor=\"let column of matTableConfig?.columns\" matColumnDef={{column.columnDef}}>\n <th mat-header-cell *matHeaderCellDef mat-sort-header> {{ column.header }}</th>\n <ng-container *ngIf=\"column?.link?.isLink; else elseBlock\">\n <td mat-cell *matCellDef=\"let element\">\n <a [routerLink]=\"column?.link?.routerLink(element)\">\n {{column?.cell(element) !== undefined ? column?.cell(element) : '' }}\n </a>\n </td>\n </ng-container>\n <ng-template #elseBlock>\n <td mat-cell *matCellDef=\"let element\">\n {{ column.cell(element) !== undefined ? column.cell(element) : ''}}\n </td>\n </ng-template>\n\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" class=\"mat-row-element example-expanded-row\"></tr>\n\n <!– Row shown when there is no matching data. –>\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell\" colspan=\"columns.length\">No data matching the filter</td>\n </tr>\n\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"></th>\n <td mat-cell *matCellDef=\"let element\">\n\n <div *ngIf=\"matTableConfig?.action?.isMenu; else nonMenuBlock\">\n\n <button mat-icon-button matTooltip=\"Action\" [matMenuTriggerFor]=\"tableActionMenu\"\n aria-label=\"Table action menu\">\n <mat-icon color=\"primary\">more_horiz</mat-icon>\n </button>\n <mat-menu #tableActionMenu=\"matMenu\">\n <a [routerLink]=\"item?.link?.routerLink\" mat-menu-item\n *ngFor=\"let item of matTableConfig?.action?.menu\" [disabled]=\"item.disabled\">\n <mat-icon [color]=\"item?.icon?.iconColor\">{{item?.icon?.iconText}}</mat-icon>\n <span>{{item.text}}</span>\n </a>\n </mat-menu>\n </div>\n <ng-template #nonMenuBlock>\n <div class=\"flex justify-between\">\n <div>\n <button *ngIf=\"matTableConfig?.action?.view\" mat-icon-button aria-label=\"view button\"\n color=\"primary\" matTooltip=\"View\" (click)=\"tableAction(element, 0)\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button *ngIf=\"matTableConfig?.action?.edit\" mat-icon-button aria-label=\"edit button\"\n color=\"primary\" matTooltip=\"Edit\" (click)=\"tableAction(element, 1)\">\n <mat-icon>create</mat-icon>\n </button>\n <button *ngIf=\"matTableConfig?.action?.delete\" mat-icon-button aria-label=\"Delete button\"\n color=\"warn\" matTooltip=\"Delete\" (click)=\"tableAction(element, 2)\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n <button *ngIf=\"matTableConfig?.action?.arrowRight\" mat-icon-button aria-label=\"Arrow button\"\n color=\"primary\" matTooltip=\"Expand\" (click)=\"tableAction(element, 3)\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n </table>\n <mat-paginator *ngIf=\"matTableConfig?.paginationConfig?.pagination\" (page)=\"page($event)\"\n [pageSizeOptions]=\"matTableConfig.paginationConfig?.pageSizeOptions!\" showFirstLastButtons>\n </mat-paginator>\n</div>", styles: ["table{text-align:center!important;width:100%}.mat-form-field{font-size:14px}:host ::ng-deep .mat-sort-header-container{display:flex;justify-content:center}:host ::ng-deep .mat-row:hover{background-color:#f5f5f5}\n"], dependencies: [{ kind: "component", type: i1$6.MatIconButton, selector: "button[mat-icon-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { kind: "component", type: i2$2.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { kind: "directive", type: i3.MatInput, selector: "input[matInput], textarea[matInput], select[matNativeControl], input[matNativeControl], textarea[matNativeControl]", inputs: ["disabled", "id", "placeholder", "name", "required", "type", "errorStateMatcher", "aria-describedby", "value", "readonly"], exportAs: ["matInput"] }, { kind: "component", type: i2.MatFormField, selector: "mat-form-field", inputs: ["hideRequiredMarker", "color", "floatLabel", "appearance", "subscriptSizing", "hintLabel"], exportAs: ["matFormField"] }, { kind: "directive", type: i2.MatLabel, selector: "mat-label" }, { kind: "component", type: i5$2.MatMenu, selector: "mat-menu", exportAs: ["matMenu"] }, { kind: "component", type: i5$2.MatMenuItem, selector: "[mat-menu-item]", inputs: ["disabled", "disableRipple", "role"], exportAs: ["matMenuItem"] }, { kind: "directive", type: i5$2.MatMenuTrigger, selector: "[mat-menu-trigger-for], [matMenuTriggerFor]", exportAs: ["matMenuTrigger"] }, { kind: "component", type: i6$1.MatPaginator, selector: "mat-paginator", inputs: ["disabled"], exportAs: ["matPaginator"] }, { kind: "directive", type: i7.MatSort, selector: "[matSort]", inputs: ["matSortDisabled", "matSortActive", "matSortStart", "matSortDirection", "matSortDisableClear"], outputs: ["matSortChange"], exportAs: ["matSort"] }, { kind: "component", type: i7.MatSortHeader, selector: "[mat-sort-header]", inputs: ["disabled", "mat-sort-header", "arrowPosition", "start", "sortActionDescription", "disableClear"], exportAs: ["matSortHeader"] }, { kind: "component", type: i8.MatTable, selector: "mat-table, table[mat-table]", exportAs: ["matTable"] }, { kind: "directive", type: i8.MatHeaderCellDef, selector: "[matHeaderCellDef]" }, { kind: "directive", type: i8.MatHeaderRowDef, selector: "[matHeaderRowDef]", inputs: ["matHeaderRowDef", "matHeaderRowDefSticky"] }, { kind: "directive", type: i8.MatColumnDef, selector: "[matColumnDef]", inputs: ["sticky", "matColumnDef"] }, { kind: "directive", type: i8.MatCellDef, selector: "[matCellDef]" }, { kind: "directive", type: i8.MatRowDef, selector: "[matRowDef]", inputs: ["matRowDefColumns", "matRowDefWhen"] }, { kind: "directive", type: i8.MatHeaderCell, selector: "mat-header-cell, th[mat-header-cell]" }, { kind: "directive", type: i8.MatCell, selector: "mat-cell, td[mat-cell]" }, { kind: "component", type: i8.MatHeaderRow, selector: "mat-header-row, tr[mat-header-row]", exportAs: ["matHeaderRow"] }, { kind: "component", type: i8.MatRow, selector: "mat-row, tr[mat-row]", exportAs: ["matRow"] }, { kind: "directive", type: i8.MatNoDataRow, selector: "ng-template[matNoDataRow]" }, { kind: "directive", type: i3$1.MatTooltip, selector: "[matTooltip]", exportAs: ["matTooltip"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i4.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i6.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "component", type: ProgressBarComponent, selector: "falcon-progress-bar", inputs: ["bufferValue", "color", "mode", "value"] }] });
|
|
1261
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
1262
|
-
type: Component,
|
|
1263
|
-
args: [{ selector: 'falcon-table', template: "<div class=\"flex justify-end\">\n <mat-form-field *ngIf=\"matTableConfig?.filter\">\n <mat-label>Filter</mat-label>\n <input matInput (keyup)=\"applyFilter($event)\" #input>\n </mat-form-field>\n</div>\n<falcon-progress-bar *ngIf=\"matTableConfig?.progressBar\" [mode]=\"'indeterminate'\"></falcon-progress-bar>\n<div class=\"mat-elevation-z8\">\n <table mat-table [dataSource]=\"matTableConfig.dataSource\" matSort>\n <ng-container *ngFor=\"let column of matTableConfig?.columns\" matColumnDef={{column.columnDef}}>\n <th mat-header-cell *matHeaderCellDef mat-sort-header> {{ column.header }}</th>\n <ng-container *ngIf=\"column?.link?.isLink; else elseBlock\">\n <td mat-cell *matCellDef=\"let element\">\n <a [routerLink]=\"column?.link?.routerLink(element)\">\n {{column?.cell(element) !== undefined ? column?.cell(element) : '' }}\n </a>\n </td>\n </ng-container>\n <ng-template #elseBlock>\n <td mat-cell *matCellDef=\"let element\">\n {{ column.cell(element) !== undefined ? column.cell(element) : ''}}\n </td>\n </ng-template>\n\n </ng-container>\n\n <tr mat-header-row *matHeaderRowDef=\"displayedColumns\"></tr>\n <tr mat-row *matRowDef=\"let row; columns: displayedColumns;\" class=\"mat-row-element example-expanded-row\"></tr>\n\n <!– Row shown when there is no matching data. –>\n <tr class=\"mat-row\" *matNoDataRow>\n <td class=\"mat-cell\" colspan=\"columns.length\">No data matching the filter</td>\n </tr>\n\n <ng-container matColumnDef=\"action\">\n <th mat-header-cell *matHeaderCellDef style=\"text-align: center;\"></th>\n <td mat-cell *matCellDef=\"let element\">\n\n <div *ngIf=\"matTableConfig?.action?.isMenu; else nonMenuBlock\">\n\n <button mat-icon-button matTooltip=\"Action\" [matMenuTriggerFor]=\"tableActionMenu\"\n aria-label=\"Table action menu\">\n <mat-icon color=\"primary\">more_horiz</mat-icon>\n </button>\n <mat-menu #tableActionMenu=\"matMenu\">\n <a [routerLink]=\"item?.link?.routerLink\" mat-menu-item\n *ngFor=\"let item of matTableConfig?.action?.menu\" [disabled]=\"item.disabled\">\n <mat-icon [color]=\"item?.icon?.iconColor\">{{item?.icon?.iconText}}</mat-icon>\n <span>{{item.text}}</span>\n </a>\n </mat-menu>\n </div>\n <ng-template #nonMenuBlock>\n <div class=\"flex justify-between\">\n <div>\n <button *ngIf=\"matTableConfig?.action?.view\" mat-icon-button aria-label=\"view button\"\n color=\"primary\" matTooltip=\"View\" (click)=\"tableAction(element, 0)\">\n <mat-icon>visibility</mat-icon>\n </button>\n <button *ngIf=\"matTableConfig?.action?.edit\" mat-icon-button aria-label=\"edit button\"\n color=\"primary\" matTooltip=\"Edit\" (click)=\"tableAction(element, 1)\">\n <mat-icon>create</mat-icon>\n </button>\n <button *ngIf=\"matTableConfig?.action?.delete\" mat-icon-button aria-label=\"Delete button\"\n color=\"warn\" matTooltip=\"Delete\" (click)=\"tableAction(element, 2)\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n <button *ngIf=\"matTableConfig?.action?.arrowRight\" mat-icon-button aria-label=\"Arrow button\"\n color=\"primary\" matTooltip=\"Expand\" (click)=\"tableAction(element, 3)\">\n <mat-icon>chevron_right</mat-icon>\n </button>\n </div>\n </ng-template>\n </td>\n </ng-container>\n\n </table>\n <mat-paginator *ngIf=\"matTableConfig?.paginationConfig?.pagination\" (page)=\"page($event)\"\n [pageSizeOptions]=\"matTableConfig.paginationConfig?.pageSizeOptions!\" showFirstLastButtons>\n </mat-paginator>\n</div>", styles: ["table{text-align:center!important;width:100%}.mat-form-field{font-size:14px}:host ::ng-deep .mat-sort-header-container{display:flex;justify-content:center}:host ::ng-deep .mat-row:hover{background-color:#f5f5f5}\n"] }]
|
|
1264
|
-
}], propDecorators: { matTableConfig: [{
|
|
1265
|
-
type: Input
|
|
1266
|
-
}], paginator: [{
|
|
1267
|
-
type: ViewChild,
|
|
1268
|
-
args: [MatPaginator, { static: false }]
|
|
1269
|
-
}], sort: [{
|
|
1270
|
-
type: ViewChild,
|
|
1271
|
-
args: [MatSort, { static: false }]
|
|
1272
|
-
}], pageEvent: [{
|
|
1273
|
-
type: Output
|
|
1274
|
-
}], displayedColumns: [{
|
|
1275
|
-
type: Input
|
|
1276
|
-
}], tableActionRowEvent: [{
|
|
1277
|
-
type: Output
|
|
1278
|
-
}] } });
|
|
1279
|
-
|
|
1280
|
-
class PaginationComponent {
|
|
1281
|
-
constructor() {
|
|
1282
|
-
this.totalPage = 10;
|
|
1283
|
-
this.pageSize = 10;
|
|
1284
|
-
this.paginationEvent = new EventEmitter();
|
|
1285
|
-
this.paginationSize = new Array(10);
|
|
1286
|
-
this.preDisable = true;
|
|
1287
|
-
this.nextDisable = false;
|
|
1288
|
-
this.currentPage = 1;
|
|
1289
|
-
this.firstLoad = false;
|
|
1290
|
-
}
|
|
1291
|
-
ngOnInit() {
|
|
1292
|
-
this.firstLoad = true;
|
|
1293
|
-
this.paginationSize = [
|
|
1294
|
-
...Array.from({
|
|
1295
|
-
length: this.totalPage < this.pageSize
|
|
1296
|
-
? this.totalPage
|
|
1297
|
-
: this.pageSize,
|
|
1298
|
-
}, (_, i) => i + 1),
|
|
1299
|
-
];
|
|
1300
|
-
if (this.paginationSize.length == this.totalPage)
|
|
1301
|
-
this.nextDisable = true;
|
|
1302
|
-
}
|
|
1303
|
-
receiveBtnChange($event) {
|
|
1304
|
-
this.firstLoad = false;
|
|
1305
|
-
this.currentPage = $event;
|
|
1306
|
-
if ($event == this.totalPage)
|
|
1307
|
-
this.nextDisable = true;
|
|
1308
|
-
else if ($event == 1) {
|
|
1309
|
-
this.nextDisable = false;
|
|
1310
|
-
this.preDisable = true;
|
|
1311
|
-
}
|
|
1312
|
-
else {
|
|
1313
|
-
this.nextDisable = false;
|
|
1314
|
-
this.preDisable = false;
|
|
1315
|
-
}
|
|
1316
|
-
if ($event === 'previous') {
|
|
1317
|
-
this.preDisable = true;
|
|
1318
|
-
}
|
|
1319
|
-
else if ($event === 'next') {
|
|
1320
|
-
}
|
|
1321
|
-
else {
|
|
1322
|
-
if (this.totalPage <= this.pageSize) {
|
|
1323
|
-
this.paginationSize = [
|
|
1324
|
-
...Array.from({ length: this.totalPage }, (_, i) => i + 1),
|
|
1325
|
-
];
|
|
1326
|
-
}
|
|
1327
|
-
else {
|
|
1328
|
-
// start
|
|
1329
|
-
if ($event < 6) {
|
|
1330
|
-
this.start = 1;
|
|
1331
|
-
}
|
|
1332
|
-
else {
|
|
1333
|
-
if ($event + 5 < this.totalPage) {
|
|
1334
|
-
this.start = $event - 5;
|
|
1335
|
-
}
|
|
1336
|
-
else {
|
|
1337
|
-
this.start = this.totalPage - this.pageSize;
|
|
1338
|
-
}
|
|
1339
|
-
}
|
|
1340
|
-
//End
|
|
1341
|
-
if ($event + 5 < this.totalPage) {
|
|
1342
|
-
this.end = this.start + 9;
|
|
1343
|
-
}
|
|
1344
|
-
else {
|
|
1345
|
-
this.end = this.totalPage;
|
|
1346
|
-
}
|
|
1347
|
-
this.paginationSize = this.range(this.start, this.end);
|
|
1348
|
-
}
|
|
1349
|
-
}
|
|
1350
|
-
this.paginationEvent.emit($event);
|
|
1351
|
-
}
|
|
1352
|
-
range(start, end) {
|
|
1353
|
-
return Array(Math.abs(start - end) + 1)
|
|
1354
|
-
.fill(start)
|
|
1355
|
-
.map((v, i) => v + i * (start > end ? -1 : 1));
|
|
1356
|
-
}
|
|
1357
|
-
}
|
|
1358
|
-
PaginationComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PaginationComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1359
|
-
PaginationComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.1", type: PaginationComponent, selector: "falcon-pagination", inputs: { totalPage: "totalPage", pageSize: "pageSize" }, outputs: { paginationEvent: "paginationEvent" }, ngImport: i0, template: "<div class=\"flex justify-between\">\n <span class=\"mat-h3\">Page {{currentPage}} of {{totalPage}}</span>\n <mat-button-toggle-group name=\"fontStyle\" aria-label=\"Font Style\">\n <mat-button-toggle value=\"bold\" *ngFor=\"let item of paginationSize; index as i;\"\n (change)=\"receiveBtnChange(item)\" [checked]=\"firstLoad && i ==0\">\n <span class=\"mat-h3\">{{item}}</span> \n </mat-button-toggle>\n </mat-button-toggle-group>\n\n</div>", styles: [""], dependencies: [{ kind: "directive", type: i1$4.MatButtonToggleGroup, selector: "mat-button-toggle-group", inputs: ["appearance", "name", "vertical", "value", "multiple", "disabled"], outputs: ["valueChange", "change"], exportAs: ["matButtonToggleGroup"] }, { kind: "component", type: i1$4.MatButtonToggle, selector: "mat-button-toggle", inputs: ["disableRipple", "aria-label", "aria-labelledby", "id", "name", "value", "tabIndex", "appearance", "checked", "disabled"], outputs: ["change"], exportAs: ["matButtonToggle"] }, { kind: "directive", type: i4.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }] });
|
|
1360
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: PaginationComponent, decorators: [{
|
|
1361
|
-
type: Component,
|
|
1362
|
-
args: [{ selector: 'falcon-pagination', template: "<div class=\"flex justify-between\">\n <span class=\"mat-h3\">Page {{currentPage}} of {{totalPage}}</span>\n <mat-button-toggle-group name=\"fontStyle\" aria-label=\"Font Style\">\n <mat-button-toggle value=\"bold\" *ngFor=\"let item of paginationSize; index as i;\"\n (change)=\"receiveBtnChange(item)\" [checked]=\"firstLoad && i ==0\">\n <span class=\"mat-h3\">{{item}}</span> \n </mat-button-toggle>\n </mat-button-toggle-group>\n\n</div>" }]
|
|
1363
|
-
}], ctorParameters: function () { return []; }, propDecorators: { totalPage: [{
|
|
1364
|
-
type: Input
|
|
1365
|
-
}], pageSize: [{
|
|
1366
|
-
type: Input
|
|
1367
|
-
}], paginationEvent: [{
|
|
1368
|
-
type: Output
|
|
1369
|
-
}] } });
|
|
1370
|
-
|
|
1371
|
-
class FalconCoreModule {
|
|
1372
|
-
static forRoot(environment) {
|
|
1373
|
-
return {
|
|
1374
|
-
ngModule: FalconCoreModule,
|
|
1375
|
-
providers: [
|
|
1376
|
-
{ provide: EnvironmentViewModel, useValue: environment },
|
|
1377
|
-
],
|
|
1378
|
-
};
|
|
1379
|
-
}
|
|
1380
|
-
}
|
|
1381
|
-
FalconCoreModule.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FalconCoreModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
1382
|
-
FalconCoreModule.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "15.0.1", ngImport: i0, type: FalconCoreModule, declarations: [TextboxComponent,
|
|
1383
|
-
TextareaComponent,
|
|
1384
|
-
SelectComponent,
|
|
1385
|
-
ReactiveFieldDirective,
|
|
1386
|
-
ControlBuilderComponent,
|
|
1387
|
-
DatePickerComponent,
|
|
1388
|
-
CheckboxComponent,
|
|
1389
|
-
RadioComponent,
|
|
1390
|
-
AutoCompleteComponent,
|
|
1391
|
-
ButtonToggleComponent,
|
|
1392
|
-
ChipComponent,
|
|
1393
|
-
SliderComponent,
|
|
1394
|
-
SlideToggleComponent,
|
|
1395
|
-
ButtonComponent,
|
|
1396
|
-
DialogComponent,
|
|
1397
|
-
SnackBarComponent,
|
|
1398
|
-
BottomSheetComponent,
|
|
1399
|
-
ProgressBarComponent,
|
|
1400
|
-
ProgressSpinnerComponent,
|
|
1401
|
-
TableComponent,
|
|
1402
|
-
PaginationComponent,
|
|
1403
|
-
RichTextEditorComponent], imports: [AngularmaterialModule,
|
|
1404
|
-
CommonModule,
|
|
1405
|
-
FormsModule,
|
|
1406
|
-
ReactiveFormsModule,
|
|
1407
|
-
RouterModule,
|
|
1408
|
-
AngularEditorModule], exports: [AngularmaterialModule,
|
|
1409
|
-
CommonModule,
|
|
1410
|
-
FormsModule,
|
|
1411
|
-
ReactiveFormsModule,
|
|
1412
|
-
ControlBuilderComponent,
|
|
1413
|
-
RouterModule,
|
|
1414
|
-
ProgressBarComponent,
|
|
1415
|
-
ProgressSpinnerComponent,
|
|
1416
|
-
PaginationComponent,
|
|
1417
|
-
TableComponent,
|
|
1418
|
-
AngularEditorModule,
|
|
1419
|
-
ButtonComponent] });
|
|
1420
|
-
FalconCoreModule.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FalconCoreModule, providers: [
|
|
1421
|
-
provideHttpClient(withInterceptors([
|
|
1422
|
-
(req, next) => {
|
|
1423
|
-
// Get the auth token from the service.
|
|
1424
|
-
const authToken = inject(AuthService).getAuthorizationHeaderValue();
|
|
1425
|
-
inject(LoggerService).info("Auth bearer token ", authToken);
|
|
1426
|
-
if (authToken) {
|
|
1427
|
-
req = req.clone({
|
|
1428
|
-
setHeaders: {
|
|
1429
|
-
'Content-Type': 'application/json',
|
|
1430
|
-
Authorization: authToken
|
|
1431
|
-
}
|
|
1432
|
-
});
|
|
1433
|
-
}
|
|
1434
|
-
return next(req);
|
|
1435
|
-
},
|
|
1436
|
-
])),
|
|
1437
|
-
{ provide: IGenericHttpClient, useClass: GenericHttpClient },
|
|
1438
|
-
{
|
|
1439
|
-
provide: APP_INITIALIZER,
|
|
1440
|
-
useFactory: appSettingsFactory,
|
|
1441
|
-
deps: [AppSettingService],
|
|
1442
|
-
multi: true,
|
|
1443
|
-
},
|
|
1444
|
-
{
|
|
1445
|
-
provide: APP_INITIALIZER,
|
|
1446
|
-
useFactory: authServiceFactory,
|
|
1447
|
-
deps: [AuthService, AppSettingService, EnvironmentViewModel],
|
|
1448
|
-
multi: true,
|
|
1449
|
-
},
|
|
1450
|
-
{
|
|
1451
|
-
provide: APP_INITIALIZER,
|
|
1452
|
-
useFactory: loggerServiceFactory,
|
|
1453
|
-
deps: [LoggerService, AppSettingService],
|
|
1454
|
-
multi: true,
|
|
1455
|
-
},
|
|
1456
|
-
{
|
|
1457
|
-
provide: MAT_SNACK_BAR_DEFAULT_OPTIONS,
|
|
1458
|
-
useValue: { duration: 5000 },
|
|
1459
|
-
},
|
|
1460
|
-
], imports: [AngularmaterialModule,
|
|
1461
|
-
CommonModule,
|
|
1462
|
-
FormsModule,
|
|
1463
|
-
ReactiveFormsModule,
|
|
1464
|
-
RouterModule,
|
|
1465
|
-
AngularEditorModule, AngularmaterialModule,
|
|
1466
|
-
CommonModule,
|
|
1467
|
-
FormsModule,
|
|
1468
|
-
ReactiveFormsModule,
|
|
1469
|
-
RouterModule,
|
|
1470
|
-
AngularEditorModule] });
|
|
1471
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: FalconCoreModule, decorators: [{
|
|
1472
|
-
type: NgModule,
|
|
1473
|
-
args: [{
|
|
1474
|
-
declarations: [
|
|
1475
|
-
TextboxComponent,
|
|
1476
|
-
TextareaComponent,
|
|
1477
|
-
SelectComponent,
|
|
1478
|
-
ReactiveFieldDirective,
|
|
1479
|
-
ControlBuilderComponent,
|
|
1480
|
-
DatePickerComponent,
|
|
1481
|
-
CheckboxComponent,
|
|
1482
|
-
RadioComponent,
|
|
1483
|
-
AutoCompleteComponent,
|
|
1484
|
-
ButtonToggleComponent,
|
|
1485
|
-
ChipComponent,
|
|
1486
|
-
SliderComponent,
|
|
1487
|
-
SlideToggleComponent,
|
|
1488
|
-
ButtonComponent,
|
|
1489
|
-
DialogComponent,
|
|
1490
|
-
SnackBarComponent,
|
|
1491
|
-
BottomSheetComponent,
|
|
1492
|
-
ProgressBarComponent,
|
|
1493
|
-
ProgressSpinnerComponent,
|
|
1494
|
-
TableComponent,
|
|
1495
|
-
PaginationComponent,
|
|
1496
|
-
RichTextEditorComponent
|
|
1497
|
-
],
|
|
1498
|
-
imports: [
|
|
1499
|
-
AngularmaterialModule,
|
|
1500
|
-
CommonModule,
|
|
1501
|
-
FormsModule,
|
|
1502
|
-
ReactiveFormsModule,
|
|
1503
|
-
RouterModule,
|
|
1504
|
-
AngularEditorModule,
|
|
1505
|
-
],
|
|
1506
|
-
exports: [
|
|
1507
|
-
AngularmaterialModule,
|
|
1508
|
-
CommonModule,
|
|
1509
|
-
FormsModule,
|
|
1510
|
-
ReactiveFormsModule,
|
|
1511
|
-
ControlBuilderComponent,
|
|
1512
|
-
RouterModule,
|
|
1513
|
-
ProgressBarComponent,
|
|
1514
|
-
ProgressSpinnerComponent,
|
|
1515
|
-
PaginationComponent,
|
|
1516
|
-
TableComponent,
|
|
1517
|
-
AngularEditorModule,
|
|
1518
|
-
ButtonComponent,
|
|
1519
|
-
],
|
|
1520
|
-
providers: [
|
|
1521
|
-
provideHttpClient(withInterceptors([
|
|
1522
|
-
(req, next) => {
|
|
1523
|
-
// Get the auth token from the service.
|
|
1524
|
-
const authToken = inject(AuthService).getAuthorizationHeaderValue();
|
|
1525
|
-
inject(LoggerService).info("Auth bearer token ", authToken);
|
|
1526
|
-
if (authToken) {
|
|
1527
|
-
req = req.clone({
|
|
1528
|
-
setHeaders: {
|
|
1529
|
-
'Content-Type': 'application/json',
|
|
1530
|
-
Authorization: authToken
|
|
1531
|
-
}
|
|
1532
|
-
});
|
|
1533
|
-
}
|
|
1534
|
-
return next(req);
|
|
1535
|
-
},
|
|
1536
|
-
])),
|
|
1537
|
-
{ provide: IGenericHttpClient, useClass: GenericHttpClient },
|
|
1538
|
-
{
|
|
1539
|
-
provide: APP_INITIALIZER,
|
|
1540
|
-
useFactory: appSettingsFactory,
|
|
1541
|
-
deps: [AppSettingService],
|
|
1542
|
-
multi: true,
|
|
1543
|
-
},
|
|
1544
|
-
{
|
|
1545
|
-
provide: APP_INITIALIZER,
|
|
1546
|
-
useFactory: authServiceFactory,
|
|
1547
|
-
deps: [AuthService, AppSettingService, EnvironmentViewModel],
|
|
1548
|
-
multi: true,
|
|
1549
|
-
},
|
|
1550
|
-
{
|
|
1551
|
-
provide: APP_INITIALIZER,
|
|
1552
|
-
useFactory: loggerServiceFactory,
|
|
1553
|
-
deps: [LoggerService, AppSettingService],
|
|
1554
|
-
multi: true,
|
|
1555
|
-
},
|
|
1556
|
-
{
|
|
1557
|
-
provide: MAT_SNACK_BAR_DEFAULT_OPTIONS,
|
|
1558
|
-
useValue: { duration: 5000 },
|
|
1559
|
-
},
|
|
1560
|
-
],
|
|
1561
|
-
}]
|
|
1562
|
-
}] });
|
|
1563
|
-
|
|
1564
|
-
class AuthGuardService {
|
|
1565
|
-
constructor(authService) {
|
|
1566
|
-
this.authService = authService;
|
|
1567
|
-
}
|
|
1568
|
-
canActivate(route, state) {
|
|
1569
|
-
return new Promise(resolve => {
|
|
1570
|
-
this.authService.isServiceReady().then(() => {
|
|
1571
|
-
if (this.authService.isLoggedIn()) {
|
|
1572
|
-
resolve(true);
|
|
1573
|
-
}
|
|
1574
|
-
else {
|
|
1575
|
-
this.authService.startAuthentication(state.url);
|
|
1576
|
-
resolve(false);
|
|
1577
|
-
}
|
|
1578
|
-
});
|
|
1579
|
-
});
|
|
1580
|
-
}
|
|
1581
|
-
}
|
|
1582
|
-
AuthGuardService.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AuthGuardService, deps: [{ token: AuthService }], target: i0.ɵɵFactoryTarget.Injectable });
|
|
1583
|
-
AuthGuardService.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AuthGuardService, providedIn: 'root' });
|
|
1584
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.1", ngImport: i0, type: AuthGuardService, decorators: [{
|
|
1585
|
-
type: Injectable,
|
|
1586
|
-
args: [{
|
|
1587
|
-
providedIn: 'root'
|
|
1588
|
-
}]
|
|
1589
|
-
}], ctorParameters: function () { return [{ type: AuthService }]; } });
|
|
1590
|
-
|
|
1591
|
-
/**
|
|
1592
|
-
* @description
|
|
1593
|
-
* Class use for setting the control properties.
|
|
1594
|
-
* @usageNotes
|
|
1595
|
-
* ```ts
|
|
1596
|
-
* new Dropdown({
|
|
1597
|
-
* formControlName: 'brave',
|
|
1598
|
-
* label: 'Bravery Rating',
|
|
1599
|
-
* options: [
|
|
1600
|
-
* {key: 'solid', value: 'Solid'},
|
|
1601
|
-
* {key: 'great', value: 'Great'},
|
|
1602
|
-
* {key: 'good', value: 'Good'},
|
|
1603
|
-
* {key: 'unproven', value: 'Unproven'}
|
|
1604
|
-
* ],
|
|
1605
|
-
* order: 3
|
|
1606
|
-
* }),
|
|
1607
|
-
** ```
|
|
1608
|
-
*/
|
|
1609
|
-
class BaseControl {
|
|
1610
|
-
constructor(options = {}) {
|
|
1611
|
-
this.value = options.value;
|
|
1612
|
-
this.formControlName = options.formControlName || '';
|
|
1613
|
-
this.label = options.label || '';
|
|
1614
|
-
this.labelPosition = options.labelPosition || 'before' || 'after';
|
|
1615
|
-
this.order = options.order === undefined ? 1 : options.order;
|
|
1616
|
-
this.controlType = options.controlType || 6 /* ControlType.Button */;
|
|
1617
|
-
this.type = options.type || '';
|
|
1618
|
-
this.disabled = options.disabled || false;
|
|
1619
|
-
this.options = options.options || [];
|
|
1620
|
-
this.validations = options.validations || [];
|
|
1621
|
-
this.appearance = options.appearance || 'outline';
|
|
1622
|
-
this.class = options.class || '';
|
|
1623
|
-
this.style = options.style || {};
|
|
1624
|
-
this.placeHolder = options.placeHolder || '';
|
|
1625
|
-
this.floatLabel = options.floatLabel || 'auto';
|
|
1626
|
-
this.hint = options.hint || {};
|
|
1627
|
-
this.prefix = options.prefix || {};
|
|
1628
|
-
this.suffix = options.suffix || {};
|
|
1629
|
-
this.textAreaProperty =
|
|
1630
|
-
options.textAreaProperty || {};
|
|
1631
|
-
this.event = options.event || {};
|
|
1632
|
-
this.selectProperty = options.selectProperty || {};
|
|
1633
|
-
this.color = options.color || '';
|
|
1634
|
-
this.sliderProperty = options.sliderProperty || {};
|
|
1635
|
-
this.chipSelectedOptions = options.chipSelectedOptions || {};
|
|
1636
|
-
this.editorProperty = options.editorProperty || {};
|
|
1637
|
-
this.formArray = options.formArray || undefined;
|
|
1638
|
-
}
|
|
1639
|
-
}
|
|
1640
|
-
|
|
1641
|
-
class AutoComplete extends BaseControl {
|
|
1642
|
-
constructor() {
|
|
1643
|
-
super(...arguments);
|
|
1644
|
-
this.controlType = 10 /* ControlType.AutoComplete */;
|
|
1645
|
-
}
|
|
1646
|
-
}
|
|
1647
|
-
|
|
1648
|
-
class Button extends BaseControl {
|
|
1649
|
-
constructor() {
|
|
1650
|
-
super(...arguments);
|
|
1651
|
-
this.controlType = 6 /* ControlType.Button */;
|
|
1652
|
-
}
|
|
1653
|
-
}
|
|
1654
|
-
|
|
1655
|
-
class ButtonToggle extends BaseControl {
|
|
1656
|
-
constructor() {
|
|
1657
|
-
super(...arguments);
|
|
1658
|
-
this.controlType = 9 /* ControlType.ButtonToggle */;
|
|
1659
|
-
}
|
|
1660
|
-
}
|
|
1661
|
-
|
|
1662
|
-
class CheckBox extends BaseControl {
|
|
1663
|
-
constructor() {
|
|
1664
|
-
super(...arguments);
|
|
1665
|
-
this.controlType = 5 /* ControlType.Checkbox */;
|
|
1666
|
-
}
|
|
1667
|
-
}
|
|
1668
|
-
|
|
1669
|
-
class Chip extends BaseControl {
|
|
1670
|
-
constructor() {
|
|
1671
|
-
super(...arguments);
|
|
1672
|
-
this.controlType = 11 /* ControlType.Chip */;
|
|
1673
|
-
}
|
|
1674
|
-
}
|
|
1675
|
-
|
|
1676
|
-
class DatePicker extends BaseControl {
|
|
1677
|
-
constructor() {
|
|
1678
|
-
super(...arguments);
|
|
1679
|
-
this.controlType = 3 /* ControlType.DatePicker */;
|
|
1680
|
-
}
|
|
1681
|
-
}
|
|
1682
|
-
|
|
1683
|
-
class Divider extends BaseControl {
|
|
1684
|
-
constructor() {
|
|
1685
|
-
super(...arguments);
|
|
1686
|
-
this.controlType = 13 /* ControlType.Divider */;
|
|
1687
|
-
}
|
|
1688
|
-
}
|
|
1689
|
-
|
|
1690
|
-
class Editor extends BaseControl {
|
|
1691
|
-
constructor() {
|
|
1692
|
-
super(...arguments);
|
|
1693
|
-
this.controlType = 12 /* ControlType.Editor */;
|
|
1694
|
-
}
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
class Radio extends BaseControl {
|
|
1698
|
-
constructor() {
|
|
1699
|
-
super(...arguments);
|
|
1700
|
-
this.controlType = 4 /* ControlType.Radio */;
|
|
1701
|
-
}
|
|
1702
|
-
}
|
|
1703
|
-
|
|
1704
|
-
class RichTextEditor extends BaseControl {
|
|
1705
|
-
constructor() {
|
|
1706
|
-
super(...arguments);
|
|
1707
|
-
this.controlType = 12 /* ControlType.Editor */;
|
|
1708
|
-
}
|
|
1709
|
-
}
|
|
1710
|
-
|
|
1711
|
-
class Select extends BaseControl {
|
|
1712
|
-
constructor() {
|
|
1713
|
-
super(...arguments);
|
|
1714
|
-
this.controlType = 2 /* ControlType.Select */;
|
|
1715
|
-
}
|
|
1716
|
-
}
|
|
1717
|
-
|
|
1718
|
-
class Slider extends BaseControl {
|
|
1719
|
-
constructor() {
|
|
1720
|
-
super(...arguments);
|
|
1721
|
-
this.controlType = 8 /* ControlType.Slider */;
|
|
1722
|
-
}
|
|
1723
|
-
}
|
|
1724
|
-
|
|
1725
|
-
class SliderToggle extends BaseControl {
|
|
1726
|
-
constructor() {
|
|
1727
|
-
super(...arguments);
|
|
1728
|
-
this.controlType = 7 /* ControlType.SlideToggle */;
|
|
1729
|
-
}
|
|
1730
|
-
}
|
|
1731
|
-
|
|
1732
|
-
class Textarea extends BaseControl {
|
|
1733
|
-
constructor() {
|
|
1734
|
-
super(...arguments);
|
|
1735
|
-
this.controlType = 1 /* ControlType.TextArea */;
|
|
1736
|
-
}
|
|
1737
|
-
}
|
|
1738
|
-
|
|
1739
|
-
class Textbox extends BaseControl {
|
|
1740
|
-
constructor() {
|
|
1741
|
-
super(...arguments);
|
|
1742
|
-
this.controlType = 0 /* ControlType.TextBox */;
|
|
1743
|
-
}
|
|
1744
|
-
}
|
|
1745
|
-
|
|
1746
|
-
/**
|
|
1747
|
-
* @description
|
|
1748
|
-
* Base form component initialized to create form controls, set validation, submit.
|
|
1749
|
-
*
|
|
1750
|
-
* @usageNotes
|
|
1751
|
-
* The following snippet shows how a component can implement this abstract class to
|
|
1752
|
-
* define its own initialization method.
|
|
1753
|
-
* ```ts
|
|
1754
|
-
* export class InputComponent extends BaseFormComponent<any> implements OnInit {
|
|
1755
|
-
* constructor(fb : FormBuilder) {
|
|
1756
|
-
* super(fb);
|
|
1757
|
-
* this.defineForm();
|
|
1758
|
-
* }
|
|
1759
|
-
* protected defineForm(): void {
|
|
1760
|
-
* }
|
|
1761
|
-
* ngOnInit(): void {
|
|
1762
|
-
* this.formGroup = this.createControls();
|
|
1763
|
-
* }
|
|
1764
|
-
* protected submitDatasource(model: any): Observable<any> {
|
|
1765
|
-
* return of(model);
|
|
1766
|
-
* }
|
|
1767
|
-
* ```
|
|
1768
|
-
*/
|
|
1769
|
-
class BaseFormComponent {
|
|
1770
|
-
constructor() {
|
|
1771
|
-
this.dataSource = undefined;
|
|
1772
|
-
this.showLoading = false;
|
|
1773
|
-
this.fb = inject(FormBuilder);
|
|
1774
|
-
}
|
|
1775
|
-
/**
|
|
1776
|
-
* @description
|
|
1777
|
-
* Method evoke on when the form is submitted.
|
|
1778
|
-
* @returns submitDatasource() method with form data if valid otherwise form invalid.
|
|
1779
|
-
*/
|
|
1780
|
-
onSubmit() {
|
|
1781
|
-
if (this.formGroup !== undefined && this.formGroup.valid) {
|
|
1782
|
-
this.submitDataSource(this.formGroup.value);
|
|
1783
|
-
}
|
|
1784
|
-
else {
|
|
1785
|
-
this.validateAllFormFields(this.formGroup);
|
|
1786
|
-
}
|
|
1787
|
-
}
|
|
1788
|
-
/**
|
|
1789
|
-
* @description
|
|
1790
|
-
* Private method to validate all form controls before is form submited.
|
|
1791
|
-
* @param formGroup Validate form group.
|
|
1792
|
-
* @returns Groups of controls added to the form builder.
|
|
1793
|
-
*/
|
|
1794
|
-
validateAllFormFields(formGroup) {
|
|
1795
|
-
if (this.formGroup !== undefined)
|
|
1796
|
-
this.formGroup.markAllAsTouched();
|
|
1797
|
-
}
|
|
1798
|
-
/**
|
|
1799
|
-
* @description
|
|
1800
|
-
* Create the reactive form controls
|
|
1801
|
-
* @returns Groups of controls added to the form builder.
|
|
1802
|
-
*/
|
|
1803
|
-
createControls() {
|
|
1804
|
-
const group = this.fb.group({});
|
|
1805
|
-
this.controlsConfig.baseControls.forEach((controls, index) => {
|
|
1806
|
-
this.bindControl(controls, group, index);
|
|
1807
|
-
});
|
|
1808
|
-
return group;
|
|
1809
|
-
}
|
|
1810
|
-
/**
|
|
1811
|
-
* @description
|
|
1812
|
-
* Private method to bind the form control.
|
|
1813
|
-
* @param controlConfig field to bind.
|
|
1814
|
-
* @param group group to add.
|
|
1815
|
-
* @param index index of the layout
|
|
1816
|
-
*/
|
|
1817
|
-
bindControl(controlConfig, group, index) {
|
|
1818
|
-
if (controlConfig.controlType === 6 /* ControlType.Button */)
|
|
1819
|
-
return;
|
|
1820
|
-
let control = null;
|
|
1821
|
-
if (controlConfig.formArray !== undefined) {
|
|
1822
|
-
control =
|
|
1823
|
-
controlConfig.formArray.length > 0
|
|
1824
|
-
? this.fb.array([
|
|
1825
|
-
this.createFormArrayGroup(controlConfig.formArray[controlConfig.formArray.length - 1].formArray),
|
|
1826
|
-
])
|
|
1827
|
-
: this.fb.array([], this.bindValidations(controlConfig.validations || []));
|
|
1828
|
-
}
|
|
1829
|
-
else {
|
|
1830
|
-
control = this.fb.control({
|
|
1831
|
-
value: controlConfig.value,
|
|
1832
|
-
disabled: controlConfig.disabled,
|
|
1833
|
-
}, this.bindValidations(controlConfig.validations || []));
|
|
1834
|
-
}
|
|
1835
|
-
group.addControl(controlConfig.formControlName, control);
|
|
1836
|
-
}
|
|
1837
|
-
/**
|
|
1838
|
-
* @description
|
|
1839
|
-
* Private method to bind the validation to the form controls on form submit.
|
|
1840
|
-
* @param validations Push the validation to the controls.
|
|
1841
|
-
* @returns Validation.
|
|
1842
|
-
*/
|
|
1843
|
-
bindValidations(validations) {
|
|
1844
|
-
if (validations.length > 0) {
|
|
1845
|
-
const validList = [];
|
|
1846
|
-
validations.forEach((valid) => {
|
|
1847
|
-
validList.push(valid.validator);
|
|
1848
|
-
});
|
|
1849
|
-
return Validators.compose(validList);
|
|
1850
|
-
}
|
|
1851
|
-
return null;
|
|
1852
|
-
}
|
|
1853
|
-
/**
|
|
1854
|
-
* Create an form array element
|
|
1855
|
-
* @param layoutConfig layout of form array
|
|
1856
|
-
* @returns Form array group
|
|
1857
|
-
*/
|
|
1858
|
-
createFormArrayGroup(componentConfig) {
|
|
1859
|
-
var formGroup = this.fb.group({});
|
|
1860
|
-
componentConfig === null || componentConfig === void 0 ? void 0 : componentConfig.forEach((item, index) => {
|
|
1861
|
-
var control = null;
|
|
1862
|
-
if (item.formArray !== undefined) {
|
|
1863
|
-
control =
|
|
1864
|
-
item.formArray.length > 0
|
|
1865
|
-
? this.fb.array([
|
|
1866
|
-
this.createFormArrayGroup(item.formArray[item.formArray.length - 1].formArray),
|
|
1867
|
-
], this.bindValidations(item.validations || []))
|
|
1868
|
-
: this.fb.array([], this.bindValidations(item.validations || []));
|
|
1869
|
-
}
|
|
1870
|
-
else {
|
|
1871
|
-
control = this.fb.control({
|
|
1872
|
-
value: item.value,
|
|
1873
|
-
disabled: item.disabled,
|
|
1874
|
-
}, this.bindValidations(item.validations || []));
|
|
1875
|
-
}
|
|
1876
|
-
formGroup.addControl(item.formControlName, control);
|
|
1877
|
-
});
|
|
1878
|
-
return formGroup;
|
|
1879
|
-
}
|
|
1880
|
-
/**
|
|
1881
|
-
* @description
|
|
1882
|
-
* Reset fild values to default or specify some value.
|
|
1883
|
-
* @param defaultValues Specify the specific value to set to the controls.
|
|
1884
|
-
* @returns void.
|
|
1885
|
-
*/
|
|
1886
|
-
reset(defaultValues) {
|
|
1887
|
-
this.formGroup.reset(defaultValues);
|
|
1888
|
-
}
|
|
1889
|
-
/**
|
|
1890
|
-
* @description
|
|
1891
|
-
* Reset specific fild Errors.
|
|
1892
|
-
* @param name Name of the field to reset the error.
|
|
1893
|
-
* @returns void.
|
|
1894
|
-
*/
|
|
1895
|
-
resetFieldErrors(name) {
|
|
1896
|
-
var _a, _b;
|
|
1897
|
-
(_b = (_a = this.formGroup) === null || _a === void 0 ? void 0 : _a.get(name)) === null || _b === void 0 ? void 0 : _b.setErrors(null);
|
|
1898
|
-
}
|
|
1899
|
-
/**
|
|
1900
|
-
* @description
|
|
1901
|
-
* Get the controls value from the form.
|
|
1902
|
-
* @returns Form controls values.
|
|
1903
|
-
*/
|
|
1904
|
-
get value() {
|
|
1905
|
-
return this.formGroup.value;
|
|
1906
|
-
}
|
|
1907
|
-
/**
|
|
1908
|
-
* @description
|
|
1909
|
-
* Updating parts of the data model.
|
|
1910
|
-
* Use the patchValue() method to replace any properties defined in the object that have changed in the form model.
|
|
1911
|
-
* @returns Form controls values.
|
|
1912
|
-
* @param value The object that matches the structure of the group.
|
|
1913
|
-
* @param options Configuration options that determine how the control propagates changes and
|
|
1914
|
-
* emits events after the value is patched.
|
|
1915
|
-
* `onlySelf`: When true, each change only affects this control and not its parent. Default is
|
|
1916
|
-
* true.
|
|
1917
|
-
* `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
|
|
1918
|
-
* `valueChanges`
|
|
1919
|
-
* @usageNotes
|
|
1920
|
-
* The following snippet shows how a component can implement this abstract class to
|
|
1921
|
-
* define its own initialization method.
|
|
1922
|
-
* ```ts
|
|
1923
|
-
* this.formGroup.patchValue({
|
|
1924
|
-
* name: 'Todd Motto',
|
|
1925
|
-
* event: {
|
|
1926
|
-
* title: 'AngularCamp 2016',
|
|
1927
|
-
* location: 'Barcelona, Spain'
|
|
1928
|
-
* }
|
|
1929
|
-
* });
|
|
1930
|
-
* ```
|
|
1931
|
-
*/
|
|
1932
|
-
patchValue(value, options) {
|
|
1933
|
-
return this.formGroup.patchValue(value, options);
|
|
1934
|
-
}
|
|
1935
|
-
/**
|
|
1936
|
-
* @description
|
|
1937
|
-
* Updating parts of the data model.
|
|
1938
|
-
* Use the setValue() method to set a new value for an individual control. The setValue() method strictly adheres to the structure of the form group and replaces the entire value for the control.
|
|
1939
|
-
* @returns Form controls values.
|
|
1940
|
-
* @param value The object that matches the structure of the group.
|
|
1941
|
-
* @param options Configuration options that determine how the control propagates changes and
|
|
1942
|
-
* emits events after the value is patched.
|
|
1943
|
-
* `onlySelf`: When true, each change only affects this control and not its parent. Default is
|
|
1944
|
-
* true.
|
|
1945
|
-
* `emitEvent`: When true or not supplied (the default), both the `statusChanges` and
|
|
1946
|
-
* `valueChanges`
|
|
1947
|
-
* @usageNotes
|
|
1948
|
-
* The following snippet shows how a component can implement this abstract class to
|
|
1949
|
-
* define its own initialization method.
|
|
1950
|
-
* ```ts
|
|
1951
|
-
* this.formGroup.setValue({
|
|
1952
|
-
* name: 'Todd Motto',
|
|
1953
|
-
* event: {
|
|
1954
|
-
* title: 'AngularCamp 2016',
|
|
1955
|
-
* location: 'Barcelona, Spain'
|
|
1956
|
-
* }
|
|
1957
|
-
* });
|
|
1958
|
-
* ```
|
|
1959
|
-
*/
|
|
1960
|
-
setValue(value, options) {
|
|
1961
|
-
return this.formGroup.setValue(value, options);
|
|
1962
|
-
}
|
|
1963
|
-
/**
|
|
1964
|
-
* @description
|
|
1965
|
-
* Dynamically remove the form control.
|
|
1966
|
-
* @param index Index of item.
|
|
1967
|
-
* @usageNotes
|
|
1968
|
-
* The following snippet shows how to remove the form control from Froup Group
|
|
1969
|
-
* ```ts
|
|
1970
|
-
* removeControl(1);
|
|
1971
|
-
* ```
|
|
1972
|
-
*/
|
|
1973
|
-
removeControl(layoutIndex, index) {
|
|
1974
|
-
this.formGroup.removeControl(this.controlsConfig.baseControls[layoutIndex].formControlName);
|
|
1975
|
-
this.controlsConfig.baseControls.splice(index, 1);
|
|
1976
|
-
}
|
|
1977
|
-
}
|
|
1978
|
-
|
|
1979
|
-
/*
|
|
1980
|
-
* Public API Surface of falcon-core-module
|
|
1981
|
-
*/
|
|
1982
|
-
|
|
1983
|
-
/**
|
|
1984
|
-
* Generated bundle index. Do not edit.
|
|
1985
|
-
*/
|
|
1986
|
-
|
|
1987
|
-
export { AngularmaterialModule, AppSettingService, AuthGuardService, AuthService, AutoComplete, BaseFormComponent, Button, ButtonComponent, ButtonToggle, CheckBox, Chip, Constant, ControlBuilderComponent, DatePicker, DialogComponent, Divider, Editor, EnvironmentViewModel, FalconCoreModule, IGenericHttpClient, LoggerService, PaginationComponent, ProgressBarComponent, ProgressSpinnerComponent, Radio, ReactiveFieldDirective, RichTextEditor, Select, Slider, SliderToggle, TableComponent, Textarea, Textbox, appSettingsFactory, authServiceFactory, loggerServiceFactory };
|
|
1988
|
-
//# sourceMappingURL=falcon-ng-tailwind.mjs.map
|