@verisoft/ui-primeng 20.1.1 → 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.
Files changed (219) hide show
  1. package/fesm2022/verisoft-ui-primeng.mjs +3003 -0
  2. package/fesm2022/verisoft-ui-primeng.mjs.map +1 -0
  3. package/index.d.ts +752 -0
  4. package/package.json +18 -6
  5. package/.eslintrc.json +0 -43
  6. package/assets/.gitkeep +0 -0
  7. package/jest.config.ts +0 -22
  8. package/ng-package.json +0 -14
  9. package/project.json +0 -36
  10. package/src/index.ts +0 -34
  11. package/src/lib/components/breadcrumb/breadcrumb.component.html +0 -11
  12. package/src/lib/components/breadcrumb/breadcrumb.component.scss +0 -18
  13. package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +0 -21
  14. package/src/lib/components/breadcrumb/breadcrumb.component.stories.ts +0 -36
  15. package/src/lib/components/breadcrumb/breadcrumb.component.ts +0 -27
  16. package/src/lib/components/breadcrumb/breadcrumb.pipe.ts +0 -13
  17. package/src/lib/components/breadcrumb/index.ts +0 -1
  18. package/src/lib/components/button/button-severity.pipe.ts +0 -20
  19. package/src/lib/components/button/button.component.html +0 -20
  20. package/src/lib/components/button/button.component.scss +0 -0
  21. package/src/lib/components/button/button.component.spec.ts +0 -21
  22. package/src/lib/components/button/button.component.ts +0 -49
  23. package/src/lib/components/button/index.ts +0 -1
  24. package/src/lib/components/calendar/calendar.component.html +0 -53
  25. package/src/lib/components/calendar/calendar.component.scss +0 -0
  26. package/src/lib/components/calendar/calendar.component.spec.ts +0 -21
  27. package/src/lib/components/calendar/calendar.component.ts +0 -70
  28. package/src/lib/components/calendar/index.ts +0 -1
  29. package/src/lib/components/checkbox/checkbox.component.html +0 -20
  30. package/src/lib/components/checkbox/checkbox.component.scss +0 -15
  31. package/src/lib/components/checkbox/checkbox.component.spec.ts +0 -21
  32. package/src/lib/components/checkbox/checkbox.component.stories.ts +0 -72
  33. package/src/lib/components/checkbox/checkbox.component.ts +0 -46
  34. package/src/lib/components/checkbox/index.ts +0 -1
  35. package/src/lib/components/confirm-dialog/confirm-dialog.component.html +0 -51
  36. package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +0 -3
  37. package/src/lib/components/confirm-dialog/confirm-dialog.component.spec.ts +0 -21
  38. package/src/lib/components/confirm-dialog/confirm-dialog.component.stories.ts +0 -74
  39. package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +0 -73
  40. package/src/lib/components/confirm-dialog/index.ts +0 -1
  41. package/src/lib/components/dropdown/dropdown.component.html +0 -93
  42. package/src/lib/components/dropdown/dropdown.component.scss +0 -16
  43. package/src/lib/components/dropdown/dropdown.component.spec.ts +0 -21
  44. package/src/lib/components/dropdown/dropdown.component.ts +0 -139
  45. package/src/lib/components/dropdown/index.ts +0 -1
  46. package/src/lib/components/dropdown-button/dropdown-button.component.html +0 -1
  47. package/src/lib/components/dropdown-button/dropdown-button.component.ts +0 -20
  48. package/src/lib/components/dropdown-button/index.ts +0 -1
  49. package/src/lib/components/errors/error.component.html +0 -7
  50. package/src/lib/components/errors/error.component.scss +0 -3
  51. package/src/lib/components/errors/error.component.ts +0 -34
  52. package/src/lib/components/errors/index.ts +0 -1
  53. package/src/lib/components/feature-list/directives/feature-list-column.directive.ts +0 -32
  54. package/src/lib/components/feature-list/directives/feature-list-filter-field.directive.ts +0 -8
  55. package/src/lib/components/feature-list/feature-list-filter.pipe.ts +0 -21
  56. package/src/lib/components/feature-list/feature-list-page.component.ts +0 -32
  57. package/src/lib/components/feature-list/feature-list-page.model.ts +0 -42
  58. package/src/lib/components/feature-list/feature-list.component.html +0 -59
  59. package/src/lib/components/feature-list/feature-list.component.scss +0 -10
  60. package/src/lib/components/feature-list/feature-list.component.ts +0 -341
  61. package/src/lib/components/feature-list/index.ts +0 -5
  62. package/src/lib/components/filter/directives/filter-field.directive.ts +0 -34
  63. package/src/lib/components/filter/filter.component.html +0 -68
  64. package/src/lib/components/filter/filter.component.scss +0 -0
  65. package/src/lib/components/filter/filter.component.spec.ts +0 -21
  66. package/src/lib/components/filter/filter.component.stories.ts +0 -23
  67. package/src/lib/components/filter/filter.component.ts +0 -281
  68. package/src/lib/components/filter/filter.model.ts +0 -18
  69. package/src/lib/components/filter/index.ts +0 -2
  70. package/src/lib/components/form-field/form-field.component.html +0 -42
  71. package/src/lib/components/form-field/form-field.component.scss +0 -0
  72. package/src/lib/components/form-field/form-field.component.spec.ts +0 -21
  73. package/src/lib/components/form-field/form-field.component.stories.ts +0 -69
  74. package/src/lib/components/form-field/form-field.component.ts +0 -37
  75. package/src/lib/components/form-field/index.ts +0 -1
  76. package/src/lib/components/header/header.component.html +0 -84
  77. package/src/lib/components/header/header.component.scss +0 -0
  78. package/src/lib/components/header/header.component.spec.ts +0 -21
  79. package/src/lib/components/header/header.component.stories.ts +0 -24
  80. package/src/lib/components/header/header.component.ts +0 -65
  81. package/src/lib/components/header/index.ts +0 -2
  82. package/src/lib/components/header/services/header-provider.service.ts +0 -15
  83. package/src/lib/components/icon/icon.component.html +0 -2
  84. package/src/lib/components/icon/icon.component.scss +0 -51
  85. package/src/lib/components/icon/icon.component.ts +0 -86
  86. package/src/lib/components/icon/index.ts +0 -2
  87. package/src/lib/components/input-group/index.ts +0 -1
  88. package/src/lib/components/input-group/input-group.component.html +0 -34
  89. package/src/lib/components/input-group/input-group.component.spec.ts +0 -21
  90. package/src/lib/components/input-group/input-group.component.ts +0 -58
  91. package/src/lib/components/loader/index.ts +0 -1
  92. package/src/lib/components/loader/loader.component.html +0 -5
  93. package/src/lib/components/loader/loader.component.scss +0 -0
  94. package/src/lib/components/loader/loader.component.spec.ts +0 -21
  95. package/src/lib/components/loader/loader.component.ts +0 -16
  96. package/src/lib/components/multiselect/index.ts +0 -1
  97. package/src/lib/components/multiselect/multiselect.component.html +0 -67
  98. package/src/lib/components/multiselect/multiselect.component.scss +0 -0
  99. package/src/lib/components/multiselect/multiselect.component.spec.ts +0 -21
  100. package/src/lib/components/multiselect/multiselect.component.ts +0 -120
  101. package/src/lib/components/number-input/index.ts +0 -1
  102. package/src/lib/components/number-input/number-input.component.html +0 -22
  103. package/src/lib/components/number-input/number-input.component.spec.ts +0 -21
  104. package/src/lib/components/number-input/number-input.component.ts +0 -55
  105. package/src/lib/components/page-header/index.ts +0 -1
  106. package/src/lib/components/page-header/page-header.component.html +0 -35
  107. package/src/lib/components/page-header/page-header.component.scss +0 -0
  108. package/src/lib/components/page-header/page-header.component.spec.ts +0 -21
  109. package/src/lib/components/page-header/page-header.component.ts +0 -31
  110. package/src/lib/components/password/index.ts +0 -1
  111. package/src/lib/components/password/password.component.html +0 -24
  112. package/src/lib/components/password/password.component.scss +0 -0
  113. package/src/lib/components/password/password.component.spec.ts +0 -21
  114. package/src/lib/components/password/password.component.ts +0 -56
  115. package/src/lib/components/radiobutton/index.ts +0 -1
  116. package/src/lib/components/radiobutton/radiobutton.component.html +0 -34
  117. package/src/lib/components/radiobutton/radiobutton.component.scss +0 -6
  118. package/src/lib/components/radiobutton/radiobutton.component.spec.ts +0 -21
  119. package/src/lib/components/radiobutton/radiobutton.component.stories.ts +0 -71
  120. package/src/lib/components/radiobutton/radiobutton.component.ts +0 -61
  121. package/src/lib/components/section/index.ts +0 -1
  122. package/src/lib/components/section/section.component.html +0 -25
  123. package/src/lib/components/section/section.component.scss +0 -0
  124. package/src/lib/components/section/section.component.spec.ts +0 -21
  125. package/src/lib/components/section/section.component.ts +0 -31
  126. package/src/lib/components/shared-components/.eslintrc.json +0 -42
  127. package/src/lib/components/shared-components/action-button-group/action-button-group.component.html +0 -25
  128. package/src/lib/components/shared-components/action-button-group/action-button-group.component.scss +0 -0
  129. package/src/lib/components/shared-components/action-button-group/action-button-group.component.spec.ts +0 -21
  130. package/src/lib/components/shared-components/action-button-group/action-button-group.component.ts +0 -111
  131. package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.html +0 -10
  132. package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.scss +0 -0
  133. package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.spec.ts +0 -21
  134. package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.ts +0 -69
  135. package/src/lib/components/shared-components/action-button-group/index.ts +0 -2
  136. package/src/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.ts +0 -142
  137. package/src/lib/components/shared-components/dynamic-component/dynamic-component.component.ts +0 -56
  138. package/src/lib/components/shared-components/dynamic-component/index.ts +0 -2
  139. package/src/lib/components/shared-components/generic-field/generic-field.component.html +0 -98
  140. package/src/lib/components/shared-components/generic-field/generic-field.component.spec.ts +0 -21
  141. package/src/lib/components/shared-components/generic-field/generic-field.component.ts +0 -90
  142. package/src/lib/components/shared-components/generic-field/index.ts +0 -1
  143. package/src/lib/components/shared-components/generic-form/generic-form.component.html +0 -46
  144. package/src/lib/components/shared-components/generic-form/generic-form.component.spec.ts +0 -21
  145. package/src/lib/components/shared-components/generic-form/generic-form.component.ts +0 -56
  146. package/src/lib/components/shared-components/generic-form/generic-form.model.spec.ts +0 -82
  147. package/src/lib/components/shared-components/generic-form/generic-form.model.ts +0 -68
  148. package/src/lib/components/shared-components/generic-form/index.ts +0 -2
  149. package/src/lib/components/shared-components/index.ts +0 -4
  150. package/src/lib/components/side-menu/index.ts +0 -2
  151. package/src/lib/components/side-menu/side-menu.component.html +0 -53
  152. package/src/lib/components/side-menu/side-menu.component.scss +0 -0
  153. package/src/lib/components/side-menu/side-menu.component.spec.ts +0 -21
  154. package/src/lib/components/side-menu/side-menu.component.ts +0 -96
  155. package/src/lib/components/side-menu/side-menu.module.ts +0 -66
  156. package/src/lib/components/slider/index.ts +0 -1
  157. package/src/lib/components/slider/slider.component.html +0 -19
  158. package/src/lib/components/slider/slider.component.spec.ts +0 -21
  159. package/src/lib/components/slider/slider.component.ts +0 -56
  160. package/src/lib/components/snackbar/index.ts +0 -2
  161. package/src/lib/components/snackbar/services/snackbar.service.ts +0 -45
  162. package/src/lib/components/snackbar/snackbar.component.html +0 -3
  163. package/src/lib/components/snackbar/snackbar.component.scss +0 -0
  164. package/src/lib/components/snackbar/snackbar.component.spec.ts +0 -21
  165. package/src/lib/components/snackbar/snackbar.component.stories.ts +0 -70
  166. package/src/lib/components/snackbar/snackbar.component.ts +0 -25
  167. package/src/lib/components/stepper/index.ts +0 -1
  168. package/src/lib/components/stepper/stepper.component.html +0 -35
  169. package/src/lib/components/stepper/stepper.component.spec.ts +0 -21
  170. package/src/lib/components/stepper/stepper.component.ts +0 -39
  171. package/src/lib/components/switch/index.ts +0 -1
  172. package/src/lib/components/switch/switch.component.html +0 -18
  173. package/src/lib/components/switch/switch.component.scss +0 -0
  174. package/src/lib/components/switch/switch.component.spec.ts +0 -21
  175. package/src/lib/components/switch/switch.component.stories.ts +0 -65
  176. package/src/lib/components/switch/switch.component.ts +0 -52
  177. package/src/lib/components/tab-view/index.ts +0 -2
  178. package/src/lib/components/tab-view/tab-view-item.component.ts +0 -22
  179. package/src/lib/components/tab-view/tab-view.component.html +0 -41
  180. package/src/lib/components/tab-view/tab-view.component.ts +0 -55
  181. package/src/lib/components/table/index.ts +0 -1
  182. package/src/lib/components/table/table-filter.pipe.ts +0 -59
  183. package/src/lib/components/table/table.component.html +0 -127
  184. package/src/lib/components/table/table.component.scss +0 -11
  185. package/src/lib/components/table/table.component.spec.ts +0 -21
  186. package/src/lib/components/table/table.component.stories.ts +0 -55
  187. package/src/lib/components/table/table.component.ts +0 -288
  188. package/src/lib/components/table/table.models.ts +0 -26
  189. package/src/lib/components/tag/index.ts +0 -2
  190. package/src/lib/components/tag/tag.component.html +0 -12
  191. package/src/lib/components/tag/tag.component.scss +0 -33
  192. package/src/lib/components/tag/tag.component.ts +0 -83
  193. package/src/lib/components/textarea/index.ts +0 -1
  194. package/src/lib/components/textarea/textarea.component.html +0 -40
  195. package/src/lib/components/textarea/textarea.component.scss +0 -5
  196. package/src/lib/components/textarea/textarea.component.spec.ts +0 -21
  197. package/src/lib/components/textarea/textarea.component.stories.ts +0 -98
  198. package/src/lib/components/textarea/textarea.component.ts +0 -62
  199. package/src/lib/components/textfield/index.ts +0 -1
  200. package/src/lib/components/textfield/textfield.component.html +0 -82
  201. package/src/lib/components/textfield/textfield.component.scss +0 -23
  202. package/src/lib/components/textfield/textfield.component.spec.ts +0 -21
  203. package/src/lib/components/textfield/textfield.component.stories.ts +0 -85
  204. package/src/lib/components/textfield/textfield.component.ts +0 -68
  205. package/src/lib/components/tooltip/index.ts +0 -1
  206. package/src/lib/components/tooltip/tooltip.component.html +0 -3
  207. package/src/lib/components/tooltip/tooltip.component.ts +0 -17
  208. package/src/lib/icons.ts +0 -36
  209. package/src/lib/interceptors/http-error-message.interceptor.ts +0 -35
  210. package/src/lib/pages/not-found-page/not-found-page.component.html +0 -26
  211. package/src/lib/pages/not-found-page/not-found-page.component.scss +0 -0
  212. package/src/lib/pages/not-found-page/not-found-page.component.spec.ts +0 -21
  213. package/src/lib/pages/not-found-page/not-found-page.component.ts +0 -16
  214. package/src/tab-view.ts +0 -1
  215. package/src/test-setup.ts +0 -8
  216. package/tsconfig.json +0 -29
  217. package/tsconfig.lib.json +0 -18
  218. package/tsconfig.lib.prod.json +0 -9
  219. package/tsconfig.spec.json +0 -16
@@ -1,98 +0,0 @@
1
- import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
2
- import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular';
3
- import { TextareaComponent } from './textarea.component';
4
-
5
- const meta: Meta<TextareaComponent> = {
6
- component: TextareaComponent,
7
- title: 'TextareaComponent',
8
- decorators: [
9
- moduleMetadata({
10
- imports: [ReactiveFormsModule],
11
- }),
12
- ],
13
- };
14
- export default meta;
15
- type Story = StoryObj<TextareaComponent>;
16
- const formGroup = new FormGroup({
17
- textarea: new FormControl(''),
18
- });
19
-
20
- export const Primary: Story = {
21
- render: (args: any) => ({
22
- props: {
23
- ...args,
24
- formGroup,
25
- },
26
- template: `
27
- <form [formGroup]="formGroup">
28
- <v-textarea
29
- formControlName="textarea"
30
- [label]="label"
31
- [rows]="rows"
32
- [cols]="cols"
33
- [disabled]="disabled"
34
- [readonly]="readonly"
35
- [required]="required"
36
- [tooltip]="tooltip"
37
- [placeholder]="placeholder"
38
- [testId]="testId"
39
- [formDisplay]="formDisplay"
40
- [autoResize]="autoResize"
41
- ></v-textarea>
42
- </form>
43
- `,
44
- }),
45
- args: {
46
- label: 'Description',
47
- rows: 5,
48
- cols: 30,
49
- formDisplay: 'block',
50
- autoResize: false,
51
- required: false,
52
- disabled: false,
53
- readonly: false,
54
- placeholder:
55
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
56
- testId: 'testId',
57
- tooltip: 'This is a tooltip lorem ipsum',
58
- },
59
- argTypes: {
60
- formDisplay: {
61
- options: ['block', 'flex'],
62
- control: { type: 'radio' },
63
- description:
64
- 'Defines if the **TextareaComponent** is in `flex` or `block` display mode',
65
- },
66
- label: {
67
- description:
68
- 'Label shown on the (top)left side of the **TextareaComponent** input',
69
- },
70
- rows: {
71
- description: 'Number of `rows` of the **TextareaComponent** input',
72
- },
73
- cols: {
74
- description: 'Number of `columns` of the **TextareaComponent** input',
75
- },
76
- tooltip: { description: 'Tooltip text of the **TextareaComponent**' },
77
- required: {
78
- description: 'Defines if the **TextareaComponent** is `required`',
79
- },
80
- autoResize: {
81
- description:
82
- 'Defines if the **TextareaComponent** should be auto-resized',
83
- },
84
- disabled: {
85
- description: 'Defines if the **TextareaComponent** is `disabled`',
86
- },
87
- readonly: {
88
- description: 'Defines if the **TextareaComponent** is `readonly`',
89
- },
90
- testId: { description: 'Test ID of the **TextareaComponent**' },
91
- placeholder: {
92
- description: 'Placeholder text for the **TextareaComponent**',
93
- },
94
- },
95
- parameters: {
96
- controls: { expanded: true },
97
- },
98
- };
@@ -1,62 +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 { BaseFormInputComponent, BaseInputControls, TEXTAREA_COMPONENT_TOKEN, TextareaCore } from '@verisoft/ui-core';
15
- import { FloatLabelModule } from 'primeng/floatlabel';
16
- import { Textarea } from 'primeng/textarea';
17
- import { ErrorComponent } from '../errors';
18
- import { FormFieldComponent } from '../form-field/form-field.component';
19
-
20
- @Component({
21
- selector: 'v-textarea',
22
- imports: [
23
- Textarea,
24
- ReactiveFormsModule,
25
- FormFieldComponent,
26
- FloatLabelModule,
27
- ErrorComponent
28
- ],
29
- templateUrl: './textarea.component.html',
30
- styleUrl: './textarea.component.scss',
31
- changeDetection: ChangeDetectionStrategy.OnPush,
32
- providers: [
33
- {
34
- provide: BaseInputControls,
35
- useExisting: TextareaComponent,
36
- },
37
- {
38
- provide: TEXTAREA_COMPONENT_TOKEN,
39
- useExisting: TextareaComponent,
40
- },
41
- ]
42
- })
43
- export class TextareaComponent
44
- extends BaseFormInputComponent
45
- implements ControlValueAccessor, TextareaCore
46
- {
47
- @Input()
48
- rows = 5;
49
-
50
- @Input()
51
- cols = 30;
52
-
53
- @Input()
54
- autoResize = false;
55
-
56
- @Input()
57
- floatLabel: string | undefined;
58
-
59
- constructor(@Optional() @Self() ngControl: NgControl) {
60
- super(ngControl);
61
- }
62
- }
@@ -1 +0,0 @@
1
- export * from './textfield.component';
@@ -1,82 +0,0 @@
1
- <div class="v-text-field">
2
- @if (!floatLabel && label) {
3
- <v-form-field
4
- class="w-100"
5
- [label]="label"
6
- [tooltip]="tooltip"
7
- [required]="isRequired()"
8
- [testId]="testId"
9
- [display]="formDisplay"
10
- >
11
- <span
12
- class="w-100 flex-grow-1"
13
- [ngClass]="{ 'p-input-icon-right': type === 'search' }"
14
- >
15
- <input
16
- pInputText
17
- [id]="inputId"
18
- [formControl]="formControl"
19
- [type]="type === 'search' ? 'text' : type"
20
- class="w-100 flex-grow-1 v-text-field"
21
- [required]="isRequired()"
22
- [readOnly]="readonly"
23
- [title]="label"
24
- [placeholder]="placeholder ? placeholder : ''"
25
- [ngClass]="{
26
- 'p-inputtext-sm': size === 'small',
27
- 'p-inputtext-lg': size === 'large'
28
- }"
29
- />
30
- @if (type === 'search') {
31
- <i
32
- class="pi ms-2 v-text-field__icon"
33
- [ngStyle]="{
34
- cursor: ngControl && ngControl.value ? 'pointer' : 'default'
35
- }"
36
- [ngClass]="{
37
- 'pi-search': ngControl && !ngControl.value,
38
- 'pi-times': ngControl && ngControl.value,
39
- }"
40
- (click)="ngControl && ngControl.value ? ngControl.reset() : null"
41
- ></i>
42
- }
43
- </span>
44
- </v-form-field>
45
- <v-validation-message [ngControl]="ngControl"></v-validation-message>
46
- } @else {
47
- <span
48
- class="w-100 flex-grow-1"
49
- [ngClass]="{ 'p-input-icon-right': type === 'search' }"
50
- >
51
- <p-floatLabel>
52
- <input
53
- pInputText
54
- type="text"
55
- [id]="inputId"
56
- class="w-100 flex-grow-1"
57
- [required]="isRequired()"
58
- [formControl]="formControl"
59
- [placeholder]="placeholder ? placeholder : ''"
60
- [ngClass]="{
61
- 'p-inputtext-sm': size === 'small',
62
- 'p-inputtext-lg': size === 'large'
63
- }"
64
- />
65
- <label [for]="inputId" class="v-text-field__label">{{ label }}</label>
66
- </p-floatLabel>
67
- @if (type === 'search') {
68
- <i
69
- class="pi ms-2 v-text-field__icon"
70
- [ngStyle]="{
71
- cursor: ngControl && ngControl.value ? 'pointer' : 'default'
72
- }"
73
- [ngClass]="{
74
- 'pi-search': ngControl && !ngControl.value,
75
- 'pi-times': ngControl && ngControl.value,
76
- }"
77
- (click)="ngControl && ngControl.value ? ngControl.reset() : null"
78
- ></i>
79
- }
80
- </span>
81
- }
82
- </div>
@@ -1,23 +0,0 @@
1
- .p-inputtext:focus .ng-invalid.ng-dirty {
2
- border-color: var(--error-color);
3
- }
4
-
5
- .p-inputtext.ng-dirty.ng-invalid {
6
- border-color: var(--error-color);
7
- }
8
-
9
- .verisoft-text-field {
10
- justify-content: center;
11
- width: 100%;
12
- }
13
-
14
- .p-input-icon-right {
15
- i.pi-times:hover {
16
- cursor: pointer;
17
- }
18
- }
19
-
20
- .p-inputtext.p-inputtext-lg {
21
- font-size: 1rem;
22
- padding: 0.75rem;
23
- }
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { TextfieldComponent } from './textfield.component';
3
-
4
- describe('TextfieldComponent', () => {
5
- let component: TextfieldComponent;
6
- let fixture: ComponentFixture<TextfieldComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [TextfieldComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(TextfieldComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,85 +0,0 @@
1
- import { FormControl, FormGroup, ReactiveFormsModule } from '@angular/forms';
2
- import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular';
3
- import { FieldSize, FieldType } from '@verisoft/ui-core';
4
- import { TextfieldComponent } from './textfield.component';
5
-
6
- const meta: Meta<TextfieldComponent> = {
7
- component: TextfieldComponent,
8
- title: 'TextfieldComponent',
9
- decorators: [
10
- moduleMetadata({
11
- imports: [ReactiveFormsModule],
12
- }),
13
- ],
14
- };
15
- export default meta;
16
- type Story = StoryObj<TextfieldComponent>;
17
- const formGroup = new FormGroup({
18
- formField: new FormControl(''),
19
- });
20
- export const Primary: Story = {
21
- render: (args: any) => ({
22
- props: {
23
- ...args,
24
- formGroup,
25
- },
26
- template: `
27
- <form [formGroup]="formGroup">
28
- <v-textfield
29
- formControlName="formField"
30
- [label]="label"
31
- [size]="size"
32
- [type]="type"
33
- [disabled]="disabled"
34
- [readonly]="readonly"
35
- [required]="required"
36
- [tooltip]="tooltip"
37
- [placeholder]="placeholder"
38
- [testId]="testId"
39
- ></v-textfield>
40
- </form>
41
- `,
42
- }),
43
- args: {
44
- label: 'Description',
45
- size: FieldSize.medium,
46
- type: FieldType.text,
47
- required: false,
48
- disabled: false,
49
- readonly: false,
50
- placeholder:
51
- 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.',
52
- testId: 'testId',
53
- tooltip: 'This is a tooltip lorem ipsum',
54
- },
55
- argTypes: {
56
- size: {
57
- options: ['small', 'medium', 'large'],
58
- control: { type: 'radio' },
59
- description: 'Defines the size of the `TextfieldComponent`',
60
- },
61
- type: {
62
- options: ['text', 'number', 'password', 'search'],
63
- control: { type: 'radio' },
64
- description: 'Defines the type of the `TextfieldComponent`',
65
- },
66
- label: {
67
- description:
68
- 'Label shown on the left side of the `TextfieldComponent` input',
69
- },
70
- tooltip: { description: 'Tooltip text of the `TextfieldComponent`' },
71
- required: {
72
- description: 'Defines if the `TextfieldComponent` is `required`',
73
- },
74
- disabled: {
75
- description: 'Defines if the `TextfieldComponent` is `disabled`',
76
- },
77
- readonly: {
78
- description: 'Defines if the `TextfieldComponent` is `readonly`',
79
- },
80
- testId: { description: 'Test ID of the `TextfieldComponent`' },
81
- },
82
- parameters: {
83
- controls: { expanded: true },
84
- },
85
- };
@@ -1,68 +0,0 @@
1
- import { CommonModule } from '@angular/common';
2
- import {
3
- ChangeDetectionStrategy,
4
- Component,
5
- forwardRef,
6
- Input,
7
- Optional,
8
- Self,
9
- } from '@angular/core';
10
- import {
11
- ControlValueAccessor,
12
- NgControl,
13
- ReactiveFormsModule,
14
- } from '@angular/forms';
15
- import {
16
- BaseFormInputComponent,
17
- BaseInputControls,
18
- FieldSize,
19
- FieldSizeType,
20
- FieldType,
21
- FieldTypeType,
22
- TEXTFIELD_COMPONENT_TOKEN,
23
- TextfieldCore,
24
- } from '@verisoft/ui-core';
25
- import { FloatLabelModule } from 'primeng/floatlabel';
26
- import { InputTextModule } from 'primeng/inputtext';
27
- import { Icons } from '../../icons';
28
- import { ErrorComponent } from '../errors';
29
- import { FormFieldComponent } from '../form-field/form-field.component';
30
-
31
- @Component({
32
- selector: 'v-textfield',
33
- imports: [
34
- CommonModule,
35
- InputTextModule,
36
- ReactiveFormsModule,
37
- FormFieldComponent,
38
- FloatLabelModule,
39
- ErrorComponent
40
- ],
41
- templateUrl: './textfield.component.html',
42
- styleUrl: './textfield.component.scss',
43
- changeDetection: ChangeDetectionStrategy.OnPush,
44
- providers: [
45
- {
46
- provide: BaseInputControls,
47
- useExisting: forwardRef(() => TextfieldComponent),
48
- },
49
- {
50
- provide: TEXTFIELD_COMPONENT_TOKEN,
51
- useExisting: TextfieldComponent,
52
- },
53
- ]
54
- })
55
- export class TextfieldComponent
56
- extends BaseFormInputComponent
57
- implements ControlValueAccessor, TextfieldCore
58
- {
59
- icons = Icons;
60
-
61
- constructor(@Optional() @Self() ngControl: NgControl) {
62
- super(ngControl);
63
- }
64
-
65
- @Input() size: FieldSizeType | undefined = FieldSize.medium;
66
- @Input() type: FieldTypeType = FieldType.text;
67
- @Input() floatLabel = false;
68
- }
@@ -1 +0,0 @@
1
- export * from './tooltip.component';
@@ -1,3 +0,0 @@
1
- <div class="d-inline-block v-tooltip" [pTooltip]="tooltipText()" [tooltipPosition]="position()">
2
- <ng-content></ng-content>
3
- </div>
@@ -1,17 +0,0 @@
1
- import { Component, input } from "@angular/core";
2
- import { ControlSeverityType, FieldSizeType, PositionType, TooltipCore } from "@verisoft/ui-core";
3
- import { TooltipModule } from "primeng/tooltip";
4
-
5
- @Component({
6
- selector: "v-tooltip",
7
- templateUrl: './tooltip.component.html',
8
- imports: [
9
- TooltipModule,
10
- ]
11
- })
12
- export class TooltipComponent implements TooltipCore {
13
- color = input<ControlSeverityType | undefined>(undefined);
14
- position = input<PositionType | undefined>(undefined);
15
- size = input<FieldSizeType | undefined>(undefined);
16
- tooltipText = input<string | undefined>(undefined);
17
- }
package/src/lib/icons.ts DELETED
@@ -1,36 +0,0 @@
1
- import { CommonIcons } from '@verisoft/ui-core';
2
-
3
- export const Icons: CommonIcons = {
4
- add: 'pi pi-plus',
5
- minus: 'pi pi-minus',
6
- delete: 'pi pi-trash',
7
- filter: 'pi pi-filter',
8
- download: 'pi pi-download',
9
- save: 'pi pi-save',
10
- print: 'pi pi-print',
11
- calendar: 'pi pi-calendar',
12
- edit: 'pi pi-pencil',
13
- settings: 'pi pi-cog',
14
- house: 'pi pi-home',
15
- chevronRight: 'pi pi-chevron-right',
16
- chevronLeft: 'pi pi-chevron-left',
17
- chevronDown: 'pi pi-chevron-down',
18
- chevronUp: 'pi pi-chevron-up',
19
- checkbox: 'pi pi-check',
20
- warning: 'pi pi-exclamation-triangle',
21
- search: 'pi pi-search',
22
- action: 'pi pi-bars',
23
- user: 'pi pi-user',
24
- logout: 'pi pi-user',
25
- crossCircle: 'pi pi-times-circle',
26
- infoCircle: 'pi pi-info-circle',
27
- cross: 'pi pi-times',
28
- arrowLeft: 'pi pi-arrow-left',
29
- arrowRight: 'pi pi-arrow-right',
30
- questionCircle: 'pi pi-question-circle',
31
- checkCircle: 'pi pi-check-circle',
32
- sitemap: 'pi pi-sitemap',
33
- check: 'pi pi-check',
34
- envelope: 'pi pi-envelope',
35
- loader: 'pi pi-loader',
36
- };
@@ -1,35 +0,0 @@
1
- import {
2
- HttpErrorResponse,
3
- HttpEvent,
4
- HttpHandler,
5
- HttpInterceptor,
6
- HttpRequest,
7
- } from '@angular/common/http';
8
- import { Injectable } from '@angular/core';
9
- import { catchError, Observable, throwError } from 'rxjs';
10
- import { SnackbarService } from '../components/snackbar';
11
-
12
- @Injectable()
13
- export class HttpErrorMessageInterceptor implements HttpInterceptor {
14
- constructor(private readonly snackbarService: SnackbarService) {}
15
- intercept(
16
- req: HttpRequest<any>,
17
- next: HttpHandler
18
- ): Observable<HttpEvent<any>> {
19
- return next.handle(req).pipe(
20
- catchError((errorResponse: HttpErrorResponse) => {
21
- if (!errorResponse.ok) {
22
- if (errorResponse.status === 403) {
23
- this.snackbarService.showError('Unauthorized request');
24
- console.error('Unauthorized request');
25
- } else {
26
- this.snackbarService.showError(errorResponse.message);
27
- console.error(errorResponse);
28
- }
29
- }
30
-
31
- return throwError(() => errorResponse);
32
- })
33
- );
34
- }
35
- }
@@ -1,26 +0,0 @@
1
- <div class="v-not-found">
2
- <div class="error-message p-4">
3
- <h1 class="text-primary">404 - PAGE NOT FOUND</h1>
4
- <p class="text-default">
5
- Sorry, the page you are looking for does not exist or has been moved.
6
- </p>
7
- <v-button
8
- class="back-button"
9
- size="small"
10
- label="Take me back"
11
- (click)="navigationBack()"
12
- />
13
- </div>
14
- <div class="images">
15
- <img
16
- src="assets/images/_global/hafan.jpeg"
17
- alt="Dog Image"
18
- class="dog-image"
19
- />
20
- <img
21
- src="assets/images/_global/bouda.png"
22
- alt="House Image"
23
- class="house-image"
24
- />
25
- </div>
26
- </div>
@@ -1,21 +0,0 @@
1
- import { ComponentFixture, TestBed } from '@angular/core/testing';
2
- import { NotFoundPageComponent } from './not-found-page.component';
3
-
4
- describe('NotFoundPageComponent', () => {
5
- let component: NotFoundPageComponent;
6
- let fixture: ComponentFixture<NotFoundPageComponent>;
7
-
8
- beforeEach(async () => {
9
- await TestBed.configureTestingModule({
10
- imports: [NotFoundPageComponent],
11
- }).compileComponents();
12
-
13
- fixture = TestBed.createComponent(NotFoundPageComponent);
14
- component = fixture.componentInstance;
15
- fixture.detectChanges();
16
- });
17
-
18
- it('should create', () => {
19
- expect(component).toBeTruthy();
20
- });
21
- });
@@ -1,16 +0,0 @@
1
-
2
- import { ChangeDetectionStrategy, Component } from '@angular/core';
3
- import { ButtonComponent } from '../../components/button';
4
-
5
- @Component({
6
- selector: 'v-not-found-page',
7
- imports: [ButtonComponent],
8
- templateUrl: './not-found-page.component.html',
9
- styleUrl: './not-found-page.component.scss',
10
- changeDetection: ChangeDetectionStrategy.OnPush
11
- })
12
- export class NotFoundPageComponent {
13
- navigationBack() {
14
- history.back();
15
- }
16
- }
package/src/tab-view.ts DELETED
@@ -1 +0,0 @@
1
- export * from './lib/components/tab-view';
package/src/test-setup.ts DELETED
@@ -1,8 +0,0 @@
1
- // @ts-expect-error https://thymikee.github.io/jest-preset-angular/docs/getting-started/test-environment
2
- globalThis.ngJest = {
3
- testEnvironmentOptions: {
4
- errorOnUnknownElements: true,
5
- errorOnUnknownProperties: true,
6
- },
7
- };
8
- import 'jest-preset-angular/setup-jest';
package/tsconfig.json DELETED
@@ -1,29 +0,0 @@
1
- {
2
- "compilerOptions": {
3
- "target": "es2022",
4
- "useDefineForClassFields": false,
5
- "forceConsistentCasingInFileNames": true,
6
- "strict": true,
7
- "noImplicitOverride": true,
8
- "noPropertyAccessFromIndexSignature": true,
9
- "noImplicitReturns": true,
10
- "noFallthroughCasesInSwitch": true
11
- },
12
- "files": [],
13
- "include": [],
14
- "references": [
15
- {
16
- "path": "./tsconfig.lib.json"
17
- },
18
- {
19
- "path": "./tsconfig.spec.json"
20
- }
21
- ],
22
- "extends": "../../../tsconfig.base.json",
23
- "angularCompilerOptions": {
24
- "enableI18nLegacyMessageIdFormat": false,
25
- "strictInjectionParameters": true,
26
- "strictInputAccessModifiers": true,
27
- "strictTemplates": true
28
- }
29
- }
package/tsconfig.lib.json DELETED
@@ -1,18 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "../../../dist/out-tsc",
5
- "declaration": true,
6
- "declarationMap": true,
7
- "inlineSources": true,
8
- "sourceMap": true,
9
- "types": []
10
- },
11
- "exclude": [
12
- "src/**/*.spec.ts",
13
- "src/test-setup.ts",
14
- "jest.config.ts",
15
- "src/**/*.test.ts"
16
- ],
17
- "include": ["src/**/*.ts"]
18
- }