@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,110 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { ChangeDetectionStrategy, Component, CUSTOM_ELEMENTS_SCHEMA, input } from '@angular/core';
|
|
3
|
-
import { ControlSeverity, ControlSeverityType, IconLibraryType, IconsComponent } from '@verisoft/ui-core';
|
|
4
|
-
|
|
5
|
-
@Component({
|
|
6
|
-
selector: 'v-icon',
|
|
7
|
-
imports: [CommonModule],
|
|
8
|
-
schemas: [CUSTOM_ELEMENTS_SCHEMA],
|
|
9
|
-
templateUrl: './icon.component.html',
|
|
10
|
-
styleUrl: './icon.component.scss',
|
|
11
|
-
changeDetection: ChangeDetectionStrategy.OnPush
|
|
12
|
-
})
|
|
13
|
-
export class IconComponent extends IconsComponent {
|
|
14
|
-
get govSize(): 's' | 'm' | 'l' | 'xl' {
|
|
15
|
-
switch (this.size()) {
|
|
16
|
-
case 'small':
|
|
17
|
-
return 's';
|
|
18
|
-
case 'large':
|
|
19
|
-
return 'l';
|
|
20
|
-
case 'medium':
|
|
21
|
-
default:
|
|
22
|
-
return 'm';
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
get govColorClass(): string {
|
|
27
|
-
const severity = this.mapSeverityToGovColor(this.severity());
|
|
28
|
-
return severity ? `text-${severity}` : '';
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
get govClasses(): string {
|
|
32
|
-
const colorClass = this.govColorClass;
|
|
33
|
-
const customClass = this.class() || '';
|
|
34
|
-
return `${colorClass} ${customClass}`.trim();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
get bootstrapSizeClass(): string {
|
|
38
|
-
switch (this.size()) {
|
|
39
|
-
case 'small':
|
|
40
|
-
return 'fs-6';
|
|
41
|
-
case 'medium':
|
|
42
|
-
return 'fs-4';
|
|
43
|
-
case 'large':
|
|
44
|
-
return 'fs-2';
|
|
45
|
-
case 'xl':
|
|
46
|
-
return 'fs-1';
|
|
47
|
-
default:
|
|
48
|
-
return '';
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
get bootstrapClasses(): string {
|
|
53
|
-
const baseClass = `bi bi-${this.name()}`;
|
|
54
|
-
const sizeClass = this.bootstrapSizeClass;
|
|
55
|
-
const colorClass = this.mapSeverityToBootstrapClass(this.severity());
|
|
56
|
-
const customClass = this.class() || '';
|
|
57
|
-
return `${baseClass} ${sizeClass} ${colorClass} ${customClass}`.trim();
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
private mapSeverityToGovColor(severity: ControlSeverityType | undefined): string | undefined {
|
|
61
|
-
if (!severity) {
|
|
62
|
-
return undefined;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
switch (severity) {
|
|
66
|
-
case ControlSeverity.danger:
|
|
67
|
-
return 'error';
|
|
68
|
-
case ControlSeverity.warning:
|
|
69
|
-
return 'warning';
|
|
70
|
-
case ControlSeverity.success:
|
|
71
|
-
return 'success';
|
|
72
|
-
case ControlSeverity.secondary:
|
|
73
|
-
return 'secondary';
|
|
74
|
-
case ControlSeverity.info:
|
|
75
|
-
return 'neutral';
|
|
76
|
-
case ControlSeverity.help:
|
|
77
|
-
case ControlSeverity.primary:
|
|
78
|
-
case ControlSeverity.contrast:
|
|
79
|
-
return 'primary';
|
|
80
|
-
default:
|
|
81
|
-
return severity as string;
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
private mapSeverityToBootstrapClass(severity: ControlSeverityType | undefined): string {
|
|
86
|
-
if (!severity) {
|
|
87
|
-
return '';
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
switch (severity) {
|
|
91
|
-
case ControlSeverity.success:
|
|
92
|
-
return 'text-success';
|
|
93
|
-
case ControlSeverity.danger:
|
|
94
|
-
return 'text-danger';
|
|
95
|
-
case ControlSeverity.warning:
|
|
96
|
-
return 'text-warning';
|
|
97
|
-
case ControlSeverity.info:
|
|
98
|
-
return 'text-info';
|
|
99
|
-
case ControlSeverity.secondary:
|
|
100
|
-
return 'text-secondary';
|
|
101
|
-
case ControlSeverity.help:
|
|
102
|
-
case ControlSeverity.primary:
|
|
103
|
-
case ControlSeverity.contrast:
|
|
104
|
-
return 'text-primary';
|
|
105
|
-
default:
|
|
106
|
-
return `text-${severity}`;
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
}
|
|
110
|
-
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export * from './breadcrumb';
|
|
2
|
-
export * from './button';
|
|
3
|
-
export * from './calendar';
|
|
4
|
-
export * from './checkbox';
|
|
5
|
-
export * from './confirm-dialog';
|
|
6
|
-
export * from './dropdown';
|
|
7
|
-
export * from './dropdown-button';
|
|
8
|
-
export * from './errors';
|
|
9
|
-
export * from './feature-list';
|
|
10
|
-
export * from './filter';
|
|
11
|
-
export * from './form-field';
|
|
12
|
-
export * from './header';
|
|
13
|
-
export * from './icon';
|
|
14
|
-
export * from './input-group';
|
|
15
|
-
export * from './loader';
|
|
16
|
-
export * from './multiselect';
|
|
17
|
-
export * from './number-input';
|
|
18
|
-
export * from './page-header';
|
|
19
|
-
export * from './password';
|
|
20
|
-
export * from './radiobutton';
|
|
21
|
-
export * from './search';
|
|
22
|
-
export * from './section';
|
|
23
|
-
export * from './shared-components';
|
|
24
|
-
export * from './shared-components/action-button-group';
|
|
25
|
-
export * from './shared-components/dynamic-component';
|
|
26
|
-
export * from './shared-components/generic-field';
|
|
27
|
-
export * from './shared-components/generic-form';
|
|
28
|
-
export * from './side-menu';
|
|
29
|
-
export * from './snackbar';
|
|
30
|
-
export * from './stepper';
|
|
31
|
-
export * from './switch';
|
|
32
|
-
export * from './tab-view';
|
|
33
|
-
export * from './table';
|
|
34
|
-
export * from './tag';
|
|
35
|
-
export * from './textarea';
|
|
36
|
-
export * from './textfield';
|
|
37
|
-
export * from './tooltip';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './input-group.component';
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
<gov-form-control>
|
|
2
|
-
@if (label) {
|
|
3
|
-
<gov-form-label
|
|
4
|
-
[slot]="labelSlot"
|
|
5
|
-
[size]="size | govSize"
|
|
6
|
-
>
|
|
7
|
-
{{ label }}
|
|
8
|
-
</gov-form-label>
|
|
9
|
-
}
|
|
10
|
-
@if(prefix) {
|
|
11
|
-
<gov-icon
|
|
12
|
-
[name]="name"
|
|
13
|
-
/>
|
|
14
|
-
}
|
|
15
|
-
<gov-form-input
|
|
16
|
-
input-type="input-type"
|
|
17
|
-
[formControl]="formControl"
|
|
18
|
-
[minlength]="minlength"
|
|
19
|
-
[maxlength]="maxlength"
|
|
20
|
-
[size]='size | govSize'
|
|
21
|
-
[name]='name'
|
|
22
|
-
[role]='role'
|
|
23
|
-
[required]="required"
|
|
24
|
-
[readonly]="readonly"
|
|
25
|
-
[invalid]="ngControl?.errors ? true : false"
|
|
26
|
-
/>
|
|
27
|
-
@if(sufix) {
|
|
28
|
-
<gov-icon
|
|
29
|
-
[name]="name"
|
|
30
|
-
/>
|
|
31
|
-
}
|
|
32
|
-
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
33
|
-
@if (message) {
|
|
34
|
-
<gov-form-message
|
|
35
|
-
[slot]="messageSlot"
|
|
36
|
-
color="neutral"
|
|
37
|
-
>
|
|
38
|
-
{{ message }}
|
|
39
|
-
</gov-form-message>
|
|
40
|
-
}
|
|
41
|
-
</gov-form-control>
|
|
File without changes
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
Input,
|
|
6
|
-
Optional,
|
|
7
|
-
Self,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import {
|
|
10
|
-
ControlValueAccessor,
|
|
11
|
-
NgControl,
|
|
12
|
-
ReactiveFormsModule,
|
|
13
|
-
} from '@angular/forms';
|
|
14
|
-
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
15
|
-
import {
|
|
16
|
-
BaseFormInputComponent,
|
|
17
|
-
INPUT_GROUP_COMPONENT_TOKEN,
|
|
18
|
-
InputGroupCore,
|
|
19
|
-
InputGroupItem,
|
|
20
|
-
FieldSizeType,
|
|
21
|
-
FieldSize,
|
|
22
|
-
IconPositionType,
|
|
23
|
-
IconPosition,
|
|
24
|
-
SlotPositionType,
|
|
25
|
-
SlotPosition,
|
|
26
|
-
FieldTypeType,
|
|
27
|
-
FieldType,
|
|
28
|
-
} from '@verisoft/ui-core';
|
|
29
|
-
import { Icons } from '../../icons';
|
|
30
|
-
import { GovSizePipe } from '../../pipes';
|
|
31
|
-
import { ErrorComponent } from '../errors';
|
|
32
|
-
|
|
33
|
-
@Component({
|
|
34
|
-
selector: 'v-input-group',
|
|
35
|
-
imports: [
|
|
36
|
-
ReactiveFormsModule,
|
|
37
|
-
GovDesignSystemModule,
|
|
38
|
-
GovSizePipe,
|
|
39
|
-
ErrorComponent
|
|
40
|
-
],
|
|
41
|
-
templateUrl: './input-group.component.html',
|
|
42
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
43
|
-
providers: [
|
|
44
|
-
{
|
|
45
|
-
provide: INPUT_GROUP_COMPONENT_TOKEN,
|
|
46
|
-
useExisting: InputGroupComponent,
|
|
47
|
-
},
|
|
48
|
-
]
|
|
49
|
-
})
|
|
50
|
-
export class InputGroupComponent
|
|
51
|
-
extends BaseFormInputComponent
|
|
52
|
-
implements ControlValueAccessor, InputGroupCore
|
|
53
|
-
{
|
|
54
|
-
@Input() floatLabel!: boolean;
|
|
55
|
-
@Input() type: FieldTypeType = FieldType.text;
|
|
56
|
-
@Input() minlength = 0;
|
|
57
|
-
@Input() items!: InputGroupItem[];
|
|
58
|
-
@Input() prefix!: string;
|
|
59
|
-
@Input() sufix!: string;
|
|
60
|
-
@Input() maxlength = 524288;
|
|
61
|
-
@Input() name! : string;
|
|
62
|
-
@Input() role! : string;
|
|
63
|
-
@Input() message! : string;
|
|
64
|
-
@Input() size: FieldSizeType | undefined = FieldSize.medium;
|
|
65
|
-
@Input() icon!: string;
|
|
66
|
-
@Input() iconPos: IconPositionType = IconPosition.right;
|
|
67
|
-
@Input() labelSlot: SlotPositionType = SlotPosition.top;
|
|
68
|
-
@Input() messageSlot: SlotPositionType = SlotPosition.bottom;
|
|
69
|
-
|
|
70
|
-
icons = Icons;
|
|
71
|
-
|
|
72
|
-
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
73
|
-
super(ngControl);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './loader.component';
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { LoaderComponent } from './loader.component';
|
|
3
|
-
|
|
4
|
-
describe('LoaderComponent', () => {
|
|
5
|
-
let component: LoaderComponent;
|
|
6
|
-
let fixture: ComponentFixture<LoaderComponent>;
|
|
7
|
-
|
|
8
|
-
beforeEach(async () => {
|
|
9
|
-
await TestBed.configureTestingModule({
|
|
10
|
-
imports: [LoaderComponent],
|
|
11
|
-
}).compileComponents();
|
|
12
|
-
|
|
13
|
-
fixture = TestBed.createComponent(LoaderComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import { ChangeDetectionStrategy, Component, Input } from '@angular/core';
|
|
3
|
-
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
4
|
-
import {
|
|
5
|
-
LOADER_COMPONENT_TOKEN,
|
|
6
|
-
LoaderCore,
|
|
7
|
-
FieldSize,
|
|
8
|
-
FieldSizeType,
|
|
9
|
-
} from '@verisoft/ui-core';
|
|
10
|
-
import { GovSizePipe } from '../../pipes';
|
|
11
|
-
|
|
12
|
-
@Component({
|
|
13
|
-
selector: 'v-loader',
|
|
14
|
-
imports: [
|
|
15
|
-
GovDesignSystemModule,
|
|
16
|
-
GovSizePipe
|
|
17
|
-
],
|
|
18
|
-
templateUrl: './loader.component.html',
|
|
19
|
-
styleUrl: './loader.component.scss',
|
|
20
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
21
|
-
providers: [
|
|
22
|
-
{
|
|
23
|
-
provide: LOADER_COMPONENT_TOKEN,
|
|
24
|
-
useExisting: LoaderComponent,
|
|
25
|
-
}
|
|
26
|
-
]
|
|
27
|
-
})
|
|
28
|
-
export class LoaderComponent
|
|
29
|
-
implements LoaderCore
|
|
30
|
-
{
|
|
31
|
-
@Input() size: FieldSizeType = FieldSize.medium;
|
|
32
|
-
@Input() message!: string;
|
|
33
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './multiselect.component';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<gov-form-control>
|
|
2
|
-
<gov-form-label
|
|
3
|
-
[slot]="label"
|
|
4
|
-
[size]="size | govSize"
|
|
5
|
-
>
|
|
6
|
-
{{ label }}
|
|
7
|
-
</gov-form-label>
|
|
8
|
-
<gov-form-multi-select
|
|
9
|
-
[size]="size | govSize"
|
|
10
|
-
[formControl]="formControl"
|
|
11
|
-
[required]="required"
|
|
12
|
-
[invalid]="ngControl && ngControl.errors"
|
|
13
|
-
[options]="options | govMultiselectOptions : optionLabel : optionValue"
|
|
14
|
-
[placeholder]="placeholder ?? ''"
|
|
15
|
-
(gov-focus)="onDropdownShow()"
|
|
16
|
-
(gov-remove)="onDropdownClear()"
|
|
17
|
-
(gov-change)="selectionChange($event)"
|
|
18
|
-
(lazyLoadEvent)="onLazyLoad($any($event))"
|
|
19
|
-
/>
|
|
20
|
-
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
21
|
-
</gov-form-control>
|
|
File without changes
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
import { MultiselectComponent } from './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
|
-
});
|
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
EventEmitter,
|
|
6
|
-
Input,
|
|
7
|
-
OnChanges,
|
|
8
|
-
Optional,
|
|
9
|
-
Output,
|
|
10
|
-
Self,
|
|
11
|
-
SimpleChanges,
|
|
12
|
-
inject,
|
|
13
|
-
ChangeDetectorRef,
|
|
14
|
-
} from '@angular/core';
|
|
15
|
-
import {
|
|
16
|
-
ControlValueAccessor,
|
|
17
|
-
NgControl,
|
|
18
|
-
ReactiveFormsModule,
|
|
19
|
-
} from '@angular/forms';
|
|
20
|
-
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
21
|
-
import {
|
|
22
|
-
FilterEvent,
|
|
23
|
-
LazyLoadEvent,
|
|
24
|
-
} from '@verisoft/core';
|
|
25
|
-
import {
|
|
26
|
-
BaseFormInputComponent,
|
|
27
|
-
MULTISELECT_COMPONENT_TOKEN,
|
|
28
|
-
MultiselectCore,
|
|
29
|
-
FieldSize,
|
|
30
|
-
FieldSizeType,
|
|
31
|
-
SlotPosition,
|
|
32
|
-
SlotPositionType,
|
|
33
|
-
} from '@verisoft/ui-core';
|
|
34
|
-
import { Icons } from '../../icons';
|
|
35
|
-
import { GovMultiselectOptionsPipe, GovSizePipe } from '../../pipes';
|
|
36
|
-
import { ErrorComponent } from '../errors';
|
|
37
|
-
|
|
38
|
-
@Component({
|
|
39
|
-
selector: 'v-multiselect',
|
|
40
|
-
imports: [
|
|
41
|
-
ReactiveFormsModule,
|
|
42
|
-
GovDesignSystemModule,
|
|
43
|
-
GovSizePipe,
|
|
44
|
-
GovMultiselectOptionsPipe,
|
|
45
|
-
ErrorComponent
|
|
46
|
-
],
|
|
47
|
-
templateUrl: './multiselect.component.html',
|
|
48
|
-
styleUrl: './multiselect.component.scss',
|
|
49
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
50
|
-
providers: [
|
|
51
|
-
{
|
|
52
|
-
provide: MULTISELECT_COMPONENT_TOKEN,
|
|
53
|
-
useExisting: MultiselectComponent,
|
|
54
|
-
},
|
|
55
|
-
]
|
|
56
|
-
})
|
|
57
|
-
export class MultiselectComponent<T>
|
|
58
|
-
extends BaseFormInputComponent
|
|
59
|
-
implements ControlValueAccessor, OnChanges, MultiselectCore<T>
|
|
60
|
-
{
|
|
61
|
-
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
62
|
-
super(ngControl);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
@Input() options: T[] | undefined = [];
|
|
66
|
-
@Input() optionLabel!: string | undefined;
|
|
67
|
-
@Input() optionValue!: string | undefined;
|
|
68
|
-
@Input() dropdownIcon: string | undefined;
|
|
69
|
-
@Input() floatLabel: string | undefined;
|
|
70
|
-
@Input() editable = true;
|
|
71
|
-
@Input() display!: 'flex' | 'block';
|
|
72
|
-
@Input() errorSlot: SlotPositionType = SlotPosition.bottom;
|
|
73
|
-
@Input() lazy!: boolean;
|
|
74
|
-
@Input() filter!: boolean;
|
|
75
|
-
@Input() loading = false;
|
|
76
|
-
@Input() size: FieldSizeType = FieldSize.medium;
|
|
77
|
-
|
|
78
|
-
@Output() changed = new EventEmitter<any>();
|
|
79
|
-
@Output() showed = new EventEmitter<any>();
|
|
80
|
-
@Output() cleared = new EventEmitter<any>();
|
|
81
|
-
@Output() lazyLoad = new EventEmitter<LazyLoadEvent>();
|
|
82
|
-
@Output() filtered = new EventEmitter<FilterEvent>();
|
|
83
|
-
|
|
84
|
-
icons = Icons;
|
|
85
|
-
|
|
86
|
-
lazyLoadOptions: LazyLoadEvent = {
|
|
87
|
-
limit: 50,
|
|
88
|
-
offset: 0,
|
|
89
|
-
};
|
|
90
|
-
|
|
91
|
-
cdRef = inject(ChangeDetectorRef);
|
|
92
|
-
|
|
93
|
-
ngOnChanges(changes: SimpleChanges): void {
|
|
94
|
-
if (changes['options'] && !changes['options'].firstChange) {
|
|
95
|
-
this.cdRef.detectChanges();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
onLazyLoad(event: any): void {
|
|
100
|
-
if (this.options && this.options.length - event.last <= 0) {
|
|
101
|
-
this.lazyLoadOptions.offset = event.last;
|
|
102
|
-
this.lazyLoad.emit(this.lazyLoadOptions);
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
selectionChange(event: any): void {
|
|
107
|
-
this.cleared.emit(event);
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
onDropdownShow(): void {
|
|
111
|
-
this.showed.emit();
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
onDropdownClear(): void {
|
|
115
|
-
this.cleared.emit();
|
|
116
|
-
}
|
|
117
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './number-input.component';
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
<gov-form-control>
|
|
2
|
-
@if (label) {
|
|
3
|
-
<gov-form-label
|
|
4
|
-
[slot]="labelSlot"
|
|
5
|
-
[size]="size | govSize"
|
|
6
|
-
>
|
|
7
|
-
{{ label }}
|
|
8
|
-
</gov-form-label>
|
|
9
|
-
}
|
|
10
|
-
<gov-form-group>
|
|
11
|
-
<gov-form-input
|
|
12
|
-
[attr.input-type]="type"
|
|
13
|
-
[formControl]="formControl"
|
|
14
|
-
[minlength]="minlength"
|
|
15
|
-
[maxlength]="maxlength"
|
|
16
|
-
[size]='size | govSize'
|
|
17
|
-
[name]='name'
|
|
18
|
-
[role]='role'
|
|
19
|
-
[required]="required"
|
|
20
|
-
[readonly]="readonly"
|
|
21
|
-
[invalid]="ngControl?.errors ? true : false"
|
|
22
|
-
>
|
|
23
|
-
@if (icon) {
|
|
24
|
-
<gov-icon
|
|
25
|
-
[name]="icon"
|
|
26
|
-
[slot]="iconPos === 'left' ? 'icon-start' : 'icon-end'"
|
|
27
|
-
/>
|
|
28
|
-
} @if (prefix) {
|
|
29
|
-
<p slot="prefix">
|
|
30
|
-
{{ prefix }}
|
|
31
|
-
</p>
|
|
32
|
-
} @if (sufix) {
|
|
33
|
-
<p slot="sufix">
|
|
34
|
-
{{ sufix }}
|
|
35
|
-
</p>
|
|
36
|
-
}
|
|
37
|
-
</gov-form-input>
|
|
38
|
-
<v-validation-message [ngControl]="ngControl"></v-validation-message>
|
|
39
|
-
@if (message) {
|
|
40
|
-
<gov-form-message
|
|
41
|
-
[slot]="messageSlot"
|
|
42
|
-
color="neutral"
|
|
43
|
-
>
|
|
44
|
-
{{ message }}
|
|
45
|
-
</gov-form-message>
|
|
46
|
-
}
|
|
47
|
-
</gov-form-group>
|
|
48
|
-
</gov-form-control>
|
|
File without changes
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
ChangeDetectionStrategy,
|
|
4
|
-
Component,
|
|
5
|
-
Input,
|
|
6
|
-
Optional,
|
|
7
|
-
Self,
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import {
|
|
10
|
-
ControlValueAccessor,
|
|
11
|
-
NgControl,
|
|
12
|
-
ReactiveFormsModule,
|
|
13
|
-
} from '@angular/forms';
|
|
14
|
-
import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
|
|
15
|
-
import {
|
|
16
|
-
NumberInputCore,
|
|
17
|
-
NUMBER_INPUT_COMPONENT_TOKEN,
|
|
18
|
-
FieldType,
|
|
19
|
-
BaseFormInputComponent,
|
|
20
|
-
FieldSizeType,
|
|
21
|
-
FieldSize,
|
|
22
|
-
IconPositionType,
|
|
23
|
-
IconPosition,
|
|
24
|
-
SlotPositionType,
|
|
25
|
-
SlotPosition,
|
|
26
|
-
FieldTypeType,
|
|
27
|
-
} from '@verisoft/ui-core';
|
|
28
|
-
import { Icons } from '../../icons';
|
|
29
|
-
import { GovSizePipe } from '../../pipes';
|
|
30
|
-
import { ErrorComponent } from '../errors';
|
|
31
|
-
@Component({
|
|
32
|
-
selector: 'v-number-input',
|
|
33
|
-
imports: [
|
|
34
|
-
ReactiveFormsModule,
|
|
35
|
-
GovDesignSystemModule,
|
|
36
|
-
GovSizePipe,
|
|
37
|
-
ErrorComponent
|
|
38
|
-
],
|
|
39
|
-
templateUrl: './number-input.component.html',
|
|
40
|
-
styleUrl: './number-input.component.scss',
|
|
41
|
-
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
42
|
-
providers: [
|
|
43
|
-
{
|
|
44
|
-
provide: NUMBER_INPUT_COMPONENT_TOKEN,
|
|
45
|
-
useExisting: NumberInputComponent,
|
|
46
|
-
},
|
|
47
|
-
]
|
|
48
|
-
})
|
|
49
|
-
|
|
50
|
-
export class NumberInputComponent
|
|
51
|
-
extends BaseFormInputComponent
|
|
52
|
-
implements ControlValueAccessor, NumberInputCore
|
|
53
|
-
{
|
|
54
|
-
@Input() mode!: string;
|
|
55
|
-
@Input() currency!: string;
|
|
56
|
-
@Input() min!: number;
|
|
57
|
-
@Input() max!: number;
|
|
58
|
-
@Input() step = 1;
|
|
59
|
-
@Input() floatLabel!: boolean;
|
|
60
|
-
@Input() type: FieldTypeType = FieldType.number;
|
|
61
|
-
@Input() minlength = 0;
|
|
62
|
-
@Input() maxlength = 524288;
|
|
63
|
-
@Input() prefix!: string;
|
|
64
|
-
@Input() sufix!: string;
|
|
65
|
-
@Input() message!: string;
|
|
66
|
-
@Input() name! : string;
|
|
67
|
-
@Input() role! : string;
|
|
68
|
-
@Input() size: FieldSizeType | undefined = FieldSize.medium;
|
|
69
|
-
@Input() icon!: string;
|
|
70
|
-
@Input() iconPos: IconPositionType = IconPosition.right;
|
|
71
|
-
@Input() labelSlot: SlotPositionType = SlotPosition.top;
|
|
72
|
-
@Input() errorSlot: SlotPositionType = SlotPosition.bottom;
|
|
73
|
-
@Input() messageSlot: SlotPositionType = SlotPosition.bottom;
|
|
74
|
-
|
|
75
|
-
icons = Icons;
|
|
76
|
-
|
|
77
|
-
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
78
|
-
super(ngControl);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './page-header.component';
|