@verisoft/ui-primeng 20.1.0 → 20.1.2
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/fesm2022/verisoft-ui-primeng.mjs +3003 -0
- package/fesm2022/verisoft-ui-primeng.mjs.map +1 -0
- package/index.d.ts +752 -0
- package/package.json +18 -6
- package/.eslintrc.json +0 -43
- package/assets/.gitkeep +0 -0
- package/jest.config.ts +0 -22
- package/ng-package.json +0 -14
- package/project.json +0 -36
- package/src/index.ts +0 -34
- package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -11
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -18
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +0 -21
- package/src/lib/components/breadcrumb/breadcrumb.component.stories.ts +0 -36
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -27
- package/src/lib/components/breadcrumb/breadcrumb.pipe.ts +0 -13
- package/src/lib/components/breadcrumb/index.ts +0 -1
- package/src/lib/components/button/button-severity.pipe.ts +0 -20
- package/src/lib/components/button/button.component.html +0 -20
- package/src/lib/components/button/button.component.scss +0 -0
- package/src/lib/components/button/button.component.spec.ts +0 -21
- package/src/lib/components/button/button.component.ts +0 -49
- package/src/lib/components/button/index.ts +0 -1
- package/src/lib/components/calendar/calendar.component.html +0 -53
- package/src/lib/components/calendar/calendar.component.scss +0 -0
- package/src/lib/components/calendar/calendar.component.spec.ts +0 -21
- package/src/lib/components/calendar/calendar.component.ts +0 -70
- package/src/lib/components/calendar/index.ts +0 -1
- package/src/lib/components/checkbox/checkbox.component.html +0 -20
- package/src/lib/components/checkbox/checkbox.component.scss +0 -15
- package/src/lib/components/checkbox/checkbox.component.spec.ts +0 -21
- package/src/lib/components/checkbox/checkbox.component.stories.ts +0 -72
- package/src/lib/components/checkbox/checkbox.component.ts +0 -46
- package/src/lib/components/checkbox/index.ts +0 -1
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +0 -51
- package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +0 -3
- package/src/lib/components/confirm-dialog/confirm-dialog.component.spec.ts +0 -21
- package/src/lib/components/confirm-dialog/confirm-dialog.component.stories.ts +0 -74
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +0 -73
- package/src/lib/components/confirm-dialog/index.ts +0 -1
- package/src/lib/components/dropdown/dropdown.component.html +0 -93
- package/src/lib/components/dropdown/dropdown.component.scss +0 -16
- package/src/lib/components/dropdown/dropdown.component.spec.ts +0 -21
- package/src/lib/components/dropdown/dropdown.component.ts +0 -139
- package/src/lib/components/dropdown/index.ts +0 -1
- package/src/lib/components/dropdown-button/dropdown-button.component.html +0 -1
- package/src/lib/components/dropdown-button/dropdown-button.component.ts +0 -20
- package/src/lib/components/dropdown-button/index.ts +0 -1
- package/src/lib/components/errors/error.component.html +0 -7
- package/src/lib/components/errors/error.component.scss +0 -3
- package/src/lib/components/errors/error.component.ts +0 -34
- package/src/lib/components/errors/index.ts +0 -1
- package/src/lib/components/feature-list/directives/feature-list-column.directive.ts +0 -32
- package/src/lib/components/feature-list/directives/feature-list-filter-field.directive.ts +0 -8
- package/src/lib/components/feature-list/feature-list-filter.pipe.ts +0 -21
- package/src/lib/components/feature-list/feature-list-page.component.ts +0 -32
- package/src/lib/components/feature-list/feature-list-page.model.ts +0 -42
- package/src/lib/components/feature-list/feature-list.component.html +0 -59
- package/src/lib/components/feature-list/feature-list.component.scss +0 -10
- package/src/lib/components/feature-list/feature-list.component.ts +0 -341
- package/src/lib/components/feature-list/index.ts +0 -5
- package/src/lib/components/filter/directives/filter-field.directive.ts +0 -34
- package/src/lib/components/filter/filter.component.html +0 -68
- package/src/lib/components/filter/filter.component.scss +0 -0
- package/src/lib/components/filter/filter.component.spec.ts +0 -21
- package/src/lib/components/filter/filter.component.stories.ts +0 -23
- package/src/lib/components/filter/filter.component.ts +0 -281
- package/src/lib/components/filter/filter.model.ts +0 -18
- package/src/lib/components/filter/index.ts +0 -2
- package/src/lib/components/form-field/form-field.component.html +0 -42
- package/src/lib/components/form-field/form-field.component.scss +0 -0
- package/src/lib/components/form-field/form-field.component.spec.ts +0 -21
- package/src/lib/components/form-field/form-field.component.stories.ts +0 -69
- package/src/lib/components/form-field/form-field.component.ts +0 -37
- package/src/lib/components/form-field/index.ts +0 -1
- package/src/lib/components/header/header.component.html +0 -84
- package/src/lib/components/header/header.component.scss +0 -0
- package/src/lib/components/header/header.component.spec.ts +0 -21
- package/src/lib/components/header/header.component.stories.ts +0 -24
- package/src/lib/components/header/header.component.ts +0 -65
- package/src/lib/components/header/index.ts +0 -2
- package/src/lib/components/header/services/header-provider.service.ts +0 -15
- package/src/lib/components/icon/icon.component.html +0 -2
- package/src/lib/components/icon/icon.component.scss +0 -51
- package/src/lib/components/icon/icon.component.ts +0 -86
- package/src/lib/components/icon/index.ts +0 -2
- package/src/lib/components/input-group/index.ts +0 -1
- package/src/lib/components/input-group/input-group.component.html +0 -34
- package/src/lib/components/input-group/input-group.component.spec.ts +0 -21
- package/src/lib/components/input-group/input-group.component.ts +0 -58
- package/src/lib/components/loader/index.ts +0 -1
- package/src/lib/components/loader/loader.component.html +0 -5
- package/src/lib/components/loader/loader.component.scss +0 -0
- package/src/lib/components/loader/loader.component.spec.ts +0 -21
- package/src/lib/components/loader/loader.component.ts +0 -16
- package/src/lib/components/multiselect/index.ts +0 -1
- package/src/lib/components/multiselect/multiselect.component.html +0 -67
- package/src/lib/components/multiselect/multiselect.component.scss +0 -0
- package/src/lib/components/multiselect/multiselect.component.spec.ts +0 -21
- package/src/lib/components/multiselect/multiselect.component.ts +0 -120
- package/src/lib/components/number-input/index.ts +0 -1
- package/src/lib/components/number-input/number-input.component.html +0 -22
- package/src/lib/components/number-input/number-input.component.spec.ts +0 -21
- package/src/lib/components/number-input/number-input.component.ts +0 -55
- package/src/lib/components/page-header/index.ts +0 -1
- package/src/lib/components/page-header/page-header.component.html +0 -35
- package/src/lib/components/page-header/page-header.component.scss +0 -0
- package/src/lib/components/page-header/page-header.component.spec.ts +0 -21
- package/src/lib/components/page-header/page-header.component.ts +0 -31
- package/src/lib/components/password/index.ts +0 -1
- package/src/lib/components/password/password.component.html +0 -24
- package/src/lib/components/password/password.component.scss +0 -0
- package/src/lib/components/password/password.component.spec.ts +0 -21
- package/src/lib/components/password/password.component.ts +0 -56
- package/src/lib/components/radiobutton/index.ts +0 -1
- package/src/lib/components/radiobutton/radiobutton.component.html +0 -34
- package/src/lib/components/radiobutton/radiobutton.component.scss +0 -6
- package/src/lib/components/radiobutton/radiobutton.component.spec.ts +0 -21
- package/src/lib/components/radiobutton/radiobutton.component.stories.ts +0 -71
- package/src/lib/components/radiobutton/radiobutton.component.ts +0 -61
- package/src/lib/components/section/index.ts +0 -1
- package/src/lib/components/section/section.component.html +0 -25
- package/src/lib/components/section/section.component.scss +0 -0
- package/src/lib/components/section/section.component.spec.ts +0 -21
- package/src/lib/components/section/section.component.ts +0 -31
- package/src/lib/components/shared-components/.eslintrc.json +0 -42
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.html +0 -25
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.scss +0 -0
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.spec.ts +0 -21
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.ts +0 -111
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.html +0 -10
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.scss +0 -0
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.spec.ts +0 -21
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.ts +0 -69
- package/src/lib/components/shared-components/action-button-group/index.ts +0 -2
- package/src/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.ts +0 -142
- package/src/lib/components/shared-components/dynamic-component/dynamic-component.component.ts +0 -56
- package/src/lib/components/shared-components/dynamic-component/index.ts +0 -2
- package/src/lib/components/shared-components/generic-field/generic-field.component.html +0 -98
- package/src/lib/components/shared-components/generic-field/generic-field.component.spec.ts +0 -21
- package/src/lib/components/shared-components/generic-field/generic-field.component.ts +0 -90
- package/src/lib/components/shared-components/generic-field/index.ts +0 -1
- package/src/lib/components/shared-components/generic-form/generic-form.component.html +0 -46
- package/src/lib/components/shared-components/generic-form/generic-form.component.spec.ts +0 -21
- package/src/lib/components/shared-components/generic-form/generic-form.component.ts +0 -56
- package/src/lib/components/shared-components/generic-form/generic-form.model.spec.ts +0 -82
- package/src/lib/components/shared-components/generic-form/generic-form.model.ts +0 -68
- package/src/lib/components/shared-components/generic-form/index.ts +0 -2
- package/src/lib/components/shared-components/index.ts +0 -4
- package/src/lib/components/side-menu/index.ts +0 -2
- package/src/lib/components/side-menu/side-menu.component.html +0 -53
- package/src/lib/components/side-menu/side-menu.component.scss +0 -0
- package/src/lib/components/side-menu/side-menu.component.spec.ts +0 -21
- package/src/lib/components/side-menu/side-menu.component.ts +0 -96
- package/src/lib/components/side-menu/side-menu.module.ts +0 -66
- package/src/lib/components/slider/index.ts +0 -1
- package/src/lib/components/slider/slider.component.html +0 -19
- package/src/lib/components/slider/slider.component.spec.ts +0 -21
- package/src/lib/components/slider/slider.component.ts +0 -56
- package/src/lib/components/snackbar/index.ts +0 -2
- package/src/lib/components/snackbar/services/snackbar.service.ts +0 -45
- package/src/lib/components/snackbar/snackbar.component.html +0 -3
- package/src/lib/components/snackbar/snackbar.component.scss +0 -0
- package/src/lib/components/snackbar/snackbar.component.spec.ts +0 -21
- package/src/lib/components/snackbar/snackbar.component.stories.ts +0 -70
- package/src/lib/components/snackbar/snackbar.component.ts +0 -25
- package/src/lib/components/stepper/index.ts +0 -1
- package/src/lib/components/stepper/stepper.component.html +0 -35
- package/src/lib/components/stepper/stepper.component.spec.ts +0 -21
- package/src/lib/components/stepper/stepper.component.ts +0 -39
- package/src/lib/components/switch/index.ts +0 -1
- package/src/lib/components/switch/switch.component.html +0 -18
- package/src/lib/components/switch/switch.component.scss +0 -0
- package/src/lib/components/switch/switch.component.spec.ts +0 -21
- package/src/lib/components/switch/switch.component.stories.ts +0 -65
- package/src/lib/components/switch/switch.component.ts +0 -52
- package/src/lib/components/tab-view/index.ts +0 -2
- package/src/lib/components/tab-view/tab-view-item.component.ts +0 -22
- package/src/lib/components/tab-view/tab-view.component.html +0 -41
- package/src/lib/components/tab-view/tab-view.component.ts +0 -55
- package/src/lib/components/table/index.ts +0 -1
- package/src/lib/components/table/table-filter.pipe.ts +0 -59
- package/src/lib/components/table/table.component.html +0 -127
- package/src/lib/components/table/table.component.scss +0 -11
- package/src/lib/components/table/table.component.spec.ts +0 -21
- package/src/lib/components/table/table.component.stories.ts +0 -55
- package/src/lib/components/table/table.component.ts +0 -288
- package/src/lib/components/table/table.models.ts +0 -26
- package/src/lib/components/tag/index.ts +0 -2
- package/src/lib/components/tag/tag.component.html +0 -12
- package/src/lib/components/tag/tag.component.scss +0 -33
- package/src/lib/components/tag/tag.component.ts +0 -83
- package/src/lib/components/textarea/index.ts +0 -1
- package/src/lib/components/textarea/textarea.component.html +0 -40
- package/src/lib/components/textarea/textarea.component.scss +0 -5
- package/src/lib/components/textarea/textarea.component.spec.ts +0 -21
- package/src/lib/components/textarea/textarea.component.stories.ts +0 -98
- package/src/lib/components/textarea/textarea.component.ts +0 -62
- package/src/lib/components/textfield/index.ts +0 -1
- package/src/lib/components/textfield/textfield.component.html +0 -82
- package/src/lib/components/textfield/textfield.component.scss +0 -23
- package/src/lib/components/textfield/textfield.component.spec.ts +0 -21
- package/src/lib/components/textfield/textfield.component.stories.ts +0 -85
- package/src/lib/components/textfield/textfield.component.ts +0 -68
- package/src/lib/components/tooltip/index.ts +0 -1
- package/src/lib/components/tooltip/tooltip.component.html +0 -3
- package/src/lib/components/tooltip/tooltip.component.ts +0 -17
- package/src/lib/icons.ts +0 -36
- package/src/lib/interceptors/http-error-message.interceptor.ts +0 -35
- package/src/lib/pages/not-found-page/not-found-page.component.html +0 -26
- package/src/lib/pages/not-found-page/not-found-page.component.scss +0 -0
- package/src/lib/pages/not-found-page/not-found-page.component.spec.ts +0 -21
- package/src/lib/pages/not-found-page/not-found-page.component.ts +0 -16
- package/src/tab-view.ts +0 -1
- package/src/test-setup.ts +0 -8
- package/tsconfig.json +0 -29
- package/tsconfig.lib.json +0 -18
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -16
|
@@ -0,0 +1,3003 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { inject, Input, Optional, Self, Component, forwardRef, ChangeDetectionStrategy, Pipe, input, ViewEncapsulation, Inject, Injectable, EventEmitter, ViewChild, Output, NgModule, ChangeDetectorRef, ContentChild, ContentChildren, SimpleChange, Injector, ViewContainerRef, Directive, InjectionToken, computed } from '@angular/core';
|
|
3
|
+
import * as i1 from '@angular/forms';
|
|
4
|
+
import { ReactiveFormsModule, UntypedFormGroup, UntypedFormControl, FormGroup, NG_VALUE_ACCESSOR } from '@angular/forms';
|
|
5
|
+
import * as i1$4 from '@verisoft/ui-core';
|
|
6
|
+
import { BaseFormInputComponent, WarningPipe, BaseInputControls, INPUT_GROUP_COMPONENT_TOKEN, SlotPosition, FieldSize, FieldType, TEXTFIELD_COMPONENT_TOKEN, BreadcrumbCoreComponent, BREADCRUMB_COMPONENT_TOKEN, CHECKBOX_COMPONENT_TOKEN, CALENDAR_COMPONENT_TOKEN, PASSWORD_COMPONENT_TOKEN, ControlSeverity, IconPosition, BUTTON_COMPONENT_TOKEN, SECTION_COMPONENT_TOKEN, DROPDOWN_BUTTON_COMPONENT_TOKEN, RADIOBUTTON_COMPONENT_TOKEN, NUMBER_INPUT_COMPONENT_TOKEN, SETTINGS_MENU, UnsubscribeComponent, HEADER_COMPONENT_TOKEN, TEXTAREA_COMPONENT_TOKEN, LOADER_COMPONENT_TOKEN, SNACKBAR_COMPONENT_TOKEN, SideMenuService, ScreenSizeService, MENU_TOKEN, SideMenuProviderService, SIDE_MENU_COMPONENT_TOKEN, SIDE_MENU_STATE_TOKEN, ColumnModel, RowModel, TABLE_COLUMN_PROVIDER, TABLE_COMPONENT_TOKEN, ACTION_BUTTON_GROUP_COMPONENT_TOKEN, queryListChanged, DROPDOWN_COMPONENT_TOKEN, MULTISELECT_COMPONENT_TOKEN, GenericFieldType, DatasourceDirective, GENERIC_FIELD_COMPONENT_TOKEN, PageHeaderCoreComponent, PAGE_HEADER_COMPONENT_TOKEN, LayoutType, STEPPER_COMPONENT_TOKEN, SLIDER_COMPONENT_TOKEN, CONFIRM_DIALOG_COMPONENT_TOKEN, SWITCH_COMPONENT_TOKEN, TAB_VIEW_COMPONENT_TOKEN, DEFAULT_DEBOUNCE_TIME, DialogService, isFilterEmpty, ButtonShortCutDirective, FILTER_COMPONENT_TOKEN, MAX_COLUMN_CHAR_COUNT, TableSelectionMode, downloadFile, TableDatasourceDirective, TableFilterDirective, TableColumnDirective, TAG_COMPONENT_TOKEN, IconsComponent } from '@verisoft/ui-core';
|
|
7
|
+
import * as i3$1 from 'primeng/inputgroup';
|
|
8
|
+
import { InputGroupModule } from 'primeng/inputgroup';
|
|
9
|
+
import * as i2$1 from 'primeng/inputgroupaddon';
|
|
10
|
+
import { InputGroupAddonModule } from 'primeng/inputgroupaddon';
|
|
11
|
+
import * as i4 from 'primeng/inputtext';
|
|
12
|
+
import { InputTextModule } from 'primeng/inputtext';
|
|
13
|
+
import * as i2 from '@angular/common';
|
|
14
|
+
import { CommonModule, NgClass, AsyncPipe, NgTemplateOutlet } from '@angular/common';
|
|
15
|
+
import { ERROR_PROVIDER_TOKEN, DEFAULT_SEARCH_LIMIT, SortDirection, BASE_URL_PATH, BaseHttpService, convertDatasource, DEFAULT_PAGE_SIZE } from '@verisoft/core';
|
|
16
|
+
import * as i1$1 from 'primeng/message';
|
|
17
|
+
import { MessageModule } from 'primeng/message';
|
|
18
|
+
import * as i3 from 'primeng/tooltip';
|
|
19
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
20
|
+
import * as i2$2 from 'primeng/floatlabel';
|
|
21
|
+
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
22
|
+
import * as i1$2 from 'primeng/breadcrumb';
|
|
23
|
+
import { BreadcrumbModule } from 'primeng/breadcrumb';
|
|
24
|
+
import * as i3$2 from 'primeng/checkbox';
|
|
25
|
+
import { CheckboxModule } from 'primeng/checkbox';
|
|
26
|
+
import { DatePicker } from 'primeng/datepicker';
|
|
27
|
+
import * as i2$3 from 'primeng/password';
|
|
28
|
+
import { PasswordModule } from 'primeng/password';
|
|
29
|
+
import * as i2$4 from '@angular/router';
|
|
30
|
+
import { RouterModule, Router, ActivatedRoute, RouterOutlet, RouterLink } from '@angular/router';
|
|
31
|
+
import * as i1$3 from 'primeng/button';
|
|
32
|
+
import { ButtonModule } from 'primeng/button';
|
|
33
|
+
import * as i6 from 'primeng/ripple';
|
|
34
|
+
import { RippleModule } from 'primeng/ripple';
|
|
35
|
+
import * as i3$3 from 'primeng/radiobutton';
|
|
36
|
+
import { RadioButtonModule } from 'primeng/radiobutton';
|
|
37
|
+
import * as i2$5 from 'primeng/inputnumber';
|
|
38
|
+
import { InputNumberModule } from 'primeng/inputnumber';
|
|
39
|
+
import * as i4$1 from 'primeng/avatar';
|
|
40
|
+
import { AvatarModule } from 'primeng/avatar';
|
|
41
|
+
import { Textarea } from 'primeng/textarea';
|
|
42
|
+
import * as i1$5 from 'primeng/progressspinner';
|
|
43
|
+
import { ProgressSpinnerModule } from 'primeng/progressspinner';
|
|
44
|
+
import * as i1$6 from 'primeng/api';
|
|
45
|
+
import * as i2$6 from 'primeng/toast';
|
|
46
|
+
import { ToastModule } from 'primeng/toast';
|
|
47
|
+
import * as i3$5 from '@ngx-translate/core';
|
|
48
|
+
import { TranslateModule } from '@ngx-translate/core';
|
|
49
|
+
import * as i1$7 from 'primeng/tree';
|
|
50
|
+
import { TreeModule } from 'primeng/tree';
|
|
51
|
+
import * as i2$7 from 'primeng/table';
|
|
52
|
+
import { TableModule } from 'primeng/table';
|
|
53
|
+
import { Subject, takeUntil, combineLatestWith, catchError, throwError, BehaviorSubject, startWith, map, debounceTime, distinctUntilChanged, take, switchMap, forkJoin, of } from 'rxjs';
|
|
54
|
+
import * as i2$8 from 'primeng/select';
|
|
55
|
+
import { SelectModule } from 'primeng/select';
|
|
56
|
+
import * as i3$4 from 'primeng/multiselect';
|
|
57
|
+
import { MultiSelectModule } from 'primeng/multiselect';
|
|
58
|
+
import * as i2$9 from 'primeng/stepper';
|
|
59
|
+
import { StepperModule } from 'primeng/stepper';
|
|
60
|
+
import * as i2$a from 'primeng/slider';
|
|
61
|
+
import { SliderModule } from 'primeng/slider';
|
|
62
|
+
import * as i3$6 from 'primeng/dialog';
|
|
63
|
+
import { DialogModule } from 'primeng/dialog';
|
|
64
|
+
import { ToggleSwitch } from 'primeng/toggleswitch';
|
|
65
|
+
import { v4 } from 'uuid';
|
|
66
|
+
import * as i1$8 from 'primeng/tabs';
|
|
67
|
+
import { TabsModule } from 'primeng/tabs';
|
|
68
|
+
import { HttpClient } from '@angular/common/http';
|
|
69
|
+
import * as i2$b from 'primeng/tag';
|
|
70
|
+
import { TagModule } from 'primeng/tag';
|
|
71
|
+
|
|
72
|
+
const Icons = {
|
|
73
|
+
add: 'pi pi-plus',
|
|
74
|
+
minus: 'pi pi-minus',
|
|
75
|
+
delete: 'pi pi-trash',
|
|
76
|
+
filter: 'pi pi-filter',
|
|
77
|
+
download: 'pi pi-download',
|
|
78
|
+
save: 'pi pi-save',
|
|
79
|
+
print: 'pi pi-print',
|
|
80
|
+
calendar: 'pi pi-calendar',
|
|
81
|
+
edit: 'pi pi-pencil',
|
|
82
|
+
settings: 'pi pi-cog',
|
|
83
|
+
house: 'pi pi-home',
|
|
84
|
+
chevronRight: 'pi pi-chevron-right',
|
|
85
|
+
chevronLeft: 'pi pi-chevron-left',
|
|
86
|
+
chevronDown: 'pi pi-chevron-down',
|
|
87
|
+
chevronUp: 'pi pi-chevron-up',
|
|
88
|
+
checkbox: 'pi pi-check',
|
|
89
|
+
warning: 'pi pi-exclamation-triangle',
|
|
90
|
+
search: 'pi pi-search',
|
|
91
|
+
action: 'pi pi-bars',
|
|
92
|
+
user: 'pi pi-user',
|
|
93
|
+
logout: 'pi pi-user',
|
|
94
|
+
crossCircle: 'pi pi-times-circle',
|
|
95
|
+
infoCircle: 'pi pi-info-circle',
|
|
96
|
+
cross: 'pi pi-times',
|
|
97
|
+
arrowLeft: 'pi pi-arrow-left',
|
|
98
|
+
arrowRight: 'pi pi-arrow-right',
|
|
99
|
+
questionCircle: 'pi pi-question-circle',
|
|
100
|
+
checkCircle: 'pi pi-check-circle',
|
|
101
|
+
sitemap: 'pi pi-sitemap',
|
|
102
|
+
check: 'pi pi-check',
|
|
103
|
+
envelope: 'pi pi-envelope',
|
|
104
|
+
loader: 'pi pi-loader',
|
|
105
|
+
};
|
|
106
|
+
|
|
107
|
+
class FormFieldComponent extends BaseFormInputComponent {
|
|
108
|
+
constructor(ngControl) {
|
|
109
|
+
super(ngControl);
|
|
110
|
+
this.display = 'block';
|
|
111
|
+
this.errorProvider = inject(ERROR_PROVIDER_TOKEN);
|
|
112
|
+
this.icons = Icons;
|
|
113
|
+
}
|
|
114
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
115
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: FormFieldComponent, isStandalone: true, selector: "v-form-field", inputs: { display: "display", variant: "variant" }, usesInheritance: true, ngImport: i0, template: "<div class=\"v-form-field mt-3\" [attr.data-testId]=\"testId\">\n <div [ngClass]=\"{ 'd-block d-md-flex': display === 'flex', 'd-lg-flex': display === 'block' }\">\n <div class=\"col-12 col-md-4 d-flex align-items-center\">\n <label\n class=\"v-formfield-label d-flex align-items-center\"\n [ngClass]=\"{\n 'pb-2': display === 'block',\n 'text-error': (errorProvider.mapError(ngControl?.errors ?? [])) && ngControl?.dirty, \n 'text-warning': (ngControl?.errors | warning) && ngControl?.dirty,\n 'text-default': !ngControl?.invalid && !ngControl?.dirty,\n 'text-secondary': !ngControl?.invalid && ngControl?.dirty\n }\"\n >{{ label }}@if (label) {\n <span>:</span>\n }\n @if (required) {\n <span class=\"text-error ps-1\">*</span>\n }\n </label>\n @if (tooltip) {\n <i\n [pTooltip]=\"tooltip\"\n class=\"ps-2 text-default v-tooltip {{ icons.infoCircle }}\"\n ></i>\n }\n </div>\n <div\n class=\"col-sm-12 col-md-8 col-lg-8\"\n >\n <div\n class=\"v-form-field-content align-items-center w-100\"\n [ngClass]=\"{ 'd-flex': display === 'flex', 'd-block': display === 'block', 'input-warning': ngControl?.errors | warning }\"\n >\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"align-content-center\">\n <ng-container>\n </ng-container>\n </div>\n</div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: MessageModule }, { kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }, { kind: "pipe", type: WarningPipe, name: "warning" }] }); }
|
|
116
|
+
}
|
|
117
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FormFieldComponent, decorators: [{
|
|
118
|
+
type: Component,
|
|
119
|
+
args: [{ selector: 'v-form-field', imports: [
|
|
120
|
+
CommonModule,
|
|
121
|
+
WarningPipe,
|
|
122
|
+
ReactiveFormsModule,
|
|
123
|
+
MessageModule,
|
|
124
|
+
TooltipModule,
|
|
125
|
+
], template: "<div class=\"v-form-field mt-3\" [attr.data-testId]=\"testId\">\n <div [ngClass]=\"{ 'd-block d-md-flex': display === 'flex', 'd-lg-flex': display === 'block' }\">\n <div class=\"col-12 col-md-4 d-flex align-items-center\">\n <label\n class=\"v-formfield-label d-flex align-items-center\"\n [ngClass]=\"{\n 'pb-2': display === 'block',\n 'text-error': (errorProvider.mapError(ngControl?.errors ?? [])) && ngControl?.dirty, \n 'text-warning': (ngControl?.errors | warning) && ngControl?.dirty,\n 'text-default': !ngControl?.invalid && !ngControl?.dirty,\n 'text-secondary': !ngControl?.invalid && ngControl?.dirty\n }\"\n >{{ label }}@if (label) {\n <span>:</span>\n }\n @if (required) {\n <span class=\"text-error ps-1\">*</span>\n }\n </label>\n @if (tooltip) {\n <i\n [pTooltip]=\"tooltip\"\n class=\"ps-2 text-default v-tooltip {{ icons.infoCircle }}\"\n ></i>\n }\n </div>\n <div\n class=\"col-sm-12 col-md-8 col-lg-8\"\n >\n <div\n class=\"v-form-field-content align-items-center w-100\"\n [ngClass]=\"{ 'd-flex': display === 'flex', 'd-block': display === 'block', 'input-warning': ngControl?.errors | warning }\"\n >\n <ng-content></ng-content>\n </div>\n </div>\n <div class=\"align-content-center\">\n <ng-container>\n </ng-container>\n </div>\n</div>\n</div>\n" }]
|
|
126
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
127
|
+
type: Optional
|
|
128
|
+
}, {
|
|
129
|
+
type: Self
|
|
130
|
+
}] }], propDecorators: { display: [{
|
|
131
|
+
type: Input
|
|
132
|
+
}], variant: [{
|
|
133
|
+
type: Input
|
|
134
|
+
}] } });
|
|
135
|
+
|
|
136
|
+
class InputGroupComponent extends BaseFormInputComponent {
|
|
137
|
+
constructor(ngControl) {
|
|
138
|
+
super(ngControl);
|
|
139
|
+
}
|
|
140
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: InputGroupComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
141
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: InputGroupComponent, isStandalone: true, selector: "v-input-group", inputs: { items: "items" }, providers: [
|
|
142
|
+
{
|
|
143
|
+
provide: BaseInputControls,
|
|
144
|
+
useExisting: forwardRef(() => InputGroupComponent),
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
provide: INPUT_GROUP_COMPONENT_TOKEN,
|
|
148
|
+
useExisting: InputGroupComponent,
|
|
149
|
+
},
|
|
150
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-input-group w-100\">\n <v-form-field\n [label]=\"label\"\n [required]=\"required\"\n [tooltip]=\"tooltip\" >\n <p-inputGroup>\n @for (item of items; track item) {\n @if (item.position === 'left') {\n <p-inputGroupAddon>\n @if (item.icon) {\n <i [class]=\"item.icon\"></i>\n }\n @if (item.text) {\n {{ item.text }}\n }\n </p-inputGroupAddon>\n }\n }\n <input pInputText [formControl]=\"formControl\" class=\"w-100\" />\n @for (item of items; track item) {\n @if (item.position === 'right') {\n <p-inputGroupAddon>\n @if (item.icon) {\n <i [class]=\"item.icon\"></i>\n }\n @if (item.text) {\n {{ item.text }}\n }\n </p-inputGroupAddon>\n }\n }\n </p-inputGroup>\n </v-form-field>\n</div>\n", dependencies: [{ kind: "ngmodule", type: InputGroupAddonModule }, { kind: "component", type: i2$1.InputGroupAddon, selector: "p-inputgroup-addon, p-inputGroupAddon", inputs: ["style", "styleClass"] }, { kind: "ngmodule", type: InputGroupModule }, { kind: "component", type: i3$1.InputGroup, selector: "p-inputgroup, p-inputGroup, p-input-group", inputs: ["styleClass"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
151
|
+
}
|
|
152
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: InputGroupComponent, decorators: [{
|
|
153
|
+
type: Component,
|
|
154
|
+
args: [{ selector: 'v-input-group', imports: [
|
|
155
|
+
InputGroupAddonModule,
|
|
156
|
+
InputGroupModule,
|
|
157
|
+
InputTextModule,
|
|
158
|
+
ReactiveFormsModule,
|
|
159
|
+
FormFieldComponent
|
|
160
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
161
|
+
{
|
|
162
|
+
provide: BaseInputControls,
|
|
163
|
+
useExisting: forwardRef(() => InputGroupComponent),
|
|
164
|
+
},
|
|
165
|
+
{
|
|
166
|
+
provide: INPUT_GROUP_COMPONENT_TOKEN,
|
|
167
|
+
useExisting: InputGroupComponent,
|
|
168
|
+
},
|
|
169
|
+
], template: "<div class=\"v-input-group w-100\">\n <v-form-field\n [label]=\"label\"\n [required]=\"required\"\n [tooltip]=\"tooltip\" >\n <p-inputGroup>\n @for (item of items; track item) {\n @if (item.position === 'left') {\n <p-inputGroupAddon>\n @if (item.icon) {\n <i [class]=\"item.icon\"></i>\n }\n @if (item.text) {\n {{ item.text }}\n }\n </p-inputGroupAddon>\n }\n }\n <input pInputText [formControl]=\"formControl\" class=\"w-100\" />\n @for (item of items; track item) {\n @if (item.position === 'right') {\n <p-inputGroupAddon>\n @if (item.icon) {\n <i [class]=\"item.icon\"></i>\n }\n @if (item.text) {\n {{ item.text }}\n }\n </p-inputGroupAddon>\n }\n }\n </p-inputGroup>\n </v-form-field>\n</div>\n" }]
|
|
170
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
171
|
+
type: Optional
|
|
172
|
+
}, {
|
|
173
|
+
type: Self
|
|
174
|
+
}] }], propDecorators: { items: [{
|
|
175
|
+
type: Input
|
|
176
|
+
}] } });
|
|
177
|
+
|
|
178
|
+
class ErrorComponent {
|
|
179
|
+
constructor() {
|
|
180
|
+
this.errorSlot = SlotPosition.bottom;
|
|
181
|
+
this.messageSlot = SlotPosition.bottom;
|
|
182
|
+
this.variant = 'simple';
|
|
183
|
+
this.severity = 'error';
|
|
184
|
+
this.errorService = inject(ERROR_PROVIDER_TOKEN);
|
|
185
|
+
this.icons = Icons;
|
|
186
|
+
}
|
|
187
|
+
getErrorMessage(errors) {
|
|
188
|
+
return this.errorService.mapError(errors);
|
|
189
|
+
}
|
|
190
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ErrorComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
191
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: ErrorComponent, isStandalone: true, selector: "v-validation-message", inputs: { ngControl: "ngControl", errorSlot: "errorSlot", messageSlot: "messageSlot", variant: "variant", severity: "severity" }, ngImport: i0, template: "\n@if (ngControl && ngControl.errors) {\n <p-message\n [severity]=\"severity\"\n text=\"{{ getErrorMessage(ngControl.errors) | async }}\">\n </p-message>\n}\n", styles: [".p-message-content{color:#e60017}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: MessageModule }, { kind: "component", type: i1$1.Message, selector: "p-message", inputs: ["severity", "text", "escape", "style", "styleClass", "closable", "icon", "closeIcon", "life", "showTransitionOptions", "hideTransitionOptions", "size", "variant"], outputs: ["onClose"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }] }); }
|
|
192
|
+
}
|
|
193
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ErrorComponent, decorators: [{
|
|
194
|
+
type: Component,
|
|
195
|
+
args: [{ selector: "v-validation-message", imports: [CommonModule, MessageModule], template: "\n@if (ngControl && ngControl.errors) {\n <p-message\n [severity]=\"severity\"\n text=\"{{ getErrorMessage(ngControl.errors) | async }}\">\n </p-message>\n}\n", styles: [".p-message-content{color:#e60017}\n"] }]
|
|
196
|
+
}], propDecorators: { ngControl: [{
|
|
197
|
+
type: Input,
|
|
198
|
+
args: [{ required: true }]
|
|
199
|
+
}], errorSlot: [{
|
|
200
|
+
type: Input
|
|
201
|
+
}], messageSlot: [{
|
|
202
|
+
type: Input
|
|
203
|
+
}], variant: [{
|
|
204
|
+
type: Input
|
|
205
|
+
}], severity: [{
|
|
206
|
+
type: Input
|
|
207
|
+
}] } });
|
|
208
|
+
|
|
209
|
+
class TextfieldComponent extends BaseFormInputComponent {
|
|
210
|
+
constructor(ngControl) {
|
|
211
|
+
super(ngControl);
|
|
212
|
+
this.icons = Icons;
|
|
213
|
+
this.size = FieldSize.medium;
|
|
214
|
+
this.type = FieldType.text;
|
|
215
|
+
this.floatLabel = false;
|
|
216
|
+
}
|
|
217
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TextfieldComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
218
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TextfieldComponent, isStandalone: true, selector: "v-textfield", inputs: { size: "size", type: "type", floatLabel: "floatLabel" }, providers: [
|
|
219
|
+
{
|
|
220
|
+
provide: BaseInputControls,
|
|
221
|
+
useExisting: forwardRef(() => TextfieldComponent),
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
provide: TEXTFIELD_COMPONENT_TOKEN,
|
|
225
|
+
useExisting: TextfieldComponent,
|
|
226
|
+
},
|
|
227
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-text-field\">\n @if (!floatLabel && label) {\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <span\n class=\"w-100 flex-grow-1\"\n [ngClass]=\"{ 'p-input-icon-right': type === 'search' }\"\n >\n <input\n pInputText\n [id]=\"inputId\"\n [formControl]=\"formControl\"\n [type]=\"type === 'search' ? 'text' : type\"\n class=\"w-100 flex-grow-1 v-text-field\"\n [required]=\"isRequired()\"\n [readOnly]=\"readonly\"\n [title]=\"label\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [ngClass]=\"{\n 'p-inputtext-sm': size === 'small',\n 'p-inputtext-lg': size === 'large'\n }\"\n />\n @if (type === 'search') {\n <i\n class=\"pi ms-2 v-text-field__icon\"\n [ngStyle]=\"{\n cursor: ngControl && ngControl.value ? 'pointer' : 'default'\n }\"\n [ngClass]=\"{\n 'pi-search': ngControl && !ngControl.value,\n 'pi-times': ngControl && ngControl.value,\n }\"\n (click)=\"ngControl && ngControl.value ? ngControl.reset() : null\"\n ></i>\n }\n </span>\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n } @else {\n <span\n class=\"w-100 flex-grow-1\"\n [ngClass]=\"{ 'p-input-icon-right': type === 'search' }\"\n >\n <p-floatLabel>\n <input\n pInputText\n type=\"text\"\n [id]=\"inputId\"\n class=\"w-100 flex-grow-1\"\n [required]=\"isRequired()\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [ngClass]=\"{\n 'p-inputtext-sm': size === 'small',\n 'p-inputtext-lg': size === 'large'\n }\"\n />\n <label [for]=\"inputId\" class=\"v-text-field__label\">{{ label }}</label>\n </p-floatLabel>\n @if (type === 'search') {\n <i\n class=\"pi ms-2 v-text-field__icon\"\n [ngStyle]=\"{\n cursor: ngControl && ngControl.value ? 'pointer' : 'default'\n }\"\n [ngClass]=\"{\n 'pi-search': ngControl && !ngControl.value,\n 'pi-times': ngControl && ngControl.value,\n }\"\n (click)=\"ngControl && ngControl.value ? ngControl.reset() : null\"\n ></i>\n }\n </span>\n }\n</div>\n", styles: [".p-inputtext:focus .ng-invalid.ng-dirty{border-color:var(--error-color)}.p-inputtext.ng-dirty.ng-invalid{border-color:var(--error-color)}.verisoft-text-field{justify-content:center;width:100%}.p-input-icon-right i.pi-times:hover{cursor:pointer}.p-inputtext.p-inputtext-lg{font-size:1rem;padding:.75rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: InputTextModule }, { kind: "directive", type: i4.InputText, selector: "[pInputText]", inputs: ["pSize", "variant", "fluid", "invalid"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i2$2.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
228
|
+
}
|
|
229
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TextfieldComponent, decorators: [{
|
|
230
|
+
type: Component,
|
|
231
|
+
args: [{ selector: 'v-textfield', imports: [
|
|
232
|
+
CommonModule,
|
|
233
|
+
InputTextModule,
|
|
234
|
+
ReactiveFormsModule,
|
|
235
|
+
FormFieldComponent,
|
|
236
|
+
FloatLabelModule,
|
|
237
|
+
ErrorComponent
|
|
238
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
239
|
+
{
|
|
240
|
+
provide: BaseInputControls,
|
|
241
|
+
useExisting: forwardRef(() => TextfieldComponent),
|
|
242
|
+
},
|
|
243
|
+
{
|
|
244
|
+
provide: TEXTFIELD_COMPONENT_TOKEN,
|
|
245
|
+
useExisting: TextfieldComponent,
|
|
246
|
+
},
|
|
247
|
+
], template: "<div class=\"v-text-field\">\n @if (!floatLabel && label) {\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <span\n class=\"w-100 flex-grow-1\"\n [ngClass]=\"{ 'p-input-icon-right': type === 'search' }\"\n >\n <input\n pInputText\n [id]=\"inputId\"\n [formControl]=\"formControl\"\n [type]=\"type === 'search' ? 'text' : type\"\n class=\"w-100 flex-grow-1 v-text-field\"\n [required]=\"isRequired()\"\n [readOnly]=\"readonly\"\n [title]=\"label\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [ngClass]=\"{\n 'p-inputtext-sm': size === 'small',\n 'p-inputtext-lg': size === 'large'\n }\"\n />\n @if (type === 'search') {\n <i\n class=\"pi ms-2 v-text-field__icon\"\n [ngStyle]=\"{\n cursor: ngControl && ngControl.value ? 'pointer' : 'default'\n }\"\n [ngClass]=\"{\n 'pi-search': ngControl && !ngControl.value,\n 'pi-times': ngControl && ngControl.value,\n }\"\n (click)=\"ngControl && ngControl.value ? ngControl.reset() : null\"\n ></i>\n }\n </span>\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n } @else {\n <span\n class=\"w-100 flex-grow-1\"\n [ngClass]=\"{ 'p-input-icon-right': type === 'search' }\"\n >\n <p-floatLabel>\n <input\n pInputText\n type=\"text\"\n [id]=\"inputId\"\n class=\"w-100 flex-grow-1\"\n [required]=\"isRequired()\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder ? placeholder : ''\"\n [ngClass]=\"{\n 'p-inputtext-sm': size === 'small',\n 'p-inputtext-lg': size === 'large'\n }\"\n />\n <label [for]=\"inputId\" class=\"v-text-field__label\">{{ label }}</label>\n </p-floatLabel>\n @if (type === 'search') {\n <i\n class=\"pi ms-2 v-text-field__icon\"\n [ngStyle]=\"{\n cursor: ngControl && ngControl.value ? 'pointer' : 'default'\n }\"\n [ngClass]=\"{\n 'pi-search': ngControl && !ngControl.value,\n 'pi-times': ngControl && ngControl.value,\n }\"\n (click)=\"ngControl && ngControl.value ? ngControl.reset() : null\"\n ></i>\n }\n </span>\n }\n</div>\n", styles: [".p-inputtext:focus .ng-invalid.ng-dirty{border-color:var(--error-color)}.p-inputtext.ng-dirty.ng-invalid{border-color:var(--error-color)}.verisoft-text-field{justify-content:center;width:100%}.p-input-icon-right i.pi-times:hover{cursor:pointer}.p-inputtext.p-inputtext-lg{font-size:1rem;padding:.75rem}\n"] }]
|
|
248
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
249
|
+
type: Optional
|
|
250
|
+
}, {
|
|
251
|
+
type: Self
|
|
252
|
+
}] }], propDecorators: { size: [{
|
|
253
|
+
type: Input
|
|
254
|
+
}], type: [{
|
|
255
|
+
type: Input
|
|
256
|
+
}], floatLabel: [{
|
|
257
|
+
type: Input
|
|
258
|
+
}] } });
|
|
259
|
+
|
|
260
|
+
class ConvertMenuItemPipe {
|
|
261
|
+
transform(items) {
|
|
262
|
+
return items.map(i => i);
|
|
263
|
+
}
|
|
264
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ConvertMenuItemPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
265
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: ConvertMenuItemPipe, isStandalone: true, name: "menuItem" }); }
|
|
266
|
+
}
|
|
267
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ConvertMenuItemPipe, decorators: [{
|
|
268
|
+
type: Pipe,
|
|
269
|
+
args: [{
|
|
270
|
+
name: 'menuItem',
|
|
271
|
+
standalone: true,
|
|
272
|
+
}]
|
|
273
|
+
}] });
|
|
274
|
+
|
|
275
|
+
class BreadcrumbComponent extends BreadcrumbCoreComponent {
|
|
276
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
277
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: BreadcrumbComponent, isStandalone: true, selector: "v-breadcrumb", providers: [
|
|
278
|
+
{
|
|
279
|
+
provide: BREADCRUMB_COMPONENT_TOKEN,
|
|
280
|
+
useExisting: BreadcrumbComponent
|
|
281
|
+
},
|
|
282
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-breadcrumb card flex justify-content-center\">\n @if (useHomeRoute) {\n <p-breadcrumb\n class=\"max-w-full\"\n [model]=\"items | menuItem\"\n [home]=\"home\"\n ></p-breadcrumb>\n } @else {\n <p-breadcrumb class=\"max-w-full\" [model]=\"items | menuItem\"></p-breadcrumb>\n }\n</div>\n", styles: ["p-breadcrumb>nav{border:none}p-breadcrumb>nav>ol{align-items:stretch;font-weight:600;font-size:1rem}p-breadcrumb>nav a[aria-current=page]>span{color:var(--primary-color)!important}.p-menuitem-link{gap:.5rem;text-align:center}.p-menuitem-text{align-self:baseline}\n"], dependencies: [{ kind: "ngmodule", type: BreadcrumbModule }, { kind: "component", type: i1$2.Breadcrumb, selector: "p-breadcrumb", inputs: ["model", "style", "styleClass", "home", "homeAriaLabel"], outputs: ["onItemClick"] }, { kind: "pipe", type: ConvertMenuItemPipe, name: "menuItem" }] }); }
|
|
283
|
+
}
|
|
284
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: BreadcrumbComponent, decorators: [{
|
|
285
|
+
type: Component,
|
|
286
|
+
args: [{ selector: 'v-breadcrumb', imports: [
|
|
287
|
+
BreadcrumbModule,
|
|
288
|
+
ConvertMenuItemPipe
|
|
289
|
+
], providers: [
|
|
290
|
+
{
|
|
291
|
+
provide: BREADCRUMB_COMPONENT_TOKEN,
|
|
292
|
+
useExisting: BreadcrumbComponent
|
|
293
|
+
},
|
|
294
|
+
], template: "<div class=\"v-breadcrumb card flex justify-content-center\">\n @if (useHomeRoute) {\n <p-breadcrumb\n class=\"max-w-full\"\n [model]=\"items | menuItem\"\n [home]=\"home\"\n ></p-breadcrumb>\n } @else {\n <p-breadcrumb class=\"max-w-full\" [model]=\"items | menuItem\"></p-breadcrumb>\n }\n</div>\n", styles: ["p-breadcrumb>nav{border:none}p-breadcrumb>nav>ol{align-items:stretch;font-weight:600;font-size:1rem}p-breadcrumb>nav a[aria-current=page]>span{color:var(--primary-color)!important}.p-menuitem-link{gap:.5rem;text-align:center}.p-menuitem-text{align-self:baseline}\n"] }]
|
|
295
|
+
}] });
|
|
296
|
+
|
|
297
|
+
class CheckboxComponent extends BaseFormInputComponent {
|
|
298
|
+
constructor(ngControl) {
|
|
299
|
+
super(ngControl);
|
|
300
|
+
this.indeterminate = input(false, ...(ngDevMode ? [{ debugName: "indeterminate" }] : []));
|
|
301
|
+
this.icon = Icons;
|
|
302
|
+
}
|
|
303
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckboxComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
304
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.1", type: CheckboxComponent, isStandalone: true, selector: "v-checkbox", inputs: { indeterminate: { classPropertyName: "indeterminate", publicName: "indeterminate", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
305
|
+
{
|
|
306
|
+
provide: BaseInputControls,
|
|
307
|
+
useExisting: CheckboxComponent,
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
provide: CHECKBOX_COMPONENT_TOKEN,
|
|
311
|
+
useExisting: CheckboxComponent,
|
|
312
|
+
},
|
|
313
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-checkbox d-flex align-items-center mt-2\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-checkbox\n [ngClass]=\"{ 'checkbox-error': ngControl?.invalid && ngControl?.dirty && ngControl?.value === false }\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [binary]=\"true\"\n [readonly]=\"readonly\"\n [indeterminate]=\"indeterminate()\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>\n", styles: ["p-echeckbox.ng-dirty.ng-invalid .p-checkbox>.p-checkbox-box{border-color:var(--error-color)}p-echeckbox.ng-dirty.ng-invalid .p-checkbox-label{color:var(--error-color)}.checkbox-error .p-checkbox-box.p-highlight{background:var(--error-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: CheckboxModule }, { kind: "component", type: i3$2.Checkbox, selector: "p-checkbox, p-checkBox, p-check-box", inputs: ["value", "binary", "ariaLabelledBy", "ariaLabel", "tabindex", "inputId", "inputStyle", "styleClass", "inputClass", "indeterminate", "formControl", "checkboxIcon", "readonly", "autofocus", "trueValue", "falseValue", "variant", "size"], outputs: ["onChange", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
314
|
+
}
|
|
315
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CheckboxComponent, decorators: [{
|
|
316
|
+
type: Component,
|
|
317
|
+
args: [{ selector: 'v-checkbox', imports: [CommonModule, CheckboxModule, ReactiveFormsModule, FormFieldComponent, ErrorComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
318
|
+
{
|
|
319
|
+
provide: BaseInputControls,
|
|
320
|
+
useExisting: CheckboxComponent,
|
|
321
|
+
},
|
|
322
|
+
{
|
|
323
|
+
provide: CHECKBOX_COMPONENT_TOKEN,
|
|
324
|
+
useExisting: CheckboxComponent,
|
|
325
|
+
},
|
|
326
|
+
], template: "<div class=\"v-checkbox d-flex align-items-center mt-2\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-checkbox\n [ngClass]=\"{ 'checkbox-error': ngControl?.invalid && ngControl?.dirty && ngControl?.value === false }\"\n [formControl]=\"formControl\"\n [required]=\"required\"\n [binary]=\"true\"\n [readonly]=\"readonly\"\n [indeterminate]=\"indeterminate()\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>\n", styles: ["p-echeckbox.ng-dirty.ng-invalid .p-checkbox>.p-checkbox-box{border-color:var(--error-color)}p-echeckbox.ng-dirty.ng-invalid .p-checkbox-label{color:var(--error-color)}.checkbox-error .p-checkbox-box.p-highlight{background:var(--error-color)}\n"] }]
|
|
327
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
328
|
+
type: Optional
|
|
329
|
+
}, {
|
|
330
|
+
type: Self
|
|
331
|
+
}] }] });
|
|
332
|
+
|
|
333
|
+
class CalendarComponent extends BaseFormInputComponent {
|
|
334
|
+
constructor(ngControl) {
|
|
335
|
+
super(ngControl);
|
|
336
|
+
this.icon = Icons.calendar;
|
|
337
|
+
this.selectionMode = 'single';
|
|
338
|
+
this.icons = Icons;
|
|
339
|
+
this.formDisplay = "block";
|
|
340
|
+
}
|
|
341
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CalendarComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
342
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: CalendarComponent, isStandalone: true, selector: "v-calendar", inputs: { maxDate: "maxDate", icon: "icon", minDate: "minDate", header: "header", footer: "footer", floatLabel: "floatLabel", selectionMode: "selectionMode" }, providers: [
|
|
343
|
+
{
|
|
344
|
+
provide: BaseInputControls,
|
|
345
|
+
useExisting: forwardRef(() => CalendarComponent),
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
provide: CALENDAR_COMPONENT_TOKEN,
|
|
349
|
+
useExisting: CalendarComponent,
|
|
350
|
+
},
|
|
351
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-calendar w-100\">\n @if (label && !floatLabel) {\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [display]=\"formDisplay\"\n >\n <p-date-picker\n appendTo=\"body\"\n [style]=\"{'width':'100%'}\"\n [inputStyle]=\"{'width':'100%'}\"\n [formControl]=\"formControl\"\n [showClear]=\"clearable\"\n [dataType]=\"'string'\"\n [selectionMode]=\"selectionMode\"\n [icon]=\"icon\"\n [maxDate]=\"maxDate\"\n [id]=\"inputId\"\n [showButtonBar]=\"true\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequired()\"\n [minDate]=\"minDate\"\n [showIcon]=\"formControl && !formControl.value\"\n iconDisplay=\"input\"\n />\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n }\n @if (floatLabel) {\n <p-floatLabel>\n <p-date-picker\n appendTo=\"body\"\n [style]=\"{'width':'100%'}\"\n [inputStyle]=\"{'width':'100%'}\"\n [formControl]=\"formControl\"\n [showClear]=\"clearable\"\n [maxDate]=\"maxDate\"\n [id]=\"inputId\"\n [icon]=\"icon\"\n [selectionMode]=\"selectionMode\"\n [showButtonBar]=\"true\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequired()\"\n [minDate]=\"minDate\"\n iconDisplay=\"input\"\n />\n <label [for]=\"inputId\" [innerHTML]=\"floatLabel\"></label>\n </p-floatLabel>\n }\n</div>\n\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: DatePicker, selector: "p-datePicker, p-datepicker, p-date-picker", inputs: ["iconDisplay", "styleClass", "inputStyle", "inputId", "inputStyleClass", "placeholder", "ariaLabelledBy", "ariaLabel", "iconAriaLabel", "dateFormat", "multipleSeparator", "rangeSeparator", "inline", "showOtherMonths", "selectOtherMonths", "showIcon", "icon", "readonlyInput", "shortYearCutoff", "hourFormat", "timeOnly", "stepHour", "stepMinute", "stepSecond", "showSeconds", "showOnFocus", "showWeek", "startWeekFromFirstDayOfYear", "showClear", "dataType", "selectionMode", "maxDateCount", "showButtonBar", "todayButtonStyleClass", "clearButtonStyleClass", "autofocus", "autoZIndex", "baseZIndex", "panelStyleClass", "panelStyle", "keepInvalid", "hideOnDateTimeSelect", "touchUI", "timeSeparator", "focusTrap", "showTransitionOptions", "hideTransitionOptions", "tabindex", "minDate", "maxDate", "disabledDates", "disabledDays", "showTime", "responsiveOptions", "numberOfMonths", "firstDayOfWeek", "view", "defaultDate", "appendTo"], outputs: ["onFocus", "onBlur", "onClose", "onSelect", "onClear", "onInput", "onTodayClick", "onClearClick", "onMonthChange", "onYearChange", "onClickOutside", "onShow"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i2$2.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
352
|
+
}
|
|
353
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: CalendarComponent, decorators: [{
|
|
354
|
+
type: Component,
|
|
355
|
+
args: [{ selector: 'v-calendar', imports: [
|
|
356
|
+
ReactiveFormsModule,
|
|
357
|
+
DatePicker,
|
|
358
|
+
FormFieldComponent,
|
|
359
|
+
FloatLabelModule,
|
|
360
|
+
ErrorComponent
|
|
361
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
362
|
+
{
|
|
363
|
+
provide: BaseInputControls,
|
|
364
|
+
useExisting: forwardRef(() => CalendarComponent),
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
provide: CALENDAR_COMPONENT_TOKEN,
|
|
368
|
+
useExisting: CalendarComponent,
|
|
369
|
+
},
|
|
370
|
+
], template: "<div class=\"v-calendar w-100\">\n @if (label && !floatLabel) {\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [display]=\"formDisplay\"\n >\n <p-date-picker\n appendTo=\"body\"\n [style]=\"{'width':'100%'}\"\n [inputStyle]=\"{'width':'100%'}\"\n [formControl]=\"formControl\"\n [showClear]=\"clearable\"\n [dataType]=\"'string'\"\n [selectionMode]=\"selectionMode\"\n [icon]=\"icon\"\n [maxDate]=\"maxDate\"\n [id]=\"inputId\"\n [showButtonBar]=\"true\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequired()\"\n [minDate]=\"minDate\"\n [showIcon]=\"formControl && !formControl.value\"\n iconDisplay=\"input\"\n />\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n }\n @if (floatLabel) {\n <p-floatLabel>\n <p-date-picker\n appendTo=\"body\"\n [style]=\"{'width':'100%'}\"\n [inputStyle]=\"{'width':'100%'}\"\n [formControl]=\"formControl\"\n [showClear]=\"clearable\"\n [maxDate]=\"maxDate\"\n [id]=\"inputId\"\n [icon]=\"icon\"\n [selectionMode]=\"selectionMode\"\n [showButtonBar]=\"true\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequired()\"\n [minDate]=\"minDate\"\n iconDisplay=\"input\"\n />\n <label [for]=\"inputId\" [innerHTML]=\"floatLabel\"></label>\n </p-floatLabel>\n }\n</div>\n\n" }]
|
|
371
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
372
|
+
type: Optional
|
|
373
|
+
}, {
|
|
374
|
+
type: Self
|
|
375
|
+
}] }], propDecorators: { maxDate: [{
|
|
376
|
+
type: Input
|
|
377
|
+
}], icon: [{
|
|
378
|
+
type: Input
|
|
379
|
+
}], minDate: [{
|
|
380
|
+
type: Input
|
|
381
|
+
}], header: [{
|
|
382
|
+
type: Input
|
|
383
|
+
}], footer: [{
|
|
384
|
+
type: Input
|
|
385
|
+
}], floatLabel: [{
|
|
386
|
+
type: Input
|
|
387
|
+
}], selectionMode: [{
|
|
388
|
+
type: Input
|
|
389
|
+
}] } });
|
|
390
|
+
|
|
391
|
+
class PasswordComponent extends BaseFormInputComponent {
|
|
392
|
+
constructor(ngControl) {
|
|
393
|
+
super(ngControl);
|
|
394
|
+
this.toggleMask = true;
|
|
395
|
+
this.feedback = false;
|
|
396
|
+
this.formDisplay = "block";
|
|
397
|
+
}
|
|
398
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PasswordComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
399
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: PasswordComponent, isStandalone: true, selector: "v-password", inputs: { toggleMask: "toggleMask", feedback: "feedback" }, providers: [
|
|
400
|
+
{
|
|
401
|
+
provide: BaseInputControls,
|
|
402
|
+
useExisting: PasswordComponent,
|
|
403
|
+
},
|
|
404
|
+
{
|
|
405
|
+
provide: PASSWORD_COMPONENT_TOKEN,
|
|
406
|
+
useExisting: PasswordComponent,
|
|
407
|
+
},
|
|
408
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-password d-flex align-items-center\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-password\n [style]=\"{'width':'100%'}\"\n [inputStyle]=\"{'width':'100%'}\" \n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [showClear]=\"clearable\"\n [feedback]=\"feedback\"\n [required]=\"isRequired()\"\n [label]=\"label\"\n [id]=\"inputId\"\n [toggleMask]=\"toggleMask\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: PasswordModule }, { kind: "component", type: i2$3.Password, selector: "p-password", inputs: ["ariaLabel", "ariaLabelledBy", "label", "promptLabel", "mediumRegex", "strongRegex", "weakLabel", "mediumLabel", "maxLength", "strongLabel", "inputId", "feedback", "toggleMask", "inputStyleClass", "styleClass", "inputStyle", "showTransitionOptions", "hideTransitionOptions", "autocomplete", "placeholder", "showClear", "autofocus", "tabindex", "appendTo"], outputs: ["onFocus", "onBlur", "onClear"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
409
|
+
}
|
|
410
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PasswordComponent, decorators: [{
|
|
411
|
+
type: Component,
|
|
412
|
+
args: [{ selector: 'v-password', imports: [
|
|
413
|
+
ReactiveFormsModule,
|
|
414
|
+
PasswordModule,
|
|
415
|
+
FloatLabelModule,
|
|
416
|
+
FormFieldComponent,
|
|
417
|
+
ErrorComponent
|
|
418
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
419
|
+
{
|
|
420
|
+
provide: BaseInputControls,
|
|
421
|
+
useExisting: PasswordComponent,
|
|
422
|
+
},
|
|
423
|
+
{
|
|
424
|
+
provide: PASSWORD_COMPONENT_TOKEN,
|
|
425
|
+
useExisting: PasswordComponent,
|
|
426
|
+
},
|
|
427
|
+
], template: "<div class=\"v-password d-flex align-items-center\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-password\n [style]=\"{'width':'100%'}\"\n [inputStyle]=\"{'width':'100%'}\" \n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [showClear]=\"clearable\"\n [feedback]=\"feedback\"\n [required]=\"isRequired()\"\n [label]=\"label\"\n [id]=\"inputId\"\n [toggleMask]=\"toggleMask\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>\n" }]
|
|
428
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
429
|
+
type: Optional
|
|
430
|
+
}, {
|
|
431
|
+
type: Self
|
|
432
|
+
}] }], propDecorators: { toggleMask: [{
|
|
433
|
+
type: Input
|
|
434
|
+
}], feedback: [{
|
|
435
|
+
type: Input
|
|
436
|
+
}] } });
|
|
437
|
+
|
|
438
|
+
class ButtonSeverityPipe {
|
|
439
|
+
transform(severity) {
|
|
440
|
+
if (severity === undefined || severity === null) {
|
|
441
|
+
return null;
|
|
442
|
+
}
|
|
443
|
+
if (severity === ControlSeverity.warning) {
|
|
444
|
+
return 'warn';
|
|
445
|
+
}
|
|
446
|
+
return severity;
|
|
447
|
+
}
|
|
448
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonSeverityPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
449
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: ButtonSeverityPipe, isStandalone: true, name: "buttonSeverity" }); }
|
|
450
|
+
}
|
|
451
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonSeverityPipe, decorators: [{
|
|
452
|
+
type: Pipe,
|
|
453
|
+
args: [{
|
|
454
|
+
name: 'buttonSeverity'
|
|
455
|
+
}]
|
|
456
|
+
}] });
|
|
457
|
+
|
|
458
|
+
class ButtonComponent {
|
|
459
|
+
constructor() {
|
|
460
|
+
this.iconPos = IconPosition.right;
|
|
461
|
+
}
|
|
462
|
+
fireClick(event) {
|
|
463
|
+
if (this.disabled) {
|
|
464
|
+
event.stopPropagation();
|
|
465
|
+
event.stopImmediatePropagation();
|
|
466
|
+
}
|
|
467
|
+
}
|
|
468
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
469
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: ButtonComponent, isStandalone: true, selector: "v-button", inputs: { label: "label", icon: "icon", badge: "badge", iconPos: "iconPos", disabled: "disabled", rounded: "rounded", outlined: "outlined", raised: "raised", severity: "severity", routerLink: "routerLink", size: "size", queryParams: "queryParams" }, providers: [
|
|
470
|
+
{
|
|
471
|
+
provide: BUTTON_COMPONENT_TOKEN,
|
|
472
|
+
useExisting: ButtonComponent,
|
|
473
|
+
},
|
|
474
|
+
], ngImport: i0, template: "<div class=\"v-button d-inline-block\" \n(click)=\"fireClick($event)\">\n <a\n [routerLink]=\"routerLink ? routerLink : undefined\"\n [queryParams]=\"queryParams ? queryParams : undefined\"\n >\n <p-button\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [badge]=\"badge\"\n [outlined]=\"outlined\"\n [rounded]=\"rounded\"\n [raised]=\"raised\"\n [label]=\"label\"\n [size]=\"$any(size)\"\n [severity]=\"severity | buttonSeverity\"\n [iconPos]=\"iconPos\"\n />\n </a>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: RippleModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: ButtonSeverityPipe, name: "buttonSeverity" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
475
|
+
}
|
|
476
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ButtonComponent, decorators: [{
|
|
477
|
+
type: Component,
|
|
478
|
+
args: [{ selector: 'v-button', imports: [ButtonModule, RippleModule, RouterModule, ButtonSeverityPipe], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
479
|
+
{
|
|
480
|
+
provide: BUTTON_COMPONENT_TOKEN,
|
|
481
|
+
useExisting: ButtonComponent,
|
|
482
|
+
},
|
|
483
|
+
], template: "<div class=\"v-button d-inline-block\" \n(click)=\"fireClick($event)\">\n <a\n [routerLink]=\"routerLink ? routerLink : undefined\"\n [queryParams]=\"queryParams ? queryParams : undefined\"\n >\n <p-button\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [badge]=\"badge\"\n [outlined]=\"outlined\"\n [rounded]=\"rounded\"\n [raised]=\"raised\"\n [label]=\"label\"\n [size]=\"$any(size)\"\n [severity]=\"severity | buttonSeverity\"\n [iconPos]=\"iconPos\"\n />\n </a>\n</div>\n" }]
|
|
484
|
+
}], propDecorators: { label: [{
|
|
485
|
+
type: Input
|
|
486
|
+
}], icon: [{
|
|
487
|
+
type: Input
|
|
488
|
+
}], badge: [{
|
|
489
|
+
type: Input
|
|
490
|
+
}], iconPos: [{
|
|
491
|
+
type: Input
|
|
492
|
+
}], disabled: [{
|
|
493
|
+
type: Input
|
|
494
|
+
}], rounded: [{
|
|
495
|
+
type: Input
|
|
496
|
+
}], outlined: [{
|
|
497
|
+
type: Input
|
|
498
|
+
}], raised: [{
|
|
499
|
+
type: Input
|
|
500
|
+
}], severity: [{
|
|
501
|
+
type: Input
|
|
502
|
+
}], routerLink: [{
|
|
503
|
+
type: Input
|
|
504
|
+
}], size: [{
|
|
505
|
+
type: Input
|
|
506
|
+
}], queryParams: [{
|
|
507
|
+
type: Input
|
|
508
|
+
}] } });
|
|
509
|
+
|
|
510
|
+
class SectionComponent {
|
|
511
|
+
constructor() {
|
|
512
|
+
this.showContent = true;
|
|
513
|
+
this.icons = Icons;
|
|
514
|
+
this.icon = Icons.chevronDown;
|
|
515
|
+
}
|
|
516
|
+
toggle() {
|
|
517
|
+
this.showContent = !this.showContent;
|
|
518
|
+
this.icon = this.showContent ? Icons.chevronDown : Icons.chevronUp;
|
|
519
|
+
}
|
|
520
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SectionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
521
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: SectionComponent, isStandalone: true, selector: "v-section", inputs: { title: "title", showContent: "showContent", backgroundColor: "backgroundColor" }, providers: [
|
|
522
|
+
{ provide: SECTION_COMPONENT_TOKEN, useExisting: SectionComponent },
|
|
523
|
+
], ngImport: i0, template: "<div class=\"v-section\">\n <div\n class=\"v-section-header text-align-center d-flex\"\n [ngStyle]=\"{ 'background-color': backgroundColor }\"\n >\n <p\n class=\"text-primary align-items-center text-nowrap d-none d-md-block ps-3 m-0 w-100\"\n >\n {{ title }}\n </p>\n <div class=\"d-flex\">\n <ng-content select=\"[actions]\"></ng-content>\n <v-button\n size=\"small\"\n [icon]=\"icon\"\n (click)=\"toggle()\"\n />\n </div>\n </div>\n @if (showContent) {\n <div class=\"v-section-content\">\n <ng-content></ng-content>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "severity", "routerLink", "size", "queryParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
524
|
+
}
|
|
525
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SectionComponent, decorators: [{
|
|
526
|
+
type: Component,
|
|
527
|
+
args: [{ selector: 'v-section', imports: [CommonModule, ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
528
|
+
{ provide: SECTION_COMPONENT_TOKEN, useExisting: SectionComponent },
|
|
529
|
+
], template: "<div class=\"v-section\">\n <div\n class=\"v-section-header text-align-center d-flex\"\n [ngStyle]=\"{ 'background-color': backgroundColor }\"\n >\n <p\n class=\"text-primary align-items-center text-nowrap d-none d-md-block ps-3 m-0 w-100\"\n >\n {{ title }}\n </p>\n <div class=\"d-flex\">\n <ng-content select=\"[actions]\"></ng-content>\n <v-button\n size=\"small\"\n [icon]=\"icon\"\n (click)=\"toggle()\"\n />\n </div>\n </div>\n @if (showContent) {\n <div class=\"v-section-content\">\n <ng-content></ng-content>\n </div>\n }\n</div>\n" }]
|
|
530
|
+
}], propDecorators: { title: [{
|
|
531
|
+
type: Input
|
|
532
|
+
}], showContent: [{
|
|
533
|
+
type: Input
|
|
534
|
+
}], backgroundColor: [{
|
|
535
|
+
type: Input
|
|
536
|
+
}] } });
|
|
537
|
+
|
|
538
|
+
class DropdownButtonComponent {
|
|
539
|
+
constructor() {
|
|
540
|
+
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
541
|
+
this.icon = input(...(ngDevMode ? [undefined, { debugName: "icon" }] : []));
|
|
542
|
+
this.rounded = input(false, ...(ngDevMode ? [{ debugName: "rounded" }] : []));
|
|
543
|
+
this.raised = input(false, ...(ngDevMode ? [{ debugName: "raised" }] : []));
|
|
544
|
+
this.outlined = input(false, ...(ngDevMode ? [{ debugName: "outlined" }] : []));
|
|
545
|
+
this.severity = input(ControlSeverity.primary, ...(ngDevMode ? [{ debugName: "severity" }] : []));
|
|
546
|
+
this.size = input(...(ngDevMode ? [undefined, { debugName: "size" }] : []));
|
|
547
|
+
this.items = input(undefined, ...(ngDevMode ? [{ debugName: "items" }] : []));
|
|
548
|
+
}
|
|
549
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
550
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.1", type: DropdownButtonComponent, isStandalone: true, selector: "v-dropdown-button", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, icon: { classPropertyName: "icon", publicName: "icon", isSignal: true, isRequired: false, transformFunction: null }, rounded: { classPropertyName: "rounded", publicName: "rounded", isSignal: true, isRequired: false, transformFunction: null }, raised: { classPropertyName: "raised", publicName: "raised", isSignal: true, isRequired: false, transformFunction: null }, outlined: { classPropertyName: "outlined", publicName: "outlined", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, items: { classPropertyName: "items", publicName: "items", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
551
|
+
{ provide: DROPDOWN_BUTTON_COMPONENT_TOKEN, useExisting: DropdownButtonComponent }
|
|
552
|
+
], ngImport: i0, template: "<p>NOT implemented </p>" }); }
|
|
553
|
+
}
|
|
554
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownButtonComponent, decorators: [{
|
|
555
|
+
type: Component,
|
|
556
|
+
args: [{ selector: 'v-dropdown-button', providers: [
|
|
557
|
+
{ provide: DROPDOWN_BUTTON_COMPONENT_TOKEN, useExisting: DropdownButtonComponent }
|
|
558
|
+
], template: "<p>NOT implemented </p>" }]
|
|
559
|
+
}] });
|
|
560
|
+
|
|
561
|
+
class RadioButtonComponent extends BaseFormInputComponent {
|
|
562
|
+
constructor(ngControl) {
|
|
563
|
+
super(ngControl);
|
|
564
|
+
this.radioGroupName = Math.random().toString();
|
|
565
|
+
this.items = [];
|
|
566
|
+
}
|
|
567
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RadioButtonComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
568
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: RadioButtonComponent, isStandalone: true, selector: "v-radiobutton", inputs: { radioGroupName: "radioGroupName", items: "items" }, providers: [
|
|
569
|
+
{
|
|
570
|
+
provide: BaseInputControls,
|
|
571
|
+
useExisting: RadioButtonComponent,
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
provide: RADIOBUTTON_COMPONENT_TOKEN,
|
|
575
|
+
useExisting: RadioButtonComponent,
|
|
576
|
+
},
|
|
577
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-radiobutton\">\n <v-form-field\n [label]=\"label\"\n [required]=\"required\"\n [tooltip]=\"tooltip\"\n [testId]=\"testId\"\n >\n <div class=\"d-flex align-items-center gap-3\">\n @for (item of items; track item) {\n <div>\n <p-radioButton\n [inputId]=\"item.id\"\n [ngClass]=\"{\n 'radio-error': ngControl?.invalid && ngControl?.dirty,\n }\"\n [name]=\"radioGroupName\"\n [value]=\"item.value\"\n [formControl]=\"formControl\"\n />\n <label [for]=\"item.id\" class=\"ps-2\">\n <span\n [ngClass]=\"{\n 'text-error': ngControl?.invalid && ngControl?.dirty,\n 'text-primary': ngControl?.value === item.value\n }\"\n >{{ item.value }}</span\n >\n </label>\n </div>\n }\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </div>\n </v-form-field>\n </div>\n", styles: [".radio-error .p-radiobutton .p-radiobutton-box.p-highlight{border-color:var(--error-color);background:var(--error-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "ngmodule", type: RadioButtonModule }, { kind: "component", type: i3$3.RadioButton, selector: "p-radioButton, p-radiobutton, p-radio-button", inputs: ["value", "tabindex", "inputId", "ariaLabelledBy", "ariaLabel", "styleClass", "autofocus", "binary", "variant", "size"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
578
|
+
}
|
|
579
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: RadioButtonComponent, decorators: [{
|
|
580
|
+
type: Component,
|
|
581
|
+
args: [{ selector: 'v-radiobutton', imports: [
|
|
582
|
+
CommonModule,
|
|
583
|
+
FormFieldComponent,
|
|
584
|
+
RadioButtonModule,
|
|
585
|
+
ReactiveFormsModule,
|
|
586
|
+
ErrorComponent
|
|
587
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
588
|
+
{
|
|
589
|
+
provide: BaseInputControls,
|
|
590
|
+
useExisting: RadioButtonComponent,
|
|
591
|
+
},
|
|
592
|
+
{
|
|
593
|
+
provide: RADIOBUTTON_COMPONENT_TOKEN,
|
|
594
|
+
useExisting: RadioButtonComponent,
|
|
595
|
+
},
|
|
596
|
+
], template: "<div class=\"v-radiobutton\">\n <v-form-field\n [label]=\"label\"\n [required]=\"required\"\n [tooltip]=\"tooltip\"\n [testId]=\"testId\"\n >\n <div class=\"d-flex align-items-center gap-3\">\n @for (item of items; track item) {\n <div>\n <p-radioButton\n [inputId]=\"item.id\"\n [ngClass]=\"{\n 'radio-error': ngControl?.invalid && ngControl?.dirty,\n }\"\n [name]=\"radioGroupName\"\n [value]=\"item.value\"\n [formControl]=\"formControl\"\n />\n <label [for]=\"item.id\" class=\"ps-2\">\n <span\n [ngClass]=\"{\n 'text-error': ngControl?.invalid && ngControl?.dirty,\n 'text-primary': ngControl?.value === item.value\n }\"\n >{{ item.value }}</span\n >\n </label>\n </div>\n }\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </div>\n </v-form-field>\n </div>\n", styles: [".radio-error .p-radiobutton .p-radiobutton-box.p-highlight{border-color:var(--error-color);background:var(--error-color)}\n"] }]
|
|
597
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
598
|
+
type: Optional
|
|
599
|
+
}, {
|
|
600
|
+
type: Self
|
|
601
|
+
}] }], propDecorators: { radioGroupName: [{
|
|
602
|
+
type: Input
|
|
603
|
+
}], items: [{
|
|
604
|
+
type: Input
|
|
605
|
+
}] } });
|
|
606
|
+
|
|
607
|
+
class NumberInputComponent extends BaseFormInputComponent {
|
|
608
|
+
constructor(ngControl) {
|
|
609
|
+
super(ngControl);
|
|
610
|
+
this.step = 1;
|
|
611
|
+
this.errorMessage = 'test';
|
|
612
|
+
}
|
|
613
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NumberInputComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
614
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: NumberInputComponent, isStandalone: true, selector: "v-number-input", inputs: { mode: "mode", currency: "currency", min: "min", max: "max", step: "step", errorMessage: "errorMessage" }, providers: [
|
|
615
|
+
{
|
|
616
|
+
provide: BaseInputControls,
|
|
617
|
+
useExisting: forwardRef(() => NumberInputComponent),
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
provide: NUMBER_INPUT_COMPONENT_TOKEN,
|
|
621
|
+
useExisting: NumberInputComponent,
|
|
622
|
+
},
|
|
623
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-number-input\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n >\n <p-inputNumber\n class=\"w-100\"\n [formControl]=\"formControl\"\n [showButtons]=\"true\"\n [inputId]=\"inputId\"\n [mode]=\"mode\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [currency]=\"currency\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>\n", dependencies: [{ kind: "ngmodule", type: InputNumberModule }, { kind: "component", type: i2$5.InputNumber, selector: "p-inputNumber, p-inputnumber, p-input-number", inputs: ["showButtons", "format", "buttonLayout", "inputId", "styleClass", "placeholder", "tabindex", "title", "ariaLabelledBy", "ariaDescribedBy", "ariaLabel", "ariaRequired", "autocomplete", "incrementButtonClass", "decrementButtonClass", "incrementButtonIcon", "decrementButtonIcon", "readonly", "allowEmpty", "locale", "localeMatcher", "mode", "currency", "currencyDisplay", "useGrouping", "minFractionDigits", "maxFractionDigits", "prefix", "suffix", "inputStyle", "inputStyleClass", "showClear", "autofocus"], outputs: ["onInput", "onFocus", "onBlur", "onKeyDown", "onClear"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
624
|
+
}
|
|
625
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: NumberInputComponent, decorators: [{
|
|
626
|
+
type: Component,
|
|
627
|
+
args: [{ selector: 'v-number-input', imports: [
|
|
628
|
+
InputNumberModule,
|
|
629
|
+
ReactiveFormsModule,
|
|
630
|
+
FormFieldComponent,
|
|
631
|
+
ErrorComponent
|
|
632
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
633
|
+
{
|
|
634
|
+
provide: BaseInputControls,
|
|
635
|
+
useExisting: forwardRef(() => NumberInputComponent),
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
provide: NUMBER_INPUT_COMPONENT_TOKEN,
|
|
639
|
+
useExisting: NumberInputComponent,
|
|
640
|
+
},
|
|
641
|
+
], template: "<div class=\"v-number-input\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n >\n <p-inputNumber\n class=\"w-100\"\n [formControl]=\"formControl\"\n [showButtons]=\"true\"\n [inputId]=\"inputId\"\n [mode]=\"mode\"\n [min]=\"min\"\n [max]=\"max\"\n [step]=\"step\"\n [currency]=\"currency\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>\n" }]
|
|
642
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
643
|
+
type: Optional
|
|
644
|
+
}, {
|
|
645
|
+
type: Self
|
|
646
|
+
}] }], propDecorators: { mode: [{
|
|
647
|
+
type: Input
|
|
648
|
+
}], currency: [{
|
|
649
|
+
type: Input
|
|
650
|
+
}], min: [{
|
|
651
|
+
type: Input
|
|
652
|
+
}], max: [{
|
|
653
|
+
type: Input
|
|
654
|
+
}], step: [{
|
|
655
|
+
type: Input
|
|
656
|
+
}], errorMessage: [{
|
|
657
|
+
type: Input
|
|
658
|
+
}] } });
|
|
659
|
+
|
|
660
|
+
class HeaderProviderService {
|
|
661
|
+
constructor(settingsMenu) {
|
|
662
|
+
this.settingsMenu = settingsMenu;
|
|
663
|
+
this.menu = [];
|
|
664
|
+
}
|
|
665
|
+
init() {
|
|
666
|
+
this.menu = this.settingsMenu;
|
|
667
|
+
}
|
|
668
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HeaderProviderService, deps: [{ token: SETTINGS_MENU }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
669
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HeaderProviderService, providedIn: 'root' }); }
|
|
670
|
+
}
|
|
671
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HeaderProviderService, decorators: [{
|
|
672
|
+
type: Injectable,
|
|
673
|
+
args: [{
|
|
674
|
+
providedIn: 'root',
|
|
675
|
+
}]
|
|
676
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
677
|
+
type: Inject,
|
|
678
|
+
args: [SETTINGS_MENU]
|
|
679
|
+
}] }] });
|
|
680
|
+
|
|
681
|
+
class HeaderComponent extends UnsubscribeComponent {
|
|
682
|
+
constructor(providerService, screenSizeService, cdr) {
|
|
683
|
+
super();
|
|
684
|
+
this.providerService = providerService;
|
|
685
|
+
this.screenSizeService = screenSizeService;
|
|
686
|
+
this.cdr = cdr;
|
|
687
|
+
this.exampleHeader = false;
|
|
688
|
+
this.icons = Icons;
|
|
689
|
+
this.menuVisible = false;
|
|
690
|
+
}
|
|
691
|
+
ngOnInit() {
|
|
692
|
+
this.providerService.init();
|
|
693
|
+
}
|
|
694
|
+
toggleMenu() {
|
|
695
|
+
if (this.menuRef) {
|
|
696
|
+
this.menuVisible = !this.menuVisible;
|
|
697
|
+
this.menuRef.classList.toggle('menu-visible');
|
|
698
|
+
this.cdr.detectChanges();
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HeaderComponent, deps: [{ token: HeaderProviderService }, { token: i1$4.ScreenSizeService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
702
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: HeaderComponent, isStandalone: true, selector: "v-header", inputs: { title: "title", logoUrl: "logoUrl", userName: "userName", userRole: "userRole", menuRef: "menuRef", exampleHeader: "exampleHeader" }, providers: [
|
|
703
|
+
{ provide: HEADER_COMPONENT_TOKEN, useExisting: HeaderComponent },
|
|
704
|
+
], usesInheritance: true, ngImport: i0, template: "<div\n class=\"v-header d-flex w-100 text-align-end\"\n [ngStyle]=\"{ position: exampleHeader ? 'relative' : 'fixed' }\"\n >\n @if (screenSizeService.isMobileBlock | async) {\n <div class=\"burger-menu\">\n <v-button\n [icon]=\"menuVisible ? icons.cross : icons.action\"\n (click)=\"toggleMenu()\"\n />\n <div class=\"logo mt-3\" [routerLink]=\"[logoRouterLink]\">\n <img [src]=\"logoUrl\" alt=\"\"/>\n </div>\n </div>\n }\n <div class=\"v-header-title col-auto\">\n <p class=\"text-primary text-nowrap d-none d-md-block ps-3 m-0 w-100\">\n {{ title }}\n </p>\n <div class=\"col-8 col-md-auto ps-3 m-0 w-100\">\n <ng-content select=\"[module]\"></ng-content>\n </div>\n </div>\n @if ((screenSizeService.isMobileBlock | async) === false) {\n <div class=\"w-100 text-start justify-content-start align-content-center\">\n <ng-content select=\"[breadcrumbs]\"></ng-content>\n </div>\n <div class=\"col-auto d-flex align-items-center justify-content-end p-4\">\n <div class=\"d-flex aling-items-center\">\n <p-avatar\n image=\"assets/primeng/images/_global/jara.png\"\n styleClass=\"me-2\"\n size=\"large\"\n shape=\"circle\"\n />\n <div class=\"card align-content-center pe-3\">\n <p\n class=\"text-primary m-0 header-username\"\n [innerHTML]=\"userName\"\n ></p>\n <p\n class=\"text-default m-0 header-userrole\"\n [innerHTML]=\"userRole\"\n ></p>\n </div>\n </div>\n <div class=\"d-flex gap-4 align-items-center\">\n <ng-content select=\"[useractions]\"/>\n </div>\n </div>\n }\n @if (screenSizeService.isMobileBlock | async) {\n <div class=\"user-info-container d-flex align-items-center\">\n <div class=\"d-flex\">\n <div class=\"card pe-3 align-content-center\">\n <p-avatar\n image=\"assets/images/_global/jara.png\"\n styleClass=\"mr-2\"\n size=\"large\"\n shape=\"circle\"\n ></p-avatar>\n </div>\n <div class=\"card align-content-center pe-3 d-flex\">\n <div class=\"user-info\">\n <p\n class=\"text-default m-0 header-username\"\n [innerHTML]=\"userName\"\n ></p>\n <p\n class=\"text-default m-0 header-userrole\"\n [innerHTML]=\"userRole\"\n ></p>\n </div>\n <div class=\"user-actions\">\n <ng-content select=\"[useractions]\"></ng-content>\n </div>\n </div>\n </div>\n <div class=\"d-flex gap-4 align-items-center justify-content-center\">\n <ng-content select=\"[dbcontext]\" />\n </div>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgStyle, selector: "[ngStyle]", inputs: ["ngStyle"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: i4$1.Avatar, selector: "p-avatar", inputs: ["label", "icon", "image", "size", "shape", "styleClass", "ariaLabel", "ariaLabelledBy"], outputs: ["onImageError"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "severity", "routerLink", "size", "queryParams"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: i2.AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
705
|
+
}
|
|
706
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HeaderComponent, decorators: [{
|
|
707
|
+
type: Component,
|
|
708
|
+
args: [{ selector: 'v-header', imports: [CommonModule, AvatarModule, ButtonComponent, RouterModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
709
|
+
{ provide: HEADER_COMPONENT_TOKEN, useExisting: HeaderComponent },
|
|
710
|
+
], template: "<div\n class=\"v-header d-flex w-100 text-align-end\"\n [ngStyle]=\"{ position: exampleHeader ? 'relative' : 'fixed' }\"\n >\n @if (screenSizeService.isMobileBlock | async) {\n <div class=\"burger-menu\">\n <v-button\n [icon]=\"menuVisible ? icons.cross : icons.action\"\n (click)=\"toggleMenu()\"\n />\n <div class=\"logo mt-3\" [routerLink]=\"[logoRouterLink]\">\n <img [src]=\"logoUrl\" alt=\"\"/>\n </div>\n </div>\n }\n <div class=\"v-header-title col-auto\">\n <p class=\"text-primary text-nowrap d-none d-md-block ps-3 m-0 w-100\">\n {{ title }}\n </p>\n <div class=\"col-8 col-md-auto ps-3 m-0 w-100\">\n <ng-content select=\"[module]\"></ng-content>\n </div>\n </div>\n @if ((screenSizeService.isMobileBlock | async) === false) {\n <div class=\"w-100 text-start justify-content-start align-content-center\">\n <ng-content select=\"[breadcrumbs]\"></ng-content>\n </div>\n <div class=\"col-auto d-flex align-items-center justify-content-end p-4\">\n <div class=\"d-flex aling-items-center\">\n <p-avatar\n image=\"assets/primeng/images/_global/jara.png\"\n styleClass=\"me-2\"\n size=\"large\"\n shape=\"circle\"\n />\n <div class=\"card align-content-center pe-3\">\n <p\n class=\"text-primary m-0 header-username\"\n [innerHTML]=\"userName\"\n ></p>\n <p\n class=\"text-default m-0 header-userrole\"\n [innerHTML]=\"userRole\"\n ></p>\n </div>\n </div>\n <div class=\"d-flex gap-4 align-items-center\">\n <ng-content select=\"[useractions]\"/>\n </div>\n </div>\n }\n @if (screenSizeService.isMobileBlock | async) {\n <div class=\"user-info-container d-flex align-items-center\">\n <div class=\"d-flex\">\n <div class=\"card pe-3 align-content-center\">\n <p-avatar\n image=\"assets/images/_global/jara.png\"\n styleClass=\"mr-2\"\n size=\"large\"\n shape=\"circle\"\n ></p-avatar>\n </div>\n <div class=\"card align-content-center pe-3 d-flex\">\n <div class=\"user-info\">\n <p\n class=\"text-default m-0 header-username\"\n [innerHTML]=\"userName\"\n ></p>\n <p\n class=\"text-default m-0 header-userrole\"\n [innerHTML]=\"userRole\"\n ></p>\n </div>\n <div class=\"user-actions\">\n <ng-content select=\"[useractions]\"></ng-content>\n </div>\n </div>\n </div>\n <div class=\"d-flex gap-4 align-items-center justify-content-center\">\n <ng-content select=\"[dbcontext]\" />\n </div>\n </div>\n }\n</div>\n" }]
|
|
711
|
+
}], ctorParameters: () => [{ type: HeaderProviderService }, { type: i1$4.ScreenSizeService }, { type: i0.ChangeDetectorRef }], propDecorators: { title: [{
|
|
712
|
+
type: Input
|
|
713
|
+
}], logoUrl: [{
|
|
714
|
+
type: Input
|
|
715
|
+
}], userName: [{
|
|
716
|
+
type: Input
|
|
717
|
+
}], userRole: [{
|
|
718
|
+
type: Input
|
|
719
|
+
}], menuRef: [{
|
|
720
|
+
type: Input
|
|
721
|
+
}], exampleHeader: [{
|
|
722
|
+
type: Input
|
|
723
|
+
}] } });
|
|
724
|
+
|
|
725
|
+
class TextareaComponent extends BaseFormInputComponent {
|
|
726
|
+
constructor(ngControl) {
|
|
727
|
+
super(ngControl);
|
|
728
|
+
this.rows = 5;
|
|
729
|
+
this.cols = 30;
|
|
730
|
+
this.autoResize = false;
|
|
731
|
+
}
|
|
732
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TextareaComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
733
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TextareaComponent, isStandalone: true, selector: "v-textarea", inputs: { rows: "rows", cols: "cols", autoResize: "autoResize", floatLabel: "floatLabel" }, providers: [
|
|
734
|
+
{
|
|
735
|
+
provide: BaseInputControls,
|
|
736
|
+
useExisting: TextareaComponent,
|
|
737
|
+
},
|
|
738
|
+
{
|
|
739
|
+
provide: TEXTAREA_COMPONENT_TOKEN,
|
|
740
|
+
useExisting: TextareaComponent,
|
|
741
|
+
},
|
|
742
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-textarea\">\n @if (!floatLabel) {\n <v-form-field\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [display]=\"formDisplay\"\n >\n <textarea\n class=\"flex-grow-1\"\n pTextarea\n [rows]=\"rows\"\n [cols]=\"cols\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequired()\"\n [readOnly]=\"readonly\"\n [autoResize]=\"autoResize\"\n ></textarea>\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n }\n @if (floatLabel) {\n <p-floatLabel>\n <textarea\n class=\"flex-grow-1\"\n pTextarea\n [rows]=\"rows\"\n [cols]=\"cols\"\n [id]=\"inputId\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequired()\"\n [readOnly]=\"readonly\"\n [autoResize]=\"autoResize\"\n ></textarea>\n <label [for]=\"inputId\">{{ floatLabel }}</label>\n </p-floatLabel>\n }\n</div>\n", styles: [".v-textarea textarea{line-height:1.75rem!important}\n"], dependencies: [{ kind: "directive", type: Textarea, selector: "[pTextarea], [pInputTextarea]", inputs: ["autoResize", "pSize", "variant", "fluid", "invalid"], outputs: ["onResize"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.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: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i2$2.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
743
|
+
}
|
|
744
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TextareaComponent, decorators: [{
|
|
745
|
+
type: Component,
|
|
746
|
+
args: [{ selector: 'v-textarea', imports: [
|
|
747
|
+
Textarea,
|
|
748
|
+
ReactiveFormsModule,
|
|
749
|
+
FormFieldComponent,
|
|
750
|
+
FloatLabelModule,
|
|
751
|
+
ErrorComponent
|
|
752
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
753
|
+
{
|
|
754
|
+
provide: BaseInputControls,
|
|
755
|
+
useExisting: TextareaComponent,
|
|
756
|
+
},
|
|
757
|
+
{
|
|
758
|
+
provide: TEXTAREA_COMPONENT_TOKEN,
|
|
759
|
+
useExisting: TextareaComponent,
|
|
760
|
+
},
|
|
761
|
+
], template: "<div class=\"v-textarea\">\n @if (!floatLabel) {\n <v-form-field\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [display]=\"formDisplay\"\n >\n <textarea\n class=\"flex-grow-1\"\n pTextarea\n [rows]=\"rows\"\n [cols]=\"cols\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequired()\"\n [readOnly]=\"readonly\"\n [autoResize]=\"autoResize\"\n ></textarea>\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n }\n @if (floatLabel) {\n <p-floatLabel>\n <textarea\n class=\"flex-grow-1\"\n pTextarea\n [rows]=\"rows\"\n [cols]=\"cols\"\n [id]=\"inputId\"\n [formControl]=\"formControl\"\n [placeholder]=\"placeholder\"\n [required]=\"isRequired()\"\n [readOnly]=\"readonly\"\n [autoResize]=\"autoResize\"\n ></textarea>\n <label [for]=\"inputId\">{{ floatLabel }}</label>\n </p-floatLabel>\n }\n</div>\n", styles: [".v-textarea textarea{line-height:1.75rem!important}\n"] }]
|
|
762
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
763
|
+
type: Optional
|
|
764
|
+
}, {
|
|
765
|
+
type: Self
|
|
766
|
+
}] }], propDecorators: { rows: [{
|
|
767
|
+
type: Input
|
|
768
|
+
}], cols: [{
|
|
769
|
+
type: Input
|
|
770
|
+
}], autoResize: [{
|
|
771
|
+
type: Input
|
|
772
|
+
}], floatLabel: [{
|
|
773
|
+
type: Input
|
|
774
|
+
}] } });
|
|
775
|
+
|
|
776
|
+
class LoaderComponent {
|
|
777
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: LoaderComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
778
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: LoaderComponent, isStandalone: true, selector: "v-loader", providers: [
|
|
779
|
+
{ provide: LOADER_COMPONENT_TOKEN, useExisting: LoaderComponent },
|
|
780
|
+
], ngImport: i0, template: "<div class=\"v-loader d-flex justify-content-center\">\n <div>\n <p-progressSpinner class=\"p-progress-spinner-circle\"></p-progressSpinner>\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ProgressSpinnerModule }, { kind: "component", type: i1$5.ProgressSpinner, selector: "p-progressSpinner, p-progress-spinner, p-progressspinner", inputs: ["styleClass", "strokeWidth", "fill", "animationDuration", "ariaLabel"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
781
|
+
}
|
|
782
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: LoaderComponent, decorators: [{
|
|
783
|
+
type: Component,
|
|
784
|
+
args: [{ selector: 'v-loader', imports: [ProgressSpinnerModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
785
|
+
{ provide: LOADER_COMPONENT_TOKEN, useExisting: LoaderComponent },
|
|
786
|
+
], template: "<div class=\"v-loader d-flex justify-content-center\">\n <div>\n <p-progressSpinner class=\"p-progress-spinner-circle\"></p-progressSpinner>\n </div>\n</div>\n" }]
|
|
787
|
+
}] });
|
|
788
|
+
|
|
789
|
+
class SnackbarService {
|
|
790
|
+
constructor(messageService) {
|
|
791
|
+
this.messageService = messageService;
|
|
792
|
+
}
|
|
793
|
+
showSuccess(message, icon) {
|
|
794
|
+
this.messageService.add({
|
|
795
|
+
severity: 'success',
|
|
796
|
+
summary: 'Success',
|
|
797
|
+
detail: message,
|
|
798
|
+
icon: icon,
|
|
799
|
+
});
|
|
800
|
+
}
|
|
801
|
+
showInfo(message, icon) {
|
|
802
|
+
this.messageService.add({
|
|
803
|
+
severity: 'info',
|
|
804
|
+
summary: 'Info',
|
|
805
|
+
detail: message,
|
|
806
|
+
icon: icon,
|
|
807
|
+
});
|
|
808
|
+
}
|
|
809
|
+
showWarn(message, icon) {
|
|
810
|
+
this.messageService.add({
|
|
811
|
+
severity: 'warn',
|
|
812
|
+
summary: 'Warn',
|
|
813
|
+
detail: message,
|
|
814
|
+
icon: icon,
|
|
815
|
+
});
|
|
816
|
+
}
|
|
817
|
+
showError(message, icon) {
|
|
818
|
+
this.messageService.add({
|
|
819
|
+
severity: 'error',
|
|
820
|
+
summary: 'Error',
|
|
821
|
+
detail: message,
|
|
822
|
+
icon: icon,
|
|
823
|
+
});
|
|
824
|
+
}
|
|
825
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarService, deps: [{ token: i1$6.MessageService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
826
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarService, providedIn: 'root' }); }
|
|
827
|
+
}
|
|
828
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarService, decorators: [{
|
|
829
|
+
type: Injectable,
|
|
830
|
+
args: [{
|
|
831
|
+
providedIn: 'root',
|
|
832
|
+
}]
|
|
833
|
+
}], ctorParameters: () => [{ type: i1$6.MessageService }] });
|
|
834
|
+
|
|
835
|
+
class SnackbarComponent {
|
|
836
|
+
constructor(snackbarService) {
|
|
837
|
+
this.snackbarService = snackbarService;
|
|
838
|
+
}
|
|
839
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarComponent, deps: [{ token: SnackbarService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
840
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: SnackbarComponent, isStandalone: true, selector: "v-snackbar", providers: [
|
|
841
|
+
SnackbarService,
|
|
842
|
+
{
|
|
843
|
+
provide: SNACKBAR_COMPONENT_TOKEN,
|
|
844
|
+
useExisting: SnackbarComponent,
|
|
845
|
+
},
|
|
846
|
+
], ngImport: i0, template: "<div class=\"v-snackbar\">\n <p-toast />\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ToastModule }, { kind: "component", type: i2$6.Toast, selector: "p-toast", inputs: ["key", "autoZIndex", "baseZIndex", "life", "styleClass", "position", "preventOpenDuplicates", "preventDuplicates", "showTransformOptions", "hideTransformOptions", "showTransitionOptions", "hideTransitionOptions", "breakpoints"], outputs: ["onClose"] }, { kind: "ngmodule", type: RippleModule }] }); }
|
|
847
|
+
}
|
|
848
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SnackbarComponent, decorators: [{
|
|
849
|
+
type: Component,
|
|
850
|
+
args: [{ selector: 'v-snackbar', imports: [ToastModule, RippleModule], providers: [
|
|
851
|
+
SnackbarService,
|
|
852
|
+
{
|
|
853
|
+
provide: SNACKBAR_COMPONENT_TOKEN,
|
|
854
|
+
useExisting: SnackbarComponent,
|
|
855
|
+
},
|
|
856
|
+
], template: "<div class=\"v-snackbar\">\n <p-toast />\n</div>\n" }]
|
|
857
|
+
}], ctorParameters: () => [{ type: SnackbarService }] });
|
|
858
|
+
|
|
859
|
+
class SideMenuComponent extends UnsubscribeComponent {
|
|
860
|
+
constructor() {
|
|
861
|
+
super(...arguments);
|
|
862
|
+
this.items = [];
|
|
863
|
+
this.logoUrl = '';
|
|
864
|
+
this.minimalized = new EventEmitter();
|
|
865
|
+
this.itemSelected = new EventEmitter();
|
|
866
|
+
this.menuService = inject(SideMenuService);
|
|
867
|
+
this.router = inject(Router);
|
|
868
|
+
this.icons = Icons;
|
|
869
|
+
this.screenSizeService = inject(ScreenSizeService);
|
|
870
|
+
this.isMinimalized = false;
|
|
871
|
+
}
|
|
872
|
+
ngAfterContentInit() {
|
|
873
|
+
if (this.menuService.menuMinimalized) {
|
|
874
|
+
this.setMenuMinimalized(this.menu);
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
menuMinimalize(menu) {
|
|
878
|
+
const audit = document.getElementsByClassName('detail-audit');
|
|
879
|
+
if (audit.length > 0) {
|
|
880
|
+
audit.item(0)?.classList.toggle('menu-close__audit');
|
|
881
|
+
}
|
|
882
|
+
if (menu) {
|
|
883
|
+
menu.classList.toggle('menu-closed');
|
|
884
|
+
this.isMinimalized = menu.classList.contains('menu-closed');
|
|
885
|
+
this.menuService.saveMinimalizedState(this.isMinimalized);
|
|
886
|
+
this.minimalized.emit(this.isMinimalized);
|
|
887
|
+
}
|
|
888
|
+
}
|
|
889
|
+
onSelectionChange(event) {
|
|
890
|
+
const item = event.node;
|
|
891
|
+
if (item.label) {
|
|
892
|
+
this.menuService.saveExpandedState(item);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
onNodeSelect(event) {
|
|
896
|
+
const item = event.node;
|
|
897
|
+
if (item.url) {
|
|
898
|
+
this.router.navigateByUrl(item.url);
|
|
899
|
+
}
|
|
900
|
+
}
|
|
901
|
+
setMenuMinimalized(menu) {
|
|
902
|
+
if (menu) {
|
|
903
|
+
menu.nativeElement.classList.add("menu-closed");
|
|
904
|
+
this.minimalized.emit(true);
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
908
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: SideMenuComponent, isStandalone: true, selector: "v-side-menu", inputs: { items: "items", logoUrl: "logoUrl", userName: "userName", userRole: "userRole" }, outputs: { minimalized: "minimalized", itemSelected: "itemSelected" }, viewQueries: [{ propertyName: "menu", first: true, predicate: ["sidemenu"], descendants: true, static: true }], usesInheritance: true, ngImport: i0, template: "<div class=\"v-side-menu\" #sidemenu>\n <div\n [ngClass]=\"\n (screenSizeService.isMobileBlock | async)\n ? 'v-side-menu-container__mobile'\n : 'v-side-menu-container'\n \"\n >\n @if ((screenSizeService.isMobileBlock | async) === false) {\n <div class=\"v-side-menu-header pb-3 text-center\">\n <div class=\"logo\" [routerLink]=\"[logoRouterLink]\">\n <img [src]=\"logoUrl\" alt=\"\" />\n </div>\n <hr />\n </div>\n }\n <div\n [ngClass]=\"{\n 'v-side-menu-body__mobile': screenSizeService.isMobileBlock | async,\n 'v-side-menu-body': (screenSizeService.isMobileBlock | async) === false\n }\"\n class=\"text-center\"\n >\n <p-tree\n selectionMode=\"single\"\n [value]=\"items\"\n (onNodeExpand)=\"onSelectionChange($event)\"\n (onNodeCollapse)=\"onSelectionChange($event)\"\n (onNodeSelect)=\"onNodeSelect($event)\"\n >\n </p-tree>\n </div>\n <div\n class=\"text-center py-3 d-flex justify-content-end flex-column support\"\n >\n <hr class=\"mx-4 divider\" />\n <v-button\n class=\"support-button\"\n [label]=\"isMinimalized ? undefined : 'Support'\"\n severity=\"primary\"\n [icon]=\"icons.questionCircle\"\n ></v-button>\n </div>\n </div>\n @if ((screenSizeService.isMobileBlock | async) === false) {\n <div\n class=\"close-button\"\n (click)=\"menuMinimalize(sidemenu)\"\n >\n <i class=\"pi pi-chevron-left text-white close-icon\"></i>\n </div>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TreeModule }, { kind: "component", type: i1$7.Tree, selector: "p-tree", inputs: ["value", "selectionMode", "loadingMode", "selection", "styleClass", "contextMenu", "draggableScope", "droppableScope", "draggableNodes", "droppableNodes", "metaKeySelection", "propagateSelectionUp", "propagateSelectionDown", "loading", "loadingIcon", "emptyMessage", "ariaLabel", "togglerAriaLabel", "ariaLabelledBy", "validateDrop", "filter", "filterInputAutoFocus", "filterBy", "filterMode", "filterOptions", "filterPlaceholder", "filteredNodes", "filterLocale", "scrollHeight", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "indentation", "_templateMap", "trackBy", "highlightOnSelect"], outputs: ["selectionChange", "onNodeSelect", "onNodeUnselect", "onNodeExpand", "onNodeCollapse", "onNodeContextMenuSelect", "onNodeDoubleClick", "onNodeDrop", "onLazyLoad", "onScroll", "onScrollIndexChange", "onFilter"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "severity", "routerLink", "size", "queryParams"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "ngmodule", type: AvatarModule }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
909
|
+
}
|
|
910
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuComponent, decorators: [{
|
|
911
|
+
type: Component,
|
|
912
|
+
args: [{ selector: 'v-side-menu', imports: [
|
|
913
|
+
NgClass,
|
|
914
|
+
AsyncPipe,
|
|
915
|
+
TreeModule,
|
|
916
|
+
ButtonComponent,
|
|
917
|
+
TranslateModule,
|
|
918
|
+
AvatarModule,
|
|
919
|
+
RouterModule
|
|
920
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"v-side-menu\" #sidemenu>\n <div\n [ngClass]=\"\n (screenSizeService.isMobileBlock | async)\n ? 'v-side-menu-container__mobile'\n : 'v-side-menu-container'\n \"\n >\n @if ((screenSizeService.isMobileBlock | async) === false) {\n <div class=\"v-side-menu-header pb-3 text-center\">\n <div class=\"logo\" [routerLink]=\"[logoRouterLink]\">\n <img [src]=\"logoUrl\" alt=\"\" />\n </div>\n <hr />\n </div>\n }\n <div\n [ngClass]=\"{\n 'v-side-menu-body__mobile': screenSizeService.isMobileBlock | async,\n 'v-side-menu-body': (screenSizeService.isMobileBlock | async) === false\n }\"\n class=\"text-center\"\n >\n <p-tree\n selectionMode=\"single\"\n [value]=\"items\"\n (onNodeExpand)=\"onSelectionChange($event)\"\n (onNodeCollapse)=\"onSelectionChange($event)\"\n (onNodeSelect)=\"onNodeSelect($event)\"\n >\n </p-tree>\n </div>\n <div\n class=\"text-center py-3 d-flex justify-content-end flex-column support\"\n >\n <hr class=\"mx-4 divider\" />\n <v-button\n class=\"support-button\"\n [label]=\"isMinimalized ? undefined : 'Support'\"\n severity=\"primary\"\n [icon]=\"icons.questionCircle\"\n ></v-button>\n </div>\n </div>\n @if ((screenSizeService.isMobileBlock | async) === false) {\n <div\n class=\"close-button\"\n (click)=\"menuMinimalize(sidemenu)\"\n >\n <i class=\"pi pi-chevron-left text-white close-icon\"></i>\n </div>\n }\n</div>\n" }]
|
|
921
|
+
}], propDecorators: { items: [{
|
|
922
|
+
type: Input
|
|
923
|
+
}], logoUrl: [{
|
|
924
|
+
type: Input
|
|
925
|
+
}], userName: [{
|
|
926
|
+
type: Input
|
|
927
|
+
}], userRole: [{
|
|
928
|
+
type: Input
|
|
929
|
+
}], minimalized: [{
|
|
930
|
+
type: Output
|
|
931
|
+
}], itemSelected: [{
|
|
932
|
+
type: Output
|
|
933
|
+
}], menu: [{
|
|
934
|
+
type: ViewChild,
|
|
935
|
+
args: ['sidemenu', { static: true }]
|
|
936
|
+
}] } });
|
|
937
|
+
|
|
938
|
+
class SideMenuModule extends UnsubscribeComponent {
|
|
939
|
+
constructor(service) {
|
|
940
|
+
super();
|
|
941
|
+
this.service = service;
|
|
942
|
+
}
|
|
943
|
+
static forRoot(config) {
|
|
944
|
+
const moduleWithProvider = {
|
|
945
|
+
ngModule: SideMenuModule,
|
|
946
|
+
};
|
|
947
|
+
if (config?.items) {
|
|
948
|
+
moduleWithProvider.providers = [
|
|
949
|
+
{
|
|
950
|
+
provide: MENU_TOKEN,
|
|
951
|
+
useValue: config.items,
|
|
952
|
+
},
|
|
953
|
+
];
|
|
954
|
+
}
|
|
955
|
+
return moduleWithProvider;
|
|
956
|
+
}
|
|
957
|
+
static forChild(menu) {
|
|
958
|
+
return {
|
|
959
|
+
ngModule: SideMenuModule,
|
|
960
|
+
providers: [
|
|
961
|
+
{
|
|
962
|
+
provide: MENU_TOKEN,
|
|
963
|
+
useValue: menu,
|
|
964
|
+
},
|
|
965
|
+
],
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuModule, deps: [{ token: i1$4.SideMenuProviderService }], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
969
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: SideMenuModule, imports: [SideMenuComponent], exports: [SideMenuComponent] }); }
|
|
970
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuModule, providers: [
|
|
971
|
+
SideMenuProviderService,
|
|
972
|
+
{
|
|
973
|
+
provide: SIDE_MENU_COMPONENT_TOKEN,
|
|
974
|
+
useExisting: SideMenuComponent,
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
provide: SIDE_MENU_STATE_TOKEN,
|
|
978
|
+
useValue: localStorage.getItem('SideMenuStateToken') ?? {
|
|
979
|
+
expanded: [],
|
|
980
|
+
minimalized: false,
|
|
981
|
+
},
|
|
982
|
+
},
|
|
983
|
+
], imports: [SideMenuComponent] }); }
|
|
984
|
+
}
|
|
985
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SideMenuModule, decorators: [{
|
|
986
|
+
type: NgModule,
|
|
987
|
+
args: [{
|
|
988
|
+
imports: [SideMenuComponent],
|
|
989
|
+
exports: [SideMenuComponent],
|
|
990
|
+
providers: [
|
|
991
|
+
SideMenuProviderService,
|
|
992
|
+
{
|
|
993
|
+
provide: SIDE_MENU_COMPONENT_TOKEN,
|
|
994
|
+
useExisting: SideMenuComponent,
|
|
995
|
+
},
|
|
996
|
+
{
|
|
997
|
+
provide: SIDE_MENU_STATE_TOKEN,
|
|
998
|
+
useValue: localStorage.getItem('SideMenuStateToken') ?? {
|
|
999
|
+
expanded: [],
|
|
1000
|
+
minimalized: false,
|
|
1001
|
+
},
|
|
1002
|
+
},
|
|
1003
|
+
],
|
|
1004
|
+
}]
|
|
1005
|
+
}], ctorParameters: () => [{ type: i1$4.SideMenuProviderService }] });
|
|
1006
|
+
|
|
1007
|
+
class TableFilterPipe {
|
|
1008
|
+
transform(value) {
|
|
1009
|
+
if (value == undefined) {
|
|
1010
|
+
return undefined;
|
|
1011
|
+
}
|
|
1012
|
+
return Object.entries(value)
|
|
1013
|
+
.filter((x) => x[0] != undefined)
|
|
1014
|
+
.reduce((currentFilter, [key, value]) => {
|
|
1015
|
+
const filterValue = this.convertToFilterMetadata(value);
|
|
1016
|
+
if (filterValue) {
|
|
1017
|
+
if (key === 'searchField') {
|
|
1018
|
+
key = 'global';
|
|
1019
|
+
}
|
|
1020
|
+
currentFilter[key] = filterValue;
|
|
1021
|
+
}
|
|
1022
|
+
return currentFilter;
|
|
1023
|
+
}, {});
|
|
1024
|
+
}
|
|
1025
|
+
convertToFilterMetadata(value) {
|
|
1026
|
+
if (value == undefined) {
|
|
1027
|
+
return undefined;
|
|
1028
|
+
}
|
|
1029
|
+
if (typeof value == 'string') {
|
|
1030
|
+
return {
|
|
1031
|
+
matchMode: 'contains',
|
|
1032
|
+
value: value,
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
if (Array.isArray(value)) {
|
|
1036
|
+
return value.map((x) => this.convertToFilterMetadata(x));
|
|
1037
|
+
}
|
|
1038
|
+
return {
|
|
1039
|
+
matchMode: 'equals',
|
|
1040
|
+
value: value,
|
|
1041
|
+
};
|
|
1042
|
+
}
|
|
1043
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
1044
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: TableFilterPipe, isStandalone: true, name: "primengFilter" }); }
|
|
1045
|
+
}
|
|
1046
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableFilterPipe, decorators: [{
|
|
1047
|
+
type: Pipe,
|
|
1048
|
+
args: [{
|
|
1049
|
+
name: 'primengFilter',
|
|
1050
|
+
standalone: true,
|
|
1051
|
+
}]
|
|
1052
|
+
}] });
|
|
1053
|
+
|
|
1054
|
+
function convertToFilter(value) {
|
|
1055
|
+
if (value == undefined) {
|
|
1056
|
+
return undefined;
|
|
1057
|
+
}
|
|
1058
|
+
const filter = {};
|
|
1059
|
+
Object.keys(value).map((key) => {
|
|
1060
|
+
const filterValue = value[key];
|
|
1061
|
+
if (filterValue != undefined && typeof filterValue === 'object') {
|
|
1062
|
+
filter[key] = filterValue.value;
|
|
1063
|
+
}
|
|
1064
|
+
else {
|
|
1065
|
+
filter[key] = filterValue;
|
|
1066
|
+
}
|
|
1067
|
+
});
|
|
1068
|
+
return filter;
|
|
1069
|
+
}
|
|
1070
|
+
|
|
1071
|
+
class TableComponent {
|
|
1072
|
+
constructor() {
|
|
1073
|
+
this.total = 0;
|
|
1074
|
+
this.scrollable = true;
|
|
1075
|
+
this.pageSize = DEFAULT_SEARCH_LIMIT;
|
|
1076
|
+
this.showPaginator = true;
|
|
1077
|
+
this.sortMultiple = false;
|
|
1078
|
+
this.lazy = false;
|
|
1079
|
+
this.showPageSizePicker = true;
|
|
1080
|
+
this.maximumColumnLength = 0;
|
|
1081
|
+
this.disableCustomClicks = false;
|
|
1082
|
+
this.selection = [];
|
|
1083
|
+
this.pageSizeChange = new EventEmitter();
|
|
1084
|
+
this.selectionChange = new EventEmitter();
|
|
1085
|
+
this.pageChange = new EventEmitter();
|
|
1086
|
+
this.sortChange = new EventEmitter();
|
|
1087
|
+
this.lazyLoad = new EventEmitter();
|
|
1088
|
+
this.cdRef = inject(ChangeDetectorRef);
|
|
1089
|
+
this.tableColumns = [];
|
|
1090
|
+
this.tableRows = [];
|
|
1091
|
+
this.expandedRows = {};
|
|
1092
|
+
this.router = inject(Router);
|
|
1093
|
+
this.route = inject(ActivatedRoute);
|
|
1094
|
+
this.icons = Icons;
|
|
1095
|
+
}
|
|
1096
|
+
set columns(value) {
|
|
1097
|
+
this._columns = value;
|
|
1098
|
+
this.tableColumns = (value ?? []).map((x) => new ColumnModel(x));
|
|
1099
|
+
}
|
|
1100
|
+
get columns() {
|
|
1101
|
+
return this._columns;
|
|
1102
|
+
}
|
|
1103
|
+
ngOnChanges(changes) {
|
|
1104
|
+
if (changes['data']) {
|
|
1105
|
+
this.updateRowModels();
|
|
1106
|
+
}
|
|
1107
|
+
if (changes['selection'] || changes['data']) {
|
|
1108
|
+
this.tableSelection = this.selection
|
|
1109
|
+
? this.tableRows.filter((x) => this.selection.includes(x.row))
|
|
1110
|
+
: undefined;
|
|
1111
|
+
}
|
|
1112
|
+
if (changes['filter'] && !changes['filter'].isFirstChange()) {
|
|
1113
|
+
this.globalFilterFields = this.columns.filter(x => x.id).map(x => 'row.' + x.id);
|
|
1114
|
+
setTimeout(() => {
|
|
1115
|
+
this.table?._filter();
|
|
1116
|
+
}, 0);
|
|
1117
|
+
}
|
|
1118
|
+
}
|
|
1119
|
+
ngAfterViewInit() {
|
|
1120
|
+
if (this.viewColumns?.length) {
|
|
1121
|
+
const templateColumnModel = this.viewColumns
|
|
1122
|
+
.toArray()
|
|
1123
|
+
.map((provider) => new ColumnModel(provider.getDefinition()));
|
|
1124
|
+
this.tableColumns = [...this.tableColumns, ...templateColumnModel];
|
|
1125
|
+
}
|
|
1126
|
+
this.expansionTemplate = {
|
|
1127
|
+
template: this.rowDetailTemplate,
|
|
1128
|
+
};
|
|
1129
|
+
this.cdRef.detectChanges();
|
|
1130
|
+
}
|
|
1131
|
+
updateRowModels() {
|
|
1132
|
+
this.tableRows = (this.data ?? []).map((x) => new RowModel(x, false, false));
|
|
1133
|
+
}
|
|
1134
|
+
pageChanged(page) {
|
|
1135
|
+
this.pageChange.emit(page);
|
|
1136
|
+
}
|
|
1137
|
+
pageSizeChanged(pageSize) {
|
|
1138
|
+
this.pageSizeChange.emit(pageSize);
|
|
1139
|
+
this.pageSize = pageSize;
|
|
1140
|
+
}
|
|
1141
|
+
sortChanged(event) {
|
|
1142
|
+
let eventEmiterArg;
|
|
1143
|
+
if (event.field) {
|
|
1144
|
+
const singleEvent = event;
|
|
1145
|
+
eventEmiterArg = this.getSorts([singleEvent]);
|
|
1146
|
+
this.sortMeta = undefined;
|
|
1147
|
+
this.sortSignleColumn = singleEvent;
|
|
1148
|
+
}
|
|
1149
|
+
else {
|
|
1150
|
+
const multiEvent = event;
|
|
1151
|
+
eventEmiterArg = this.getSorts(multiEvent.multisortmeta);
|
|
1152
|
+
this.sortMeta = multiEvent.multisortmeta;
|
|
1153
|
+
this.sortSignleColumn = undefined;
|
|
1154
|
+
}
|
|
1155
|
+
this.sortChange.emit(eventEmiterArg);
|
|
1156
|
+
}
|
|
1157
|
+
selectionChanged(event) {
|
|
1158
|
+
this.tableSelection = event;
|
|
1159
|
+
if (this.selectionMode) {
|
|
1160
|
+
const eventArgArray = Array.isArray(event) ? event : [event];
|
|
1161
|
+
const selection = event ? eventArgArray.map((x) => x.row) : [];
|
|
1162
|
+
this.selectionChange.emit(selection);
|
|
1163
|
+
}
|
|
1164
|
+
}
|
|
1165
|
+
fireLazyLoad(event) {
|
|
1166
|
+
if (this.lazy) {
|
|
1167
|
+
const sort = this.sortSignleColumn
|
|
1168
|
+
? this.getSorts([this.sortSignleColumn])
|
|
1169
|
+
: this.sortMeta
|
|
1170
|
+
? this.getSorts(this.sortMeta)
|
|
1171
|
+
: undefined;
|
|
1172
|
+
const lazyLoadEvent = {
|
|
1173
|
+
sort,
|
|
1174
|
+
offset: event.first ?? 0,
|
|
1175
|
+
limit: event.rows ?? this.pageSize,
|
|
1176
|
+
filter: convertToFilter(event.filters),
|
|
1177
|
+
};
|
|
1178
|
+
this.lazyLoad.emit(lazyLoadEvent);
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
removePrefix(input, prefix) {
|
|
1182
|
+
return input.startsWith(prefix) ? input.slice(prefix.length) : input;
|
|
1183
|
+
}
|
|
1184
|
+
convertToSortDirection(value) {
|
|
1185
|
+
return value === 1 ? SortDirection.asc : SortDirection.desc;
|
|
1186
|
+
}
|
|
1187
|
+
getSorts(value) {
|
|
1188
|
+
return value
|
|
1189
|
+
? value.map((x) => ({
|
|
1190
|
+
field: this.removePrefix(x.field, 'row.'),
|
|
1191
|
+
direction: this.convertToSortDirection(x.order),
|
|
1192
|
+
}))
|
|
1193
|
+
: undefined;
|
|
1194
|
+
}
|
|
1195
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1196
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TableComponent, isStandalone: true, selector: "v-table", inputs: { data: "data", total: "total", filter: "filter", loading: "loading", scrollable: "scrollable", pageSize: "pageSize", currentPage: "currentPage", showPaginator: "showPaginator", sortMultiple: "sortMultiple", lazy: "lazy", selectionMode: "selectionMode", showPageSizePicker: "showPageSizePicker", entityKey: "entityKey", maximumColumnLength: "maximumColumnLength", disableCustomClicks: "disableCustomClicks", columns: "columns", selection: "selection" }, outputs: { pageSizeChange: "pageSizeChange", selectionChange: "selectionChange", pageChange: "pageChange", sortChange: "sortChange", lazyLoad: "lazyLoad" }, providers: [
|
|
1197
|
+
{
|
|
1198
|
+
provide: TABLE_COMPONENT_TOKEN,
|
|
1199
|
+
useExisting: TableComponent,
|
|
1200
|
+
},
|
|
1201
|
+
], queries: [{ propertyName: "rowDetailTemplate", first: true, predicate: ["rowDetail"], descendants: true }, { propertyName: "viewColumns", predicate: TABLE_COLUMN_PROVIDER }], viewQueries: [{ propertyName: "table", first: true, predicate: ["table"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div class=\"v-table\">\n <p-table\n #table\n class=\"v-table\"\n [value]=\"tableRows\"\n [filters]=\"filter | primengFilter\"\n [paginator]=\"showPaginator\"\n [rows]=\"pageSize\"\n [totalRecords]=\"total\"\n [loading]=\"loading\"\n [lazy]=\"lazy\"\n dataKey=\"id\"\n [scrollable]=\"scrollable\"\n [sortMode]=\"sortMultiple ? 'multiple' : 'single'\"\n [scrollHeight]=\"'flex'\"\n [selectionMode]=\"selectionMode\"\n [selection]=\"tableSelection\"\n [rowsPerPageOptions]=\"[10, 25, 50, 100]\"\n [expandedRowKeys]=\"expandedRows\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"Showing {first} to {last} of {totalRecords} entries\"\n [customSort]=\"lazy\"\n [multiSortMeta]=\"sortMeta\"\n [resizableColumns]=\"true\"\n columnResizeMode=\"expand\"\n [globalFilterFields]=\"globalFilterFields\"\n (onPage)=\"pageChanged($event)\"\n (onSort)=\"sortChanged($event)\"\n (selectionChange)=\"selectionChanged($event)\"\n (onLazyLoad)=\"fireLazyLoad($event)\"\n >\n <ng-template pTemplate=\"header\">\n <tr>\n @if (selectionMode === 'multiple') {\n <th>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n } @for (column of tableColumns; track column; let index = $index) {\n @if (column.sortable) {\n <th\n pResizableColumn\n [pSortableColumn]=\"'row.' + column.id\"\n [style.width]=\"column.width\"\n >\n {{ column.headerGetter(column.id, index) }}\n <p-sortIcon [field]=\"'row.' + column.id\"></p-sortIcon>\n </th>\n }\n @if (!column.sortable) {\n <th\n pResizableColumn\n [class.v-auto-cell]=\"column.template\"\n [style.width]=\"column.width\"\n >\n {{ column.headerGetter(column.id, index) }}\n </th>\n }\n } @if (rowDetailTemplate){\n <th></th>\n }\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-row let-expanded=\"expanded\">\n <tr\n [pSelectableRow]=\"row\"\n [pSelectableRowDisabled]=\"selectionMode !== 'single'\"\n (dblclick)=\"\n router.navigate(['./' + row.row[entityKey ?? 'id']], {\n relativeTo: route\n })\n \"\n >\n @if (selectionMode === 'multiple'){\n <td>\n <p-tableCheckbox [value]=\"row\"></p-tableCheckbox>\n </td>\n }\n @for (cd of tableColumns; track cd; let index = $index) {\n <td\n [class]=\"cd.columnClass!\"\n [class.v-auto-cell]=\"cd.template\"\n >\n @if (cd.template) {\n <ng-container\n *ngTemplateOutlet=\"cd.template; context: { $implicit: row.row }\"\n ></ng-container>\n }\n @if (!row.template) {\n <span\n [queryParams]=\"cd.queryParams ? cd.queryParams : undefined\"\n [routerLink]=\"cd.routerLink ? cd.routerLink(row.row) : undefined\"\n [innerHTML]=\"cd.valueGetter(row.row, index)\"\n ></span>\n }\n </td>\n }\n @if (rowDetailTemplate){\n <td>\n <p-button\n type=\"button\"\n pRipple\n severity=\"primary\"\n [pRowToggler]=\"row\"\n [text]=\"true\"\n [rounded]=\"true\"\n [plain]=\"true\"\n [icon]=\"expanded ? icons.chevronDown : icons.chevronRight\"\n />\n </td>\n }\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" let-row>\n <tr>\n <td [attr.colspan]=\"tableColumns.length + 1\">\n <ng-container\n class=\"w-100\"\n *ngTemplateOutlet=\"\n expansionTemplate.template;\n context: { $implicit: row.row }\n \"\n ></ng-container>\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", styles: [".v-auto-cell{width:1%;white-space:nowrap}.v-table{display:flex;flex-direction:column;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "ngmodule", type: TableModule }, { kind: "component", type: i2$7.Table, selector: "p-table", inputs: ["frozenColumns", "frozenValue", "styleClass", "tableStyle", "tableStyleClass", "paginator", "pageLinks", "rowsPerPageOptions", "alwaysShowPaginator", "paginatorPosition", "paginatorStyleClass", "paginatorDropdownAppendTo", "paginatorDropdownScrollHeight", "currentPageReportTemplate", "showCurrentPageReport", "showJumpToPageDropdown", "showJumpToPageInput", "showFirstLastIcon", "showPageLinks", "defaultSortOrder", "sortMode", "resetPageOnSort", "selectionMode", "selectionPageOnly", "contextMenuSelection", "contextMenuSelectionMode", "dataKey", "metaKeySelection", "rowSelectable", "rowTrackBy", "lazy", "lazyLoadOnInit", "compareSelectionBy", "csvSeparator", "exportFilename", "filters", "globalFilterFields", "filterDelay", "filterLocale", "expandedRowKeys", "editingRowKeys", "rowExpandMode", "scrollable", "rowGroupMode", "scrollHeight", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "virtualScrollDelay", "frozenWidth", "contextMenu", "resizableColumns", "columnResizeMode", "reorderableColumns", "loading", "loadingIcon", "showLoader", "rowHover", "customSort", "showInitialSortBadge", "exportFunction", "exportHeader", "stateKey", "stateStorage", "editMode", "groupRowsBy", "size", "showGridlines", "stripedRows", "groupRowsByOrder", "responsiveLayout", "breakpoint", "paginatorLocale", "value", "columns", "first", "rows", "totalRecords", "sortField", "sortOrder", "multiSortMeta", "selection", "selectAll"], outputs: ["contextMenuSelectionChange", "selectAllChange", "selectionChange", "onRowSelect", "onRowUnselect", "onPage", "onSort", "onFilter", "onLazyLoad", "onRowExpand", "onRowCollapse", "onContextMenuSelect", "onColResize", "onColReorder", "onRowReorder", "onEditInit", "onEditComplete", "onEditCancel", "onHeaderCheckboxToggle", "sortFunction", "firstChange", "rowsChange", "onStateSave", "onStateRestore"] }, { kind: "directive", type: i1$6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "directive", type: i2$7.SortableColumn, selector: "[pSortableColumn]", inputs: ["pSortableColumn", "pSortableColumnDisabled"] }, { kind: "directive", type: i2$7.SelectableRow, selector: "[pSelectableRow]", inputs: ["pSelectableRow", "pSelectableRowIndex", "pSelectableRowDisabled"] }, { kind: "directive", type: i2$7.RowToggler, selector: "[pRowToggler]", inputs: ["pRowToggler", "pRowTogglerDisabled"] }, { kind: "directive", type: i2$7.ResizableColumn, selector: "[pResizableColumn]", inputs: ["pResizableColumnDisabled"] }, { kind: "component", type: i2$7.SortIcon, selector: "p-sortIcon", inputs: ["field"] }, { kind: "component", type: i2$7.TableCheckbox, selector: "p-tableCheckbox", inputs: ["value", "disabled", "required", "index", "inputId", "name", "ariaLabel"] }, { kind: "component", type: i2$7.TableHeaderCheckbox, selector: "p-tableHeaderCheckbox", inputs: ["disabled", "inputId", "name", "ariaLabel"] }, { kind: "ngmodule", type: RouterModule }, { kind: "directive", type: i2$4.RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: ButtonModule }, { kind: "component", type: i1$3.Button, selector: "p-button", inputs: ["type", "iconPos", "icon", "badge", "label", "disabled", "loading", "loadingIcon", "raised", "rounded", "text", "plain", "severity", "outlined", "link", "tabindex", "size", "variant", "style", "styleClass", "badgeClass", "badgeSeverity", "ariaLabel", "buttonProps", "autofocus", "fluid"], outputs: ["onClick", "onFocus", "onBlur"] }, { kind: "ngmodule", type: RippleModule }, { kind: "directive", type: i6.Ripple, selector: "[pRipple]" }, { kind: "pipe", type: TableFilterPipe, name: "primengFilter" }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1202
|
+
}
|
|
1203
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TableComponent, decorators: [{
|
|
1204
|
+
type: Component,
|
|
1205
|
+
args: [{ selector: 'v-table', imports: [
|
|
1206
|
+
CommonModule,
|
|
1207
|
+
TableModule,
|
|
1208
|
+
RouterModule,
|
|
1209
|
+
ButtonModule,
|
|
1210
|
+
RippleModule,
|
|
1211
|
+
TableFilterPipe,
|
|
1212
|
+
], providers: [
|
|
1213
|
+
{
|
|
1214
|
+
provide: TABLE_COMPONENT_TOKEN,
|
|
1215
|
+
useExisting: TableComponent,
|
|
1216
|
+
},
|
|
1217
|
+
], encapsulation: ViewEncapsulation.None, changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"v-table\">\n <p-table\n #table\n class=\"v-table\"\n [value]=\"tableRows\"\n [filters]=\"filter | primengFilter\"\n [paginator]=\"showPaginator\"\n [rows]=\"pageSize\"\n [totalRecords]=\"total\"\n [loading]=\"loading\"\n [lazy]=\"lazy\"\n dataKey=\"id\"\n [scrollable]=\"scrollable\"\n [sortMode]=\"sortMultiple ? 'multiple' : 'single'\"\n [scrollHeight]=\"'flex'\"\n [selectionMode]=\"selectionMode\"\n [selection]=\"tableSelection\"\n [rowsPerPageOptions]=\"[10, 25, 50, 100]\"\n [expandedRowKeys]=\"expandedRows\"\n [showCurrentPageReport]=\"true\"\n currentPageReportTemplate=\"Showing {first} to {last} of {totalRecords} entries\"\n [customSort]=\"lazy\"\n [multiSortMeta]=\"sortMeta\"\n [resizableColumns]=\"true\"\n columnResizeMode=\"expand\"\n [globalFilterFields]=\"globalFilterFields\"\n (onPage)=\"pageChanged($event)\"\n (onSort)=\"sortChanged($event)\"\n (selectionChange)=\"selectionChanged($event)\"\n (onLazyLoad)=\"fireLazyLoad($event)\"\n >\n <ng-template pTemplate=\"header\">\n <tr>\n @if (selectionMode === 'multiple') {\n <th>\n <p-tableHeaderCheckbox></p-tableHeaderCheckbox>\n </th>\n } @for (column of tableColumns; track column; let index = $index) {\n @if (column.sortable) {\n <th\n pResizableColumn\n [pSortableColumn]=\"'row.' + column.id\"\n [style.width]=\"column.width\"\n >\n {{ column.headerGetter(column.id, index) }}\n <p-sortIcon [field]=\"'row.' + column.id\"></p-sortIcon>\n </th>\n }\n @if (!column.sortable) {\n <th\n pResizableColumn\n [class.v-auto-cell]=\"column.template\"\n [style.width]=\"column.width\"\n >\n {{ column.headerGetter(column.id, index) }}\n </th>\n }\n } @if (rowDetailTemplate){\n <th></th>\n }\n </tr>\n </ng-template>\n <ng-template pTemplate=\"body\" let-row let-expanded=\"expanded\">\n <tr\n [pSelectableRow]=\"row\"\n [pSelectableRowDisabled]=\"selectionMode !== 'single'\"\n (dblclick)=\"\n router.navigate(['./' + row.row[entityKey ?? 'id']], {\n relativeTo: route\n })\n \"\n >\n @if (selectionMode === 'multiple'){\n <td>\n <p-tableCheckbox [value]=\"row\"></p-tableCheckbox>\n </td>\n }\n @for (cd of tableColumns; track cd; let index = $index) {\n <td\n [class]=\"cd.columnClass!\"\n [class.v-auto-cell]=\"cd.template\"\n >\n @if (cd.template) {\n <ng-container\n *ngTemplateOutlet=\"cd.template; context: { $implicit: row.row }\"\n ></ng-container>\n }\n @if (!row.template) {\n <span\n [queryParams]=\"cd.queryParams ? cd.queryParams : undefined\"\n [routerLink]=\"cd.routerLink ? cd.routerLink(row.row) : undefined\"\n [innerHTML]=\"cd.valueGetter(row.row, index)\"\n ></span>\n }\n </td>\n }\n @if (rowDetailTemplate){\n <td>\n <p-button\n type=\"button\"\n pRipple\n severity=\"primary\"\n [pRowToggler]=\"row\"\n [text]=\"true\"\n [rounded]=\"true\"\n [plain]=\"true\"\n [icon]=\"expanded ? icons.chevronDown : icons.chevronRight\"\n />\n </td>\n }\n </tr>\n </ng-template>\n <ng-template pTemplate=\"rowexpansion\" let-row>\n <tr>\n <td [attr.colspan]=\"tableColumns.length + 1\">\n <ng-container\n class=\"w-100\"\n *ngTemplateOutlet=\"\n expansionTemplate.template;\n context: { $implicit: row.row }\n \"\n ></ng-container>\n </td>\n </tr>\n </ng-template>\n </p-table>\n</div>\n", styles: [".v-auto-cell{width:1%;white-space:nowrap}.v-table{display:flex;flex-direction:column;height:100%}\n"] }]
|
|
1218
|
+
}], propDecorators: { viewColumns: [{
|
|
1219
|
+
type: ContentChildren,
|
|
1220
|
+
args: [TABLE_COLUMN_PROVIDER]
|
|
1221
|
+
}], table: [{
|
|
1222
|
+
type: ViewChild,
|
|
1223
|
+
args: ['table']
|
|
1224
|
+
}], rowDetailTemplate: [{
|
|
1225
|
+
type: ContentChild,
|
|
1226
|
+
args: ['rowDetail', { static: false }]
|
|
1227
|
+
}], data: [{
|
|
1228
|
+
type: Input
|
|
1229
|
+
}], total: [{
|
|
1230
|
+
type: Input
|
|
1231
|
+
}], filter: [{
|
|
1232
|
+
type: Input
|
|
1233
|
+
}], loading: [{
|
|
1234
|
+
type: Input
|
|
1235
|
+
}], scrollable: [{
|
|
1236
|
+
type: Input
|
|
1237
|
+
}], pageSize: [{
|
|
1238
|
+
type: Input
|
|
1239
|
+
}], currentPage: [{
|
|
1240
|
+
type: Input
|
|
1241
|
+
}], showPaginator: [{
|
|
1242
|
+
type: Input
|
|
1243
|
+
}], sortMultiple: [{
|
|
1244
|
+
type: Input
|
|
1245
|
+
}], lazy: [{
|
|
1246
|
+
type: Input
|
|
1247
|
+
}], selectionMode: [{
|
|
1248
|
+
type: Input
|
|
1249
|
+
}], showPageSizePicker: [{
|
|
1250
|
+
type: Input
|
|
1251
|
+
}], entityKey: [{
|
|
1252
|
+
type: Input
|
|
1253
|
+
}], maximumColumnLength: [{
|
|
1254
|
+
type: Input
|
|
1255
|
+
}], disableCustomClicks: [{
|
|
1256
|
+
type: Input
|
|
1257
|
+
}], columns: [{
|
|
1258
|
+
type: Input
|
|
1259
|
+
}], selection: [{
|
|
1260
|
+
type: Input
|
|
1261
|
+
}], pageSizeChange: [{
|
|
1262
|
+
type: Output
|
|
1263
|
+
}], selectionChange: [{
|
|
1264
|
+
type: Output
|
|
1265
|
+
}], pageChange: [{
|
|
1266
|
+
type: Output
|
|
1267
|
+
}], sortChange: [{
|
|
1268
|
+
type: Output
|
|
1269
|
+
}], lazyLoad: [{
|
|
1270
|
+
type: Output
|
|
1271
|
+
}] } });
|
|
1272
|
+
|
|
1273
|
+
class ActionButtonComponent {
|
|
1274
|
+
constructor() {
|
|
1275
|
+
this.disabled = false;
|
|
1276
|
+
this.outlined = false;
|
|
1277
|
+
this.raised = false;
|
|
1278
|
+
// eslint-disable-next-line @angular-eslint/no-output-native
|
|
1279
|
+
this.click = new EventEmitter();
|
|
1280
|
+
this.icons = Icons;
|
|
1281
|
+
this.propertyChangeSubject = new Subject();
|
|
1282
|
+
this.propertyChanged = this.propertyChangeSubject.asObservable();
|
|
1283
|
+
this.buttonGroup = inject(ACTION_BUTTON_GROUP_COMPONENT_TOKEN, {
|
|
1284
|
+
optional: true,
|
|
1285
|
+
});
|
|
1286
|
+
}
|
|
1287
|
+
ngOnChanges(changes) {
|
|
1288
|
+
const isValueChange = Object.keys(changes).some((x) => !changes[x].firstChange);
|
|
1289
|
+
if (isValueChange) {
|
|
1290
|
+
this.propertyChangeSubject.next(null);
|
|
1291
|
+
}
|
|
1292
|
+
}
|
|
1293
|
+
handleClick(event) {
|
|
1294
|
+
event.stopPropagation();
|
|
1295
|
+
this.click.emit(event);
|
|
1296
|
+
}
|
|
1297
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ActionButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1298
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: ActionButtonComponent, isStandalone: true, selector: "v-action-button", inputs: { disabled: "disabled", toolTip: "toolTip", id: "id", icon: "icon", outlined: "outlined", raised: "raised", severity: "severity", label: "label", size: "size" }, outputs: { click: "click" }, usesOnChanges: true, ngImport: i0, template: "<v-button\n [label]=\"label\"\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [outlined]=\"outlined\"\n tooltipPosition=\"bottom\"\n [size]=\"size\"\n [severity]=\"severity\"\n (click)=\"handleClick($event)\"\n/>\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "severity", "routerLink", "size", "queryParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1299
|
+
}
|
|
1300
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ActionButtonComponent, decorators: [{
|
|
1301
|
+
type: Component,
|
|
1302
|
+
args: [{ selector: 'v-action-button', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, template: "<v-button\n [label]=\"label\"\n [disabled]=\"disabled\"\n [icon]=\"icon\"\n [outlined]=\"outlined\"\n tooltipPosition=\"bottom\"\n [size]=\"size\"\n [severity]=\"severity\"\n (click)=\"handleClick($event)\"\n/>\n" }]
|
|
1303
|
+
}], propDecorators: { disabled: [{
|
|
1304
|
+
type: Input
|
|
1305
|
+
}], toolTip: [{
|
|
1306
|
+
type: Input
|
|
1307
|
+
}], id: [{
|
|
1308
|
+
type: Input
|
|
1309
|
+
}], icon: [{
|
|
1310
|
+
type: Input
|
|
1311
|
+
}], outlined: [{
|
|
1312
|
+
type: Input
|
|
1313
|
+
}], raised: [{
|
|
1314
|
+
type: Input
|
|
1315
|
+
}], severity: [{
|
|
1316
|
+
type: Input
|
|
1317
|
+
}], label: [{
|
|
1318
|
+
type: Input
|
|
1319
|
+
}], size: [{
|
|
1320
|
+
type: Input
|
|
1321
|
+
}], click: [{
|
|
1322
|
+
type: Output
|
|
1323
|
+
}] } });
|
|
1324
|
+
|
|
1325
|
+
class ActionButtonGroupComponent extends UnsubscribeComponent {
|
|
1326
|
+
constructor(changeDetectorRef, screenSizeService) {
|
|
1327
|
+
super();
|
|
1328
|
+
this.changeDetectorRef = changeDetectorRef;
|
|
1329
|
+
this.screenSizeService = screenSizeService;
|
|
1330
|
+
this.maxItems = 3;
|
|
1331
|
+
this.maxItemsMobile = 0;
|
|
1332
|
+
this.items = [];
|
|
1333
|
+
this.menuIconPos = 'right';
|
|
1334
|
+
this.menuIcon = Icons.action;
|
|
1335
|
+
this.icons = Icons;
|
|
1336
|
+
this.allItems = [];
|
|
1337
|
+
this.visibleActions = [];
|
|
1338
|
+
this.menuItems = [];
|
|
1339
|
+
}
|
|
1340
|
+
ngAfterContentInit() {
|
|
1341
|
+
this.subscribeItemChange();
|
|
1342
|
+
}
|
|
1343
|
+
fireClick(item, event) {
|
|
1344
|
+
event.stopPropagation();
|
|
1345
|
+
item.click.emit();
|
|
1346
|
+
}
|
|
1347
|
+
subscribeItemChange() {
|
|
1348
|
+
const screenResize$ = this.screenSizeService.isMobileBlock;
|
|
1349
|
+
const actions$ = queryListChanged(this.actions);
|
|
1350
|
+
screenResize$
|
|
1351
|
+
.pipe(takeUntil(this.destroyed$), combineLatestWith(actions$))
|
|
1352
|
+
.subscribe(([isMobile, actions]) => {
|
|
1353
|
+
this.computeItems(actions, isMobile);
|
|
1354
|
+
});
|
|
1355
|
+
}
|
|
1356
|
+
computeItems(actions, isMobile) {
|
|
1357
|
+
const allItems = [...(this.items ?? []), ...actions];
|
|
1358
|
+
const maxItems = isMobile ? this.maxItemsMobile : this.maxItems;
|
|
1359
|
+
this.visibleActions = allItems.slice(0, maxItems);
|
|
1360
|
+
this.menuItems = allItems.slice(maxItems).map(this.convertToMenuItem);
|
|
1361
|
+
this.changeDetectorRef.detectChanges();
|
|
1362
|
+
}
|
|
1363
|
+
convertToMenuItem(item) {
|
|
1364
|
+
return {
|
|
1365
|
+
label: item.label,
|
|
1366
|
+
icon: item.icon,
|
|
1367
|
+
command: () => {
|
|
1368
|
+
item.click.emit();
|
|
1369
|
+
},
|
|
1370
|
+
};
|
|
1371
|
+
}
|
|
1372
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ActionButtonGroupComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: i1$4.ScreenSizeService }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1373
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: ActionButtonGroupComponent, isStandalone: true, selector: "v-action-button-group", inputs: { maxItems: "maxItems", maxItemsMobile: "maxItemsMobile", items: "items", menuIconPos: "menuIconPos", menuIcon: "menuIcon", label: "label", icon: "icon" }, providers: [
|
|
1374
|
+
{
|
|
1375
|
+
provide: ACTION_BUTTON_GROUP_COMPONENT_TOKEN,
|
|
1376
|
+
useExisting: ActionButtonGroupComponent,
|
|
1377
|
+
},
|
|
1378
|
+
], queries: [{ propertyName: "actions", predicate: ActionButtonComponent }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"v-action-button-group align-items-center justify-content-center justify-content-md-end\"\n>\n <div class=\"v-action-button-group__actions d-flex gap-2\">\n @for (action of visibleActions; track action) {\n <v-action-button\n [disabled]=\"action.disabled\"\n [icon]=\"action.icon\"\n [id]=\"action.id\"\n [outlined]=\"action.outlined\"\n [raised]=\"action.raised\"\n [toolTip]=\"action.toolTip || action.label\"\n [severity]=\"action.severity\"\n [size]=\"action.size\"\n (click)=\"fireClick(action, $event)\"\n ></v-action-button>\n } @if (actions.length > visibleActions.length) {\n <v-dropdown-button\n [label]=\"label\"\n [icon]=\"menuIcon\"\n [items]=\"menuItems\"\n />\n }\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ActionButtonComponent, selector: "v-action-button", inputs: ["disabled", "toolTip", "id", "icon", "outlined", "raised", "severity", "label", "size"], outputs: ["click"] }, { kind: "component", type: DropdownButtonComponent, selector: "v-dropdown-button", inputs: ["label", "icon", "rounded", "raised", "outlined", "severity", "size", "items"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1379
|
+
}
|
|
1380
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ActionButtonGroupComponent, decorators: [{
|
|
1381
|
+
type: Component,
|
|
1382
|
+
args: [{ selector: 'v-action-button-group', imports: [ActionButtonComponent, DropdownButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1383
|
+
{
|
|
1384
|
+
provide: ACTION_BUTTON_GROUP_COMPONENT_TOKEN,
|
|
1385
|
+
useExisting: ActionButtonGroupComponent,
|
|
1386
|
+
},
|
|
1387
|
+
], template: "<div\n class=\"v-action-button-group align-items-center justify-content-center justify-content-md-end\"\n>\n <div class=\"v-action-button-group__actions d-flex gap-2\">\n @for (action of visibleActions; track action) {\n <v-action-button\n [disabled]=\"action.disabled\"\n [icon]=\"action.icon\"\n [id]=\"action.id\"\n [outlined]=\"action.outlined\"\n [raised]=\"action.raised\"\n [toolTip]=\"action.toolTip || action.label\"\n [severity]=\"action.severity\"\n [size]=\"action.size\"\n (click)=\"fireClick(action, $event)\"\n ></v-action-button>\n } @if (actions.length > visibleActions.length) {\n <v-dropdown-button\n [label]=\"label\"\n [icon]=\"menuIcon\"\n [items]=\"menuItems\"\n />\n }\n </div>\n</div>\n" }]
|
|
1388
|
+
}], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: i1$4.ScreenSizeService }], propDecorators: { actions: [{
|
|
1389
|
+
type: ContentChildren,
|
|
1390
|
+
args: [ActionButtonComponent]
|
|
1391
|
+
}], maxItems: [{
|
|
1392
|
+
type: Input
|
|
1393
|
+
}], maxItemsMobile: [{
|
|
1394
|
+
type: Input
|
|
1395
|
+
}], items: [{
|
|
1396
|
+
type: Input
|
|
1397
|
+
}], menuIconPos: [{
|
|
1398
|
+
type: Input
|
|
1399
|
+
}], menuIcon: [{
|
|
1400
|
+
type: Input
|
|
1401
|
+
}], label: [{
|
|
1402
|
+
type: Input
|
|
1403
|
+
}], icon: [{
|
|
1404
|
+
type: Input
|
|
1405
|
+
}] } });
|
|
1406
|
+
|
|
1407
|
+
class DropdownComponent extends BaseFormInputComponent {
|
|
1408
|
+
constructor(ngControl) {
|
|
1409
|
+
super(ngControl);
|
|
1410
|
+
this.options = [];
|
|
1411
|
+
this.editable = false;
|
|
1412
|
+
this.loading = false;
|
|
1413
|
+
this.lazy = false;
|
|
1414
|
+
this.filter = true;
|
|
1415
|
+
this.forceMinWidth = false;
|
|
1416
|
+
this.showFilter = false;
|
|
1417
|
+
this.localSearch = false;
|
|
1418
|
+
this.showed = new EventEmitter();
|
|
1419
|
+
this.cleared = new EventEmitter();
|
|
1420
|
+
this.lazyLoad = new EventEmitter();
|
|
1421
|
+
this.filtered = new EventEmitter();
|
|
1422
|
+
this.destroy$ = new Subject();
|
|
1423
|
+
this.virtualOptionSize = 37.5;
|
|
1424
|
+
}
|
|
1425
|
+
ngOnChanges(changes) {
|
|
1426
|
+
if (changes['lazy'] || changes['loading']) {
|
|
1427
|
+
this.virtualScrollOptions = this.lazy
|
|
1428
|
+
? {
|
|
1429
|
+
showLoader: this.loading,
|
|
1430
|
+
lazy: true,
|
|
1431
|
+
onLazyLoad: this.onLazyLoad.bind(this),
|
|
1432
|
+
}
|
|
1433
|
+
: undefined;
|
|
1434
|
+
}
|
|
1435
|
+
}
|
|
1436
|
+
ngOnDestroy() {
|
|
1437
|
+
this.destroy$.next();
|
|
1438
|
+
this.destroy$.complete();
|
|
1439
|
+
}
|
|
1440
|
+
onLazyLoad(event) {
|
|
1441
|
+
this.lazyLoad.emit({
|
|
1442
|
+
offset: event.first,
|
|
1443
|
+
limit: event.last - event.first,
|
|
1444
|
+
});
|
|
1445
|
+
}
|
|
1446
|
+
filterChange(event) {
|
|
1447
|
+
this.filtered.emit({
|
|
1448
|
+
filter: event.filter,
|
|
1449
|
+
});
|
|
1450
|
+
}
|
|
1451
|
+
onDropdownShow() {
|
|
1452
|
+
this.showed.emit();
|
|
1453
|
+
}
|
|
1454
|
+
onDropdownClear() {
|
|
1455
|
+
this.cleared.emit();
|
|
1456
|
+
}
|
|
1457
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1458
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: DropdownComponent, isStandalone: true, selector: "v-dropdown", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", dropdownIcon: "dropdownIcon", floatLabel: "floatLabel", editable: "editable", loading: "loading", lazy: "lazy", filter: "filter", forceMinWidth: "forceMinWidth", showFilter: "showFilter", localSearch: "localSearch" }, outputs: { showed: "showed", cleared: "cleared", lazyLoad: "lazyLoad", filtered: "filtered" }, providers: [
|
|
1459
|
+
{
|
|
1460
|
+
provide: BaseInputControls,
|
|
1461
|
+
useExisting: forwardRef(() => DropdownComponent),
|
|
1462
|
+
multi: true,
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
provide: DROPDOWN_COMPONENT_TOKEN,
|
|
1466
|
+
useExisting: DropdownComponent,
|
|
1467
|
+
},
|
|
1468
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"v-dropdown\">\n @if (label && !floatLabel) {\n <v-form-field\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-select\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [filter]=\"filter\"\n [title]=\"label\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ?? ''\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [showClear]=\"formControl && clearable && !readonly\"\n [editable]=\"editable\"\n [dataKey]=\"optionValue\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (onFilter)=\"filterChange($event)\"\n >\n </p-select>\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n }\n @if (!label && !floatLabel) {\n <p-select\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [filter]=\"filter\"\n [title]=\"label\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ? placeholder : label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [showClear]=\"formControl && clearable && !readonly\"\n [editable]=\"editable\"\n [dataKey]=\"optionValue\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (onFilter)=\"filterChange($event)\"\n >\n </p-select>\n }\n @if (floatLabel && !label) {\n <p-floatLabel>\n <p-select\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [title]=\"label\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ? placeholder : label\"\n [filter]=\"filter\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [showClear]=\"formControl && clearable && !readonly\"\n [editable]=\"editable\"\n [dataKey]=\"optionValue\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (onFilter)=\"filterChange($event)\"\n (lazyLoad)=\"onLazyLoad($any($event))\"\n >\n </p-select>\n <label [for]=\"inputId\">{{ floatLabel }}</label>\n </p-floatLabel>\n }\n</div>", styles: [".v-dropdown{justify-content:center;width:100%}.p-dropdown-items-wrapper,.p-scroller-viewport,.p-scroller{min-width:8rem!important;overflow-x:hidden;overflow-y:auto}.p-dropdown{width:100%}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: SelectModule }, { kind: "component", type: i2$8.Select, selector: "p-select", inputs: ["id", "scrollHeight", "filter", "panelStyle", "styleClass", "panelStyleClass", "readonly", "editable", "tabindex", "placeholder", "loadingIcon", "filterPlaceholder", "filterLocale", "inputId", "dataKey", "filterBy", "filterFields", "autofocus", "resetFilterOnHide", "checkmark", "dropdownIcon", "loading", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "group", "showClear", "emptyFilterMessage", "emptyMessage", "lazy", "virtualScroll", "virtualScrollItemSize", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "ariaLabel", "ariaLabelledBy", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "focusOnHover", "selectOnFocus", "autoOptionFocus", "autofocusFilter", "filterValue", "options", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onShow", "onHide", "onClear", "onLazyLoad"] }, { kind: "ngmodule", type: TooltipModule }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "ngmodule", type: MessageModule }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i2$2.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
|
|
1469
|
+
}
|
|
1470
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DropdownComponent, decorators: [{
|
|
1471
|
+
type: Component,
|
|
1472
|
+
args: [{ selector: 'v-dropdown', imports: [
|
|
1473
|
+
ReactiveFormsModule,
|
|
1474
|
+
SelectModule,
|
|
1475
|
+
TooltipModule,
|
|
1476
|
+
FormFieldComponent,
|
|
1477
|
+
MessageModule,
|
|
1478
|
+
FloatLabelModule,
|
|
1479
|
+
ErrorComponent
|
|
1480
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
|
|
1481
|
+
{
|
|
1482
|
+
provide: BaseInputControls,
|
|
1483
|
+
useExisting: forwardRef(() => DropdownComponent),
|
|
1484
|
+
multi: true,
|
|
1485
|
+
},
|
|
1486
|
+
{
|
|
1487
|
+
provide: DROPDOWN_COMPONENT_TOKEN,
|
|
1488
|
+
useExisting: DropdownComponent,
|
|
1489
|
+
},
|
|
1490
|
+
], template: "<div class=\"v-dropdown\">\n @if (label && !floatLabel) {\n <v-form-field\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-select\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [filter]=\"filter\"\n [title]=\"label\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ?? ''\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [showClear]=\"formControl && clearable && !readonly\"\n [editable]=\"editable\"\n [dataKey]=\"optionValue\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (onFilter)=\"filterChange($event)\"\n >\n </p-select>\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n }\n @if (!label && !floatLabel) {\n <p-select\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [filter]=\"filter\"\n [title]=\"label\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ? placeholder : label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [showClear]=\"formControl && clearable && !readonly\"\n [editable]=\"editable\"\n [dataKey]=\"optionValue\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (onFilter)=\"filterChange($event)\"\n >\n </p-select>\n }\n @if (floatLabel && !label) {\n <p-floatLabel>\n <p-select\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [title]=\"label\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ? placeholder : label\"\n [filter]=\"filter\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [showClear]=\"formControl && clearable && !readonly\"\n [editable]=\"editable\"\n [dataKey]=\"optionValue\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (onFilter)=\"filterChange($event)\"\n (lazyLoad)=\"onLazyLoad($any($event))\"\n >\n </p-select>\n <label [for]=\"inputId\">{{ floatLabel }}</label>\n </p-floatLabel>\n }\n</div>", styles: [".v-dropdown{justify-content:center;width:100%}.p-dropdown-items-wrapper,.p-scroller-viewport,.p-scroller{min-width:8rem!important;overflow-x:hidden;overflow-y:auto}.p-dropdown{width:100%}\n"] }]
|
|
1491
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1492
|
+
type: Optional
|
|
1493
|
+
}, {
|
|
1494
|
+
type: Self
|
|
1495
|
+
}] }], propDecorators: { options: [{
|
|
1496
|
+
type: Input
|
|
1497
|
+
}], optionLabel: [{
|
|
1498
|
+
type: Input
|
|
1499
|
+
}], optionValue: [{
|
|
1500
|
+
type: Input
|
|
1501
|
+
}], dropdownIcon: [{
|
|
1502
|
+
type: Input
|
|
1503
|
+
}], floatLabel: [{
|
|
1504
|
+
type: Input
|
|
1505
|
+
}], editable: [{
|
|
1506
|
+
type: Input
|
|
1507
|
+
}], loading: [{
|
|
1508
|
+
type: Input
|
|
1509
|
+
}], lazy: [{
|
|
1510
|
+
type: Input
|
|
1511
|
+
}], filter: [{
|
|
1512
|
+
type: Input
|
|
1513
|
+
}], forceMinWidth: [{
|
|
1514
|
+
type: Input
|
|
1515
|
+
}], showFilter: [{
|
|
1516
|
+
type: Input
|
|
1517
|
+
}], localSearch: [{
|
|
1518
|
+
type: Input
|
|
1519
|
+
}], showed: [{
|
|
1520
|
+
type: Output
|
|
1521
|
+
}], cleared: [{
|
|
1522
|
+
type: Output
|
|
1523
|
+
}], lazyLoad: [{
|
|
1524
|
+
type: Output
|
|
1525
|
+
}], filtered: [{
|
|
1526
|
+
type: Output
|
|
1527
|
+
}] } });
|
|
1528
|
+
|
|
1529
|
+
class MultiselectComponent extends BaseFormInputComponent {
|
|
1530
|
+
constructor(ngControl) {
|
|
1531
|
+
super(ngControl);
|
|
1532
|
+
this.options = [];
|
|
1533
|
+
this.editable = true;
|
|
1534
|
+
this.loading = false;
|
|
1535
|
+
this.lazy = false;
|
|
1536
|
+
this.filter = true;
|
|
1537
|
+
this.size = FieldSize.medium;
|
|
1538
|
+
this.changed = new EventEmitter();
|
|
1539
|
+
this.showed = new EventEmitter();
|
|
1540
|
+
this.cleared = new EventEmitter();
|
|
1541
|
+
this.lazyLoad = new EventEmitter();
|
|
1542
|
+
this.filtered = new EventEmitter();
|
|
1543
|
+
this.virtualOptionSize = 37.5;
|
|
1544
|
+
}
|
|
1545
|
+
ngOnChanges(changes) {
|
|
1546
|
+
if (changes['lazy'] || changes['loading']) {
|
|
1547
|
+
this.virtualScrollOptions = this.lazy
|
|
1548
|
+
? {
|
|
1549
|
+
showLoader: this.loading,
|
|
1550
|
+
lazy: true,
|
|
1551
|
+
onLazyLoad: this.onLazyLoad.bind(this),
|
|
1552
|
+
}
|
|
1553
|
+
: undefined;
|
|
1554
|
+
}
|
|
1555
|
+
}
|
|
1556
|
+
onLazyLoad(event) {
|
|
1557
|
+
this.lazyLoad.emit({
|
|
1558
|
+
offset: event.first,
|
|
1559
|
+
limit: event.last - event.first,
|
|
1560
|
+
});
|
|
1561
|
+
}
|
|
1562
|
+
selectionChange(event) {
|
|
1563
|
+
this.cleared.emit(event);
|
|
1564
|
+
}
|
|
1565
|
+
onDropdownShow() {
|
|
1566
|
+
this.showed.emit();
|
|
1567
|
+
}
|
|
1568
|
+
onDropdownClear() {
|
|
1569
|
+
this.cleared.emit();
|
|
1570
|
+
}
|
|
1571
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MultiselectComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1572
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: MultiselectComponent, isStandalone: true, selector: "v-multiselect", inputs: { options: "options", optionLabel: "optionLabel", optionValue: "optionValue", dropdownIcon: "dropdownIcon", floatLabel: "floatLabel", editable: "editable", loading: "loading", lazy: "lazy", filter: "filter", size: "size" }, outputs: { changed: "changed", showed: "showed", cleared: "cleared", lazyLoad: "lazyLoad", filtered: "filtered" }, providers: [
|
|
1573
|
+
{
|
|
1574
|
+
provide: BaseInputControls,
|
|
1575
|
+
useExisting: forwardRef(() => MultiselectComponent),
|
|
1576
|
+
multi: true,
|
|
1577
|
+
},
|
|
1578
|
+
{
|
|
1579
|
+
provide: MULTISELECT_COMPONENT_TOKEN,
|
|
1580
|
+
useExisting: MultiselectComponent,
|
|
1581
|
+
},
|
|
1582
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"v-multiple-select\">\n @if (label && !floatLabel) {\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-multiSelect\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [title]=\"label\"\n display=\"chip\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ? placeholder : label\"\n [virtualScrollItemSize]=\"25\"\n [lazy]=\"true\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [showClear]=\"formControl && clearable && !readonly\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (changeEvent)=\"selectionChange($event)\"\n (lazyLoadEvent)=\"onLazyLoad($any($event))\"\n ></p-multiSelect>\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n }\n @if (floatLabel) {\n <p-floatLabel>\n <p-multiSelect\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [title]=\"label\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ? placeholder : label\"\n [virtualScrollItemSize]=\"25\"\n [lazy]=\"true\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [inputId]=\"inputId\"\n [showClear]=\"formControl && clearable && !readonly\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (changeEvent)=\"selectionChange($event)\"\n (lazyLoadEvent)=\"onLazyLoad($any($event))\"\n ></p-multiSelect>\n <label [for]=\"inputId\">{{ floatLabel }}</label>\n </p-floatLabel>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "ngmodule", type: FloatLabelModule }, { kind: "component", type: i2$2.FloatLabel, selector: "p-floatlabel, p-floatLabel, p-float-label", inputs: ["variant"] }, { kind: "ngmodule", type: MultiSelectModule }, { kind: "component", type: i3$4.MultiSelect, selector: "p-multiSelect, p-multiselect, p-multi-select", inputs: ["id", "ariaLabel", "styleClass", "panelStyle", "panelStyleClass", "inputId", "readonly", "group", "filter", "filterPlaceHolder", "filterLocale", "overlayVisible", "tabindex", "dataKey", "ariaLabelledBy", "displaySelectedLabel", "maxSelectedLabels", "selectionLimit", "selectedItemsLabel", "showToggleAll", "emptyFilterMessage", "emptyMessage", "resetFilterOnHide", "dropdownIcon", "chipIcon", "optionLabel", "optionValue", "optionDisabled", "optionGroupLabel", "optionGroupChildren", "showHeader", "filterBy", "scrollHeight", "lazy", "virtualScroll", "loading", "virtualScrollItemSize", "loadingIcon", "virtualScrollOptions", "overlayOptions", "ariaFilterLabel", "filterMatchMode", "tooltip", "tooltipPosition", "tooltipPositionStyle", "tooltipStyleClass", "autofocusFilter", "display", "autocomplete", "showClear", "autofocus", "placeholder", "options", "filterValue", "selectAll", "focusOnHover", "filterFields", "selectOnFocus", "autoOptionFocus", "highlightOnSelect", "size", "variant", "fluid", "appendTo"], outputs: ["onChange", "onFilter", "onFocus", "onBlur", "onClick", "onClear", "onPanelShow", "onPanelHide", "onLazyLoad", "onRemove", "onSelectAllChange"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1583
|
+
}
|
|
1584
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: MultiselectComponent, decorators: [{
|
|
1585
|
+
type: Component,
|
|
1586
|
+
args: [{ selector: 'v-multiselect', imports: [
|
|
1587
|
+
ReactiveFormsModule,
|
|
1588
|
+
FloatLabelModule,
|
|
1589
|
+
MultiSelectModule,
|
|
1590
|
+
ErrorComponent,
|
|
1591
|
+
FormFieldComponent
|
|
1592
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1593
|
+
{
|
|
1594
|
+
provide: BaseInputControls,
|
|
1595
|
+
useExisting: forwardRef(() => MultiselectComponent),
|
|
1596
|
+
multi: true,
|
|
1597
|
+
},
|
|
1598
|
+
{
|
|
1599
|
+
provide: MULTISELECT_COMPONENT_TOKEN,
|
|
1600
|
+
useExisting: MultiselectComponent,
|
|
1601
|
+
},
|
|
1602
|
+
], template: "<div class=\"v-multiple-select\">\n @if (label && !floatLabel) {\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-multiSelect\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [title]=\"label\"\n display=\"chip\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ? placeholder : label\"\n [virtualScrollItemSize]=\"25\"\n [lazy]=\"true\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [showClear]=\"formControl && clearable && !readonly\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (changeEvent)=\"selectionChange($event)\"\n (lazyLoadEvent)=\"onLazyLoad($any($event))\"\n ></p-multiSelect>\n </v-form-field>\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n }\n @if (floatLabel) {\n <p-floatLabel>\n <p-multiSelect\n class=\"w-100\"\n appendTo=\"body\"\n [formControl]=\"formControl\"\n [title]=\"label\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue\"\n [loading]=\"loading\"\n [placeholder]=\"placeholder ? placeholder : label\"\n [virtualScrollItemSize]=\"25\"\n [lazy]=\"true\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [inputId]=\"inputId\"\n [showClear]=\"formControl && clearable && !readonly\"\n [virtualScroll]=\"lazy\"\n [virtualScrollItemSize]=\"virtualOptionSize\"\n [virtualScrollOptions]=\"virtualScrollOptions\"\n (showEvent)=\"onDropdownShow()\"\n (clearEvent)=\"onDropdownClear()\"\n (changeEvent)=\"selectionChange($event)\"\n (lazyLoadEvent)=\"onLazyLoad($any($event))\"\n ></p-multiSelect>\n <label [for]=\"inputId\">{{ floatLabel }}</label>\n </p-floatLabel>\n }\n</div>\n" }]
|
|
1603
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
1604
|
+
type: Optional
|
|
1605
|
+
}, {
|
|
1606
|
+
type: Self
|
|
1607
|
+
}] }], propDecorators: { options: [{
|
|
1608
|
+
type: Input
|
|
1609
|
+
}], optionLabel: [{
|
|
1610
|
+
type: Input
|
|
1611
|
+
}], optionValue: [{
|
|
1612
|
+
type: Input
|
|
1613
|
+
}], dropdownIcon: [{
|
|
1614
|
+
type: Input
|
|
1615
|
+
}], floatLabel: [{
|
|
1616
|
+
type: Input
|
|
1617
|
+
}], editable: [{
|
|
1618
|
+
type: Input
|
|
1619
|
+
}], loading: [{
|
|
1620
|
+
type: Input
|
|
1621
|
+
}], lazy: [{
|
|
1622
|
+
type: Input
|
|
1623
|
+
}], filter: [{
|
|
1624
|
+
type: Input
|
|
1625
|
+
}], size: [{
|
|
1626
|
+
type: Input
|
|
1627
|
+
}], changed: [{
|
|
1628
|
+
type: Output
|
|
1629
|
+
}], showed: [{
|
|
1630
|
+
type: Output
|
|
1631
|
+
}], cleared: [{
|
|
1632
|
+
type: Output
|
|
1633
|
+
}], lazyLoad: [{
|
|
1634
|
+
type: Output
|
|
1635
|
+
}], filtered: [{
|
|
1636
|
+
type: Output
|
|
1637
|
+
}] } });
|
|
1638
|
+
|
|
1639
|
+
class GenericFieldComponent extends BaseFormInputComponent {
|
|
1640
|
+
constructor() {
|
|
1641
|
+
super(...arguments);
|
|
1642
|
+
this.type = GenericFieldType.text;
|
|
1643
|
+
this.size = FieldSize.medium;
|
|
1644
|
+
this.loading = false;
|
|
1645
|
+
this.lazy = false;
|
|
1646
|
+
this.filter = true;
|
|
1647
|
+
this.changed = new EventEmitter();
|
|
1648
|
+
this.showed = new EventEmitter();
|
|
1649
|
+
this.cleared = new EventEmitter();
|
|
1650
|
+
this.lazyLoad = new EventEmitter();
|
|
1651
|
+
this.filtered = new EventEmitter();
|
|
1652
|
+
this.fieldTypes = GenericFieldType;
|
|
1653
|
+
this.icons = Icons;
|
|
1654
|
+
}
|
|
1655
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GenericFieldComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1656
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: GenericFieldComponent, isStandalone: true, selector: "v-generic-field", inputs: { type: "type", floatLabel: "floatLabel", optionLabel: "optionLabel", optionValue: "optionValue", options: "options", size: "size", loading: "loading", lazy: "lazy", filter: "filter", datasource: "datasource", filterField: "filterField", showFilter: "showFilter", localSearch: "localSearch" }, outputs: { changed: "changed", showed: "showed", cleared: "cleared", lazyLoad: "lazyLoad", filtered: "filtered" }, providers: [
|
|
1657
|
+
{
|
|
1658
|
+
provide: GENERIC_FIELD_COMPONENT_TOKEN,
|
|
1659
|
+
useExisting: GenericFieldComponent,
|
|
1660
|
+
},
|
|
1661
|
+
], usesInheritance: true, ngImport: i0, template: "@if (!type || type === fieldTypes.text) {\n<v-textfield\n [label]=\"label\"\n [floatLabel]=\"floatLabel === true\"\n [size]=\"size\"\n [formControl]=\"formControl\"\n/>\n} @else if (type === fieldTypes.dropdown && !datasource) {\n<v-dropdown\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [loading]=\"loading\"\n [forceMinWidth]=\"true\"\n [formControl]=\"formControl\"\n [showFilter]=\"showFilter ?? false\"\n [localSearch]=\"localSearch ?? false\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/> \n} @else if (type === fieldTypes.dropdown && datasource) {\n <v-dropdown\n useDatasource\n [forceMinWidth]=\"true\"\n [datasource]=\"datasource\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n [showFilter]=\"showFilter ?? false\"\n [filterField]=\"filterField ?? 'fulltext'\"\n [localSearch]=\"localSearch ?? false\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n />\n} @else if (type === fieldTypes.multiselect && !datasource) {\n<v-multiselect\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/>\n} @else if (type === fieldTypes.multiselect && datasource) {\n<v-multiselect\n useDatasource\n [datasource]=\"datasource\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/>\n} @else if (type === fieldTypes.checkbox) {\n<v-checkbox\n [label]=\"label\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n [indeterminate]=\"true\"\n/>\n} @else if (type === fieldTypes.simplecheckbox) {\n<v-checkbox\n [label]=\"label\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n/>\n} @else if (type === fieldTypes.calendar) {\n<v-calendar\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n [icon]=\"icons.calendar\"\n/>\n}\n", dependencies: [{ kind: "component", type: DropdownComponent, selector: "v-dropdown", inputs: ["options", "optionLabel", "optionValue", "dropdownIcon", "floatLabel", "editable", "loading", "lazy", "filter", "forceMinWidth", "showFilter", "localSearch"], outputs: ["showed", "cleared", "lazyLoad", "filtered"] }, { kind: "component", type: CalendarComponent, selector: "v-calendar", inputs: ["maxDate", "icon", "minDate", "header", "footer", "floatLabel", "selectionMode"] }, { kind: "component", type: MultiselectComponent, selector: "v-multiselect", inputs: ["options", "optionLabel", "optionValue", "dropdownIcon", "floatLabel", "editable", "loading", "lazy", "filter", "size"], outputs: ["changed", "showed", "cleared", "lazyLoad", "filtered"] }, { kind: "component", type: TextfieldComponent, selector: "v-textfield", inputs: ["size", "type", "floatLabel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: CheckboxComponent, selector: "v-checkbox", inputs: ["indeterminate"] }, { kind: "directive", type: DatasourceDirective, selector: "v-dropdown[useDatasource], v-multiselect[useDatasource], v-generic-field[useDatasource]", inputs: ["datasource", "autoBind", "loadingText", "filterField", "transformFn", "extraFilter"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1662
|
+
}
|
|
1663
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GenericFieldComponent, decorators: [{
|
|
1664
|
+
type: Component,
|
|
1665
|
+
args: [{ selector: 'v-generic-field', imports: [
|
|
1666
|
+
DropdownComponent,
|
|
1667
|
+
CalendarComponent,
|
|
1668
|
+
MultiselectComponent,
|
|
1669
|
+
TextfieldComponent,
|
|
1670
|
+
ReactiveFormsModule,
|
|
1671
|
+
CheckboxComponent,
|
|
1672
|
+
DatasourceDirective
|
|
1673
|
+
], providers: [
|
|
1674
|
+
{
|
|
1675
|
+
provide: GENERIC_FIELD_COMPONENT_TOKEN,
|
|
1676
|
+
useExisting: GenericFieldComponent,
|
|
1677
|
+
},
|
|
1678
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (!type || type === fieldTypes.text) {\n<v-textfield\n [label]=\"label\"\n [floatLabel]=\"floatLabel === true\"\n [size]=\"size\"\n [formControl]=\"formControl\"\n/>\n} @else if (type === fieldTypes.dropdown && !datasource) {\n<v-dropdown\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [loading]=\"loading\"\n [forceMinWidth]=\"true\"\n [formControl]=\"formControl\"\n [showFilter]=\"showFilter ?? false\"\n [localSearch]=\"localSearch ?? false\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/> \n} @else if (type === fieldTypes.dropdown && datasource) {\n <v-dropdown\n useDatasource\n [forceMinWidth]=\"true\"\n [datasource]=\"datasource\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n [showFilter]=\"showFilter ?? false\"\n [filterField]=\"filterField ?? 'fulltext'\"\n [localSearch]=\"localSearch ?? false\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n />\n} @else if (type === fieldTypes.multiselect && !datasource) {\n<v-multiselect\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [options]=\"options\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/>\n} @else if (type === fieldTypes.multiselect && datasource) {\n<v-multiselect\n useDatasource\n [datasource]=\"datasource\"\n [optionLabel]=\"optionLabel\"\n [optionValue]=\"optionValue ?? optionLabel\"\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [loading]=\"loading\"\n [formControl]=\"formControl\"\n (changeEvent)=\"changed.emit($event)\"\n (clearEvent)=\"cleared.emit($event)\"\n (lazyLoadEvent)=\"lazyLoad.emit($any($event))\"\n (showEvent)=\"showed.emit($event)\"\n/>\n} @else if (type === fieldTypes.checkbox) {\n<v-checkbox\n [label]=\"label\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n [indeterminate]=\"true\"\n/>\n} @else if (type === fieldTypes.simplecheckbox) {\n<v-checkbox\n [label]=\"label\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n/>\n} @else if (type === fieldTypes.calendar) {\n<v-calendar\n [label]=\"!floatLabel ? label : ''\"\n [floatLabel]=\"floatLabel ? label : ''\"\n [testId]=\"testId\"\n [formControl]=\"formControl\"\n [icon]=\"icons.calendar\"\n/>\n}\n" }]
|
|
1679
|
+
}], propDecorators: { type: [{
|
|
1680
|
+
type: Input
|
|
1681
|
+
}], floatLabel: [{
|
|
1682
|
+
type: Input
|
|
1683
|
+
}], optionLabel: [{
|
|
1684
|
+
type: Input
|
|
1685
|
+
}], optionValue: [{
|
|
1686
|
+
type: Input
|
|
1687
|
+
}], options: [{
|
|
1688
|
+
type: Input
|
|
1689
|
+
}], size: [{
|
|
1690
|
+
type: Input
|
|
1691
|
+
}], loading: [{
|
|
1692
|
+
type: Input
|
|
1693
|
+
}], lazy: [{
|
|
1694
|
+
type: Input
|
|
1695
|
+
}], filter: [{
|
|
1696
|
+
type: Input
|
|
1697
|
+
}], datasource: [{
|
|
1698
|
+
type: Input
|
|
1699
|
+
}], filterField: [{
|
|
1700
|
+
type: Input
|
|
1701
|
+
}], showFilter: [{
|
|
1702
|
+
type: Input
|
|
1703
|
+
}], localSearch: [{
|
|
1704
|
+
type: Input
|
|
1705
|
+
}], changed: [{
|
|
1706
|
+
type: Output
|
|
1707
|
+
}], showed: [{
|
|
1708
|
+
type: Output
|
|
1709
|
+
}], cleared: [{
|
|
1710
|
+
type: Output
|
|
1711
|
+
}], lazyLoad: [{
|
|
1712
|
+
type: Output
|
|
1713
|
+
}], filtered: [{
|
|
1714
|
+
type: Output
|
|
1715
|
+
}] } });
|
|
1716
|
+
|
|
1717
|
+
function generateFormGroup(fields, lastGroupValue, inputGroup, inputGroupChanged = false) {
|
|
1718
|
+
const formGroup = (inputGroupChanged
|
|
1719
|
+
? inputGroup ?? lastGroupValue
|
|
1720
|
+
: lastGroupValue ?? inputGroup) ?? new UntypedFormGroup({});
|
|
1721
|
+
fields?.forEach((field) => {
|
|
1722
|
+
const control = formGroup.get(field.name);
|
|
1723
|
+
if (!control) {
|
|
1724
|
+
formGroup.addControl(field.name, new UntypedFormControl(field.value, field.validator));
|
|
1725
|
+
}
|
|
1726
|
+
else if (control && control.value !== field.value) {
|
|
1727
|
+
control.setValue(field.value);
|
|
1728
|
+
control.setValidators(field.validator ?? null);
|
|
1729
|
+
}
|
|
1730
|
+
else {
|
|
1731
|
+
control.setValidators(field.validator ?? null);
|
|
1732
|
+
}
|
|
1733
|
+
if (field.readonly && (control || formGroup.get(field.name))) {
|
|
1734
|
+
formGroup.get(field.name)?.disable();
|
|
1735
|
+
}
|
|
1736
|
+
});
|
|
1737
|
+
if (!inputGroupChanged) {
|
|
1738
|
+
for (const field in formGroup.controls) {
|
|
1739
|
+
const control = fields?.find((x) => x.name == field);
|
|
1740
|
+
if (!control) {
|
|
1741
|
+
formGroup.removeControl(field);
|
|
1742
|
+
}
|
|
1743
|
+
}
|
|
1744
|
+
}
|
|
1745
|
+
return formGroup;
|
|
1746
|
+
}
|
|
1747
|
+
function getColumnClass(value) {
|
|
1748
|
+
if (!value) {
|
|
1749
|
+
return undefined;
|
|
1750
|
+
}
|
|
1751
|
+
switch (value) {
|
|
1752
|
+
case 1:
|
|
1753
|
+
return 'col-12';
|
|
1754
|
+
case 2:
|
|
1755
|
+
return 'col-12 col-md-6';
|
|
1756
|
+
case 3:
|
|
1757
|
+
return 'col-12 col-md-4';
|
|
1758
|
+
case 4:
|
|
1759
|
+
return 'col-12 col-md-3';
|
|
1760
|
+
case 6:
|
|
1761
|
+
return 'col-12 col-md-2';
|
|
1762
|
+
}
|
|
1763
|
+
return 'col-12 col-md-1';
|
|
1764
|
+
}
|
|
1765
|
+
|
|
1766
|
+
class GenericFormComponent {
|
|
1767
|
+
ngOnChanges(changes) {
|
|
1768
|
+
if (changes['fields'] || changes['formGroup']) {
|
|
1769
|
+
this.formGroupComputed = generateFormGroup(this.fields, this.formGroupComputed, this.formGroup, !!changes['formGroup']);
|
|
1770
|
+
}
|
|
1771
|
+
if (changes['columns']) {
|
|
1772
|
+
this.columnClass = getColumnClass(this.columns);
|
|
1773
|
+
}
|
|
1774
|
+
}
|
|
1775
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GenericFormComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1776
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: GenericFormComponent, isStandalone: true, selector: "v-generic-form", inputs: { formGroup: "formGroup", fields: "fields", columns: "columns", showAsRow: "showAsRow" }, usesOnChanges: true, ngImport: i0, template: "@if (formGroupComputed) {\r\n <div\r\n class=\"v-generic-form\"\r\n [ngClass]=\"showAsRow ? 'd-flex flex-row' : 'row'\"\r\n [formGroup]=\"formGroupComputed\"\r\n >\r\n @for(field of fields; track field) { @if (columnClass) {\r\n <div class=\"v-generic-form__column {{ columnClass }}\">\r\n <v-generic-field\r\n [type]=\"field.type\"\r\n [label]=\"field.label ?? 'NOT SET' | translate\"\r\n [floatLabel]=\"field.floatLabel\"\r\n [testId]=\"field.testId\"\r\n [options]=\"field.options\"\r\n [optionLabel]=\"field.optionLabel\"\r\n [optionValue]=\"field.optionValue ?? field.optionLabel\"\r\n [options]=\"field.options\"\r\n [size]=\"field.size\"\r\n [formControlName]=\"field.name\"\r\n [datasource]=\"field.datasource\"\r\n [showFilter]=\"field.showFilter\"\r\n [filterField]=\"field.filterField\"\r\n [localSearch]=\"field.localSearch\"\r\n ></v-generic-field>\r\n </div>\r\n } @else {\r\n <v-generic-field\r\n class=\"me-4\"\r\n [type]=\"field.type\"\r\n [label]=\"field.label ?? 'NOT SET' | translate\"\r\n [floatLabel]=\"field.floatLabel\"\r\n [testId]=\"field.testId\"\r\n [options]=\"field.options\"\r\n [optionLabel]=\"field.optionLabel\"\r\n [optionValue]=\"field.optionValue ?? field.optionLabel\"\r\n [options]=\"field.options\"\r\n [size]=\"field.size\"\r\n [formControlName]=\"field.name\"\r\n [datasource]=\"field.datasource\"\r\n [showFilter]=\"field.showFilter\"\r\n [filterField]=\"field.filterField\"\r\n [localSearch]=\"field.localSearch\"\r\n ></v-generic-field>\r\n } }\r\n </div>\r\n }\r\n", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: GenericFieldComponent, selector: "v-generic-field", inputs: ["type", "floatLabel", "optionLabel", "optionValue", "options", "size", "loading", "lazy", "filter", "datasource", "filterField", "showFilter", "localSearch"], outputs: ["changed", "showed", "cleared", "lazyLoad", "filtered"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1777
|
+
}
|
|
1778
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: GenericFormComponent, decorators: [{
|
|
1779
|
+
type: Component,
|
|
1780
|
+
args: [{ selector: 'v-generic-form', imports: [
|
|
1781
|
+
CommonModule,
|
|
1782
|
+
GenericFieldComponent,
|
|
1783
|
+
ReactiveFormsModule,
|
|
1784
|
+
TranslateModule,
|
|
1785
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "@if (formGroupComputed) {\r\n <div\r\n class=\"v-generic-form\"\r\n [ngClass]=\"showAsRow ? 'd-flex flex-row' : 'row'\"\r\n [formGroup]=\"formGroupComputed\"\r\n >\r\n @for(field of fields; track field) { @if (columnClass) {\r\n <div class=\"v-generic-form__column {{ columnClass }}\">\r\n <v-generic-field\r\n [type]=\"field.type\"\r\n [label]=\"field.label ?? 'NOT SET' | translate\"\r\n [floatLabel]=\"field.floatLabel\"\r\n [testId]=\"field.testId\"\r\n [options]=\"field.options\"\r\n [optionLabel]=\"field.optionLabel\"\r\n [optionValue]=\"field.optionValue ?? field.optionLabel\"\r\n [options]=\"field.options\"\r\n [size]=\"field.size\"\r\n [formControlName]=\"field.name\"\r\n [datasource]=\"field.datasource\"\r\n [showFilter]=\"field.showFilter\"\r\n [filterField]=\"field.filterField\"\r\n [localSearch]=\"field.localSearch\"\r\n ></v-generic-field>\r\n </div>\r\n } @else {\r\n <v-generic-field\r\n class=\"me-4\"\r\n [type]=\"field.type\"\r\n [label]=\"field.label ?? 'NOT SET' | translate\"\r\n [floatLabel]=\"field.floatLabel\"\r\n [testId]=\"field.testId\"\r\n [options]=\"field.options\"\r\n [optionLabel]=\"field.optionLabel\"\r\n [optionValue]=\"field.optionValue ?? field.optionLabel\"\r\n [options]=\"field.options\"\r\n [size]=\"field.size\"\r\n [formControlName]=\"field.name\"\r\n [datasource]=\"field.datasource\"\r\n [showFilter]=\"field.showFilter\"\r\n [filterField]=\"field.filterField\"\r\n [localSearch]=\"field.localSearch\"\r\n ></v-generic-field>\r\n } }\r\n </div>\r\n }\r\n" }]
|
|
1786
|
+
}], propDecorators: { formGroup: [{
|
|
1787
|
+
type: Input
|
|
1788
|
+
}], fields: [{
|
|
1789
|
+
type: Input
|
|
1790
|
+
}], columns: [{
|
|
1791
|
+
type: Input
|
|
1792
|
+
}], showAsRow: [{
|
|
1793
|
+
type: Input
|
|
1794
|
+
}] } });
|
|
1795
|
+
|
|
1796
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
1797
|
+
class DynamicComponentFactoryService {
|
|
1798
|
+
constructor(componentFactoryResolver) {
|
|
1799
|
+
this.componentFactoryResolver = componentFactoryResolver;
|
|
1800
|
+
}
|
|
1801
|
+
ngOnDestroy() {
|
|
1802
|
+
this.unsubscribeComponentEvents(this);
|
|
1803
|
+
}
|
|
1804
|
+
async createDynamicComponent(componentType, viewContainerRef, inputs, injector = undefined) {
|
|
1805
|
+
const componentFactory = this.componentFactoryResolver.resolveComponentFactory(componentType);
|
|
1806
|
+
viewContainerRef.clear();
|
|
1807
|
+
const component = viewContainerRef.createComponent(componentFactory, undefined, injector);
|
|
1808
|
+
this.setComponentDataInt(componentFactory, component, inputs);
|
|
1809
|
+
this.fireComponentEvents(component.instance, inputs);
|
|
1810
|
+
return component;
|
|
1811
|
+
}
|
|
1812
|
+
setComponentData(component, inputs) {
|
|
1813
|
+
const factory = this.componentFactoryResolver.resolveComponentFactory(component.componentType);
|
|
1814
|
+
this.setComponentDataInt(factory, component, inputs);
|
|
1815
|
+
}
|
|
1816
|
+
unsubscribeComponentEvents(instance) {
|
|
1817
|
+
const subscriptionStoreKey = '__outputSubscriptions__';
|
|
1818
|
+
const subscriptions = instance[subscriptionStoreKey];
|
|
1819
|
+
if (subscriptions) {
|
|
1820
|
+
subscriptions.forEach((sub) => sub.unsubscribe());
|
|
1821
|
+
subscriptions.clear();
|
|
1822
|
+
}
|
|
1823
|
+
}
|
|
1824
|
+
fireComponentEvents(instance, inputs) {
|
|
1825
|
+
if (!instance || typeof instance !== 'object')
|
|
1826
|
+
return;
|
|
1827
|
+
this.fireInputComponentEvents(instance, inputs);
|
|
1828
|
+
this.fireOutputComponentEvents(instance, inputs);
|
|
1829
|
+
}
|
|
1830
|
+
setComponentDataInt(factory, component, inputs) {
|
|
1831
|
+
if (inputs) {
|
|
1832
|
+
const propertyNames = factory.inputs.map((x) => x.propName);
|
|
1833
|
+
const inputsHash = new Set(propertyNames);
|
|
1834
|
+
Object.keys(inputs)
|
|
1835
|
+
.filter((x) => inputsHash.has(x))
|
|
1836
|
+
.forEach((x) => {
|
|
1837
|
+
component.instance[x] = inputs[x];
|
|
1838
|
+
});
|
|
1839
|
+
}
|
|
1840
|
+
}
|
|
1841
|
+
fireInputComponentEvents(instance, inputs) {
|
|
1842
|
+
const onChangeComponent = instance;
|
|
1843
|
+
if (onChangeComponent.ngOnChanges && inputs) {
|
|
1844
|
+
const changeEventArgs = Object.keys(inputs).reduce((changes, key) => {
|
|
1845
|
+
const inputValue = inputs[key];
|
|
1846
|
+
changes[key] = new SimpleChange(undefined, inputValue, true);
|
|
1847
|
+
return changes;
|
|
1848
|
+
}, {});
|
|
1849
|
+
onChangeComponent.ngOnChanges(changeEventArgs);
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
fireOutputComponentEvents(instance, inputs) {
|
|
1853
|
+
const outputs = Object.keys(inputs).filter((key) => {
|
|
1854
|
+
const emitter = instance[key];
|
|
1855
|
+
return emitter instanceof EventEmitter;
|
|
1856
|
+
});
|
|
1857
|
+
const subscriptionStoreKey = '__outputSubscriptions__';
|
|
1858
|
+
if (!(subscriptionStoreKey in instance)) {
|
|
1859
|
+
instance[subscriptionStoreKey] = new Map();
|
|
1860
|
+
}
|
|
1861
|
+
const subscriptions = instance[subscriptionStoreKey];
|
|
1862
|
+
for (const outputKey of outputs) {
|
|
1863
|
+
const eventEmitter = instance[outputKey];
|
|
1864
|
+
const callback = inputs[outputKey];
|
|
1865
|
+
if (eventEmitter && typeof callback === 'function') {
|
|
1866
|
+
if (subscriptions.has(outputKey)) {
|
|
1867
|
+
subscriptions.get(outputKey).unsubscribe();
|
|
1868
|
+
}
|
|
1869
|
+
const subscription = eventEmitter.subscribe((value) => callback(value));
|
|
1870
|
+
subscriptions.set(outputKey, subscription);
|
|
1871
|
+
}
|
|
1872
|
+
}
|
|
1873
|
+
}
|
|
1874
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponentFactoryService, deps: [{ token: i0.ComponentFactoryResolver }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
1875
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponentFactoryService, providedIn: 'root' }); }
|
|
1876
|
+
}
|
|
1877
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponentFactoryService, decorators: [{
|
|
1878
|
+
type: Injectable,
|
|
1879
|
+
args: [{
|
|
1880
|
+
providedIn: 'root',
|
|
1881
|
+
}]
|
|
1882
|
+
}], ctorParameters: () => [{ type: i0.ComponentFactoryResolver }] });
|
|
1883
|
+
|
|
1884
|
+
class DynamicComponent {
|
|
1885
|
+
constructor() {
|
|
1886
|
+
this.factoryServices = inject(DynamicComponentFactoryService);
|
|
1887
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
1888
|
+
this.injector = inject(Injector);
|
|
1889
|
+
}
|
|
1890
|
+
ngOnChanges() {
|
|
1891
|
+
this.createComponent();
|
|
1892
|
+
}
|
|
1893
|
+
ngAfterViewInit() {
|
|
1894
|
+
this.createComponent();
|
|
1895
|
+
this.changeDetectorRef.detectChanges();
|
|
1896
|
+
}
|
|
1897
|
+
createComponent() {
|
|
1898
|
+
if (this.container) {
|
|
1899
|
+
this.factoryServices.createDynamicComponent(this.componentType, this.container, this.data, this.injector);
|
|
1900
|
+
}
|
|
1901
|
+
}
|
|
1902
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1903
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: DynamicComponent, isStandalone: true, selector: "v-dynamic-component", inputs: { componentType: "componentType", data: "data" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["dynamicContainer"], descendants: true, read: ViewContainerRef, static: true }], usesOnChanges: true, ngImport: i0, template: `<ng-container #dynamicContainer></ng-container>`, isInline: true, changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1904
|
+
}
|
|
1905
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: DynamicComponent, decorators: [{
|
|
1906
|
+
type: Component,
|
|
1907
|
+
args: [{
|
|
1908
|
+
selector: 'v-dynamic-component',
|
|
1909
|
+
standalone: true,
|
|
1910
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
1911
|
+
template: `<ng-container #dynamicContainer></ng-container>`,
|
|
1912
|
+
}]
|
|
1913
|
+
}], propDecorators: { componentType: [{
|
|
1914
|
+
type: Input
|
|
1915
|
+
}], data: [{
|
|
1916
|
+
type: Input
|
|
1917
|
+
}], container: [{
|
|
1918
|
+
type: ViewChild,
|
|
1919
|
+
args: ['dynamicContainer', { read: ViewContainerRef, static: true }]
|
|
1920
|
+
}] } });
|
|
1921
|
+
|
|
1922
|
+
class PageHeaderComponent extends PageHeaderCoreComponent {
|
|
1923
|
+
constructor() {
|
|
1924
|
+
super(...arguments);
|
|
1925
|
+
this.icons = Icons;
|
|
1926
|
+
}
|
|
1927
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
1928
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: PageHeaderComponent, isStandalone: true, selector: "v-page-header", providers: [
|
|
1929
|
+
{ provide: PAGE_HEADER_COMPONENT_TOKEN, useExisting: PageHeaderComponent },
|
|
1930
|
+
], queries: [{ propertyName: "buttonGroup", first: true, predicate: ActionButtonGroupComponent, descendants: true }], usesInheritance: true, ngImport: i0, template: "<div\n class=\"v-page-header d-block d-md-flex px-3 w-100 gap-0 gap-md-4 align-items-center text-center text-md-start\"\n >\n @if (showBackButton) {\n <v-button\n size=\"small\"\n [icon]=\"icons.arrowLeft\"\n label=\"Back\"\n [outlined]=\"true\"\n (click)=\"locationBack()\"\n ></v-button>\n }\n <div\n class=\"align-items-center justify-content-center justify-content-md-start gap-2 w-100 d-flex\"\n >\n <h1 class=\"text-primary m-0\" [innerText]=\"title\"></h1>\n @if (subtitle) {\n <div\n class=\"d-flex gap-2 align-items-center text-center text-md-start\"\n >\n <h1 class=\"text-default m-0\" [innerText]=\"'-'\"></h1>\n <h1 class=\"text-default\" [innerText]=\"subtitle\"></h1>\n </div>\n }\n </div>\n <div\n class=\"align-content-center page-header-action-buttons justify-content-center w-100\"\n >\n @if (buttonGroup) {\n <div>\n <ng-content [select]=\"buttonGroup\"></ng-content>\n </div>\n }\n </div>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "severity", "routerLink", "size", "queryParams"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1931
|
+
}
|
|
1932
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: PageHeaderComponent, decorators: [{
|
|
1933
|
+
type: Component,
|
|
1934
|
+
args: [{ selector: 'v-page-header', imports: [ButtonComponent], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1935
|
+
{ provide: PAGE_HEADER_COMPONENT_TOKEN, useExisting: PageHeaderComponent },
|
|
1936
|
+
], template: "<div\n class=\"v-page-header d-block d-md-flex px-3 w-100 gap-0 gap-md-4 align-items-center text-center text-md-start\"\n >\n @if (showBackButton) {\n <v-button\n size=\"small\"\n [icon]=\"icons.arrowLeft\"\n label=\"Back\"\n [outlined]=\"true\"\n (click)=\"locationBack()\"\n ></v-button>\n }\n <div\n class=\"align-items-center justify-content-center justify-content-md-start gap-2 w-100 d-flex\"\n >\n <h1 class=\"text-primary m-0\" [innerText]=\"title\"></h1>\n @if (subtitle) {\n <div\n class=\"d-flex gap-2 align-items-center text-center text-md-start\"\n >\n <h1 class=\"text-default m-0\" [innerText]=\"'-'\"></h1>\n <h1 class=\"text-default\" [innerText]=\"subtitle\"></h1>\n </div>\n }\n </div>\n <div\n class=\"align-content-center page-header-action-buttons justify-content-center w-100\"\n >\n @if (buttonGroup) {\n <div>\n <ng-content [select]=\"buttonGroup\"></ng-content>\n </div>\n }\n </div>\n</div>\n" }]
|
|
1937
|
+
}], propDecorators: { buttonGroup: [{
|
|
1938
|
+
type: ContentChild,
|
|
1939
|
+
args: [ActionButtonGroupComponent]
|
|
1940
|
+
}] } });
|
|
1941
|
+
|
|
1942
|
+
class StepperComponent {
|
|
1943
|
+
constructor() {
|
|
1944
|
+
this.icons = Icons;
|
|
1945
|
+
this.size = FieldSize.medium;
|
|
1946
|
+
this.layout = LayoutType.horizontal;
|
|
1947
|
+
this.activeIndex = 0;
|
|
1948
|
+
this.activeIndexChange = new EventEmitter();
|
|
1949
|
+
}
|
|
1950
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: StepperComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1951
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: StepperComponent, isStandalone: true, selector: "v-stepper", inputs: { items: "items", prefix: "prefix", label: "label", size: "size", layout: "layout", icon: "icon", activeIndex: "activeIndex", annotation: "annotation" }, outputs: { activeIndexChange: "activeIndexChange" }, providers: [
|
|
1952
|
+
{ provide: STEPPER_COMPONENT_TOKEN, useExisting: StepperComponent },
|
|
1953
|
+
], ngImport: i0, template: "<div class=\"v-stepper\">\n <p-stepper>\n <p-step-list>\n @for(item of items; track item; let idx = $index) {\n <p-step [value]=\"idx\">{{ item.header }}</p-step>\n }\n </p-step-list>\n <p-step-panels>\n @for(item of items; track item; let idx = $index) {\n <p-step-panel [value]=\"idx\">\n <ng-template pTemplate=\"content\" let-nextCallback=\"nextCallback\" let-prevCallback=\"prevCallback\"\n let-index=\"index\">\n @if (item.template && item.template.elementRef) {\n <ng-template *ngTemplateOutlet=\"\n item.template;\n context: { item: item, index: index }\n \" />\n }\n <div class=\"d-flex pt-4 justify-content-between\">\n @if (index > 0) {\n <v-button label=\"Back\" [icon]=\"icons.arrowLeft\" size=\"small\" [outlined]=\"true\"\n (click)=\"prevCallback.emit()\" />\n }\n\n @if (index < items.length - 1) {\n <v-button label=\"Next\" size=\"small\" [icon]=\"icons.arrowRight\"\n iconPos=\"right\" (click)=\"nextCallback.emit()\" />\n }\n </div>\n </ng-template>\n </p-step-panel>\n }\n </p-step-panels>\n </p-stepper>\n</div>", dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "severity", "routerLink", "size", "queryParams"] }, { kind: "ngmodule", type: StepperModule }, { kind: "component", type: i2$9.Stepper, selector: "p-stepper", inputs: ["value", "linear", "transitionOptions"], outputs: ["valueChange"] }, { kind: "component", type: i2$9.StepList, selector: "p-step-list" }, { kind: "component", type: i2$9.StepPanels, selector: "p-step-panels" }, { kind: "component", type: i2$9.StepPanel, selector: "p-step-panel", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: i2$9.Step, selector: "p-step", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "directive", type: i1$6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1954
|
+
}
|
|
1955
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: StepperComponent, decorators: [{
|
|
1956
|
+
type: Component,
|
|
1957
|
+
args: [{ selector: 'v-stepper', imports: [CommonModule, ButtonComponent, StepperModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
1958
|
+
{ provide: STEPPER_COMPONENT_TOKEN, useExisting: StepperComponent },
|
|
1959
|
+
], template: "<div class=\"v-stepper\">\n <p-stepper>\n <p-step-list>\n @for(item of items; track item; let idx = $index) {\n <p-step [value]=\"idx\">{{ item.header }}</p-step>\n }\n </p-step-list>\n <p-step-panels>\n @for(item of items; track item; let idx = $index) {\n <p-step-panel [value]=\"idx\">\n <ng-template pTemplate=\"content\" let-nextCallback=\"nextCallback\" let-prevCallback=\"prevCallback\"\n let-index=\"index\">\n @if (item.template && item.template.elementRef) {\n <ng-template *ngTemplateOutlet=\"\n item.template;\n context: { item: item, index: index }\n \" />\n }\n <div class=\"d-flex pt-4 justify-content-between\">\n @if (index > 0) {\n <v-button label=\"Back\" [icon]=\"icons.arrowLeft\" size=\"small\" [outlined]=\"true\"\n (click)=\"prevCallback.emit()\" />\n }\n\n @if (index < items.length - 1) {\n <v-button label=\"Next\" size=\"small\" [icon]=\"icons.arrowRight\"\n iconPos=\"right\" (click)=\"nextCallback.emit()\" />\n }\n </div>\n </ng-template>\n </p-step-panel>\n }\n </p-step-panels>\n </p-stepper>\n</div>" }]
|
|
1960
|
+
}], propDecorators: { items: [{
|
|
1961
|
+
type: Input
|
|
1962
|
+
}], prefix: [{
|
|
1963
|
+
type: Input
|
|
1964
|
+
}], label: [{
|
|
1965
|
+
type: Input
|
|
1966
|
+
}], size: [{
|
|
1967
|
+
type: Input
|
|
1968
|
+
}], layout: [{
|
|
1969
|
+
type: Input
|
|
1970
|
+
}], icon: [{
|
|
1971
|
+
type: Input
|
|
1972
|
+
}], activeIndex: [{
|
|
1973
|
+
type: Input
|
|
1974
|
+
}], annotation: [{
|
|
1975
|
+
type: Input
|
|
1976
|
+
}], activeIndexChange: [{
|
|
1977
|
+
type: Output
|
|
1978
|
+
}] } });
|
|
1979
|
+
|
|
1980
|
+
class SliderComponent extends BaseFormInputComponent {
|
|
1981
|
+
constructor(ngControl) {
|
|
1982
|
+
super(ngControl);
|
|
1983
|
+
this.step = 1;
|
|
1984
|
+
this.min = 0;
|
|
1985
|
+
this.max = 100;
|
|
1986
|
+
this.range = false;
|
|
1987
|
+
}
|
|
1988
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SliderComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1989
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: SliderComponent, isStandalone: true, selector: "v-slider", inputs: { step: "step", min: "min", max: "max", range: "range" }, providers: [
|
|
1990
|
+
{
|
|
1991
|
+
provide: BaseInputControls,
|
|
1992
|
+
useExisting: forwardRef(() => SliderComponent),
|
|
1993
|
+
},
|
|
1994
|
+
{
|
|
1995
|
+
provide: SLIDER_COMPONENT_TOKEN,
|
|
1996
|
+
useExisting: SliderComponent,
|
|
1997
|
+
},
|
|
1998
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-slider\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n >\n <p-slider\n class=\"w-100\"\n [formControl]=\"formControl\"\n [step]=\"step\"\n [range]=\"range\"\n [min]=\"min\"\n [max]=\"max\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>", dependencies: [{ kind: "ngmodule", type: SliderModule }, { kind: "component", type: i2$a.Slider, selector: "p-slider", inputs: ["animate", "min", "max", "orientation", "step", "range", "styleClass", "ariaLabel", "ariaLabelledBy", "tabindex", "autofocus"], outputs: ["onChange", "onSlideEnd"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
1999
|
+
}
|
|
2000
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SliderComponent, decorators: [{
|
|
2001
|
+
type: Component,
|
|
2002
|
+
args: [{ selector: 'v-slider', imports: [
|
|
2003
|
+
SliderModule,
|
|
2004
|
+
ReactiveFormsModule,
|
|
2005
|
+
FormFieldComponent,
|
|
2006
|
+
ErrorComponent
|
|
2007
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2008
|
+
{
|
|
2009
|
+
provide: BaseInputControls,
|
|
2010
|
+
useExisting: forwardRef(() => SliderComponent),
|
|
2011
|
+
},
|
|
2012
|
+
{
|
|
2013
|
+
provide: SLIDER_COMPONENT_TOKEN,
|
|
2014
|
+
useExisting: SliderComponent,
|
|
2015
|
+
},
|
|
2016
|
+
], template: "<div class=\"v-slider\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n >\n <p-slider\n class=\"w-100\"\n [formControl]=\"formControl\"\n [step]=\"step\"\n [range]=\"range\"\n [min]=\"min\"\n [max]=\"max\"\n />\n <v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>" }]
|
|
2017
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2018
|
+
type: Optional
|
|
2019
|
+
}, {
|
|
2020
|
+
type: Self
|
|
2021
|
+
}] }], propDecorators: { step: [{
|
|
2022
|
+
type: Input
|
|
2023
|
+
}], min: [{
|
|
2024
|
+
type: Input
|
|
2025
|
+
}], max: [{
|
|
2026
|
+
type: Input
|
|
2027
|
+
}], range: [{
|
|
2028
|
+
type: Input
|
|
2029
|
+
}] } });
|
|
2030
|
+
|
|
2031
|
+
class ConfirmDialogComponent extends UnsubscribeComponent {
|
|
2032
|
+
constructor(dialogService, cdr) {
|
|
2033
|
+
super();
|
|
2034
|
+
this.dialogService = dialogService;
|
|
2035
|
+
this.cdr = cdr;
|
|
2036
|
+
this.visible = false;
|
|
2037
|
+
this.closable = false;
|
|
2038
|
+
}
|
|
2039
|
+
ngOnInit() {
|
|
2040
|
+
this.dialogService.showEvent
|
|
2041
|
+
.pipe(takeUntil(this.destroyed$))
|
|
2042
|
+
.subscribe((x) => {
|
|
2043
|
+
this.data = x;
|
|
2044
|
+
this.visible = true;
|
|
2045
|
+
this.cdr.detectChanges();
|
|
2046
|
+
});
|
|
2047
|
+
}
|
|
2048
|
+
dialogClick(confirm) {
|
|
2049
|
+
const { confirmButtonFn, cancelButtonFn } = this.data;
|
|
2050
|
+
if (confirm && confirmButtonFn) {
|
|
2051
|
+
confirmButtonFn();
|
|
2052
|
+
}
|
|
2053
|
+
if (!confirm && cancelButtonFn) {
|
|
2054
|
+
cancelButtonFn();
|
|
2055
|
+
}
|
|
2056
|
+
this.visible = false;
|
|
2057
|
+
this.cdr.detectChanges();
|
|
2058
|
+
}
|
|
2059
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ConfirmDialogComponent, deps: [{ token: i1$4.DialogService }, { token: i0.ChangeDetectorRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2060
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: ConfirmDialogComponent, isStandalone: true, selector: "v-confirm-dialog", providers: [
|
|
2061
|
+
{
|
|
2062
|
+
provide: CONFIRM_DIALOG_COMPONENT_TOKEN,
|
|
2063
|
+
useExisting: ConfirmDialogComponent,
|
|
2064
|
+
},
|
|
2065
|
+
], usesInheritance: true, ngImport: i0, template: "@if (data) {\n <div class=\"v-dialog d-flex justify-content-center\">\n <p-dialog\n [(visible)]=\"visible\"\n [modal]=\"true\"\n [closable]=\"closable\"\n [style]=\"{ width: '25rem' }\"\n >\n <ng-template pTemplate=\"header\">\n <div\n class=\"v-dialog-header w-100 align-items-center d-flex justify-content-center\"\n >\n <h1 class=\"text-center me-3\">{{ data.title }}</h1>\n <i class=\"{{ data.headerIcon }} text-{{ data.severity }}\"></i>\n </div>\n </ng-template>\n <div class=\"v-dialog-content w-100 align-items-center text-center\">\n @if (data.innerHTML) {\n <div [innerHTML]=\"data.innerHTML\"></div>\n } @else if (data.componentType) {\n <v-dynamic-component\n [componentType]=\"data.componentType\"\n [data]=\"$any(data.data)\"\n ></v-dynamic-component>\n }\n </div>\n <ng-template pTemplate=\"footer\">\n <div\n class=\"v-dialog-footer d-flex justify-content-center w-100 gap-3\"\n [ngClass]=\"{\n 'flex-row-reverse': data.buttonOrder === 'cancel-confirm'\n }\"\n >\n <v-button\n [label]=\"data.confirmButtonText ?? 'Yes'\"\n [severity]=\"data.severity\"\n (click)=\"data.confirmButtonFn ? dialogClick(true) : (visible = false)\"\n />\n @if (data.showCancelButton && data.severity !== 'success') {\n <v-button\n [label]=\"data.cancelButtonText ?? 'No'\"\n [outlined]=\"true\"\n [severity]=\"'secondary'\"\n (click)=\"data.cancelButtonFn ? dialogClick(false) : (visible = false)\"\n />\n }\n </div>\n </ng-template>\n </p-dialog>\n </div>\n}\n", styles: [".v-dialog-content *{line-height:1.5rem}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: DialogModule }, { kind: "component", type: i3$6.Dialog, selector: "p-dialog", inputs: ["header", "draggable", "resizable", "contentStyle", "contentStyleClass", "modal", "closeOnEscape", "dismissableMask", "rtl", "closable", "breakpoints", "styleClass", "maskStyleClass", "maskStyle", "showHeader", "blockScroll", "autoZIndex", "baseZIndex", "minX", "minY", "focusOnShow", "maximizable", "keepInViewport", "focusTrap", "transitionOptions", "closeIcon", "closeAriaLabel", "closeTabindex", "minimizeIcon", "maximizeIcon", "closeButtonProps", "maximizeButtonProps", "visible", "style", "position", "role", "appendTo", "content", "contentTemplate", "footerTemplate", "closeIconTemplate", "maximizeIconTemplate", "minimizeIconTemplate", "headlessTemplate"], outputs: ["onShow", "onHide", "visibleChange", "onResizeInit", "onResizeEnd", "onDragEnd", "onMaximize"] }, { kind: "directive", type: i1$6.PrimeTemplate, selector: "[pTemplate]", inputs: ["type", "pTemplate"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "severity", "routerLink", "size", "queryParams"] }, { kind: "ngmodule", type: AvatarModule }, { kind: "component", type: DynamicComponent, selector: "v-dynamic-component", inputs: ["componentType", "data"] }] }); }
|
|
2066
|
+
}
|
|
2067
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: ConfirmDialogComponent, decorators: [{
|
|
2068
|
+
type: Component,
|
|
2069
|
+
args: [{ selector: 'v-confirm-dialog', imports: [
|
|
2070
|
+
CommonModule,
|
|
2071
|
+
DialogModule,
|
|
2072
|
+
ButtonComponent,
|
|
2073
|
+
AvatarModule,
|
|
2074
|
+
DynamicComponent,
|
|
2075
|
+
], providers: [
|
|
2076
|
+
{
|
|
2077
|
+
provide: CONFIRM_DIALOG_COMPONENT_TOKEN,
|
|
2078
|
+
useExisting: ConfirmDialogComponent,
|
|
2079
|
+
},
|
|
2080
|
+
], template: "@if (data) {\n <div class=\"v-dialog d-flex justify-content-center\">\n <p-dialog\n [(visible)]=\"visible\"\n [modal]=\"true\"\n [closable]=\"closable\"\n [style]=\"{ width: '25rem' }\"\n >\n <ng-template pTemplate=\"header\">\n <div\n class=\"v-dialog-header w-100 align-items-center d-flex justify-content-center\"\n >\n <h1 class=\"text-center me-3\">{{ data.title }}</h1>\n <i class=\"{{ data.headerIcon }} text-{{ data.severity }}\"></i>\n </div>\n </ng-template>\n <div class=\"v-dialog-content w-100 align-items-center text-center\">\n @if (data.innerHTML) {\n <div [innerHTML]=\"data.innerHTML\"></div>\n } @else if (data.componentType) {\n <v-dynamic-component\n [componentType]=\"data.componentType\"\n [data]=\"$any(data.data)\"\n ></v-dynamic-component>\n }\n </div>\n <ng-template pTemplate=\"footer\">\n <div\n class=\"v-dialog-footer d-flex justify-content-center w-100 gap-3\"\n [ngClass]=\"{\n 'flex-row-reverse': data.buttonOrder === 'cancel-confirm'\n }\"\n >\n <v-button\n [label]=\"data.confirmButtonText ?? 'Yes'\"\n [severity]=\"data.severity\"\n (click)=\"data.confirmButtonFn ? dialogClick(true) : (visible = false)\"\n />\n @if (data.showCancelButton && data.severity !== 'success') {\n <v-button\n [label]=\"data.cancelButtonText ?? 'No'\"\n [outlined]=\"true\"\n [severity]=\"'secondary'\"\n (click)=\"data.cancelButtonFn ? dialogClick(false) : (visible = false)\"\n />\n }\n </div>\n </ng-template>\n </p-dialog>\n </div>\n}\n", styles: [".v-dialog-content *{line-height:1.5rem}\n"] }]
|
|
2081
|
+
}], ctorParameters: () => [{ type: i1$4.DialogService }, { type: i0.ChangeDetectorRef }] });
|
|
2082
|
+
|
|
2083
|
+
class SwitchComponent extends BaseFormInputComponent {
|
|
2084
|
+
constructor(ngControl) {
|
|
2085
|
+
super(ngControl);
|
|
2086
|
+
this.id = v4();
|
|
2087
|
+
}
|
|
2088
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SwitchComponent, deps: [{ token: i1.NgControl, optional: true, self: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2089
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: SwitchComponent, isStandalone: true, selector: "v-switch", providers: [
|
|
2090
|
+
{
|
|
2091
|
+
provide: BaseInputControls,
|
|
2092
|
+
useExisting: forwardRef(() => SwitchComponent),
|
|
2093
|
+
multi: true,
|
|
2094
|
+
},
|
|
2095
|
+
{
|
|
2096
|
+
provide: SWITCH_COMPONENT_TOKEN,
|
|
2097
|
+
useExisting: SwitchComponent,
|
|
2098
|
+
},
|
|
2099
|
+
], usesInheritance: true, ngImport: i0, template: "<div class=\"v-switch d-flex align-items-center\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-toggle-switch\n [formControl]=\"formControl\"\n [required]=\"isRequired()\"\n [title]=\"label\"\n [readonly]=\"readonly\"\n [inputId]=\"id\"\n /><v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>\n", styles: [""], dependencies: [{ kind: "component", type: ToggleSwitch, selector: "p-toggleswitch, p-toggleSwitch, p-toggle-switch", inputs: ["styleClass", "tabindex", "inputId", "readonly", "trueValue", "falseValue", "ariaLabel", "size", "ariaLabelledBy", "autofocus"], outputs: ["onChange"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.RequiredValidator, selector: ":not([type=checkbox])[required][formControlName],:not([type=checkbox])[required][formControl],:not([type=checkbox])[required][ngModel]", inputs: ["required"] }, { kind: "directive", type: i1.FormControlDirective, selector: "[formControl]", inputs: ["formControl", "disabled", "ngModel"], outputs: ["ngModelChange"], exportAs: ["ngForm"] }, { kind: "component", type: FormFieldComponent, selector: "v-form-field", inputs: ["display", "variant"] }, { kind: "component", type: ErrorComponent, selector: "v-validation-message", inputs: ["ngControl", "errorSlot", "messageSlot", "variant", "severity"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2100
|
+
}
|
|
2101
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: SwitchComponent, decorators: [{
|
|
2102
|
+
type: Component,
|
|
2103
|
+
args: [{ selector: 'v-switch', imports: [
|
|
2104
|
+
ToggleSwitch,
|
|
2105
|
+
ReactiveFormsModule,
|
|
2106
|
+
FormFieldComponent,
|
|
2107
|
+
ErrorComponent
|
|
2108
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2109
|
+
{
|
|
2110
|
+
provide: BaseInputControls,
|
|
2111
|
+
useExisting: forwardRef(() => SwitchComponent),
|
|
2112
|
+
multi: true,
|
|
2113
|
+
},
|
|
2114
|
+
{
|
|
2115
|
+
provide: SWITCH_COMPONENT_TOKEN,
|
|
2116
|
+
useExisting: SwitchComponent,
|
|
2117
|
+
},
|
|
2118
|
+
], template: "<div class=\"v-switch d-flex align-items-center\">\n <v-form-field\n class=\"w-100\"\n [label]=\"label\"\n [tooltip]=\"tooltip\"\n [required]=\"isRequired()\"\n [testId]=\"testId\"\n [display]=\"formDisplay\"\n >\n <p-toggle-switch\n [formControl]=\"formControl\"\n [required]=\"isRequired()\"\n [title]=\"label\"\n [readonly]=\"readonly\"\n [inputId]=\"id\"\n /><v-validation-message [ngControl]=\"ngControl\"></v-validation-message>\n </v-form-field>\n</div>\n" }]
|
|
2119
|
+
}], ctorParameters: () => [{ type: i1.NgControl, decorators: [{
|
|
2120
|
+
type: Optional
|
|
2121
|
+
}, {
|
|
2122
|
+
type: Self
|
|
2123
|
+
}] }] });
|
|
2124
|
+
|
|
2125
|
+
class HttpErrorMessageInterceptor {
|
|
2126
|
+
constructor(snackbarService) {
|
|
2127
|
+
this.snackbarService = snackbarService;
|
|
2128
|
+
}
|
|
2129
|
+
intercept(req, next) {
|
|
2130
|
+
return next.handle(req).pipe(catchError((errorResponse) => {
|
|
2131
|
+
if (!errorResponse.ok) {
|
|
2132
|
+
if (errorResponse.status === 403) {
|
|
2133
|
+
this.snackbarService.showError('Unauthorized request');
|
|
2134
|
+
console.error('Unauthorized request');
|
|
2135
|
+
}
|
|
2136
|
+
else {
|
|
2137
|
+
this.snackbarService.showError(errorResponse.message);
|
|
2138
|
+
console.error(errorResponse);
|
|
2139
|
+
}
|
|
2140
|
+
}
|
|
2141
|
+
return throwError(() => errorResponse);
|
|
2142
|
+
}));
|
|
2143
|
+
}
|
|
2144
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HttpErrorMessageInterceptor, deps: [{ token: SnackbarService }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2145
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HttpErrorMessageInterceptor }); }
|
|
2146
|
+
}
|
|
2147
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: HttpErrorMessageInterceptor, decorators: [{
|
|
2148
|
+
type: Injectable
|
|
2149
|
+
}], ctorParameters: () => [{ type: SnackbarService }] });
|
|
2150
|
+
|
|
2151
|
+
class TabViewItemComponent {
|
|
2152
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TabViewItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2153
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: TabViewItemComponent, isStandalone: true, selector: "v-tab-view-item", inputs: { title: "title", url: "url", icon: "icon", disabled: "disabled", content: "content" }, viewQueries: [{ propertyName: "contentTemplate", first: true, predicate: ["contentTemplate"], descendants: true, static: true }], ngImport: i0, template: `<ng-template #contentTemplate>
|
|
2154
|
+
<ng-content></ng-content>
|
|
2155
|
+
</ng-template>`, isInline: true }); }
|
|
2156
|
+
}
|
|
2157
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TabViewItemComponent, decorators: [{
|
|
2158
|
+
type: Component,
|
|
2159
|
+
args: [{
|
|
2160
|
+
selector: 'v-tab-view-item',
|
|
2161
|
+
template: `<ng-template #contentTemplate>
|
|
2162
|
+
<ng-content></ng-content>
|
|
2163
|
+
</ng-template>`,
|
|
2164
|
+
}]
|
|
2165
|
+
}], propDecorators: { contentTemplate: [{
|
|
2166
|
+
type: ViewChild,
|
|
2167
|
+
args: ['contentTemplate', { static: true }]
|
|
2168
|
+
}], title: [{
|
|
2169
|
+
type: Input
|
|
2170
|
+
}], url: [{
|
|
2171
|
+
type: Input
|
|
2172
|
+
}], icon: [{
|
|
2173
|
+
type: Input
|
|
2174
|
+
}], disabled: [{
|
|
2175
|
+
type: Input
|
|
2176
|
+
}], content: [{
|
|
2177
|
+
type: Input
|
|
2178
|
+
}] } });
|
|
2179
|
+
|
|
2180
|
+
class TabViewComponent {
|
|
2181
|
+
constructor() {
|
|
2182
|
+
this.items = [];
|
|
2183
|
+
this.useRouting = false;
|
|
2184
|
+
this.activeIndex = 0;
|
|
2185
|
+
this.activeIndexChange = new EventEmitter();
|
|
2186
|
+
this.mergedItems = [];
|
|
2187
|
+
}
|
|
2188
|
+
ngAfterContentInit() {
|
|
2189
|
+
this.mergedItems = [...this.items, ...this.children.toArray()];
|
|
2190
|
+
}
|
|
2191
|
+
activeItemChanged(item) {
|
|
2192
|
+
let index;
|
|
2193
|
+
if (typeof item === 'number') {
|
|
2194
|
+
index = item;
|
|
2195
|
+
}
|
|
2196
|
+
else {
|
|
2197
|
+
index = this.items.indexOf(item);
|
|
2198
|
+
}
|
|
2199
|
+
if (index != -1) {
|
|
2200
|
+
this.activeIndexChange.emit(index);
|
|
2201
|
+
}
|
|
2202
|
+
}
|
|
2203
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TabViewComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2204
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TabViewComponent, isStandalone: true, selector: "v-tab-view", inputs: { items: "items", useRouting: "useRouting", activeIndex: "activeIndex" }, outputs: { activeIndexChange: "activeIndexChange" }, providers: [
|
|
2205
|
+
{ provide: TAB_VIEW_COMPONENT_TOKEN, useExisting: TabViewComponent }
|
|
2206
|
+
], queries: [{ propertyName: "children", predicate: TabViewItemComponent }], ngImport: i0, template: "<div class=\"v-tab-view\">\n @if (useRouting) {\n <p-tabs [value]=\"activeIndex\">\n <p-tablist>\n @for(tab of mergedItems; track tab.url; let index = $index){\n <p-tab [value]=\"index\" [routerLink]=\"tab.url\" (valueChange)=\"activeItemChanged(index)\">\n @if (tab.icon) {\n <i [class]=\"tab.icon\"></i>\n }\n <span>{{ tab.title }}</span>\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n <router-outlet></router-outlet>\n } @else {\n <p-tabs [value]=\"activeIndex\">\n <p-tablist>\n @for (tab of mergedItems; track tab; let index = $index) {\n <p-tab [value]=\"index\" (valueChange)=\"activeItemChanged(index)\">\n @if (tab.icon) {\n <i [class]=\"tab.icon\"></i>\n }\n <span>{{ tab.title }}</span>\n </p-tab>\n }\n </p-tablist>\n <p-tabpanels>\n @for (tab of mergedItems; track tab; let index = $index) {\n <p-tabpanel [value]=\"index\">\n @if (tab.contentTemplate){\n <ng-container *ngTemplateOutlet=\"tab.contentTemplate\"></ng-container>\n } @else if (tab.content) {\n {{ tab.content }}\n }\n </p-tabpanel>\n }\n </p-tabpanels>\n </p-tabs>\n }\n</div>", dependencies: [{ kind: "directive", type: RouterOutlet, selector: "router-outlet", inputs: ["name", "routerOutletData"], outputs: ["activate", "deactivate", "attach", "detach"], exportAs: ["outlet"] }, { kind: "directive", type: RouterLink, selector: "[routerLink]", inputs: ["target", "queryParams", "fragment", "queryParamsHandling", "state", "info", "relativeTo", "preserveFragment", "skipLocationChange", "replaceUrl", "routerLink"] }, { kind: "ngmodule", type: TabsModule }, { kind: "component", type: i1$8.Tabs, selector: "p-tabs", inputs: ["value", "scrollable", "lazy", "selectOnFocus", "showNavigators", "tabindex"], outputs: ["valueChange"] }, { kind: "component", type: i1$8.TabPanels, selector: "p-tabpanels" }, { kind: "component", type: i1$8.TabPanel, selector: "p-tabpanel", inputs: ["value"], outputs: ["valueChange"] }, { kind: "component", type: i1$8.TabList, selector: "p-tablist" }, { kind: "component", type: i1$8.Tab, selector: "p-tab", inputs: ["value", "disabled"], outputs: ["valueChange"] }, { kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
|
|
2207
|
+
}
|
|
2208
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TabViewComponent, decorators: [{
|
|
2209
|
+
type: Component,
|
|
2210
|
+
args: [{ selector: 'v-tab-view', imports: [RouterOutlet, RouterLink, TabsModule, NgTemplateOutlet], providers: [
|
|
2211
|
+
{ provide: TAB_VIEW_COMPONENT_TOKEN, useExisting: TabViewComponent }
|
|
2212
|
+
], template: "<div class=\"v-tab-view\">\n @if (useRouting) {\n <p-tabs [value]=\"activeIndex\">\n <p-tablist>\n @for(tab of mergedItems; track tab.url; let index = $index){\n <p-tab [value]=\"index\" [routerLink]=\"tab.url\" (valueChange)=\"activeItemChanged(index)\">\n @if (tab.icon) {\n <i [class]=\"tab.icon\"></i>\n }\n <span>{{ tab.title }}</span>\n </p-tab>\n }\n </p-tablist>\n </p-tabs>\n <router-outlet></router-outlet>\n } @else {\n <p-tabs [value]=\"activeIndex\">\n <p-tablist>\n @for (tab of mergedItems; track tab; let index = $index) {\n <p-tab [value]=\"index\" (valueChange)=\"activeItemChanged(index)\">\n @if (tab.icon) {\n <i [class]=\"tab.icon\"></i>\n }\n <span>{{ tab.title }}</span>\n </p-tab>\n }\n </p-tablist>\n <p-tabpanels>\n @for (tab of mergedItems; track tab; let index = $index) {\n <p-tabpanel [value]=\"index\">\n @if (tab.contentTemplate){\n <ng-container *ngTemplateOutlet=\"tab.contentTemplate\"></ng-container>\n } @else if (tab.content) {\n {{ tab.content }}\n }\n </p-tabpanel>\n }\n </p-tabpanels>\n </p-tabs>\n }\n</div>" }]
|
|
2213
|
+
}], propDecorators: { children: [{
|
|
2214
|
+
type: ContentChildren,
|
|
2215
|
+
args: [TabViewItemComponent]
|
|
2216
|
+
}], items: [{
|
|
2217
|
+
type: Input
|
|
2218
|
+
}], useRouting: [{
|
|
2219
|
+
type: Input
|
|
2220
|
+
}], activeIndex: [{
|
|
2221
|
+
type: Input
|
|
2222
|
+
}], activeIndexChange: [{
|
|
2223
|
+
type: Output
|
|
2224
|
+
}] } });
|
|
2225
|
+
|
|
2226
|
+
class FilterFieldDirective {
|
|
2227
|
+
constructor() {
|
|
2228
|
+
this.type = GenericFieldType.text;
|
|
2229
|
+
}
|
|
2230
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FilterFieldDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2231
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: FilterFieldDirective, isStandalone: true, selector: "v-filter-field", inputs: { name: "name", type: "type", label: "label", optionLabel: "optionLabel", optionValue: "optionValue", options: "options", value: "value", validator: "validator", datasource: "datasource", filterField: "filterField", showFilter: "showFilter", localSearch: "localSearch" }, ngImport: i0 }); }
|
|
2232
|
+
}
|
|
2233
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FilterFieldDirective, decorators: [{
|
|
2234
|
+
type: Directive,
|
|
2235
|
+
args: [{
|
|
2236
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
2237
|
+
selector: 'v-filter-field',
|
|
2238
|
+
}]
|
|
2239
|
+
}], propDecorators: { name: [{
|
|
2240
|
+
type: Input,
|
|
2241
|
+
args: [{ required: true }]
|
|
2242
|
+
}], type: [{
|
|
2243
|
+
type: Input
|
|
2244
|
+
}], label: [{
|
|
2245
|
+
type: Input
|
|
2246
|
+
}], optionLabel: [{
|
|
2247
|
+
type: Input
|
|
2248
|
+
}], optionValue: [{
|
|
2249
|
+
type: Input
|
|
2250
|
+
}], options: [{
|
|
2251
|
+
type: Input
|
|
2252
|
+
}], value: [{
|
|
2253
|
+
type: Input
|
|
2254
|
+
}], validator: [{
|
|
2255
|
+
type: Input
|
|
2256
|
+
}], datasource: [{
|
|
2257
|
+
type: Input
|
|
2258
|
+
}], filterField: [{
|
|
2259
|
+
type: Input
|
|
2260
|
+
}], showFilter: [{
|
|
2261
|
+
type: Input
|
|
2262
|
+
}], localSearch: [{
|
|
2263
|
+
type: Input
|
|
2264
|
+
}] } });
|
|
2265
|
+
|
|
2266
|
+
function getFilledControlCount(formGroup) {
|
|
2267
|
+
let count = 0;
|
|
2268
|
+
Object.keys(formGroup.controls).forEach((key) => {
|
|
2269
|
+
const control = formGroup.get(key);
|
|
2270
|
+
if (control?.value) {
|
|
2271
|
+
if (typeof control.value === 'boolean') {
|
|
2272
|
+
count++;
|
|
2273
|
+
}
|
|
2274
|
+
if (typeof control.value === 'string' && control.value.trim() !== '') {
|
|
2275
|
+
count++;
|
|
2276
|
+
}
|
|
2277
|
+
}
|
|
2278
|
+
});
|
|
2279
|
+
return count;
|
|
2280
|
+
}
|
|
2281
|
+
|
|
2282
|
+
class FilterComponent extends UnsubscribeComponent {
|
|
2283
|
+
constructor() {
|
|
2284
|
+
super(...arguments);
|
|
2285
|
+
this.fields = [];
|
|
2286
|
+
this.filters = [];
|
|
2287
|
+
this.fulltextFieldName = 'searchField';
|
|
2288
|
+
this.showFulltext = true;
|
|
2289
|
+
this.showFilters = true;
|
|
2290
|
+
this.autoBind = true;
|
|
2291
|
+
this.debounceTime = DEFAULT_DEBOUNCE_TIME;
|
|
2292
|
+
this.icons = Icons;
|
|
2293
|
+
this.searchField = {
|
|
2294
|
+
name: this.fulltextFieldName,
|
|
2295
|
+
};
|
|
2296
|
+
this.inputFields$ = new BehaviorSubject([...this.fields ?? [], ...this.filters ?? []]);
|
|
2297
|
+
this.FieldSize = FieldSize;
|
|
2298
|
+
this.screenSizeService = inject(ScreenSizeService);
|
|
2299
|
+
this.changeDetectorRef = inject(ChangeDetectorRef);
|
|
2300
|
+
this.dialogService = inject(DialogService);
|
|
2301
|
+
this.formGroup = new FormGroup({});
|
|
2302
|
+
this.filledFiltersCount$ = this.formGroup.valueChanges.pipe(startWith(this.formGroup), map(() => getFilledControlCount(this.formGroup).toString()));
|
|
2303
|
+
this.lastFormFields = [];
|
|
2304
|
+
}
|
|
2305
|
+
ngOnInit() {
|
|
2306
|
+
this.formGroup.valueChanges
|
|
2307
|
+
.pipe(takeUntil(this.destroyed$), debounceTime(this.debounceTime ?? DEFAULT_DEBOUNCE_TIME), map((x) => this.convertFilter(x)), distinctUntilChanged())
|
|
2308
|
+
.subscribe((value) => this.onChange?.(value));
|
|
2309
|
+
}
|
|
2310
|
+
ngOnChanges(changes) {
|
|
2311
|
+
if (changes['fields'] || changes['filters']) {
|
|
2312
|
+
this.inputFields$.next([...this.fields ?? [], ...this.filters ?? []]);
|
|
2313
|
+
}
|
|
2314
|
+
}
|
|
2315
|
+
ngAfterContentInit() {
|
|
2316
|
+
const fieldDeclaratios$ = this.fieldDeclarations.changes.pipe(startWith({}), map(() => this.fieldDeclarations.toArray()));
|
|
2317
|
+
this.fieldDefinitios$ = this.inputFields$.pipe(combineLatestWith(fieldDeclaratios$), map(([inputs, views]) => {
|
|
2318
|
+
this.searchField.name = this.fulltextFieldName;
|
|
2319
|
+
this.lastFormFields = [this.searchField, ...(inputs ?? []), ...views];
|
|
2320
|
+
return this.lastFormFields;
|
|
2321
|
+
}));
|
|
2322
|
+
this.simpleFormFieldDefinitions$ = this.fieldDefinitios$.pipe(map((fields) => {
|
|
2323
|
+
return fields
|
|
2324
|
+
.filter((x) => x.name !== this.fulltextFieldName)
|
|
2325
|
+
.map((x) => ({ ...x, floatLabel: true, size: FieldSize.large }));
|
|
2326
|
+
}));
|
|
2327
|
+
this.formGroup$ = this.fieldDefinitios$.pipe(map((fields) => generateFormGroup(fields, this.formGroup, undefined, false)));
|
|
2328
|
+
this.changeDetectorRef.detectChanges();
|
|
2329
|
+
}
|
|
2330
|
+
openFilter() {
|
|
2331
|
+
const fields = this.lastFormFields.map((x) => ({
|
|
2332
|
+
...x,
|
|
2333
|
+
label: x.name === this.fulltextFieldName ? 'Fulltext' : x.label ?? x.name,
|
|
2334
|
+
}));
|
|
2335
|
+
const formGroup = generateFormGroup(this.lastFormFields, undefined, undefined, false);
|
|
2336
|
+
formGroup.patchValue(this.formGroup.value);
|
|
2337
|
+
this.dialogService.showDialog({
|
|
2338
|
+
title: 'Set filters',
|
|
2339
|
+
headerIcon: this.icons.filter,
|
|
2340
|
+
severity: 'primary',
|
|
2341
|
+
componentType: GenericFormComponent,
|
|
2342
|
+
data: {
|
|
2343
|
+
formGroup,
|
|
2344
|
+
fields: fields,
|
|
2345
|
+
columns: 1,
|
|
2346
|
+
},
|
|
2347
|
+
confirmButtonFn: () => this.setFilterValues(formGroup),
|
|
2348
|
+
confirmButtonText: 'Apply',
|
|
2349
|
+
cancelButtonFn: () => this.clear(),
|
|
2350
|
+
cancelButtonText: 'Clear all',
|
|
2351
|
+
showCancelButton: true,
|
|
2352
|
+
closable: false,
|
|
2353
|
+
});
|
|
2354
|
+
}
|
|
2355
|
+
openSearch() {
|
|
2356
|
+
this.dialogService.showDialog({
|
|
2357
|
+
headerIcon: 'pi pi-search',
|
|
2358
|
+
severity: 'primary',
|
|
2359
|
+
innerHTML: '<p>Search</p>',
|
|
2360
|
+
confirmButtonFn: () => this.submitValue(),
|
|
2361
|
+
confirmButtonText: 'Apply',
|
|
2362
|
+
cancelButtonFn: () => this.clear(),
|
|
2363
|
+
cancelButtonText: 'Clear all',
|
|
2364
|
+
showCancelButton: true,
|
|
2365
|
+
closable: false,
|
|
2366
|
+
});
|
|
2367
|
+
}
|
|
2368
|
+
writeValue(data) {
|
|
2369
|
+
this.formGroup.patchValue(data);
|
|
2370
|
+
}
|
|
2371
|
+
registerOnChange(fn) {
|
|
2372
|
+
this.onChange = fn;
|
|
2373
|
+
}
|
|
2374
|
+
registerOnTouched(fn) {
|
|
2375
|
+
this.onTouch = fn;
|
|
2376
|
+
}
|
|
2377
|
+
setDisabledState(isDisabled) {
|
|
2378
|
+
isDisabled ? this.formGroup.disable() : this.formGroup.enable();
|
|
2379
|
+
}
|
|
2380
|
+
submitValue() {
|
|
2381
|
+
if (!this.autoBind) {
|
|
2382
|
+
this.onChange?.(this.formGroup.value);
|
|
2383
|
+
}
|
|
2384
|
+
}
|
|
2385
|
+
setFilterValues(dialogFormGroup) {
|
|
2386
|
+
this.formGroup.setValue(dialogFormGroup.value);
|
|
2387
|
+
this.submitValue();
|
|
2388
|
+
}
|
|
2389
|
+
clear() {
|
|
2390
|
+
this.formGroup.reset();
|
|
2391
|
+
this.submitValue();
|
|
2392
|
+
}
|
|
2393
|
+
convertFilter(value) {
|
|
2394
|
+
if (value == undefined) {
|
|
2395
|
+
return undefined;
|
|
2396
|
+
}
|
|
2397
|
+
const isEmpty = isFilterEmpty(value);
|
|
2398
|
+
if (isEmpty) {
|
|
2399
|
+
return undefined;
|
|
2400
|
+
}
|
|
2401
|
+
return value;
|
|
2402
|
+
}
|
|
2403
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FilterComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2404
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: FilterComponent, isStandalone: true, selector: "v-filter", inputs: { fields: "fields", filters: "filters", title: "title", fulltextFieldName: "fulltextFieldName", showFulltext: "showFulltext", showFilters: "showFilters", autoBind: "autoBind", debounceTime: "debounceTime" }, providers: [
|
|
2405
|
+
{
|
|
2406
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2407
|
+
useExisting: forwardRef(() => FilterComponent),
|
|
2408
|
+
multi: true,
|
|
2409
|
+
},
|
|
2410
|
+
{
|
|
2411
|
+
provide: FILTER_COMPONENT_TOKEN,
|
|
2412
|
+
useExisting: FilterComponent,
|
|
2413
|
+
},
|
|
2414
|
+
], queries: [{ propertyName: "fieldDeclarations", predicate: FilterFieldDirective }], usesInheritance: true, usesOnChanges: true, ngImport: i0, template: "<div class=\"v-filter w-100 p-3 bg-primary\">\n @if (formGroup$ | async; as formGroup){\n <form [formGroup]=\"formGroup\" class=\"d-flex align-items-center\">\n @if (title) {\n <div class=\"v-filter_title pe-4\">\n <h2 class=\"text-white m-0\">{{ title }}</h2>\n </div>\n }\n <div class=\"v-filter__fulltext flex-grow-1 pe-4\">\n @if (showFulltext){\n <v-textfield\n class=\"d-none d-lg-block\"\n placeholder=\"Search\"\n size=\"large\"\n formControlName=\"searchField\"\n type=\"search\"\n [clearable]=\"true\"\n >\n </v-textfield>\n }\n </div>\n @if (simpleFormFieldDefinitions$ | async; as declaration){\n @if (showFilters)\n {\n <div class=\"v-filter_filters d-none d-sm-block me-2\">\n <v-generic-form\n [fields]=\"declaration\"\n [formGroup]=\"formGroup\"\n ></v-generic-form>\n <v-button label=\"X\" class=\"mt-3\" (click)=\"clear()\" />\n </div>\n }\n <div class=\"v-filter_action-buttons d-flex\">\n @if (declaration.length && !showFilters) {\n <v-button \n class=\"me-4\"\n [icon]=\"icons.filter\"\n [label]=\"$any(filledFiltersCount$ | async)\"\n (click)=\"openFilter()\"\n />\n } @if (!autoBind) {\n <v-button\n useShortCut\n [shortCutFn]=\"submitValue.bind(this)\"\n shortCutKey=\"Enter\"\n class=\"text-white mx-2\"\n [outlined]=\"true\"\n size=\"small\"\n label=\"Apply\"\n (click)=\"submitValue()\"\n ></v-button>\n <v-button\n useShortCut\n [shortCutFn]=\"clear.bind(this)\"\n shortCutKey=\"Escape\"\n class=\"text-white\"\n [outlined]=\"true\"\n size=\"small\"\n label=\"Clear\"\n (click)=\"clear()\"\n ></v-button>\n } \n </div>\n }\n <ng-content select=\"v-action-button-group\"></ng-content>\n </form>\n }\n</div>\n", styles: [""], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i1.ɵNgNoValidate, selector: "form:not([ngNoForm]):not([ngNativeValidate])" }, { kind: "directive", type: i1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { kind: "directive", type: i1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { kind: "directive", type: i1.FormControlName, selector: "[formControlName]", inputs: ["formControlName", "disabled", "ngModel"], outputs: ["ngModelChange"] }, { kind: "component", type: TextfieldComponent, selector: "v-textfield", inputs: ["size", "type", "floatLabel"] }, { kind: "component", type: GenericFormComponent, selector: "v-generic-form", inputs: ["formGroup", "fields", "columns", "showAsRow"] }, { kind: "component", type: ButtonComponent, selector: "v-button", inputs: ["label", "icon", "badge", "iconPos", "disabled", "rounded", "outlined", "raised", "severity", "routerLink", "size", "queryParams"] }, { kind: "directive", type: ButtonShortCutDirective, selector: "v-button[useShortCut]", inputs: ["shortCutFn", "shortCutKey"], exportAs: ["useShortCut"] }, { kind: "pipe", type: AsyncPipe, name: "async" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2415
|
+
}
|
|
2416
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FilterComponent, decorators: [{
|
|
2417
|
+
type: Component,
|
|
2418
|
+
args: [{ selector: 'v-filter', imports: [
|
|
2419
|
+
AsyncPipe,
|
|
2420
|
+
ReactiveFormsModule,
|
|
2421
|
+
TextfieldComponent,
|
|
2422
|
+
GenericFormComponent,
|
|
2423
|
+
ButtonComponent,
|
|
2424
|
+
ButtonShortCutDirective,
|
|
2425
|
+
], providers: [
|
|
2426
|
+
{
|
|
2427
|
+
provide: NG_VALUE_ACCESSOR,
|
|
2428
|
+
useExisting: forwardRef(() => FilterComponent),
|
|
2429
|
+
multi: true,
|
|
2430
|
+
},
|
|
2431
|
+
{
|
|
2432
|
+
provide: FILTER_COMPONENT_TOKEN,
|
|
2433
|
+
useExisting: FilterComponent,
|
|
2434
|
+
},
|
|
2435
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"v-filter w-100 p-3 bg-primary\">\n @if (formGroup$ | async; as formGroup){\n <form [formGroup]=\"formGroup\" class=\"d-flex align-items-center\">\n @if (title) {\n <div class=\"v-filter_title pe-4\">\n <h2 class=\"text-white m-0\">{{ title }}</h2>\n </div>\n }\n <div class=\"v-filter__fulltext flex-grow-1 pe-4\">\n @if (showFulltext){\n <v-textfield\n class=\"d-none d-lg-block\"\n placeholder=\"Search\"\n size=\"large\"\n formControlName=\"searchField\"\n type=\"search\"\n [clearable]=\"true\"\n >\n </v-textfield>\n }\n </div>\n @if (simpleFormFieldDefinitions$ | async; as declaration){\n @if (showFilters)\n {\n <div class=\"v-filter_filters d-none d-sm-block me-2\">\n <v-generic-form\n [fields]=\"declaration\"\n [formGroup]=\"formGroup\"\n ></v-generic-form>\n <v-button label=\"X\" class=\"mt-3\" (click)=\"clear()\" />\n </div>\n }\n <div class=\"v-filter_action-buttons d-flex\">\n @if (declaration.length && !showFilters) {\n <v-button \n class=\"me-4\"\n [icon]=\"icons.filter\"\n [label]=\"$any(filledFiltersCount$ | async)\"\n (click)=\"openFilter()\"\n />\n } @if (!autoBind) {\n <v-button\n useShortCut\n [shortCutFn]=\"submitValue.bind(this)\"\n shortCutKey=\"Enter\"\n class=\"text-white mx-2\"\n [outlined]=\"true\"\n size=\"small\"\n label=\"Apply\"\n (click)=\"submitValue()\"\n ></v-button>\n <v-button\n useShortCut\n [shortCutFn]=\"clear.bind(this)\"\n shortCutKey=\"Escape\"\n class=\"text-white\"\n [outlined]=\"true\"\n size=\"small\"\n label=\"Clear\"\n (click)=\"clear()\"\n ></v-button>\n } \n </div>\n }\n <ng-content select=\"v-action-button-group\"></ng-content>\n </form>\n }\n</div>\n" }]
|
|
2436
|
+
}], propDecorators: { fieldDeclarations: [{
|
|
2437
|
+
type: ContentChildren,
|
|
2438
|
+
args: [FilterFieldDirective]
|
|
2439
|
+
}], fields: [{
|
|
2440
|
+
type: Input
|
|
2441
|
+
}], filters: [{
|
|
2442
|
+
type: Input
|
|
2443
|
+
}], title: [{
|
|
2444
|
+
type: Input
|
|
2445
|
+
}], fulltextFieldName: [{
|
|
2446
|
+
type: Input
|
|
2447
|
+
}], showFulltext: [{
|
|
2448
|
+
type: Input
|
|
2449
|
+
}], showFilters: [{
|
|
2450
|
+
type: Input
|
|
2451
|
+
}], autoBind: [{
|
|
2452
|
+
type: Input
|
|
2453
|
+
}], debounceTime: [{
|
|
2454
|
+
type: Input
|
|
2455
|
+
}] } });
|
|
2456
|
+
|
|
2457
|
+
class FeatureListFilterFieldDirective extends FilterFieldDirective {
|
|
2458
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterFieldDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2459
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: FeatureListFilterFieldDirective, isStandalone: true, selector: "v-feature-list-filter-field", usesInheritance: true, ngImport: i0 }); }
|
|
2460
|
+
}
|
|
2461
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterFieldDirective, decorators: [{
|
|
2462
|
+
type: Directive,
|
|
2463
|
+
args: [{
|
|
2464
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
2465
|
+
selector: 'v-feature-list-filter-field',
|
|
2466
|
+
standalone: true,
|
|
2467
|
+
}]
|
|
2468
|
+
}] });
|
|
2469
|
+
|
|
2470
|
+
class FeatureListFilterPipe {
|
|
2471
|
+
transform(value) {
|
|
2472
|
+
if (!value) {
|
|
2473
|
+
return undefined;
|
|
2474
|
+
}
|
|
2475
|
+
return value.filter(x => x.filter).map((x, index) => ({
|
|
2476
|
+
name: x.id,
|
|
2477
|
+
label: typeof x.headerName === 'function' ? x.headerName(x.id, index) : x.headerName ?? '',
|
|
2478
|
+
type: x.type,
|
|
2479
|
+
}));
|
|
2480
|
+
}
|
|
2481
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterPipe, deps: [], target: i0.ɵɵFactoryTarget.Pipe }); }
|
|
2482
|
+
static { this.ɵpipe = i0.ɵɵngDeclarePipe({ minVersion: "14.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterPipe, isStandalone: true, name: "featureListColumn" }); }
|
|
2483
|
+
}
|
|
2484
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListFilterPipe, decorators: [{
|
|
2485
|
+
type: Pipe,
|
|
2486
|
+
args: [{
|
|
2487
|
+
name: 'featureListColumn',
|
|
2488
|
+
standalone: true,
|
|
2489
|
+
}]
|
|
2490
|
+
}] });
|
|
2491
|
+
|
|
2492
|
+
class FeatureListPageComponent {
|
|
2493
|
+
constructor() {
|
|
2494
|
+
this.activatedRoute = inject(ActivatedRoute);
|
|
2495
|
+
this.config =
|
|
2496
|
+
this.activatedRoute.snapshot.data[FEATURE_LIST_PAGE_CONFIG_PROPERTY];
|
|
2497
|
+
}
|
|
2498
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListPageComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2499
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: FeatureListPageComponent, isStandalone: true, selector: "v-feature-list-page", ngImport: i0, template: `
|
|
2500
|
+
<v-feature-list
|
|
2501
|
+
[title]="config.title"
|
|
2502
|
+
[tableName]="config.tableName"
|
|
2503
|
+
[showAdd]="config.showAdd ?? true"
|
|
2504
|
+
[showDownload]="config.showDownload ?? true"
|
|
2505
|
+
[showDelete]="config.showDelete ?? true"
|
|
2506
|
+
>
|
|
2507
|
+
</v-feature-list>
|
|
2508
|
+
`, isInline: true, dependencies: [{ kind: "component", type: FeatureListComponent, selector: "v-feature-list", inputs: ["autoBind", "title", "columns", "filters", "maxVisibleActions", "tableName", "ngrxFeatureKey", "maxVisibleMobileActions", "showExtendedFilter", "showDownload", "showDelete", "showAdd", "canDownload", "canDelete", "canAdd", "useRouterFilter", "fulltextFieldName", "showFulltext", "deleteConfirmMessage", "autoDeleteEnabled", "autoDownloadEnabled", "downloadFileName", "datasource", "extraFilter", "disableCustomClicks", "maximumColumnLength", "selectionMode"], outputs: ["addClick", "downloadClick", "deleteClick", "selectionChange"] }] }); }
|
|
2509
|
+
}
|
|
2510
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListPageComponent, decorators: [{
|
|
2511
|
+
type: Component,
|
|
2512
|
+
args: [{
|
|
2513
|
+
selector: 'v-feature-list-page',
|
|
2514
|
+
imports: [FeatureListComponent],
|
|
2515
|
+
template: `
|
|
2516
|
+
<v-feature-list
|
|
2517
|
+
[title]="config.title"
|
|
2518
|
+
[tableName]="config.tableName"
|
|
2519
|
+
[showAdd]="config.showAdd ?? true"
|
|
2520
|
+
[showDownload]="config.showDownload ?? true"
|
|
2521
|
+
[showDelete]="config.showDelete ?? true"
|
|
2522
|
+
>
|
|
2523
|
+
</v-feature-list>
|
|
2524
|
+
`
|
|
2525
|
+
}]
|
|
2526
|
+
}], ctorParameters: () => [] });
|
|
2527
|
+
|
|
2528
|
+
const FEATURE_LIST_PAGE_CONFIG_PROPERTY = 'feature_list_config';
|
|
2529
|
+
function addFeatureListPage(value) {
|
|
2530
|
+
const { config, ...route } = value;
|
|
2531
|
+
return {
|
|
2532
|
+
component: FeatureListPageComponent,
|
|
2533
|
+
...route,
|
|
2534
|
+
data: {
|
|
2535
|
+
[FEATURE_LIST_PAGE_CONFIG_PROPERTY]: config,
|
|
2536
|
+
...(route.data ?? {}),
|
|
2537
|
+
},
|
|
2538
|
+
};
|
|
2539
|
+
}
|
|
2540
|
+
const FEATURE_LIST_COLUMN_PROVIDER = new InjectionToken('FEATURE_LIST_COLUMN_PROVIDER');
|
|
2541
|
+
|
|
2542
|
+
class FeatureListComponent {
|
|
2543
|
+
constructor() {
|
|
2544
|
+
this.autoBind = true;
|
|
2545
|
+
this.maxVisibleActions = 2;
|
|
2546
|
+
this.maxVisibleMobileActions = 0;
|
|
2547
|
+
this.showExtendedFilter = false;
|
|
2548
|
+
this.showDownload = false;
|
|
2549
|
+
this.showDelete = false;
|
|
2550
|
+
this.showAdd = false;
|
|
2551
|
+
this.canDownload = true;
|
|
2552
|
+
this.canDelete = true;
|
|
2553
|
+
this.canAdd = true;
|
|
2554
|
+
this.useRouterFilter = true;
|
|
2555
|
+
this.fulltextFieldName = 'searchField';
|
|
2556
|
+
this.showFulltext = true;
|
|
2557
|
+
this.autoDeleteEnabled = true;
|
|
2558
|
+
this.autoDownloadEnabled = true;
|
|
2559
|
+
this.downloadFileName = 'export.csv';
|
|
2560
|
+
this.disableCustomClicks = false;
|
|
2561
|
+
this.maximumColumnLength = MAX_COLUMN_CHAR_COUNT;
|
|
2562
|
+
this.addClick = new EventEmitter();
|
|
2563
|
+
this.downloadClick = new EventEmitter();
|
|
2564
|
+
this.deleteClick = new EventEmitter();
|
|
2565
|
+
this.selectionChange = new EventEmitter();
|
|
2566
|
+
this.icons = Icons;
|
|
2567
|
+
this.httpClient = inject(HttpClient);
|
|
2568
|
+
this.baseUrl = inject(BASE_URL_PATH);
|
|
2569
|
+
this.cdRef = inject(ChangeDetectorRef);
|
|
2570
|
+
this.dialogService = inject(DialogService);
|
|
2571
|
+
this.selection = [];
|
|
2572
|
+
}
|
|
2573
|
+
set selectionMode(mode) {
|
|
2574
|
+
this._selectionMode = mode;
|
|
2575
|
+
}
|
|
2576
|
+
get selectionMode() {
|
|
2577
|
+
return this.canDelete
|
|
2578
|
+
? TableSelectionMode.single
|
|
2579
|
+
: this._selectionMode;
|
|
2580
|
+
}
|
|
2581
|
+
ngAfterViewInit() {
|
|
2582
|
+
if (this.viewColumns?.length) {
|
|
2583
|
+
const vewColumns = this.viewColumns
|
|
2584
|
+
?.toArray()
|
|
2585
|
+
.map((x) => x.getDefinition());
|
|
2586
|
+
this.columns = [...(this.columns ?? []), ...(vewColumns ?? [])];
|
|
2587
|
+
this.cdRef.detectChanges();
|
|
2588
|
+
}
|
|
2589
|
+
if (this.fieldDeclarations?.length) {
|
|
2590
|
+
this.filters = this.fieldDeclarations?.toArray();
|
|
2591
|
+
}
|
|
2592
|
+
this.cdRef.detectChanges();
|
|
2593
|
+
}
|
|
2594
|
+
selectItems(items) {
|
|
2595
|
+
this.selection = items ?? [];
|
|
2596
|
+
if (this.selectionMode !== undefined) {
|
|
2597
|
+
this.selectionChange.emit(this.selectionMode === 'multiple'
|
|
2598
|
+
? this.selection
|
|
2599
|
+
: this.selection[0]);
|
|
2600
|
+
}
|
|
2601
|
+
}
|
|
2602
|
+
startDeleteItems() {
|
|
2603
|
+
if (!this.selection.length) {
|
|
2604
|
+
return;
|
|
2605
|
+
}
|
|
2606
|
+
if (this.deleteConfirmMessage) {
|
|
2607
|
+
const message = this.deleteConfirmMessage;
|
|
2608
|
+
this.dialogService.showDialog({
|
|
2609
|
+
innerHTML: message,
|
|
2610
|
+
confirmButtonFn: () => this.deleteItems(this.selection),
|
|
2611
|
+
});
|
|
2612
|
+
}
|
|
2613
|
+
else {
|
|
2614
|
+
this.deleteItems(this.selection);
|
|
2615
|
+
}
|
|
2616
|
+
}
|
|
2617
|
+
startDownload() {
|
|
2618
|
+
this.downloadClick.emit();
|
|
2619
|
+
if (!this.autoDownloadEnabled) {
|
|
2620
|
+
return;
|
|
2621
|
+
}
|
|
2622
|
+
const dowloadFn = this.createDownloadFn(this.datasource);
|
|
2623
|
+
if (dowloadFn) {
|
|
2624
|
+
this.tableDatasourceDirective.params$
|
|
2625
|
+
.pipe(take(1), switchMap((params) => dowloadFn(params)))
|
|
2626
|
+
.subscribe((blob) => {
|
|
2627
|
+
downloadFile(this.downloadFileName, blob);
|
|
2628
|
+
});
|
|
2629
|
+
}
|
|
2630
|
+
}
|
|
2631
|
+
deleteItems(items) {
|
|
2632
|
+
if (!this.autoDeleteEnabled) {
|
|
2633
|
+
this.deleteClick.emit(items);
|
|
2634
|
+
}
|
|
2635
|
+
else {
|
|
2636
|
+
this.forceDelete(items);
|
|
2637
|
+
}
|
|
2638
|
+
}
|
|
2639
|
+
forceDelete(items) {
|
|
2640
|
+
const deleteFn = this.createDeleteFn(this.datasource);
|
|
2641
|
+
if (deleteFn) {
|
|
2642
|
+
const deleteMethods = items.map((x) => deleteFn(x));
|
|
2643
|
+
forkJoin(deleteMethods)
|
|
2644
|
+
.pipe(take(1))
|
|
2645
|
+
.subscribe(() => this.finishDeletion(items));
|
|
2646
|
+
}
|
|
2647
|
+
else {
|
|
2648
|
+
this.finishDeletion(items);
|
|
2649
|
+
}
|
|
2650
|
+
}
|
|
2651
|
+
createDeleteFn(datasource) {
|
|
2652
|
+
if (!datasource) {
|
|
2653
|
+
return undefined;
|
|
2654
|
+
}
|
|
2655
|
+
if (typeof datasource === 'string') {
|
|
2656
|
+
const service = new BaseHttpService(this.httpClient, this.baseUrl, datasource);
|
|
2657
|
+
return (item) => service.delete(item.id);
|
|
2658
|
+
}
|
|
2659
|
+
if (datasource instanceof BaseHttpService) {
|
|
2660
|
+
return (item) => datasource.delete(item.id);
|
|
2661
|
+
}
|
|
2662
|
+
return undefined;
|
|
2663
|
+
}
|
|
2664
|
+
createDownloadFn(datasource) {
|
|
2665
|
+
if (!datasource) {
|
|
2666
|
+
return undefined;
|
|
2667
|
+
}
|
|
2668
|
+
if (typeof datasource === 'string') {
|
|
2669
|
+
const service = new BaseHttpService(this.httpClient, this.baseUrl, datasource);
|
|
2670
|
+
return (request) => service.export(request);
|
|
2671
|
+
}
|
|
2672
|
+
if (datasource instanceof BaseHttpService) {
|
|
2673
|
+
return (request) => datasource.export(request);
|
|
2674
|
+
}
|
|
2675
|
+
const fetchFunction = convertDatasource(datasource, this.baseUrl, this.httpClient);
|
|
2676
|
+
return (request) => {
|
|
2677
|
+
const allData = [];
|
|
2678
|
+
let offset = 0;
|
|
2679
|
+
const fetchAllData = () => {
|
|
2680
|
+
return fetchFunction({
|
|
2681
|
+
...request,
|
|
2682
|
+
offset,
|
|
2683
|
+
limit: DEFAULT_PAGE_SIZE,
|
|
2684
|
+
}).pipe(take(1), switchMap((response) => {
|
|
2685
|
+
allData.push(...response.data);
|
|
2686
|
+
if (allData.length < response.total) {
|
|
2687
|
+
offset = offset + DEFAULT_PAGE_SIZE;
|
|
2688
|
+
return fetchAllData();
|
|
2689
|
+
}
|
|
2690
|
+
else {
|
|
2691
|
+
return of(this.convertToBlob(allData));
|
|
2692
|
+
}
|
|
2693
|
+
}));
|
|
2694
|
+
};
|
|
2695
|
+
return fetchAllData();
|
|
2696
|
+
};
|
|
2697
|
+
}
|
|
2698
|
+
finishDeletion(items) {
|
|
2699
|
+
if (this.datasource && Array.isArray(this.datasource)) {
|
|
2700
|
+
this.datasource = this.datasource.filter((x) => !items.includes(x));
|
|
2701
|
+
}
|
|
2702
|
+
else {
|
|
2703
|
+
this.tableDatasourceDirective.reload();
|
|
2704
|
+
}
|
|
2705
|
+
this.deleteClick.emit(items);
|
|
2706
|
+
}
|
|
2707
|
+
convertToBlob(data) {
|
|
2708
|
+
const columnModel = this.columns.map((x) => new ColumnModel(x));
|
|
2709
|
+
const headers = columnModel.map((x, index) => x.headerGetter(x.id, index));
|
|
2710
|
+
const dataValues = data.map((row, rowIndex) => columnModel.map((column) => column.valueGetter(row, rowIndex)));
|
|
2711
|
+
const csvData = [headers, ...dataValues]
|
|
2712
|
+
.map((row) => row.join(','))
|
|
2713
|
+
.join('\n');
|
|
2714
|
+
return new Blob([csvData], { type: 'text/csv' });
|
|
2715
|
+
}
|
|
2716
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2717
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: FeatureListComponent, isStandalone: true, selector: "v-feature-list", inputs: { autoBind: "autoBind", title: "title", columns: "columns", filters: "filters", maxVisibleActions: "maxVisibleActions", tableName: "tableName", ngrxFeatureKey: "ngrxFeatureKey", maxVisibleMobileActions: "maxVisibleMobileActions", showExtendedFilter: "showExtendedFilter", showDownload: "showDownload", showDelete: "showDelete", showAdd: "showAdd", canDownload: "canDownload", canDelete: "canDelete", canAdd: "canAdd", useRouterFilter: "useRouterFilter", fulltextFieldName: "fulltextFieldName", showFulltext: "showFulltext", deleteConfirmMessage: "deleteConfirmMessage", autoDeleteEnabled: "autoDeleteEnabled", autoDownloadEnabled: "autoDownloadEnabled", downloadFileName: "downloadFileName", datasource: "datasource", extraFilter: "extraFilter", disableCustomClicks: "disableCustomClicks", maximumColumnLength: "maximumColumnLength", selectionMode: "selectionMode" }, outputs: { addClick: "addClick", downloadClick: "downloadClick", deleteClick: "deleteClick", selectionChange: "selectionChange" }, queries: [{ propertyName: "viewColumns", predicate: FEATURE_LIST_COLUMN_PROVIDER }, { propertyName: "fieldDeclarations", predicate: FeatureListFilterFieldDirective }], viewQueries: [{ propertyName: "tableDatasourceDirective", first: true, predicate: TableDatasourceDirective, descendants: true }], ngImport: i0, template: "<div class=\"feature-list__container full-height-container\">\n <v-filter\n #filter\n [title]=\"title\"\n [fields]=\"columns | featureListColumn\"\n [filters]=\"filters\"\n [fulltextFieldName]=\"fulltextFieldName\"\n [showFulltext]=\"showFulltext\"\n [showFilters]=\"showExtendedFilter\"\n >\n <v-action-button-group\n [maxItems]=\"maxVisibleActions\"\n [maxItemsMobile]=\"maxVisibleMobileActions\"\n >\n @if (showAdd) {\n <v-action-button\n [icon]=\"icons.add\"\n label=\"Add\"\n [disabled]=\"!canAdd\"\n (click)=\"addClick.emit()\"\n ></v-action-button>\n } @if (showDelete){\n <v-action-button\n [icon]=\"icons.delete\"\n label=\"Delete\"\n [disabled]=\"!canDelete || !selection.length\"\n (click)=\"startDeleteItems()\"\n ></v-action-button>\n } @if (showDownload){\n <v-action-button\n [icon]=\"icons.download\"\n label=\"Download\"\n [disabled]=\"!canDownload\"\n (click)=\"startDownload()\"\n ></v-action-button>\n }\n </v-action-button-group>\n </v-filter>\n <div class=\"feature-list__table-container full-height-container\">\n <div class=\"full-height-container\">\n <v-table\n useDatasource\n useFilter\n [filterComponent]=\"filter\"\n class=\"full-height-container\"\n [selectionMode]=\"selectionMode\"\n [tableName]=\"tableName\"\n [autoBind]=\"true\"\n [datasource]=\"datasource\"\n [columns]=\"columns\"\n [extraFilter]=\"extraFilter\"\n [maximumColumnLength]=\"maximumColumnLength\"\n [disableCustomClicks]=\"disableCustomClicks\"\n (selectionChange)=\"selectItems($event)\"\n >\n </v-table>\n </div>\n </div>\n</div>\n", styles: [".full-height-container,:host{display:flex;flex-direction:column;flex-grow:1;height:100%}\n"], dependencies: [{ kind: "component", type: TableComponent, selector: "v-table", inputs: ["data", "total", "filter", "loading", "scrollable", "pageSize", "currentPage", "showPaginator", "sortMultiple", "lazy", "selectionMode", "showPageSizePicker", "entityKey", "maximumColumnLength", "disableCustomClicks", "columns", "selection"], outputs: ["pageSizeChange", "selectionChange", "pageChange", "sortChange", "lazyLoad"] }, { kind: "directive", type: TableDatasourceDirective, selector: "v-table[useDatasource]", inputs: ["autoBind", "tableName", "debounceTime", "datasource", "extraFilter", "transformFn"], exportAs: ["useDatasource"] }, { kind: "component", type: FilterComponent, selector: "v-filter", inputs: ["fields", "filters", "title", "fulltextFieldName", "showFulltext", "showFilters", "autoBind", "debounceTime"] }, { kind: "directive", type: TableFilterDirective, selector: "v-table[useFilter]", inputs: ["filterComponent"], exportAs: ["tableFilterDirective"] }, { kind: "component", type: ActionButtonGroupComponent, selector: "v-action-button-group", inputs: ["maxItems", "maxItemsMobile", "items", "menuIconPos", "menuIcon", "label", "icon"] }, { kind: "component", type: ActionButtonComponent, selector: "v-action-button", inputs: ["disabled", "toolTip", "id", "icon", "outlined", "raised", "severity", "label", "size"], outputs: ["click"] }, { kind: "pipe", type: FeatureListFilterPipe, name: "featureListColumn" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2718
|
+
}
|
|
2719
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListComponent, decorators: [{
|
|
2720
|
+
type: Component,
|
|
2721
|
+
args: [{ selector: 'v-feature-list', imports: [
|
|
2722
|
+
TableComponent,
|
|
2723
|
+
TableDatasourceDirective,
|
|
2724
|
+
FilterComponent,
|
|
2725
|
+
TableFilterDirective,
|
|
2726
|
+
ActionButtonGroupComponent,
|
|
2727
|
+
ActionButtonComponent,
|
|
2728
|
+
FeatureListFilterPipe,
|
|
2729
|
+
], changeDetection: ChangeDetectionStrategy.OnPush, template: "<div class=\"feature-list__container full-height-container\">\n <v-filter\n #filter\n [title]=\"title\"\n [fields]=\"columns | featureListColumn\"\n [filters]=\"filters\"\n [fulltextFieldName]=\"fulltextFieldName\"\n [showFulltext]=\"showFulltext\"\n [showFilters]=\"showExtendedFilter\"\n >\n <v-action-button-group\n [maxItems]=\"maxVisibleActions\"\n [maxItemsMobile]=\"maxVisibleMobileActions\"\n >\n @if (showAdd) {\n <v-action-button\n [icon]=\"icons.add\"\n label=\"Add\"\n [disabled]=\"!canAdd\"\n (click)=\"addClick.emit()\"\n ></v-action-button>\n } @if (showDelete){\n <v-action-button\n [icon]=\"icons.delete\"\n label=\"Delete\"\n [disabled]=\"!canDelete || !selection.length\"\n (click)=\"startDeleteItems()\"\n ></v-action-button>\n } @if (showDownload){\n <v-action-button\n [icon]=\"icons.download\"\n label=\"Download\"\n [disabled]=\"!canDownload\"\n (click)=\"startDownload()\"\n ></v-action-button>\n }\n </v-action-button-group>\n </v-filter>\n <div class=\"feature-list__table-container full-height-container\">\n <div class=\"full-height-container\">\n <v-table\n useDatasource\n useFilter\n [filterComponent]=\"filter\"\n class=\"full-height-container\"\n [selectionMode]=\"selectionMode\"\n [tableName]=\"tableName\"\n [autoBind]=\"true\"\n [datasource]=\"datasource\"\n [columns]=\"columns\"\n [extraFilter]=\"extraFilter\"\n [maximumColumnLength]=\"maximumColumnLength\"\n [disableCustomClicks]=\"disableCustomClicks\"\n (selectionChange)=\"selectItems($event)\"\n >\n </v-table>\n </div>\n </div>\n</div>\n", styles: [".full-height-container,:host{display:flex;flex-direction:column;flex-grow:1;height:100%}\n"] }]
|
|
2730
|
+
}], propDecorators: { viewColumns: [{
|
|
2731
|
+
type: ContentChildren,
|
|
2732
|
+
args: [FEATURE_LIST_COLUMN_PROVIDER]
|
|
2733
|
+
}], fieldDeclarations: [{
|
|
2734
|
+
type: ContentChildren,
|
|
2735
|
+
args: [FeatureListFilterFieldDirective]
|
|
2736
|
+
}], tableDatasourceDirective: [{
|
|
2737
|
+
type: ViewChild,
|
|
2738
|
+
args: [TableDatasourceDirective]
|
|
2739
|
+
}], autoBind: [{
|
|
2740
|
+
type: Input
|
|
2741
|
+
}], title: [{
|
|
2742
|
+
type: Input
|
|
2743
|
+
}], columns: [{
|
|
2744
|
+
type: Input
|
|
2745
|
+
}], filters: [{
|
|
2746
|
+
type: Input
|
|
2747
|
+
}], maxVisibleActions: [{
|
|
2748
|
+
type: Input
|
|
2749
|
+
}], tableName: [{
|
|
2750
|
+
type: Input,
|
|
2751
|
+
args: [{ required: true }]
|
|
2752
|
+
}], ngrxFeatureKey: [{
|
|
2753
|
+
type: Input
|
|
2754
|
+
}], maxVisibleMobileActions: [{
|
|
2755
|
+
type: Input
|
|
2756
|
+
}], showExtendedFilter: [{
|
|
2757
|
+
type: Input
|
|
2758
|
+
}], showDownload: [{
|
|
2759
|
+
type: Input
|
|
2760
|
+
}], showDelete: [{
|
|
2761
|
+
type: Input
|
|
2762
|
+
}], showAdd: [{
|
|
2763
|
+
type: Input
|
|
2764
|
+
}], canDownload: [{
|
|
2765
|
+
type: Input
|
|
2766
|
+
}], canDelete: [{
|
|
2767
|
+
type: Input
|
|
2768
|
+
}], canAdd: [{
|
|
2769
|
+
type: Input
|
|
2770
|
+
}], useRouterFilter: [{
|
|
2771
|
+
type: Input
|
|
2772
|
+
}], fulltextFieldName: [{
|
|
2773
|
+
type: Input
|
|
2774
|
+
}], showFulltext: [{
|
|
2775
|
+
type: Input
|
|
2776
|
+
}], deleteConfirmMessage: [{
|
|
2777
|
+
type: Input
|
|
2778
|
+
}], autoDeleteEnabled: [{
|
|
2779
|
+
type: Input
|
|
2780
|
+
}], autoDownloadEnabled: [{
|
|
2781
|
+
type: Input
|
|
2782
|
+
}], downloadFileName: [{
|
|
2783
|
+
type: Input
|
|
2784
|
+
}], datasource: [{
|
|
2785
|
+
type: Input
|
|
2786
|
+
}], extraFilter: [{
|
|
2787
|
+
type: Input
|
|
2788
|
+
}], disableCustomClicks: [{
|
|
2789
|
+
type: Input
|
|
2790
|
+
}], maximumColumnLength: [{
|
|
2791
|
+
type: Input
|
|
2792
|
+
}], addClick: [{
|
|
2793
|
+
type: Output
|
|
2794
|
+
}], downloadClick: [{
|
|
2795
|
+
type: Output
|
|
2796
|
+
}], deleteClick: [{
|
|
2797
|
+
type: Output
|
|
2798
|
+
}], selectionChange: [{
|
|
2799
|
+
type: Output
|
|
2800
|
+
}], selectionMode: [{
|
|
2801
|
+
type: Input
|
|
2802
|
+
}] } });
|
|
2803
|
+
|
|
2804
|
+
class FeatureListColumnDirective extends TableColumnDirective {
|
|
2805
|
+
constructor() {
|
|
2806
|
+
super(...arguments);
|
|
2807
|
+
this.filter = false;
|
|
2808
|
+
this.type = GenericFieldType.text;
|
|
2809
|
+
}
|
|
2810
|
+
getDefinition() {
|
|
2811
|
+
const definition = super.getDefinition();
|
|
2812
|
+
definition.filter = this.filter;
|
|
2813
|
+
definition.type = this.type;
|
|
2814
|
+
definition.format = this.format;
|
|
2815
|
+
return definition;
|
|
2816
|
+
}
|
|
2817
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListColumnDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive }); }
|
|
2818
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.2.1", type: FeatureListColumnDirective, isStandalone: true, selector: "v-feature-list-column", inputs: { filter: "filter", type: "type" }, providers: [
|
|
2819
|
+
{
|
|
2820
|
+
provide: FEATURE_LIST_COLUMN_PROVIDER,
|
|
2821
|
+
useExisting: FeatureListColumnDirective,
|
|
2822
|
+
multi: true,
|
|
2823
|
+
},
|
|
2824
|
+
], usesInheritance: true, ngImport: i0 }); }
|
|
2825
|
+
}
|
|
2826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: FeatureListColumnDirective, decorators: [{
|
|
2827
|
+
type: Directive,
|
|
2828
|
+
args: [{
|
|
2829
|
+
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
2830
|
+
selector: 'v-feature-list-column',
|
|
2831
|
+
standalone: true,
|
|
2832
|
+
providers: [
|
|
2833
|
+
{
|
|
2834
|
+
provide: FEATURE_LIST_COLUMN_PROVIDER,
|
|
2835
|
+
useExisting: FeatureListColumnDirective,
|
|
2836
|
+
multi: true,
|
|
2837
|
+
},
|
|
2838
|
+
],
|
|
2839
|
+
}]
|
|
2840
|
+
}], propDecorators: { filter: [{
|
|
2841
|
+
type: Input
|
|
2842
|
+
}], type: [{
|
|
2843
|
+
type: Input
|
|
2844
|
+
}] } });
|
|
2845
|
+
|
|
2846
|
+
class TooltipComponent {
|
|
2847
|
+
constructor() {
|
|
2848
|
+
this.color = input(undefined, ...(ngDevMode ? [{ debugName: "color" }] : []));
|
|
2849
|
+
this.position = input(undefined, ...(ngDevMode ? [{ debugName: "position" }] : []));
|
|
2850
|
+
this.size = input(undefined, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
2851
|
+
this.tooltipText = input(undefined, ...(ngDevMode ? [{ debugName: "tooltipText" }] : []));
|
|
2852
|
+
}
|
|
2853
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TooltipComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2854
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "20.2.1", type: TooltipComponent, isStandalone: true, selector: "v-tooltip", inputs: { color: { classPropertyName: "color", publicName: "color", isSignal: true, isRequired: false, transformFunction: null }, position: { classPropertyName: "position", publicName: "position", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, tooltipText: { classPropertyName: "tooltipText", publicName: "tooltipText", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0, template: "<div class=\"d-inline-block v-tooltip\" [pTooltip]=\"tooltipText()\" [tooltipPosition]=\"position()\">\n <ng-content></ng-content>\n</div>", dependencies: [{ kind: "ngmodule", type: TooltipModule }, { kind: "directive", type: i3.Tooltip, selector: "[pTooltip]", inputs: ["tooltipPosition", "tooltipEvent", "positionStyle", "tooltipStyleClass", "tooltipZIndex", "escape", "showDelay", "hideDelay", "life", "positionTop", "positionLeft", "autoHide", "fitContent", "hideOnEscape", "pTooltip", "tooltipDisabled", "tooltipOptions", "appendTo"] }] }); }
|
|
2855
|
+
}
|
|
2856
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TooltipComponent, decorators: [{
|
|
2857
|
+
type: Component,
|
|
2858
|
+
args: [{ selector: "v-tooltip", imports: [
|
|
2859
|
+
TooltipModule,
|
|
2860
|
+
], template: "<div class=\"d-inline-block v-tooltip\" [pTooltip]=\"tooltipText()\" [tooltipPosition]=\"position()\">\n <ng-content></ng-content>\n</div>" }]
|
|
2861
|
+
}] });
|
|
2862
|
+
|
|
2863
|
+
class TagComponent {
|
|
2864
|
+
constructor() {
|
|
2865
|
+
this.label = input(...(ngDevMode ? [undefined, { debugName: "label" }] : []));
|
|
2866
|
+
this.severity = input(ControlSeverity.primary, ...(ngDevMode ? [{ debugName: "severity" }] : []));
|
|
2867
|
+
this.variant = input('bold', ...(ngDevMode ? [{ debugName: "variant" }] : []));
|
|
2868
|
+
this.size = input(FieldSize.medium, ...(ngDevMode ? [{ debugName: "size" }] : []));
|
|
2869
|
+
this.primeSeverity = computed(() => {
|
|
2870
|
+
const severity = this.severity();
|
|
2871
|
+
if (!severity) {
|
|
2872
|
+
return null;
|
|
2873
|
+
}
|
|
2874
|
+
switch (severity) {
|
|
2875
|
+
case ControlSeverity.success:
|
|
2876
|
+
return 'success';
|
|
2877
|
+
case ControlSeverity.info:
|
|
2878
|
+
case ControlSeverity.help:
|
|
2879
|
+
case ControlSeverity.primary:
|
|
2880
|
+
case ControlSeverity.secondary:
|
|
2881
|
+
case ControlSeverity.contrast:
|
|
2882
|
+
return 'info';
|
|
2883
|
+
case ControlSeverity.warning:
|
|
2884
|
+
return 'warning';
|
|
2885
|
+
case ControlSeverity.danger:
|
|
2886
|
+
return 'danger';
|
|
2887
|
+
default:
|
|
2888
|
+
return null;
|
|
2889
|
+
}
|
|
2890
|
+
}, ...(ngDevMode ? [{ debugName: "primeSeverity" }] : []));
|
|
2891
|
+
this.tagClasses = computed(() => {
|
|
2892
|
+
const classes = ['v-primeng-tag'];
|
|
2893
|
+
const severity = this.severity();
|
|
2894
|
+
const variant = this.variant();
|
|
2895
|
+
const size = this.size();
|
|
2896
|
+
if (severity) {
|
|
2897
|
+
classes.push(`v-primeng-tag--${severity}`);
|
|
2898
|
+
}
|
|
2899
|
+
if (variant === 'subtle') {
|
|
2900
|
+
classes.push('v-primeng-tag--subtle');
|
|
2901
|
+
}
|
|
2902
|
+
if (size) {
|
|
2903
|
+
classes.push(`v-primeng-tag--${size}`);
|
|
2904
|
+
}
|
|
2905
|
+
return classes.join(' ');
|
|
2906
|
+
}, ...(ngDevMode ? [{ debugName: "tagClasses" }] : []));
|
|
2907
|
+
this.rounded = computed(() => this.variant() === 'subtle', ...(ngDevMode ? [{ debugName: "rounded" }] : []));
|
|
2908
|
+
}
|
|
2909
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TagComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2910
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.2.1", type: TagComponent, isStandalone: true, selector: "v-tag", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, severity: { classPropertyName: "severity", publicName: "severity", isSignal: true, isRequired: false, transformFunction: null }, variant: { classPropertyName: "variant", publicName: "variant", isSignal: true, isRequired: false, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null } }, providers: [
|
|
2911
|
+
{
|
|
2912
|
+
provide: TAG_COMPONENT_TOKEN,
|
|
2913
|
+
useExisting: TagComponent,
|
|
2914
|
+
},
|
|
2915
|
+
], ngImport: i0, template: "<p-tag\n [rounded]=\"rounded()\"\n [severity]=\"primeSeverity()\"\n [ngClass]=\"tagClasses()\"\n>\n @if (label()) {\n {{ label() | translate }}\n } @else {\n <ng-content></ng-content>\n }\n</p-tag>\n\n", styles: [":host{display:inline-block}:host .p-tag{display:inline-flex;align-items:center;line-height:1}:host .p-tag.v-primeng-tag--small{font-size:.75rem;padding:.1rem .4rem}:host .p-tag.v-primeng-tag--medium{font-size:.875rem;padding:.15rem .5rem}:host .p-tag.v-primeng-tag--large{font-size:1rem;padding:.25rem .6rem}:host .p-tag.v-primeng-tag--xl{font-size:1.125rem;padding:.3rem .75rem}:host .p-tag.v-primeng-tag--subtle{filter:brightness(1.1) saturate(.5)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i2.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "ngmodule", type: TagModule }, { kind: "component", type: i2$b.Tag, selector: "p-tag", inputs: ["styleClass", "severity", "value", "icon", "rounded"] }, { kind: "ngmodule", type: TranslateModule }, { kind: "pipe", type: i3$5.TranslatePipe, name: "translate" }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2916
|
+
}
|
|
2917
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: TagComponent, decorators: [{
|
|
2918
|
+
type: Component,
|
|
2919
|
+
args: [{ selector: 'v-tag', imports: [CommonModule, TagModule, TranslateModule], changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
2920
|
+
{
|
|
2921
|
+
provide: TAG_COMPONENT_TOKEN,
|
|
2922
|
+
useExisting: TagComponent,
|
|
2923
|
+
},
|
|
2924
|
+
], template: "<p-tag\n [rounded]=\"rounded()\"\n [severity]=\"primeSeverity()\"\n [ngClass]=\"tagClasses()\"\n>\n @if (label()) {\n {{ label() | translate }}\n } @else {\n <ng-content></ng-content>\n }\n</p-tag>\n\n", styles: [":host{display:inline-block}:host .p-tag{display:inline-flex;align-items:center;line-height:1}:host .p-tag.v-primeng-tag--small{font-size:.75rem;padding:.1rem .4rem}:host .p-tag.v-primeng-tag--medium{font-size:.875rem;padding:.15rem .5rem}:host .p-tag.v-primeng-tag--large{font-size:1rem;padding:.25rem .6rem}:host .p-tag.v-primeng-tag--xl{font-size:1.125rem;padding:.3rem .75rem}:host .p-tag.v-primeng-tag--subtle{filter:brightness(1.1) saturate(.5)}\n"] }]
|
|
2925
|
+
}] });
|
|
2926
|
+
|
|
2927
|
+
class IconComponent extends IconsComponent {
|
|
2928
|
+
get primeIconClasses() {
|
|
2929
|
+
return ['pi', `pi-${this.name()}`].join(' ');
|
|
2930
|
+
}
|
|
2931
|
+
get hostClasses() {
|
|
2932
|
+
const classes = ['v-primeng-icon'];
|
|
2933
|
+
const sizeClass = this.primeSizeClass;
|
|
2934
|
+
const colorClass = this.primeColorClass;
|
|
2935
|
+
const customClass = this.class() ?? '';
|
|
2936
|
+
if (sizeClass) {
|
|
2937
|
+
classes.push(sizeClass);
|
|
2938
|
+
}
|
|
2939
|
+
if (colorClass) {
|
|
2940
|
+
classes.push(colorClass);
|
|
2941
|
+
}
|
|
2942
|
+
if (customClass) {
|
|
2943
|
+
classes.push(customClass);
|
|
2944
|
+
}
|
|
2945
|
+
return classes.join(' ');
|
|
2946
|
+
}
|
|
2947
|
+
get primeSizeClass() {
|
|
2948
|
+
switch (this.size()) {
|
|
2949
|
+
case 'small':
|
|
2950
|
+
return 'v-primeng-icon--small';
|
|
2951
|
+
case 'medium':
|
|
2952
|
+
return 'v-primeng-icon--medium';
|
|
2953
|
+
case 'large':
|
|
2954
|
+
return 'v-primeng-icon--large';
|
|
2955
|
+
case 'xl':
|
|
2956
|
+
return 'v-primeng-icon--xl';
|
|
2957
|
+
default:
|
|
2958
|
+
return '';
|
|
2959
|
+
}
|
|
2960
|
+
}
|
|
2961
|
+
get primeColorClass() {
|
|
2962
|
+
const color = this.mapSeverityToPrimeClass(this.severity());
|
|
2963
|
+
return color ? `v-primeng-icon--${color}` : '';
|
|
2964
|
+
}
|
|
2965
|
+
mapSeverityToPrimeClass(severity) {
|
|
2966
|
+
if (!severity) {
|
|
2967
|
+
return undefined;
|
|
2968
|
+
}
|
|
2969
|
+
switch (severity) {
|
|
2970
|
+
case ControlSeverity.success:
|
|
2971
|
+
return 'success';
|
|
2972
|
+
case ControlSeverity.danger:
|
|
2973
|
+
return 'danger';
|
|
2974
|
+
case ControlSeverity.warning:
|
|
2975
|
+
return 'warning';
|
|
2976
|
+
case ControlSeverity.info:
|
|
2977
|
+
return 'info';
|
|
2978
|
+
case ControlSeverity.secondary:
|
|
2979
|
+
return 'secondary';
|
|
2980
|
+
case ControlSeverity.help:
|
|
2981
|
+
case ControlSeverity.primary:
|
|
2982
|
+
case ControlSeverity.contrast:
|
|
2983
|
+
return 'primary';
|
|
2984
|
+
default:
|
|
2985
|
+
return severity;
|
|
2986
|
+
}
|
|
2987
|
+
}
|
|
2988
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: IconComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
2989
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.2.1", type: IconComponent, isStandalone: true, selector: "v-icon", host: { properties: { "class": "hostClasses" } }, usesInheritance: true, ngImport: i0, template: "<i [class]=\"primeIconClasses\"></i>\n\n", styles: [":host{display:inline-flex;align-items:center}:host .pi{line-height:1}:host.v-primeng-icon--small .pi{font-size:.75rem}:host.v-primeng-icon--medium .pi{font-size:1rem}:host.v-primeng-icon--large .pi{font-size:1.5rem}:host.v-primeng-icon--xl .pi{font-size:2rem}:host.v-primeng-icon--primary .pi{color:var(--primary-color)}:host.v-primeng-icon--secondary .pi{color:var(--secondary-color)}:host.v-primeng-icon--success .pi{color:var(--success-color)}:host.v-primeng-icon--danger .pi{color:var(--error-color)}:host.v-primeng-icon--warning .pi{color:var(--details-color)}:host.v-primeng-icon--info .pi,:host.v-primeng-icon--help .pi,:host.v-primeng-icon--contrast .pi{color:var(--secondary-color)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush }); }
|
|
2990
|
+
}
|
|
2991
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.2.1", ngImport: i0, type: IconComponent, decorators: [{
|
|
2992
|
+
type: Component,
|
|
2993
|
+
args: [{ selector: 'v-icon', imports: [CommonModule], changeDetection: ChangeDetectionStrategy.OnPush, host: {
|
|
2994
|
+
'[class]': 'hostClasses',
|
|
2995
|
+
}, template: "<i [class]=\"primeIconClasses\"></i>\n\n", styles: [":host{display:inline-flex;align-items:center}:host .pi{line-height:1}:host.v-primeng-icon--small .pi{font-size:.75rem}:host.v-primeng-icon--medium .pi{font-size:1rem}:host.v-primeng-icon--large .pi{font-size:1.5rem}:host.v-primeng-icon--xl .pi{font-size:2rem}:host.v-primeng-icon--primary .pi{color:var(--primary-color)}:host.v-primeng-icon--secondary .pi{color:var(--secondary-color)}:host.v-primeng-icon--success .pi{color:var(--success-color)}:host.v-primeng-icon--danger .pi{color:var(--error-color)}:host.v-primeng-icon--warning .pi{color:var(--details-color)}:host.v-primeng-icon--info .pi,:host.v-primeng-icon--help .pi,:host.v-primeng-icon--contrast .pi{color:var(--secondary-color)}\n"] }]
|
|
2996
|
+
}] });
|
|
2997
|
+
|
|
2998
|
+
/**
|
|
2999
|
+
* Generated bundle index. Do not edit.
|
|
3000
|
+
*/
|
|
3001
|
+
|
|
3002
|
+
export { ActionButtonComponent, ActionButtonGroupComponent, BreadcrumbComponent, ButtonComponent, CalendarComponent, CheckboxComponent, ConfirmDialogComponent, DropdownButtonComponent, DropdownComponent, DynamicComponent, DynamicComponentFactoryService, FEATURE_LIST_COLUMN_PROVIDER, FEATURE_LIST_PAGE_CONFIG_PROPERTY, FeatureListColumnDirective, FeatureListComponent, FeatureListFilterFieldDirective, FeatureListFilterPipe, FilterComponent, FilterFieldDirective, FormFieldComponent, GenericFieldComponent, GenericFormComponent, HeaderComponent, HeaderProviderService, HttpErrorMessageInterceptor, IconComponent, Icons, InputGroupComponent, LoaderComponent, MultiselectComponent, NumberInputComponent, PageHeaderComponent, PasswordComponent, RadioButtonComponent, SectionComponent, SideMenuComponent, SideMenuModule, SliderComponent, SnackbarComponent, SnackbarService, StepperComponent, SwitchComponent, TabViewComponent, TabViewItemComponent, TableComponent, TagComponent, TextareaComponent, TextfieldComponent, TooltipComponent, addFeatureListPage, generateFormGroup, getColumnClass };
|
|
3003
|
+
//# sourceMappingURL=verisoft-ui-primeng.mjs.map
|