@verisoft/ui-primeng 19.0.1-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.
- package/.eslintrc.json +43 -0
- package/README.md +377 -3
- package/assets/.gitkeep +0 -0
- package/assets/sass/main.scss +9 -26
- package/assets/sass/themes/_verisoft_theme.scss +2 -0
- package/assets/sass/vendors/_bootstrap.scss +2 -2
- package/assets/sass/vendors/_primeng.scss +1 -2
- package/jest.config.ts +22 -0
- package/ng-package.json +14 -0
- package/package.json +14 -27
- package/project.json +36 -0
- package/{index.d.ts → src/index.ts} +4 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.html +11 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.scss +18 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.spec.ts +21 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.stories.ts +36 -0
- package/src/lib/components/breadcrumb/breadcrumb.component.ts +27 -0
- package/src/lib/components/breadcrumb/breadcrumb.pipe.ts +13 -0
- package/src/lib/components/button/button-severity.pipe.ts +20 -0
- package/src/lib/components/button/button.component.html +20 -0
- package/src/lib/components/button/button.component.scss +0 -0
- package/src/lib/components/button/button.component.spec.ts +21 -0
- package/src/lib/components/button/button.component.ts +49 -0
- package/src/lib/components/calendar/calendar.component.html +53 -0
- package/src/lib/components/calendar/calendar.component.scss +0 -0
- package/src/lib/components/calendar/calendar.component.spec.ts +21 -0
- package/src/lib/components/calendar/calendar.component.ts +70 -0
- package/src/lib/components/checkbox/checkbox.component.html +20 -0
- package/src/lib/components/checkbox/checkbox.component.scss +15 -0
- package/src/lib/components/checkbox/checkbox.component.spec.ts +21 -0
- package/src/lib/components/checkbox/checkbox.component.stories.ts +72 -0
- package/src/lib/components/checkbox/checkbox.component.ts +46 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +51 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.scss +3 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.spec.ts +21 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.stories.ts +74 -0
- package/src/lib/components/confirm-dialog/confirm-dialog.component.ts +73 -0
- package/src/lib/components/dropdown/dropdown.component.html +93 -0
- package/src/lib/components/dropdown/dropdown.component.scss +16 -0
- package/src/lib/components/dropdown/dropdown.component.spec.ts +21 -0
- package/src/lib/components/dropdown/dropdown.component.ts +139 -0
- package/src/lib/components/dropdown-button/dropdown-button.component.html +1 -0
- package/src/lib/components/dropdown-button/dropdown-button.component.ts +20 -0
- package/src/lib/components/dropdown-button/index.ts +1 -0
- package/src/lib/components/errors/error.component.html +7 -0
- package/src/lib/components/errors/error.component.scss +3 -0
- package/src/lib/components/errors/error.component.ts +34 -0
- package/src/lib/components/errors/index.ts +1 -0
- package/src/lib/components/feature-list/directives/feature-list-column.directive.ts +32 -0
- package/src/lib/components/feature-list/directives/feature-list-filter-field.directive.ts +8 -0
- package/src/lib/components/feature-list/feature-list-filter.pipe.ts +21 -0
- package/src/lib/components/feature-list/feature-list-page.component.ts +32 -0
- package/src/lib/components/feature-list/feature-list-page.model.ts +42 -0
- package/src/lib/components/feature-list/feature-list.component.html +59 -0
- package/src/lib/components/feature-list/feature-list.component.scss +10 -0
- package/src/lib/components/feature-list/feature-list.component.ts +341 -0
- package/src/lib/components/filter/directives/filter-field.directive.ts +34 -0
- package/src/lib/components/filter/filter.component.html +68 -0
- package/src/lib/components/filter/filter.component.scss +0 -0
- package/src/lib/components/filter/filter.component.spec.ts +21 -0
- package/src/lib/components/filter/filter.component.stories.ts +23 -0
- package/src/lib/components/filter/filter.component.ts +281 -0
- package/src/lib/components/filter/filter.model.ts +18 -0
- package/src/lib/components/form-field/form-field.component.html +42 -0
- package/src/lib/components/form-field/form-field.component.scss +0 -0
- package/src/lib/components/form-field/form-field.component.spec.ts +21 -0
- package/src/lib/components/form-field/form-field.component.stories.ts +69 -0
- package/src/lib/components/form-field/form-field.component.ts +37 -0
- package/src/lib/components/header/header.component.html +84 -0
- package/src/lib/components/header/header.component.scss +0 -0
- package/src/lib/components/header/header.component.spec.ts +21 -0
- package/src/lib/components/header/header.component.stories.ts +24 -0
- package/src/lib/components/header/header.component.ts +65 -0
- package/src/lib/components/header/services/header-provider.service.ts +15 -0
- package/src/lib/components/icon/icon.component.html +2 -0
- package/src/lib/components/icon/icon.component.scss +51 -0
- package/src/lib/components/icon/icon.component.ts +86 -0
- package/src/lib/components/icon/index.ts +2 -0
- package/src/lib/components/input-group/input-group.component.html +34 -0
- package/src/lib/components/input-group/input-group.component.spec.ts +21 -0
- package/src/lib/components/input-group/input-group.component.ts +58 -0
- package/src/lib/components/loader/loader.component.html +5 -0
- package/src/lib/components/loader/loader.component.scss +0 -0
- package/src/lib/components/loader/loader.component.spec.ts +21 -0
- package/src/lib/components/loader/loader.component.ts +16 -0
- package/src/lib/components/multiselect/multiselect.component.html +67 -0
- package/src/lib/components/multiselect/multiselect.component.scss +0 -0
- package/src/lib/components/multiselect/multiselect.component.spec.ts +21 -0
- package/src/lib/components/multiselect/multiselect.component.ts +120 -0
- package/src/lib/components/number-input/number-input.component.html +22 -0
- package/src/lib/components/number-input/number-input.component.spec.ts +21 -0
- package/src/lib/components/number-input/number-input.component.ts +55 -0
- package/src/lib/components/page-header/page-header.component.html +35 -0
- package/src/lib/components/page-header/page-header.component.scss +0 -0
- package/src/lib/components/page-header/page-header.component.spec.ts +21 -0
- package/src/lib/components/page-header/page-header.component.ts +31 -0
- package/src/lib/components/password/password.component.html +24 -0
- package/src/lib/components/password/password.component.scss +0 -0
- package/src/lib/components/password/password.component.spec.ts +21 -0
- package/src/lib/components/password/password.component.ts +56 -0
- package/src/lib/components/radiobutton/radiobutton.component.html +34 -0
- package/src/lib/components/radiobutton/radiobutton.component.scss +6 -0
- package/src/lib/components/radiobutton/radiobutton.component.spec.ts +21 -0
- package/src/lib/components/radiobutton/radiobutton.component.stories.ts +71 -0
- package/src/lib/components/radiobutton/radiobutton.component.ts +61 -0
- package/src/lib/components/section/section.component.html +25 -0
- package/src/lib/components/section/section.component.scss +0 -0
- package/src/lib/components/section/section.component.spec.ts +21 -0
- package/src/lib/components/section/section.component.ts +31 -0
- package/src/lib/components/shared-components/.eslintrc.json +42 -0
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.html +25 -0
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.scss +0 -0
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.spec.ts +21 -0
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.ts +111 -0
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.html +10 -0
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.scss +0 -0
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.spec.ts +21 -0
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.ts +69 -0
- package/src/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.ts +142 -0
- package/src/lib/components/shared-components/dynamic-component/dynamic-component.component.ts +56 -0
- package/{lib/components/shared-components/dynamic-component/index.d.ts → src/lib/components/shared-components/dynamic-component/index.ts} +2 -2
- package/src/lib/components/shared-components/generic-field/generic-field.component.html +98 -0
- package/src/lib/components/shared-components/generic-field/generic-field.component.spec.ts +21 -0
- package/src/lib/components/shared-components/generic-field/generic-field.component.ts +90 -0
- package/{lib/components/shared-components/generic-field/index.d.ts → src/lib/components/shared-components/generic-field/index.ts} +1 -1
- package/src/lib/components/shared-components/generic-form/generic-form.component.html +46 -0
- package/src/lib/components/shared-components/generic-form/generic-form.component.spec.ts +21 -0
- package/src/lib/components/shared-components/generic-form/generic-form.component.ts +56 -0
- package/src/lib/components/shared-components/generic-form/generic-form.model.spec.ts +82 -0
- package/src/lib/components/shared-components/generic-form/generic-form.model.ts +68 -0
- package/{lib/components/shared-components/generic-form/index.d.ts → src/lib/components/shared-components/generic-form/index.ts} +2 -2
- package/{lib/components/shared-components/index.d.ts → src/lib/components/shared-components/index.ts} +4 -6
- package/src/lib/components/side-menu/side-menu.component.html +53 -0
- package/src/lib/components/side-menu/side-menu.component.scss +0 -0
- package/src/lib/components/side-menu/side-menu.component.spec.ts +21 -0
- package/src/lib/components/side-menu/side-menu.component.ts +96 -0
- package/src/lib/components/side-menu/side-menu.module.ts +66 -0
- package/src/lib/components/slider/slider.component.html +19 -0
- package/src/lib/components/slider/slider.component.spec.ts +21 -0
- package/src/lib/components/slider/slider.component.ts +56 -0
- package/src/lib/components/snackbar/services/snackbar.service.ts +45 -0
- package/src/lib/components/snackbar/snackbar.component.html +3 -0
- package/src/lib/components/snackbar/snackbar.component.scss +0 -0
- package/src/lib/components/snackbar/snackbar.component.spec.ts +21 -0
- package/src/lib/components/snackbar/snackbar.component.stories.ts +70 -0
- package/src/lib/components/snackbar/snackbar.component.ts +25 -0
- package/src/lib/components/stepper/stepper.component.html +35 -0
- package/src/lib/components/stepper/stepper.component.spec.ts +21 -0
- package/src/lib/components/stepper/stepper.component.ts +39 -0
- package/src/lib/components/switch/switch.component.html +18 -0
- package/src/lib/components/switch/switch.component.scss +0 -0
- package/src/lib/components/switch/switch.component.spec.ts +21 -0
- package/src/lib/components/switch/switch.component.stories.ts +65 -0
- package/src/lib/components/switch/switch.component.ts +52 -0
- package/src/lib/components/tab-view/tab-view-item.component.ts +22 -0
- package/src/lib/components/tab-view/tab-view.component.html +41 -0
- package/src/lib/components/tab-view/tab-view.component.ts +55 -0
- package/src/lib/components/table/table-filter.pipe.ts +59 -0
- package/src/lib/components/table/table.component.html +127 -0
- package/src/lib/components/table/table.component.scss +11 -0
- package/src/lib/components/table/table.component.spec.ts +21 -0
- package/src/lib/components/table/table.component.stories.ts +55 -0
- package/src/lib/components/table/table.component.ts +288 -0
- package/src/lib/components/table/table.models.ts +26 -0
- package/src/lib/components/tag/index.ts +2 -0
- package/src/lib/components/tag/tag.component.html +12 -0
- package/src/lib/components/tag/tag.component.scss +33 -0
- package/src/lib/components/tag/tag.component.ts +83 -0
- package/src/lib/components/textarea/textarea.component.html +40 -0
- package/src/lib/components/textarea/textarea.component.scss +5 -0
- package/src/lib/components/textarea/textarea.component.spec.ts +21 -0
- package/src/lib/components/textarea/textarea.component.stories.ts +98 -0
- package/src/lib/components/textarea/textarea.component.ts +62 -0
- package/src/lib/components/textfield/textfield.component.html +82 -0
- package/src/lib/components/textfield/textfield.component.scss +23 -0
- package/src/lib/components/textfield/textfield.component.spec.ts +21 -0
- package/src/lib/components/textfield/textfield.component.stories.ts +85 -0
- package/src/lib/components/textfield/textfield.component.ts +68 -0
- package/src/lib/components/tooltip/index.ts +1 -0
- package/src/lib/components/tooltip/tooltip.component.html +3 -0
- package/src/lib/components/tooltip/tooltip.component.ts +17 -0
- package/src/lib/icons.ts +36 -0
- package/src/lib/interceptors/http-error-message.interceptor.ts +35 -0
- package/src/lib/pages/not-found-page/not-found-page.component.html +26 -0
- package/src/lib/pages/not-found-page/not-found-page.component.scss +0 -0
- package/src/lib/pages/not-found-page/not-found-page.component.spec.ts +21 -0
- package/src/lib/pages/not-found-page/not-found-page.component.ts +16 -0
- package/src/tab-view.ts +1 -0
- package/src/test-setup.ts +8 -0
- package/tsconfig.json +29 -0
- package/tsconfig.lib.json +18 -0
- package/tsconfig.lib.prod.json +9 -0
- package/tsconfig.spec.json +16 -0
- package/fesm2022/verisoft-ui-primeng.mjs +0 -2880
- package/fesm2022/verisoft-ui-primeng.mjs.map +0 -1
- package/lib/components/breadcrumb/breadcrumb.component.d.ts +0 -6
- package/lib/components/breadcrumb/breadcrumb.pipe.d.ts +0 -9
- package/lib/components/button/button-severity.pipe.d.ts +0 -9
- package/lib/components/button/button.component.d.ts +0 -20
- package/lib/components/calendar/calendar.component.d.ts +0 -17
- package/lib/components/checkbox/checkbox.component.d.ts +0 -10
- package/lib/components/confirm-dialog/confirm-dialog.component.d.ts +0 -15
- package/lib/components/dropdown/dropdown.component.d.ts +0 -38
- package/lib/components/dropdown-button/dropdown-button.component.d.ts +0 -14
- package/lib/components/dropdown-button/index.d.ts +0 -1
- package/lib/components/errors/error.component.d.ts +0 -16
- package/lib/components/errors/index.d.ts +0 -1
- package/lib/components/form-field/form-field.component.d.ts +0 -12
- package/lib/components/header/header.component.d.ts +0 -23
- package/lib/components/header/services/header-provider.service.d.ts +0 -10
- package/lib/components/input-group/input-group.component.d.ts +0 -9
- package/lib/components/loader/loader.component.d.ts +0 -6
- package/lib/components/multiselect/multiselect.component.d.ts +0 -34
- package/lib/components/number-input/number-input.component.d.ts +0 -14
- package/lib/components/page-header/page-header.component.d.ts +0 -10
- package/lib/components/password/password.component.d.ts +0 -11
- package/lib/components/radiobutton/radiobutton.component.d.ts +0 -10
- package/lib/components/section/section.component.d.ts +0 -12
- package/lib/components/shared-components/action-button-group/action-button-group.component.d.ts +0 -28
- package/lib/components/shared-components/action-button-group/components/action-button/action-button.component.d.ts +0 -24
- package/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.d.ts +0 -17
- package/lib/components/shared-components/dynamic-component/dynamic-component.component.d.ts +0 -16
- package/lib/components/shared-components/feature-list/directives/feature-list-column.directive.d.ts +0 -10
- package/lib/components/shared-components/feature-list/directives/feature-list-filter-field.directive.d.ts +0 -6
- package/lib/components/shared-components/feature-list/feature-list-filter.pipe.d.ts +0 -9
- package/lib/components/shared-components/feature-list/feature-list-page.component.d.ts +0 -9
- package/lib/components/shared-components/feature-list/feature-list-page.model.d.ts +0 -23
- package/lib/components/shared-components/feature-list/feature-list.component.d.ts +0 -62
- package/lib/components/shared-components/filter/directives/filter-field.directive.d.ts +0 -20
- package/lib/components/shared-components/filter/filter.component.d.ts +0 -53
- package/lib/components/shared-components/filter/filter.model.d.ts +0 -2
- package/lib/components/shared-components/generic-field/generic-field.component.d.ts +0 -28
- package/lib/components/shared-components/generic-form/generic-form.component.d.ts +0 -15
- package/lib/components/shared-components/generic-form/generic-form.model.d.ts +0 -4
- package/lib/components/side-menu/side-menu.component.d.ts +0 -27
- package/lib/components/side-menu/side-menu.module.d.ts +0 -13
- package/lib/components/slider/slider.component.d.ts +0 -12
- package/lib/components/snackbar/services/snackbar.service.d.ts +0 -12
- package/lib/components/snackbar/snackbar.component.d.ts +0 -9
- package/lib/components/stepper/stepper.component.d.ts +0 -17
- package/lib/components/switch/switch.component.d.ts +0 -9
- package/lib/components/tab-view/tab-view-item.component.d.ts +0 -12
- package/lib/components/tab-view/tab-view.component.d.ts +0 -17
- package/lib/components/table/table-filter.pipe.d.ts +0 -13
- package/lib/components/table/table.component.d.ts +0 -67
- package/lib/components/table/table.models.d.ts +0 -4
- package/lib/components/textarea/textarea.component.d.ts +0 -12
- package/lib/components/textfield/textfield.component.d.ts +0 -12
- package/lib/components/tooltip/index.d.ts +0 -1
- package/lib/components/tooltip/tooltip.component.d.ts +0 -10
- package/lib/icons.d.ts +0 -2
- package/lib/interceptors/http-error-message.interceptor.d.ts +0 -11
- /package/{lib/components/breadcrumb/index.d.ts → src/lib/components/breadcrumb/index.ts} +0 -0
- /package/{lib/components/button/index.d.ts → src/lib/components/button/index.ts} +0 -0
- /package/{lib/components/calendar/index.d.ts → src/lib/components/calendar/index.ts} +0 -0
- /package/{lib/components/checkbox/index.d.ts → src/lib/components/checkbox/index.ts} +0 -0
- /package/{lib/components/confirm-dialog/index.d.ts → src/lib/components/confirm-dialog/index.ts} +0 -0
- /package/{lib/components/dropdown/index.d.ts → src/lib/components/dropdown/index.ts} +0 -0
- /package/{lib/components/shared-components/feature-list/index.d.ts → src/lib/components/feature-list/index.ts} +0 -0
- /package/{lib/components/shared-components/filter/index.d.ts → src/lib/components/filter/index.ts} +0 -0
- /package/{lib/components/form-field/index.d.ts → src/lib/components/form-field/index.ts} +0 -0
- /package/{lib/components/header/index.d.ts → src/lib/components/header/index.ts} +0 -0
- /package/{lib/components/input-group/index.d.ts → src/lib/components/input-group/index.ts} +0 -0
- /package/{lib/components/loader/index.d.ts → src/lib/components/loader/index.ts} +0 -0
- /package/{lib/components/multiselect/index.d.ts → src/lib/components/multiselect/index.ts} +0 -0
- /package/{lib/components/number-input/index.d.ts → src/lib/components/number-input/index.ts} +0 -0
- /package/{lib/components/page-header/index.d.ts → src/lib/components/page-header/index.ts} +0 -0
- /package/{lib/components/password/index.d.ts → src/lib/components/password/index.ts} +0 -0
- /package/{lib/components/radiobutton/index.d.ts → src/lib/components/radiobutton/index.ts} +0 -0
- /package/{lib/components/section/index.d.ts → src/lib/components/section/index.ts} +0 -0
- /package/{lib/components/shared-components/action-button-group/index.d.ts → src/lib/components/shared-components/action-button-group/index.ts} +0 -0
- /package/{lib/components/side-menu/index.d.ts → src/lib/components/side-menu/index.ts} +0 -0
- /package/{lib/components/slider/index.d.ts → src/lib/components/slider/index.ts} +0 -0
- /package/{lib/components/snackbar/index.d.ts → src/lib/components/snackbar/index.ts} +0 -0
- /package/{lib/components/stepper/index.d.ts → src/lib/components/stepper/index.ts} +0 -0
- /package/{lib/components/switch/index.d.ts → src/lib/components/switch/index.ts} +0 -0
- /package/{lib/components/tab-view/index.d.ts → src/lib/components/tab-view/index.ts} +0 -0
- /package/{lib/components/table/index.d.ts → src/lib/components/table/index.ts} +0 -0
- /package/{lib/components/textarea/index.d.ts → src/lib/components/textarea/index.ts} +0 -0
- /package/{lib/components/textfield/index.d.ts → src/lib/components/textfield/index.ts} +0 -0
|
@@ -0,0 +1,82 @@
|
|
|
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>
|
|
@@ -0,0 +1,23 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,85 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './tooltip.component';
|
|
@@ -0,0 +1,17 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
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
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
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>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
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
|
+
});
|
|
@@ -0,0 +1,16 @@
|
|
|
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
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './lib/components/tab-view';
|
|
@@ -0,0 +1,8 @@
|
|
|
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
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"outDir": "../../../dist/out-tsc",
|
|
5
|
+
"module": "commonjs",
|
|
6
|
+
"target": "es2016",
|
|
7
|
+
"types": ["jest", "node"]
|
|
8
|
+
},
|
|
9
|
+
"files": ["src/test-setup.ts"],
|
|
10
|
+
"include": [
|
|
11
|
+
"jest.config.ts",
|
|
12
|
+
"src/**/*.test.ts",
|
|
13
|
+
"src/**/*.spec.ts",
|
|
14
|
+
"src/**/*.d.ts"
|
|
15
|
+
]
|
|
16
|
+
}
|