@verisoft/ui-govcz 20.0.1 → 20.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (228) hide show
  1. package/.eslintrc.json +60 -0
  2. package/assets/i18n/cs.json +2 -0
  3. package/assets/i18n/en.json +2 -0
  4. package/jest.config.ts +21 -0
  5. package/ng-package.json +28 -0
  6. package/package.json +9 -19
  7. package/project.json +49 -0
  8. package/src/config.d.ts +10 -0
  9. package/src/index.ts +1 -0
  10. package/src/lib/components/breadcrumb/breadcrumb.component.html +25 -0
  11. package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -0
  12. package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +21 -0
  13. package/src/lib/components/breadcrumb/breadcrumb.component.ts +28 -0
  14. package/src/lib/components/breadcrumb/index.ts +1 -0
  15. package/src/lib/components/button/button.component.html +28 -0
  16. package/src/lib/components/button/button.component.scss +21 -0
  17. package/src/lib/components/button/button.component.ts +77 -0
  18. package/src/lib/components/button/index.ts +1 -0
  19. package/src/lib/components/calendar/calendar.component.html +28 -0
  20. package/src/lib/components/calendar/calendar.component.scss +0 -0
  21. package/src/lib/components/calendar/calendar.component.ts +77 -0
  22. package/src/lib/components/calendar/index.ts +1 -0
  23. package/src/lib/components/checkbox/checkbox.component.html +23 -0
  24. package/src/lib/components/checkbox/checkbox.component.scss +0 -0
  25. package/src/lib/components/checkbox/checkbox.component.ts +61 -0
  26. package/src/lib/components/checkbox/index.ts +1 -0
  27. package/src/lib/components/confirm-dialog/confirm-dialog.component.html +50 -0
  28. package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +4 -0
  29. package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +79 -0
  30. package/src/lib/components/confirm-dialog/index.ts +1 -0
  31. package/src/lib/components/dropdown/dropdown-item.component.html +8 -0
  32. package/src/lib/components/dropdown/dropdown-item.component.ts +18 -0
  33. package/src/lib/components/dropdown/dropdown.component.html +91 -0
  34. package/src/lib/components/dropdown/dropdown.component.scss +108 -0
  35. package/src/lib/components/dropdown/dropdown.component.spec.ts +21 -0
  36. package/src/lib/components/dropdown/dropdown.component.ts +296 -0
  37. package/src/lib/components/dropdown/dropdown.model.ts +6 -0
  38. package/src/lib/components/dropdown/index.ts +1 -0
  39. package/src/lib/components/dropdown-button/dropdown-button.component.html +31 -0
  40. package/src/lib/components/dropdown-button/dropdown-button.component.ts +34 -0
  41. package/src/lib/components/dropdown-button/index.ts +1 -0
  42. package/src/lib/components/errors/error.component.html +11 -0
  43. package/src/lib/components/errors/error.component.scss +0 -0
  44. package/src/lib/components/errors/error.component.spec.ts +19 -0
  45. package/src/lib/components/errors/error.component.ts +29 -0
  46. package/src/lib/components/errors/index.ts +1 -0
  47. package/src/lib/components/feature-list/directives/feature-list-column.directive.ts +32 -0
  48. package/src/lib/components/feature-list/directives/feature-list-filter-field.directive.ts +8 -0
  49. package/src/lib/components/feature-list/feature-list-filter.pipe.ts +20 -0
  50. package/src/lib/components/feature-list/feature-list-page.component.ts +30 -0
  51. package/src/lib/components/feature-list/feature-list-page.model.ts +42 -0
  52. package/src/lib/components/feature-list/feature-list.component.html +67 -0
  53. package/src/lib/components/feature-list/feature-list.component.scss +10 -0
  54. package/src/lib/components/feature-list/feature-list.component.ts +360 -0
  55. package/src/lib/components/feature-list/index.ts +5 -0
  56. package/src/lib/components/filter/directives/filter-field.directive.ts +35 -0
  57. package/src/lib/components/filter/filter.component.html +78 -0
  58. package/src/lib/components/filter/filter.component.scss +32 -0
  59. package/src/lib/components/filter/filter.component.spec.ts +21 -0
  60. package/src/lib/components/filter/filter.component.stories.ts +23 -0
  61. package/src/lib/components/filter/filter.component.ts +286 -0
  62. package/src/lib/components/filter/filter.model.ts +18 -0
  63. package/src/lib/components/filter/index.ts +2 -0
  64. package/src/lib/components/form-field/form-field.component.html +14 -0
  65. package/src/lib/components/form-field/form-field.component.scss +0 -0
  66. package/src/lib/components/form-field/form-field.component.spec.ts +21 -0
  67. package/src/lib/components/form-field/form-field.component.ts +76 -0
  68. package/src/lib/components/form-field/index.ts +1 -0
  69. package/src/lib/components/header/header.component.html +122 -0
  70. package/src/lib/components/header/header.component.scss +0 -0
  71. package/src/lib/components/header/header.component.ts +90 -0
  72. package/src/lib/components/header/index.ts +1 -0
  73. package/src/lib/components/icon/icon.component.html +11 -0
  74. package/src/lib/components/icon/icon.component.scss +20 -0
  75. package/src/lib/components/icon/icon.component.ts +110 -0
  76. package/src/lib/components/icon/index.ts +2 -0
  77. package/src/lib/components/index.ts +37 -0
  78. package/src/lib/components/input-group/index.ts +1 -0
  79. package/src/lib/components/input-group/input-group.component.html +41 -0
  80. package/src/lib/components/input-group/input-group.component.scss +0 -0
  81. package/src/lib/components/input-group/input-group.component.ts +75 -0
  82. package/src/lib/components/loader/index.ts +1 -0
  83. package/src/lib/components/loader/loader.component.html +7 -0
  84. package/src/lib/components/loader/loader.component.scss +0 -0
  85. package/src/lib/components/loader/loader.component.spec.ts +21 -0
  86. package/src/lib/components/loader/loader.component.ts +33 -0
  87. package/src/lib/components/multiselect/index.ts +1 -0
  88. package/src/lib/components/multiselect/multiselect.component.html +21 -0
  89. package/src/lib/components/multiselect/multiselect.component.scss +0 -0
  90. package/src/lib/components/multiselect/multiselect.component.spec.ts +21 -0
  91. package/src/lib/components/multiselect/multiselect.component.ts +117 -0
  92. package/src/lib/components/number-input/index.ts +1 -0
  93. package/src/lib/components/number-input/number-input.component.html +48 -0
  94. package/src/lib/components/number-input/number-input.component.scss +0 -0
  95. package/src/lib/components/number-input/number-input.component.ts +80 -0
  96. package/src/lib/components/page-header/index.ts +1 -0
  97. package/src/lib/components/page-header/page-header.component.html +3 -0
  98. package/src/lib/components/page-header/page-header.component.scss +11 -0
  99. package/src/lib/components/page-header/page-header.component.spec.ts +21 -0
  100. package/src/lib/components/page-header/page-header.component.ts +27 -0
  101. package/src/lib/components/password/index.ts +1 -0
  102. package/src/lib/components/password/password.component.html +31 -0
  103. package/src/lib/components/password/password.component.scss +0 -0
  104. package/src/lib/components/password/password.component.spec.ts +21 -0
  105. package/src/lib/components/password/password.component.ts +83 -0
  106. package/src/lib/components/radiobutton/index.ts +1 -0
  107. package/src/lib/components/radiobutton/radiobutton.component.html +23 -0
  108. package/src/lib/components/radiobutton/radiobutton.component.scss +0 -0
  109. package/src/lib/components/radiobutton/radiobutton.component.ts +61 -0
  110. package/src/lib/components/search/index.ts +1 -0
  111. package/src/lib/components/search/search.component.html +23 -0
  112. package/src/lib/components/search/search.component.scss +0 -0
  113. package/src/lib/components/search/search.component.ts +45 -0
  114. package/src/lib/components/section/index.ts +1 -0
  115. package/src/lib/components/section/section.component.html +26 -0
  116. package/src/lib/components/section/section.component.scss +0 -0
  117. package/src/lib/components/section/section.component.ts +55 -0
  118. package/src/lib/components/side-menu/index.ts +2 -0
  119. package/src/lib/components/side-menu/side-menu.component.html +22 -0
  120. package/src/lib/components/side-menu/side-menu.component.scss +17 -0
  121. package/src/lib/components/side-menu/side-menu.component.ts +42 -0
  122. package/src/lib/components/side-menu/side-menu.module.ts +56 -0
  123. package/src/lib/components/snackbar/index.ts +2 -0
  124. package/src/lib/components/snackbar/services/snackbar.service.ts +73 -0
  125. package/src/lib/components/snackbar/snackbar.component.html +14 -0
  126. package/src/lib/components/snackbar/snackbar.component.scss +0 -0
  127. package/src/lib/components/snackbar/snackbar.component.spec.ts +21 -0
  128. package/src/lib/components/snackbar/snackbar.component.ts +44 -0
  129. package/src/lib/components/snackbar/snackbar.model.ts +10 -0
  130. package/src/lib/components/stepper/index.ts +1 -0
  131. package/src/lib/components/stepper/stepper.component.html +35 -0
  132. package/src/lib/components/stepper/stepper.component.scss +9 -0
  133. package/src/lib/components/stepper/stepper.component.ts +60 -0
  134. package/src/lib/components/switch/index.ts +1 -0
  135. package/src/lib/components/switch/switch.component.html +16 -0
  136. package/src/lib/components/switch/switch.component.scss +0 -0
  137. package/src/lib/components/switch/switch.component.ts +39 -0
  138. package/src/lib/components/tab-view/index.ts +2 -0
  139. package/src/lib/components/tab-view/tab-view-item.component.ts +23 -0
  140. package/src/lib/components/tab-view/tab-view.component.html +51 -0
  141. package/src/lib/components/tab-view/tab-view.component.scss +43 -0
  142. package/src/lib/components/tab-view/tab-view.component.ts +64 -0
  143. package/src/lib/components/tab-view/tab-view.module.ts +25 -0
  144. package/src/lib/components/table/index.ts +1 -0
  145. package/src/lib/components/table/table-pagination-info.component.html +9 -0
  146. package/src/lib/components/table/table-pagination-info.component.ts +22 -0
  147. package/src/lib/components/table/table.component.html +199 -0
  148. package/src/lib/components/table/table.component.scss +192 -0
  149. package/src/lib/components/table/table.component.ts +390 -0
  150. package/src/lib/components/table/table.model.ts +17 -0
  151. package/src/lib/components/table/table.models.ts +12 -0
  152. package/src/lib/components/tag/index.ts +3 -0
  153. package/src/lib/components/tag/tag.component.html +12 -0
  154. package/src/lib/components/tag/tag.component.scss +4 -0
  155. package/src/lib/components/tag/tag.component.ts +44 -0
  156. package/src/lib/components/tag/tag.model.ts +7 -0
  157. package/src/lib/components/textarea/index.ts +1 -0
  158. package/src/lib/components/textarea/textarea.component.html +50 -0
  159. package/src/lib/components/textarea/textarea.component.scss +0 -0
  160. package/src/lib/components/textarea/textarea.component.ts +77 -0
  161. package/src/lib/components/textfield/index.ts +1 -0
  162. package/src/lib/components/textfield/textfield.component.html +34 -0
  163. package/src/lib/components/textfield/textfield.component.scss +0 -0
  164. package/src/lib/components/textfield/textfield.component.ts +112 -0
  165. package/src/lib/components/tooltip/index.ts +1 -0
  166. package/src/lib/components/tooltip/tooltip.component.html +9 -0
  167. package/src/lib/components/tooltip/tooltip.component.ts +19 -0
  168. package/src/lib/icons.ts +36 -0
  169. package/src/lib/index.ts +5 -0
  170. package/src/lib/init.service.ts +11 -0
  171. package/src/lib/interceptors/http-error-message.interceptor.ts +45 -0
  172. package/src/lib/pages/bad-request-page/bad-request-page.component.html +5 -0
  173. package/src/lib/pages/bad-request-page/bad-request-page.component.scss +0 -0
  174. package/src/lib/pages/bad-request-page/bad-request-page.component.ts +14 -0
  175. package/src/lib/pages/error-page/error-page.component.html +5 -0
  176. package/src/lib/pages/error-page/error-page.component.scss +0 -0
  177. package/src/lib/pages/error-page/error-page.component.ts +31 -0
  178. package/src/lib/pages/error-page/error-page.constants.ts +19 -0
  179. package/src/lib/pages/index.ts +3 -0
  180. package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.html +5 -0
  181. package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.scss +0 -0
  182. package/src/lib/pages/internal-server-error-page/internal-server-error-page.component.ts +15 -0
  183. package/src/lib/pages/not-authenticated/index.ts +1 -0
  184. package/src/lib/pages/not-authenticated/not-authenticated.component.html +5 -0
  185. package/src/lib/pages/not-authenticated/not-authenticated.component.ts +13 -0
  186. package/src/lib/pages/not-authorized/index.ts +1 -0
  187. package/src/lib/pages/not-authorized/not-authorized.component.html +5 -0
  188. package/src/lib/pages/not-authorized/not-authorized.component.ts +17 -0
  189. package/src/lib/pages/not-found/index.ts +1 -0
  190. package/src/lib/pages/not-found/not-found.component.html +5 -0
  191. package/src/lib/pages/not-found/not-found.component.ts +17 -0
  192. package/src/lib/pages/not-found-page/not-found-page.component.html +6 -0
  193. package/src/lib/pages/not-found-page/not-found-page.component.scss +0 -0
  194. package/src/lib/pages/not-found-page/not-found-page.component.ts +15 -0
  195. package/src/lib/pipes/color/color.pipe.ts +24 -0
  196. package/src/lib/pipes/index.ts +3 -0
  197. package/src/lib/pipes/multiselect/multiselect-options.pipe.ts +61 -0
  198. package/src/lib/pipes/size/size.pipe.ts +24 -0
  199. package/src/sass/foundations/_colors.scss +4 -0
  200. package/src/sass/foundations/index.scss +1 -0
  201. package/src/sass/integrations/_bootstrap.scss +4 -0
  202. package/src/sass/integrations/index.scss +1 -0
  203. package/src/sass/main.scss +12 -0
  204. package/src/sass/overrides/_gov.scss +4 -0
  205. package/src/sass/overrides/index.scss +1 -0
  206. package/src/sass/tokens/_theme-dark.scss +18 -0
  207. package/src/sass/tokens/_theme-light.scss +9 -0
  208. package/src/sass/tokens/index.scss +3 -0
  209. package/src/sass/utils/_table_filter.scss +4 -0
  210. package/src/sass/utils/index.scss +2 -0
  211. package/{styles → src}/sass/vendors/_bootstrap.scss +1 -0
  212. package/src/test-setup.ts +8 -0
  213. package/tsconfig.json +30 -0
  214. package/tsconfig.lib.json +17 -0
  215. package/tsconfig.lib.prod.json +9 -0
  216. package/tsconfig.spec.json +16 -0
  217. package/fesm2022/verisoft-ui-govcz.mjs +0 -3582
  218. package/fesm2022/verisoft-ui-govcz.mjs.map +0 -1
  219. package/index.d.ts +0 -955
  220. package/styles/dist/main.css +0 -9
  221. package/styles/dist/main.css.map +0 -1
  222. package/styles/sass/main.scss +0 -10
  223. package/styles/sass/utils/_variables.scss +0 -3
  224. package/styles/sass/utils/index.scss +0 -2
  225. /package/{styles → src}/sass/header.css +0 -0
  226. /package/{styles → src}/sass/header.scss +0 -0
  227. /package/{styles → src}/sass/scrollbar.scss +0 -0
  228. /package/{styles → src}/sass/utils/_utils.scss +0 -0
@@ -0,0 +1,112 @@
1
+
2
+ import {
3
+ ChangeDetectionStrategy,
4
+ Component,
5
+ Input,
6
+ OnInit,
7
+ Optional,
8
+ Self,
9
+ } from '@angular/core';
10
+ import {
11
+ ControlValueAccessor,
12
+ FormControl,
13
+ NgControl,
14
+ ReactiveFormsModule,
15
+ Validators,
16
+ } from '@angular/forms';
17
+ import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
18
+ import { TranslateModule } from '@ngx-translate/core';
19
+ import {
20
+ TextfieldCore,
21
+ TEXTFIELD_COMPONENT_TOKEN,
22
+ FieldType,
23
+ BaseFormInputComponent,
24
+ FieldSizeType,
25
+ FieldSize,
26
+ IconPositionType,
27
+ IconPosition,
28
+ SlotPositionType,
29
+ SlotPosition,
30
+ FieldTypeType,
31
+ } from '@verisoft/ui-core';
32
+ import { GovSizePipe } from '../../pipes';
33
+ import { ErrorComponent } from '../errors';
34
+ import { TooltipComponent } from '../tooltip';
35
+ @Component({
36
+ selector: 'v-textfield',
37
+ imports: [
38
+ ReactiveFormsModule,
39
+ GovDesignSystemModule,
40
+ TooltipComponent,
41
+ GovSizePipe,
42
+ TranslateModule,
43
+ ErrorComponent
44
+ ],
45
+ templateUrl: './textfield.component.html',
46
+ styleUrl: './textfield.component.scss',
47
+ changeDetection: ChangeDetectionStrategy.OnPush,
48
+ providers: [
49
+ {
50
+ provide: TEXTFIELD_COMPONENT_TOKEN,
51
+ useExisting: TextfieldComponent,
52
+ },
53
+ ]
54
+ })
55
+ export class TextfieldComponent
56
+ extends BaseFormInputComponent
57
+ implements ControlValueAccessor, TextfieldCore, OnInit
58
+ {
59
+ @Input() floatLabel!: boolean;
60
+ @Input() type: FieldTypeType = FieldType.text;
61
+ @Input() minlength = 0;
62
+ @Input() maxlength = 524288;
63
+ @Input() min = -2147483648;
64
+ @Input() max = 2147483647;
65
+ @Input() prefix!: string;
66
+ @Input() sufix!: string;
67
+ @Input() message!: string;
68
+ @Input() name!: string;
69
+ @Input() role!: string;
70
+ @Input() size: FieldSizeType | undefined = FieldSize.medium;
71
+ @Input() icon!: string;
72
+ @Input() iconPos: IconPositionType = IconPosition.right;
73
+ @Input() labelSlot: SlotPositionType = SlotPosition.top;
74
+ @Input() errorSlot: SlotPositionType = SlotPosition.bottom;
75
+ @Input() messageSlot: SlotPositionType = SlotPosition.bottom;
76
+
77
+ constructor(@Optional() @Self() ngControl: NgControl) {
78
+ super(ngControl);
79
+ if (ngControl) {
80
+ ngControl.valueAccessor = this;
81
+ }
82
+ }
83
+
84
+ override ngOnInit(): void {
85
+ super.ngOnInit();
86
+
87
+ if (!this.formControl && this.ngControl) {
88
+ this.formControl = this.ngControl.control as FormControl;
89
+ }
90
+
91
+ if (this.formControl && this.type === FieldType.number) {
92
+ this.setMinMaxNumberInputValidators();
93
+ }
94
+ }
95
+
96
+ private setMinMaxNumberInputValidators(): void {
97
+ if (!this.formControl) {
98
+ return;
99
+ }
100
+
101
+ const validators = [];
102
+ if (this.min !== undefined && this.min !== null) {
103
+ validators.push(Validators.min(this.min));
104
+ }
105
+ if (this.max !== undefined && this.max !== null) {
106
+ validators.push(Validators.max(this.max));
107
+ }
108
+
109
+ this.formControl.addValidators(validators);
110
+ this.formControl.updateValueAndValidity({ onlySelf: true, emitEvent: true });
111
+ }
112
+ }
@@ -0,0 +1 @@
1
+ export * from './tooltip.component';
@@ -0,0 +1,9 @@
1
+ <gov-tooltip
2
+ class="ms-2"
3
+ [color]="color"
4
+ [size]="size() | govSize"
5
+ [position]="position()"
6
+ [message]="tooltipText()"
7
+ >
8
+ <ng-content></ng-content>
9
+ </gov-tooltip>
@@ -0,0 +1,19 @@
1
+ import { Component, input } from "@angular/core";
2
+ import { GovDesignSystemModule } from "@gov-design-system-ce/angular";
3
+ import { ControlSeverityType, FieldSizeType, PositionType, TooltipCore } from "@verisoft/ui-core";
4
+ import { GovSizePipe } from "../../pipes";
5
+
6
+ @Component({
7
+ selector: "v-tooltip",
8
+ templateUrl: './tooltip.component.html',
9
+ imports: [
10
+ GovDesignSystemModule,
11
+ GovSizePipe
12
+ ]
13
+ })
14
+ export class TooltipComponent implements TooltipCore {
15
+ color = input<ControlSeverityType | undefined>(undefined);
16
+ position = input<PositionType | undefined>(undefined);
17
+ size = input<FieldSizeType | undefined>(undefined);
18
+ tooltipText = input<string | undefined>(undefined);
19
+ }
@@ -0,0 +1,36 @@
1
+ import { CommonIcons } from '@verisoft/ui-core';
2
+
3
+ export const Icons: CommonIcons = {
4
+ add: 'plus-lg',
5
+ minus: 'dash',
6
+ delete: 'trash',
7
+ filter: 'filter',
8
+ download: 'upload',
9
+ save: 'download',
10
+ print: 'print-fill',
11
+ edit: 'pencil',
12
+ calendar: 'calendar',
13
+ settings: 'gear',
14
+ house: 'house-door-fill',
15
+ chevronRight: 'chevron-right',
16
+ chevronDown: 'chevron-down',
17
+ chevronLeft: 'chevron-left',
18
+ chevronUp: 'chevron-up',
19
+ checkbox: 'check-square',
20
+ warning: 'exclamation-triangle-fill',
21
+ search: 'search',
22
+ action: 'bars',
23
+ user: 'user',
24
+ logout: 'logout',
25
+ crossCircle: 'x-circle',
26
+ infoCircle: 'info-circle',
27
+ cross: 'x-lg',
28
+ arrowLeft: 'arrow-left',
29
+ arrowRight: 'arrow-right',
30
+ questionCircle: 'question-circle',
31
+ checkCircle: 'check-circle',
32
+ sitemap: 'diagram',
33
+ check: 'check-lg',
34
+ envelope: 'envelope',
35
+ loader: 'loader',
36
+ };
@@ -0,0 +1,5 @@
1
+ export * from './components';
2
+ export * from './pipes';
3
+ export * from './init.service';
4
+ export * from './pages';
5
+ export * from './icons';
@@ -0,0 +1,11 @@
1
+ import { Injectable } from '@angular/core';
2
+ import { defineCustomElements } from "@gov-design-system-ce/components/loader";
3
+
4
+ @Injectable({
5
+ providedIn: 'root',
6
+ })
7
+ export class GovInitService {
8
+ constructor() {
9
+ defineCustomElements(window);
10
+ }
11
+ }
@@ -0,0 +1,45 @@
1
+ import {
2
+ HttpErrorResponse,
3
+ HttpEvent,
4
+ HttpHandler,
5
+ HttpInterceptor,
6
+ HttpRequest,
7
+ } from '@angular/common/http';
8
+ import { inject, Injectable } from '@angular/core';
9
+ import { catchError, Observable, throwError } from 'rxjs';
10
+ import { SnackbarService } from '../components';
11
+
12
+ @Injectable()
13
+ export class HttpErrorMessageInterceptor implements HttpInterceptor {
14
+
15
+ snackbarService = inject(SnackbarService);
16
+
17
+ intercept(
18
+ req: HttpRequest<any>,
19
+ next: HttpHandler
20
+ ): Observable<HttpEvent<any>> {
21
+ return next.handle(req).pipe(
22
+ catchError((errorResponse: HttpErrorResponse) => {
23
+ if (!errorResponse.ok) {
24
+
25
+ if (errorResponse.status === 400) {
26
+ console.error('Bad request');
27
+ } if (errorResponse.status === 403) {
28
+ this.snackbarService.showError('Unauthorized request');
29
+ console.error('Unauthorized request');
30
+ } if (errorResponse.status === 404) {
31
+ console.error('Entity not found');
32
+ } if (errorResponse.status === 422) {
33
+ console.error('Error occured during validation');
34
+ console.log(errorResponse);
35
+ } else {
36
+ this.snackbarService.showError(errorResponse.message);
37
+ console.error(errorResponse);
38
+ }
39
+ }
40
+
41
+ return throwError(() => errorResponse);
42
+ })
43
+ );
44
+ }
45
+ }
@@ -0,0 +1,5 @@
1
+ <gov-error-code>
2
+ <gov-icon type="complex" name="card-400" slot="icon"></gov-icon>
3
+ <p>Sorry, the server cannot or will not process the request</p>
4
+ <gov-button color="primary" size="m" type="solid" (gov-click)="navigationBack()">Go back</gov-button>
5
+ </gov-error-code>
@@ -0,0 +1,14 @@
1
+
2
+ import { Component } from '@angular/core';
3
+ import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
4
+ @Component({
5
+ selector: 'v-bad-request-page',
6
+ imports: [GovDesignSystemModule],
7
+ templateUrl: './bad-request-page.component.html',
8
+ styleUrl: './bad-request-page.component.scss'
9
+ })
10
+ export class BadRequestPageComponent {
11
+ navigationBack() {
12
+ history.back();
13
+ }
14
+ }
@@ -0,0 +1,5 @@
1
+ <gov-error-code>
2
+ <gov-icon type="complex" [name]="errorDetails.iconName" slot="icon"></gov-icon>
3
+ <p>{{errorDetails.message}}</p>
4
+ <gov-button color="primary" size="m" type="solid" (gov-click)="navigateToUrl()">Go back</gov-button>
5
+ </gov-error-code>
@@ -0,0 +1,31 @@
1
+
2
+ import { Component, Input } from '@angular/core';
3
+ import { Router } from '@angular/router';
4
+ import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
5
+ import { ErrorDetails, ERROR_MAP } from './error-page.constants';
6
+
7
+ @Component({
8
+ selector: 'v-error-page',
9
+ imports: [GovDesignSystemModule],
10
+ templateUrl: './error-page.component.html',
11
+ styleUrl: './error-page.component.scss'
12
+ })
13
+ export class ErrorPageComponent {
14
+ @Input() url!: string;
15
+ @Input() code = 404;
16
+
17
+ constructor(private router: Router) {}
18
+
19
+ get errorDetails(): ErrorDetails {
20
+ return ERROR_MAP[this.code];
21
+ }
22
+
23
+ navigateToUrl() {
24
+ if (this.url) {
25
+ this.router.navigate([this.url]);
26
+ }
27
+ else {
28
+ history.back();
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,19 @@
1
+ export interface ErrorDetails {
2
+ message: string;
3
+ iconName: string;
4
+ }
5
+
6
+ export const ERROR_MAP: Record<number, ErrorDetails> = {
7
+ 400: {
8
+ message: 'Sorry, the server cannot or will not process the request.',
9
+ iconName: 'card-400'
10
+ },
11
+ 404: {
12
+ message: 'Sorry, the page you are looking for does not exist or has been moved.',
13
+ iconName: 'card-404'
14
+ },
15
+ 500: {
16
+ message: 'Sorry, an unexpected condition was encountered.',
17
+ iconName: 'card-500'
18
+ }
19
+ };
@@ -0,0 +1,3 @@
1
+ export * from './not-authenticated';
2
+ export * from './not-authorized';
3
+ export * from './not-found';
@@ -0,0 +1,5 @@
1
+ <gov-error-code>
2
+ <gov-icon type="complex" name="card-500" slot="icon"></gov-icon>
3
+ <p>Sorry, an unexpected condition was encountered</p>
4
+ <gov-button color="primary" size="m" type="solid" (gov-click)="navigationBack()">Go back</gov-button>
5
+ </gov-error-code>
@@ -0,0 +1,15 @@
1
+
2
+ import { Component } from '@angular/core';
3
+ import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
4
+
5
+ @Component({
6
+ selector: 'v-internal-server-error-page',
7
+ imports: [GovDesignSystemModule],
8
+ templateUrl: './internal-server-error-page.component.html',
9
+ styleUrl: './internal-server-error-page.component.scss'
10
+ })
11
+ export class InternalServerErrorPageComponent {
12
+ navigationBack() {
13
+ history.back();
14
+ }
15
+ }
@@ -0,0 +1 @@
1
+ export * from './not-authenticated.component';
@@ -0,0 +1,5 @@
1
+ <gov-error-code>
2
+ <gov-icon type="complex" name="card-401" slot="icon"></gov-icon>
3
+ <p>You are not logged in, please do so.</p>
4
+ <v-button color="primary" size="medium" type="solid" label="Login" [routerLink]="['/login']" />
5
+ </gov-error-code>
@@ -0,0 +1,13 @@
1
+ import { Component } from "@angular/core";
2
+ import { GovDesignSystemModule } from "@gov-design-system-ce/angular";
3
+ import { ButtonComponent } from "./../../components";
4
+
5
+ @Component({
6
+ selector: 'v-not-authenticated',
7
+ templateUrl: "./not-authenticated.component.html",
8
+ imports: [
9
+ GovDesignSystemModule,
10
+ ButtonComponent,
11
+ ]
12
+ })
13
+ export class NotAuthenticatedComponent { }
@@ -0,0 +1 @@
1
+ export * from './not-authorized.component';
@@ -0,0 +1,5 @@
1
+ <gov-error-code>
2
+ <gov-icon type="complex" name="card-403" slot="icon"></gov-icon>
3
+ <p>You are not authorized to view this content.</p>
4
+ <v-button color="primary" size="medium" type="solid" label="Go back" (click)="goBack()" />
5
+ </gov-error-code>
@@ -0,0 +1,17 @@
1
+ import { Component } from "@angular/core";
2
+ import { GovDesignSystemModule } from "@gov-design-system-ce/angular";
3
+ import { ButtonComponent } from "../../components";
4
+
5
+ @Component({
6
+ selector: 'v-not-authorized',
7
+ templateUrl: "./not-authorized.component.html",
8
+ imports: [
9
+ GovDesignSystemModule,
10
+ ButtonComponent,
11
+ ]
12
+ })
13
+ export class NotAuthorizedComponent {
14
+ goBack(): void {
15
+ history.back();
16
+ }
17
+ }
@@ -0,0 +1 @@
1
+ export * from './not-found.component';
@@ -0,0 +1,5 @@
1
+ <gov-error-code>
2
+ <gov-icon type="complex" name="card-404" slot="icon"></gov-icon>
3
+ <p>The item you are looking for does not exist.</p>
4
+ <v-button color="primary" size="medium" type="solid" label="Go back" (click)="goBack()" />
5
+ </gov-error-code>
@@ -0,0 +1,17 @@
1
+ import { Component } from "@angular/core";
2
+ import { GovDesignSystemModule } from "@gov-design-system-ce/angular";
3
+ import { ButtonComponent } from "../../components";
4
+
5
+ @Component({
6
+ selector: 'v-not-found',
7
+ templateUrl: "./not-found.component.html",
8
+ imports: [
9
+ GovDesignSystemModule,
10
+ ButtonComponent
11
+ ]
12
+ })
13
+ export class NotFoundComponent {
14
+ goBack(): void {
15
+ history.back();
16
+ }
17
+ }
@@ -0,0 +1,6 @@
1
+ <gov-error-code>
2
+ <gov-icon type="complex" name="card-404" slot="icon"></gov-icon>
3
+ <p>This is not the page you are looking for.<br />Try searching for something
4
+ else.</p>
5
+ <gov-button color="primary" size="m" type="solid" (gov-click)="navigationBack()">Go back</gov-button>
6
+ </gov-error-code>
@@ -0,0 +1,15 @@
1
+
2
+ import { Component } from '@angular/core';
3
+ import { GovDesignSystemModule } from '@gov-design-system-ce/angular';
4
+
5
+ @Component({
6
+ selector: 'v-not-found-page',
7
+ imports: [GovDesignSystemModule],
8
+ templateUrl: './not-found-page.component.html',
9
+ styleUrl: './not-found-page.component.scss'
10
+ })
11
+ export class NotFoundPageComponent {
12
+ navigationBack() {
13
+ history.back();
14
+ }
15
+ }
@@ -0,0 +1,24 @@
1
+ import { Pipe, PipeTransform } from "@angular/core";
2
+ import { ControlSeverity, ControlSeverityType, GovControlSeverity } from "@verisoft/ui-core";
3
+
4
+ @Pipe({
5
+ name: 'govColor',
6
+ standalone: true,
7
+ })
8
+ export class GovColorPipe implements PipeTransform {
9
+ transform(color: ControlSeverityType | undefined): string | undefined {
10
+ switch (color) {
11
+ case ControlSeverity.danger:
12
+ return GovControlSeverity.error;
13
+
14
+ case ControlSeverity.info:
15
+ return GovControlSeverity.neutral;
16
+
17
+ case ControlSeverity.help:
18
+ case ControlSeverity.contrast:
19
+ return GovControlSeverity.primary;
20
+ }
21
+
22
+ return color;
23
+ }
24
+ }
@@ -0,0 +1,3 @@
1
+ export * from './color/color.pipe';
2
+ export * from './multiselect/multiselect-options.pipe';
3
+ export * from './size/size.pipe';
@@ -0,0 +1,61 @@
1
+ import { Pipe, PipeTransform } from '@angular/core';
2
+ import { GovFormMultiSelectItem } from '@gov-design-system-ce/components';
3
+
4
+ @Pipe({
5
+ name: 'govMultiselectOptions',
6
+ standalone: true,
7
+ })
8
+ export class GovMultiselectOptionsPipe implements PipeTransform {
9
+ transform(
10
+ options: any[] | undefined,
11
+ optionLabel?: string,
12
+ optionValue?: string,
13
+ addEmptyOption = false,
14
+ ): GovFormMultiSelectItem[] {
15
+ if (!options?.length) return [];
16
+
17
+ return this.convertToGovOption(options, addEmptyOption, optionLabel, optionValue);
18
+ }
19
+
20
+ private convertToGovOption(
21
+ options: any[],
22
+ addEmptyOption: boolean,
23
+ optionLabel?: string,
24
+ optionValue?: string
25
+ ): GovFormMultiSelectItem[] {
26
+ const convertedOptions: GovFormMultiSelectItem[] = [];
27
+ options.forEach((obj) => {
28
+ let stringKey = '';
29
+ let numberKey = '';
30
+
31
+ if (optionLabel && optionValue) {
32
+ stringKey = optionLabel;
33
+ numberKey = optionValue;
34
+ } else {
35
+ const keys = Object.keys(obj);
36
+
37
+ keys.forEach((key) => {
38
+ if (typeof obj[key] === 'string') {
39
+ stringKey = key;
40
+ } else if (typeof obj[key] === 'number') {
41
+ numberKey = key;
42
+ }
43
+ });
44
+ }
45
+
46
+ convertedOptions.push({
47
+ label: obj[stringKey] as string,
48
+ value: (obj[numberKey] as string)?.toString() ?? 'VALUE NOT SET',
49
+ });
50
+ });
51
+
52
+ if (addEmptyOption) {
53
+ convertedOptions.unshift({
54
+ label: '',
55
+ value: 'null',
56
+ });
57
+ }
58
+
59
+ return convertedOptions;
60
+ }
61
+ }
@@ -0,0 +1,24 @@
1
+ import { Pipe, PipeTransform } from "@angular/core";
2
+ import { FieldSize, FieldSizeType } from "@verisoft/ui-core";
3
+
4
+ @Pipe({
5
+ name: 'govSize',
6
+ standalone: true,
7
+ })
8
+ export class GovSizePipe implements PipeTransform {
9
+ transform(size: FieldSizeType | undefined): string | undefined {
10
+ switch (size) {
11
+ case FieldSize.small:
12
+ return 's';
13
+ case FieldSize.medium:
14
+ case undefined:
15
+ return 'm';
16
+ case FieldSize.large:
17
+ return 'l';
18
+ case FieldSize.xl:
19
+ return 'xl';
20
+ default:
21
+ return size;
22
+ }
23
+ }
24
+ }
@@ -0,0 +1,4 @@
1
+ /* colors variables */
2
+ :root {
3
+ --primary-rgb: 35, 98, 162;
4
+ }
@@ -0,0 +1 @@
1
+ @use './colors';
@@ -0,0 +1,4 @@
1
+ /* bootstrap overrides variables */
2
+ :root {
3
+ --bs-primary-rgb: var(--primary-rgb);
4
+ }
@@ -0,0 +1 @@
1
+ @use './bootstrap';
@@ -0,0 +1,12 @@
1
+ $version: '0.0.1';
2
+ @use './vendors/bootstrap';
3
+ @use './foundations/index' as foundations;
4
+ @use './tokens/index' as tokens;
5
+ @use './integrations/index' as integrations;
6
+ @use './utils';
7
+ @use './overrides/index' as overrides;
8
+
9
+ @import "@gov-design-system-ce/styles/tokens.css";
10
+ @import "@gov-design-system-ce/styles/styles.css";
11
+ @import "@gov-design-system-ce/styles/layout.css";
12
+ @import "@gov-design-system-ce/styles/components.css";
@@ -0,0 +1,4 @@
1
+ .gov-backdrop__background,
2
+ .gov-loading__content {
3
+ position: absolute;
4
+ }
@@ -0,0 +1 @@
1
+ @use './_gov';
@@ -0,0 +1,18 @@
1
+ @media (prefers-color-scheme: dark) {
2
+ :root:not([data-theme]) {
3
+ --v-filter-background: var(--background-block-primary);
4
+ --v-filter-header-background: var(--background-block-secondary);
5
+ --v-table-filter-background: var(--background-block-primary);
6
+ --v-filter-border: var(--border-subtlest);
7
+ --v-filter-records-text-color: var(--color-neutral-0);
8
+ }
9
+ }
10
+
11
+ :root[data-theme="dark"] {
12
+ --v-filter-background: var(--background-block-primary);
13
+ --v-filter-header-background: var(--background-block-secondary);
14
+ --v-table-filter-background: var(--background-block-primary);
15
+ --v-filter-border: var(--border-subtlest);
16
+ --v-filter-records-text-color: var(--color-neutral-0);
17
+ }
18
+