@verisoft/ui-govcz 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-govcz.mjs +3770 -0
- package/fesm2022/verisoft-ui-govcz.mjs.map +1 -0
- package/index.d.ts +1013 -0
- package/package.json +19 -7
- package/styles/dist/main.css +13 -0
- package/styles/dist/main.css.map +1 -0
- package/.eslintrc.json +0 -60
- package/jest.config.ts +0 -21
- package/ng-package.json +0 -28
- package/project.json +0 -49
- package/src/config.d.ts +0 -10
- package/src/index.ts +0 -1
- package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -25
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +0 -21
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -28
- package/src/lib/components/breadcrumb/index.ts +0 -1
- package/src/lib/components/button/button.component.html +0 -28
- package/src/lib/components/button/button.component.scss +0 -21
- package/src/lib/components/button/button.component.ts +0 -77
- package/src/lib/components/button/index.ts +0 -1
- package/src/lib/components/calendar/calendar.component.html +0 -28
- package/src/lib/components/calendar/calendar.component.scss +0 -0
- package/src/lib/components/calendar/calendar.component.ts +0 -77
- package/src/lib/components/calendar/index.ts +0 -1
- package/src/lib/components/checkbox/checkbox.component.html +0 -23
- package/src/lib/components/checkbox/checkbox.component.scss +0 -0
- package/src/lib/components/checkbox/checkbox.component.ts +0 -61
- package/src/lib/components/checkbox/index.ts +0 -1
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +0 -50
- package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +0 -4
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +0 -79
- package/src/lib/components/confirm-dialog/index.ts +0 -1
- package/src/lib/components/dropdown/dropdown-item.component.html +0 -8
- package/src/lib/components/dropdown/dropdown-item.component.ts +0 -18
- package/src/lib/components/dropdown/dropdown.component.html +0 -91
- package/src/lib/components/dropdown/dropdown.component.scss +0 -108
- package/src/lib/components/dropdown/dropdown.component.spec.ts +0 -21
- package/src/lib/components/dropdown/dropdown.component.ts +0 -296
- package/src/lib/components/dropdown/dropdown.model.ts +0 -6
- package/src/lib/components/dropdown/index.ts +0 -1
- package/src/lib/components/dropdown-button/dropdown-button.component.html +0 -31
- package/src/lib/components/dropdown-button/dropdown-button.component.ts +0 -34
- package/src/lib/components/dropdown-button/index.ts +0 -1
- package/src/lib/components/errors/error.component.html +0 -11
- package/src/lib/components/errors/error.component.scss +0 -0
- package/src/lib/components/errors/error.component.spec.ts +0 -19
- package/src/lib/components/errors/error.component.ts +0 -29
- 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 -20
- package/src/lib/components/feature-list/feature-list-page.component.ts +0 -30
- package/src/lib/components/feature-list/feature-list-page.model.ts +0 -42
- package/src/lib/components/feature-list/feature-list.component.html +0 -67
- package/src/lib/components/feature-list/feature-list.component.scss +0 -10
- package/src/lib/components/feature-list/feature-list.component.ts +0 -360
- package/src/lib/components/feature-list/index.ts +0 -5
- package/src/lib/components/filter/directives/filter-field.directive.ts +0 -35
- package/src/lib/components/filter/filter.component.html +0 -78
- package/src/lib/components/filter/filter.component.scss +0 -32
- 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 -286
- 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 -14
- 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.ts +0 -76
- package/src/lib/components/form-field/index.ts +0 -1
- package/src/lib/components/header/header.component.html +0 -122
- package/src/lib/components/header/header.component.scss +0 -0
- package/src/lib/components/header/header.component.ts +0 -90
- package/src/lib/components/header/index.ts +0 -1
- package/src/lib/components/icon/icon.component.html +0 -11
- package/src/lib/components/icon/icon.component.scss +0 -20
- package/src/lib/components/icon/icon.component.ts +0 -110
- package/src/lib/components/icon/index.ts +0 -2
- package/src/lib/components/index.ts +0 -37
- package/src/lib/components/input-group/index.ts +0 -1
- package/src/lib/components/input-group/input-group.component.html +0 -41
- package/src/lib/components/input-group/input-group.component.scss +0 -0
- package/src/lib/components/input-group/input-group.component.ts +0 -75
- package/src/lib/components/loader/index.ts +0 -1
- package/src/lib/components/loader/loader.component.html +0 -7
- 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 -33
- package/src/lib/components/multiselect/index.ts +0 -1
- package/src/lib/components/multiselect/multiselect.component.html +0 -21
- 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 -117
- package/src/lib/components/number-input/index.ts +0 -1
- package/src/lib/components/number-input/number-input.component.html +0 -48
- package/src/lib/components/number-input/number-input.component.scss +0 -0
- package/src/lib/components/number-input/number-input.component.ts +0 -80
- package/src/lib/components/page-header/index.ts +0 -1
- package/src/lib/components/page-header/page-header.component.html +0 -3
- package/src/lib/components/page-header/page-header.component.scss +0 -11
- package/src/lib/components/page-header/page-header.component.spec.ts +0 -21
- package/src/lib/components/page-header/page-header.component.ts +0 -27
- package/src/lib/components/password/index.ts +0 -1
- package/src/lib/components/password/password.component.html +0 -31
- 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 -83
- package/src/lib/components/radiobutton/index.ts +0 -1
- package/src/lib/components/radiobutton/radiobutton.component.html +0 -23
- package/src/lib/components/radiobutton/radiobutton.component.scss +0 -0
- package/src/lib/components/radiobutton/radiobutton.component.ts +0 -61
- package/src/lib/components/search/index.ts +0 -1
- package/src/lib/components/search/search.component.html +0 -23
- package/src/lib/components/search/search.component.scss +0 -0
- package/src/lib/components/search/search.component.ts +0 -45
- package/src/lib/components/section/index.ts +0 -1
- package/src/lib/components/section/section.component.html +0 -26
- package/src/lib/components/section/section.component.scss +0 -0
- package/src/lib/components/section/section.component.ts +0 -55
- package/src/lib/components/side-menu/index.ts +0 -2
- package/src/lib/components/side-menu/side-menu.component.html +0 -22
- package/src/lib/components/side-menu/side-menu.component.scss +0 -17
- package/src/lib/components/side-menu/side-menu.component.ts +0 -42
- package/src/lib/components/side-menu/side-menu.module.ts +0 -56
- package/src/lib/components/snackbar/index.ts +0 -2
- package/src/lib/components/snackbar/services/snackbar.service.ts +0 -73
- package/src/lib/components/snackbar/snackbar.component.html +0 -14
- 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.ts +0 -44
- package/src/lib/components/snackbar/snackbar.model.ts +0 -10
- 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.scss +0 -9
- package/src/lib/components/stepper/stepper.component.ts +0 -60
- package/src/lib/components/switch/index.ts +0 -1
- package/src/lib/components/switch/switch.component.html +0 -16
- package/src/lib/components/switch/switch.component.scss +0 -0
- package/src/lib/components/switch/switch.component.ts +0 -39
- package/src/lib/components/tab-view/index.ts +0 -2
- package/src/lib/components/tab-view/tab-view-item.component.ts +0 -23
- package/src/lib/components/tab-view/tab-view.component.html +0 -51
- package/src/lib/components/tab-view/tab-view.component.scss +0 -43
- package/src/lib/components/tab-view/tab-view.component.ts +0 -64
- package/src/lib/components/tab-view/tab-view.module.ts +0 -25
- package/src/lib/components/table/index.ts +0 -1
- package/src/lib/components/table/table-pagination-info.component.html +0 -9
- package/src/lib/components/table/table-pagination-info.component.ts +0 -22
- package/src/lib/components/table/table.component.html +0 -199
- package/src/lib/components/table/table.component.scss +0 -192
- package/src/lib/components/table/table.component.ts +0 -390
- package/src/lib/components/table/table.model.ts +0 -17
- package/src/lib/components/table/table.models.ts +0 -12
- package/src/lib/components/tag/index.ts +0 -3
- package/src/lib/components/tag/tag.component.html +0 -12
- package/src/lib/components/tag/tag.component.scss +0 -4
- package/src/lib/components/tag/tag.component.ts +0 -44
- package/src/lib/components/tag/tag.model.ts +0 -7
- package/src/lib/components/textarea/index.ts +0 -1
- package/src/lib/components/textarea/textarea.component.html +0 -50
- package/src/lib/components/textarea/textarea.component.scss +0 -0
- package/src/lib/components/textarea/textarea.component.ts +0 -77
- package/src/lib/components/textfield/index.ts +0 -1
- package/src/lib/components/textfield/textfield.component.html +0 -34
- package/src/lib/components/textfield/textfield.component.scss +0 -0
- package/src/lib/components/textfield/textfield.component.ts +0 -112
- package/src/lib/components/tooltip/index.ts +0 -1
- package/src/lib/components/tooltip/tooltip.component.html +0 -9
- package/src/lib/components/tooltip/tooltip.component.ts +0 -19
- package/src/lib/icons.ts +0 -36
- package/src/lib/index.ts +0 -5
- package/src/lib/init.service.ts +0 -11
- package/src/lib/interceptors/http-error-message.interceptor.ts +0 -45
- package/src/lib/pages/bad-request-page/bad-request-page.component.html +0 -5
- package/src/lib/pages/bad-request-page/bad-request-page.component.scss +0 -0
- package/src/lib/pages/bad-request-page/bad-request-page.component.ts +0 -14
- package/src/lib/pages/error-page/error-page.component.html +0 -5
- package/src/lib/pages/error-page/error-page.component.scss +0 -0
- package/src/lib/pages/error-page/error-page.component.ts +0 -31
- package/src/lib/pages/error-page/error-page.constants.ts +0 -19
- package/src/lib/pages/index.ts +0 -3
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.html +0 -5
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.scss +0 -0
- package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.ts +0 -15
- package/src/lib/pages/not-authenticated/index.ts +0 -1
- package/src/lib/pages/not-authenticated/not-authenticated.component.html +0 -5
- package/src/lib/pages/not-authenticated/not-authenticated.component.ts +0 -13
- package/src/lib/pages/not-authorized/index.ts +0 -1
- package/src/lib/pages/not-authorized/not-authorized.component.html +0 -5
- package/src/lib/pages/not-authorized/not-authorized.component.ts +0 -17
- package/src/lib/pages/not-found/index.ts +0 -1
- package/src/lib/pages/not-found/not-found.component.html +0 -5
- package/src/lib/pages/not-found/not-found.component.ts +0 -17
- package/src/lib/pages/not-found-page/not-found-page.component.html +0 -6
- 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.ts +0 -15
- package/src/lib/pipes/color/color.pipe.ts +0 -24
- package/src/lib/pipes/index.ts +0 -3
- package/src/lib/pipes/multiselect/multiselect-options.pipe.ts +0 -61
- package/src/lib/pipes/size/size.pipe.ts +0 -24
- package/src/test-setup.ts +0 -8
- package/tsconfig.json +0 -30
- package/tsconfig.lib.json +0 -17
- package/tsconfig.lib.prod.json +0 -9
- package/tsconfig.spec.json +0 -16
- /package/{src → styles}/sass/foundations/_colors.scss +0 -0
- /package/{src → styles}/sass/foundations/index.scss +0 -0
- /package/{src → styles}/sass/header.css +0 -0
- /package/{src → styles}/sass/header.scss +0 -0
- /package/{src → styles}/sass/integrations/_bootstrap.scss +0 -0
- /package/{src → styles}/sass/integrations/index.scss +0 -0
- /package/{src → styles}/sass/main.scss +0 -0
- /package/{src → styles}/sass/overrides/_gov.scss +0 -0
- /package/{src → styles}/sass/overrides/index.scss +0 -0
- /package/{src → styles}/sass/scrollbar.scss +0 -0
- /package/{src → styles}/sass/tokens/_theme-dark.scss +0 -0
- /package/{src → styles}/sass/tokens/_theme-light.scss +0 -0
- /package/{src → styles}/sass/tokens/index.scss +0 -0
- /package/{src → styles}/sass/utils/_table_filter.scss +0 -0
- /package/{src → styles}/sass/utils/_utils.scss +0 -0
- /package/{src → styles}/sass/utils/index.scss +0 -0
- /package/{src → styles}/sass/vendors/_bootstrap.scss +0 -0
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
Optional,
|
|
6
|
-
Self,
|
|
7
|
-
Input,
|
|
8
|
-
input,
|
|
9
|
-
} from "@angular/core";
|
|
10
|
-
import { ControlValueAccessor, NgControl, ReactiveFormsModule } from "@angular/forms";
|
|
11
|
-
import { RouterModule } from "@angular/router";
|
|
12
|
-
import { GovDesignSystemModule } from "@gov-design-system-ce/angular";
|
|
13
|
-
import { TranslateModule } from "@ngx-translate/core";
|
|
14
|
-
import {
|
|
15
|
-
BaseFormInputComponent,
|
|
16
|
-
CHECKBOX_COMPONENT_TOKEN,
|
|
17
|
-
CheckboxCore,
|
|
18
|
-
FieldSize,
|
|
19
|
-
FieldSizeType,
|
|
20
|
-
} from "@verisoft/ui-core";
|
|
21
|
-
import { v4 as uuidv4 } from 'uuid';
|
|
22
|
-
import { Icons } from "../../icons";
|
|
23
|
-
import { GovSizePipe } from "../../pipes";
|
|
24
|
-
import { ErrorComponent } from "../errors";
|
|
25
|
-
|
|
26
|
-
@Component({
|
|
27
|
-
selector: "v-checkbox",
|
|
28
|
-
styleUrl: "./checkbox.component.scss",
|
|
29
|
-
templateUrl: './checkbox.component.html',
|
|
30
|
-
imports: [
|
|
31
|
-
GovDesignSystemModule,
|
|
32
|
-
RouterModule,
|
|
33
|
-
ReactiveFormsModule,
|
|
34
|
-
GovSizePipe,
|
|
35
|
-
ErrorComponent,
|
|
36
|
-
TranslateModule
|
|
37
|
-
],
|
|
38
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
39
|
-
providers: [{
|
|
40
|
-
provide: CHECKBOX_COMPONENT_TOKEN,
|
|
41
|
-
useExisting: CheckboxComponent,
|
|
42
|
-
}]
|
|
43
|
-
})
|
|
44
|
-
export class CheckboxComponent
|
|
45
|
-
extends BaseFormInputComponent
|
|
46
|
-
implements ControlValueAccessor, CheckboxCore
|
|
47
|
-
{
|
|
48
|
-
@Input() size: FieldSizeType = FieldSize.medium;
|
|
49
|
-
@Input() value!: string;
|
|
50
|
-
@Input() name!: string;
|
|
51
|
-
readonly indeterminate = input(false);
|
|
52
|
-
@Input() noLabel = false;
|
|
53
|
-
|
|
54
|
-
protected readonly icons = Icons;
|
|
55
|
-
|
|
56
|
-
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
57
|
-
super(ngControl);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
id = uuidv4();
|
|
61
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './checkbox.component';
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
<gov-dialog
|
|
2
|
-
[open]="visible"
|
|
3
|
-
[attr.block-close]="data.closable !== undefined ? !data.closable : false"
|
|
4
|
-
[attr.block-backdrop-close]="data.closable !== undefined ? !data.closable : false"
|
|
5
|
-
[style.--dialog-max-width]="data.width"
|
|
6
|
-
[style.--dialog-max-height]="data.height"
|
|
7
|
-
role="dialog"
|
|
8
|
-
accessible-close-label="Close dialog box with more information"
|
|
9
|
-
(gov-close)="data.cancelButtonFn ? dialogClick(false) : (visible = false)"
|
|
10
|
-
>
|
|
11
|
-
<gov-icon
|
|
12
|
-
type="components"
|
|
13
|
-
[name]="data.headerIcon"
|
|
14
|
-
slot="icon"
|
|
15
|
-
[color]="data.severity | govColor"
|
|
16
|
-
/>
|
|
17
|
-
|
|
18
|
-
<h2 slot="title">{{ data.title ?? 'Title' }}</h2>
|
|
19
|
-
|
|
20
|
-
@if (data && data.innerHTML) {
|
|
21
|
-
<div [innerHTML]="data.innerHTML"></div>
|
|
22
|
-
} @else if (data.componentType) {
|
|
23
|
-
<v-dynamic-component
|
|
24
|
-
[componentType]="data.componentType"
|
|
25
|
-
[data]="$any(data.data)"
|
|
26
|
-
></v-dynamic-component>
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
<gov-button
|
|
30
|
-
color="primary"
|
|
31
|
-
size="m"
|
|
32
|
-
type="solid"
|
|
33
|
-
slot="footer"
|
|
34
|
-
(gov-click)="data.confirmButtonFn ? dialogClick(true) : (visible = false)"
|
|
35
|
-
>
|
|
36
|
-
{{ data.confirmButtonText ?? 'Yes'}}
|
|
37
|
-
</gov-button>
|
|
38
|
-
|
|
39
|
-
<gov-button
|
|
40
|
-
[ngClass]="!data.showCancelButton ? 'd-none' : ''"
|
|
41
|
-
color="primary"
|
|
42
|
-
size="m"
|
|
43
|
-
type="outlined"
|
|
44
|
-
slot="footer"
|
|
45
|
-
[disabled]="!data.showCancelButton"
|
|
46
|
-
(gov-click)="data.cancelButtonFn ? dialogClick(false) : (visible = false)"
|
|
47
|
-
>
|
|
48
|
-
{{ data.cancelButtonText ?? 'No' }}
|
|
49
|
-
</gov-button>
|
|
50
|
-
</gov-dialog>
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, ChangeDetectorRef, Component, OnInit, inject } from '@angular/core';
|
|
3
|
-
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
4
|
-
import {
|
|
5
|
-
CONFIRM_DIALOG_COMPONENT_TOKEN,
|
|
6
|
-
ConfirmDialogCore,
|
|
7
|
-
DialogData,
|
|
8
|
-
DialogService,
|
|
9
|
-
UnsubscribeComponent,
|
|
10
|
-
} from '@verisoft/ui-core';
|
|
11
|
-
import { takeUntil } from 'rxjs';
|
|
12
|
-
import { GovColorPipe } from '../../pipes';
|
|
13
|
-
import { DynamicComponent } from '../shared-components/dynamic-component';
|
|
14
|
-
|
|
15
|
-
@Component({
|
|
16
|
-
selector: 'v-confirm-dialog',
|
|
17
|
-
imports: [
|
|
18
|
-
CommonModule,
|
|
19
|
-
GovDesignSystemModule,
|
|
20
|
-
GovColorPipe,
|
|
21
|
-
DynamicComponent,
|
|
22
|
-
],
|
|
23
|
-
templateUrl: './confirm-dialog.component.html',
|
|
24
|
-
styleUrl: './confirm-dialog.component.scss',
|
|
25
|
-
providers: [
|
|
26
|
-
{
|
|
27
|
-
provide: CONFIRM_DIALOG_COMPONENT_TOKEN,
|
|
28
|
-
useExisting: ConfirmDialogComponent,
|
|
29
|
-
},
|
|
30
|
-
]
|
|
31
|
-
})
|
|
32
|
-
export class ConfirmDialogComponent
|
|
33
|
-
extends UnsubscribeComponent
|
|
34
|
-
implements OnInit, ConfirmDialogCore
|
|
35
|
-
{
|
|
36
|
-
constructor(
|
|
37
|
-
private readonly dialogService: DialogService,
|
|
38
|
-
private readonly cdr: ChangeDetectorRef
|
|
39
|
-
) {
|
|
40
|
-
super();
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
visible = false;
|
|
44
|
-
protected closable = false;
|
|
45
|
-
data: DialogData = { severity: 'primary', headerIcon: 'info-circle' };
|
|
46
|
-
|
|
47
|
-
ngOnInit(): void {
|
|
48
|
-
this.dialogService.showEvent
|
|
49
|
-
.pipe(takeUntil(this.destroyed$))
|
|
50
|
-
.subscribe((x: DialogData) => {
|
|
51
|
-
this.data = x;
|
|
52
|
-
this.visible = true;
|
|
53
|
-
this.cdr.detectChanges();
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
this.dialogService.closeEvent
|
|
57
|
-
.pipe(takeUntil(this.destroyed$))
|
|
58
|
-
.subscribe(() => {
|
|
59
|
-
this.data = {};
|
|
60
|
-
this.visible = false;
|
|
61
|
-
this.cdr.detectChanges();
|
|
62
|
-
})
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
protected dialogClick(confirm: boolean) {
|
|
66
|
-
const { confirmButtonFn, cancelButtonFn } = this.data;
|
|
67
|
-
|
|
68
|
-
if (confirm && confirmButtonFn) {
|
|
69
|
-
confirmButtonFn();
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
if (!confirm && cancelButtonFn) {
|
|
73
|
-
cancelButtonFn();
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
this.visible = false;
|
|
77
|
-
this.cdr.detectChanges();
|
|
78
|
-
}
|
|
79
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './confirm-dialog.component';
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectionStrategy,
|
|
3
|
-
Component,
|
|
4
|
-
Input,
|
|
5
|
-
ViewEncapsulation,
|
|
6
|
-
} from '@angular/core';
|
|
7
|
-
import { DropDownItemData } from './dropdown.model';
|
|
8
|
-
|
|
9
|
-
@Component({
|
|
10
|
-
selector: 'v-dropdown-item',
|
|
11
|
-
standalone: true,
|
|
12
|
-
templateUrl: './dropdown-item.component.html',
|
|
13
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
14
|
-
encapsulation: ViewEncapsulation.None,
|
|
15
|
-
})
|
|
16
|
-
export class DropdownItemComponent<T> {
|
|
17
|
-
@Input() item : DropDownItemData<T> | undefined;
|
|
18
|
-
}
|
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
<div
|
|
2
|
-
class="v-dropdown mb-3"
|
|
3
|
-
(keydown)="onKeyDown($event)"
|
|
4
|
-
>
|
|
5
|
-
<gov-form-control [disabled]="this.ngControl?.disabled">
|
|
6
|
-
@if (label && !floatLabel) {
|
|
7
|
-
<gov-form-label
|
|
8
|
-
slot="top"
|
|
9
|
-
[ngClass]="labelClasses"
|
|
10
|
-
>
|
|
11
|
-
<span [ngClass]="labelClasses">
|
|
12
|
-
{{ label | translate }}
|
|
13
|
-
@if (tooltip) {
|
|
14
|
-
<v-tooltip [message]="tooltip | translate" />
|
|
15
|
-
}
|
|
16
|
-
</span>
|
|
17
|
-
</gov-form-label>
|
|
18
|
-
}
|
|
19
|
-
<div
|
|
20
|
-
class="gov-form-input"
|
|
21
|
-
[ngStyle]="forceMinWidth ? {'min-width': '16rem'} : {}"
|
|
22
|
-
[ngClass]="inputClasses"
|
|
23
|
-
>
|
|
24
|
-
<div
|
|
25
|
-
class="element d-flex gov-form-input-child"
|
|
26
|
-
[ngClass]="labelClasses"
|
|
27
|
-
(click)="toggleDropdown()"
|
|
28
|
-
>
|
|
29
|
-
<div class="v-dropdown__value flex-grow-1 me-1">{{ selectedItem?.label ?? placeholder }}</div>
|
|
30
|
-
@if (clearable && ngControl?.enabled && selectedItem !== undefined && selectedItem !== null) {
|
|
31
|
-
<gov-icon
|
|
32
|
-
[name]="icons.cross"
|
|
33
|
-
size="m"
|
|
34
|
-
class="v-dropdown__clear me-1"
|
|
35
|
-
color="error"
|
|
36
|
-
(click)="clearSelection($event)"
|
|
37
|
-
/>
|
|
38
|
-
}
|
|
39
|
-
@if (loading) {
|
|
40
|
-
<div class="v-dropdown__loader">
|
|
41
|
-
<gov-icon [name]="icons.loader" />
|
|
42
|
-
</div>
|
|
43
|
-
}
|
|
44
|
-
<div class="v-dropdown__trigger">
|
|
45
|
-
<gov-icon [name]="opened ? icons.chevronUp : icons.chevronDown" />
|
|
46
|
-
</div>
|
|
47
|
-
</div>
|
|
48
|
-
</div>
|
|
49
|
-
<div class="position-relative">
|
|
50
|
-
@if (opened) {
|
|
51
|
-
<div class="v-dropdown__container">
|
|
52
|
-
@if (showFilter) {
|
|
53
|
-
<div
|
|
54
|
-
class="v-dropdown__filter"
|
|
55
|
-
#filterTextField
|
|
56
|
-
(keydown)="onKeyDown($event)"
|
|
57
|
-
>
|
|
58
|
-
<v-textfield
|
|
59
|
-
placeholder="Search"
|
|
60
|
-
[formControl]="filterControl"
|
|
61
|
-
iconPos="right"
|
|
62
|
-
[icon]="icons.search"
|
|
63
|
-
/>
|
|
64
|
-
</div>
|
|
65
|
-
}
|
|
66
|
-
@if (!dropdownOptions?.length) {
|
|
67
|
-
<div class="v-dropdown__no-item">No option was found.</div>
|
|
68
|
-
} @else {
|
|
69
|
-
<ul
|
|
70
|
-
role="listbox"
|
|
71
|
-
class="v-dropdown__list"
|
|
72
|
-
>
|
|
73
|
-
<cdk-virtual-scroll-viewport
|
|
74
|
-
[itemSize]="30"
|
|
75
|
-
class="v-dropdown__scroll"
|
|
76
|
-
(scrolledIndexChange)="onScroll($event)"
|
|
77
|
-
>
|
|
78
|
-
<v-dropdown-item
|
|
79
|
-
*cdkVirtualFor="let option of dropdownOptions;"
|
|
80
|
-
[item]="option"
|
|
81
|
-
(click)="selectItem(option, true)"
|
|
82
|
-
/>
|
|
83
|
-
</cdk-virtual-scroll-viewport>
|
|
84
|
-
</ul>
|
|
85
|
-
}
|
|
86
|
-
</div>
|
|
87
|
-
}
|
|
88
|
-
</div>
|
|
89
|
-
<v-validation-message [ngControl]="ngControl" />
|
|
90
|
-
</gov-form-control>
|
|
91
|
-
</div>
|
|
@@ -1,108 +0,0 @@
|
|
|
1
|
-
.v-dropdown__container {
|
|
2
|
-
position: absolute;
|
|
3
|
-
z-index: 100;
|
|
4
|
-
background-color: var(--button-outlined-primary-hover);
|
|
5
|
-
min-width: 100%;
|
|
6
|
-
border-radius: var(--border-radius, var(--corner-radius-s));
|
|
7
|
-
border: var(--border-width, 0.0625rem) solid var(--form-border-color, var(--border-neutral));
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
.v-dropdown__trigger {
|
|
11
|
-
min-height: 1.5rem;
|
|
12
|
-
display: flex;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
.disabled {
|
|
16
|
-
color: var(--form-state-value-disabled, var(--text-disabled));
|
|
17
|
-
cursor: default !important;
|
|
18
|
-
pointer-events: none;
|
|
19
|
-
|
|
20
|
-
&-input {
|
|
21
|
-
border-color: var(--form-state-border-disabled, var(--border-subtlest)) !important;
|
|
22
|
-
background: var(--form-state-bg-disabled, transparent);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
.error {
|
|
27
|
-
color: var(--form-state-label-error, var(--text-status-error));
|
|
28
|
-
|
|
29
|
-
&-input {
|
|
30
|
-
border-color: var(--form-state-border-error, var(--status-error)) !important;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
.gov-form-input-child {
|
|
35
|
-
padding: 0.5rem 0.75rem;
|
|
36
|
-
border: 0px !important;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
.v-dropdown__no-item {
|
|
40
|
-
padding: 0.5rem;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.v-dropdown__list {
|
|
44
|
-
margin: 0;
|
|
45
|
-
padding: 0;
|
|
46
|
-
list-style-type: none;
|
|
47
|
-
display: flex;
|
|
48
|
-
flex-direction: column;
|
|
49
|
-
overflow: auto;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.v-dropdown__scroll {
|
|
53
|
-
height: 10rem;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
.v-dropdown__filter {
|
|
57
|
-
padding: 0.5rem;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
.v-dropdown__item {
|
|
61
|
-
padding: 0.25rem 0.5rem;
|
|
62
|
-
cursor: pointer;
|
|
63
|
-
|
|
64
|
-
&.is-active {
|
|
65
|
-
background-color: var(--background-primary);
|
|
66
|
-
color: var(--text-white);
|
|
67
|
-
|
|
68
|
-
&:hover {
|
|
69
|
-
opacity: 0.8;
|
|
70
|
-
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&:hover {
|
|
75
|
-
background-color: var(--background-primary);
|
|
76
|
-
;
|
|
77
|
-
color: var(--text-white);
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.v-dropdown__loader {
|
|
82
|
-
width: 1.5rem;
|
|
83
|
-
height: 1.5rem;
|
|
84
|
-
margin-right: 1rem;
|
|
85
|
-
animation: rotate 1s linear infinite;
|
|
86
|
-
display: inline-block;
|
|
87
|
-
transform-origin: center;
|
|
88
|
-
color: var(--color-neutral-300)
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
.v-dropdown__clear {
|
|
92
|
-
z-index: 99;
|
|
93
|
-
cursor: pointer;
|
|
94
|
-
}
|
|
95
|
-
|
|
96
|
-
@keyframes rotate {
|
|
97
|
-
from {
|
|
98
|
-
transform: rotate(0deg);
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
to {
|
|
102
|
-
transform: rotate(360deg);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
::ng-deep .cdk-virtual-scrollable {
|
|
107
|
-
contain: none;
|
|
108
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { MultiselectComponent } from './gov-multiselect.component';
|
|
3
|
-
|
|
4
|
-
describe('MultiselectComponent', () => {
|
|
5
|
-
let component: MultiselectComponent<any>;
|
|
6
|
-
let fixture: ComponentFixture<MultiselectComponent<any>>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [MultiselectComponent],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(MultiselectComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|