@verisoft/ui-primeng 18.6.0 → 18.7.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 +53 -3
- package/assets/.gitkeep +0 -0
- package/assets/fonts/orbitron-black.ttf +0 -0
- package/assets/fonts/orbitron-bold.otf +0 -0
- package/assets/icons/complex/v-logo.svg +4 -0
- package/assets/images/_global/elon.jpg +0 -0
- package/assets/images/_global/jara.png +0 -0
- package/assets/images/_global/logos/v-logo.webp +0 -0
- package/assets/sass/base/_scrollbar.scss +18 -0
- package/assets/sass/base/_typography.scss +25 -0
- package/assets/sass/layout/_app.scss +27 -0
- package/assets/sass/layout/_button.scss +57 -0
- package/assets/sass/layout/_checkbox.scss +33 -0
- package/assets/sass/layout/_dialog.scss +13 -0
- package/assets/sass/layout/_dropdown.scss +9 -0
- package/assets/sass/layout/_formField.scss +5 -0
- package/assets/sass/layout/_header.scss +63 -0
- package/assets/sass/layout/_icons.scss +13 -0
- package/assets/sass/layout/_inputSwitch.scss +13 -0
- package/assets/sass/layout/_layout.scss +6 -0
- package/assets/sass/layout/_loader.scss +9 -0
- package/assets/sass/layout/_radiobutton.scss +21 -0
- package/assets/sass/layout/_sidemenu.scss +173 -0
- package/assets/sass/layout/_snackbar.scss +8 -0
- package/assets/sass/layout/_tables.scss +5 -0
- package/assets/sass/layout/_tree.scss +12 -0
- package/assets/sass/layout/_tristatecheckbox.scss +15 -0
- package/assets/sass/main.scss +28 -0
- package/assets/sass/themes/_verisoft_theme.scss +46 -0
- package/assets/sass/utils/_mixins.scss +0 -0
- package/assets/sass/utils/_utils.scss +39 -0
- package/assets/sass/utils/_variables.scss +12 -0
- package/assets/sass/vendors/_bootstrap.scss +2 -0
- package/assets/sass/vendors/_primeng.scss +2 -0
- package/jest.config.ts +22 -0
- package/ng-package.json +15 -0
- package/package.json +22 -37
- package/project.json +36 -0
- package/{index.d.ts → src/index.ts} +29 -29
- package/src/lib/components/breadcrumb/breadcrumb.component.html +12 -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 +29 -0
- package/src/lib/components/breadcrumb/breadcrumb.pipe.ts +13 -0
- package/{lib/components/breadcrumb/index.d.ts → src/lib/components/breadcrumb/index.ts} +1 -1
- 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/{lib/components/button/index.d.ts → src/lib/components/button/index.ts} +1 -1
- 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 +72 -0
- package/{lib/components/calendar/index.d.ts → src/lib/components/calendar/index.ts} +1 -1
- package/src/lib/components/checkbox/checkbox.component.html +19 -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 +45 -0
- package/{lib/components/checkbox/index.d.ts → src/lib/components/checkbox/index.ts} +1 -1
- package/src/lib/components/confirm-dialog/confirm-dialog.component.html +48 -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 +74 -0
- package/{lib/components/confirm-dialog/index.d.ts → src/lib/components/confirm-dialog/index.ts} +1 -1
- package/src/lib/components/dropdown/dropdown.component.html +96 -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.stories.ts +90 -0
- package/src/lib/components/dropdown/dropdown.component.ts +144 -0
- package/{lib/components/dropdown/index.d.ts → src/lib/components/dropdown/index.ts} +1 -1
- package/src/lib/components/errors/error.component.html +6 -0
- package/src/lib/components/errors/error.component.scss +3 -0
- package/src/lib/components/errors/error.component.ts +35 -0
- package/src/lib/components/errors/index.ts +1 -0
- package/src/lib/components/form-field/form-field.component.html +36 -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 +38 -0
- package/{lib/components/form-field/index.d.ts → src/lib/components/form-field/index.ts} +1 -1
- 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 +66 -0
- package/{lib/components/header/index.d.ts → src/lib/components/header/index.ts} +2 -2
- package/src/lib/components/header/services/header-provider.service.ts +15 -0
- package/{lib/components/input-group/index.d.ts → src/lib/components/input-group/index.ts} +1 -1
- package/src/lib/components/input-group/input-group.component.html +30 -0
- package/src/lib/components/input-group/input-group.component.spec.ts +21 -0
- package/src/lib/components/input-group/input-group.component.ts +60 -0
- package/{lib/components/loader/index.d.ts → src/lib/components/loader/index.ts} +1 -1
- 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 +17 -0
- package/{lib/components/multiselect/index.d.ts → src/lib/components/multiselect/index.ts} +1 -1
- package/src/lib/components/multiselect/multiselect.component.html +70 -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 +122 -0
- package/{lib/components/number-input/index.d.ts → src/lib/components/number-input/index.ts} +1 -1
- 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 +57 -0
- package/{lib/components/page-header/index.d.ts → src/lib/components/page-header/index.ts} +1 -1
- package/src/lib/components/page-header/page-header.component.html +31 -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 +32 -0
- package/{lib/components/password/index.d.ts → src/lib/components/password/index.ts} +1 -1
- 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 +58 -0
- package/{lib/components/radiobutton/index.d.ts → src/lib/components/radiobutton/index.ts} +1 -1
- package/src/lib/components/radiobutton/radiobutton.component.html +32 -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 +62 -0
- package/{lib/components/section/index.d.ts → src/lib/components/section/index.ts} +1 -1
- package/src/lib/components/section/section.component.html +23 -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 +32 -0
- package/src/lib/components/shared-components/action-button-group/action-button-group.component.html +27 -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 +114 -0
- package/src/lib/components/shared-components/action-button-group/components/action-button/action-button.component.html +11 -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 +71 -0
- package/{lib/components/shared-components/action-button-group/index.d.ts → src/lib/components/shared-components/action-button-group/index.ts} +2 -2
- 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/feature-list/directives/feature-list-column.directive.ts +32 -0
- package/src/lib/components/shared-components/feature-list/directives/feature-list-filter-field.directive.ts +8 -0
- package/src/lib/components/shared-components/feature-list/feature-list-filter.pipe.ts +21 -0
- package/src/lib/components/shared-components/feature-list/feature-list-page.component.ts +31 -0
- package/src/lib/components/shared-components/feature-list/feature-list-page.model.ts +42 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.html +59 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.scss +10 -0
- package/src/lib/components/shared-components/feature-list/feature-list.component.ts +342 -0
- package/{lib/components/shared-components/feature-list/index.d.ts → src/lib/components/shared-components/feature-list/index.ts} +5 -5
- package/src/lib/components/shared-components/filter/directives/filter-field.directive.ts +35 -0
- package/src/lib/components/shared-components/filter/filter.component.html +68 -0
- package/src/lib/components/shared-components/filter/filter.component.scss +0 -0
- package/src/lib/components/shared-components/filter/filter.component.spec.ts +21 -0
- package/src/lib/components/shared-components/filter/filter.component.stories.ts +23 -0
- package/src/lib/components/shared-components/filter/filter.component.ts +284 -0
- package/src/lib/components/shared-components/filter/filter.model.ts +18 -0
- package/{lib/components/shared-components/filter/index.d.ts → src/lib/components/shared-components/filter/index.ts} +2 -2
- package/src/lib/components/shared-components/generic-field/generic-field.component.html +97 -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 +94 -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 +57 -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} +6 -6
- package/{lib/components/side-menu/index.d.ts → src/lib/components/side-menu/index.ts} +2 -2
- package/src/lib/components/side-menu/side-menu.component.html +52 -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 +98 -0
- package/src/lib/components/side-menu/side-menu.module.ts +66 -0
- package/{lib/components/slider/index.d.ts → src/lib/components/slider/index.ts} +1 -1
- 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 +58 -0
- package/{lib/components/snackbar/index.d.ts → src/lib/components/snackbar/index.ts} +2 -2
- 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 +26 -0
- package/{lib/components/stepper/index.d.ts → src/lib/components/stepper/index.ts} +1 -1
- package/src/lib/components/stepper/stepper.component.html +43 -0
- package/src/lib/components/stepper/stepper.component.spec.ts +21 -0
- package/src/lib/components/stepper/stepper.component.ts +40 -0
- package/{lib/components/switch/index.d.ts → src/lib/components/switch/index.ts} +1 -1
- 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 +54 -0
- package/{lib/components/tab-view/index.d.ts → src/lib/components/tab-view/index.ts} +3 -3
- package/src/lib/components/tab-view/tab-menu.pipe.ts +23 -0
- package/src/lib/components/tab-view/tab-view-item.component.ts +22 -0
- package/src/lib/components/tab-view/tab-view.component.html +23 -0
- package/src/lib/components/tab-view/tab-view.component.ts +55 -0
- package/src/lib/components/tab-view/tab-view.module.ts +19 -0
- package/{lib/components/table/index.d.ts → src/lib/components/table/index.ts} +1 -1
- package/src/lib/components/table/table-filter.pipe.ts +59 -0
- package/src/lib/components/table/table.component.html +123 -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 +289 -0
- package/src/lib/components/table/table.models.ts +26 -0
- package/{lib/components/textarea/index.d.ts → src/lib/components/textarea/index.ts} +1 -1
- 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 +64 -0
- package/{lib/components/textfield/index.d.ts → src/lib/components/textfield/index.ts} +1 -1
- package/src/lib/components/textfield/textfield.component.html +83 -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 +69 -0
- package/{lib/components/tristatecheckbox/index.d.ts → src/lib/components/tristatecheckbox/index.ts} +1 -1
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.html +23 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.scss +0 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.spec.ts +21 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.stories.ts +22 -0
- package/src/lib/components/tristatecheckbox/tristatecheckbox.component.ts +50 -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 +17 -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/esm2022/index.mjs +0 -30
- package/esm2022/lib/components/breadcrumb/breadcrumb.component.mjs +0 -31
- package/esm2022/lib/components/breadcrumb/breadcrumb.pipe.mjs +0 -17
- package/esm2022/lib/components/breadcrumb/index.mjs +0 -2
- package/esm2022/lib/components/button/button.component.mjs +0 -61
- package/esm2022/lib/components/button/index.mjs +0 -2
- package/esm2022/lib/components/calendar/calendar.component.mjs +0 -73
- package/esm2022/lib/components/calendar/index.mjs +0 -2
- package/esm2022/lib/components/checkbox/checkbox.component.mjs +0 -47
- package/esm2022/lib/components/checkbox/index.mjs +0 -2
- package/esm2022/lib/components/confirm-dialog/confirm-dialog.component.mjs +0 -65
- package/esm2022/lib/components/confirm-dialog/index.mjs +0 -2
- package/esm2022/lib/components/dropdown/dropdown.component.mjs +0 -139
- package/esm2022/lib/components/dropdown/index.mjs +0 -2
- package/esm2022/lib/components/errors/error.component.mjs +0 -41
- package/esm2022/lib/components/errors/index.mjs +0 -2
- package/esm2022/lib/components/form-field/form-field.component.mjs +0 -41
- package/esm2022/lib/components/form-field/index.mjs +0 -2
- package/esm2022/lib/components/header/header.component.mjs +0 -58
- package/esm2022/lib/components/header/index.mjs +0 -3
- package/esm2022/lib/components/header/services/header-provider.service.mjs +0 -24
- package/esm2022/lib/components/input-group/index.mjs +0 -2
- package/esm2022/lib/components/input-group/input-group.component.mjs +0 -57
- package/esm2022/lib/components/loader/index.mjs +0 -2
- package/esm2022/lib/components/loader/loader.component.mjs +0 -19
- package/esm2022/lib/components/multiselect/index.mjs +0 -2
- package/esm2022/lib/components/multiselect/multiselect.component.mjs +0 -124
- package/esm2022/lib/components/number-input/index.mjs +0 -2
- package/esm2022/lib/components/number-input/number-input.component.mjs +0 -64
- package/esm2022/lib/components/page-header/index.mjs +0 -2
- package/esm2022/lib/components/page-header/page-header.component.mjs +0 -28
- package/esm2022/lib/components/password/index.mjs +0 -2
- package/esm2022/lib/components/password/password.component.mjs +0 -59
- package/esm2022/lib/components/radiobutton/index.mjs +0 -2
- package/esm2022/lib/components/radiobutton/radiobutton.component.mjs +0 -57
- package/esm2022/lib/components/section/index.mjs +0 -2
- package/esm2022/lib/components/section/section.component.mjs +0 -35
- package/esm2022/lib/components/shared-components/action-button-group/action-button-group.component.mjs +0 -92
- package/esm2022/lib/components/shared-components/action-button-group/components/action-button/action-button.component.mjs +0 -60
- package/esm2022/lib/components/shared-components/action-button-group/index.mjs +0 -3
- package/esm2022/lib/components/shared-components/dynamic-component/dynamic-component-factory.service.mjs +0 -90
- package/esm2022/lib/components/shared-components/dynamic-component/dynamic-component.component.mjs +0 -41
- package/esm2022/lib/components/shared-components/dynamic-component/index.mjs +0 -3
- package/esm2022/lib/components/shared-components/feature-list/directives/feature-list-column.directive.mjs +0 -46
- package/esm2022/lib/components/shared-components/feature-list/directives/feature-list-filter-field.directive.mjs +0 -16
- package/esm2022/lib/components/shared-components/feature-list/feature-list-filter.pipe.mjs +0 -24
- package/esm2022/lib/components/shared-components/feature-list/feature-list-page.component.mjs +0 -42
- package/esm2022/lib/components/shared-components/feature-list/feature-list-page.model.mjs +0 -16
- package/esm2022/lib/components/shared-components/feature-list/feature-list.component.mjs +0 -275
- package/esm2022/lib/components/shared-components/feature-list/index.mjs +0 -6
- package/esm2022/lib/components/shared-components/filter/directives/filter-field.directive.mjs +0 -44
- package/esm2022/lib/components/shared-components/filter/filter.component.mjs +0 -190
- package/esm2022/lib/components/shared-components/filter/filter.model.mjs +0 -16
- package/esm2022/lib/components/shared-components/filter/index.mjs +0 -3
- package/esm2022/lib/components/shared-components/generic-field/generic-field.component.mjs +0 -93
- package/esm2022/lib/components/shared-components/generic-field/index.mjs +0 -2
- package/esm2022/lib/components/shared-components/generic-form/generic-form.component.mjs +0 -40
- package/esm2022/lib/components/shared-components/generic-form/generic-form.model.mjs +0 -50
- package/esm2022/lib/components/shared-components/generic-form/index.mjs +0 -3
- package/esm2022/lib/components/shared-components/index.mjs +0 -7
- package/esm2022/lib/components/side-menu/index.mjs +0 -3
- package/esm2022/lib/components/side-menu/side-menu.component.mjs +0 -92
- package/esm2022/lib/components/side-menu/side-menu.module.mjs +0 -74
- package/esm2022/lib/components/slider/index.mjs +0 -2
- package/esm2022/lib/components/slider/slider.component.mjs +0 -62
- package/esm2022/lib/components/snackbar/index.mjs +0 -3
- package/esm2022/lib/components/snackbar/services/snackbar.service.mjs +0 -50
- package/esm2022/lib/components/snackbar/snackbar.component.mjs +0 -33
- package/esm2022/lib/components/stepper/index.mjs +0 -2
- package/esm2022/lib/components/stepper/stepper.component.mjs +0 -48
- package/esm2022/lib/components/switch/index.mjs +0 -2
- package/esm2022/lib/components/switch/switch.component.mjs +0 -54
- package/esm2022/lib/components/tab-view/index.mjs +0 -4
- package/esm2022/lib/components/tab-view/tab-menu.pipe.mjs +0 -25
- package/esm2022/lib/components/tab-view/tab-view-item.component.mjs +0 -31
- package/esm2022/lib/components/tab-view/tab-view.component.mjs +0 -50
- package/esm2022/lib/components/tab-view/tab-view.module.mjs +0 -29
- package/esm2022/lib/components/table/index.mjs +0 -2
- package/esm2022/lib/components/table/table-filter.pipe.mjs +0 -49
- package/esm2022/lib/components/table/table.component.mjs +0 -220
- package/esm2022/lib/components/table/table.models.mjs +0 -17
- package/esm2022/lib/components/textarea/index.mjs +0 -2
- package/esm2022/lib/components/textarea/textarea.component.mjs +0 -65
- package/esm2022/lib/components/textfield/index.mjs +0 -2
- package/esm2022/lib/components/textfield/textfield.component.mjs +0 -65
- package/esm2022/lib/components/tristatecheckbox/index.mjs +0 -2
- package/esm2022/lib/components/tristatecheckbox/tristatecheckbox.component.mjs +0 -53
- package/esm2022/lib/icons.mjs +0 -35
- package/esm2022/lib/interceptors/http-error-message.interceptor.mjs +0 -31
- package/esm2022/verisoft-ui-primeng.mjs +0 -5
- package/fesm2022/verisoft-ui-primeng.mjs +0 -2909
- 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.component.d.ts +0 -20
- package/lib/components/calendar/calendar.component.d.ts +0 -17
- package/lib/components/checkbox/checkbox.component.d.ts +0 -9
- 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/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 -29
- 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-menu.pipe.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/tab-view/tab-view.module.d.ts +0 -13
- 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/tristatecheckbox/tristatecheckbox.component.d.ts +0 -9
- package/lib/icons.d.ts +0 -2
- package/lib/interceptors/http-error-message.interceptor.d.ts +0 -11
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { UntypedFormControl, Validators } from '@angular/forms';
|
|
2
|
+
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
|
3
|
+
import { faker } from '@faker-js/faker';
|
|
4
|
+
import { moduleMetadata, type Meta, type StoryObj } from '@storybook/angular';
|
|
5
|
+
import { within, expect } from '@storybook/test';
|
|
6
|
+
import { DropdownComponent } from './dropdown.component';
|
|
7
|
+
|
|
8
|
+
const meta: Meta<DropdownComponent<any>> = {
|
|
9
|
+
component: DropdownComponent,
|
|
10
|
+
title: 'DropdownComponent',
|
|
11
|
+
decorators: [
|
|
12
|
+
moduleMetadata({
|
|
13
|
+
imports: [BrowserAnimationsModule],
|
|
14
|
+
}),
|
|
15
|
+
],
|
|
16
|
+
};
|
|
17
|
+
export default meta;
|
|
18
|
+
type Story = StoryObj<DropdownComponent<any>>;
|
|
19
|
+
const options = Array(5)
|
|
20
|
+
.fill(0)
|
|
21
|
+
.map((x, i) => {
|
|
22
|
+
return {
|
|
23
|
+
id: i,
|
|
24
|
+
name: faker.airline.airline().name,
|
|
25
|
+
};
|
|
26
|
+
});
|
|
27
|
+
export const Primary: Story = {
|
|
28
|
+
parameters: {
|
|
29
|
+
controls: { expanded: true },
|
|
30
|
+
},
|
|
31
|
+
args: {
|
|
32
|
+
options: options,
|
|
33
|
+
optionLabel: 'name',
|
|
34
|
+
optionValue: 'id',
|
|
35
|
+
},
|
|
36
|
+
argTypes: {
|
|
37
|
+
optionLabel: {
|
|
38
|
+
description:
|
|
39
|
+
'String value that sets matching `T[property]` as a label value, where `property = optionLabel`',
|
|
40
|
+
},
|
|
41
|
+
optionValue: {
|
|
42
|
+
description:
|
|
43
|
+
'String value that sets matching `T[property]` as a binding value, where `property = optionValue`',
|
|
44
|
+
},
|
|
45
|
+
options: { description: 'Array of `T`' },
|
|
46
|
+
},
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
export const DropdownWithFormControl: Story = {
|
|
50
|
+
parameters: {
|
|
51
|
+
controls: { expanded: true },
|
|
52
|
+
},
|
|
53
|
+
args: {
|
|
54
|
+
options: options,
|
|
55
|
+
optionLabel: 'name',
|
|
56
|
+
optionValue: 'id',
|
|
57
|
+
label: 'Airline names',
|
|
58
|
+
placeholder: 'Select an option',
|
|
59
|
+
clearable: true,
|
|
60
|
+
formControl: new UntypedFormControl(undefined, Validators.required),
|
|
61
|
+
},
|
|
62
|
+
argTypes: {
|
|
63
|
+
formControl: {
|
|
64
|
+
control: false,
|
|
65
|
+
description: 'Form control with `Validators.required` set',
|
|
66
|
+
},
|
|
67
|
+
clearable: {
|
|
68
|
+
description: 'Defines if the `DropdownComponent` is clearable',
|
|
69
|
+
},
|
|
70
|
+
label: {
|
|
71
|
+
description:
|
|
72
|
+
'Represents the `label` of the `DropdownComponent`. Label is also being used as `placeholder` if the placeholder is not set',
|
|
73
|
+
},
|
|
74
|
+
optionLabel: {
|
|
75
|
+
description:
|
|
76
|
+
'String value that sets matching `T[property]` as a label value, where `property = optionLabel`',
|
|
77
|
+
},
|
|
78
|
+
optionValue: {
|
|
79
|
+
description:
|
|
80
|
+
'String value that sets matching `T[property]` as a binding value, where `property = optionValue`',
|
|
81
|
+
},
|
|
82
|
+
placeholder: { description: 'Placeholder for the `DropdownComponent`' },
|
|
83
|
+
options: { description: 'Array of `T`' },
|
|
84
|
+
},
|
|
85
|
+
play: async ({ canvasElement }: any) => {
|
|
86
|
+
const canvas = within(canvasElement);
|
|
87
|
+
expect(canvas.getByTitle('Airline names')).toBeTruthy();
|
|
88
|
+
expect(canvas.findByPlaceholderText('Select an option')).toBeTruthy();
|
|
89
|
+
},
|
|
90
|
+
};
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
Component,
|
|
5
|
+
EventEmitter,
|
|
6
|
+
forwardRef,
|
|
7
|
+
Input,
|
|
8
|
+
OnChanges,
|
|
9
|
+
OnDestroy,
|
|
10
|
+
Optional,
|
|
11
|
+
Output,
|
|
12
|
+
Self,
|
|
13
|
+
SimpleChanges,
|
|
14
|
+
ViewEncapsulation,
|
|
15
|
+
OnInit,
|
|
16
|
+
} from '@angular/core';
|
|
17
|
+
import {
|
|
18
|
+
ControlValueAccessor,
|
|
19
|
+
NgControl,
|
|
20
|
+
ReactiveFormsModule,
|
|
21
|
+
} from '@angular/forms';
|
|
22
|
+
import { FilterEvent, LazyLoadEvent } from '@verisoft/core';
|
|
23
|
+
import {
|
|
24
|
+
BaseFormInputComponent,
|
|
25
|
+
BaseInputControls,
|
|
26
|
+
DROPDOWN_COMPONENT_TOKEN,
|
|
27
|
+
DropdownCore
|
|
28
|
+
} from '@verisoft/ui-core';
|
|
29
|
+
import { ScrollerOptions } from 'primeng/api';
|
|
30
|
+
import {
|
|
31
|
+
DropdownFilterEvent,
|
|
32
|
+
DropdownModule,
|
|
33
|
+
} from 'primeng/dropdown';
|
|
34
|
+
import { FloatLabelModule } from 'primeng/floatlabel';
|
|
35
|
+
import { MessageModule } from 'primeng/message';
|
|
36
|
+
import { ScrollerLazyLoadEvent } from 'primeng/scroller';
|
|
37
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
38
|
+
import { Subject } from 'rxjs';
|
|
39
|
+
import { ErrorComponent } from '../errors';
|
|
40
|
+
import { FormFieldComponent } from '../form-field';
|
|
41
|
+
|
|
42
|
+
@Component({
|
|
43
|
+
selector: 'v-dropdown',
|
|
44
|
+
standalone: true,
|
|
45
|
+
imports: [
|
|
46
|
+
CommonModule,
|
|
47
|
+
ReactiveFormsModule,
|
|
48
|
+
DropdownModule,
|
|
49
|
+
TooltipModule,
|
|
50
|
+
FormFieldComponent,
|
|
51
|
+
MessageModule,
|
|
52
|
+
FloatLabelModule,
|
|
53
|
+
ErrorComponent
|
|
54
|
+
],
|
|
55
|
+
templateUrl: './dropdown.component.html',
|
|
56
|
+
styleUrls: ['./dropdown.component.scss'],
|
|
57
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
58
|
+
encapsulation: ViewEncapsulation.None,
|
|
59
|
+
providers: [
|
|
60
|
+
{
|
|
61
|
+
provide: BaseInputControls,
|
|
62
|
+
useExisting: forwardRef(() => DropdownComponent),
|
|
63
|
+
multi: true,
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
provide: DROPDOWN_COMPONENT_TOKEN,
|
|
67
|
+
useExisting: DropdownComponent,
|
|
68
|
+
},
|
|
69
|
+
],
|
|
70
|
+
})
|
|
71
|
+
export class DropdownComponent<T>
|
|
72
|
+
extends BaseFormInputComponent
|
|
73
|
+
implements
|
|
74
|
+
ControlValueAccessor,
|
|
75
|
+
OnChanges,
|
|
76
|
+
OnDestroy,
|
|
77
|
+
OnInit,
|
|
78
|
+
DropdownCore<T>
|
|
79
|
+
{
|
|
80
|
+
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
81
|
+
super(ngControl);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@Input() options: T[] | undefined = [];
|
|
85
|
+
@Input() optionLabel: string | undefined;
|
|
86
|
+
@Input() optionValue: string | undefined;
|
|
87
|
+
@Input() dropdownIcon?: string;
|
|
88
|
+
@Input() floatLabel?: string;
|
|
89
|
+
@Input() editable = false;
|
|
90
|
+
@Input() loading = false;
|
|
91
|
+
@Input() lazy = false;
|
|
92
|
+
@Input() filter = true;
|
|
93
|
+
@Input() forceMinWidth = false;
|
|
94
|
+
@Input() showFilter = false;
|
|
95
|
+
@Input() localSearch = false;
|
|
96
|
+
|
|
97
|
+
@Output() showed = new EventEmitter<any>();
|
|
98
|
+
@Output() cleared = new EventEmitter<any>();
|
|
99
|
+
@Output() lazyLoad = new EventEmitter<LazyLoadEvent>();
|
|
100
|
+
@Output() filtered = new EventEmitter<FilterEvent>();
|
|
101
|
+
|
|
102
|
+
private destroy$ = new Subject<void>();
|
|
103
|
+
|
|
104
|
+
virtualScrollOptions!: ScrollerOptions | undefined;
|
|
105
|
+
virtualOptionSize = 37.5;
|
|
106
|
+
|
|
107
|
+
ngOnChanges(changes: SimpleChanges): void {
|
|
108
|
+
if (changes['lazy'] || changes['loading']) {
|
|
109
|
+
this.virtualScrollOptions = this.lazy
|
|
110
|
+
? {
|
|
111
|
+
showLoader: this.loading,
|
|
112
|
+
lazy: true,
|
|
113
|
+
onLazyLoad: this.onLazyLoad.bind(this),
|
|
114
|
+
}
|
|
115
|
+
: undefined;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
ngOnDestroy(): void {
|
|
120
|
+
this.destroy$.next();
|
|
121
|
+
this.destroy$.complete();
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
onLazyLoad(event: ScrollerLazyLoadEvent): void {
|
|
125
|
+
this.lazyLoad.emit({
|
|
126
|
+
offset: event.first,
|
|
127
|
+
limit: event.last - event.first,
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
filterChange(event: DropdownFilterEvent): void {
|
|
132
|
+
this.filtered.emit({
|
|
133
|
+
filter: event.filter,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
onDropdownShow(): void {
|
|
138
|
+
this.showed.emit();
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
onDropdownClear(): void {
|
|
142
|
+
this.cleared.emit();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './dropdown.component';
|
|
1
|
+
export * from './dropdown.component';
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CommonModule } from "@angular/common";
|
|
2
|
+
import { Component, inject, Input, } from "@angular/core";
|
|
3
|
+
import { NgControl, ValidationErrors } from "@angular/forms";
|
|
4
|
+
import { ERROR_PROVIDER_TOKEN } from "@verisoft/core";
|
|
5
|
+
import { SlotPosition, SlotPositionType } from "@verisoft/ui-core";
|
|
6
|
+
import { MessageModule } from "primeng/message";
|
|
7
|
+
import { Observable } from "rxjs";
|
|
8
|
+
import { Icons } from "../../icons";
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: "v-validation-message",
|
|
12
|
+
templateUrl: "./error.component.html",
|
|
13
|
+
styleUrl: "./error.component.scss",
|
|
14
|
+
standalone: true,
|
|
15
|
+
imports: [CommonModule, MessageModule],
|
|
16
|
+
})
|
|
17
|
+
export class ErrorComponent {
|
|
18
|
+
@Input({ required: true }) ngControl?: NgControl;
|
|
19
|
+
|
|
20
|
+
@Input() errorSlot: SlotPositionType = SlotPosition.bottom
|
|
21
|
+
|
|
22
|
+
@Input() messageSlot: SlotPositionType = SlotPosition.bottom
|
|
23
|
+
|
|
24
|
+
@Input() variant = 'simple';
|
|
25
|
+
|
|
26
|
+
@Input() severity = 'error';
|
|
27
|
+
|
|
28
|
+
readonly errorService = inject(ERROR_PROVIDER_TOKEN);
|
|
29
|
+
|
|
30
|
+
icons = Icons
|
|
31
|
+
|
|
32
|
+
getErrorMessage(errors: ValidationErrors): Observable<string> {
|
|
33
|
+
return this.errorService.mapError(errors);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './error.component';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
<div class="v-form-field mt-3" [attr.data-testId]="testId">
|
|
2
|
+
<div [ngClass]="{ 'd-block d-md-flex': display === 'flex', 'd-lg-flex': display === 'block' }">
|
|
3
|
+
<div class="col-12 col-md-4 d-flex align-items-center">
|
|
4
|
+
<label
|
|
5
|
+
class="v-formfield-label d-flex align-items-center"
|
|
6
|
+
[ngClass]="{
|
|
7
|
+
'pb-2': display === 'block',
|
|
8
|
+
'text-error': (errorProvider.mapError(ngControl?.errors ?? [])) && ngControl?.dirty,
|
|
9
|
+
'text-warning': (ngControl?.errors | warning) && ngControl?.dirty,
|
|
10
|
+
'text-default': !ngControl?.invalid && !ngControl?.dirty,
|
|
11
|
+
'text-secondary': !ngControl?.invalid && ngControl?.dirty
|
|
12
|
+
}"
|
|
13
|
+
>{{ label }}<span *ngIf="label">:</span>
|
|
14
|
+
<span *ngIf="required" class="text-error ps-1">*</span>
|
|
15
|
+
</label>
|
|
16
|
+
<i *ngIf="tooltip"
|
|
17
|
+
[pTooltip]="tooltip"
|
|
18
|
+
class="ps-2 text-default v-tooltip {{ icons.infoCircle }}"
|
|
19
|
+
></i>
|
|
20
|
+
</div>
|
|
21
|
+
<div
|
|
22
|
+
class="col-sm-12 col-md-8 col-lg-8"
|
|
23
|
+
>
|
|
24
|
+
<div
|
|
25
|
+
class="v-form-field-content align-items-center w-100"
|
|
26
|
+
[ngClass]="{ 'd-flex': display === 'flex', 'd-block': display === 'block', 'input-warning': ngControl?.errors | warning }"
|
|
27
|
+
>
|
|
28
|
+
<ng-content></ng-content>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
<div class="align-content-center">
|
|
32
|
+
<ng-container>
|
|
33
|
+
</ng-container>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { FormFieldComponent } from './form-field.component';
|
|
3
|
+
|
|
4
|
+
describe('FormFieldComponent', () => {
|
|
5
|
+
let component: FormFieldComponent;
|
|
6
|
+
let fixture: ComponentFixture<FormFieldComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [FormFieldComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(FormFieldComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { NgControl } from '@angular/forms';
|
|
2
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
3
|
+
import { within, expect } from '@storybook/test';
|
|
4
|
+
import { FormFieldComponent } from './form-field.component';
|
|
5
|
+
|
|
6
|
+
const meta: Meta<FormFieldComponent> = {
|
|
7
|
+
component: FormFieldComponent,
|
|
8
|
+
title: 'FormFieldComponent',
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<FormFieldComponent>;
|
|
12
|
+
|
|
13
|
+
export const Primary: Story = {
|
|
14
|
+
parameters: {
|
|
15
|
+
controls: { expanded: true },
|
|
16
|
+
},
|
|
17
|
+
args: {
|
|
18
|
+
label: 'Label showcase',
|
|
19
|
+
tooltip: 'This is a tooltip lorem ipsum',
|
|
20
|
+
required: false,
|
|
21
|
+
testId: '123',
|
|
22
|
+
display: 'flex',
|
|
23
|
+
ngControl: {} as NgControl,
|
|
24
|
+
},
|
|
25
|
+
argTypes: {
|
|
26
|
+
ngControl: {
|
|
27
|
+
control: false,
|
|
28
|
+
description: 'NgControl which is provided from a form component',
|
|
29
|
+
},
|
|
30
|
+
display: {
|
|
31
|
+
options: ['flex', 'block'],
|
|
32
|
+
control: {
|
|
33
|
+
type: 'radio',
|
|
34
|
+
},
|
|
35
|
+
description:
|
|
36
|
+
'Defines if the **FormFieldComponent** is in `flex` or `block` display mode',
|
|
37
|
+
},
|
|
38
|
+
required: {
|
|
39
|
+
control: {
|
|
40
|
+
type: 'boolean',
|
|
41
|
+
},
|
|
42
|
+
description: 'Defines if the **FormFieldComponent** is `required`',
|
|
43
|
+
},
|
|
44
|
+
testId: {
|
|
45
|
+
control: {
|
|
46
|
+
type: 'text',
|
|
47
|
+
},
|
|
48
|
+
description: 'Sets the **FormFieldComponent** `test id`',
|
|
49
|
+
},
|
|
50
|
+
label: {
|
|
51
|
+
control: {
|
|
52
|
+
type: 'text',
|
|
53
|
+
},
|
|
54
|
+
description: 'Sets the **FormFieldComponent** `label`',
|
|
55
|
+
},
|
|
56
|
+
tooltip: {
|
|
57
|
+
control: {
|
|
58
|
+
type: 'text',
|
|
59
|
+
},
|
|
60
|
+
description: 'Sets the **FormFieldComponent** `tooltip`',
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
play: async ({ canvasElement }: any) => {
|
|
64
|
+
const canvas = within(canvasElement);
|
|
65
|
+
expect(canvas.getByText('Label showcase')).toBeTruthy();
|
|
66
|
+
expect(canvas.queryAllByText('This is a tooltip lorem ipsum')).toBeTruthy();
|
|
67
|
+
expect(canvas.findByTestId('123')).toBeTruthy();
|
|
68
|
+
},
|
|
69
|
+
};
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import { Component, inject, Input, Optional, Self } from '@angular/core';
|
|
3
|
+
import { NgControl, ReactiveFormsModule } from '@angular/forms';
|
|
4
|
+
import { ERROR_PROVIDER_TOKEN } from '@verisoft/core';
|
|
5
|
+
import { BaseFormInputComponent, FormFieldCore, WarningPipe } from '@verisoft/ui-core';
|
|
6
|
+
import { MessageModule } from 'primeng/message';
|
|
7
|
+
import { TooltipModule } from 'primeng/tooltip';
|
|
8
|
+
import { Icons } from '../../icons';
|
|
9
|
+
|
|
10
|
+
@Component({
|
|
11
|
+
selector: 'v-form-field',
|
|
12
|
+
standalone: true,
|
|
13
|
+
imports: [
|
|
14
|
+
CommonModule,
|
|
15
|
+
WarningPipe,
|
|
16
|
+
ReactiveFormsModule,
|
|
17
|
+
MessageModule,
|
|
18
|
+
TooltipModule,
|
|
19
|
+
],
|
|
20
|
+
templateUrl: './form-field.component.html',
|
|
21
|
+
styleUrl: './form-field.component.scss',
|
|
22
|
+
})
|
|
23
|
+
export class FormFieldComponent
|
|
24
|
+
extends BaseFormInputComponent
|
|
25
|
+
implements FormFieldCore
|
|
26
|
+
{
|
|
27
|
+
@Input() display: 'flex' | 'block' = 'block';
|
|
28
|
+
|
|
29
|
+
@Input() variant!: 'simple';
|
|
30
|
+
|
|
31
|
+
protected readonly errorProvider = inject(ERROR_PROVIDER_TOKEN)
|
|
32
|
+
|
|
33
|
+
icons = Icons;
|
|
34
|
+
|
|
35
|
+
constructor(@Optional() @Self() ngControl: NgControl) {
|
|
36
|
+
super(ngControl);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './form-field.component';
|
|
1
|
+
export * from './form-field.component';
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
<div
|
|
2
|
+
class="v-header d-flex w-100 text-align-end"
|
|
3
|
+
[ngStyle]="{ position: exampleHeader ? 'relative' : 'fixed' }"
|
|
4
|
+
>
|
|
5
|
+
<ng-container *ngIf="screenSizeService.isMobileBlock | async">
|
|
6
|
+
<div class="burger-menu">
|
|
7
|
+
<v-button
|
|
8
|
+
[icon]="menuVisible ? icons.cross : icons.action"
|
|
9
|
+
(click)="toggleMenu()"
|
|
10
|
+
/>
|
|
11
|
+
<div class="logo mt-3" [routerLink]="[logoRouterLink]">
|
|
12
|
+
<img [src]="logoUrl" alt=""/>
|
|
13
|
+
</div>
|
|
14
|
+
</div>
|
|
15
|
+
</ng-container>
|
|
16
|
+
<div class="v-header-title col-auto">
|
|
17
|
+
<p class="text-primary text-nowrap d-none d-md-block ps-3 m-0 w-100">
|
|
18
|
+
{{ title }}
|
|
19
|
+
</p>
|
|
20
|
+
<div class="col-8 col-md-auto ps-3 m-0 w-100">
|
|
21
|
+
<ng-content select="[module]"></ng-content>
|
|
22
|
+
</div>
|
|
23
|
+
</div>
|
|
24
|
+
<ng-container *ngIf="(screenSizeService.isMobileBlock | async) === false">
|
|
25
|
+
<div class="w-100 text-start justify-content-start align-content-center">
|
|
26
|
+
<ng-content select="[breadcrumbs]"></ng-content>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="col-auto d-flex align-items-center justify-content-end p-4">
|
|
29
|
+
<div class="d-flex aling-items-center">
|
|
30
|
+
<p-avatar
|
|
31
|
+
image="assets/primeng/images/_global/jara.png"
|
|
32
|
+
styleClass="me-2"
|
|
33
|
+
size="large"
|
|
34
|
+
shape="circle"
|
|
35
|
+
/>
|
|
36
|
+
<div class="card align-content-center pe-3">
|
|
37
|
+
<p
|
|
38
|
+
class="text-primary m-0 header-username"
|
|
39
|
+
[innerHTML]="userName"
|
|
40
|
+
></p>
|
|
41
|
+
<p
|
|
42
|
+
class="text-default m-0 header-userrole"
|
|
43
|
+
[innerHTML]="userRole"
|
|
44
|
+
></p>
|
|
45
|
+
</div>
|
|
46
|
+
</div>
|
|
47
|
+
<div class="d-flex gap-4 align-items-center">
|
|
48
|
+
<ng-content select="[useractions]"/>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</ng-container>
|
|
52
|
+
<ng-container *ngIf="screenSizeService.isMobileBlock | async">
|
|
53
|
+
<div class="user-info-container d-flex align-items-center">
|
|
54
|
+
<div class="d-flex">
|
|
55
|
+
<div class="card pe-3 align-content-center">
|
|
56
|
+
<p-avatar
|
|
57
|
+
image="assets/images/_global/jara.png"
|
|
58
|
+
styleClass="mr-2"
|
|
59
|
+
size="large"
|
|
60
|
+
shape="circle"
|
|
61
|
+
></p-avatar>
|
|
62
|
+
</div>
|
|
63
|
+
<div class="card align-content-center pe-3 d-flex">
|
|
64
|
+
<div class="user-info">
|
|
65
|
+
<p
|
|
66
|
+
class="text-default m-0 header-username"
|
|
67
|
+
[innerHTML]="userName"
|
|
68
|
+
></p>
|
|
69
|
+
<p
|
|
70
|
+
class="text-default m-0 header-userrole"
|
|
71
|
+
[innerHTML]="userRole"
|
|
72
|
+
></p>
|
|
73
|
+
</div>
|
|
74
|
+
<div class="user-actions">
|
|
75
|
+
<ng-content select="[useractions]"></ng-content>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
<div class="d-flex gap-4 align-items-center justify-content-center">
|
|
80
|
+
<ng-content select="[dbcontext]" />
|
|
81
|
+
</div>
|
|
82
|
+
</div>
|
|
83
|
+
</ng-container>
|
|
84
|
+
</div>
|
|
File without changes
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
+
import { HeaderComponent } from './header.component';
|
|
3
|
+
|
|
4
|
+
describe('HeaderComponent', () => {
|
|
5
|
+
let component: HeaderComponent;
|
|
6
|
+
let fixture: ComponentFixture<HeaderComponent>;
|
|
7
|
+
|
|
8
|
+
beforeEach(async () => {
|
|
9
|
+
await TestBed.configureTestingModule({
|
|
10
|
+
imports: [HeaderComponent],
|
|
11
|
+
}).compileComponents();
|
|
12
|
+
|
|
13
|
+
fixture = TestBed.createComponent(HeaderComponent);
|
|
14
|
+
component = fixture.componentInstance;
|
|
15
|
+
fixture.detectChanges();
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
it('should create', () => {
|
|
19
|
+
expect(component).toBeTruthy();
|
|
20
|
+
});
|
|
21
|
+
});
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/angular';
|
|
2
|
+
import { within, expect } from '@storybook/test';
|
|
3
|
+
import { HeaderComponent } from './header.component';
|
|
4
|
+
|
|
5
|
+
const meta: Meta<HeaderComponent> = {
|
|
6
|
+
component: HeaderComponent,
|
|
7
|
+
title: 'HeaderComponent',
|
|
8
|
+
};
|
|
9
|
+
export default meta;
|
|
10
|
+
type Story = StoryObj<HeaderComponent>;
|
|
11
|
+
|
|
12
|
+
export const Primary: Story = {
|
|
13
|
+
args: {
|
|
14
|
+
title: 'verisoft',
|
|
15
|
+
userName: 'Elon Musk',
|
|
16
|
+
userRole: 'Mars Owner',
|
|
17
|
+
},
|
|
18
|
+
play: async ({ canvasElement }: any) => {
|
|
19
|
+
const canvas = within(canvasElement);
|
|
20
|
+
expect(canvas.getByText('verisoft')).toBeTruthy();
|
|
21
|
+
expect(canvas.findByText('Elon Musk')).toBeTruthy();
|
|
22
|
+
expect(canvas.findByText('Mars Owner')).toBeTruthy();
|
|
23
|
+
},
|
|
24
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { CommonModule } from '@angular/common';
|
|
2
|
+
import {
|
|
3
|
+
ChangeDetectionStrategy,
|
|
4
|
+
ChangeDetectorRef,
|
|
5
|
+
Component,
|
|
6
|
+
Input,
|
|
7
|
+
OnInit,
|
|
8
|
+
} from '@angular/core';
|
|
9
|
+
import { RouterModule } from '@angular/router';
|
|
10
|
+
import {
|
|
11
|
+
HEADER_COMPONENT_TOKEN,
|
|
12
|
+
HeaderCore,
|
|
13
|
+
ScreenSizeService,
|
|
14
|
+
UnsubscribeComponent,
|
|
15
|
+
} from '@verisoft/ui-core';
|
|
16
|
+
import { AvatarModule } from 'primeng/avatar';
|
|
17
|
+
import { Icons } from '../../icons';
|
|
18
|
+
import { ButtonComponent } from '../button';
|
|
19
|
+
import { HeaderProviderService } from './services/header-provider.service';
|
|
20
|
+
|
|
21
|
+
@Component({
|
|
22
|
+
selector: 'v-header',
|
|
23
|
+
standalone: true,
|
|
24
|
+
imports: [CommonModule, AvatarModule, ButtonComponent, RouterModule],
|
|
25
|
+
templateUrl: './header.component.html',
|
|
26
|
+
styleUrl: './header.component.scss',
|
|
27
|
+
changeDetection: ChangeDetectionStrategy.OnPush,
|
|
28
|
+
providers: [
|
|
29
|
+
{ provide: HEADER_COMPONENT_TOKEN, useExisting: HeaderComponent },
|
|
30
|
+
],
|
|
31
|
+
})
|
|
32
|
+
export class HeaderComponent
|
|
33
|
+
extends UnsubscribeComponent
|
|
34
|
+
implements OnInit, HeaderCore
|
|
35
|
+
{
|
|
36
|
+
constructor(
|
|
37
|
+
readonly providerService: HeaderProviderService,
|
|
38
|
+
readonly screenSizeService: ScreenSizeService,
|
|
39
|
+
readonly cdr: ChangeDetectorRef
|
|
40
|
+
) {
|
|
41
|
+
super();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
@Input() title!: string;
|
|
45
|
+
@Input() logoUrl!: string;
|
|
46
|
+
@Input() userName!: string;
|
|
47
|
+
@Input() userRole!: any | any[] | undefined;
|
|
48
|
+
@Input() menuRef!: HTMLDivElement;
|
|
49
|
+
@Input() exampleHeader = false;
|
|
50
|
+
|
|
51
|
+
icons = Icons;
|
|
52
|
+
protected menuVisible = false;
|
|
53
|
+
protected logoRouterLink!: string;
|
|
54
|
+
|
|
55
|
+
ngOnInit(): void {
|
|
56
|
+
this.providerService.init();
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
toggleMenu() {
|
|
60
|
+
if (this.menuRef) {
|
|
61
|
+
this.menuVisible = !this.menuVisible;
|
|
62
|
+
this.menuRef.classList.toggle('menu-visible');
|
|
63
|
+
this.cdr.detectChanges();
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export * from './header.component';
|
|
2
|
-
export * from './services/header-provider.service';
|
|
1
|
+
export * from './header.component';
|
|
2
|
+
export * from './services/header-provider.service';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Inject, Injectable } from '@angular/core';
|
|
2
|
+
import { SETTINGS_MENU } from '@verisoft/ui-core';
|
|
3
|
+
import { MenuItem } from '@verisoft/ui-core';
|
|
4
|
+
|
|
5
|
+
@Injectable({
|
|
6
|
+
providedIn: 'root',
|
|
7
|
+
})
|
|
8
|
+
export class HeaderProviderService {
|
|
9
|
+
constructor(@Inject(SETTINGS_MENU) private settingsMenu: MenuItem[]) {}
|
|
10
|
+
menu: MenuItem[] = [];
|
|
11
|
+
|
|
12
|
+
init(): void {
|
|
13
|
+
this.menu = this.settingsMenu;
|
|
14
|
+
}
|
|
15
|
+
}
|